mirror of
https://github.com/vercel-labs/json-render.git
synced 2026-10-02 03:54:41 +08:00
* feat: add @json-render/ink terminal renderer and ink-chat example Adds a new `@json-render/ink` package that brings json-render specs to terminal UIs via Ink (React for CLIs). Includes 24 standard components (layout, text, inputs, markdown, etc.), context providers for state, validation, visibility, actions, focus, and repeat scopes, plus a streaming JSONL hook for progressive spec rendering. Also adds an `ink-chat` example app demonstrating an AI chat interface in the terminal with streaming responses, tool calls, and interactive wizard flows. Includes 76 tests (24 unit + 52 e2e), docs page, and web app integration. * feat: show live spec preview during streaming Render the spec progressively as JSONL patches arrive instead of only showing a spinner. The preview disappears when streaming completes and the finalized message replaces it in history. * feat: clip streaming preview to 6 lines * refactor: move spinner into input box, show full streaming preview * fix: skip spacer during streaming to prevent clipping tall previews * fix: strip invisible colors on dark terminal backgrounds Drop foreground colors like "black" and "#000000" from AI-generated specs so text remains readable on dark terminals. Removed hardcoded color="black" from Badge and added safeColor() guard to all components that accept user-specified color props. * fix: always show spacer to keep input pinned to bottom * fix: show dash placeholder for empty values in Table and KeyValue Empty or null values in Table cells and KeyValue now render as "—" instead of blank space. Also removed dimColor from ListItem subtitle and trailing for better readability on dark terminals. * fix: division by zero in Sparkline sampling when maxWidth is 1 * fix: Review feedback Signed-off-by: Alexis Rico <sferadev@gmail.com> * fix: Update readme Signed-off-by: Alexis Rico <sferadev@gmail.com> --------- Signed-off-by: Alexis Rico <sferadev@gmail.com>
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun dev
Open http://json-render.localhost:1355 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Inter, a custom Google Font.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Deploy on Vercel
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.