Skip to content

Commit 45f8867

Browse files
Update dependencies
1 parent f4aa83b commit 45f8867

File tree

8 files changed

+1334
-810
lines changed

8 files changed

+1334
-810
lines changed

XtermBlazor/TerminalOptions.cs

Lines changed: 62 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,21 @@ public class TerminalOptions
155155
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
156156
public int? LineHeight { get; set; }
157157

158+
/// <summary>
159+
/// The handler for OSC 8 hyperlinks. Links will use the `confirm` browser
160+
/// API with a strongly worded warning if no link handler is set.
161+
///
162+
/// When setting this, consider the security of users opening these links,
163+
/// at a minimum there should be a tooltip or a prompt when hovering or
164+
/// activating the link respectively.An example of what might be possible is
165+
/// a terminal app writing link in the form `javascript:...` that runs some
166+
/// javascript, a safe approach to prevent that is to validate the link
167+
/// starts with http(s)://.
168+
/// </summary>
169+
// [JsonPropertyName("linkHandler")]
170+
// [JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
171+
// public LinkHandler? LinkHandler { get; set; }
172+
158173
/// <summary>
159174
/// What log level to use. The default is 'info'
160175
/// </summary>
@@ -239,6 +254,14 @@ public class TerminalOptions
239254
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
240255
public int? Scrollback { get; set; }
241256

257+
/// <summary>
258+
/// Whether to scroll to the bottom whenever there is some user input. The
259+
/// default is true.
260+
/// </summary>
261+
[JsonPropertyName("scrollOnUserInput")]
262+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
263+
public bool? ScrollOnUserInput { get; set; }
264+
242265
/// <summary>
243266
/// The scrolling speed multiplier used for adjusting normal scrolling speed.
244267
/// </summary>
@@ -263,17 +286,44 @@ public class TerminalOptions
263286
/// <summary>
264287
/// Whether "Windows mode" is enabled. Because Windows backends winpty and
265288
/// conpty operate by doing line wrapping on their side, xterm.js does not
266-
/// have access to wrapped lines. When Windows mode is enabled the following
267-
/// changes will be in effect:<br />
268-
/// <br /><br />
269-
/// - Reflow is disabled.<br />
289+
/// have access to wrapped lines.When Windows mode is enabled the following
290+
/// changes will be in effect:
291+
///
292+
/// - Reflow is disabled.
270293
/// - Lines are assumed to be wrapped if the last character of the line is
271294
/// not whitespace.
295+
///
296+
/// When using conpty on Windows 11 version >= 21376, it is recommended to
297+
/// disable this because native text wrapping sequences are output correctly
298+
/// thanks to https://github.com/microsoft/terminal/issues/405
299+
///
300+
/// @deprecated Use {@link windowsPty}. This value will be ignored if
301+
/// windowsPty is set.
272302
/// </summary>
273303
[JsonPropertyName("windowsMode")]
274304
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
275305
public bool? WindowsMode { get; set; }
276306

307+
/// <summary>
308+
/// Compatibility information when the pty is known to be hosted on Windows.
309+
/// Setting this will turn on certain heuristics/workarounds depending on the
310+
/// values:
311+
///
312+
/// - `if (backend !== undefined || buildNumber !== undefined)`
313+
/// - When increasing the rows in the terminal, the amount increased into
314+
/// the scrollback. This is done because ConPTY does not behave like
315+
/// expect scrollback to come back into the viewport, instead it makes
316+
/// empty rows at of the viewport. Not having this behavior can result in
317+
/// missing data as the rows get replaced.
318+
/// - `if !(backend === 'conpty' and buildNumber >= 21376)`
319+
/// - Reflow is disabled
320+
/// - Lines are assumed to be wrapped if the last character of the line is
321+
/// not whitespace.
322+
/// </summary>
323+
[JsonPropertyName("windowsPty")]
324+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
325+
public WindowsPty? WindowsPty { get; set; }
326+
277327
/// <summary>
278328
/// A string containing all characters that are considered word separated by the
279329
/// double click to select work logic.
@@ -289,6 +339,14 @@ public class TerminalOptions
289339
//[JsonPropertyName("windowOptions")]
290340
//[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
291341
//public WindowOptions? WindowOptions { get; set; }
342+
343+
/// <summary>
344+
/// The width, in pixels, of the canvas for the overview ruler. The overview
345+
/// ruler will be hidden when not set.
346+
/// </summary>
347+
[JsonPropertyName("overviewRulerWidth")]
348+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
349+
public int? OverviewRulerWidth { get; set; }
292350
}
293351

294352
/// <summary>

XtermBlazor/WindowsPty.cs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
using System.Runtime.Serialization;
2+
using System.Text.Json.Serialization;
3+
4+
namespace XtermBlazor
5+
{
6+
/// <summary>
7+
/// Pty information for Windows.
8+
/// </summary>
9+
public class WindowsPty
10+
{
11+
/// <summary>
12+
/// What pty emulation backend is being used.
13+
/// </summary>
14+
[JsonPropertyName("backend")]
15+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
16+
public Backend? Backend { get; set; }
17+
18+
/// <summary>
19+
/// The Windows build version (eg. 19045)
20+
/// </summary>
21+
[JsonPropertyName("buildNumber")]
22+
[JsonIgnore(Condition = JsonIgnoreCondition.WhenWritingNull)]
23+
public int? BuildNumber { get; set; }
24+
}
25+
26+
/// <summary>
27+
/// What pty emulation backend is being used.
28+
/// </summary>
29+
[JsonConverter(typeof(JsonStringEnumMemberConverter))]
30+
public enum Backend
31+
{
32+
/// <summary>
33+
/// ConPTY
34+
/// </summary>
35+
[EnumMember(Value = "conpty")]
36+
ConPTY,
37+
38+
/// <summary>
39+
/// WinPTY
40+
/// </summary>
41+
[EnumMember(Value = "winpty")]
42+
WinPTY,
43+
}
44+
}

XtermBlazor/XtermBlazor.csproj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<PackageLicenseFile>LICENSE</PackageLicenseFile>
1818
<Description>Brings xterm.js to Blazor</Description>
1919
<PackageIcon>icon.png</PackageIcon>
20-
<Version>1.8.1</Version>
20+
<Version>1.9.0</Version>
2121
<PackageTags>xterm, xterm-js, blazor, blazor-server, blazor-webassembly, blazor-wasm, xtermblazor</PackageTags>
2222
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2323
<GenerateDocumentationFile>true</GenerateDocumentationFile>
@@ -28,6 +28,10 @@
2828
<ItemGroup>
2929
<WebpackInputs Include="**\*.ts" Exclude="node_modules\**" />
3030
</ItemGroup>
31+
32+
<ItemGroup>
33+
<WebpackInputs Remove="webpack.config.ts" />
34+
</ItemGroup>
3135

3236
<ItemGroup>
3337
<Folder Include="wwwroot\" />

0 commit comments

Comments
 (0)