Pipeline
- Docsusage, props, keywords
- Demosrc/demo.tsx
- Buildshadcn add → vite
- Capturelight, dark, motion
- IndexBM25 + vectors
Public log. Prompts, raw model errors and costs stay on the admin side.
Log
Demo source
src/demo.tsx · from an earlier run
import { useEffect, useRef } from "react"import { createDisplacement, supportsHtmlInCanvas } from "@/components/canvasui/DisplacementVanilla"import { Button } from "@/components/ui/button"export default function DisplacementDemo() { const sourceRef = useRef<HTMLCanvasElement>(null) const contentRef = useRef<HTMLDivElement>(null) const outputRef = useRef<HTMLCanvasElement>(null) useEffect(() => { if (!supportsHtmlInCanvas()) return const source = sourceRef.current const content = contentRef.current const output = outputRef.current if (!source || !content || !output) return const instance = createDisplacement({ source, content, output }) return () => instance?.destroy() }, []) return ( <div className="relative w-full max-w-md"> <canvas ref={sourceRef} className="block w-full"> <div ref={contentRef} className="flex flex-col gap-4 rounded-xl border bg-card p-6 text-card-foreground"> <p className="text-sm font-medium">Your project is ready. Deploy the latest build to production.</p> <div className="flex gap-2"> <Button>Deploy</Button> <Button variant="outline">Preview</Button> </div> </div> </canvas> <canvas ref={outputRef} className="pointer-events-none absolute inset-0 h-full w-full" /> </div> )}