xonecas.io
70160
Ce

cel-tui / commit 7a13002

Merge branch 'main' into gh-pages

xonecas2026-04-05 7a13002be0f32f691a11f759a0697d7adbbfd9b6 parent 086b9f8parent 5ee3d01

42 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+7−7
@@ -36,11 +36,11 @@ Dependency chain: `components → core → types`
3636
3737 All core systems from the spec are implemented and tested:
3838
39-- **Layout engine** — flexbox sizing (fixed, intrinsic, flex, percentage), constraints, gap, padding, justifyContent, alignItems, largest-remainder rounding
39+- **Layout engine** — flexbox sizing (fixed, intrinsic, flex, percentage), constraints (including cross-axis min/max), gap, padding, justifyContent, alignItems, flexWrap, largest-remainder rounding
4040 - **Rendering** — cell buffer, ANSI emitter with SGR styling, synchronized output (CSI 2026), differential rendering (emitDiff), full clear on resize
4141 - **Painting** — grapheme-aware text rendering (CJK/emoji via visibleWidth), overflow clipping via clip rect propagation, scroll content offsetting, scrollbar indicators, container bgColor fill, style inheritance, focusStyle overrides
4242 - **Input** — Kitty keyboard protocol (level 1, required), key parsing/normalization for CSI u / CSI letter / CSI tilde formats, SGR mouse events (with batched event support), hit detection, click/scroll routing, focus traversal (Tab/Shift+Tab/Escape/Enter) with uncontrolled and controlled modes, onKeyPress bubbling from focused element through ancestors
43-- **TextInput** — text editing, cursor movement, cursor persistence across re-renders (keyed on onChange), auto-scroll to keep cursor visible, placeholder rendering
43+- **TextInput** — grapheme-aware text editing (Intl.Segmenter for emoji/ZWJ), cursor movement, cursor persistence across re-renders (keyed on onChange, clamped on external value changes), auto-scroll to keep cursor visible, inverted-cell cursor with native terminal cursor positioning (blinking), background fill, placeholder rendering
4444 - **Layering** — multi-layer compositing, transparency, topmost-layer input priority
4545 - **Terminal** — Kitty keyboard protocol enable/disable, crash cleanup (SIGINT/SIGTERM/uncaughtException), resize clear
4646
@@ -203,13 +203,13 @@ 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.
208-- `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.
208+- `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 (with cursor screen position export for native cursor), TextInput background fill, container bgColor fill, style inheritance threading, focusStyle resolution.
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.
212-- `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.
212+- `text-edit.ts` — Pure text editing functions (`insertChar`, `deleteBackward`, `deleteForward`, `moveCursor`). Operates on `EditState` (value + cursor position). Uses `Intl.Segmenter` with grapheme granularity for cursor movement and deletion (handles emoji, ZWJ sequences, combining marks). Used by `cel.ts` to handle TextInput key events.
213213 - `width.ts` — `visibleWidth(str)` measures terminal column width. Fast ASCII path, grapheme segmentation, East Asian width, ANSI stripping, LRU cache.
214214 - `terminal.ts` — `ProcessTerminal` (real I/O, raw mode, Kitty keyboard protocol level 1, SGR mouse, crash cleanup) and `MockTerminal` (testing).
215215
@@ -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+8−8
@@ -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,16 +64,17 @@ 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
7171 ## Packages
7272
73-| Package | Description |
74-| --------------------- | ----------------------------------------------------- |
75-| `@cel-tui/types` | Shared type definitions |
76-| `@cel-tui/core` | Framework engine and primitives |
77-| `@cel-tui/components` | Pre-made components (Button, Spacer, Divider, Select) |
73+| Package | Description |
74+| --------------------- | ------------------------------------------------------------------------- |
75+| `@cel-tui/types` | Shared type definitions |
76+| `@cel-tui/core` | Framework engine and primitives |
77+| `@cel-tui/components` | Pre-made components (Button, Spacer, Divider, VDivider, Select, Markdown) |
7878
7979 ## Documentation
8080
TODO.md+12−4
@@ -12,10 +12,6 @@ Remaining work, known bugs, and planned improvements.
1212
1313 ## Bugs / Spec Violations
1414
15-- 🔧 **TextInput cursor movement doesn't handle multi-codepoint graphemes** — `deleteBackward`/`deleteForward` in `text-edit.ts` operate on single string indices. For multi-codepoint characters (emoji ZWJ sequences, combining marks), this leaves the cursor mid-grapheme. `moveCursor` has the same issue.
16-
17-- 🔧 **Controlled-focus TextInput traps Tab traversal** — When a controlled-focus TextInput (`focused` prop provided) is the first focusable element, Tab from unfocused state always focuses it. Once focused, Tab is consumed as an editing key. Escape unfocuses it, but the next Tab re-focuses it again — the user can never Tab past it to reach subsequent focusable elements. Visible in `examples/pet.ts` on the create screen: the name TextInput prevents keyboard access to the Create Pet button. …
18-
1915 - 🔧 **Scrollbar thumb position ignores padding** — `paintScrollbar` in `paint.ts` computes `maxOffset = contentHeight - rect.height` without accounting for container padding, while the scroll clamping logic uses `contentHeight + padY - rect.height`. For padded scrollable containers the thumb position is slightly off.
2016
2117 - 🔧 **Duplicate max scroll offset calculation** — `getMaxScrollOffset` in `cel.ts` and `computeMaxScrollOffset` in `paint.ts` implement the same logic. Should be extracted to a shared function.
@@ -36,8 +32,20 @@ Remaining work, known bugs, and planned improvements.
3632
3733 - ❌ **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.
3834
35+## Toolchain
36+
37+- 🔧 **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 …
38+
3939 ## Future Enhancements
4040
41+- 💡 **Cursor style/shape customization** — TextInput currently renders the cursor as an inverted cell (block cursor). There's no way to choose bar (`│` between characters), underline, or custom cursor characters. A `cursorStyle` prop on TextInput (`"block" | "bar" | "underline"`) would cover the common cases. The native terminal cursor shape could also be set via DECSCUSR (`CSI q`) sequences to match.
42+
43+- 💡 **Scrollbar styling** — Scrollbar characters (`┃`/`│` vertical, `━`/`─` horizontal) and colors are hardcoded in `paintScrollbar`. A `scrollbarStyle` prop on containers (or a global theme option) would allow customizing thumb/track characters and colors. Currently the only two visual elements the framework doesn't support styling.
44+
45+- 💡 **Textarea component** (`packages/components`) — A higher-level wrapper around TextInput that handles the autogrowing pattern out of the box. Props like `maxLines`, `minLines`, `submitKey`, and `placeholder` would cover the common chat-input / form-field use case without requiring the `HStack + flex + maxHeight` boilerplate. Could also include optional line-count display and character limit.
46+
47+- 💡 **Editor component** (`packages/components`) — A TextInput with a line-number gutter, built as a component. Would compose an HStack with a fixed-width line-number column (styled, right-aligned) alongside a flex TextInput, keeping scroll synchronized. Useful for code/config editing use cases like the markdown editor example.
48+
4149 - 💡 Additional example apps (text editor from spec reference example)
4250 - 💡 `overflow: "hidden"` as explicit prop (currently all containers clip by default, which matches the spec's default behavior, but the prop value is not checked)
4351 - 💡 Higher Kitty protocol levels — key-release events (level 2), associated text (level 3), and full event types (level 4) for advanced input patterns (games, physical key layout awareness)
docs/skill/cel-tui/SKILL.md+19−15
@@ -5,7 +5,7 @@ license: MIT
55 compatibility: Requires Bun runtime and a terminal with SGR mouse mode support.
66 metadata:
77 author: sacenox
8- version: "0.1.0"
8+ version: "0.2.0"
99 ---
1010
1111 # Building TUIs with cel-tui
@@ -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`, `flexWrap`), 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. Custom themes can remap slots to true color via `cel.init(terminal, { theme })`.
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 ```
@@ -111,7 +113,7 @@ VStack(
111113 overflow: "scroll",
112114 scrollbar: true,
113115 scrollOffset: offset,
114- onScroll: (newOffset) => {
116+ onScroll: (newOffset, maxOffset) => {
115117 offset = newOffset;
116118 cel.render();
117119 },
@@ -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,12 +219,13 @@ 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.
223227 - **Kitty keyboard protocol required** — the framework requires the Kitty keyboard protocol (level 1). All modifier combos (`alt+x`, `ctrl+plus`, `shift+enter`) are fully supported. The terminal must support this protocol (Kitty, WezTerm, Ghostty, foot, Alacritty, Windows Terminal). macOS Terminal.app and older xterm are not supported.
224-- **Button limitations** — `Button` from `@cel-tui/components` does not forward `focusStyle`, container sizing, or all style props. Use `HStack` + `Text` directly when you need full control.
228+- **Button limitations** — `Button` from `@cel-tui/components` does not forward container sizing props (`width`, `height`, `flex`, `minWidth`, etc.). It supports styling (`fgColor`, `bgColor`, `bold`, etc.), `focusStyle`, `focused`, `onFocus`, `onBlur`, `onKeyPress`, and `padding`. For full layout control, use `HStack` + `Text` directly.
225229
226230 ## Composing Components
227231
docs/skill/cel-tui/references/api.md+87−11
@@ -18,11 +18,12 @@ All props accepted by `VStack` and `HStack`:
1818 overflow, // "hidden" (default) | "scroll"
1919 scrollbar, // boolean
2020 scrollOffset, // number (controlled scroll)
21- onScroll, // (offset: number) => void
21+ onScroll, // (offset: number, maxOffset: number) => void
22+ flexWrap, // "nowrap" (default) | "wrap" (HStack only)
2223
2324 // Styling (inherited by descendants)
2425 bold, italic, underline,// boolean
25- fgColor, bgColor, // Color (ANSI 16)
26+ fgColor, bgColor, // Color ("color00"–"color15")
2627 focusStyle, // StyleProps — overrides when focused
2728
2829 // Interaction
@@ -49,7 +50,7 @@ VStack(
4950 overflow: "scroll",
5051 scrollbar: true,
5152 scrollOffset: offset,
52- onScroll: (newOffset) => {
53+ onScroll: (newOffset, maxOffset) => {
5354 offset = newOffset;
5455 cel.render();
5556 },
@@ -60,7 +61,7 @@ VStack(
6061
6162 - Scroll direction follows the container’s main axis: VStack → vertical, HStack → horizontal.
6263 - Scroll is pointer-driven (mouse wheel), not focus-driven. A user can type in a focused widget while scrolling a different container.
63-- In controlled mode, the UI only moves when the app passes the updated `scrollOffset` back. `onScroll` fires with the clamped new offset.
64+- In controlled mode, the UI only moves when the app passes the updated `scrollOffset` back. `onScroll` fires with the clamped new offset and the maximum offset (content size minus viewport size). Pass `Infinity` as `scrollOffset` to mean "scroll to end" (clamped during rendering).
6465
6566 ## Text Props
6667
@@ -72,11 +73,11 @@ Text("content", {
7273 italic,
7374 underline, // boolean
7475 fgColor,
75- bgColor, // ANSI 16 Color
76+ bgColor, // Color ("color00"–"color15")
7677 });
7778 ```
7879
79-Colors: `"black"`, `"red"`, `"green"`, `"yellow"`, `"blue"`, `"magenta"`, `"cyan"`, `"white"`, and bright variants (`"brightRed"`, etc.).
80+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.
8081
8182 ## TextInput Props
8283
@@ -119,17 +120,18 @@ import { Spacer, Divider, Button, Select } from "@cel-tui/components";
119120
120121 Spacer(); // VStack({ flex: 1 }, [])
121122 Divider(); // Text("─", { repeat: "fill" })
122-Divider({ char: "═", fgColor: "brightBlack" });
123+Divider({ char: "═", fgColor: "color08" });
123124 Button("[OK]", { onClick: handleOk });
124125 Button("✕", { onClick: handleClose, focusable: false });
125-// Button accepts: onClick, bold, fgColor, bgColor, focusable
126-// Note: Button does not forward focusStyle or container sizing props.
127-// For full control, use HStack + Text directly.
126+// Button accepts: onClick, focusable, focused, onFocus, onBlur, focusStyle,
127+// onKeyPress, padding, bold, fgColor, bgColor, italic, underline.
128+// Note: Button does not forward container sizing props (width, height, flex).
129+// For full layout control, use HStack + Text directly.
128130 ```
129131
130132 ### Select (filterable list)
131133
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`.
134+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`.
133135
134136 ```ts
135137 const mySelect = Select({
@@ -180,3 +182,77 @@ const modelSelect = Select({
180182 },
181183 });
182184 ```
185+
186+### VDivider (vertical divider)
187+
188+```ts
189+import { VDivider } from "@cel-tui/components";
190+
191+// Separate columns in an HStack
192+HStack({ height: "100%" }, [
193+ VStack({ flex: 1 }, [Text("left pane")]),
194+ VDivider({ fgColor: "color08" }),
195+ VStack({ flex: 1 }, [Text("right pane")]),
196+]);
197+
198+// Custom character
199+VDivider({ char: "║", fgColor: "color08" });
200+```
201+
202+### Markdown (rendered markdown)
203+
204+Returns an array of nodes — spread into a container's children:
205+
206+````ts
207+import { Markdown } from "@cel-tui/components";
208+
209+VStack(
210+ { flex: 1, overflow: "scroll", padding: { x: 1 } },
211+ Markdown("# Hello\n\nSome **bold** text.\n\n```js\nconst x = 1;\n```"),
212+);
213+````
214+
215+Custom theme for markdown styling:
216+
217+```ts
218+Markdown(content, {
219+ theme: {
220+ heading1: { bold: true, fgColor: "color05" },
221+ codeBlock: { bgColor: "color08" },
222+ bold: { bold: true, fgColor: "color03" },
223+ },
224+});
225+```
226+
227+Streaming works naturally — append chunks and call `cel.render()`. Unclosed blocks are handled gracefully.
228+
229+## Theme
230+
231+The default theme maps 16 color slots to ANSI palette indices. Custom themes remap to 256-color or 24-bit hex:
232+
233+```ts
234+import { cel, ProcessTerminal, type Theme } from "@cel-tui/core";
235+
236+const mocha: Theme = {
237+ color00: "#1e1e2e",
238+ color01: "#f38ba8",
239+ color02: "#a6e3a1",
240+ color03: "#f9e2af",
241+ color04: "#89b4fa",
242+ color05: "#cba6f7",
243+ color06: "#94e2d5",
244+ color07: "#cdd6f4",
245+ color08: "#45475a",
246+ color09: "#f38ba8",
247+ color10: "#a6e3a1",
248+ color11: "#f9e2af",
249+ color12: "#89b4fa",
250+ color13: "#cba6f7",
251+ color14: "#94e2d5",
252+ color15: "#bac2de",
253+};
254+
255+cel.init(new ProcessTerminal(), { theme: mocha });
256+```
257+
258+App code uses `"color00"`–`"color15"` regardless of theme. The mapping is a rendering concern.
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/markdown-editor.ts+411−0
@@ -0,0 +1,411 @@
1+/**
2+ * cel-tui: Live Markdown Editor
3+ *
4+ * A split-pane markdown editor with live preview, showcasing:
5+ * - Custom color theme (Catppuccin Mocha via true color)
6+ * - Large multi-line TextInput with ctrl+enter submit
7+ * - Live Markdown rendering (source ↔ preview)
8+ * - Split-pane layout with VDivider
9+ * - Scrollable preview pane
10+ * - Focus management between editor and UI
11+ *
12+ * Run: bun run examples/markdown-editor.ts
13+ */
14+
15+import {
16+ cel,
17+ VStack,
18+ HStack,
19+ Text,
20+ TextInput,
21+ ProcessTerminal,
22+ type Theme,
23+} from "@cel-tui/core";
24+import {
25+ Divider,
26+ Spacer,
27+ VDivider,
28+ Markdown,
29+ type MarkdownTheme,
30+} from "@cel-tui/components";
31+
32+// ─── Theme: Catppuccin Mocha ────────────────────────────────────
33+
34+const mocha: Theme = {
35+ color00: "#1e1e2e", // base (dark bg)
36+ color01: "#f38ba8", // red
37+ color02: "#a6e3a1", // green
38+ color03: "#f9e2af", // yellow
39+ color04: "#89b4fa", // blue
40+ color05: "#cba6f7", // mauve
41+ color06: "#94e2d5", // teal
42+ color07: "#cdd6f4", // text
43+ color08: "#45475a", // surface1 (muted)
44+ color09: "#f38ba8", // bright red
45+ color10: "#a6e3a1", // bright green
46+ color11: "#f9e2af", // bright yellow
47+ color12: "#89b4fa", // bright blue
48+ color13: "#cba6f7", // bright mauve
49+ color14: "#94e2d5", // bright teal
50+ color15: "#bac2de", // subtext1
51+};
52+
53+const mdTheme: MarkdownTheme = {
54+ heading1: { bold: true, fgColor: "color05" },
55+ heading2: { bold: true, fgColor: "color04" },
56+ heading3: { bold: true, fgColor: "color06" },
57+ codeBlock: { bgColor: "color08", fgColor: "color07" },
58+ codeContent: { fgColor: "color07" },
59+ listMarker: { fgColor: "color05", bold: true },
60+ blockquoteBar: { fgColor: "color06" },
61+ blockquoteText: { italic: true, fgColor: "color15" },
62+ hr: { fgColor: "color08" },
63+ bold: { bold: true, fgColor: "color03" },
64+ italic: { italic: true },
65+ inlineCode: { fgColor: "color02" },
66+ link: { fgColor: "color04", underline: true },
67+};
68+
69+// ─── Sample Documents ───────────────────────────────────────────
70+
71+const DOCUMENTS: { name: string; content: string }[] = [
72+ {
73+ name: "README.md",
74+ content: `# Project Aurora
75+
76+A next-generation toolkit for building **terminal user interfaces** with style.
77+
78+## Features
79+
80+- **Declarative API** — describe your UI as a tree of components
81+- **Flexbox layout** — stack, align, and distribute with familiar primitives
82+- **True color themes** — go beyond the ANSI 16 palette
83+- **Reactive rendering** — only re-render what changed
84+
85+## Getting Started
86+
87+Install the package:
88+
89+\`\`\`bash
90+bun add @cel-tui/core @cel-tui/components
91+\`\`\`
92+
93+Create your first app:
94+
95+\`\`\`ts
96+import { cel, VStack, Text, ProcessTerminal } from "@cel-tui/core";
97+
98+cel.init(new ProcessTerminal());
99+cel.viewport(() =>
100+ VStack({ height: "100%" }, [
101+ Text("Hello, world!", { bold: true }),
102+ ])
103+);
104+\`\`\`
105+
106+## Architecture
107+
108+The framework is built around **four primitives**:
109+
110+1. **VStack** — vertical layout container
111+2. **HStack** — horizontal layout container
112+3. **Text** — styled text leaf node
113+4. **TextInput** — editable text container
114+
115+> All state is external. The framework just renders whatever tree you return.
116+
117+---
118+
119+*Built with love for the terminal.*`,
120+ },
121+ {
122+ name: "CHANGELOG.md",
123+ content: `# Changelog
124+
125+All notable changes to this project will be documented in this file.
126+
127+## [0.3.0] — 2026-04-05
128+
129+### Added
130+
131+- **True color theme support** — custom themes can now map color slots to 24-bit hex values
132+- **Autogrowing TextInput** — \`maxHeight\` constraint works on the cross axis
133+- **Native blinking cursor** — terminal cursor positioned at the focused TextInput
134+
135+### Fixed
136+
137+- Cursor position preserved correctly when value is cleared externally
138+- Grapheme-aware editing — emoji and ZWJ sequences treated as single units
139+
140+### Changed
141+
142+- \`text-edit.ts\` now uses \`Intl.Segmenter\` for all cursor movement
143+
144+---
145+
146+## [0.2.0] — 2026-03-15
147+
148+### Added
149+
150+- **Markdown component** with streaming support
151+- **flexWrap** for HStack — children wrap to next row when they exceed width
152+- **Select component** with fuzzy filtering
153+
154+### Fixed
155+
156+- Scroll offset clamping for \`Infinity\` (sticky-bottom pattern)
157+
158+> See the full history on [GitHub](https://github.com/example/aurora).
159+
160+---
161+
162+## [0.1.0] — 2026-02-01
163+
164+### Added
165+
166+- Initial release
167+- VStack, HStack, Text, TextInput primitives
168+- Flexbox layout engine
169+- Cell buffer rendering with differential updates
170+- Kitty keyboard protocol support
171+
172+*First public release — here we go!*`,
173+ },
174+ {
175+ name: "DESIGN.md",
176+ content: `# Design Notes
177+
178+## Color Philosophy
179+
180+The framework uses **16 numbered color slots** (\`color00\`–\`color15\`) rather than named colors like "red" or "white". This is intentional:
181+
182+> Named colors are deceptive. "white" on a dark theme is bright, but on a light theme it's the background color. Numbered slots make the abstraction explicit.
183+
184+### Slot Conventions
185+
186+| Range | Purpose |
187+|-------|---------|
188+| \`color00\`–\`color07\` | Base palette (dark to light) |
189+| \`color08\`–\`color15\` | Bright variants |
190+
191+### Theme Example
192+
193+A **Catppuccin Mocha** theme maps slots to true color:
194+
195+\`\`\`ts
196+const mocha: Theme = {
197+ color00: "#1e1e2e", // base
198+ color01: "#f38ba8", // red
199+ color02: "#a6e3a1", // green
200+ // ...
201+};
202+\`\`\`
203+
204+## Layout Model
205+
206+The layout engine is inspired by **CSS Flexbox** but simplified for terminal constraints:
207+
208+- All coordinates are integer cells (no subpixel)
209+- The **Largest Remainder Method** distributes fractional space fairly
210+- **Intrinsic sizing** measures content before flex distribution
211+
212+### Key Differences from CSS
213+
214+1. No \`flex-shrink\` — children never shrink below intrinsic size
215+2. No \`flex-basis\` — use \`width\`/\`height\` or \`minWidth\`/\`minHeight\`
216+3. **Gap** is cell-based, not relative
217+4. **Percentage** sizes resolve against the parent, not the viewport
218+
219+---
220+
221+*These notes are living documentation — they evolve with the codebase.*`,
222+ },
223+];
224+
225+// ─── State ──────────────────────────────────────────────────────
226+
227+let activeDocIndex = 0;
228+let editorFocused = true;
229+let source = DOCUMENTS[0]!.content;
230+let previewScroll = 0;
231+let previewStickToBottom = false;
232+
233+// ─── Helpers ────────────────────────────────────────────────────
234+
235+function activeDoc() {
236+ return DOCUMENTS[activeDocIndex]!;
237+}
238+
239+function switchDoc(index: number) {
240+ // Save current edits
241+ DOCUMENTS[activeDocIndex]!.content = source;
242+ activeDocIndex = index;
243+ source = DOCUMENTS[index]!.content;
244+ previewScroll = 0;
245+ previewStickToBottom = false;
246+ cel.render();
247+}
248+
249+function handleChange(value: string) {
250+ source = value;
251+ cel.render();
252+}
253+
254+function quit() {
255+ cel.stop();
256+ process.exit(0);
257+}
258+
259+// ─── UI ─────────────────────────────────────────────────────────
260+
261+cel.init(new ProcessTerminal(), { theme: mocha });
262+
263+cel.viewport(() =>
264+ VStack(
265+ {
266+ height: "100%",
267+ bgColor: "color00",
268+ fgColor: "color07",
269+ onKeyPress: (key) => {
270+ if (key === "ctrl+q" || key === "ctrl+c") quit();
271+ if (key === "ctrl+n") {
272+ switchDoc((activeDocIndex + 1) % DOCUMENTS.length);
273+ return;
274+ }
275+ if (key === "ctrl+p") {
276+ switchDoc((activeDocIndex - 1 + DOCUMENTS.length) % DOCUMENTS.length);
277+ return;
278+ }
279+ return false;
280+ },
281+ },
282+ [
283+ // ── Title bar ──
284+ HStack(
285+ {
286+ height: 1,
287+ padding: { x: 1 },
288+ bgColor: "color05",
289+ fgColor: "color00",
290+ },
291+ [
292+ Text(" ✎ Markdown Editor ", { bold: true }),
293+ Spacer(),
294+ Text(activeDoc().name, { italic: true }),
295+ ],
296+ ),
297+
298+ // ── Tab bar ──
299+ HStack({ height: 1, bgColor: "color08", fgColor: "color07" }, [
300+ ...DOCUMENTS.map((doc, i) => {
301+ const isActive = i === activeDocIndex;
302+ return HStack(
303+ {
304+ onClick: () => switchDoc(i),
305+ focusable: false,
306+ bgColor: isActive ? "color00" : "color08",
307+ fgColor: isActive ? "color07" : "color15",
308+ padding: { x: 1 },
309+ },
310+ [Text(doc.name, isActive ? { bold: true } : {})],
311+ );
312+ }),
313+ Spacer(),
314+ Text(" ctrl+n/p: switch ", { fgColor: "color15" }),
315+ ]),
316+
317+ // ── Main content: split pane ──
318+ HStack({ flex: 1 }, [
319+ // Left: source editor
320+ VStack({ flex: 1 }, [
321+ HStack(
322+ {
323+ height: 1,
324+ padding: { x: 1 },
325+ bgColor: "color08",
326+ fgColor: "color06",
327+ },
328+ [
329+ Text("SOURCE", { bold: true }),
330+ Spacer(),
331+ Text(`${source.split("\n").length} lines`, {
332+ fgColor: "color15",
333+ }),
334+ ],
335+ ),
336+ TextInput({
337+ flex: 1,
338+ value: source,
339+ onChange: handleChange,
340+ padding: { x: 1 },
341+ focused: editorFocused,
342+ onFocus: () => {
343+ editorFocused = true;
344+ cel.render();
345+ },
346+ onBlur: () => {
347+ editorFocused = false;
348+ cel.render();
349+ },
350+ bgColor: "color00",
351+ fgColor: "color07",
352+ focusStyle: { bgColor: "color00" },
353+ }),
354+ ]),
355+
356+ // Divider
357+ VDivider({ fgColor: "color08" }),
358+
359+ // Right: live preview
360+ VStack({ flex: 1 }, [
361+ HStack(
362+ {
363+ height: 1,
364+ padding: { x: 1 },
365+ bgColor: "color08",
366+ fgColor: "color05",
367+ },
368+ [Text("PREVIEW", { bold: true }), Spacer(), Text("live")],
369+ ),
370+ VStack(
371+ {
372+ flex: 1,
373+ overflow: "scroll",
374+ scrollbar: true,
375+ padding: { x: 1, y: 1 },
376+ scrollOffset: previewStickToBottom ? Infinity : previewScroll,
377+ onScroll: (offset, maxOffset) => {
378+ previewScroll = offset;
379+ previewStickToBottom = offset >= maxOffset;
380+ cel.render();
381+ },
382+ },
383+ Markdown(source, { theme: mdTheme }),
384+ ),
385+ ]),
386+ ]),
387+
388+ // ── Status bar ──
389+ HStack(
390+ {
391+ height: 1,
392+ padding: { x: 1 },
393+ bgColor: "color08",
394+ fgColor: "color15",
395+ },
396+ [
397+ Text(editorFocused ? " EDIT " : " VIEW ", {
398+ bgColor: editorFocused ? "color02" : "color04",
399+ fgColor: "color00",
400+ bold: true,
401+ }),
402+ Text(` ${activeDoc().name} `, { fgColor: "color07" }),
403+ Text(`${source.length} chars`, { fgColor: "color15" }),
404+ Spacer(),
405+ Text("esc: blur ", { fgColor: "color15" }),
406+ Text("ctrl+q: quit", { fgColor: "color15" }),
407+ ],
408+ ),
409+ ],
410+ ),
411+);
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" {
Cut short: this commit's diff is over 1000 lines.
examples/select.ts+8−10
Cut short: this commit's diff is over 1000 lines.
examples/simple-scroll.ts+14−14
Cut short: this commit's diff is over 1000 lines.
examples/tags.ts+48−49
Cut short: this commit's diff is over 1000 lines.
packages/components/package.json+3−2
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/index.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/package.json+1−1
Cut short: this commit's diff is over 1000 lines.
packages/core/src/cel.test.ts+118−21
Cut short: this commit's diff is over 1000 lines.
packages/core/src/cel.ts+74−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/layout.test.ts+102−0
Cut short: this commit's diff is over 1000 lines.
packages/core/src/layout.ts+37−2
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+72−14
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-edit.test.ts+54−0
Cut short: this commit's diff is over 1000 lines.
packages/core/src/text-edit.ts+52−21
Cut short: this commit's diff is over 1000 lines.
packages/core/src/text-input.test.ts+47−1
Cut short: this commit's diff is over 1000 lines.
packages/types/package.json+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.