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 { useState } from "react"import { InfiniteMasonry } from "@/components/motion/infinite-masonry"import { photoImage } from "@/preview/images"type Item = { id: string; title: string; imageHeight: number }const TITLES = [ "Trail running shoes", "Ceramic pour-over set", "Linen weekend bag", "Oak desk lamp", "Wool knit beanie", "Cast iron skillet", "Canvas field notebook", "Ceramic planter",]const HEIGHTS = [220, 160, 260, 300, 180]function makeItems(offset: number, count: number): Item[] { return Array.from({ length: count }, (_, i) => { const n = offset + i return { id: `item-${n}`, title: TITLES[n % TITLES.length], imageHeight: HEIGHTS[n % HEIGHTS.length], } })}export default function InfiniteMasonryDemo() { const [items, setItems] = useState<Item[]>(() => makeItems(0, 24)) const hasMore = items.length < 60 const loadMore = () => { setItems((prev) => [...prev, ...makeItems(prev.length, 12)]) } return ( <InfiniteMasonry className="h-[560px]" items={items} getItemKey={(item) => item.id} estimateSize={(item) => item.imageHeight + 64} renderItem={(item) => ( <article className="overflow-hidden rounded-2xl border border-border bg-card"> <img src={photoImage(item.title, 480, item.imageHeight)} alt={item.title} className="w-full object-cover" style={{ height: item.imageHeight }} /> <div className="p-3 text-sm font-medium text-foreground">{item.title}</div> </article> )} onLoadMore={loadMore} hasMore={hasMore} loading={false} /> )}