xonecas.io
70160
Ce

cel-tui / commit 3849ff3

feat: replace named colors with numbered palette slots and theme support

BREAKING CHANGE: Color type changed from named strings ("red", "white",
etc.) to numbered palette slots ("color00"–"color15"). The default theme
maps these 1:1 to the terminal's ANSI 16 palette.

- Color type: 16 named colors → "color00" through "color15"
- New Theme type: maps slots to ANSI indices or hex true color values
- New defaultTheme: ANSI 16 mapping (color00→0, color01→1, etc.)
- cel.init() accepts optional { theme } for custom color mappings
- emitBuffer()/emitDiff() resolve colors through the active theme
- Scrollbar and TextInput cursor use terminal defaults (null) instead
  of hardcoded palette colors
- All examples updated: removed fgColor/bgColor where terminal defaults
  suffice, paired bgColor with fgColor for contrast on all containers
- Spec updated with Color System section and Julia Evans reference
- All docs, skill files, and README updated to new color API

xonecas2026-04-05 3849ff38a13c8834563201ed18b7c04e7f37946e parent 684f2e9

33 files changed

This diff is too big to show in full. The first 1000 lines are below, and every file is listed with its counts.

AGENTS.md+3−3
@@ -203,10 +203,10 @@ chore: scaffold monorepo with types, core, components packages
203203
204204 ## Architecture Notes
205205
206-- `cel.ts` — Framework entrypoint. Owns render loop, input dispatch, focus management. `cel.init(terminal)` starts, `cel.viewport(fn)` sets render function, `cel.render()` requests re-render, `cel.stop()` restores terminal. Mouse input handles batched SGR events (terminals often send multiple events in a single data chunk).
206+- `cel.ts` — Framework entrypoint. Owns render loop, input dispatch, focus management. `cel.init(terminal, options?)` starts (accepts optional `{ theme }` for custom color themes), `cel.viewport(fn)` sets render function, `cel.render()` requests re-render, `cel.stop()` restores terminal. Mouse input handles batched SGR events (terminals often send multiple events in a single data chunk).
207207 - `layout.ts` — Flexbox engine. `layout(root, width, height)` → `LayoutNode` tree with absolute screen rects.
208208 - `paint.ts` — Paints `LayoutNode` tree into `CellBuffer`. Handles clip rects, scroll offsets (clamped to max — apps can pass `Infinity` to mean "scroll to end"), scrollbars, grapheme-aware text rendering, TextInput cursor/scroll state, container bgColor fill, style inheritance threading, focusStyle resolution.
209-- `emitter.ts` — `emitBuffer()` for full renders, `emitDiff()` for differential. Both wrap in CSI 2026 synchronized output.
209+- `emitter.ts` — `emitBuffer()` for full renders, `emitDiff()` for differential. Both accept an optional `Theme` for color resolution and wrap in CSI 2026 synchronized output. Exports `defaultTheme` (ANSI 16 mapping).
210210 - `hit-test.ts` — `hitTest(root, x, y)` → path from root to deepest node. `findClickHandler`, `findScrollTarget`, `collectKeyPressHandlers`, `collectFocusable` walk paths.
211211 - `keys.ts` — Kitty keyboard protocol parser. `parseKey(data)` handles CSI u sequences (special keys, modifier combos), CSI letter sequences (arrows, Home/End with modifiers), CSI tilde sequences (Delete, PageUp/Down, F-keys with modifiers), and raw printable bytes. Maps `" "` → `"space"`, `"+"` → `"plus"` as named keys. `isEditingKey()` identifies keys consumed by TextInput. `normalizeKey()` reorders modifiers to canonical `ctrl+alt+shift+<key>` order.
212212 - `text-edit.ts` — Pure text editing functions (`insertChar`, `deleteBackward`, `deleteForward`, `moveCursor`). Operates on `EditState` (value + cursor position). Used by `cel.ts` to handle TextInput key events.
@@ -288,4 +288,4 @@ More generally: before running any command that could destroy uncommitted work (
288288 - Primitives are functions that return typed Node objects (not classes)
289289 - Components in `packages/components/` are plain functions using core primitives
290290 - Key format: all lowercase, modifiers joined by `+` (e.g., `"ctrl+shift+s"`)
291-- Colors: ANSI base 16 only (Color type in types package)
291+- Colors: 16 numbered palette slots (`"color00"`–`"color15"`), mapped to ANSI 16 by default via `defaultTheme`. Custom themes can remap slots to 256-color or true color. Omit `fgColor`/`bgColor` for terminal defaults. Always pair `bgColor` with `fgColor` for contrast.
README.md+3−3
@@ -24,7 +24,6 @@ cel.viewport(() =>
2424 VStack(
2525 {
2626 height: "100%",
27- fgColor: "white",
2827 onKeyPress: (key) => {
2928 if (key === "ctrl+q") {
3029 cel.stop();
@@ -33,8 +32,8 @@ cel.viewport(() =>
3332 },
3433 },
3534 [
36- Text("Hello, cel-tui!", { bold: true, fgColor: "cyan" }),
37- Text("─", { repeat: "fill", fgColor: "brightBlack" }),
35+ Text("Hello, cel-tui!", { bold: true, fgColor: "color06" }),
36+ Text("─", { repeat: "fill", fgColor: "color08" }),
3837 TextInput({
3938 flex: 1,
4039 value: input,
@@ -65,6 +64,7 @@ cel.viewport(() =>
6564 - **Layers** — return an array for multi-layer compositing (modals, overlays).
6665 - **Uncontrolled by default** — focus and scroll just work. Opt into controlled mode when needed.
6766 - **Style inheritance** — containers propagate styles to descendants. `bgColor` fills the rect.
67+- **16-color palette** — numbered slots (`"color00"`–`"color15"`) mapped to ANSI 16 by default. Custom themes can remap to 256-color or true color.
6868 - **Cell buffer rendering** — styled cells, differential updates, synchronized output.
6969 - **Kitty keyboard protocol** — unambiguous key input with full modifier support. Requires a [compatible terminal](https://sw.kovidgoyal.net/kitty/keyboard-protocol/#progressive-enhancement) (Kitty, WezTerm, Ghostty, foot, Alacritty, Windows Terminal).
7070
TODO.md+6−0
@@ -24,6 +24,8 @@ Remaining work, known bugs, and planned improvements.
2424
2525 - 🔧 **`space-between` + `gap` double-spaces children** — When both `justifyContent: "space-between"` and `gap` are set, children get `gap` spacing plus the distributed remaining space on top. The remaining-space calculation subtracts `totalGap` first, then `space-between` distributes what's left as extra gap — so the effective gap is `gap + betweenGaps[i]`. CSS flex doesn't stack `space-between` on top of `gap` this way. The spec doesn't define this interaction.
2626
27+- ~~🔧 **Color theme doesn't respect terminal 16 color setup** -- Fixed: replaced named colors (`"red"`, `"white"`, etc.) with numbered palette slots (`"color00"`–`"color15"`). Added `Theme` type for custom color mappings, `defaultTheme` (ANSI 16), and `cel.init(terminal, { theme })` API. Spec updated with Color System section. No more confusing `"white"` vs terminal default.~~
28+
2729 ---
2830
2931 ## API Improvements
@@ -36,6 +38,10 @@ Remaining work, known bugs, and planned improvements.
3638
3739 - ❌ **Markdown heading inline styling** — Headings (`#`, `##`, `###`) still strip inline formatting to plain text. Since headings are short and single-line, this is low priority. Paragraphs, list items, and blockquotes now render inline formatting via wrapping HStack.
3840
41+## Toolchain
42+
43+- 🔧 **Biome formatter clashes with Prettier on generic type arguments** — When a chained `.method<TypeArgs>(longString)` call exceeds `lineWidth`, biome's formatter breaks at the function args `(` while prettier breaks at the type args `<`. They never converge. Current config has biome formatter enabled (`indentStyle: "space"`), which means both formatters fight on this pattern. Fix: either disable biome's formatter (set `formatter.enabled: false` — `organizeImports` still works as an err …
44+
3945 ## Future Enhancements
4046
4147 - 💡 Additional example apps (text editor from spec reference example)
docs/skill/cel-tui/SKILL.md+16−12
@@ -41,7 +41,6 @@ cel.viewport(() =>
4141 VStack(
4242 {
4343 height: "100%",
44- fgColor: "white",
4544 onKeyPress: (key) => {
4645 if (key === "ctrl+q") {
4746 cel.stop();
@@ -50,7 +49,7 @@ cel.viewport(() =>
5049 },
5150 },
5251 [
53- Text("My App", { bold: true, fgColor: "cyan" }),
52+ Text("My App", { bold: true, fgColor: "color06" }),
5453 Text("─", { repeat: "fill" }),
5554 TextInput({
5655 flex: 1,
@@ -76,7 +75,7 @@ The steps: `cel.init(terminal)` → `cel.viewport(() => tree)` → mutate state
7675 | `Text(content, props?)` | Leaf | Styled text, no children |
7776 | `TextInput(props)` | Container (no children) | Multi-line editable text |
7877
79-Containers accept sizing (`width`, `height`, `flex`, `"50%"`, `minWidth`/`maxWidth`), layout (`padding`, `gap`, `justifyContent`, `alignItems`), scroll (`overflow: "scroll"`, `scrollbar`), styling (`fgColor`, `bgColor`, `bold`, `focusStyle`), and interaction (`onClick`, `focusable`, `focused`, `onKeyPress`).
78+Containers accept sizing (`width`, `height`, `flex`, `"50%"`, `minWidth`/`maxWidth`), layout (`padding`, `gap`, `justifyContent`, `alignItems`), scroll (`overflow: "scroll"`, `scrollbar`), styling (`fgColor`, `bgColor`, `bold`, `focusStyle`), and interaction (`onClick`, `focusable`, `focused`, `onKeyPress`). Colors are numbered palette slots (`"color00"`–`"color15"`), mapped to ANSI 16 by default.
8079
8180 Read [references/api.md](references/api.md) for the full props listing, sizing strategies, text props, and component reference.
8281
@@ -86,9 +85,12 @@ Read [references/api.md](references/api.md) for the full props listing, sizing s
8685
8786 ```ts
8887 HStack({ height: 1 }, [Text("left"), VStack({ flex: 1 }, []), Text("right")]);
89-Text("─", { repeat: "fill", fgColor: "brightBlack" });
88+Text("─", { repeat: "fill", fgColor: "color08" });
9089 HStack(
91- { onClick: handleClick, focusStyle: { bgColor: "cyan", fgColor: "black" } },
90+ {
91+ onClick: handleClick,
92+ focusStyle: { bgColor: "color06", fgColor: "color00" },
93+ },
9294 [Text(" Send ", { bold: true })],
9395 );
9496 ```
@@ -134,9 +136,10 @@ cel.viewport(() => [
134136 VStack(
135137 { height: "100%", justifyContent: "center", alignItems: "center" },
136138 [
137- VStack({ width: 40, height: 10, bgColor: "black" }, [
138- ...modalContent,
139- ]),
139+ VStack(
140+ { width: 40, height: 10, bgColor: "color08", fgColor: "color07" },
141+ [...modalContent],
142+ ),
140143 ],
141144 ),
142145 ]
@@ -169,9 +172,9 @@ TextInput({
169172 Containers propagate styles to descendants. Explicit props always win:
170173
171174 ```ts
172-VStack({ fgColor: "white", bgColor: "blue" }, [
173- Text("inherits white on blue"),
174- Text("explicit green on blue", { fgColor: "green" }),
175+VStack({ fgColor: "color07", bgColor: "color04" }, [
176+ Text("inherits color07 on color04"),
177+ Text("explicit color02", { fgColor: "color02" }),
175178 ]);
176179 ```
177180
@@ -216,7 +219,8 @@ mySelect.reset(); // clear filter/highlight programmatically
216219 - **Enter activates** a focused container's `onClick`. If no `onClick`, Enter reaches `onKeyPress`.
217220 - **`focusable: true`** without `onClick` makes a container keyboard-focusable (receives `onKeyPress` events via Tab). Used by stateful components like `Select`.
218221 - **Innermost handler wins** — for `onClick` and `onScroll`. For `onKeyPress`, keys **bubble up** through ancestors: return `false` from a handler to let the key continue to the next ancestor. Returning `void`/`undefined` consumes the key (stops bubbling). This is backward-compatible.
219-- **Container `bgColor`** fills the rect with opaque background before painting children.
222+- **Container `bgColor`** fills the rect with opaque background before painting children. Always pair `bgColor` with `fgColor` for contrast — terminal default fg is designed for the terminal default bg, not for arbitrary palette backgrounds.
223+- **Colors are numbered slots** (`"color00"`–`"color15"`), not names. The default theme maps to ANSI 16. Omit `fgColor`/`bgColor` for terminal defaults (guaranteed readable across themes).
220224 - **`repeat: "fill"` in HStack** gets width 0 (intrinsic width is 0). Workaround: wrap in `VStack({ flex: 1 }, [Text(" ", { repeat: "fill" })])`.
221225 - **Crash cleanup** — terminal state is restored on SIGINT, SIGTERM, uncaughtException.
222226 - **Always call `cel.stop()` before `process.exit()`** — restores raw mode, mouse tracking, and alternate screen.
docs/skill/cel-tui/references/api.md+7−7
@@ -22,7 +22,7 @@ All props accepted by `VStack` and `HStack`:
2222
2323 // Styling (inherited by descendants)
2424 bold, italic, underline,// boolean
25- fgColor, bgColor, // Color (ANSI 16)
25+ fgColor, bgColor, // Color ("color00"–"color15")
2626 focusStyle, // StyleProps — overrides when focused
2727
2828 // Interaction
@@ -72,11 +72,11 @@ Text("content", {
7272 italic,
7373 underline, // boolean
7474 fgColor,
75- bgColor, // ANSI 16 Color
75+ bgColor, // Color ("color00"–"color15")
7676 });
7777 ```
7878
79-Colors: `"black"`, `"red"`, `"green"`, `"yellow"`, `"blue"`, `"magenta"`, `"cyan"`, `"white"`, and bright variants (`"brightRed"`, etc.).
79+Colors: 16 numbered palette slots — `"color00"` through `"color15"`. Mapped to ANSI 16 by default; custom themes can remap to 256-color or true color. Omit a color prop for the terminal default.
8080
8181 ## TextInput Props
8282
@@ -119,17 +119,17 @@ import { Spacer, Divider, Button, Select } from "@cel-tui/components";
119119
120120 Spacer(); // VStack({ flex: 1 }, [])
121121 Divider(); // Text("─", { repeat: "fill" })
122-Divider({ char: "═", fgColor: "brightBlack" });
122+Divider({ char: "═", fgColor: "color08" });
123123 Button("[OK]", { onClick: handleOk });
124124 Button("✕", { onClick: handleClose, focusable: false });
125-// Button accepts: onClick, bold, fgColor, bgColor, focusable
126-// Note: Button does not forward focusStyle or container sizing props.
125+// Button accepts: onClick, bold, fgColor, bgColor, focusable, focusStyle
126+// Note: Button does not forward container sizing props.
127127 // For full control, use HStack + Text directly.
128128 ```
129129
130130 ### Select (filterable list)
131131
132-Select props: `items`, `onSelect`, `placeholder` (default `"type to filter..."`), `maxVisible` (default `10`), `indicator` (default `"›"`), `highlightColor` (default `"cyan"`), `onKeyPress` (composed with internal handler), plus container/style props: `width`, `height`, `flex`, `fgColor`, `bgColor`, `focused`, `focusable`, `onFocus`, `onBlur`, `focusStyle`.
132+Select props: `items`, `onSelect`, `placeholder` (default `"type to filter..."`), `maxVisible` (default `10`), `indicator` (default `"›"`), `highlightColor` (default `"color06"`), `onKeyPress` (composed with internal handler), plus container/style props: `width`, `height`, `flex`, `fgColor`, `bgColor`, `focused`, `focusable`, `onFocus`, `onBlur`, `focusStyle`.
133133
134134 ```ts
135135 const mySelect = Select({
docs/skill/cel-tui/references/composing-components.md+3−3
@@ -11,7 +11,7 @@ import type { ContainerNode } from "@cel-tui/types";
1111 import { HStack, VStack, Text } from "@cel-tui/core";
1212
1313 function StatusBar(left: string, right: string): ContainerNode {
14- return HStack({ fgColor: "black", bgColor: "white" }, [
14+ return HStack({ fgColor: "color00", bgColor: "color07" }, [
1515 Text(` ${left}`),
1616 VStack({ flex: 1 }, []), // spacer
1717 Text(`${right} `),
@@ -49,7 +49,7 @@ interface ToggleGroupInstance {
4949 }
5050
5151 function ToggleGroup(props: ToggleGroupProps): ToggleGroupInstance {
52- const { options, onSelect, activeColor = "cyan" } = props;
52+ const { options, onSelect, activeColor = "color06" } = props;
5353 let activeIndex = 0;
5454
5555 function handleKey(key: string): boolean | void {
@@ -71,7 +71,7 @@ function ToggleGroup(props: ToggleGroupProps): ToggleGroupInstance {
7171 { focusable: true, onKeyPress: handleKey, gap: 1 },
7272 options.map((opt, i) =>
7373 Text(` ${opt} `, {
74- fgColor: i === activeIndex ? "black" : undefined,
74+ fgColor: i === activeIndex ? "color00" : undefined,
7575 bgColor: i === activeIndex ? activeColor : undefined,
7676 }),
7777 ),
examples/chat.ts+20−16
@@ -180,7 +180,7 @@ function renderMessage(msg: Message, idx: number) {
180180 const isUser = msg.role === "user";
181181 const icon = isUser ? "▶" : "▷";
182182 const label = isUser ? "You" : "Agent";
183- const color = isUser ? "blue" : "green";
183+ const color = isUser ? "color04" : "color02";
184184
185185 const spinner =
186186 msg.streaming && msg.content.length > 0
@@ -205,7 +205,7 @@ function renderMessage(msg: Message, idx: number) {
205205 : [
206206 Text(
207207 ` ${spinnerFrames[spinnerTick % spinnerFrames.length]} thinking...`,
208- { fgColor: "brightBlack", italic: true },
208+ { fgColor: "color08", italic: true },
209209 ),
210210 ]),
211211 ]);
@@ -219,19 +219,22 @@ cel.viewport(() =>
219219 VStack(
220220 {
221221 height: "100%",
222- fgColor: "white",
223222 onKeyPress: (key) => {
224223 if (key === "ctrl+q" || key === "ctrl+c") quit();
225224 },
226225 },
227226 [
228227 // ── Header ──
229- HStack({ height: 1, padding: { x: 1 }, bgColor: "blue" }, [
230- Text(" Agent ", { bold: true, fgColor: "white", bgColor: "blue" }),
231- Spacer(),
232- Text("model: gpt-4", { fgColor: "brightBlack" }),
233- ]),
234- Divider({ fgColor: "brightBlack" }),
228+ HStack(
229+ {
230+ height: 1,
231+ padding: { x: 1 },
232+ bgColor: "color04",
233+ fgColor: "color07",
234+ },
235+ [Text(" Agent ", { bold: true }), Spacer(), Text("model: gpt-4")],
236+ ),
237+ Divider({ fgColor: "color08" }),
235238
236239 // ── Message History ──
237240 VStack(
@@ -256,11 +259,11 @@ cel.viewport(() =>
256259 Spacer(),
257260 VStack({ alignItems: "center" }, [
258261 Text("No messages yet.", {
259- fgColor: "brightBlack",
262+ fgColor: "color08",
260263 italic: true,
261264 }),
262265 Text("Type a message below to start.", {
263- fgColor: "brightBlack",
266+ fgColor: "color08",
264267 }),
265268 ]),
266269 Spacer(),
@@ -268,15 +271,15 @@ cel.viewport(() =>
268271 ),
269272
270273 // ── Input Area ──
271- Divider({ fgColor: "brightBlack" }),
274+ Divider({ fgColor: "color08" }),
272275 HStack({ padding: { x: 1 }, gap: 1 }, [
273- Text(">", { fgColor: "cyan", bold: true }),
276+ Text(">", { fgColor: "color06", bold: true }),
274277 TextInput({
275278 flex: 1,
276279 maxHeight: 5,
277280 value: input,
278281 onChange: handleChange,
279- placeholder: Text("type a message...", { fgColor: "brightBlack" }),
282+ placeholder: Text("type a message...", { fgColor: "color08" }),
280283 onSubmit: handleSend,
281284 focused: inputFocused,
282285 onFocus: () => {
@@ -290,9 +293,10 @@ cel.viewport(() =>
290293 }),
291294 Button(" Send ", {
292295 onClick: handleSend,
293- bgColor: "brightBlack",
296+ bgColor: "color08",
297+ fgColor: "color00",
294298 bold: true,
295- focusStyle: { bgColor: "cyan", fgColor: "black" },
299+ focusStyle: { bgColor: "color06", fgColor: "color00" },
296300 }),
297301 ]),
298302 ],
examples/hello.ts+17−16
@@ -22,8 +22,9 @@ const logo = [
2222 "╰─────────────────────╯",
2323 ];
2424
25-const palette: Array<"cyan" | "magenta" | "yellow" | "green" | "blue" | "red"> =
26- ["cyan", "magenta", "yellow", "green", "blue", "red"];
25+const palette: Array<
26+ "color06" | "color05" | "color03" | "color02" | "color04" | "color01"
27+> = ["color06", "color05", "color03", "color02", "color04", "color01"];
2728
2829 let colorIndex = 0;
2930 let tick = 0;
@@ -65,17 +66,17 @@ cel.viewport(() => {
6566 },
6667 },
6768 [
68- Text("┌─────────────────────────┐", { fgColor: "yellow" }),
69- Text("│ Terminal too small :( │", { fgColor: "yellow" }),
70- Text("│ │", { fgColor: "yellow" }),
71- Text("│ Please resize to at │", { fgColor: "yellow" }),
69+ Text("┌─────────────────────────┐", { fgColor: "color03" }),
70+ Text("│ Terminal too small :( │", { fgColor: "color03" }),
71+ Text("│ │", { fgColor: "color03" }),
72+ Text("│ Please resize to at │", { fgColor: "color03" }),
7273 Text(
7374 `│ least ${String(MIN_COLS).padStart(3)}×${String(MIN_ROWS).padStart(2)} chars. │`,
74- { fgColor: "yellow" },
75+ { fgColor: "color03" },
7576 ),
76- Text("│ │", { fgColor: "yellow" }),
77- Text("│ Ctrl+Q to quit │", { fgColor: "yellow" }),
78- Text("└─────────────────────────┘", { fgColor: "yellow" }),
77+ Text("│ │", { fgColor: "color03" }),
78+ Text("│ Ctrl+Q to quit │", { fgColor: "color03" }),
79+ Text("└─────────────────────────┘", { fgColor: "color03" }),
7980 ],
8081 );
8182 }
@@ -103,7 +104,7 @@ cel.viewport(() => {
103104 Text(""),
104105 Text("terminal UIs, cell by cell", {
105106 italic: true,
106- fgColor: "brightBlack",
107+ fgColor: "color08",
107108 }),
108109
109110 // Divider
@@ -118,16 +119,16 @@ cel.viewport(() => {
118119 // Live info row
119120 HStack({ gap: 2 }, [
120121 Text(`${spinner}`, { fgColor: color, bold: true }),
121- Text(clock(), { fgColor: "white" }),
122- Text("│", { fgColor: "brightBlack" }),
123- Text("press any key to change color", { fgColor: "brightBlack" }),
122+ Text(clock()),
123+ Text("│", { fgColor: "color08" }),
124+ Text("press any key to change color", { fgColor: "color08" }),
124125 ]),
125126
126127 // Quit hint
127128 Text(""),
128129 HStack({ gap: 1 }, [
129- Text(" ctrl+q ", { bgColor: color, fgColor: "black", bold: true }),
130- Text("quit", { fgColor: "brightBlack" }),
130+ Text(" ctrl+q ", { bgColor: color, fgColor: "color00", bold: true }),
131+ Text("quit", { fgColor: "color08" }),
131132 ]),
132133 Spacer(),
133134 ],
examples/pet.ts+107−97
@@ -347,17 +347,17 @@ function tooSmallView() {
347347 },
348348 },
349349 [
350- Text("┌─────────────────────────┐", { fgColor: "yellow" }),
351- Text("│ Terminal too small :( │", { fgColor: "yellow" }),
352- Text("│ │", { fgColor: "yellow" }),
353- Text("│ Please resize to at │", { fgColor: "yellow" }),
350+ Text("┌─────────────────────────┐", { fgColor: "color03" }),
351+ Text("│ Terminal too small :( │", { fgColor: "color03" }),
352+ Text("│ │", { fgColor: "color03" }),
353+ Text("│ Please resize to at │", { fgColor: "color03" }),
354354 Text(
355355 `│ least ${String(MIN_COLS).padStart(3)}×${String(MIN_ROWS).padStart(2)} chars. │`,
356- { fgColor: "yellow" },
356+ { fgColor: "color03" },
357357 ),
358- Text("│ │", { fgColor: "yellow" }),
359- Text("│ Ctrl+Q to quit │", { fgColor: "yellow" }),
360- Text("└─────────────────────────┘", { fgColor: "yellow" }),
358+ Text("│ │", { fgColor: "color03" }),
359+ Text("│ Ctrl+Q to quit │", { fgColor: "color03" }),
360+ Text("└─────────────────────────┘", { fgColor: "color03" }),
361361 ],
362362 );
363363 }
@@ -390,10 +390,10 @@ function currentArt(): string[] {
390390 return lines;
391391 }
392392
393-function artColor(): "cyan" | "yellow" | "magenta" {
394- if (anim === "excited") return "magenta";
395- if (hunger > 60 || happiness < 30) return "yellow";
396- return "cyan";
393+function artColor(): "color06" | "color03" | "color05" {
394+ if (anim === "excited") return "color05";
395+ if (hunger > 60 || happiness < 30) return "color03";
396+ return "color06";
397397 }
398398
399399 // ─── Reusable Widgets ───────────────────────────────────────────
@@ -401,25 +401,28 @@ function artColor(): "cyan" | "yellow" | "magenta" {
401401 function StatBar(
402402 label: string,
403403 value: number,
404- color: "green" | "yellow" | "red" | "cyan",
404+ color: "color02" | "color03" | "color01" | "color06",
405405 ) {
406406 const w = 12;
407407 const filled = Math.round((value / 100) * w);
408408 return VStack({}, [
409- Text(label, { bold: true, fgColor: "white" }),
409+ Text(label, { bold: true }),
410410 HStack({}, [
411411 Text("█", { repeat: Math.max(filled, 0), fgColor: color }),
412- Text("░", { repeat: Math.max(w - filled, 0), fgColor: "brightBlack" }),
413- Text(` ${value}`, { fgColor: "brightBlack" }),
412+ Text("░", { repeat: Math.max(w - filled, 0), fgColor: "color08" }),
413+ Text(` ${value}`, { fgColor: "color08" }),
414414 ]),
415415 ]);
416416 }
417417
418-function barColor(val: number, invert = false): "green" | "yellow" | "red" {
418+function barColor(
419+ val: number,
420+ invert = false,
421+): "color02" | "color03" | "color01" {
419422 const v = invert ? 100 - val : val;
420- if (v > 60) return "green";
421- if (v > 30) return "yellow";
422- return "red";
423+ if (v > 60) return "color02";
424+ if (v > 30) return "color03";
425+ return "color01";
423426 }
424427
425428 // ─── Create Screen ──────────────────────────────────────────────
@@ -455,12 +458,12 @@ function createView() {
455458 VStack({ width: 40, padding: { x: 2 }, gap: 0 }, [
456459 // Title
457460 HStack({ justifyContent: "center" }, [
458- Text("~ New Pet ~", { bold: true, fgColor: "cyan" }),
461+ Text("~ New Pet ~", { bold: true, fgColor: "color06" }),
459462 ]),
460- Divider({ fgColor: "brightBlack" }),
463+ Divider({ fgColor: "color08" }),
461464
462465 // Name
463- Text("Name:", { bold: true, fgColor: "white" }),
466+ Text("Name:", { bold: true }),
464467 TextInput({
465468 value: petName,
466469 onChange: (v) => {
@@ -468,11 +471,8 @@ function createView() {
468471 cel.render();
469472 },
470473 height: 1,
471- fgColor: "brightWhite",
472- bgColor: "black",
473474 placeholder: Text("enter a name...", {
474- fgColor: "brightBlack",
475- bgColor: "black",
475+ fgColor: "color08",
476476 }),
477477 // Controlled focus: needed to gate arrow key routing above
478478 focused: nameInputFocused,
@@ -493,7 +493,7 @@ function createView() {
493493
494494 // Species picker — wrapping chips
495495 Text(""),
496- Text("Species:", { bold: true, fgColor: "white" }),
496+ Text("Species:", { bold: true }),
497497 HStack(
498498 { flexWrap: "wrap", gap: 1 },
499499 PETS.map((p, i) => {
@@ -508,8 +508,8 @@ function createView() {
508508 },
509509 [
510510 Text(sel ? ` ● ${p.kind} ` : ` ${p.kind} `, {
511- fgColor: sel ? "black" : "white",
512- bgColor: sel ? "cyan" : undefined,
511+ fgColor: sel ? "color00" : undefined,
512+ bgColor: sel ? "color06" : undefined,
513513 bold: sel,
514514 }),
515515 ],
@@ -517,42 +517,42 @@ function createView() {
517517 }),
518518 ),
519519 Text(" ↑/↓ to change", {
520- fgColor: "brightBlack",
520+ fgColor: "color08",
521521 italic: true,
522522 }),
523523
524524 // Preview (hidden when terminal is short)
525525 ...(showPreview
526526 ? [
527- Divider({ fgColor: "brightBlack" }),
527+ Divider({ fgColor: "color08" }),
528528 VStack(
529529 { alignItems: "center" },
530- previewArt.map((ln) => Text(ln, { fgColor: "yellow" })),
530+ previewArt.map((ln) => Text(ln, { fgColor: "color03" })),
531531 ),
532532 ]
533533 : []),
534534
535- Divider({ fgColor: "brightBlack" }),
535+ Divider({ fgColor: "color08" }),
536536
537537 // Create button — uncontrolled focus + focusStyle
538538 HStack({ justifyContent: "center" }, [
539539 Button(" Create Pet! ", {
540540 onClick: startGame,
541- fgColor: "green",
541+ fgColor: "color02",
542542 bold: true,
543- focusStyle: { bgColor: "green", fgColor: "black" },
543+ focusStyle: { bgColor: "color02", fgColor: "color00" },
544544 }),
545545 ]),
546546
547547 // Hints — wrapping for narrow terminals
548548 HStack({ justifyContent: "center", flexWrap: "wrap", gap: 1 }, [
549549 HStack({}, [
550- Text("Tab", { fgColor: "brightBlack", bold: true }),
551- Text(" navigate", { fgColor: "brightBlack" }),
550+ Text("Tab", { fgColor: "color08", bold: true }),
551+ Text(" navigate", { fgColor: "color08" }),
552552 ]),
553553 HStack({}, [
554- Text("Ctrl+Q", { fgColor: "brightBlack", bold: true }),
555- Text(" quit", { fgColor: "brightBlack" }),
554+ Text("Ctrl+Q", { fgColor: "color08", bold: true }),
555+ Text(" quit", { fgColor: "color08" }),
556556 ]),
557557 ]),
558558 ]),
@@ -582,15 +582,15 @@ function mainView() {
582582 ]),
583583 ]
584584 : [
585- Text(" Stats", { bold: true, fgColor: "brightBlack" }),
586- Divider({ char: "─", fgColor: "brightBlack" }),
585+ Text(" Stats", { bold: true, fgColor: "color08" }),
586+ Divider({ char: "─", fgColor: "color08" }),
587587 StatBar("Health", health, barColor(health)),
588588 StatBar("Food", 100 - hunger, barColor(hunger, true)),
589589 StatBar("Happy", happiness, barColor(happiness)),
590590 Spacer(),
591- Divider({ char: "─", fgColor: "brightBlack" }),
592- Text(" [F] Feed", { fgColor: "yellow", bold: true }),
593- Text(" [P] Pet", { fgColor: "magenta", bold: true }),
591+ Divider({ char: "─", fgColor: "color08" }),
592+ Text(" [F] Feed", { fgColor: "color03", bold: true }),
593+ Text(" [P] Pet", { fgColor: "color05", bold: true }),
594594 ]),
595595 ],
596596 );
@@ -606,15 +606,15 @@ function mainView() {
606606 HStack({ gap: 3 }, [
607607 Button(" Feed ", {
608608 onClick: feed,
609- fgColor: "yellow",
609+ fgColor: "color03",
610610 bold: true,
611- focusStyle: { bgColor: "yellow", fgColor: "black" },
611+ focusStyle: { bgColor: "color03", fgColor: "color00" },
612612 }),
613613 Button(" Pet ", {
614614 onClick: petIt,
615- fgColor: "magenta",
615+ fgColor: "color05",
616616 bold: true,
617- focusStyle: { bgColor: "magenta", fgColor: "black" },
617+ focusStyle: { bgColor: "color05", fgColor: "color00" },
618618 }),
619619 ]),
620620 ],
@@ -639,29 +639,33 @@ function mainView() {
639639 [
640640 // ── Header ──
641641 HStack({ padding: { x: 1 } }, [
642- Text(` ${petName} `, { bold: true, fgColor: "black", bgColor: "cyan" }),
643- Text(` the ${pet!.kind} `, { fgColor: "brightBlack" }),
642+ Text(` ${petName} `, {
643+ bold: true,
644+ fgColor: "color00",
645+ bgColor: "color06",
646+ }),
647+ Text(` the ${pet!.kind} `, { fgColor: "color08" }),
644648 Spacer(),
645- Text("[L]", { fgColor: "brightBlack", bold: true }),
646- Text("og ", { fgColor: "brightBlack" }),
647- Text("[Q]", { fgColor: "brightBlack", bold: true }),
648- Text("uit ", { fgColor: "brightBlack" }),
649+ Text("[L]", { fgColor: "color08", bold: true }),
650+ Text("og ", { fgColor: "color08" }),
651+ Text("[Q]", { fgColor: "color08", bold: true }),
652+ Text("uit ", { fgColor: "color08" }),
649653 ]),
650- Divider({ char: "═", fgColor: "brightBlack" }),
654+ Divider({ char: "═", fgColor: "color08" }),
651655
652656 // ── Body ──
653657 ...(narrow
654658 ? [
655659 // Narrow: stats bar on top, pet below
656660 statsPanel,
657- Divider({ char: "─", fgColor: "brightBlack" }),
661+ Divider({ char: "─", fgColor: "color08" }),
658662 petPane,
659663 ]
660664 : [
661665 // Wide: sidebar | pet side-by-side
662666 HStack({ flex: 1 }, [
663667 statsPanel,
664- VDivider({ fgColor: "brightBlack" }),
668+ VDivider({ fgColor: "color08" }),
665669 petPane,
666670 ]),
667671 ]),
@@ -694,24 +698,30 @@ function logView() {
694698 },
695699 [
696700 // Top border
697- HStack({ bgColor: "black" }, [
698- Text("╔", { fgColor: "brightBlack" }),
699- Text("═", { repeat: borderW, fgColor: "brightBlack" }),
700- Text("╗", { fgColor: "brightBlack" }),
701+ HStack({ bgColor: "color08", fgColor: "color07" }, [
702+ Text("╔"),
703+ Text("═", { repeat: borderW }),
704+ Text("╗"),
701705 ]),
702706
703707 VStack(
704- { width: modalW, height: modalH, padding: { x: 1 }, bgColor: "black" },
708+ {
709+ width: modalW,
710+ height: modalH,
711+ padding: { x: 1 },
712+ bgColor: "color08",
713+ fgColor: "color07",
714+ },
705715 [
706716 // Header row
707717 HStack({}, [
708- Text(" Activity Log ", { bold: true, fgColor: "cyan" }),
718+ Text(" Activity Log ", { bold: true, fgColor: "color06" }),
709719 VStack({ flex: 1 }, [Text(" ", { repeat: "fill" })]),
710720 HStack({ onClick: closeLog, focusable: false }, [
711- Text(" [x] ", { fgColor: "red", bold: true }),
721+ Text(" [x] ", { fgColor: "color01", bold: true }),
712722 ]),
713723 ]),
714- Text("─", { repeat: "fill", fgColor: "brightBlack" }),
724+ Text("─", { repeat: "fill", fgColor: "color00" }),
715725
716726 // Scrollable entries
717727 VStack(
@@ -729,46 +739,46 @@ function logView() {
729739 if (log.length === 0) {
730740 return [
731741 Text(" No activity yet.", {
732- fgColor: "brightBlack",
742+ fgColor: "color08",
733743 italic: true,
734744 }),
735745 ];
736746 }
737747 return log.map((entry) => {
738748 let fg:
739- | "yellow"
740- | "magenta"
741- | "red"
742- | "green"
743- | "white"
744- | "brightRed" = "white";
745- if (entry.includes("born")) fg = "green";
749+ | "color03"
750+ | "color05"
751+ | "color01"
752+ | "color02"
753+ | "color09"
754+ | undefined = undefined;
755+ if (entry.includes("born")) fg = "color02";
746756 else if (entry.includes("fed") || entry.includes("Feed"))
747- fg = "yellow";
757+ fg = "color03";
748758 else if (entry.includes("pet ") || entry.includes("Happy"))
749- fg = "magenta";
759+ fg = "color05";
750760 else if (entry.includes("hungry") || entry.includes("lonely"))
751- fg = "brightRed";
761+ fg = "color09";
752762 else if (entry.includes("passed") || entry.includes("well"))
753- fg = "red";
763+ fg = "color01";
754764 return Text(entry, { fgColor: fg });
755765 });
756766 })(),
757767 ),
758768
759- Text("─", { repeat: "fill", fgColor: "brightBlack" }),
769+ Text("─", { repeat: "fill", fgColor: "color00" }),
760770 Text(" Scroll: mouse wheel Close: [L] or Esc", {
761- fgColor: "brightBlack",
771+ fgColor: "color00",
762772 italic: true,
763773 }),
764774 ],
765775 ),
766776
767777 // Bottom border
768- HStack({ bgColor: "black" }, [
769- Text("╚", { fgColor: "brightBlack" }),
770- Text("═", { repeat: borderW, fgColor: "brightBlack" }),
771- Text("╝", { fgColor: "brightBlack" }),
778+ HStack({ bgColor: "color08", fgColor: "color07" }, [
779+ Text("╚"),
780+ Text("═", { repeat: borderW }),
781+ Text("╝"),
772782 ]),
773783 ],
774784 );
@@ -793,39 +803,39 @@ function deadView() {
793803 },
794804 [
795805 Spacer(),
796- Text("╔═══════════════════════╗", { fgColor: "brightBlack" }),
797- Text("║ ║", { fgColor: "brightBlack" }),
798- Text("║ R . I . P . ║", { fgColor: "red", bold: true }),
799- Text("║ ║", { fgColor: "brightBlack" }),
800- Text("╚═══════════════════════╝", { fgColor: "brightBlack" }),
806+ Text("╔═══════════════════════╗", { fgColor: "color08" }),
807+ Text("║ ║", { fgColor: "color08" }),
808+ Text("║ R . I . P . ║", { fgColor: "color01", bold: true }),
809+ Text("║ ║", { fgColor: "color08" }),
810+ Text("╚═══════════════════════╝", { fgColor: "color08" }),
801811 Text(""),
802- ...art.map((ln) => Text(ln, { fgColor: "brightBlack" })),
812+ ...art.map((ln) => Text(ln, { fgColor: "color08" })),
803813 Text(""),
804814 Text(`${petName} has crossed the rainbow bridge.`, {
805- fgColor: "brightBlack",
815+ fgColor: "color08",
806816 italic: true,
807817 }),
808818 Text(""),
809819 HStack({ gap: 3 }, [
810820 Button(" New Pet ", {
811821 onClick: restart,
812- fgColor: "green",
822+ fgColor: "color02",
813823 bold: true,
814- focusStyle: { bgColor: "green", fgColor: "black" },
824+ focusStyle: { bgColor: "color02", fgColor: "color00" },
815825 }),
816826 Button(" View Log ", {
817827 onClick: () => {
818828 showLog = !showLog;
819829 cel.render();
820830 },
821- fgColor: "cyan",
831+ fgColor: "color06",
822832 bold: true,
823- focusStyle: { bgColor: "cyan", fgColor: "black" },
833+ focusStyle: { bgColor: "color06", fgColor: "color00" },
824834 }),
825835 ]),
826836 HStack({}, [
827- Text("Ctrl+Q", { fgColor: "brightBlack", bold: true }),
828- Text(" quit", { fgColor: "brightBlack" }),
837+ Text("Ctrl+Q", { fgColor: "color08", bold: true }),
838+ Text(" quit", { fgColor: "color08" }),
829839 ]),
830840 Spacer(),
831841 ],
examples/select.ts+8−10
@@ -45,7 +45,6 @@ const fruitSelect = Select({
4545 selected = value;
4646 cel.render();
4747 },
48- focusStyle: { fgColor: "white" },
4948 });
5049
5150 cel.init(new ProcessTerminal());
@@ -54,7 +53,6 @@ cel.viewport(() =>
5453 {
5554 height: "100%",
5655 padding: { x: 2, y: 1 },
57- fgColor: "white",
5856 onKeyPress: (key) => {
5957 if (key === "ctrl+q") {
6058 cel.stop();
@@ -68,23 +66,23 @@ cel.viewport(() =>
6866 },
6967 },
7068 [
71- Text("Select Component Demo", { bold: true, fgColor: "cyan" }),
69+ Text("Select Component Demo", { bold: true, fgColor: "color06" }),
7270 Text("Tab to focus · type to filter · ↑↓ to navigate · Enter to select", {
73- fgColor: "brightBlack",
71+ fgColor: "color08",
7472 }),
75- Divider({ fgColor: "brightBlack" }),
73+ Divider({ fgColor: "color08" }),
7674 Text(""),
7775 fruitSelect(),
7876 Text(""),
79- Divider({ fgColor: "brightBlack" }),
77+ Divider({ fgColor: "color08" }),
8078 selected
8179 ? HStack({}, [
82- Text("Selected: ", { fgColor: "brightBlack" }),
83- Text(selected, { bold: true, fgColor: "green" }),
80+ Text("Selected: ", { fgColor: "color08" }),
81+ Text(selected, { bold: true, fgColor: "color02" }),
8482 ])
85- : Text("No selection yet", { fgColor: "brightBlack" }),
83+ : Text("No selection yet", { fgColor: "color08" }),
8684 Spacer(),
87- Text("Ctrl+R reset · Ctrl+Q quit", { fgColor: "brightBlack" }),
85+ Text("Ctrl+R reset · Ctrl+Q quit", { fgColor: "color08" }),
8886 ],
8987 ),
9088 );
examples/simple-scroll.ts+14−14
@@ -64,17 +64,17 @@ cel.viewport(() => {
6464 },
6565 },
6666 [
67- Text("┌─────────────────────────┐", { fgColor: "yellow" }),
68- Text("│ Terminal too small :( │", { fgColor: "yellow" }),
69- Text("│ │", { fgColor: "yellow" }),
70- Text("│ Please resize to at │", { fgColor: "yellow" }),
67+ Text("┌─────────────────────────┐", { fgColor: "color03" }),
68+ Text("│ Terminal too small :( │", { fgColor: "color03" }),
69+ Text("│ │", { fgColor: "color03" }),
70+ Text("│ Please resize to at │", { fgColor: "color03" }),
7171 Text(
7272 `│ least ${String(MIN_COLS).padStart(3)}×${String(MIN_ROWS).padStart(2)} chars. │`,
73- { fgColor: "yellow" },
73+ { fgColor: "color03" },
7474 ),
75- Text("│ │", { fgColor: "yellow" }),
76- Text("│ Ctrl+Q to quit │", { fgColor: "yellow" }),
77- Text("└─────────────────────────┘", { fgColor: "yellow" }),
75+ Text("│ │", { fgColor: "color03" }),
76+ Text("│ Ctrl+Q to quit │", { fgColor: "color03" }),
77+ Text("└─────────────────────────┘", { fgColor: "color03" }),
7878 ],
7979 );
8080 }
@@ -88,26 +88,26 @@ cel.viewport(() => {
8888 },
8989 [
9090 HStack({ padding: { x: 1 } }, [
91- Text("Scroll Test", { bold: true, fgColor: "cyan" }),
91+ Text("Scroll Test", { bold: true, fgColor: "color06" }),
9292 Spacer(),
93- Text("uncontrolled", { fgColor: "brightBlack" }),
93+ Text("uncontrolled", { fgColor: "color08" }),
9494 ]),
95- Divider({ fgColor: "brightBlack" }),
95+ Divider({ fgColor: "color08" }),
9696
9797 VStack(
9898 { flex: 1, overflow: "scroll", scrollbar: true },
9999 items.map((item, i) =>
100100 HStack({ padding: { x: 1 } }, [
101- Text(`${String(i + 1).padStart(3)}.`, { fgColor: "yellow" }),
101+ Text(`${String(i + 1).padStart(3)}.`, { fgColor: "color03" }),
102102 Text(` ${item}`),
103103 ]),
104104 ),
105105 ),
106106
107- Divider({ fgColor: "brightBlack" }),
107+ Divider({ fgColor: "color08" }),
108108 HStack({ padding: { x: 1 } }, [
109109 Text("Mouse wheel to scroll · Ctrl+Q quit", {
110- fgColor: "brightBlack",
110+ fgColor: "color08",
111111 }),
112112 ]),
113113 ],
examples/tags.ts+48−49
@@ -18,34 +18,34 @@ import { Button, Divider, Spacer } from "@cel-tui/components";
1818
1919 interface Tag {
2020 label: string;
21- color: "cyan" | "magenta" | "yellow" | "green" | "blue" | "red";
21+ color: "color06" | "color05" | "color03" | "color02" | "color04" | "color01";
2222 }
2323
2424 const TAGS: Tag[] = [
25- { label: "TypeScript", color: "blue" },
26- { label: "Rust", color: "red" },
27- { label: "Go", color: "cyan" },
28- { label: "Python", color: "yellow" },
29- { label: "JavaScript", color: "yellow" },
30- { label: "C++", color: "blue" },
31- { label: "Zig", color: "magenta" },
32- { label: "Haskell", color: "magenta" },
33- { label: "Elixir", color: "magenta" },
34- { label: "Ruby", color: "red" },
35- { label: "Kotlin", color: "green" },
36- { label: "Swift", color: "red" },
37- { label: "Lua", color: "blue" },
38- { label: "OCaml", color: "yellow" },
39- { label: "Clojure", color: "green" },
40- { label: "Scala", color: "red" },
41- { label: "Nim", color: "yellow" },
42- { label: "Julia", color: "green" },
43- { label: "Erlang", color: "red" },
44- { label: "Dart", color: "cyan" },
45- { label: "C#", color: "green" },
46- { label: "F#", color: "cyan" },
47- { label: "Gleam", color: "magenta" },
48- { label: "Odin", color: "blue" },
25+ { label: "TypeScript", color: "color04" },
26+ { label: "Rust", color: "color01" },
27+ { label: "Go", color: "color06" },
28+ { label: "Python", color: "color03" },
29+ { label: "JavaScript", color: "color03" },
30+ { label: "C++", color: "color04" },
31+ { label: "Zig", color: "color05" },
32+ { label: "Haskell", color: "color05" },
33+ { label: "Elixir", color: "color05" },
34+ { label: "Ruby", color: "color01" },
35+ { label: "Kotlin", color: "color02" },
36+ { label: "Swift", color: "color01" },
37+ { label: "Lua", color: "color04" },
38+ { label: "OCaml", color: "color03" },
39+ { label: "Clojure", color: "color02" },
40+ { label: "Scala", color: "color01" },
41+ { label: "Nim", color: "color03" },
42+ { label: "Julia", color: "color02" },
43+ { label: "Erlang", color: "color01" },
44+ { label: "Dart", color: "color06" },
45+ { label: "C#", color: "color02" },
46+ { label: "F#", color: "color06" },
47+ { label: "Gleam", color: "color05" },
48+ { label: "Odin", color: "color04" },
4949 ];
5050
5151 // ─── State ──────────────────────────────────────────────────────
@@ -75,11 +75,11 @@ function tagChip(tag: Tag) {
7575 const check = on ? "✓ " : " ";
7676 return Button(` ${check}${tag.label} `, {
7777 onClick: () => toggle(tag.label),
78- fgColor: on ? "black" : tag.color,
78+ fgColor: on ? "color00" : tag.color,
7979 bgColor: on ? tag.color : undefined,
8080 bold: on,
8181 focusStyle: {
82- fgColor: "black",
82+ fgColor: "color00",
8383 bgColor: tag.color,
8484 bold: true,
8585 },
@@ -96,7 +96,6 @@ cel.viewport(() => {
9696 {
9797 height: "100%",
9898 padding: { x: 2, y: 1 },
99- fgColor: "white",
10099 onKeyPress: (key) => {
101100 if (key === "ctrl+q" || key === "ctrl+c") quit();
102101 if (key === "ctrl+r") clearAll();
@@ -105,17 +104,17 @@ cel.viewport(() => {
105104 [
106105 // Header
107106 HStack({ gap: 1 }, [
108- Text("◆", { fgColor: "cyan", bold: true }),
109- Text("Pick your languages", { bold: true, fgColor: "white" }),
107+ Text("◆", { fgColor: "color06", bold: true }),
108+ Text("Pick your languages", { bold: true }),
110109 Text(`(${selected.size}/${TAGS.length})`, {
111- fgColor: "brightBlack",
110+ fgColor: "color08",
Cut short: this commit's diff is over 1000 lines.
packages/components/src/button.ts+3−3
Cut short: this commit's diff is over 1000 lines.
packages/components/src/divider.ts+1−1
Cut short: this commit's diff is over 1000 lines.
packages/components/src/markdown.test.ts+20−20
Cut short: this commit's diff is over 1000 lines.
packages/components/src/markdown.ts+10−10
Cut short: this commit's diff is over 1000 lines.
packages/components/src/select.test.ts+4−4
Cut short: this commit's diff is over 1000 lines.
packages/components/src/select.ts+6−8
Cut short: this commit's diff is over 1000 lines.
packages/components/src/vdivider.ts+2−2
Cut short: this commit's diff is over 1000 lines.
packages/core/src/cel.test.ts+21−21
Cut short: this commit's diff is over 1000 lines.
packages/core/src/cel.ts+10−5
Cut short: this commit's diff is over 1000 lines.
packages/core/src/cell-buffer.test.ts+7−7
Cut short: this commit's diff is over 1000 lines.
packages/core/src/emitter.test.ts+102−10
Cut short: this commit's diff is over 1000 lines.
packages/core/src/emitter.ts+78−49
Cut short: this commit's diff is over 1000 lines.
packages/core/src/index.ts+3−1
Cut short: this commit's diff is over 1000 lines.
packages/core/src/paint.test.ts+69−69
Cut short: this commit's diff is over 1000 lines.
packages/core/src/paint.ts+4−4
Cut short: this commit's diff is over 1000 lines.
packages/core/src/primitives/stacks.ts+1−1
Cut short: this commit's diff is over 1000 lines.
packages/core/src/primitives/text-input.ts+1−1
Cut short: this commit's diff is over 1000 lines.
packages/core/src/primitives/text.ts+1−1
Cut short: this commit's diff is over 1000 lines.
packages/core/src/text-input.test.ts+1−1
Cut short: this commit's diff is over 1000 lines.
packages/types/src/index.ts+57−21
Cut short: this commit's diff is over 1000 lines.
spec.md+77−30
Cut short: this commit's diff is over 1000 lines.