-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.ts
More file actions
17 lines (14 loc) · 943 Bytes
/
Copy pathschema.ts
File metadata and controls
17 lines (14 loc) · 943 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { z } from "zod"
export const codeBlockSchema = z.object({
code: z.string().describe("Code content to display"),
language: z.string().default("typescript").describe("Programming language for syntax highlighting"),
filename: z.string().optional().describe("Optional filename to display"),
showLineNumbers: z.boolean().default(true).describe("Whether to show line numbers"),
highlightLines: z.array(z.number()).optional().describe("Line numbers to highlight (1-based)"),
startLineNumber: z.number().default(1).describe("Starting line number"),
copyable: z.boolean().default(true).describe("Whether to show copy button"),
collapsible: z.boolean().default(false).describe("Whether code block can be collapsed"),
maxHeight: z.string().optional().describe("Maximum height (e.g., '400px')"),
className: z.string().optional().describe("Additional CSS classes"),
})
export type CodeBlock = z.infer<typeof codeBlockSchema>