"use client" /** * LeoGenerationSurface — wrap ANY component Leo can create (card, chart, form, * panel) to give it the shared inited → thinking → completed treatment. * * }> * * * * - `state` null/undefined → children render untouched. * - `inited` → status bar with Leo's mark playing its invited gesture; * children are not shown. * - `thinking` → shimmering status bar over `skeleton` (or generic bars); * `aria-busy` is set. * - `completed` → a lone check bar; clear `state` (set null) to reveal the children. * * Single brand colour only. Table rows use the same contract via * `DataTable leoLoading` / `LeoLoadingRow`. */ import * as React from "react" import { cn } from "../../lib/utils" import { LEO_GENERATION_ICON_STATE, LEO_GENERATION_LABEL, type LeoGenerationState, } from "../../lib/leo-generation" import { LeoIcon } from "./leo-icon" import { LeoBrandBackdrop } from "./leo-brand-backdrop" import { Button } from "./button" import { Tip } from "./tip" /** * Stop action for an in-flight generation. Render only while `inited` or * `thinking` — a completed generation has nothing left to stop. */ export function LeoStopButton({ onStop, label = "Stop", className, }: { onStop: () => void /** Accessible name and tooltip. */ label?: string className?: string }) { return (