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
+6
View File
@@ -12,6 +12,9 @@ catalogs:
'@vitejs/plugin-vue-jsx':
specifier: ^5.1.5
version: 5.1.5
chalk:
specifier: ^5.6.2
version: 5.6.2
vite-plus:
specifier: latest
version: 0.1.22
@@ -186,6 +189,9 @@ importers:
'@vue-tui/testing':
specifier: workspace:*
version: link:../testing
chalk:
specifier: 'catalog:'
version: 5.6.2
typescript:
specifier: ^6.0.3
version: 6.0.3