Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 16 additions & 10 deletions docs/design/design-tokens.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,26 @@ Index → hex. This **is** `AnsiColor.Indexed(0..15)`:

xterm-256: indices 16–231 are the 6×6×6 cube, 232–255 the grayscale ramp —
computed by the standard xterm formula (the prototype shows representative
samples). The renderer maps any `AnsiColor.Indexed(n)` for `n` in 0–255.
samples). `OutputPalette` holds these sixteen; the cube and ramp are xterm's.

## Styled-segment render contract
## Output render contract

Maps `StyledSegment` (`TextStyle` = fg/bg/bold/underline/inverse) to a rendered
span. Equivalent to the prototype's `runStyle`:
Server output is decoded by MarkupString (`OutputDecoder`) and folded into
spans by its `SpanRenderer` (`OutputDisplay`), drawn by `OutputView`.
Equivalent to the prototype's `runStyle`:

- Default foreground (no fg set) → `--pho` (`#c4d1c8`); default background →
transparent (the `--outbg` shows through).
- `Foreground = Indexed(n)` → palette/cube hex; `Background = Indexed(n)` →
hex + small horizontal padding (`0 2px`).
- Default foreground (no fg set) → no inline colour, so `.sc-line`'s `--pho`
(`#c4d1c8`) shows; default background → transparent (the `--outbg` shows
through).
- Palette colours → `OutputPalette` hex; truecolour as sent. A span with a
background also gets a small horizontal padding (`0 2px`).
- **Inverse**: swap — foreground becomes `--outbg`, background becomes the
segment's foreground colour (or `--pho` if none).
- **Bold** → font-weight 700. **Underline** → `text-decoration: underline`.
span's foreground colour (or `--pho` if none).
- **Bold** → `font-weight:bold`, **faint** → `opacity:0.6`, **italic**,
**underline**, **overline**, **strikethrough** → `text-decoration`;
**blink** → class `ms-blink`; **conceal** → transparent text.
- Command links are `button.sc-link`; web links `a.sc-link`; an MXP menu adds
a `▾` toggle listing its choices.
- Glow (when enabled): `text-shadow: 0 0 6px rgba(150,210,170,.28)` on the feed.

## Connection-state palette (drives tabs, pills, dots)
Expand Down
2 changes: 1 addition & 1 deletion src/SharpClient.Core/Connection/TelnetConnection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public sealed class TelnetConnection : ITelnetConnection
private static readonly TimeSpan TlsHandshakeTimeout = TimeSpan.FromSeconds(20);

// TNC names nobody unless told to: without this, TTYPE answers UNKNOWN and NEW-ENVIRON sends no
// CLIENT_NAME. MTTS claims what AnsiParser renders: 16, 256 and 24-bit colour over UTF-8.
// CLIENT_NAME. MTTS claims what the output view draws: 16, 256 and 24-bit colour over UTF-8.
private static ClientIdentity Identity { get; } = new("SharpClient")
{
TerminalType = "XTERM",
Expand Down
20 changes: 0 additions & 20 deletions src/SharpClient.Core/Rendering/AnsiColor.cs

This file was deleted.

43 changes: 0 additions & 43 deletions src/SharpClient.Core/Rendering/AnsiPalette.cs

This file was deleted.

Loading
Loading