[READ-ONLY] Mirror of https://github.com/bombshell-dev/tty. Platform independent 2D layout engine for terminal applications based on Clay
5

Configure Feed

Select the types of activity you want to include in your feed.

feat(border): update TS types to CSS border-style keywords with 4-byte per-side style encoding

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

Nate Moore (May 28, 2026, 5:18 PM EDT) 3af42812 c94cdf4f

+25 -8
+16 -6
ops.ts
··· 88 88 if (op.layout) mask |= PROP_LAYOUT; 89 89 if (op.bg !== undefined) mask |= PROP_BG_COLOR; 90 90 if (op.cornerRadius) mask |= PROP_CORNER_RADIUS; 91 - if (op.border) mask |= PROP_BORDER; 91 + if (op.border && op.border.style !== "none" && op.border.style !== "hidden") mask |= PROP_BORDER; 92 92 if (op.clip) mask |= PROP_CLIP; 93 93 if (op.floating) mask |= PROP_FLOATING; 94 94 view.setUint32(o, mask, true); ··· 135 135 o += 4; 136 136 } 137 137 138 - if (op.border) { 138 + if (op.border && op.border.style !== "none" && op.border.style !== "hidden") { 139 139 let b = op.border; 140 140 view.setUint32(o, b.color, true); 141 141 o += 4; ··· 146 146 true, 147 147 ); 148 148 o += 4; 149 + // groove/ridge/inset/outset alias to solid (terminal can't do 3D) 149 150 const styleMap: Record<string, number> = { 150 - single: 0, 151 + solid: 0, 151 152 double: 1, 152 - bold: 2, 153 + dotted: 2, 154 + dashed: 3, 155 + groove: 0, 156 + ridge: 0, 157 + inset: 0, 158 + outset: 0, 153 159 }; 154 - view.setUint32(o, styleMap[b.style ?? "single"] ?? 0, true); 160 + // Pack as 4 per-side style bytes (left|right<<8|top<<16|bottom<<24). 161 + // All four are the same value today; this layout reserves space for 162 + // future per-side style support without a protocol change. 163 + const s = styleMap[b.style ?? "solid"] ?? 0; 164 + view.setUint32(o, s | (s << 8) | (s << 16) | (s << 24), true); 155 165 o += 4; 156 166 } 157 167 ··· 266 276 right?: number; 267 277 top?: number; 268 278 bottom?: number; 269 - style?: "single" | "double" | "bold"; 279 + style?: "none" | "hidden" | "solid" | "double" | "dotted" | "dashed" | "groove" | "ridge" | "inset" | "outset"; 270 280 }; 271 281 clip?: { horizontal?: boolean; vertical?: boolean }; 272 282 floating?: {
+9 -2
validate.ts
··· 75 75 bottom: Type.Optional(u8), 76 76 style: Type.Optional( 77 77 Type.Union([ 78 - Type.Literal("single"), 78 + Type.Literal("none"), 79 + Type.Literal("hidden"), 80 + Type.Literal("solid"), 79 81 Type.Literal("double"), 80 - Type.Literal("bold"), 82 + Type.Literal("dotted"), 83 + Type.Literal("dashed"), 84 + Type.Literal("groove"), 85 + Type.Literal("ridge"), 86 + Type.Literal("inset"), 87 + Type.Literal("outset"), 81 88 ]), 82 89 ), 83 90 });