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"export default function FuzzyTextDemo() { const ref = useRef<HTMLCanvasElement>(null) useEffect(() => { const canvas = ref.current const ctx = canvas?.getContext("2d") if (!canvas || !ctx) return const text = "404" const size = 96 const fuzz = 24 ctx.font = `900 ${size}px sans-serif` const textWidth = Math.ceil(ctx.measureText(text).width) const width = textWidth + fuzz * 2 const height = size + 16 canvas.width = width canvas.height = height ctx.font = `900 ${size}px sans-serif` ctx.fillStyle = "#111827" ctx.textBaseline = "top" ctx.fillText(text, fuzz, 0) const src = ctx.getImageData(0, 0, width, height) const dst = ctx.createImageData(width, height) let seed = 7 const rand = () => { seed = (seed * 16807) % 2147483647 return seed / 2147483647 } for (let y = 0; y < height; y++) { const dx = Math.floor((rand() - 0.5) * fuzz * 0.6) for (let x = 0; x < width; x++) { const sx = x - dx const di = (y * width + x) * 4 if (sx >= 0 && sx < width) { const si = (y * width + sx) * 4 dst.data[di] = src.data[si] dst.data[di + 1] = src.data[si + 1] dst.data[di + 2] = src.data[si + 2] dst.data[di + 3] = src.data[si + 3] } } } ctx.putImageData(dst, 0, 0) }, []) return ( <div className="flex w-full max-w-md items-center justify-center"> <canvas ref={ref} className="max-w-full" /> </div> )}