mirror of
https://github.com/vercel-labs/json-render.git
synced 2026-10-02 12:00:58 +08:00
Compare commits
3
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
55cab0d8bf | ||
|
|
a123f56fe3 | ||
|
|
753c1d1109 |
@@ -29,6 +29,8 @@ build
|
||||
dist
|
||||
*.tsbuildinfo
|
||||
.svelte-kit/
|
||||
tsup.config.bundled_*.mjs
|
||||
next-env.d.ts
|
||||
|
||||
|
||||
# Debug
|
||||
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
@@ -2,6 +2,11 @@ import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
serverExternalPackages: ["@resvg/resvg-js", "satori"],
|
||||
outputFileTracingIncludes: {
|
||||
"/api/image": [
|
||||
"./node_modules/geist/dist/fonts/geist-sans/Geist-Regular.ttf",
|
||||
],
|
||||
},
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
Vendored
-6
@@ -1,6 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/dev/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
-6
@@ -1,6 +0,0 @@
|
||||
/// <reference types="next" />
|
||||
/// <reference types="next/image-types/global" />
|
||||
import "./.next/types/routes.d.ts";
|
||||
|
||||
// NOTE: This file should not be edited
|
||||
// see https://nextjs.org/docs/app/api-reference/config/typescript for more information.
|
||||
+1
-1
@@ -13,7 +13,7 @@
|
||||
"scripts": {
|
||||
"build": "turbo run build",
|
||||
"predev": "command -v portless >/dev/null 2>&1 || (echo '\\nportless is required but not installed. Run: npm i -g portless\\nSee: https://github.com/vercel-labs/portless\\n' && exit 1)",
|
||||
"dev": "turbo run dev --concurrency 20",
|
||||
"dev": "turbo run dev --concurrency 50",
|
||||
"lint": "turbo run lint",
|
||||
"format": "prettier --write \"**/*.{ts,tsx}\"",
|
||||
"type-check": "turbo run check-types",
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
"dist"
|
||||
],
|
||||
"scripts": {
|
||||
"build": "tsup",
|
||||
"build": "rm -rf dist && tsup",
|
||||
"dev": "tsup --watch",
|
||||
"check-types": "tsc --noEmit",
|
||||
"typecheck": "tsc --noEmit"
|
||||
|
||||
@@ -20,7 +20,6 @@ export default defineConfig([
|
||||
dts: true,
|
||||
sourcemap: true,
|
||||
splitting: true,
|
||||
clean: true,
|
||||
banner: { js: '"use client";' },
|
||||
external: sharedExternal,
|
||||
},
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { defineSchema, type PromptContext } from "@json-render/core";
|
||||
import type { z } from "zod";
|
||||
|
||||
/**
|
||||
* Prompt template for Remotion timeline generation
|
||||
@@ -6,7 +7,7 @@ import { defineSchema, type PromptContext } from "@json-render/core";
|
||||
* Uses JSONL patch format (same as React) but builds up a timeline spec structure.
|
||||
*/
|
||||
function remotionPromptTemplate(context: PromptContext): string {
|
||||
const { catalog, options } = context;
|
||||
const { catalog, options, formatZodType } = context;
|
||||
const { system = "You are a video timeline generator.", customRules = [] } =
|
||||
options;
|
||||
|
||||
@@ -37,7 +38,7 @@ function remotionPromptTemplate(context: PromptContext): string {
|
||||
const catalogData = catalog as {
|
||||
components?: Record<
|
||||
string,
|
||||
{ description?: string; defaultDuration?: number }
|
||||
{ description?: string; defaultDuration?: number; props?: z.ZodType }
|
||||
>;
|
||||
transitions?: Record<string, { description?: string }>;
|
||||
effects?: Record<string, { description?: string }>;
|
||||
@@ -52,8 +53,9 @@ function remotionPromptTemplate(context: PromptContext): string {
|
||||
const duration = def.defaultDuration
|
||||
? ` [default: ${def.defaultDuration} frames]`
|
||||
: "";
|
||||
const propsStr = def.props ? ` ${formatZodType(def.props)}` : "";
|
||||
lines.push(
|
||||
`- ${name}: ${def.description || "No description"}${duration}`,
|
||||
`- ${name}:${propsStr} ${def.description || "No description"}${duration}`,
|
||||
);
|
||||
}
|
||||
lines.push("");
|
||||
|
||||
+8
-1
@@ -6,7 +6,13 @@
|
||||
"build": {
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["$TURBO_DEFAULT$", ".env*"],
|
||||
"outputs": [".next/**", "!.next/cache/**", "dist/**"]
|
||||
"outputs": [".next/**", "!.next/cache/**", "dist/**", ".svelte-kit/**"]
|
||||
},
|
||||
"svelte-chat#build": {
|
||||
"dependsOn": ["^build"],
|
||||
"inputs": ["$TURBO_DEFAULT$", ".env*"],
|
||||
"outputs": [".svelte-kit/**"],
|
||||
"cache": false
|
||||
},
|
||||
"lint": {
|
||||
"dependsOn": ["^lint"]
|
||||
@@ -15,6 +21,7 @@
|
||||
"dependsOn": ["^build"]
|
||||
},
|
||||
"dev": {
|
||||
"dependsOn": ["^build"],
|
||||
"cache": false,
|
||||
"persistent": true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user