page.tsx 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  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.4.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">New: Component Slots</h3>
  37. <p className="text-sm text-muted-foreground mb-4">
  38. Components can now define which slots they accept. Use{" "}
  39. <code>[&quot;default&quot;]</code> for regular children, or named slots
  40. like <code>[&quot;header&quot;, &quot;footer&quot;]</code> for more
  41. complex layouts.
  42. </p>
  43. <Code lang="typescript">{`const catalog = defineCatalog(schema, {
  44. components: {
  45. Card: {
  46. props: z.object({ title: z.string() }),
  47. slots: ["default"], // accepts children
  48. description: "A card container",
  49. },
  50. Layout: {
  51. props: z.object({}),
  52. slots: ["header", "content", "footer"], // named slots
  53. description: "Page layout with header, content, footer",
  54. },
  55. },
  56. });`}</Code>
  57. <h3 className="text-lg font-semibold mt-8 mb-4">
  58. New: AI Prompt Generation
  59. </h3>
  60. <p className="text-sm text-muted-foreground mb-4">
  61. Catalogs now generate AI system prompts automatically with{" "}
  62. <code>catalog.prompt()</code>. The prompt includes all component
  63. definitions, props schemas, and action descriptions - ensuring the AI
  64. only generates valid specs.
  65. </p>
  66. <Code lang="typescript">{`import { defineCatalog } from "@json-render/core";
  67. import { schema } from "@json-render/react/schema";
  68. const catalog = defineCatalog(schema, {
  69. components: { /* ... */ },
  70. actions: { /* ... */ },
  71. });
  72. // Generate system prompt for AI
  73. const systemPrompt = catalog.prompt();
  74. // Use with any AI SDK
  75. const result = await streamText({
  76. model: "claude-haiku-4.5",
  77. system: systemPrompt,
  78. prompt: userMessage,
  79. });`}</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">New: SpecStream</h3>
  107. <p className="text-sm text-muted-foreground mb-4">
  108. SpecStream is json-render&apos;s streaming format for progressively
  109. building specs from JSONL patches. The new compiler API makes it easy to
  110. process streaming AI responses.
  111. </p>
  112. <Code lang="typescript">{`import { createSpecStreamCompiler } from "@json-render/core";
  113. const compiler = createSpecStreamCompiler<MySpec>();
  114. // Process streaming chunks
  115. const { result, newPatches } = compiler.push(chunk);
  116. setSpec(result); // Update UI with partial result`}</Code>
  117. <h3 className="text-lg font-semibold mt-8 mb-4">
  118. Improved: Dashboard Example
  119. </h3>
  120. <p className="text-sm text-muted-foreground mb-4">
  121. The dashboard example is now a full-featured accounting dashboard with:
  122. </p>
  123. <ul className="list-disc list-inside text-sm text-muted-foreground space-y-1 mb-4">
  124. <li>Persistent SQLite database with Drizzle ORM</li>
  125. <li>RESTful API for customers, invoices, expenses, accounts</li>
  126. <li>Draggable widget reordering</li>
  127. <li>AI-powered widget generation with streaming</li>
  128. <li>Real data binding to database records</li>
  129. </ul>
  130. <h3 className="text-lg font-semibold mt-8 mb-4">
  131. Improved: Documentation
  132. </h3>
  133. <ul className="list-disc list-inside text-sm text-muted-foreground space-y-1 mb-4">
  134. <li>Interactive playground for testing specs</li>
  135. <li>New guides: Custom Schema, Streaming, Code Export</li>
  136. <li>Full API reference for all packages</li>
  137. <li>Integration guides: A2UI, AG-UI, Adaptive Cards, OpenAPI</li>
  138. </ul>
  139. <h3 className="text-lg font-semibold mt-8 mb-4">Breaking Changes</h3>
  140. <ul className="list-disc list-inside text-sm text-muted-foreground space-y-1 mb-4">
  141. <li>
  142. <code>UITree</code> type renamed to <code>Spec</code>
  143. </li>
  144. <li>
  145. Schema is now imported from renderer packages (
  146. <code>@json-render/react</code>) not core
  147. </li>
  148. <li>
  149. <code>defineCatalog</code> now requires a schema as first argument
  150. </li>
  151. </ul>
  152. <hr className="my-12 border-border" />
  153. <h2 className="text-xl font-semibold mt-12 mb-4">v0.3.0</h2>
  154. <p className="text-sm text-muted-foreground mb-6">January 2026</p>
  155. <p className="text-sm text-muted-foreground mb-4">
  156. Internal release with codegen foundations.
  157. </p>
  158. <ul className="list-disc list-inside text-sm text-muted-foreground space-y-1 mb-4">
  159. <li>
  160. Added <code>@json-render/codegen</code> package (spec traversal and
  161. JSX serialization)
  162. </li>
  163. <li>Configurable AI model via environment variables</li>
  164. <li>Documentation improvements and bug fixes</li>
  165. </ul>
  166. <p className="text-sm text-muted-foreground italic">
  167. Note: Only @json-render/core was published to npm for this release.
  168. </p>
  169. <hr className="my-12 border-border" />
  170. <h2 className="text-xl font-semibold mt-12 mb-4">v0.2.0</h2>
  171. <p className="text-sm text-muted-foreground mb-6">January 2026</p>
  172. <p className="text-sm text-muted-foreground mb-4">
  173. Initial public release.
  174. </p>
  175. <ul className="list-disc list-inside text-sm text-muted-foreground space-y-1 mb-4">
  176. <li>Core catalog and spec types</li>
  177. <li>React renderer with contexts for data, actions, visibility</li>
  178. <li>AI prompt generation from catalogs</li>
  179. <li>Basic streaming support</li>
  180. <li>Dashboard example application</li>
  181. </ul>
  182. </article>
  183. );
  184. }