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 { createPeel, supportsHtmlInCanvas } from '@/components/canvasui/PeelVanilla';import { Button } from '@/components/ui/button';import { Card, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card';export default function PeelDemo() { const sourceRef = useRef<HTMLCanvasElement>(null); const contentRef = useRef<HTMLDivElement>(null); const outputRef = useRef<HTMLCanvasElement>(null); const underRef = useRef<HTMLDivElement>(null); useEffect(() => { const source = sourceRef.current; const content = contentRef.current; const output = outputRef.current; if (!source || !content || !output || !supportsHtmlInCanvas()) return; const peel = createPeel( { source, content, output, under: underRef.current ?? undefined }, { side: 'left', mode: 'cursor' }, ); return () => peel?.destroy(); }, []); return ( <div className='relative w-full max-w-md'> <div ref={underRef} className='absolute inset-0 flex flex-col items-center justify-center gap-1 rounded-xl border bg-muted p-6 text-center' > <p className='text-sm font-medium'>Your workspace is ready.</p> <p className='text-sm text-muted-foreground'>Open it whenever you like.</p> </div> <canvas ref={outputRef} className='absolute inset-0 h-full w-full' /> <canvas ref={sourceRef} className='block h-72 w-full'> <div ref={contentRef} className='h-full w-full'> <Card className='h-full w-full'> <CardHeader> <CardTitle>Welcome aboard</CardTitle> <CardDescription>Finish setting up your workspace in under two minutes.</CardDescription> </CardHeader> <CardFooter className='mt-auto'> <Button className='w-full'>Get started</Button> </CardFooter> </Card> </div> </canvas> </div> );}