// Generated by kui-addon-schema from kit's schema.lua (ADR 0066); do not edit. // Kit: a UI kit for kui, tuned for dense tool UIs — inputs, data views, // overlays, layout, charts and a trace waterfall, drawn by a skin (Ledger, // Phosphor, Neutral) the host picks. import type { Channel, HandlerMsg, KuiNode } from '@qxuken/kui'; import type { ColorProp } from '@qxuken/kui/jsx-runtime'; /** How loud a control is; success confirms what just happened (Copied). */ export type Variant = 'default' | 'primary' | 'ghost' | 'danger' | 'success'; /** What a badge, a stat or a toast is about. */ export type Tone = 'neutral' | 'info' | 'accent' | 'ok' | 'warn' | 'danger'; /** Where a cell's content sits. */ export type Align = 'start' | 'center' | 'end'; /** Which way a split divides. */ export type Axis = 'row' | 'column'; /** The look: Ledger's paper and ink, Phosphor's terminal, or Neutral's quiet chrome. */ export type Skin = 'ledger' | 'phosphor' | 'neutral'; /** A settings preset, with project fonts, roles and sizes applied over it. Independent of content layout. */ export type ContentTheme = 'paper' | 'signal' | 'stage' | 'minimal'; /** A reusable adaptive composition, independent of the content theme. */ export type ContentLayout = 'editorial' | 'briefing' | 'split' | 'minimal'; /** Row and control heights: 22 and 26 px, or 20 and 22 px compact. */ export type Density = 'comfortable' | 'compact'; /** A log line's level. */ export type Level = 'debug' | 'info' | 'warn' | 'error'; /** What a field's Choose… button asks the system for: a folder, a file to open, or where to save one. */ export type Browse = 'folder' | 'open' | 'save'; /** How a chart labels its x axis: the number (with `x_unit`), time counted back to now (`-15` … `0` reads `15 min ago` … `now`), or Unix seconds as the local time of day. */ export type XFormat = 'number' | 'ago' | 'clock'; /** Which half of the skin's colours: the OS's, or light or dark held. */ export type Appearance = 'system' | 'light' | 'dark'; /** One of Kit's shaders: a skeleton's shimmer, or gradient noise. */ export type ShaderPreset = 'shimmer' | 'noise'; /** What a list or a table selects: one row, any rows (⌘- or Ctrl-click toggles a row, Shift extends from the last row clicked, ⌘A or Ctrl+A takes them all, Space toggles the row the keyboard is on), or none — the rows still a keyboard's to walk and Enter's to activate. */ export type Selection = 'single' | 'multiple' | 'none'; /** What a skeleton stands in for: lines of text, a block (an image, a chart), or a circle (an avatar). */ export type SkeletonShape = 'text' | 'block' | 'circle'; /** Project typography and content spacing in logical px. Omitted fields keep the preset or skin default. Content sizes do not enlarge tool controls. */ export interface Sizes { /** Tool body text. */ body?: number; /** Tool labels. */ label?: number; /** Small titles and level-two headings. */ title?: number; /** Level-one content headings. */ heading?: number; /** Large statistics and display text. */ display?: number; /** Reading text. */ content?: number; /** Figure captions. */ caption?: number; /** Code text. */ code?: number; /** Chart axis and data labels. */ chart?: number; /** Default content spacing. */ gap?: number; /** Default content inset. */ pad?: number; } /** A choice: what it is, and what it reads as. */ export interface Choice { /** What the choice is; what the event carries. */ value: string; /** What it reads as. */ label: string; /** Shown, not choosable. */ disabled?: boolean; /** A count beside the label (a segment's, a tab's). */ count?: number; /** The count is bad news: drawn in the danger colour. */ alert?: boolean; } /** A table's column: which field of the channel it shows, and how. */ export interface Column { /** The channel column it reads. */ field: string; /** Its header. */ title: string; /** Its width in px; shares the rest when left out. */ width?: number; /** How narrow a sharing column goes before the table hides a column or scrolls sideways (80 when left out). */ minWidth?: number; /** How much it matters when the table is narrow: the columns that do not fit hide lowest first, the header with them; left out, it never hides. What still does not fit scrolls sideways. */ priority?: number; /** Where its cells sit; numbers read best at the end. */ align?: Align; /** Its cells in the data face: ids, timings, hashes. */ mono?: boolean; /** A channel column naming each cell's tone (`ok`, `warn`, `danger`, `accent`, `neutral`): the cell is drawn in it — a status, an HTTP method. */ tone?: string; /** Its cells as pills with a dot in their `tone`: a status column. */ badge?: boolean; } /** A tab: its value and its label. */ export interface Tab { /** What it is; what `change` carries. */ value: string; /** What it reads as. */ label: string; /** A count beside the label. */ count?: number; } /** A menu row. */ export interface Item { /** What `choose` carries. */ value: string; /** What it reads as. */ label: string; /** The chord beside it, as text: `⌘K`. */ shortcut?: string; /** Shown, not choosable. */ disabled?: boolean; /** A destructive action, drawn as one. */ danger?: boolean; } /** One item of a checklist. */ export interface Check { /** What it says; its name. */ label: string; /** Ticked. */ checked: boolean; /** Shown, not tickable. */ disabled?: boolean; } /** One row of an inspector: a key and its value. */ export interface Entry { /** The field's name. */ key: string; /** Its value, as text. */ value: string; /** The value in the data face. */ mono?: boolean; } /** Rows `first` to `last` of a list or a table, both in (0-based): a multiple selection is a list of them, so ⌘A on 100,000 rows is one. */ export interface RowRange { /** The first row in it. */ first: number; /** The last row in it. */ last: number; } /** One line of a line chart. */ export interface Series { /** The channel column holding its values. */ field: string; /** Its name in the legend. */ name: string; /** Its colour; the skin's series colours in order when left out. */ color?: ColorProp; } /** The props of `kit/settings`. */ export interface SettingsProps { /** The skin; Ledger when left out. */ skin?: Skin; /** Optional content settings preset: Paper, Signal, Stage or Minimal. Explicit skin, fonts, roles and individual sizes override the preset; layout stays the author's. */ theme?: ContentTheme; /** Comfortable when left out. */ density?: Density; /** The skin's hard shadows; on when left out. */ shadows?: boolean; /** Corner radius in px, for a brand with its own; the skin's when left out. */ radius?: number; /** Roles the brand overrides, by name: `{ accent = 0x2f6fedff, panel = "$brandSurface" }` — a colour, `{ light, dark }` or a token each. An accent given as a colour derives the palette around it: what the skin drew in its accent takes it (the selection, a view switch's chosen segment, the first chart series and waterfall group), what it drew in the accent's hue takes the new hue, the ground and surfaces lean a few percent toward it, and every text role is moved in lightness until it reads at 4.5:1 on what it sits on (WCAG AA), what reads on the accent worked out. Roles the brand names are kept as named. */ roles?: unknown; /** Kit's colours held light or dark whatever the OS says; the OS's when left out (`system`). */ appearance?: Appearance; /** The hairline's width in px (rows, a field's edge); the skin's when left out. */ hair?: number; /** The region rule's width in px (a panel's frame, a control's border); the skin's when left out. */ rule?: number; /** The UI face, as a family list (`{ "Inter", "sans" }`); the skin's when left out. */ fontUi?: string[]; /** The data face (ids, numbers, code), as a family list; the skin's when left out. */ fontData?: string[]; /** Content heading/quote families; the preset's, else the UI face. */ fontTitle?: string[]; /** Reading-text families; the UI face when omitted. */ fontContent?: string[]; /** Project typography and content spacing. Fields merge over the preset individually; sizes are logical px. */ sizes?: Sizes; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/panel`. */ export interface PanelProps { /** Its title, as the skin labels regions. */ title?: string; /** A line under the title. */ subtitle?: string; /** The body scrolls rather than grows. */ scroll?: boolean; /** Takes the room its parent leaves. */ grow?: boolean; /** The body's padding in px; 10 when left out, 0 for a body that brings its own or is often empty. */ pad?: number; /** is the body. */ children?: KuiNode; /** goes in the header, after the title. */ actions?: KuiNode; /** goes under the body. */ footer?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/toolbar`. */ export interface ToolbarProps { /** Opt into the native drag strip under custom window chrome. Reserves the OS window controls and keeps gaps draggable. False by default; native-decorated windows keep the normal content toolbar. Configure custom chrome and a medium/tall titlebar in the host when opting in. */ windowChrome?: boolean; /** starts it. */ children?: KuiNode; /** ends it, at the far side. */ trailing?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/statusbar`. */ export interface StatusbarProps { /** fills it, in order. */ children?: KuiNode; /** ends it, at the far side. */ trailing?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/split`. */ export interface SplitProps { /** Side by side (row, the default) or stacked. */ axis?: Axis; /** How much of the room the first pane takes, 0 to 1: yours to keep and pass back. */ fraction: number; /** The least either pane is, in px; 80 when left out. */ min?: number; /** The message resize arrives as: yours, with `resize: SplitResize` in it — register it as `SplitResizeMsg<…>`. The rule was dragged: the fraction it asks for. */ onResize?: HandlerMsg<{ resize: SplitResize }>; /** is the first pane. */ first?: KuiNode; /** is the second pane. */ second?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onResize`'s message carries under `resize`. */ export interface SplitResize { /** 0 to 1. */ fraction: number; } /** Your message `T` as `resize` arrives. */ export type SplitResizeMsg = T & { resize: SplitResize }; /** The props of `kit/tabs`. */ export interface TabsProps { /** The tabs, in order. */ tabs: Tab[]; /** The one shown: yours to keep. */ value: string; /** The message change arrives as: yours, with `change: TabsChange` in it — register it as `TabsChangeMsg<…>`. Another tab was chosen. */ onChange?: HandlerMsg<{ change: TabsChange }>; /** is the chosen tab's body. */ children?: KuiNode; /** ends the strip, at the far side: what acts on the chosen tab. */ trailing?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onChange`'s message carries under `change`. */ export interface TabsChange { /** Its value. */ value: string; } /** Your message `T` as `change` arrives. */ export type TabsChangeMsg = T & { change: TabsChange }; /** The props of `kit/section`. */ export interface SectionProps { /** The heading. */ title: string; /** Folded: yours to keep. */ collapsed?: boolean; /** A count beside the heading. */ count?: number; /** The body's left inset in px; 18 when left out, under the title. 0 for rows with their own inset that line up with `leading`. */ indent?: number; /** The message toggle arrives as: yours, with `toggle: SectionToggle` in it — register it as `SectionToggleMsg<…>`. The heading was pressed. */ onToggle?: HandlerMsg<{ toggle: SectionToggle }>; /** is what it folds. */ children?: KuiNode; /** goes before the heading, beside it rather than in it: a box that ticks the whole section. */ leading?: KuiNode; /** goes after the heading, at the far side: a status, an action on the whole section. */ actions?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onToggle`'s message carries under `toggle`. */ export interface SectionToggle { /** What it asks to be. */ collapsed: boolean; } /** Your message `T` as `toggle` arrives. */ export type SectionToggleMsg = T & { toggle: SectionToggle }; /** The props of `kit/divider`. */ export interface DividerProps { /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/heading`. */ export interface HeadingProps { /** The heading. */ text: string; /** Hierarchy, 1 to 6; 1 by default. */ level?: number; /** Override the theme's heading size. */ size?: number; /** A family name or family token. */ family?: string; /** Override the foreground role. */ color?: ColorProp; /** Bold by default. */ bold?: boolean; /** Line height in logical px. */ lineHeight?: number; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/paragraph`. */ export interface ParagraphProps { /** The text. */ text: string; /** Override the reading size. */ size?: number; /** A family name or family token. */ family?: string; /** Override the foreground role. */ color?: ColorProp; /** Line height in logical px. */ lineHeight?: number; /** Allow selecting and copying its text. */ selectable?: boolean; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/content`. */ export interface ContentProps { /** Layout preset; ordinary reading flow if omitted. */ layout?: ContentLayout; /** Optional composition heading. */ title?: string; /** Optional reading lead. */ subtitle?: string; /** Optional small introductory label. */ eyebrow?: string; /** title or section centers the content vertically; other values use regular flow. */ preset?: string; /** Take available height. */ grow?: boolean; /** Maximum reading width. */ maxWidth?: number; /** Inset; theme default if omitted. */ pad?: number; /** Spacing; theme default if omitted. */ gap?: number; /** Optional background. */ bg?: ColorProp; /** is the composition. */ children?: KuiNode; /** is the supporting visual in editorial, briefing or split layouts; below in minimal/regular flow. */ aside?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/columns`. */ export interface ColumnsProps { /** Stack below this width, 760 by default. */ collapseAt?: number; /** Column gap. */ gap?: number; /** is the first region. */ first?: KuiNode; /** is the second region. */ second?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/comparison`. */ export interface ComparisonProps { /** First title; Before by default. */ firstTitle?: string; /** Second title; After by default. */ secondTitle?: string; /** Stack below this width, 760 by default. */ collapseAt?: number; /** is the first composition. */ first?: KuiNode; /** is the second composition. */ second?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/quote`. */ export interface QuoteProps { /** The quotation. */ text: string; /** Its author or source. */ attribution?: string; /** Override reading size. */ size?: number; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/figure`. */ export interface FigureProps { /** The caption. */ caption?: string; /** is the visual, such as an image, SVG, chart or custom view. */ children?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/visibility`. */ export interface VisibilityProps { /** Whether the content is visible and interactive. */ visible: boolean; /** Remove layout space too when invisible; otherwise reserve it. */ collapse?: boolean; /** is retained even when invisible. */ children?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/button`. */ export interface ButtonProps { /** The text on it; its accessible name unless `name` says more. */ label: string; /** Its accessible name when that says more than the label; start it with the label's words (Clear → Clear the selection). */ name?: string; /** Default when left out. */ variant?: Variant; /** An icon's name before the label (Kit's icon set). */ icon?: string; /** The chord, shown faintly after the label: `⌘R`. */ shortcut?: string; /** Drawn and read as unavailable; presses nothing. */ disabled?: boolean; /** A toggle that is on (a panel shown): drawn selected and read as such. */ pressed?: boolean; /** A hint under the pointer — why it is disabled, say. */ tooltip?: string; /** The message press arrives as: yours, with `press: ButtonPress` in it — register it as `ButtonPressMsg<…>`. Pressed. */ onPress?: HandlerMsg<{ press: ButtonPress }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onPress`'s message carries under `press`. */ export interface ButtonPress { } /** Your message `T` as `press` arrives. */ export type ButtonPressMsg = T & { press: ButtonPress }; /** The props of `kit/icon_button`. */ export interface IconButtonProps { /** The icon's name (Kit's icon set). */ icon: string; /** What it does: its accessible name and its tooltip. */ label: string; /** Ghost when left out. */ variant?: Variant; /** Unavailable. */ disabled?: boolean; /** A toggle that is on: drawn selected and read as such. */ pressed?: boolean; /** The hint under the pointer; the label when left out. */ tooltip?: string; /** The message press arrives as: yours, with `press: IconButtonPress` in it — register it as `IconButtonPressMsg<…>`. Pressed. */ onPress?: HandlerMsg<{ press: IconButtonPress }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onPress`'s message carries under `press`. */ export interface IconButtonPress { } /** Your message `T` as `press` arrives. */ export type IconButtonPressMsg = T & { press: IconButtonPress }; /** The props of `kit/text_field`. */ export interface TextFieldProps { /** Its text: yours to keep, from `change`. */ value: string; /** Its label, above it; its name. */ label?: string; /** The label names the field but is not drawn: a field whose place says what it is. */ hideLabel?: boolean; /** Shown while it is empty. */ placeholder?: string; /** In the data face. */ mono?: boolean; /** Unavailable. */ disabled?: boolean; /** Its width in px; grows when left out. */ width?: number; /** Takes the keyboard each time this number changes while the field is on screen: keep a counter in your model and bump it (⌘F). A field that shows after the bump takes its number as where it starts. */ focus?: number; /** Takes the keyboard as it first shows: a new item's name. */ autofocus?: boolean; /** What is wrong with the text, in the danger colour, its edge in danger too, and read after its name. It is shown whole: at the end of the field while the field has room for it beside the text, so a field in a wide toolbar keeps its height, and under the field, wrapping, while it has not, the row growing to fit. An empty string marks the field only, for fields that share one message. */ error?: string; /** A Choose… button after the field that opens the system's folder, open or save dialog; the path picked arrives as `change`, as if typed. Cancelled, nothing changes. The dialog starts in the field's folder when its text is an absolute path. */ browse?: Browse; /** The button's label; Choose… when left out. */ browseLabel?: string; /** The message change arrives as: yours, with `change: TextFieldChange` in it — register it as `TextFieldChangeMsg<…>`. The text changed, or a path was picked. */ onChange?: HandlerMsg<{ change: TextFieldChange }>; /** The message submit arrives as: yours, with `submit: TextFieldSubmit` in it — register it as `TextFieldSubmitMsg<…>`. Enter. */ onSubmit?: HandlerMsg<{ submit: TextFieldSubmit }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onChange`'s message carries under `change`. */ export interface TextFieldChange { /** The whole text. */ text: string; } /** Your message `T` as `change` arrives. */ export type TextFieldChangeMsg = T & { change: TextFieldChange }; /** What `onSubmit`'s message carries under `submit`. */ export interface TextFieldSubmit { /** The whole text. */ text: string; } /** Your message `T` as `submit` arrives. */ export type TextFieldSubmitMsg = T & { submit: TextFieldSubmit }; /** The props of `kit/password`. */ export interface PasswordProps { /** Its password: yours to keep, from `change`. */ value: string; /** Its label, above it; its name. */ label?: string; /** The label names the field but is not drawn: a field whose place says what it is. */ hideLabel?: boolean; /** Shown while it is empty. */ placeholder?: string; /** Unavailable, including the show/hide eye. */ disabled?: boolean; /** Its width in px; grows when left out. */ width?: number; /** Takes the keyboard each time this number changes while the field is on screen. */ focus?: number; /** Takes the keyboard as it first shows. */ autofocus?: boolean; /** What is wrong with the password, in the danger colour, its edge in danger too, and read after its name. It is shown whole: at the end of the field while there is room, and under it, wrapping, while there is not. An empty string marks the field only. */ error?: string; /** The message change arrives as: yours, with `change: PasswordChange` in it — register it as `PasswordChangeMsg<…>`. The password changed. */ onChange?: HandlerMsg<{ change: PasswordChange }>; /** The message submit arrives as: yours, with `submit: PasswordSubmit` in it — register it as `PasswordSubmitMsg<…>`. Enter. */ onSubmit?: HandlerMsg<{ submit: PasswordSubmit }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onChange`'s message carries under `change`. */ export interface PasswordChange { /** The whole password. */ text: string; } /** Your message `T` as `change` arrives. */ export type PasswordChangeMsg = T & { change: PasswordChange }; /** What `onSubmit`'s message carries under `submit`. */ export interface PasswordSubmit { /** The whole password. */ text: string; } /** Your message `T` as `submit` arrives. */ export type PasswordSubmitMsg = T & { submit: PasswordSubmit }; /** The props of `kit/text_area`. */ export interface TextAreaProps { /** Its text: yours to keep, from `change`. */ value: string; /** Its label, above it; its name. */ label?: string; /** The label names the field but is not drawn. */ hideLabel?: boolean; /** Shown while it is empty. */ placeholder?: string; /** In the data face: code, JSON. */ mono?: boolean; /** Unavailable. */ disabled?: boolean; /** Its width in px; grows when left out. */ width?: number; /** Lines tall at the least; 4 when left out. It grows with its text. */ rows?: number; /** Lines tall at the most, scrolling past them; no limit when left out. */ maxRows?: number; /** Takes the room its parent leaves (a request body filling its tab), `rows` still its least. */ grow?: boolean; /** Takes the keyboard each time this number changes while it is on screen. */ focus?: number; /** Takes the keyboard as it first shows. */ autofocus?: boolean; /** What is wrong with the text, under it in the danger colour. */ error?: string; /** Tab and Shift+Tab move the keyboard to the next or the last control, as from a one-line field: a note, a comment. Left out, Tab types indentation as a code editor's does, and the ways out are Escape then Tab, or Ctrl+M (Ctrl+Shift+M on macOS). */ tabMovesFocus?: boolean; /** The message change arrives as: yours, with `change: TextAreaChange` in it — register it as `TextAreaChangeMsg<…>`. The text changed. */ onChange?: HandlerMsg<{ change: TextAreaChange }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onChange`'s message carries under `change`. */ export interface TextAreaChange { /** The whole text. */ text: string; } /** Your message `T` as `change` arrives. */ export type TextAreaChangeMsg = T & { change: TextAreaChange }; /** The props of `kit/search`. */ export interface SearchProps { /** The query: yours to keep. */ value: string; /** Shown while it is empty; `Search` when left out. */ placeholder?: string; /** Its name, read and not drawn: what it searches (the placeholder when left out). */ label?: string; /** A count after the query: `12 of 340`. */ count?: string; /** Takes the keyboard each time this number changes while it is on screen (⌘F). */ focus?: number; /** Takes the keyboard as it first shows. */ autofocus?: boolean; /** The message change arrives as: yours, with `change: SearchChange` in it — register it as `SearchChangeMsg<…>`. The query changed; cleared is the empty string. */ onChange?: HandlerMsg<{ change: SearchChange }>; /** The message submit arrives as: yours, with `submit: SearchSubmit` in it — register it as `SearchSubmitMsg<…>`. Enter. */ onSubmit?: HandlerMsg<{ submit: SearchSubmit }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onChange`'s message carries under `change`. */ export interface SearchChange { /** The query. */ text: string; } /** Your message `T` as `change` arrives. */ export type SearchChangeMsg = T & { change: SearchChange }; /** What `onSubmit`'s message carries under `submit`. */ export interface SearchSubmit { /** The query. */ text: string; } /** Your message `T` as `submit` arrives. */ export type SearchSubmitMsg = T & { submit: SearchSubmit }; /** The props of `kit/select`. */ export interface SelectProps { /** The options, in order. */ options: Choice[]; /** The one chosen: yours to keep. */ value?: string; /** Shown with nothing chosen. */ placeholder?: string; /** Its label, above it. */ label?: string; /** Its width in px. */ width?: number; /** The open menu's width in px at the most; the window's less a margin when left out. The menu is as wide as its widest option up to it, and never narrower than the field. */ menuMaxWidth?: number; /** An option too long for the menu wraps onto more lines, its row growing, where it is cut short with an ellipsis when left out. */ menuWrap?: boolean; /** The message change arrives as: yours, with `change: SelectChange` in it — register it as `SelectChangeMsg<…>`. An option was chosen. */ onChange?: HandlerMsg<{ change: SelectChange }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onChange`'s message carries under `change`. */ export interface SelectChange { /** Its value. */ value: string; } /** Your message `T` as `change` arrives. */ export type SelectChangeMsg = T & { change: SelectChange }; /** The props of `kit/checkbox`. */ export interface CheckboxProps { /** Its label; its name. */ label: string; /** Ticked: yours to keep. */ checked: boolean; /** Some of what it stands for: drawn as a dash. */ mixed?: boolean; /** Unavailable. */ disabled?: boolean; /** The label names it but is not drawn: its children draw it instead (a name with search hits marked). */ hideLabel?: boolean; /** Takes its row's room, the whole height a target: a list row ticked anywhere. */ grow?: boolean; /** The message toggle arrives as: yours, with `toggle: CheckboxToggle` in it — register it as `CheckboxToggleMsg<…>`. Pressed. */ onToggle?: HandlerMsg<{ toggle: CheckboxToggle }>; /** draws after the box, the label's place: read as part of it, so nothing in it is a control. */ children?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onToggle`'s message carries under `toggle`. */ export interface CheckboxToggle { /** What it asks to be. */ checked: boolean; } /** Your message `T` as `toggle` arrives. */ export type CheckboxToggleMsg = T & { toggle: CheckboxToggle }; /** The props of `kit/checklist`. */ export interface ChecklistProps { /** The items, in order: yours to keep. */ items: Check[]; /** What it lists, as it is read. */ label?: string; /** An × on each item, which the pointer presses to remove it; Delete or Backspace removes the focused one. */ removable?: boolean; /** The message toggle arrives as: yours, with `toggle: ChecklistToggle` in it — register it as `ChecklistToggleMsg<…>`. An item was ticked or unticked. */ onToggle?: HandlerMsg<{ toggle: ChecklistToggle }>; /** The message remove arrives as: yours, with `remove: ChecklistRemove` in it — register it as `ChecklistRemoveMsg<…>`. An item asked to go. */ onRemove?: HandlerMsg<{ remove: ChecklistRemove }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onToggle`'s message carries under `toggle`. */ export interface ChecklistToggle { /** Its place, 0-based. */ index: number; /** What it asks to be. */ checked: boolean; } /** Your message `T` as `toggle` arrives. */ export type ChecklistToggleMsg = T & { toggle: ChecklistToggle }; /** What `onRemove`'s message carries under `remove`. */ export interface ChecklistRemove { /** Its place, 0-based. */ index: number; } /** Your message `T` as `remove` arrives. */ export type ChecklistRemoveMsg = T & { remove: ChecklistRemove }; /** The props of `kit/switch`. */ export interface SwitchProps { /** Its label; its name. */ label: string; /** On: yours to keep. */ on: boolean; /** Unavailable. */ disabled?: boolean; /** The message toggle arrives as: yours, with `toggle: SwitchToggle` in it — register it as `SwitchToggleMsg<…>`. Pressed. */ onToggle?: HandlerMsg<{ toggle: SwitchToggle }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onToggle`'s message carries under `toggle`. */ export interface SwitchToggle { /** What it asks to be. */ on: boolean; } /** Your message `T` as `toggle` arrives. */ export type SwitchToggleMsg = T & { toggle: SwitchToggle }; /** The props of `kit/radio_group`. */ export interface RadioGroupProps { /** The options, in order. */ options: Choice[]; /** The one chosen: yours to keep. */ value?: string; /** The group's name, drawn above it. */ label?: string; /** The name is read but not drawn: a group whose place says what it is. */ hideLabel?: boolean; /** The message change arrives as: yours, with `change: RadioGroupChange` in it — register it as `RadioGroupChangeMsg<…>`. An option was chosen. */ onChange?: HandlerMsg<{ change: RadioGroupChange }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onChange`'s message carries under `change`. */ export interface RadioGroupChange { /** Its value. */ value: string; } /** Your message `T` as `change` arrives. */ export type RadioGroupChangeMsg = T & { change: RadioGroupChange }; /** The props of `kit/segmented`. */ export interface SegmentedProps { /** The segments, in order. */ options: Choice[]; /** The one chosen: yours to keep. */ value: string; /** The group's name, read and not drawn: what the choice is of. */ label?: string; /** The message change arrives as: yours, with `change: SegmentedChange` in it — register it as `SegmentedChangeMsg<…>`. A segment was chosen. */ onChange?: HandlerMsg<{ change: SegmentedChange }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onChange`'s message carries under `change`. */ export interface SegmentedChange { /** Its value. */ value: string; } /** Your message `T` as `change` arrives. */ export type SegmentedChangeMsg = T & { change: SegmentedChange }; /** The props of `kit/slider`. */ export interface SliderProps { /** The value: yours to keep. */ value: number; /** The least. */ min: number; /** The most. */ max: number; /** What an arrow moves it by; a hundredth of the range when left out. */ step?: number; /** Its label; its name. */ label?: string; /** The value as text, shown beside the label and read for it: `20 MB/s`, `30 days`. The number when left out. */ valueLabel?: string; /** The message change arrives as: yours, with `change: SliderChange` in it — register it as `SliderChangeMsg<…>`. It asks for another value. */ onChange?: HandlerMsg<{ change: SliderChange }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onChange`'s message carries under `change`. */ export interface SliderChange { /** The value it asks for. */ value: number; } /** Your message `T` as `change` arrives. */ export type SliderChangeMsg = T & { change: SliderChange }; /** The props of `kit/table`. */ export interface TableProps { /** The columns, in order. */ columns: Column[]; /** The rows: a channel whose columns the `field`s name. */ rows: Channel; /** The selected row (0-based): yours to keep. */ selected?: number; /** What it selects: one row (the default), any rows, or none. */ selection?: Selection; /** With `selection = "multiple"`: the selected rows, as ranges — yours to keep, from `on_select`. */ selectedRanges?: RowRange[]; /** Whether the keyboard's moves select (the default): with false the arrows move the cursor only, Space selects (toggles, in a multiple selection), Enter activates and a click selects — a detail that loads on `select` or `activate` is not loaded for every row walked past. */ selectOnFocus?: boolean; /** The field it is sorted by, marked in its header; the sorting is yours. */ sort?: string; /** Sorted from the top down. */ descending?: boolean; /** Every other row tinted. */ striped?: boolean; /** Framed in a hairline, the header ruled off inside it; left out, no frame and the header on a plane of its own (in a panel, which is framed already). */ border?: boolean; /** A table of cells: the arrows walk cells (Left and Right along a row, Up and Down keeping the column), the header a row of column headers, landing on a row selecting it. Left out, a list of rows, the arrows moving whole rows. */ cells?: boolean; /** Takes the room its parent leaves. */ grow?: boolean; /** The message select arrives as: yours, with `select: TableSelect` in it — register it as `TableSelectMsg<…>`. The selection changed: a click, Space, the keyboard landing on a row when moves select, ⌘A, a Shift-range. One row in a single selection; in a multiple one, the ranges, their count, and the rows themselves when there are no more than 1,000. */ onSelect?: HandlerMsg<{ select: TableSelect }>; /** The message cursor arrives as: yours, with `cursor: TableCursor` in it — register it as `TableCursorMsg<…>`. The row the keyboard is on moved — an arrow, a page key, a type-ahead, a click: cheap, and often. */ onCursor?: HandlerMsg<{ cursor: TableCursor }>; /** The message activate arrives as: yours, with `activate: TableActivate` in it — register it as `TableActivateMsg<…>`. Enter on a row, or a double click: open it. Without a handler, Enter selects, as it did. */ onActivate?: HandlerMsg<{ activate: TableActivate }>; /** The message sort arrives as: yours, with `sort: TableSort` in it — register it as `TableSortMsg<…>`. A header was clicked. */ onSort?: HandlerMsg<{ sort: TableSort }>; /** The message range arrives as: yours, with `range: TableRange` in it — register it as `TableRangeMsg<…>`. The rows in view changed: page your source by it. */ onRange?: HandlerMsg<{ range: TableRange }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onSelect`'s message carries under `select`. */ export interface TableSelect { /** The row the change was about, 0-based: the one clicked, pressed or landed on. */ row: number; /** A multiple selection: every selected row, as a list of `RowRange` (`{ first, last }`); absent in a single one. */ ranges: unknown; /** A multiple selection: how many rows it holds. */ count: number; /** A multiple selection of no more than 1,000 rows: each of them, a list of integers; absent past that, and in a single one. */ rows: unknown; } /** Your message `T` as `select` arrives. */ export type TableSelectMsg = T & { select: TableSelect }; /** What `onCursor`'s message carries under `cursor`. */ export interface TableCursor { /** The row, 0-based. */ row: number; } /** Your message `T` as `cursor` arrives. */ export type TableCursorMsg = T & { cursor: TableCursor }; /** What `onActivate`'s message carries under `activate`. */ export interface TableActivate { /** The row, 0-based. */ row: number; } /** Your message `T` as `activate` arrives. */ export type TableActivateMsg = T & { activate: TableActivate }; /** What `onSort`'s message carries under `sort`. */ export interface TableSort { /** The column's field. */ field: string; } /** Your message `T` as `sort` arrives. */ export type TableSortMsg = T & { sort: TableSort }; /** What `onRange`'s message carries under `range`. */ export interface TableRange { /** The first row in view. */ first: number; /** The last row in view. */ last: number; } /** Your message `T` as `range` arrives. */ export type TableRangeMsg = T & { range: TableRange }; /** The props of `kit/list`. */ export interface ListProps { /** The rows. */ rows: Channel; /** The field each row's title reads. */ title: string; /** The field its second line reads. */ detail?: string; /** A field drawn as a pill before the title: a method, a state. */ badge?: string; /** A field naming each row's badge tone (`ok`, `warn`, `danger`, `accent`, `neutral`). */ tone?: string; /** The badge column's width in px, so the titles line up; each badge's own when left out. */ badgeWidth?: number; /** Its name, read and not drawn: what the list holds (History). */ label?: string; /** The selected row (0-based): yours to keep. */ selected?: number; /** What it selects: one row (the default), any rows, or none. */ selection?: Selection; /** With `selection = "multiple"`: the selected rows, as ranges — yours to keep, from `on_select`. */ selectedRanges?: RowRange[]; /** Whether the keyboard's moves select (the default): with false the arrows move the cursor only, Space selects (toggles, in a multiple selection), Enter activates and a click selects — a detail that loads on `select` or `activate` is not loaded for every row walked past. */ selectOnFocus?: boolean; /** Takes the room its parent leaves. */ grow?: boolean; /** The message select arrives as: yours, with `select: ListSelect` in it — register it as `ListSelectMsg<…>`. The selection changed: a click, Space, the keyboard landing on a row when moves select, ⌘A, a Shift-range. One row in a single selection; in a multiple one, the ranges, their count, and the rows themselves when there are no more than 1,000. */ onSelect?: HandlerMsg<{ select: ListSelect }>; /** The message cursor arrives as: yours, with `cursor: ListCursor` in it — register it as `ListCursorMsg<…>`. The row the keyboard is on moved — an arrow, a page key, a type-ahead, a click: cheap, and often. */ onCursor?: HandlerMsg<{ cursor: ListCursor }>; /** The message activate arrives as: yours, with `activate: ListActivate` in it — register it as `ListActivateMsg<…>`. Enter on a row, or a double click: open it. Without a handler, Enter selects, as it did. */ onActivate?: HandlerMsg<{ activate: ListActivate }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onSelect`'s message carries under `select`. */ export interface ListSelect { /** The row the change was about, 0-based: the one clicked, pressed or landed on. */ row: number; /** A multiple selection: every selected row, as a list of `RowRange` (`{ first, last }`); absent in a single one. */ ranges: unknown; /** A multiple selection: how many rows it holds. */ count: number; /** A multiple selection of no more than 1,000 rows: each of them, a list of integers; absent past that, and in a single one. */ rows: unknown; } /** Your message `T` as `select` arrives. */ export type ListSelectMsg = T & { select: ListSelect }; /** What `onCursor`'s message carries under `cursor`. */ export interface ListCursor { /** The row, 0-based. */ row: number; } /** Your message `T` as `cursor` arrives. */ export type ListCursorMsg = T & { cursor: ListCursor }; /** What `onActivate`'s message carries under `activate`. */ export interface ListActivate { /** The row, 0-based. */ row: number; } /** Your message `T` as `activate` arrives. */ export type ListActivateMsg = T & { activate: ListActivate }; /** The props of `kit/inspector`. */ export interface InspectorProps { /** The rows, in order. */ entries: Entry[]; /** The keys' column in px; 140 when left out. */ keyWidth?: number; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/log`. */ export interface LogProps { /** The lines: fields `time`, `level` and `message`; a message's ANSI colours (SGR) are drawn in the skin's. */ rows: Channel; /** Kept at the end as lines arrive; on when left out. */ follow?: boolean; /** Takes the room its parent leaves. */ grow?: boolean; /** A line longer than the log wraps onto more rows, where it is cut. */ wrap?: boolean; /** The time column; on when left out. */ time?: boolean; /** The message select arrives as: yours, with `select: LogSelect` in it — register it as `LogSelectMsg<…>`. A line was clicked. */ onSelect?: HandlerMsg<{ select: LogSelect }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onSelect`'s message carries under `select`. */ export interface LogSelect { /** Its index. */ row: number; } /** Your message `T` as `select` arrives. */ export type LogSelectMsg = T & { select: LogSelect }; /** The props of `kit/badge`. */ export interface BadgeProps { /** What it says. */ label: string; /** Neutral when left out. */ tone?: Tone; /** A dot in the tone's colour before the label: a status. */ dot?: boolean; /** A hint under the pointer: what the status means. */ tooltip?: string; /** Fades in as it appears and out as it goes: a status that comes and goes with an edit (changed), not one of a table's. */ fade?: boolean; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/stat`. */ export interface StatProps { /** What it counts. */ label: string; /** The number, as text. */ value: string; /** Use the project's display size for a presentation or headline statistic. */ display?: boolean; /** Override the value size in logical px. */ size?: number; /** How it moved: `+12%`. */ delta?: string; /** Whether the move is good news. */ tone?: Tone; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/code`. */ export interface CodeProps { /** The text. */ text: string; /** Syntax highlighting: lua, teal, javascript, typescript, json, rust, python, c, css, shell or sql. Other languages remain plain text. */ language?: string; /** One-based line numbers to emphasize. */ highlightLines?: number[]; /** Code size in logical px; project code size when omitted. */ size?: number; /** Line height; derived from the code size when omitted. */ lineHeight?: number; /** Wraps rather than scrolls sideways. */ wrap?: boolean; /** At most this many lines high, the rest scrolled to. */ maxLines?: number; /** Each line's number in a gutter beside it, outside the selection (not with `wrap`). */ lineNumbers?: boolean; /** A Copy button over the text that puts it on the clipboard and says Copied for a moment. */ copy?: boolean; /** A caption over the text (a file's name), and the block's accessible name. */ label?: string; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/markdown`. */ export interface MarkdownProps { /** The Markdown. */ text: string; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/notice`. */ export interface NoticeProps { /** What happened, or what to know. */ message: string; /** Danger, warn, ok, accent, info or neutral (the default). */ tone?: Tone; /** A bold first line. */ title?: string; /** are its actions, at its end. */ children?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/empty`. */ export interface EmptyProps { /** What is missing. */ title: string; /** Why, or what fills it. */ detail?: string; /** are its actions. */ children?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/progress`. */ export interface ProgressProps { /** 0 to 1; indeterminate when left out. */ value?: number; /** What is under way. */ label?: string; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/skeleton`. */ export interface SkeletonProps { /** Lines of text (the default), a block or a circle. */ shape?: SkeletonShape; /** Text: how many lines, the last of several shorter; 1 when left out. */ lines?: number; /** In px, or a circle's diameter (32 when left out); a text or a block grows when left out. */ width?: number; /** A block's height in px; 80 when left out. */ height?: number; /** What is loading, as it is read; `Loading` when left out. */ label?: string; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/shader`. */ export interface ShaderProps { /** One of Kit's shaders, its colours the skin's: `shimmer` (a skeleton's sweep) or `noise` (gradient noise drifting between the well and the accent). Animated unless `animate = false`. */ preset?: ShaderPreset; /** A WGSL `fragment` function (ADR 0015), which Kit registers: the same source, the same fragment. */ source?: string; /** A fragment the host registered (`Core::add_fragment`, `ctx.addFragment`, `kui_fragment_add`, `env.add_fragment`). */ id?: number; /** Up to sixteen numbers the shader reads as four `vec4`; a preset's come from the skin when left out. */ params?: number[]; /** A registered image's handle, which the shader samples with `kui_sample`. */ image?: number; /** A frame every frame, for a shader that reads `time`; off under reduced motion. */ animate?: boolean; /** In px; it grows when left out. */ width?: number; /** In px; 80 when left out. */ height?: number; /** Takes the height its parent leaves. */ grow?: boolean; /** What it shows, as it is read; decoration when left out. */ label?: string; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/dialog`. */ export interface DialogProps { /** Its title; its name. */ title: string; /** Its width in px; 420 when left out. */ width?: number; /** The message dismiss arrives as: yours, with `dismiss: DialogDismiss` in it — register it as `DialogDismissMsg<…>`. Escape, or a press outside. */ onDismiss?: HandlerMsg<{ dismiss: DialogDismiss }>; /** is the body. */ children?: KuiNode; /** are its buttons, at the end of its foot. */ actions?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onDismiss`'s message carries under `dismiss`. */ export interface DialogDismiss { } /** Your message `T` as `dismiss` arrives. */ export type DialogDismissMsg = T & { dismiss: DialogDismiss }; /** The props of `kit/popover`. */ export interface PopoverProps { /** Its name, read and not drawn: what it holds (Scale the service). A modal surface with no name warns `modal-without-name`. */ label?: string; /** Its width in px. */ width?: number; /** The message dismiss arrives as: yours, with `dismiss: PopoverDismiss` in it — register it as `PopoverDismissMsg<…>`. Escape, or a press outside. */ onDismiss?: HandlerMsg<{ dismiss: PopoverDismiss }>; /** is what it holds. */ children?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onDismiss`'s message carries under `dismiss`. */ export interface PopoverDismiss { } /** Your message `T` as `dismiss` arrives. */ export type PopoverDismissMsg = T & { dismiss: PopoverDismiss }; /** The props of `kit/menu`. */ export interface MenuProps { /** The rows, in order. */ items: Item[]; /** The message choose arrives as: yours, with `choose: MenuChoose` in it — register it as `MenuChooseMsg<…>`. A row was chosen. */ onChoose?: HandlerMsg<{ choose: MenuChoose }>; /** The message dismiss arrives as: yours, with `dismiss: MenuDismiss` in it — register it as `MenuDismissMsg<…>`. Escape, or a press outside. */ onDismiss?: HandlerMsg<{ dismiss: MenuDismiss }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onChoose`'s message carries under `choose`. */ export interface MenuChoose { /** Its value. */ value: string; } /** Your message `T` as `choose` arrives. */ export type MenuChooseMsg = T & { choose: MenuChoose }; /** What `onDismiss`'s message carries under `dismiss`. */ export interface MenuDismiss { } /** Your message `T` as `dismiss` arrives. */ export type MenuDismissMsg = T & { dismiss: MenuDismiss }; /** The props of `kit/toast`. */ export interface ToastProps { /** What happened. */ message: string; /** info (the default, in the skin's focus blue), neutral (grey), accent, ok (success), warn (warning) or danger (error). */ tone?: Tone; /** One action on what happened, a button beside the message: `Undo`. */ action?: string; /** The action's accessible name when it says more than its label (Undo → Undo the delete). */ actionName?: string; /** How long it stays, in ms, counted again from when the pointer leaves it; 5000 when left out, 0 to keep it until dismissed. */ duration?: number; /** One of a `toaster`'s stack rather than floating in the corner on its own. */ inline?: boolean; /** The message dismiss arrives as: yours, with `dismiss: ToastDismiss` in it — register it as `ToastDismissMsg<…>`. Its close button, or its `duration` ran out. */ onDismiss?: HandlerMsg<{ dismiss: ToastDismiss }>; /** The message action arrives as: yours, with `action: ToastAction` in it — register it as `ToastActionMsg<…>`. Its action was pressed. */ onAction?: HandlerMsg<{ action: ToastAction }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onDismiss`'s message carries under `dismiss`. */ export interface ToastDismiss { } /** Your message `T` as `dismiss` arrives. */ export type ToastDismissMsg = T & { dismiss: ToastDismiss }; /** What `onAction`'s message carries under `action`. */ export interface ToastAction { } /** Your message `T` as `action` arrives. */ export type ToastActionMsg = T & { action: ToastAction }; /** The props of `kit/toaster`. */ export interface ToasterProps { /** are the toasts, each placed with `inline`. */ children?: KuiNode; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/sparkline`. */ export interface SparklineProps { /** The values. */ data: Channel; /** The column to draw. */ field: string; /** The accent when left out. */ color?: ColorProp; /** In px; 80 when left out. */ width?: number; /** In px; 18 when left out. */ height?: number; /** After the value under the pointer: `ms`, `%`. */ unit?: string; /** The value under the pointer, as a hint and a dot on its sample; on when left out. */ readout?: boolean; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/line_chart`. */ export interface LineChartProps { /** The rows: an x column and a column a series. */ data: Channel; /** The x column (time, an index). */ x: string; /** The lines. */ series: Series[]; /** In px; 160 when left out. */ height?: number; /** Filled under the first line. */ area?: boolean; /** The x window's start, held by the host: a chart that shares its axis with another view (a timeline's lanes). With `x_max`; the data's own range when left out. */ xMin?: number; /** The x window's end, held by the host. */ xMax?: number; /** The y labels' column in px, held: charts stacked under one another, or under a waterfall with the same `gutter`, share their plot's left edge. As wide as the widest label when left out. */ gutter?: number; /** With it, only the last `window` of x is shown: a live chart. While samples come in it scrolls smoothly between them, drawn one sample behind and slid left over the time samples take to come (a keyframe cycle the core runs, so a frame between samples runs no view); under reduced motion, and while the plot is out of the viewport, it steps. */ window?: number; /** How the x ticks read; the number when left out. */ xFormat?: XFormat; /** After each x tick's number: `min`, `s`. */ xUnit?: string; /** After each y tick's number: `ms`, `%`. */ yUnit?: string; /** Under the pointer, a crosshair at the pointer's x, a dot on each series there and a readout of the x and every series' value in its colour for the sample under it — a still pointer keeps its crosshair still while a live window slides samples under it — gone when the pointer leaves; on when left out. An idle chart pays one hover layer for it. */ readout?: boolean; /** A Tab stop that is a slider over the samples: the arrows move the readout a sample, Page Up and Down ten, Home and End to the ends, and a screen reader hears the readout as its value and as a live region. No key sink: every other key, Tab and the app's chords, goes on as from any control. Left out, the chart is no Tab stop; the pointer's readout works either way. */ focusable?: boolean; /** The message hover arrives as: yours, with `hover: LineChartHover` in it — register it as `LineChartHoverMsg<…>`. The pointer moved over a row. */ onHover?: HandlerMsg<{ hover: LineChartHover }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onHover`'s message carries under `hover`. */ export interface LineChartHover { /** The row under it. */ row: number; } /** Your message `T` as `hover` arrives. */ export type LineChartHoverMsg = T & { hover: LineChartHover }; /** The props of `kit/bar_chart`. */ export interface BarChartProps { /** The rows. */ data: Channel; /** The column naming each bar. */ label: string; /** The column of their values. */ value: string; /** In px; 160 when left out (standing bars). */ height?: number; /** After each value and axis number: `%`, `ms`. */ unit?: string; /** Each bar's value over it; on when left out. */ values?: boolean; /** Bars lying along rows, each name whole beside its bar: for long names or many bars. */ horizontal?: boolean; /** Lying bars: the names' column in px; 120 when left out. */ labelWidth?: number; /** The message select arrives as: yours, with `select: BarChartSelect` in it — register it as `BarChartSelectMsg<…>`. A bar was clicked. */ onSelect?: HandlerMsg<{ select: BarChartSelect }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onSelect`'s message carries under `select`. */ export interface BarChartSelect { /** Its row. */ row: number; } /** Your message `T` as `select` arrives. */ export type BarChartSelectMsg = T & { select: BarChartSelect }; /** The props of `kit/histogram`. */ export interface HistogramProps { /** The rows. */ data: Channel; /** The column to bin. */ field: string; /** How many; 24 when left out. */ bins?: number; /** In px; 120 when left out. */ height?: number; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** The props of `kit/waterfall`. */ export interface WaterfallProps { /** The spans: fields `name`, `start`, `len` (ms), `depth`, `group`, and `target` (a label). */ bars: Channel; /** Points in time, fields `at` and `label`: a navigation, a paint. */ marks?: Channel; /** The window's start in ms: yours to keep, from `zoom`. */ start?: number; /** The window's length in ms; the whole trace when left out. */ length?: number; /** The selected span (its row). */ selected?: number; /** Takes the room its parent leaves. */ grow?: boolean; /** The most the lanes take in px before they scroll, when it does not `grow`: as tall as its lanes up to that. */ maxHeight?: number; /** An empty column in px left of the axis and the lanes, so they line up with charts under them that hold the same `gutter`. */ gutter?: number; /** The range selected on the axis, in ms, held by the host: with `on_range`, the range drawn is this one, and a drag on the axis proposes another. Kit's own otherwise. */ rangeStart?: number; /** The selected range's length in ms; none selected when left out or 0. */ rangeLength?: number; /** The message select arrives as: yours, with `select: WaterfallSelect` in it — register it as `WaterfallSelectMsg<…>`. A span was clicked. */ onSelect?: HandlerMsg<{ select: WaterfallSelect }>; /** The message range arrives as: yours, with `range: WaterfallRange` in it — register it as `WaterfallRangeMsg<…>`. A drag on the time axis selected a range, a double click on a span made its span the range, or a click on the axis or the range's × cleared it. */ onRange?: HandlerMsg<{ range: WaterfallRange }>; /** The message zoom arrives as: yours, with `zoom: WaterfallZoom` in it — register it as `WaterfallZoomMsg<…>`. The wheel, a pinch, a drag, a tool or zooming to the range asks for another window. */ onZoom?: HandlerMsg<{ zoom: WaterfallZoom }>; /** Keys the instance; by default it is keyed by where it is placed. */ key?: string | number; /** Asks the extension every frame instead of replaying an unchanged instance. */ fresh?: boolean; } /** What `onSelect`'s message carries under `select`. */ export interface WaterfallSelect { /** Its row. */ row: number; } /** Your message `T` as `select` arrives. */ export type WaterfallSelectMsg = T & { select: WaterfallSelect }; /** What `onRange`'s message carries under `range`. */ export interface WaterfallRange { /** Its start in ms. */ start: number; /** Its length in ms; 0 when cleared. */ length: number; } /** Your message `T` as `range` arrives. */ export type WaterfallRangeMsg = T & { range: WaterfallRange }; /** What `onZoom`'s message carries under `zoom`. */ export interface WaterfallZoom { /** Its start in ms. */ start: number; /** Its length in ms. */ length: number; } /** Your message `T` as `zoom` arrives. */ export type WaterfallZoomMsg = T & { zoom: WaterfallZoom }; /** Kit's look for this window: the skin, the density, the hard shadows and any role the brand overrides. Place it once a frame, before the components; it draws nothing. */ export declare function Settings(props: SettingsProps, children?: KuiNode): KuiNode; /** A titled region: a header with the title and its actions, the body, an optional footer. */ export declare function Panel(props: PanelProps, children?: KuiNode): KuiNode; /** A row of controls at the control height, its trailing group pushed to the far side. */ export declare function Toolbar(props: ToolbarProps, children?: KuiNode): KuiNode; /** A thin row at a window's foot for state: counts, the connection, the clock. */ export declare function Statusbar(props: StatusbarProps, children?: KuiNode): KuiNode; /** Two panes and a draggable rule between them. */ export declare function Split(props: SplitProps, children?: KuiNode): KuiNode; /** A strip of tabs over the body of the one chosen. */ export declare function Tabs(props: TabsProps, children?: KuiNode): KuiNode; /** A heading that folds what is under it. */ export declare function Section(props: SectionProps, children?: KuiNode): KuiNode; /** A rule between groups, as the skin draws regions. */ export declare function Divider(props: DividerProps, children?: KuiNode): KuiNode; /** An adaptive content heading in the project's title face. */ export declare function Heading(props: HeadingProps, children?: KuiNode): KuiNode; /** Wrapping reading text in the project's content face. */ export declare function Paragraph(props: ParagraphProps, children?: KuiNode): KuiNode; /** A reading composition with project spacing, optional width limit and title/section centering. */ export declare function Content(props: ContentProps, children?: KuiNode): KuiNode; /** Two content regions that stack when the available width is narrow. */ export declare function Columns(props: ColumnsProps, children?: KuiNode): KuiNode; /** Titled before/after regions with adaptive stacking. */ export declare function Comparison(props: ComparisonProps, children?: KuiNode): KuiNode; /** A quotation in the title face with an optional attribution. */ export declare function Quote(props: QuoteProps, children?: KuiNode): KuiNode; /** Any visual with a wrapping caption in the project's caption size. */ export declare function Figure(props: FigureProps, children?: KuiNode): KuiNode; /** Retained content whose visibility can change without changing layout. Invisible content has no paint, pointer input, accessibility presence or Tab stops. */ export declare function Visibility(props: VisibilityProps, children?: KuiNode): KuiNode; /** A button. Space, Enter and assistive technology press it as a click does. */ export declare function Button(props: ButtonProps, children?: KuiNode): KuiNode; /** A square button holding an icon. */ export declare function IconButton(props: IconButtonProps, children?: KuiNode): KuiNode; /** A one-line text field, the skin's field style (an underline in Ledger). */ export declare function TextField(props: TextFieldProps, children?: KuiNode): KuiNode; /** A password field in the skin's field style, masked by kui, with a show/hide eye that resets while the field is away. */ export declare function Password(props: PasswordProps, children?: KuiNode): KuiNode; /** A text field of several lines, in a well in every skin: a note, a request body. */ export declare function TextArea(props: TextAreaProps, children?: KuiNode): KuiNode; /** A search field: a glass, the query, and a clear button while it has one. */ export declare function Search(props: SearchProps, children?: KuiNode): KuiNode; /** A field that opens a menu of options. */ export declare function Select(props: SelectProps, children?: KuiNode): KuiNode; /** A box and its label. */ export declare function Checkbox(props: CheckboxProps, children?: KuiNode): KuiNode; /** A list of things to tick, one Tab stop: Up and Down walk the items, Home and End the ends, Space or a click ticks the one focused. */ export declare function Checklist(props: ChecklistProps, children?: KuiNode): KuiNode; /** An on/off switch and its label. */ export declare function Switch(props: SwitchProps, children?: KuiNode): KuiNode; /** One of a few options, each a radio and its label. */ export declare function RadioGroup(props: RadioGroupProps, children?: KuiNode): KuiNode; /** A row of joined buttons, one of them chosen: a view switch, a range. */ export declare function Segmented(props: SegmentedProps, children?: KuiNode): KuiNode; /** A value on a track, dragged, clicked or stepped by the arrows. */ export declare function Slider(props: SliderProps, children?: KuiNode): KuiNode; /** A virtual table over a channel: its columns, a sticky header, the rows in view only, a selection, sortable headers. */ export declare function Table(props: TableProps, children?: KuiNode): KuiNode; /** A virtual list over a channel: a title line and a detail line a row. */ export declare function List(props: ListProps, children?: KuiNode): KuiNode; /** Keys and their values, aligned: a request's headers, a record's fields. */ export declare function Inspector(props: InspectorProps, children?: KuiNode): KuiNode; /** A log over a channel: time, level and message a line, following the end unless scrolled away. */ export declare function Log(props: LogProps, children?: KuiNode): KuiNode; /** A short label in a pill: a status, a method, a count. */ export declare function Badge(props: BadgeProps, children?: KuiNode): KuiNode; /** A number with its label, and how it moved. */ export declare function Stat(props: StatProps, children?: KuiNode): KuiNode; /** Text in the data face on the panel colour: a payload, a command, a stack. */ export declare function Code(props: CodeProps, children?: KuiNode): KuiNode; /** A document written in Markdown, drawn in the skin: `#` to `####` headings, paragraphs, `-` / `*` / `1.` lists nested by two spaces, `>` quotes, `---` rules, fenced code (as `code`), pipe tables (the first row their header), and inline `code`, **bold**, *italic* and links (drawn as their text). Raw HTML, images and footnotes stay text. Selectable. */ export declare function Markdown(props: MarkdownProps, children?: KuiNode): KuiNode; /** A message in the flow of the page: an error to act on, a warning, a note; its actions after it. */ export declare function Notice(props: NoticeProps, children?: KuiNode): KuiNode; /** What a view shows with nothing in it: a title, a sentence, and what to do. */ export declare function Empty(props: EmptyProps, children?: KuiNode): KuiNode; /** A bar that fills; with no value it moves to say work is going on. A reader hears a progress bar: its percent, or busy with no value. */ export declare function Progress(props: ProgressProps, children?: KuiNode): KuiNode; /** A placeholder for what is still loading: lines a text high, a block or a circle, in the skin's well colour and rounded as its controls are, with a shimmer crossing them in step — Kit's shimmer fragment (`addons/kit/shaders/shimmer.wgsl`), which Kit registers itself — held still under reduced motion. */ export declare function Skeleton(props: SkeletonProps, children?: KuiNode): KuiNode; /** A box a fragment shader paints (a `fragment` node, ADR 0015): one of Kit's presets, WGSL handed over as `source`, or a fragment the host registered (`id`) — Kit registers the first two itself. Kit rounds the box by the skin's radius and keeps a shader that reads `time` still under reduced motion. With no shader, or one that does not compile (`fragment-rejected`), it is the skin's well. */ export declare function Shader(props: ShaderProps, children?: KuiNode): KuiNode; /** A modal dialog: a title, its body and its actions; Escape and a press outside ask it to close. */ export declare function Dialog(props: DialogProps, children?: KuiNode): KuiNode; /** A panel floating beside what opened it; Escape and a press outside ask it to close. */ export declare function Popover(props: PopoverProps, children?: KuiNode): KuiNode; /** A menu of items floating under what opened it. */ export declare function Menu(props: MenuProps, children?: KuiNode): KuiNode; /** A message in a window's corner: shown for `duration` (5 s) or until dismissed (`duration = 0`), in its tone — info, success, warning or error — as a bar down its edge and its icon; it slides out as it goes. Several stack in a `toaster`. */ export declare function Toast(props: ToastProps, children?: KuiNode): KuiNode; /** Toasts stacked in the window's corner, the newest at the foot, each sliding into the room one that goes leaves. */ export declare function Toaster(props: ToasterProps, children?: KuiNode): KuiNode; /** A line with no axes, for a trend inline. */ export declare function Sparkline(props: SparklineProps, children?: KuiNode): KuiNode; /** Lines over time with axes and a legend; `live` keeps the newest window in view. */ export declare function LineChart(props: LineChartProps, children?: KuiNode): KuiNode; /** Bars by label. */ export declare function BarChart(props: BarChartProps, children?: KuiNode): KuiNode; /** How a column's values fall into bins. */ export declare function Histogram(props: HistogramProps, children?: KuiNode): KuiNode; /** A trace waterfall: spans as bars on a time axis, nested by depth, coloured by group. The wheel and a pinch zoom about the pointer, a sideways swipe or Shift and the wheel pans, a drag anywhere in it pans — over a span too, which a click picks and a double click makes the range — and a drag on the time axis selects a range to zoom to. */ export declare function Waterfall(props: WaterfallProps, children?: KuiNode): KuiNode; export interface Kit { Settings: typeof Settings; Panel: typeof Panel; Toolbar: typeof Toolbar; Statusbar: typeof Statusbar; Split: typeof Split; Tabs: typeof Tabs; Section: typeof Section; Divider: typeof Divider; Heading: typeof Heading; Paragraph: typeof Paragraph; Content: typeof Content; Columns: typeof Columns; Comparison: typeof Comparison; Quote: typeof Quote; Figure: typeof Figure; Visibility: typeof Visibility; Button: typeof Button; IconButton: typeof IconButton; TextField: typeof TextField; Password: typeof Password; TextArea: typeof TextArea; Search: typeof Search; Select: typeof Select; Checkbox: typeof Checkbox; Checklist: typeof Checklist; Switch: typeof Switch; RadioGroup: typeof RadioGroup; Segmented: typeof Segmented; Slider: typeof Slider; Table: typeof Table; List: typeof List; Inspector: typeof Inspector; Log: typeof Log; Badge: typeof Badge; Stat: typeof Stat; Code: typeof Code; Markdown: typeof Markdown; Notice: typeof Notice; Empty: typeof Empty; Progress: typeof Progress; Skeleton: typeof Skeleton; Shader: typeof Shader; Dialog: typeof Dialog; Popover: typeof Popover; Menu: typeof Menu; Toast: typeof Toast; Toaster: typeof Toaster; Sparkline: typeof Sparkline; LineChart: typeof LineChart; BarChart: typeof BarChart; Histogram: typeof Histogram; Waterfall: typeof Waterfall; at(namespace: string): Kit; } /** The same components under another namespace: for kit loaded twice. */ export declare function at(namespace: string): Kit; declare const kit: Kit; export default kit;