Every named declaration in the file, 833 of them, verbatim and in the order Claude Code wrote them, 50 to a page. This is the page to land on from a signature: a verb that returns ToolCallResult links here, at whichever page it is on, and what you get is the declaration itself rather than a description of it.
The source is 22,468 lines of TypeScript mined from build 2.1.330. Anything longer than 12 lines is folded; click the line count to open it. To find a name on another page, search every symbol.
Names on this page, 501 to 550 of 833
StreamingEventName type
#
line 16355
Added in 2.1.269 · changed in 2.1.280
The events that stream: their hooks are async generators, next(e) is the stream of everything beneath, and the result is what it returns.
Two events stream: turn.step, the model's response arriving in pieces, where a hook that saw it whole could not change what had already been shown; and process.spawn, a call on $ whose child's output arrives in pieces for as long as the child runs.
export type StreamingEventName = 'turn.step' | 'process.spawn';
StreamNext type
#
line 16369
Added in 2.1.269 · changed in 2.1.275, 2.1.280
The rest of the chain as a hook on a streaming event receives it: Next, except that next(e) is the stream beneath (HookStream), not a promise.
Each call opens a fresh stream (for turn.step a model request, for process.spawn a child), so a hook that calls it twice makes two. Not calling it yields the hook's own chunks and result; nothing beneath runs.
17 lines
export type StreamNext<N extends StreamingEventName = StreamingEventName, E = Args<N>, O = EventResult<N>, S extends {
[K in N]?: unknown;
} = {
[K in N]: Args<K>;
}> = Pick<Next<N, E, O, S>, 'signal' | 'is' | 'event' | 'origin' | 'budget'> & {
(e: E): HookStream<Chunk<N>, O>;
/**
* Continues this dispatch at a tier, as Next's `to`: the stream beneath
* with the links between this hook's tier and that one skipped.
*/
readonly to: (e: E, tier: TargetTier) => HookStream<Chunk<N>, O>;
/**
* What settled beneath on the latest `next()` stream, as Next's; a
* streaming link's entry counts the chunks it yielded up (`chunks`).
*/
readonly trace: readonly TraceEntry<N, E, O>[];
};
StyledElement type
#
line 16396
Added in 2.1.271 · changed in 2.1.299
The shape a Box and a Text share in a render tree: allowlisted props, an optional hover, the group stamp a hover.scope earns, the mark of the plugin whose drawing starts there, and children.
Tag is which of the two; Hover is that element's hover props. Every surface draws both: Ink's Box and Text on the terminal, a flex div and a styled span on the desktop.
32 lines
type StyledElement<Tag extends 'Box' | 'Text', Hover> = {
type: Tag;
/**
* A Box's layout, position, spacing and border props and the `key` that
* makes it a hover scope; a Text's colors and styles. Others are refused.
*/
props?: Record<string, string | number | boolean>;
/**
* Style overrides the surface applies while the pointer is over the
* nearest keyed Box, or over any member of the group `scope` names.
*
* Plain data, no hook. Nothing that moves a sibling: `borderStyle`
* restyles a border the Box has, `display` only reveals a Box drawn
* `"none"` (under a keyed Box or in a scope), an offset moves a placed Box.
*/
hover?: Hover;
/**
* Whose group `hover.scope` names; absent without a `scope`.
*/
group?: PluginStamp;
/**
* Whose part of the drawing starts here, set by the engine on each hook's
* returned root. A hook's own mark is kept; another plugin's at most as
* often as `next(e)` handed it, and it may move. It proves no author.
*/
part?: PluginStamp;
/**
* In order: a Box holds elements and strings (core wraps each string in
* a Text); a Text holds strings and inline elements, never an engine node.
*/
children?: RenderNode[];
};
SubagentStartHookInput type
#
line 16429
Added in 2.1.265
type SubagentStartHookInput = BaseHookInput & {
hook_event_name: 'SubagentStart';
agent_id: string;
agent_type: string;
};
SubagentStopHookInput type
#
line 16435
Added in 2.1.265
19 lines
type SubagentStopHookInput = BaseHookInput & {
hook_event_name: 'SubagentStop';
stop_hook_active: boolean;
agent_id: string;
agent_transcript_path: string;
agent_type: string;
/**
* Text content of the last assistant message before stopping. Avoids the need to read and parse the transcript file.
*/
last_assistant_message?: string;
/**
* In-flight background work (running/pending + backgrounded) registered in this session. Lets hooks distinguish "session is done" from "session is paused waiting for background work to wake it". Empty array when nothing is in flight.
*/
background_tasks?: BackgroundTaskSummary[];
/**
* Session-scoped cron tasks (CronCreate, ScheduleWakeup, /loop) that will wake this session later. Empty array when none are scheduled.
*/
session_crons?: SessionCronSummary[];
};
SvgProps type
#
line 16464
In the first published surface (2.1.259) · changed in 2.1.268
The props of Svg, the remote surfaces' vector leaf: the markup is the element's data, as a string is a Text's, drawn isolated.
A leaf: no children. The surface never lets the markup reach the page (the engine bounds it; the desktop draws it as an image, or in a sandboxed frame when isInteractive; the editor as an image; the mobile app in a web view).
31 lines
export type SvgProps = {
/**
* The SVG document, `<svg ...>...</svg>`, at most 131072 characters.
*/
source: string;
/**
* What the drawing says, for a reader that cannot see it; required, since
* a surface without the element draws nothing else of it.
*/
alt: string;
/**
* CSS pixels; absent, the box takes the markup's own width up to the slot.
*/
width?: number;
/**
* CSS pixels; absent, the markup's own height at the drawn width.
*/
height?: number;
/**
* `true` draws the SVG in a script-less sandboxed frame so hover, CSS
* `:hover`, SMIL animation and `<title>` tooltips work; absent, an image.
* The editor ignores it and always draws an image, where SMIL and CSS
* animation can run but hover, CSS `:hover` and `<title>` tooltips never
* work.
*
* It never enables script or event-handler attributes (the frame has no
* allow-scripts and the scrub strips them); presses that other plugins
* should observe go on an enclosing element.
*/
isInteractive?: boolean;
};
TagKeys type
#
line 16503
In the first published surface (2.1.259) · changed in 2.1.287
The keys among Among a matcher may select variants of I by: valued by literals in every variant, one literal per variant (IsDiscriminant).
Asked of each key given and of no other: of a matcher's own keys, never of every key of every variant.
type TagKeys<I, Among> = Among extends MatcherKeys<I> ? IsLiteralValued<MatcherValueOf<I, Among>> extends true ? IsDiscriminant<I, Among> extends true ? Among : never : never : never;
TargetTier type
#
line 16510
Added in 2.1.267 · changed in 2.1.311
A tier next.to(e, tier) may name: one a floor can reach past links of less authority to, so never prepend, which nothing skips to; user is for a prepend hook alone, and skips the peers below it.
export type TargetTier = Exclude<Tier, 'prepend'>;
TaskCompletedHookInput type
#
line 16512
Added in 2.1.265
type TaskCompletedHookInput = BaseHookInput & {
hook_event_name: 'TaskCompleted';
task_id: string;
task_subject: string;
task_description?: string;
teammate_name?: string;
/**
* @deprecated Sessions have a single implicit team; this carries the session-derived team name and will be removed in a future release.
*/
team_name?: string;
};
TaskCreatedHookInput type
#
line 16524
Added in 2.1.265
type TaskCreatedHookInput = BaseHookInput & {
hook_event_name: 'TaskCreated';
task_id: string;
task_subject: string;
task_description?: string;
teammate_name?: string;
/**
* @deprecated Sessions have a single implicit team; this carries the session-derived team name and will be removed in a future release.
*/
team_name?: string;
};
TeammateIdleHookInput type
#
line 16536
Added in 2.1.265
type TeammateIdleHookInput = BaseHookInput & {
hook_event_name: 'TeammateIdle';
teammate_name: string;
/**
* @deprecated Sessions have a single implicit team; this carries the session-derived team name and will be removed in a future release.
*/
team_name: string;
};
TelemetryAttribute type
#
line 16548
Added in 2.1.284
One attribute of a collector record, as the collector receives it.
export type TelemetryAttribute = string | number | boolean | readonly string[];
TelemetryChoice type
#
line 16560
Added in 2.1.284
A string property of a first-party row: the value and the list it is chosen from, so no free text reaches a row.
Every member of of is a lowercase token of letters, digits, _ and -, at most 32 of them; value is one of them.
const page = { value: "ready", of: ["ready", "later"] }
export type TelemetryChoice = {
/**
* What the row carries, one member of `of`.
*/
value: string;
/**
* Every value the property may take.
*/
of: readonly string[];
};
TelemetryDestination type
#
line 16582
Added in 2.1.284
Where a telemetry record goes: anthropic, Anthropic's first-party analytics, or collector, the one the session's operator configured.
A closed union and the record's identity: e.to reads the same at every hook as it was raised, so a hook may rewrite what a record carries, never redirect or copy it. A hook picks its stream with the matcher.
on("telemetry.log", { to: "collector" }, ($, e, next) => next(e))
export type TelemetryDestination = 'anthropic' | 'collector';
TelemetryLogArgs type
#
line 16588
Added in 2.1.284
What a call of $.telemetry.log passes: a first-party row, to optional, or a collector record.
export type TelemetryLogArgs = TelemetryRowArgs | TelemetryRecordEntry;
TelemetryLogInput type
#
line 16594
Added in 2.1.284
The input of telemetry.log: one record about to be logged to the destination to names, which is always present and pinned.
export type TelemetryLogInput = TelemetryRowEntry | TelemetryRecordEntry;
TelemetryLogResult type
#
line 16600
Added in 2.1.284
What a telemetry.log hook returns and next(e) resolves to: { value: undefined }, or { deny }, which rejects the caller's promise.
export type TelemetryLogResult = ValueOrDeny<undefined>;
TelemetryMarkInput type
#
line 16608
Added in 2.1.284
The input of telemetry.mark: one use of a feature, as the CLI's own feature events mark one.
A mark takes no to: it always means anthropic.
18 lines
export type TelemetryMarkInput = {
/**
* Which feature was used, by its snake_case name.
*/
feature: string;
/**
* How the use went (TelemetryMarkKind).
*/
kind: TelemetryMarkKind;
/**
* Why it went so, as a short token.
*/
reason?: string;
/**
* The mark's properties, by name.
*/
props?: Readonly<Record<string, TelemetryProp>>;
};
TelemetryMarkKind type
#
line 16633
Added in 2.1.284
How one use of a feature went, as the CLI's own feature events count it.
ok: used, the person got what they asked. sad: degraded, they still got something. bad: failed, they got nothing.
export type TelemetryMarkKind = 'ok' | 'sad' | 'bad';
TelemetryMarkResult type
#
line 16639
Added in 2.1.284
What a telemetry.mark hook returns and next(e) resolves to: { value: undefined }, or { deny }, which rejects the caller's promise.
export type TelemetryMarkResult = ValueOrDeny<undefined>;
TelemetryProp type
#
line 16645
Added in 2.1.284
One property of a first-party row or a mark: a number, a boolean, or a string chosen from a list (TelemetryChoice).
export type TelemetryProp = number | boolean | TelemetryChoice;
TelemetryRecordEntry type
#
line 16650
Added in 2.1.284
A record for the telemetry collector the session's operator configured.
23 lines
export type TelemetryRecordEntry = {
/**
* The operator's collector. Pinned.
*/
to: 'collector';
/**
* The record's event; it leaves named `claude_code.<event>`.
*/
event: string;
/**
* The record's attributes; they go out as they stand, in the order
* written.
*/
attributes: Readonly<Record<string, TelemetryAttribute>>;
/**
* When it was logged: an ISO 8601 instant to the millisecond.
*/
loggedAt: string;
/**
* Where in a trace the record belongs, when it belongs to one.
*/
span?: TelemetrySpan;
};
TelemetryRowArgs type
#
line 16678
Added in 2.1.284
A first-party row as a call passes it: to left out reads as anthropic.
14 lines
export type TelemetryRowArgs = {
/**
* The destination, Anthropic's first-party analytics; optional here.
*/
to?: 'anthropic';
/**
* The row's event name.
*/
event: string;
/**
* The row's properties, by name.
*/
props?: Readonly<Record<string, TelemetryProp>>;
};
TelemetryRowEntry type
#
line 16697
Added in 2.1.284
A first-party row as a hook reads it: to is always present, the engine having completed it before any hook or matcher reads e.
14 lines
export type TelemetryRowEntry = {
/**
* Anthropic's first-party analytics. Pinned.
*/
to: 'anthropic';
/**
* The row's event name.
*/
event: string;
/**
* The row's properties, by name.
*/
props?: Readonly<Record<string, TelemetryProp>>;
};
TelemetrySpan type
#
line 16716
Added in 2.1.284
The span a collector record belongs to, as W3C trace context spells it: the ids in lowercase hex.
14 lines
export type TelemetrySpan = {
/**
* The trace's id, 32 hex digits.
*/
traceId: string;
/**
* The span's id, 16 hex digits.
*/
spanId: string;
/**
* Bit 0 set when the trace is sampled, as W3C trace context spells it.
*/
traceFlags: number;
};
TextHoverProps type
#
line 16735
Added in 2.1.267 · changed in 2.1.271, 2.1.290
The Text props a hover may override (its colors and styles, not its wrapping) and scope, the hover group it joins; a Button's label too.
19 lines
export type TextHoverProps = {
/**
* Names a hover group of this plugin's: every element it draws with the
* same `scope`, in any site but a `Backdrop`, lights while any is hovered.
*
* Another plugin's elements under the same string are a different group.
* One to 64 characters, no control characters; no keyed Box needed. On the
* terminal a Text nested in a Text follows its group but cannot heat it.
*/
scope?: string;
color?: Color;
backgroundColor?: Color;
dimColor?: boolean;
bold?: boolean;
italic?: boolean;
underline?: boolean;
strikethrough?: boolean;
inverse?: boolean;
};
TextProps type
#
line 16759
In the first published surface (2.1.259) · changed in 2.1.267, 2.1.290, 2.1.299, 2.1.300, 2.1.326
The props of Text: colors, styles, and the size, weight, face and digits each surface draws its own way. Colors are a theme key or a raw color.
82 lines
export type TextProps = {
/**
* Style overrides applied by the surface while the pointer is over the
* nearest enclosing keyed `Box`, or, given a `scope`, over its group.
*
* No hook runs and nothing crosses to the plugin. Refused outside a keyed
* Box unless it names a `scope`.
*/
hover?: TextHoverProps;
color?: Color;
backgroundColor?: Color;
/**
* The run dimmed: on the terminal, drawn in the theme's dim color.
*
* Faint too where that color is the palette's own white or black, as
* plain text is, unless the run is bold, inverse or on a background of
* any other color.
*/
dimColor?: boolean;
/**
* The text size, a step on a scale each surface maps to its own type sizes.
*
* Absent, the enclosing Text's, or `body`. The terminal has one size and
* ignores it.
*/
size?: 'caption' | 'footnote' | 'body' | 'heading' | 'title';
/**
* How heavy the text is, drawn at the nearest weight the surface has.
*
* Absent, the enclosing Text's. The terminal draws `semibold` and `bold`
* as bold and cannot draw a lighter weight inside a bold Text.
*/
weight?: 'regular' | 'medium' | 'semibold' | 'bold';
/**
* The surface's monospaced face at the same size. The terminal is always
* monospaced and ignores it.
*/
mono?: boolean;
/**
* Digits of one width, for a number that changes by itself on screen (a
* timer, a percentage) or numbers stacked in a column to line up.
*
* The terminal's digits are already one cell each.
*/
tabular?: boolean;
/**
* The older spelling of a semibold weight.
*
* @deprecated Use `weight`. `bold: true` is read as `weight: 'semibold'`,
* and an explicit `weight` outranks it; a `hover`'s `bold` still applies.
*/
bold?: boolean;
italic?: boolean;
underline?: boolean;
strikethrough?: boolean;
inverse?: boolean;
/**
* The direction the text reads in: `rtl` for a right-to-left script, so a
* row of it that opens with a Latin word or a number reads right to left.
*
* Absent, each row reads by its first strong letter. Where the engine
* orders the letters itself, `rtl` rows are also flush right; a terminal
* that reorders text by itself draws the Text exactly as without `dir`.
*/
dir?: 'ltr' | 'rtl';
/**
* What a line too wide for its Box does. `wrap`, the default, breaks it into
* rows. The others keep it on one row with an ellipsis: `end`, `truncate` and
* `truncate-end` at its end, `truncate-start` at its start, `middle` and
* `truncate-middle` in its middle (Desktop and VS Code always cut the end).
* `clip` leaves no ellipsis, though the terminal draws one. A phone wraps a
* cut at the end all the same unless `maxLines` is set.
*/
wrap?: 'wrap' | 'end' | 'middle' | 'truncate' | 'truncate-start' | 'truncate-middle' | 'truncate-end' | 'clip';
/**
* The most rows the Text draws, a whole number from 1: past them, its last
* row ends in an ellipsis. With a `wrap` that cuts the start or middle, or
* `clip`, each line stays on one row whatever the number. A phone lifts
* `maxLines` and `clip` at accessibility text sizes, to show the rest.
*/
maxLines?: number;
};
ThemeAmbience type
#
line 16845
Added in 2.1.329
What plays on behind the session: 1 to 8 layers.
export type ThemeAmbience = {
layers: readonly (ThemeToneDrone | ThemeNoiseDrone | ThemeToneScatter | ThemeNoiseScatter)[];
/**
* How much room it rings in: 0 to 1. Absent, none.
*/
reverb?: number;
};
ThemeBackdrop type
#
line 16858
Added in 2.1.319 · changed in 2.1.323
The backdrop attribute of $.theme.set: what is behind the conversation. scene makes a live scene, and color, gradient or vector make a still ground. All of them are pure vector, with no embedded pictures or fonts.
export type ThemeBackdrop = ThemeScene | ThemeGround;
ThemeBackdropGlass type
#
line 16865
Added in 2.1.319
How a surface keeps its text readable over a backdrop: the desktop app frosts its own panels, and the mobile app lays one veil over the backdrop. Each key absent takes the surface's default, so {} is the default glass.
17 lines
export type ThemeBackdropGlass = {
/**
* How far the backdrop blurs behind a panel, in points: 0 to 64. Absent, 16.
*/
blur?: number;
/**
* What colors a panel or veil over the backdrop: a raw color, `#hex` or `rgb()`,
* `rgba()`, `hsl()` or `hsla()` of numbers; a theme key or a name is refused.
* Absent, the surface's own panel color.
*/
tint?: string;
/**
* How opaque the tinted panel or veil is over the backdrop: 0 to 1. Absent,
* 0.6.
*/
opacity?: number;
};
ThemeBoxRule interface
#
line 16886
Added in 2.1.329
How the box around a part looks. Lengths are numbers of points.
38 lines
interface ThemeBoxRule {
/**
* The flat color behind the words. Give it beside a `fill` too: it tells the
* app what the words sit on, and a sliced drawing can get it under its words.
*/
backgroundColor?: ThemeStyleColor;
fill?: ThemeFill;
/**
* 0 to 64: one for every corner, or top left, top right, bottom right and
* bottom left.
*/
radius?: number | readonly [number, number, number, number];
borderColor?: ThemeStyleColor;
/**
* 0 to 8. Absent beside a `borderColor`, 1.
*/
borderWidth?: number;
/**
* `x` and `y` from -16 to 16, and `blur` from 0 to 32. Each is 0 when absent.
* A shadow that reaches the next row draws fainter.
*/
shadow?: {
x?: number;
y?: number;
blur?: number;
color: ThemeStyleColor;
} | 'none';
/**
* 0 to 48, as every padding is. A side beats its axis, which beats this.
*/
padding?: number;
paddingX?: number;
paddingY?: number;
paddingTop?: number;
paddingRight?: number;
paddingBottom?: number;
paddingLeft?: number;
}
ThemeColor type
#
line 16931
Added in 2.1.323
A color in a still backdrop. A surface uses a raw color as it is, works out a name from the look's colors in the look's mode, or from the app's own colors where the look gives none, and refuses the ground over anything else. Annotate a color kept in an object or a list with this type, or it widens to string.
export type ThemeColor = ThemeColorName | 'transparent' | `#${string}` | `rgb${string}` | `hsl${string}`;
ThemeColorGround interface
#
line 16933
Added in 2.1.323 · changed in 2.1.324, 2.1.326
interface ThemeColorGround extends ThemeGroundBase {
/**
* The one color of the ground.
*/
color: ThemeColor;
gradient?: never;
vector?: never;
}
ThemeColorInputs type
#
line 16954
Added in 2.1.321
One mode's colors in ThemeColors: a six-digit hex color such as #1e1e2e under the name of each design system token the theme sets. The type checks the leading # alone.
The names are the design system's, so the type lists none. A surface keeps its own color for a token that is left out.
The desktop app reads four more names, which color messages with no style: bg-user-message and text-user-message for the person's, and bg-assistant-message and text-assistant-message for Claude's. A message's own rule in ThemeStyle wins over them, and any rule may name them.
export type ThemeColorInputs = {
[token: string]: `#${string}`;
};
ThemeColorName type
#
line 16965
Added in 2.1.323
The design system's color names. A surface works each one out from the look's colors, so one rule serves light and dark. A name is not a key of colors, and a ThemeKey from a drawn tree isn't one of these names. In the stock palette fill-primary is near-black in light and near-white in dark, not the brand color.
export type ThemeColorName = 'surface-0' | 'surface-1' | 'surface-2' | 'surface-3' | 'text-primary' | 'text-secondary' | 'text-muted' | 'text-disabled' | 'fill-primary' | 'on-primary' | 'border' | 'border-strong' | 'border-stronger' | 'fill-accent' | 'text-accent' | 'bg-accent' | 'on-accent' | 'border-accent' | 'fill-danger' | 'text-danger' | 'bg-danger' | 'on-danger' | 'border-danger' | 'fill-success' | 'text-success' | 'bg-success' | 'on-success' | 'border-success' | 'fill-warning' | 'text-warning' | 'bg-warning' | 'on-warning' | 'border-warning' | 'fill-pro' | 'text-pro' | 'bg-pro' | 'on-pro' | 'border-pro';
ThemeColors type
#
line 16979
Added in 2.1.321
The colors attribute of $.theme.set: a whole palette as JSON data, for a surface to paint itself with, where it reads one.
Its token names are the design system's, and a wrong one paints nothing. A palette kept in a constant is annotated with this type, or its v and its colors widen and no longer fit.
The engine holds colors only to bounded JSON data with no key __proto__, constructor or prototype and no named key on a list, so a surface judges what it reads, and so does a theme.set hook over another mod's call. A surface refuses a whole palette whose text contrast is too low, and isDrawn stays true.
36 lines
export type ThemeColors = {
/**
* The version of this shape.
*/
v: 1;
/**
* The id the palette was made with.
*/
id?: string;
/**
* The palette's name, for a surface to show: 1 to 64 characters.
*/
label: string;
/**
* The colors for a surface's light mode, and for its dark mode. Give one alone
* and a surface acts as if `overrideColorScheme` named that mode. Where it names
* the other, the surface keeps its own colors.
*/
inputs: {
light?: ThemeColorInputs;
dark?: ThemeColorInputs;
};
/**
* The code highlighting theme to pair with each mode, by name. A surface
* keeps its own for a name it does not offer.
*/
codeTheme?: {
light?: string;
dark?: string;
};
/**
* `more` asks for stronger borders and focus rings, as a high contrast theme
* needs. Absent, the surface's own.
*/
contrast?: 'more';
};
ThemeCue type
#
line 17019
Added in 2.1.329
A short sound: 1 to 8 layers that start together.
export type ThemeCue = {
layers: readonly (ThemeToneLayer | ThemeNoiseLayer)[];
/**
* How much room it rings in: 0 to 1. Absent, none.
*/
reverb?: number;
};
ThemeFill type
#
line 17030
Added in 2.1.329
A background that isn't one flat color.
type ThemeFill = {
gradient: ThemeFillGradient;
vector?: never;
} | {
vector: ThemeFillVector;
gradient?: never;
};
ThemeFillGradient interface
#
line 17041
Added in 2.1.329
Colors that run across a part's box, as in a still backdrop.
interface ThemeFillGradient extends Omit<ThemeGradient, 'stops'> {
/**
* Two to 16 colors, evenly spaced, or `{ at, color }` with `at` from 0 to 1,
* in order.
*/
stops: readonly (ThemeStyleColor | {
at: number;
color: ThemeStyleColor;
})[];
}
ThemeFillVector interface
#
line 17055
Added in 2.1.329
A drawing behind a part's words, as in a still backdrop.
27 lines
interface ThemeFillVector extends Omit<ThemeVector, 'paths' | 'color'> {
/**
* 1 to 64 paths, filled unless `strokeWidth`, 0.1 to 64, strokes one. Each `d`
* is whole path data of at most 16,384 characters.
*/
paths: readonly (string | {
d: string;
strokeWidth?: number;
color?: ThemeStyleColor;
})[];
/**
* Each path's color, where it names none of its own: a path with neither is
* refused.
*/
color?: ThemeStyleColor;
/**
* Cuts the drawing in nine, so it frames a box of any size: the corners draw
* once, and the edges and middle stretch, or tile with `repeat`. One inset for
* every side, or top, right, bottom and left, in `viewBox` units: a point each
* unless `size` scales them, and 48 points at most. The drawing is then the
* box's whole shape, so `shadow` follows it, and `radius` and the border
* aren't painted. `backgroundColor` is painted only when the words are under
* 3:1 on a color of the drawing or on what lies behind it: then it goes over
* the drawing, under the words alone.
*/
slice?: number | readonly [number, number, number, number];
}
ThemeGenericFont type
#
line 17086
Added in 2.1.329
A font every device has. code is the app's own font for code.
type ThemeGenericFont = 'sans' | 'serif' | 'mono' | 'code' | 'cursive';
ThemeGradient interface
#
line 17091
Added in 2.1.323
Colors that run across their box.
21 lines
interface ThemeGradient extends ThemeTiling {
/**
* Two to 16 colors, evenly spaced, or `{ at, color }` with `at` from 0 to 1. A
* bare color in a list with `at` stops takes the place its index gives, and the
* places must run in order, or the gradient is refused.
*/
stops: readonly (ThemeColor | {
at: number;
color: ThemeColor;
})[];
/**
* Degrees from -360 to 360, as in CSS: 0 runs up, 90 runs right and 180, the
* default, runs down.
*/
angle?: number;
/**
* `radial` makes an ellipse out to the edges of its box, and ignores `angle`.
* Absent, `linear`.
*/
shape?: 'linear' | 'radial';
}
ThemeGradientGround interface
#
line 17113
Added in 2.1.323 · changed in 2.1.324, 2.1.326
interface ThemeGradientGround extends ThemeGroundBase {
gradient: ThemeGradient;
color?: never;
vector?: never;
}
ThemeGround type
#
line 17127
Added in 2.1.323 · changed in 2.1.324, 2.1.326
A still ground behind the conversation: a flat color, a gradient or a drawing in paths. A scene draws what moves, and any other pattern. There is no picture ground for now, so redraw a picture as SVG.
backdrop: { gradient: { stops: ['surface-0', 'surface-2'] } }
export type ThemeGround = ThemeColorGround | ThemeGradientGround | ThemeVectorGround;
ThemeGroundBase interface
#
line 17132
Added in 2.1.323
A scene's keys, which no ground has.
interface ThemeGroundBase {
/**
* A scene's key, which no ground has.
*/
scene?: never;
/**
* A scene's key, which no ground has.
*/
glass?: never;
}
ThemeKey type
#
line 17150
Added in 2.1.290
The theme keys named for what a color means: text, status, the prompt box and its modes, and diffs, as the custom theme reference lists them.
A tree that names one follows the person's theme. Another key the theme holds resolves too, typed as any string is (Color).
export type ThemeKey = 'text' | 'inverseText' | 'inactive' | 'subtle' | 'suggestion' | 'remember' | 'success' | 'error' | 'warning' | 'merged' | 'claude' | 'permission' | 'planMode' | 'autoAccept' | 'promptBorder' | 'bashBorder' | 'ide' | 'diffAdded' | 'diffRemoved' | 'diffAddedDimmed' | 'diffRemovedDimmed' | 'diffAddedWord' | 'diffRemovedWord';
ThemeLayerEnvelope type
#
line 17155
Added in 2.1.329
How one hit starts and dies away.
type ThemeLayerEnvelope = {
/**
* Seconds to rise: 0.002 to 2. Absent, 0.005.
*/
attack?: number;
/**
* Seconds to die away: 0.01 to 4. Absent, 0.4.
*/
release?: number;
};
ThemeLayerMix type
#
line 17169
Added in 2.1.329
What every layer may say about how it sounds.
27 lines
type ThemeLayerMix = {
/**
* How loud, beside the other layers: 0 to 1. Absent, 0.5. The app turns a
* loud sound down and never turns one up.
*/
gain?: number;
/**
* Left (-1) to right (1). Absent, the middle.
*/
pan?: number;
/**
* Shapes the tone at `hz`, 20 to 10,000. With `to`, it moves there over each
* note, or there and back over 16 seconds on a drone.
*/
filter?: {
type: 'lowpass' | 'highpass' | 'bandpass';
hz: number;
to?: number;
};
/**
* Swells and fades `hz` times a second, 0.05 to 30, by `depth`, 0 to 1.
*/
tremolo?: {
hz: number;
depth: number;
};
};
ThemeMessageRule interface
#
line 17200
Added in 2.1.329
How a message looks. What it says of the words beats Text.
export interface ThemeMessageRule extends ThemeTypeRule, ThemeBoxRule {
/**
* Tilts the box clockwise: -3 to 3 degrees. A large box tilts less, and one
* in a view laid out as a chat feed doesn't tilt.
*/
rotate?: number;
}
ThemeNoiseDrone interface
#
line 17211
Added in 2.1.329
Noise without a break.
interface ThemeNoiseDrone extends ThemeLayerMix {
wave: ThemeNoiseWave;
drone: true;
}