Skip to content

Releases: vadimdemedes/ink

v7.0.6

12 Jun 23:37

Choose a tag to compare

  • Fix stale frames on Windows when output exactly fills the terminal (#971) 2c08d55

v7.0.5...v7.0.6

v7.0.5

29 May 21:15

Choose a tag to compare

  • Fix: Handle incomplete stack frames in error overview (#965) b2350c1

v7.0.4...v7.0.5

v7.0.4

24 May 17:10

Choose a tag to compare

  • Fix: Share resize listener via emitLayoutListeners instead of per-hook listeners (#952) 89d43d8
  • Fix: Remove useEffectEvent functions from useEffect dependency arrays (#960) 9d534f7

v7.0.3...v7.0.4

v7.0.3

13 May 09:26

Choose a tag to compare

  • Fix: Drop stale <Static> output from fullStaticOutput on identity change (#950) 669c438
  • Fix: <Static> remount via key change drops new items (#948) be9f44c
  • Fix useBoxMetrics not accepting ref objects with an initial null value (#945) 7c2267c

v7.0.2...v7.0.3

v7.0.2

05 May 09:17

Choose a tag to compare

  • Fix: Defer raw mode disable to prevent process hang on component swap dd052ea

v7.0.1...v7.0.2

v7.0.1

17 Apr 07:15

Choose a tag to compare

  • Fix: Restore useApp exit typing 42ddd40
  • Fix: Respect disableFocus() when handling Escape (#937) cb66873

v7.0.0...v7.0.1

v7.0.0

08 Apr 08:05

Choose a tag to compare

Breaking

  • Require Node.js 22 19b5316
  • Require React 19.2+ cfaebbb
    • Ink now uses useEffectEvent internally to avoid re-subscribing input handlers on every render
  • Pressing Backspace now correctly sets key.backspace instead of key.delete (#634) 321a2e8
    • Most terminals send the same byte for Backspace as the Delete key, which caused Ink to misreport it. If you were checking key.delete to handle backspace, switch to key.backspace
  • key.meta is no longer set to true when Escape is pressed e195912
    • Previously a backward-compat shim made plain Escape set both key.escape and key.meta. Now only key.escape is true. key.meta is reserved for actual Alt/Meta modifier combinations

New

  • Add usePaste hook for handling clipboard paste events fbbeb23
    • Automatically enables bracketed paste mode so pasted text arrives as a single string, never misinterpreted as individual key presses by useInput
  • Add useWindowSize hook 7047795
    • Returns {columns, rows} and re-renders automatically on terminal resize
  • Add useBoxMetrics hook for measuring box dimensions at runtime (#433) 88731d1
  • Add useAnimation hook for built-in animation support (#142) ada019c
    • Provides a frame counter that increments at a configurable interval, with pause/resume support and automatic cleanup on unmount
  • Add alternateScreen option to render() (#263) 5a60eb9
    • Renders into the terminal's alternate screen buffer (like vim or less), restoring the previous terminal content on exit
  • Add interactive option to render() (#888) 02490f6
    • Override automatic interactive-mode detection for environments where the built-in heuristic doesn't fit
  • Add activeId to useFocusManager() (#661) eb2f470
    • Returns the ID of the currently focused component, or undefined if nothing is focused
  • Add borderBackgroundColor (and per-side variants) to <Box> (#906) d3c6d14
    • Set a background color on borders independently from the box content background
  • Add wrap="hard" to <Text> (#925) 2b1e3a6
    • Fills each line to the full column width, breaking words mid-word as needed
  • Add maxWidth and maxHeight props to <Box> (#713) 9291794
  • Add aspectRatio, alignContent, position="static", and top/right/bottom/left layout props to <Box> c2f4b86
  • Kitty keyboard protocol: query all terminals in auto mode instead of a hardcoded allowlist (#895) 3e672b5

Fixes

  • Fix incremental rendering for trailing newline (#910) c32da0b
  • Fix useInput crash on unmapped key codes (#902) 969a4f1
  • Fix CJK text truncation exceeding <Box> width b5f3e3a
  • Fix splitting wide characters (emoji, CJK) when overlapping writes occur (#930) 06d53f4
  • Fix dangling staticNode reference (#905) 0dc4dfa

Migration guide

key.backspace vs key.delete

// Before β€” physical backspace was reported as key.delete
useInput((input, key) => {
  if (key.delete) { /* was catching physical backspace key */ }
});

// After
useInput((input, key) => {
  if (key.backspace) { /* physical backspace key (0x7F) */ }
  if (key.delete)    { /* actual Delete key (e.g. Fn+Backspace) */ }
});

key.meta no longer set on plain Escape

// Before β€” key.meta was true for both Escape AND Alt+key
useInput((input, key) => {
  if (key.meta) { /* fired on plain Escape too */ }
});

// After β€” check key.escape explicitly for the Escape key
useInput((input, key) => {
  if (key.escape) { /* plain Escape */ }
  if (key.meta)   { /* Alt/Meta combos only */ }
});

v6.8.0...v7.0.0

v6.8.0

19 Feb 07:03

Choose a tag to compare

Improvements

  • Add renderToString() for synchronous string output (#868) 0a0c549
  • Add support for react-devtools v7 (#877) d633d7c
  • Allow exit() to pass a result value to waitUntilExit() 20b4a3d
  • Improve performance by caching some expensive calls (#835) bd2f6a4

Fixes

  • Fix wrapping with nested Text (#879) 1761c3a
  • Fix support for hyperlinks (#871) 2bd1a74
  • Fix: Handle ended stdout during unmount 54c4e65
  • Fix duplicated <Static> output on exit 5815651
  • Fix dropped keypresses when multiple inputs arrive in one readable tick 4848547
  • Fix handling of colored output from child processes 9da2dfa

v6.7.0...v6.8.0

v6.7.0

10 Feb 10:41

Choose a tag to compare

Improvements

Fixes

  • Fix fullscreen trailing newline on initial render (#856) 9b21b24
  • Fix MaxListenersExceededWarning when using many useInput hooks 390549d
  • Fix: Make unmount flush pending renders and await stdout drain (#863) 5e35d73
  • Fix handling of Option+Return (soft return) on macOS (#860) 12fe119

v6.6.0...v6.7.0

v6.6.0

22 Dec 11:02

Choose a tag to compare

  • Add home and end key support in useInput (#829) 969cae4
  • Fix some flicker in incremental rendering (#836) a006d76

v6.5.1...v6.6.0