json-render v0.19.0

v0.19.0
Added 5
  • Custom directives API via `defineDirective` in `@json-render/core` to declare new JSON shapes that resolve to computed values at render time
  • Directive composition support allowing nested directives to resolve inside-out across all four renderers (React, Vue, Svelte, Solid)
  • New `@json-render/directives` package with seven ready-made directives: `$format`, `$math`, `$concat`, `$count`, `$truncate`, `$pluralize`, and `$join`
  • Export of `createI18nDirective` for `$t` translation keys with `{{param}}` interpolation
  • Export of `standardDirectives` for one-line registration of common directives
Changed 1
  • Added documentation to the chat, dashboard, game-engine, and no-ai examples

From json-render

New Features
  • Custom directives API — @json-render/core now supports custom directives via defineDirective, letting you declare new JSON shapes (like $format, $math) that resolve to computed values at render time. Directives compose naturally — nest $format over $math over $state and they resolve inside-out. All four renderers (React, Vue, Svelte, Solid) have built-in directive resolution (#279)
  • @json-render/directives — New package shipping seven ready-made directives: $format (date, currency, number, percent via Intl), $math (add, subtract, multiply, divide, mod, min, max, round, floor, ceil, abs), $concat, $count, $truncate, $pluralize, and $join. Also exports createI18nDirective for $t translation keys with {{param}} interpolation, and standardDirectives for one-line registration (#279)
Improvements
  • Example READMEs — Added documentation to the chat, dashboard, game-engine, and no-ai examples (#277)
Contributors
  • @ctate
View original

Upgraded? How did it go?

Discussion