Skip to content

chore: version packages - #181

Merged
natemoo-re merged 1 commit into
mainfrom
changeset-release/main
Dec 3, 2026
Merged

natemoo-re merged 1 commit into
mainfrom
changeset-release/main

Conversation

@bombshell-bot

@bombshell-bot bombshell-bot Bot commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@bomb.sh/tty@0.12.0

Minor Changes

  • #148 6cbbaf4 Thanks @natemoo-re! - Adds capability-aware SGR color encoding to the renderer.

    The renderer now derives its color encoding from terminal capability evidence instead of always emitting 24-bit truecolor. Terminals with truecolor evidence (RGB/Tc, COLORTERM, direct-color max_colors, or a colordepth probe folded through term.update()) continue to receive byte-identical truecolor output. Without truecolor evidence, cells emit 256-color SGR (\x1b[38;5;Nm) when colors > 16, or 4-bit SGR (\x1b[31m) at or below 16. Colors are downmapped deterministically. In 256-color output, RGB colors map onto the 6×6×6 cube and grayscale ramp (rgba(255, 0, 0) → \x1b[38;5;196m), never onto indices 0–15, which follow the terminal's theme. In 16-color output, they map to the nearest standard palette entry. Use the -ansi-* keywords when you want the terminal's own palette colors. A tier change between frames forces a complete redraw.

    The baseline — no capability evidence — now resolves to 256-color rather than truecolor. Pass detectTerminal() output to createTerm to restore truecolor output on terminals that support it.

    Migration

      import { createTerm } from "@bomb.sh/tty";
    + import { detectTerminal } from "@bomb.sh/tty";
    
    - const term = await createTerm({ width, height });
    + const terminfo = await detectTerminal();
    + const term = await createTerm({ width, height, terminfo });
  • #158 836f8e0 Thanks @natemoo-re! - open() accepts a color field: the element's own foreground color, inherited
    by every descendant that doesn't set its own. currentcolor is now a valid
    color string everywhere, including color itself, where it means "inherit"
    (the same as omitting the field). Used in any other color field —
    open({ bg }), text({ bg }), border.color, border.bg, or a structured
    border side's color/bg — it resolves to the directive's own resolved
    color (its explicit color, or the color it inherits), then follows the same
    field resolution as any other color, so it probes the terminal theme and
    transitions normally when that resolved color is an sRGB value. border.color
    is now optional and defaults to currentcolor, matching CSS; a border with no
    color set anywhere picks up the element's own foreground, same as before
    this feature existed.

    Inheritance, currentcolor, and system colors resolve where the element sits
    in the frame being rendered, so a replayed element inherits from wherever its
    replay appears, and system colors in it pick up a theme report on the next
    render.

  • #157 d9b19c2 Thanks @natemoo-re! - Color fields accept colors that follow the user's terminal theme instead of a
    fixed RGB value, so output matches their light or dark theme.

    The sixteen ANSI palette entries are named with -ansi- keywords:
    -ansi-black, -ansi-red, -ansi-green, -ansi-yellow, -ansi-blue,
    -ansi-magenta, -ansi-cyan, and -ansi-white for entries 0–7, and
    -ansi-bright-black through -ansi-bright-white for entries 8–15. They render
    as SGR 30–37/90–97 (or 40–47/100–107 as a background) and match
    case-insensitively. CSS named colors are unchanged: red is still #ff0000,
    while -ansi-red is whatever red the terminal's theme uses.

    The CSS system colors Canvas and CanvasText name the terminal's default
    background and foreground. text({ bg: "Canvas" }) paints the terminal default
    background over any enclosing element background, while an omitted bg still
    keeps it. Named in the other field, they paint the terminal's actual default
    color once it's known: text({ bg: "CanvasText" }) renders the terminal's real
    default foreground color as an opaque truecolor background, learned from the
    terminal's OSC 10/11 theme report, falling back to the default background until
    that report arrives. Other CSS system colors are not supported. Packed rgba()
    colors and other color strings render exactly as before.

Patch Changes

  • #84 9c2354f Thanks @natemoo-re! - Fixes width measurement and rendering of emoji with variation selector-16 (U+FE0F)

  • #86 43c8915 Thanks @natemoo-re! - Fixes rendering when floating elements overlap the trailing column of wide characters

  • #179 1585d55 Thanks @natemoo-re! - Improves term.render() and result.info.get() memory use by encoding element ids and text directly into the transfer buffer instead of allocating per string

  • #168 0813fa4 Thanks @dreyfus92! - Fixes how elements at fractional positions map to cells. An element now draws on, and receives the pointer for, exactly the cells whose centers its bounding box covers. Elements sliding in past the top edge no longer pile onto row 0, and two elements that meet halfway through a cell no longer both receive the pointer there.

@pkg-pr-new

pkg-pr-new Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@bomb.sh/tty@181

commit: a33e250

@bombshell-bot
bombshell-bot Bot force-pushed the changeset-release/main branch from ecb4e00 to 3789b3e Compare December 3, 2026 05:55
@bombshell-bot
bombshell-bot Bot force-pushed the changeset-release/main branch from 3789b3e to a33e250 Compare December 3, 2026 18:08
@natemoo-re
natemoo-re merged commit 0cb10d2 into main Dec 3, 2026
12 checks passed
@natemoo-re
natemoo-re deleted the changeset-release/main branch December 3, 2026 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant