Adds 17 text tests from Ink: color (standard/hex/rgb/ansi256),
background color, dim, bold, inversion, reactive remeasure, and
edge cases. 4 tests skipped due to null-children yoga crash and
constructor text lookup bug.
Also fixes lastFrame() treating empty-string frames as undefined
(Codex review feedback) and adds strip-ansi dev dependency.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Translates flex, direction, wrap, align, justify, gap, padding,
margin, width-height, position, display, and overflow tests from
Ink. Adds trimLines mode and trailing-newline strip to test helper.
Fixes Box type for alignContent (space-between/around/evenly) and
alignSelf (stretch/baseline).
21 tests fail due to behavioral differences (overflow clipping,
percentage dimensions, relative position offsets, align-content
space-* variants). These represent real gaps to investigate.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds borderTopDimColor/borderBottomDimColor/borderLeftDimColor/
borderRightDimColor and borderBackgroundColor with per-side variants.
Refactors drawBorder to use per-edge colorizers that respect
edge-specific color, dim, and background overrides.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Hard wrap breaks text at exact width boundaries without respecting
word boundaries. Uses wrap-ansi with { hard: true, trim: false }.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds 9 new Box props backed by yoga-layout: maxWidth, maxHeight,
aspectRatio, alignContent, position, top, right, bottom, left.
Also adds baseline alignment support. Includes reset semantics
for props that Ink tests exercise clearing on rerender.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Ink uses 'ansi256(N)' while vue-tui only parsed 'ansi(N)'.
Both now work. Needed for Ink test migration.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Ink tests use chalk level 3 (24-bit) for hex/rgb/ansi256 colors.
Level 1 (basic 16-color) caused different ANSI codes than expected.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Stores raw (untrimmed) frames internally. lastFrame() still trims
by default for backward compat. lastFrame({ raw: true }) returns
the untrimmed output for layout tests asserting exact widths.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds chalk to pnpm-workspace catalog (runtime-tests referenced
catalog:chalk but it was missing). Also updates vite-plus deps
to fix vitest JSX transform regression.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Removes trimEnd() from the paint grid output. The test helper's
trimFrame() still handles cosmetic trimming for lastFrame(), so
existing tests are unaffected. This enables layout tests to assert
exact widths via lastFrame({ raw: true }).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Tests must exercise the same ANSI code paths users see. Without
FORCE_COLOR, chalk disables all color in non-TTY test environments,
making style bugs invisible to the test suite.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
TUI apps should suppress terminal echo to prevent keystroke pollution
in the rendered UI. Raw mode is now on by default (matching Bubbletea,
Textual, Ratatui), with exitOnCtrlC also defaulting to true.
Pass rawMode: false to mount() for pure-output CLI tools that don't
need input suppression.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Wrap each text line with applyChalk(bgProps) after wrapText so
background color is reapplied on every wrapped line (wrap-ansi
doesn't carry ANSI state across line breaks)
- Add wrapped-text backgroundColor regression test
- Fix typo: color=" cyan" → color="cyan" in example
- Add FORCE_COLOR=3 debugging tip to AGENTS.md
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Fill background inside border area only (not under border chars)
so border placeLine doesn't overwrite background ANSI codes
- Pad text lines to full layout width when inheritedBg is set
so background extends past text content to fill the row
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Root causes:
- drawBorder wrote plain characters, overwriting fillBackground's ANSI codes
- renderTextWithInlineStyles spread node.props over inherited bg, but
undefined props from Vue clobbered the inherited backgroundColor
- Child text nodes did not inherit backgroundColor from parent Box
Fixes:
- drawBorder applies backgroundColor (and borderColor) to border chars
- Filter out undefined props before merging in renderTextWithInlineStyles
- Pass inheritedBg through the paint tree to text nodes
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Static content is rendered via paintIsolated (separate channel), but its
yoga node was still participating in the dynamic frame layout calculation,
adding blank lines equal to the Static content height between the last
Static item and the dynamic content below.
Setting display:none on the Static yoga node removes it from the dynamic
layout. paintIsolated is unaffected — it reparents children into a
temporary yoga tree.
- Use nested Text instead of sibling Text nodes to keep 'You: ' and
content on the same line (avoids yoga row layout splitting them)
- Add 'Agent: ' prefix (cyan, bold) to assistant messages
flushStatic() writes directly to stdout, but log-update tracks cursor
position for in-place re-rendering. Without clearing log-update first,
the static content gets overwritten when the dynamic frame re-renders.
Adds a regression test that verifies the clear sequence appears before
static content in non-debug mode.
- Bump all packages to 0.0.1
- Add publishConfig.access: public to @vue-tui/cli
- Disable tsgo for dts generation (missing native-preview dep)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Silence Vite server logs (logLevel: 'silent')
- Intercept console.log/info/warn/error/debug in child process to
suppress [vite] and [Vue warn] noise from HMR client
- Add 3s startup grace period to ignore initial reload requests
(prevents double-spawn on first WS connection)
- Clear screen before spawning child process
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Prevents Vite startup logs and connection messages from mixing
with the TUI app's output.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- basic-jsx: Counter + Clock with defineComponent() + JSX
- basic-template: Counter + Clock with .vue SFC + <template>
- Both demonstrate HMR via vue-tui dev
- Fix vite-plugin: strip build.lib and external config for bundledDev,
add node builtins resolveId to prevent browser-external shimming
- Remove old hmr-demo example (superseded by basic-template)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Create dev.ts orchestrator wiring Vite dev server, bundle extractor, and
process manager together with HMR reload and crash-recovery logic.
Replace index.ts placeholder with full CLI entry supporting `vue-tui dev [entry]`.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
21 test files covering components, composables, focus, lifecycle,
and scheduler through the public render() API.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>