Skip to content

Releases: vkrychun/StemJSON

StemJSON v1.1.0

Choose a tag to compare

@vkrychun vkrychun released this 02 Jul 08:35

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() and range() 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. range pairs with map to generate structured data declaratively. random is 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 utilities keys(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.
  • ai action (§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 request body; 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 : e chains natively; the flat form is canonical.
  • style.shape.stroke (§7.9) — content accepts the same value forms as fill, 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

Choose a tag to compare

@vkrychun vkrychun released this 12 Jun 07:57

Editorial clarification. No breaking changes; modules targeting 1.0 are unaffected.

  • Component type is 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

Choose a tag to compare

@vkrychun vkrychun released this 05 Jun 12:39

Editorial clarifications and one new appendix. No breaking changes; modules targeting 1.0 are unaffected.

  • Clarified state propagation (a state action'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.read return contract (always an array) and the map position/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

Choose a tag to compare

@vkrychun vkrychun released this 01 May 15:07

Initial public release of the StemJSON specification.

Subsequent revisions will be recorded in CHANGELOG.md.