fix(paint): backgroundColor now visible with borders and text

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>
This commit is contained in:
Yunfei He
2026-05-25 11:11:54 +08:00
parent e850cb15ee
commit 8e6c4c5c2b
4 changed files with 75 additions and 12 deletions
+1
View File
@@ -12,6 +12,7 @@
"@vitejs/plugin-vue-jsx": "catalog:",
"@vue-tui/runtime": "workspace:*",
"@vue-tui/testing": "workspace:*",
"chalk": "catalog:",
"typescript": "^6.0.3",
"vite-plus": "^0.1.20",
"vue": "^3.4.0"