@effect-tui/react 0.1.5 → 0.1.6

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.5",
3
+ "version": "0.1.6",
4
4
  "description": "React bindings for @effect-tui/core",
5
5
  "type": "module",
6
6
  "files": [
@@ -83,7 +83,7 @@
83
83
  "prepublishOnly": "bun run typecheck && bun run build"
84
84
  },
85
85
  "dependencies": {
86
- "@effect-tui/core": "^0.1.5",
86
+ "@effect-tui/core": "^0.1.6",
87
87
  "@effect/platform": "^0.94.0",
88
88
  "@effect/platform-bun": "^0.87.0",
89
89
  "@effect/rpc": "^0.73.0",
package/src/hosts/base.ts CHANGED
@@ -147,13 +147,13 @@ export abstract class BaseHost implements HostInstance {
147
147
  this.flexGrow = (props.flexGrow as number | undefined) ?? 0
148
148
  this.flexShrink = (props.flexShrink as number | undefined) ?? 1
149
149
 
150
- // Frame constraints
151
- this.frameWidth = props.width as number | undefined
152
- this.frameHeight = props.height as number | undefined
153
- this.frameMinWidth = props.minWidth as number | undefined
154
- this.frameMaxWidth = props.maxWidth as number | undefined
155
- this.frameMinHeight = props.minHeight as number | undefined
156
- this.frameMaxHeight = props.maxHeight as number | undefined
150
+ // Frame constraints - only accept valid numbers (ignore strings like "100%")
151
+ this.frameWidth = typeof props.width === "number" ? props.width : undefined
152
+ this.frameHeight = typeof props.height === "number" ? props.height : undefined
153
+ this.frameMinWidth = typeof props.minWidth === "number" ? props.minWidth : undefined
154
+ this.frameMaxWidth = typeof props.maxWidth === "number" ? props.maxWidth : undefined
155
+ this.frameMinHeight = typeof props.minHeight === "number" ? props.minHeight : undefined
156
+ this.frameMaxHeight = typeof props.maxHeight === "number" ? props.maxHeight : undefined
157
157
  }
158
158
 
159
159
  destroy(): void {