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 { useRef, useState } from "react";import { Table, type TableColumn } from "@/components/motion/table/index";type Row = { id: string; name: string; qty: string };const initialRows: Row[] = [ { id: "1", name: "Wireless mouse", qty: "24" }, { id: "2", name: "Mechanical keyboard", qty: "12" }, { id: "3", name: "USB-C hub", qty: "40" }, { id: "4", name: "Monitor stand", qty: "8" },];const columns: TableColumn<Row>[] = [ { key: "name", header: "Item", editable: true }, { key: "qty", header: "Qty", editable: true, align: "right" },];export default function TableEditableDemo() { const [rows, setRows] = useState<Row[]>(initialRows); const nextId = useRef(initialRows.length + 1); return ( <Table data={rows} columns={columns} getRowId={(row) => row.id} height={260} className="w-full max-w-lg" onCellEdit={(id, key, value) => setRows((prev) => prev.map((r) => (r.id === id ? ({ ...r, [key]: value } as Row) : r)), ) } onInsertRow={(index, position) => { const id = String(nextId.current++); setRows((prev) => { const at = position === "before" ? index : index + 1; const copy = [...prev]; copy.splice(at, 0, { id, name: "", qty: "" }); return copy; }); }} onDeleteRow={(id) => setRows((prev) => prev.filter((r) => r.id !== id))} /> );}