Bot releases are hidden (Show)
New opt-in rescaleOverlappingGlyphs
option that will conservatively rescale glyphs that likely overlap with the following cell when GPU acceleration is enabled (#4997, #5001, #5012, #5013) via @Tyriar.
Webgl with the setting off:
Webgl with the setting on:
This was primarily added to help with applications that want to achieve GB18030 compliance.
Addon | Version |
---|---|
@xterm/addon-attach |
0.11.0 |
@xterm/addon-canvas |
0.7.0 |
@xterm/addon-fit |
0.10.0 |
@xterm/addon-image |
0.8.0 |
@xterm/addon-ligatures |
0.9.0 |
@xterm/addon-search |
0.15.0 |
@xterm/addon-serialize |
0.13.0 |
@xterm/addon-unicode-graphemes |
0.3.0 |
@xterm/addon-unicode11 |
0.8.0 |
@xterm/addon-web-links |
0.11.0 |
@xterm/addon-webgl |
0.18.0 |
Published by Tyriar 8 months ago
📢 The package has been migrated to the @xterm
scope (#4860, #4861) via @Tyriar. This means that the old xterm
and xterm-*
packages are now deprecated and will no longer be maintained. This was done mainly for security reasons to remove ambiguity around the package names and to prevent potential typosquatting attacks.
Please use the new scoped @xterm/*
packages.
input(data: string, wasUserInput?: boolean): void
API to emit an input event from Terminal
(#4953) via @arencoskundocumentOverride
option to help multi-window app support (#4844) via @TyriarattachCustomWheelEventHandler
API to allow embedders to intercept wheel events (#4913, #4915) via @Tyriar, @tisilentTerminal
(#4776, #4785) via @TyriarisCursorInitialized
correctly in the DOM renderer (#4798) via @tisilentxterm
and xterm-*
packages are now deprecated and will no longer be maintained. Please use the new scoped @xterm/*
packages instead.This is a new experimental addon that provides support for grapheme clusters in the terminal (#4519) via @PerBothner
clearActiveDecoration
API implementation (#4827) via @TyriarAddon | Version |
---|---|
@xterm/addon-attach |
0.10.0 |
@xterm/addon-canvas |
0.6.0 |
@xterm/addon-fit |
0.9.0 |
@xterm/addon-image |
0.7.0 |
@xterm/addon-ligatures |
0.8.0 |
@xterm/addon-search |
0.14.0 |
@xterm/addon-serialize |
0.12.0 |
@xterm/addon-unicode-graphemes |
0.2.0 |
@xterm/addon-unicode11 |
0.7.0 |
@xterm/addon-web-links |
0.10.0 |
@xterm/addon-webgl |
0.17.0 |
Published by Tyriar about 1 year ago
scrollLines
, scrollPages
,scrollToLine
, scrollToTop
and scrollToBottom
(#4482, #4714) via @tisilent, @TyriarminimumContrastRatio
now applies 50% of the contrast ratio to dimmed text (#4672) via @Tyriratrace
log level (#4687, 4709) via @Tyriar
const term = new Terminal({
logLevel: 'trace'
});
logger
delegate option (#4563, #4564) via @Tyriar. This new API allows the embedder to define the logging behavior, instead of always using to console
const term = new Terminal({
logger: {
trace: (e, args) => console.log('trace: ', e, args),
debug: (e, args) => console.log('debug: ', e, args),
info: (e, args) => console.log('info: ', e, args),
warn: (e, args) => console.log('warn: ', e, args),
error: (e, args) => console.log('error: ', e, args)
}
});
ignoreBracketedPasteMode
option that allows explicitly disabling bracketed paste mode, regardless of whether the shell enables it or not (#4636) via @Tyriar
const term = new Terminal({
ignoreBracketedPasteMode: true
});
cursorInactiveStyle
option (#4657) via @tisilent
const term = new Terminal({
cursorInactiveStyle: 'none'
});
CSSStyleSheet
web API (#4611, ##4619, #4678, #4680) via @SimonSiefke, @Tyriar@ts-check
in JS files (#4723, #4724) via @Tyriar@typescript-eslint/no-useless-constructor
(#4725) via @Tyriar@typescript-eslint/no-confusing-void-expression
(#4726) via @Tyriar@playwright/test
as the integration test runner (#4735) via @TyriarAddon | Version |
---|---|
xterm-addon-attach |
0.9.0 |
xterm-addon-canvas |
0.5.0 |
xterm-addon-fit |
0.8.0 |
xterm-addon-image |
0.5.0 |
xterm-addon-ligatures |
0.7.0 |
xterm-addon-search |
0.13.0 |
xterm-addon-serialize |
0.11.0 |
xterm-addon-unicode11 |
0.6.0 |
xterm-addon-web-links |
0.9.0 |
xterm-addon-webgl |
0.16.0 |
Pull from https://github.com/xtermjs/xtermjs.org/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Aclosed
Published by Tyriar over 1 year ago
Published by Tyriar over 1 year ago
Improved Windows workarounds with the new windowsPty option (#4539) via @Tyriar
const term = new Terminal({
windowsPty: {
backend: 'conpty',
buildNumber: 19000
}
});
windowsMode
has been deprecated in favor of windowsPty
// Before 5.2
term = new Terminal({ windowsMode: true });
// After 5.2
term = new Terminal({
windowsPty: {
backend: 'conpty',
buildNumber: 19000
}
});
xterm-addon-attach@...
xterm-addon-fit@...
xterm-addon-ligatures@...
xterm-addon-search@...
xterm-addon-serialize@...
xterm-addon-unicode11@...
xterm-addon-web-links@...
xterm-addon-webgl@...
Published by Tyriar almost 2 years ago
Multiple texture atlas page support (#4244, #4252, #4274) via @Tyriar
Instead of there being a hard cap of 1024x1024 on the size of the texture atlas backing the canvas and webgl renderers, multiple textures are now supported. Each individual texture is now 512x512 which allows faster uploading to the GPU and will continually merge until the maximum of 4096x4096 is reached.
The benefits in simple terms of this change are:
Here is an example of a 512x512 texture atlas page right after the terminal has loaded and printed a powerline-based prompt:
And here is the 1024x1024 page after a lot of glyphs have rendered:
Slash and triangle custom glyphs (#4313) via @Tyriar
Eight new powerline extra custom glyphs are supported:
New option scrollOnUserInput (#4289) via @JasonXJ
You can now specify whether to scroll to the bottom of the terminal on user input, previously this was the default and only behavior. This new setting is enabled by default.
const term = new Terminal({ scrollOnUserInput: false });
Terminal.open
is called (#4151) via @TyriarCSI 0 m
via @JasonXJallowProposedApi
(#4125) via @BattlefieldDuckallowNonHttpProtocols
property on ILinkHandler
which forces the embedder to opt-in to non-http(s) protocols. This is a breaking change in a minor release as it could improve security of embedders.
// before 5.1.0
const term = new Terminal({
linkHandler: {
...
}
};
// after 5.1.0
const term = new Terminal({
linkHandler: {
// If you explicitly support and sanitize the links
allowNonHttpProtocols: true,
...
}
};
Published by Tyriar about 2 years ago
v5 is here! This is our largest release in a long time, maybe ever 👀
Since this was a major version bump, we used the opportunity to clean up the API and make other breaking changes. Many of these changes enabled a significant reduction in the xterm
module bundle size which went from 379kb to 265kb for a 30% reduction!
Underline style and color support (#3921, #3976, #3980, #4053, #4068, #4074, #4077, #4109) via @Tyriar
Underline style and color sequences such as CSI 4:2m ST
for double underlines are now supported:
Some work was also done to improve underline rendering overall, characters with long descenders don't overlap with the underline:
Hyperlink escape sequence support (#4005, #4087, #4088) via @Tyriar, @jerch
Building upon the improved underline rendering, hyperlink escapes outlined in this gist are now supported. They will be rendered using a dashed underline (like CSI 4:5m ST
):
Along with this is a new linkHandler
option which allows controling hover, leave and activate events, for example to show a custom tooltip. VS Code's implementation looks like this:
Smooth scroll support (#3940) via @Tyriar
The new smoothScrollDuration
allows setting a duration in milliseconds to animate scroll between the origin and target positions. This is most useful when using a physical mouse (not a trackpad) to help not disorient the user when scrolling with the mouse wheel.
Canvas renderer addon (#3949, #3950, #3954, #3959, #3961, #3981) via @Tyriar
The canvas renderer has moved into an addon, significantly reducing the bundle size of the xterm
module. This used to be the default renderer and is now recommended only as a fallback to the webgl addon if that does not work for some reason (eg. no webgl2 support).
New VT feature support (#4093, #4095, #4098)via @jerch
xterm.js handles several new VT sequences:
Other features
ITheme.selectionInactiveBackground
will now change the selection color when the terminal is not focusedparser
and buffer
APIs are now stable (#3951) via @TyriarallowTransparency
from its initial value in the Terminal
constructor (#3899) via @TyriarcursorStyle
(#3900) via @TyriarTerminal.dispose
is called (#3958) via @TyriarwindowsMode
option for the version of Windows 11 that it's recommended to be disabled on (#3967) via @TyriarbellSound
and bellStyle
options as well as the previously builtin sound have been removed (#3941) via @Tyriar. This reduces the bundle size while still allowing the embedder to support the terminal bell via the Terminal.onBell
API
// before 5.0.0
term = new Terminal({
bellStyle: 'sound'
});
// after 5.0.0
term = new Terminal();
term.onBell(() => {
// Play a sound
});
The link matcher API registerLinkMatcher
and deregisterLinkMatcher
have been removed in favor of the link provider API (#3944) via @Tyriar.
The allowProposedApi
option now defaults to false
, set this to true
to opt-in to proposed API usage if you understand the implications (#3945) via @Tyriar
// before 5.0.0
term = new Terminal({});
term.someProposedApi();
// after 5.0.0
term = new Terminal({
allowProposedApi: true
});
term.someProposedApi();
The deprecated addMarker
API has been removed in favor of registerMarker
(#3946) via @Tyriar. They are functionally equivalent.
The deprecated getOption
and setOption
APIs have been removed in favor of options
(#3947) via @Tyriar
// before 5.0.0
term.setOption('scrollback', 1000);
console.log(term.getOption('scrollback'));
// after 5.0.0
term.options.scrollback = 1000;
console.log(term.options.scrollback);
The deprecated writeUtf8
API has been removed in favor of write
(#3947) via @Tyriar.
const arr = new Uint8Array(10);
// before 5.0.0
term.writeUtf8(arr);
// after 5.0.0
term.write(arr);
ISelectionPosition
have been removed from the API in favor of IBufferRange
(#3952) via @Tyriar
cols
and rows
options can now only be set in the constructor (#3960, #3972, #4078) via @Tyriar, @silamon
// before 5.0.0
term.setOption('cols', 10);
// after 5.0.0
term.resize(10, term.rows);
ITheme.selection
has been renamed to selectionBackground
for consistency (#3964) via @Tyriar
// before 5.0.0
term.options.theme = { selection: '#000000' };
// after 5.0.0
term.options.theme = { selectionBackground: '#000000' };
The Terminal.options
getter now returns a Required<ITerminalOptions>
instead of just ITerminalOptions
for better correctness. Along with this change fastScrollModifier
now accepts 'none'
instead of undefined
// before 5.0.0
new Terminal({ fastScrollModifier: undefined });
// after 5.0.0
new Terminal({ fastScrollModifier: 'none' });
▛
(U+259B) character (#3902) via @TyriarproposeDimensions
to include undefined
(#3882) via @jerchMore efficient GPU memory usage using new texture atlas packing strategy (#3979) via @Tyriar
The previous naive texture packing strategy which only allowed adding to the "active row" or below has been replaced with a new strategy that uses multiple active rows and adds glyphs to the most suitable row based on its pixel height. This leads to more effective usage of the texture xterm.js uploads to the GPU, meaning it's harder to reset the texture when it becomes filled (which is more likely to happen when screen scale is high).
Before:
After:
Other changes
▛
(U+259B) character (#3902) via @Tyriar[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Published by Tyriar over 2 years ago
minimumContrastRatio
option isn't met when #FFFFFF
is reached it will try moving it towards #000000
. This can cause somewhat unexpected results by changing explicitly styled whites to blacks for example but it's really good for accessibility.#rgb
, #rgba
, rgb(r, g, b)
and rgba(r, g, b, a)
color formats (#3815, #3819, #3823) via @ChaseKnowlden, @TyriarselectionBackground
is now supported in the DOM renderer (#3839) via @TyriarITerminalOptions.customGlyphs
is enabled (#3856, #3862, #3866) via @TyriarITerminalOptions.lineHeight
is taken into account when rendering the glyphoverviewRulerOptions
property to a decoration's IDecorationOptions
and it will automatically show up in the overview ruler.
const marker = term.addMarker(1);
const decoration = term.registerDecoration({
marker,
x: 5,
overviewRulerOptions: {
color: '#FF0000',
position: 'left'
}
});
decoration.onRender(() => {
decoration.element.style.backgroundColor = 'red';
});
The width of the resulting overview ruler is controlled by ITerminalOptions.overviewRulerWidth
.const decoration = term.registerDecoration({
marker,
backgroundColor: '#ff0000',
foregroundColor: '#ffffff'
});
const decoration = term.registerDecoration({
marker,
layer: 'top'
});
selectionForeground
theme color, when set this will use a static color for selections (#3813) via @Tyriar
const term = new Terminal({
theme: {
selectionBackground: '#000000',
selectionForeground: '#FFFFFF'
}
});
Terminal.clear
(#3671, #3868) via @meganroggeonSelectionChange
when Terminal.select
is called (#3805) via @TyriargetOption
/setOption
with options
(#3667) via @childrentimescrollback
is 0
(#3678) via @silamon.xterm-find-active-result-decoration
(#3802) via @TyriarurlRegex
in public API (#3719) via @LuckyGeck[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
}
, |
and ~
in the demo (https://github.com/xtermjs/xtermjs.org/pull/175) via @MOBUMINPublished by meganrogge over 2 years ago
Support buffer decorations (#1852) via @meganrogge
const marker = term.addMarker(1);
const decoration = term.registerDecoration({ marker, x: 5 });
decoration.onRender(() => {
decoration.element.style.backgroundColor = 'red';
});
Make registerMarker's cursor offset optional (#3663) via @childrentime
// Before
const markerAtCursor = term.registerMarker(0);
// After
const markerAtCursor = term.registerMarker();
Published by Tyriar over 2 years ago
options
in the xterm-headless
API too (#3599) via @silamon[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Published by Tyriar almost 3 years ago
Make sure you update your xterm.css file if you have your own copy as there were some changes made there (https://github.com/xtermjs/xterm.js/issues/3579).
Terminal.options
API (#3546, #3586) via @silamon
// before
term.setOption('rendererType', 'dom');
term.setOption('fontSize', 12);
// after
term.options = {
rendererType: 'dom',
fontSize: 12
};
IKeyboardEvent.keyCode
as deprecated (#3582) via @Tyriar[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
xterm-addon-unicode11@...
[email protected]
[email protected]
Published by meganrogge almost 3 years ago
terminal.options
(#3448) via @silamonInputHandler
tests (#3523) via @jerchUse term.options
over term.setOption
/getOption
:
// before
term.setOption('rendererType', 'dom');
// after
term.options.rendererType = 'dom';
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Pull from https://github.com/xtermjs/xtermjs.org/pulls?q=is%3Apr+sort%3Aupdated-desc+is%3Aclosed
Published by Tyriar about 3 years ago
Published by Tyriar about 3 years ago
xterm-headless
is a new package available on npm that allows xterm to run in a headless mode within node.js (#3212, #3214, #3413, #3414, #3420, #3421) via @Tyriar, @joyceerhlmodes
API exposes the terminal's internal modes (#3418) via @Tyriar. These are used for example in the xterm-addon-serialize to enable mode serialization.
if (terminal.modes.applicationCursorKeysMode) {
// DECCKM is enabled (CSI ? 1 h)
}
navigator
typing issues (#3371) via @LabhanshAgrawal\
is now correctly treated as a non-word character (#3405) via @alur[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Published by meganrogge over 3 years ago
Published by Tyriar over 3 years ago
// Handle \x1b[<params>+Z using an asynchronous handler
terminal.parser.registerCsiHandler({intermediates:'+', final: 'Z'}, async params => {
await new Promise(res => setTimeout(res, 50));
return false;
});
onBell
event API so embedders can handle the bell however they want (#3290, #3295) via @bmf-ribeiro
terminal.onBell(() => customBellImpl());
open
is called (#3314) via @jeanp413navigator.fonts
API (#3264) via @LabhanshAgrawal[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Published by meganrogge over 3 years ago
Published by Tyriar over 3 years ago
new Terminal({
altClickMovesCursor: false
});
Published by Tyriar about 4 years ago
fontWeight
and fontWeightBold
options (#3062) via @IllusionMH, this now matches the types that the CSS style supports.dispose
function on ILink
(#3073) via @Tyriar, this allows consumers to be notified when links are no longer needed which was difficult to observe before.Terminal.open
is called during an animation (#3008) via @andrew-schlackmansetOption
(#3064) via @IllusionMHgetOption('fontWeight')
and getOption('fontWeightBold')
now returns string | number
instead of string
:
// before 4.9.0
const weight: string = term.getOption('fontWeight');
// after 4.9.0
const weight: string | number = term.getOption('fontWeight');
This change accepted as the impact on consumers should be minimal due to the low usage of the API.WebglAddon.clearTextureAtlas
API (#3075) via @Tyriar, this is useful to completely clear the atlas when corruption may have happened (eg. when canvas textures are lost after system sleep/resume).[email protected]
[email protected]
[email protected]
(this addon may have issues)[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
Published by Tyriar over 4 years ago