Repository navigation
Releases: vkrychun/StemJSON
Releases · vkrychun/StemJSON
Release list
StemJSON v1.1.0
Minor version: backwards-compatible language additions plus editorial clarifications. Modules targeting 1.0 are unaffected; a module that uses a 1.1 feature SHOULD declare "version": "1.1".
Added
switch()expression function (§8.6) — a flat multi-way conditional:switch(test1, value1, test2, value2, …, default). Returns the value paired with the first truthy test, or the trailing default. Eliminates the deeply nested ternaries that are the dominant source of unbalanced-paren errors in generated modules.random()andrange()functions (§8.6, §8.6.1) —random()→ a double in[0, 1),random(min, max)→ an inclusive integer;range(n)/range(start, end)build an integer sequence.rangepairs withmapto generate structured data declaratively.randomis nondeterministic and must be used in an action/lifecycle value, never a render binding.- Collection functions (§8.6) — positional array edits
setAt(arr, i, v),removeAt(arr, i),insertAt(arr, i, v)(negative indices count from the tail), and dictionary utilitieskeys(dict),values(dict),removeKey(dict, k). All return a new value. Positional array editing is the missing piece for piece-moving board games and index-addressed grids. aiaction (§10.11) — calls an AI provider and binds the result into the module, the foundation for AI-driven backends (a game opponent, summarization, on-the-fly data shaping). Provider-agnostic: the model, prompt, and response schema live in the requestbody; the API key is injected by the host repository's auth interceptor, never in JSON.
Clarified (editorial; runtime behavior unchanged)
- Chained ternaries take no parentheses (§8.5) — the ternary is right-associative with lowest precedence, so
a ? b : c ? d : echains natively; the flat form is canonical. style.shape.stroke(§7.9) —contentaccepts the same value forms asfill, including{ "gradient": ... }directly as the discriminator.
Previous spec revisions remain available: spec/v1.0.md.
Full normative spec: spec/v1.1.md · LLM edition: spec/v1.1-ai.md
StemJSON v1.0.2
Editorial clarification. No breaking changes; modules targeting 1.0 are unaffected.
- Component
typeis matched case-insensitively; the canonical form is lowercase (§3.2). Normalized the type catalogue (gridRow→gridrow,roundedRectangle→roundedrectangle) and stated the convention: component types are lowercase, style domains are camelCase.
Full normative spec: spec/v1.0.md
StemJSON v1.0.1
Editorial clarifications and one new appendix. No breaking changes; modules targeting 1.0 are unaffected.
- Clarified state propagation (a
stateaction's write does not propagate through an action chain) and cross-module context inheritance. - Clarified expression and date-casting rules; tightened the closed color list; added anti-pattern callouts.
- Documented the
photos.readreturn contract (always an array) and themapposition/region shape. - Added Appendix C - common iOS/SwiftUI assumptions that do not hold in StemJSON.
Full normative spec: spec/v1.0.md
StemJSON v1.0.0
Initial public release of the StemJSON specification.
- Full specification:
spec/v1.0.md - LLM-optimised edition:
spec/v1.0-ai.md - License: OWFa 1.0 with attribution requirement (§1.5)
- Trademark policy: TRADEMARK_POLICY.md
Subsequent revisions will be recorded in CHANGELOG.md.