Files
cobble/src/components/general/bot-stone-face.tsx
T
tbenandClaude Opus 5.5 3286b80029 Build Cobble project structure from the handoff
- Remove the preset document suite (letters, emails, invoices, quotes,
  PDF generation, line items) with its routes, API handlers and tables
- Rebrand to Cobble: site data, Lato, handoff design tokens (light and
  dark) in main.css, brand assets in public/brand, ember stone logo and
  regenerated favicons
- Add bots, bot_messages, bot_tasks and bot_task_steps tables, regenerate
  DB types (BUN_SQLITE_COBBLE_*) and add a sample crew seed (seed:bots)
- Add the chat shell at /admin/bots: rail with pinned coordinator and
  user popover, bottom-anchored conversation with composer, working-on
  panel, and a send-message API scoped to the session user
- Add BotStone and Wordmark components, crew status and relative time
  utils with tests, and update AGENTS.md

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-18 17:10:36 +01:00

61 lines
1.8 KiB
TypeScript

import type { BotFace } from "@/src/dict/bot-dict";
import { StoneEyes } from "@/src/data/stone-geometry";
import StoneEyeDot from "./stone-eye-dot";
import StoneEyeLidded from "./stone-eye-lidded";
import StoneEyeArc from "./stone-eye-arc";
import StoneEyeFlat from "./stone-eye-flat";
type Props = {
face: BotFace;
/**
* Fill class for solid eyes.
*/
fill_class: string;
/**
* Stroke class for arc eyes.
*/
stroke_class: string;
};
/**
* The face is the status. Geometry follows the handoff face states:
* idle dots, working half-lidded, done upward arcs, asleep one flattened
* dot, needs-you dot plus arc.
*/
export default function BotStoneFace({ face, fill_class, stroke_class }: Props) {
const { left, right, centre } = StoneEyes;
switch (face) {
case "working":
return (
<>
<StoneEyeLidded {...left} className={fill_class} />
<StoneEyeLidded {...right} className={fill_class} />
</>
);
case "done":
return (
<>
<StoneEyeArc {...left} className={stroke_class} />
<StoneEyeArc {...right} className={stroke_class} />
</>
);
case "asleep":
return <StoneEyeFlat {...centre} className={fill_class} />;
case "needs-you":
return (
<>
<StoneEyeDot {...left} className={fill_class} />
<StoneEyeArc {...right} className={stroke_class} />
</>
);
default:
return (
<>
<StoneEyeDot {...left} className={fill_class} />
<StoneEyeDot {...right} className={fill_class} />
</>
);
}
}