page.tsx 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. import { Code } from "@/components/code";
  2. export const metadata = {
  3. title: "Changelog | json-render",
  4. };
  5. export default function ChangelogPage() {
  6. return (
  7. <article>
  8. <h1 className="text-3xl font-bold mb-4">Changelog</h1>
  9. <p className="text-muted-foreground mb-8">
  10. Notable changes and updates to json-render.
  11. </p>
  12. <h2 className="text-xl font-semibold mt-12 mb-4">v0.3.0</h2>
  13. <p className="text-sm text-muted-foreground mb-6">February 2026</p>
  14. <h3 className="text-lg font-semibold mt-8 mb-4">
  15. New: Custom Schema System
  16. </h3>
  17. <p className="text-sm text-muted-foreground mb-4">
  18. Create custom output formats with <code>defineSchema</code>. Each
  19. renderer now defines its own schema, enabling completely different spec
  20. formats for different use cases.
  21. </p>
  22. <Code lang="typescript">{`import { defineSchema } from "@json-render/core";
  23. const mySchema = defineSchema((s) => ({
  24. spec: s.object({
  25. pages: s.array(s.object({
  26. title: s.string(),
  27. blocks: s.array(s.ref("catalog.blocks")),
  28. })),
  29. }),
  30. catalog: s.object({
  31. blocks: s.map({ props: s.zod(), description: s.string() }),
  32. }),
  33. }), {
  34. promptTemplate: myPromptTemplate,
  35. });`}</Code>
  36. <h3 className="text-lg font-semibold mt-8 mb-4">
  37. New: AI Prompt Generation
  38. </h3>
  39. <p className="text-sm text-muted-foreground mb-4">
  40. Catalogs now generate AI system prompts automatically with{" "}
  41. <code>catalog.prompt()</code>. The prompt includes all component
  42. definitions, props schemas, and action descriptions - ensuring the AI
  43. only generates valid specs.
  44. </p>
  45. <Code lang="typescript">{`import { defineCatalog } from "@json-render/core";
  46. import { schema } from "@json-render/react/schema";
  47. const catalog = defineCatalog(schema, {
  48. components: { /* ... */ },
  49. actions: { /* ... */ },
  50. });
  51. // Generate system prompt for AI
  52. const systemPrompt = catalog.prompt();
  53. // Use with any AI SDK
  54. const result = await streamText({
  55. model: "claude-haiku-4.5",
  56. system: systemPrompt,
  57. prompt: userMessage,
  58. });`}</Code>
  59. <h3 className="text-lg font-semibold mt-8 mb-4">New: SpecStream</h3>
  60. <p className="text-sm text-muted-foreground mb-4">
  61. SpecStream is json-render&apos;s streaming format for progressively
  62. building specs from JSONL patches. The new compiler API makes it easy to
  63. process streaming AI responses.
  64. </p>
  65. <Code lang="typescript">{`import { createSpecStreamCompiler } from "@json-render/core";
  66. const compiler = createSpecStreamCompiler<MySpec>();
  67. // Process streaming chunks
  68. const { result, newPatches } = compiler.push(chunk);
  69. setSpec(result); // Update UI with partial result`}</Code>
  70. <h3 className="text-lg font-semibold mt-8 mb-4">
  71. New: @json-render/codegen
  72. </h3>
  73. <p className="text-sm text-muted-foreground mb-4">
  74. Export specs as React code. Traverse specs and serialize them to JSX for
  75. code export features.
  76. </p>
  77. <Code lang="typescript">{`import { traverseSpec, serializeToJSX } from "@json-render/codegen";
  78. const jsx = serializeToJSX(spec, catalog);
  79. // Returns: <Card title="Hello"><Button label="Click" /></Card>`}</Code>
  80. <h3 className="text-lg font-semibold mt-8 mb-4">
  81. New: @json-render/remotion
  82. </h3>
  83. <p className="text-sm text-muted-foreground mb-4">
  84. Generate AI-powered videos with Remotion. Define video catalogs, stream
  85. timeline specs, and render with the Remotion Player.
  86. </p>
  87. <Code lang="tsx">{`import { Player } from "@remotion/player";
  88. import { Renderer, schema, standardComponentDefinitions } from "@json-render/remotion";
  89. const catalog = defineCatalog(schema, {
  90. components: standardComponentDefinitions,
  91. transitions: standardTransitionDefinitions,
  92. });
  93. <Player
  94. component={Renderer}
  95. inputProps={{ spec }}
  96. durationInFrames={spec.composition.durationInFrames}
  97. fps={spec.composition.fps}
  98. compositionWidth={spec.composition.width}
  99. compositionHeight={spec.composition.height}
  100. />`}</Code>
  101. <p className="text-sm text-muted-foreground mt-4 mb-4">
  102. Includes 10 standard video components (TitleCard, TypingText,
  103. SplitScreen, etc.), 7 transition types, and the ClipWrapper utility for
  104. custom components.
  105. </p>
  106. <h3 className="text-lg font-semibold mt-8 mb-4">
  107. Improved: Dashboard Example
  108. </h3>
  109. <p className="text-sm text-muted-foreground mb-4">
  110. The dashboard example is now a full-featured accounting dashboard with:
  111. </p>
  112. <ul className="list-disc list-inside text-sm text-muted-foreground space-y-1 mb-4">
  113. <li>Persistent SQLite database with Drizzle ORM</li>
  114. <li>RESTful API for customers, invoices, expenses, accounts</li>
  115. <li>Draggable widget reordering</li>
  116. <li>AI-powered widget generation with streaming</li>
  117. <li>Real data binding to database records</li>
  118. </ul>
  119. <h3 className="text-lg font-semibold mt-8 mb-4">
  120. Improved: Documentation
  121. </h3>
  122. <ul className="list-disc list-inside text-sm text-muted-foreground space-y-1 mb-4">
  123. <li>Interactive playground for testing specs</li>
  124. <li>New guides: Custom Schema, Streaming, Code Export</li>
  125. <li>Full API reference for all packages</li>
  126. <li>Integration guides: A2UI, AG-UI, Adaptive Cards, OpenAPI</li>
  127. </ul>
  128. <h3 className="text-lg font-semibold mt-8 mb-4">Breaking Changes</h3>
  129. <ul className="list-disc list-inside text-sm text-muted-foreground space-y-1 mb-4">
  130. <li>
  131. <code>UITree</code> type renamed to <code>Spec</code>
  132. </li>
  133. <li>
  134. Schema is now imported from renderer packages (
  135. <code>@json-render/react</code>) not core
  136. </li>
  137. <li>
  138. <code>defineCatalog</code> now requires a schema as first argument
  139. </li>
  140. </ul>
  141. <hr className="my-12 border-border" />
  142. <h2 className="text-xl font-semibold mt-12 mb-4">v0.2.0</h2>
  143. <p className="text-sm text-muted-foreground mb-6">January 2026</p>
  144. <p className="text-sm text-muted-foreground mb-4">
  145. Initial public release.
  146. </p>
  147. <ul className="list-disc list-inside text-sm text-muted-foreground space-y-1 mb-4">
  148. <li>Core catalog and spec types</li>
  149. <li>React renderer with contexts for data, actions, visibility</li>
  150. <li>AI prompt generation from catalogs</li>
  151. <li>Basic streaming support</li>
  152. <li>Dashboard example application</li>
  153. </ul>
  154. </article>
  155. );
  156. }