@effect-tui/react 0.1.0 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@effect-tui/react",
3
- "version": "0.1.0",
3
+ "version": "0.1.3",
4
4
  "description": "React bindings for @effect-tui/core",
5
5
  "type": "module",
6
6
  "files": [
@@ -73,7 +73,7 @@
73
73
  "@effect/opentelemetry": "^0.59.1",
74
74
  "@opentelemetry/api": "^1.9.0",
75
75
  "@opentelemetry/sdk-trace-base": "^2.2.0",
76
- "@effect-tui/core": "workspace:*",
76
+ "@effect-tui/core": "^0.1.0-alpha.1",
77
77
  "react-reconciler": "^0.33.0",
78
78
  "shiki": "^3.17.0"
79
79
  },
package/src/hosts/box.ts CHANGED
@@ -76,11 +76,9 @@ export class BoxHost extends BaseHost {
76
76
  if (!this.rect) return
77
77
  const { x, y, w, h } = this.rect
78
78
 
79
- // Draw background if set
80
- if (this.bg !== undefined) {
81
- const bgStyle = palette.id({ bg: this.bg })
82
- buffer.fillRect(x, y, w, h, " ".codePointAt(0)!, bgStyle)
83
- }
79
+ // Always clear our rect to ensure stale backgrounds are removed.
80
+ const bgStyle = palette.id(this.bg !== undefined ? { bg: this.bg } : {})
81
+ buffer.fillRect(x, y, w, h, " ".codePointAt(0)!, bgStyle)
84
82
 
85
83
  // Draw border
86
84
  if (this.border !== "none" && w >= 2 && h >= 2) {