import { type VariantProps } from 'class-variance-authority'; import * as React from 'react'; /** * One tool invocation: a pill naming the product that owns the tool, and the tool's function name in * monospace. * * Ported from Figma `Tool Call` (883:9493) in the Multi product demo file (`85sD2HI8wksP9Y7uDmJ9DK`), * which GTM-870 names as the design authority for this work. It is the body of `Under the hood` * (836:7151), which stacks three of these inside an `InfoSection` at `density="loose"`. * * `Device` is Figma's only variant axis, and it is a layout axis rather than a style one: * `Device=Desktop` is 26px tall — exactly the pill's own height, so the two children share a line — * and `Device=Tablet` is 54px, which is 26 + 8 + 20: the same two children, the same 8px gap, * stacked. Nothing else differs between the two variants, so `device` switches `flex-direction` and * touches no colour and no spacing. */ declare const toolCallStyles: (props?: ({ device?: "desktop" | "tablet" | null | undefined; } & import("class-variance-authority/types").ClassProp) | undefined) => string; /** * The product pill: 26px tall, 50px radius, 8px horizontal and 4px vertical padding, 12/18 Semibold. * * The 12/18 pair is `--text-size-figma-12` and `--leading-height-figma-12` rather than `body-xs`, * whose leading is 16px. That is not a preference: 18 + 2x4 is exactly the 26px height Figma reports, * and 16 + 2x4 is 24. `Badge`'s `small` size uses the same pair for the same reason. * * **`Badge` was considered for this and rejected.** Its `small` size is close — the same 8px * horizontal padding, the same fully-round shape, the same 12/18 label — but it takes `label: string` * where Figma's pill holds arbitrary content, its vertical padding is the 2px step so it renders 22px * rather than 26px, and its `variant` axis is a *status* scale (error, warning, success). A product * name is not a status, and picking one of those variants to get a colour would have announced a * state that is not happening. * * **THE FILL IS FIGMA'S NOW, and rule 3 is what changed.** Figma paints the pill `#ef223a33` — * `accesible-red-dark-theme` at 20% — with a `color/brand/white` label, and this was refused on the * grounds that "a translucent fill's composite depends on its backdrop, and the backdrop is the one * thing that differs between the themes … composited on the light surface it is `#fcd3d8`, and the * white label measures 1.36:1 on it." There is no light surface. On the page Figma draws, the tint * composites to `#301129` and the white label is **16.96:1**. * * `--color-surface-badge-error` carries exactly that tint — minted for `.badge`, which paints the * same 20% red, and shared here because the two atoms use one literal for one job. The old note * "there is no opaque red surface token to substitute" was true and is now beside the point: Figma's * fill is translucent, so a translucent token is the right shape. * * It was `--color-surface-neutral-semi-medium` (#232e47), a GREY, carrying the same white label at * 13.52:1 — more legible than Figma's and not the colour Figma draws. The `--color-text-error` * alternative the old note weighed was never the question: Figma keeps the red as the FILL and the * label white, which is what ships. * * The pill's edge measures 1.09:1 light / 1.32:1 dark against the page. WCAG 1.4.11 asks 3:1 of the * boundary of a *control*; this pill is not interactive and its edge carries no information the * label does not, so the boundary is decoration and no border is drawn. */ declare const toolCallProductStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string; /** * The function name's ink. * * Figma binds `colors/code/3` #7688c2, which is **5.60:1 on the page** — a clean revert at 1.4.3's * 4.5:1 for this 16px name. * * **Decision 1 of the 0.1.2 plan rejected it, and rule 3 voids the reason.** That decision read: the * token "is theme-invariant and measures 5.16:1 against the dark surface but 3.46:1 against the light * one, below WCAG 1.4.3's 4.5:1." The light measurement is the whole argument and there is no light * theme. `--color-code-3` already carries #7688c2 exactly, so this needed no new token. * * It was `--color-text-accent-strong` (#bed6ff) at 13.14:1 — brighter than Figma draws, and a blue * from a different ramp. */ declare const toolCallNameStyles: (props?: import("class-variance-authority/types").ClassProp | undefined) => string; export { toolCallStyles, toolCallProductStyles, toolCallNameStyles }; /** Figma's `Device` axis: one line, or stacked. */ export type ToolCallDevice = NonNullable['device']>; export interface ToolCallProps extends Omit, 'title'> { /** * The pill's content — the product that owns the tool. `ReactNode` rather than `string` so a * caller can put a glyph beside the name; the pill's own 8px gap is there for exactly that. */ product: React.ReactNode; /** * The tool's function name, rendered in a ``. A `string` and not a `ReactNode`: it is an * identifier, and marking up part of an identifier is not a thing that means anything. */ name: string; /** * One line, or stacked. * @default 'desktop' */ device?: ToolCallDevice; } /** * @example * @example */ export declare const ToolCall: React.ForwardRefExoticComponent>; //# sourceMappingURL=tool-call.d.ts.map