mirror of
https://github.com/hanzoai/shadcn.git
synced 2026-11-02 10:35:35 +00:00
Upstream sync from shadcn-ui/ui (1686 commits since last merge base). Key changes: - packages/shadcn upgraded to 4.1.0 (CLI font transformers, scaffold from github, chart colors) - apps/v4 replaces apps/www as the primary docs/registry app - Font system: 25+ heading font registries, font markers utility, @supports override - Chart improvements: recharts v3 compat, radial chart fixes - templates/ updated with monorepo variants (astro, vite, react-router, start) - skills/shadcn AI skill definitions added - deprecated/ removed (auth, auth-firebase, cli, www) Preserved Hanzo-only paths: app/, pkg/, demo/, docs/, template/next/
31 lines
855 B
TypeScript
31 lines
855 B
TypeScript
import { type NextRequest } from "next/server"
|
|
import { track } from "@vercel/analytics/server"
|
|
|
|
import { parseDesignSystemConfig } from "@/app/(create)/init/parse-config"
|
|
|
|
import { buildInstructions } from "./build-instructions"
|
|
|
|
export async function GET(request: NextRequest) {
|
|
try {
|
|
const searchParams = request.nextUrl.searchParams
|
|
const result = parseDesignSystemConfig(searchParams)
|
|
|
|
if (!result.success) {
|
|
return new Response(result.error, { status: 400 })
|
|
}
|
|
|
|
track("create_app_manual", result.data)
|
|
|
|
const markdown = buildInstructions(result.data)
|
|
|
|
return new Response(markdown, {
|
|
headers: { "Content-Type": "text/markdown; charset=utf-8" },
|
|
})
|
|
} catch (error) {
|
|
return new Response(
|
|
error instanceof Error ? error.message : "An unknown error occurred",
|
|
{ status: 500 }
|
|
)
|
|
}
|
|
}
|