Commit Graph

76 Commits

Author SHA1 Message Date
fbe1d0b6f2 Add documentation for TextPath widget (#757) 2022-03-01 20:56:58 +01:00
5e41a2f505 Add support for styling segments 2022-02-23 09:06:51 -05:00
52c1d9122b Add global usings (#668)
* Use global usings

* Fix namespace declarations for test projects
2021-12-23 16:50:31 +01:00
ec1188b837 Use file scoped namespace declarations 2021-12-22 08:51:17 -05:00
fd4b96944e Add support for alternate screen buffers
Closes #250
2021-11-30 12:13:14 -05:00
fa15389158 Add support custom max value for barcharts (#545) 2021-10-05 00:49:09 +02:00
a5716a35e2 Future-proof conditional compilation
* Invert `#if NET5_0` conditions so that when adding net6.0 target framework, the _new_ APIs are used.
* Use `NET5_0_OR_GREATER` instead of `NET5_0` to ensure consistent behaviour on future target frameworks.
2021-09-29 10:01:31 +02:00
e3dfe23b59 Work done to allow user to update table cell. (#546) 2021-09-27 13:03:45 +02:00
8cfe06e77a Expose extension method that gets the cell width of text 2021-09-18 23:20:28 +02:00
48d49d6e18 Add extension method to get the cell width of a character 2021-09-18 23:20:28 +02:00
786b7670da Fix the style parameter nullable annotation on AnsiConsoleExtensions
The style parameter is actually nullable. Also, the documentation of the style parameter has been made explicit that `Style.Plain` is used when a `null` style is passed.
2021-08-31 18:52:34 +02:00
e169df6303 Add support for manipulating individual table rows
Closes #500
2021-08-14 23:35:07 +02:00
d532e1011f Add default value parameter to Confirm extension
Closes #482
2021-07-12 08:47:36 +02:00
5f97f2300c Support cancellation of prompts
Closes #417
2021-07-11 23:10:17 -04:00
865552c3f2 Add support for selecting prompt items
Closes #447
2021-06-28 08:41:24 -04:00
450d87f5d3 Add support for fake input in asciicast recordings
* Fixes a bug with `SelectionPrompt` and page size.
* Allow `IAnsiConsoleInput` to return `null`.
2021-05-23 22:22:44 -04:00
46abadaccb Add AsciiCast demos for docs 2021-05-23 23:30:14 +02:00
3dea412785 Add live display support
This commit also adds functionality to LiveRenderable that should
fix some problems related to vertical overflow.

Closes #316
Closes #415
2021-05-20 19:41:10 -04:00
315a52f3e9 Add support for hierarchical list prompts
Closes #412
2021-05-18 11:34:16 -04:00
6549436356 Fix line break regression
In commit d1d94cd, we accidentally introduced a regression
since conhost requires all line breaks to be `\r\n`.
2021-05-10 17:42:49 -04:00
d1d94cdebe Add Length and Lines properties to Paragraph
* Adds Length and Lines to `Paragraph`, `Markup` and `Text`.
* Do not use Environment.NewLine
2021-05-03 17:24:44 +02:00
cba02070f9 Add method to get VT/ANSI codes for renderables 2021-04-23 13:09:44 -04:00
3463dde543 Add method to write VT/ANSI control codes
Adds a new extension method IAnsiConsole.WriteAnsi that writes
VT/ANSI control codes to the console. If VT/ANSI control codes are
not supported, nothing will be written.
2021-04-22 22:16:10 -04:00
3e2eea730b Add output abstraction and reorganize profile
* Moves ColorSystem from Profile to Capabilities
* Renames Tty to IsTerminal
* Adds IAnsiConsoleOutput to make output more flexible

Closes #343
Closes #359
Closes #369
2021-04-13 21:39:54 -04:00
2fe2bb3c32 Add parameterless Clear method for IAnsiConsole
Closes #338
2021-04-11 22:01:14 -04:00
254880e93a Replaces emoji regex with ReadOnlySpan implementation
The RegEx runtime perf was never anything noticeable - it was the startup time that was eating over a third of time during initialization.

This shaves 200ms off the startup time.
2021-04-04 04:10:25 +02:00
6f16081f42 Add support for indeterminate progress
This commit also changes the behavior of ProgressContext.IsFinished.
Only tasks that have been started will be taken into consideration,
and not indeterminate tasks.

Closes #329
Closes #331
2021-04-03 09:42:49 -04:00
20650f1e7e Change IAnsiConsole to render IRenderable
This makes it possible for encoders to output better representation
of the actual objects instead of working with chopped up segments.

* IAnsiConsole.Write now takes an IRenderable instead of segments
* Calculating cell width does no longer require a render context
* Removed RenderContext.LegacyConsole
* Removed RenderContext.Encoding
* Added Capabilities.Unicode
2021-03-28 09:06:06 -04:00
8830779875 Add params to ProgressExtensions.Columns(...)
This way you can omit `new ProgressColumn[] { ... }` and just list the columns separated by comma.
2021-03-25 21:11:51 +01:00
7f6f2437b1 Add support for exclusive mode 2021-03-15 13:14:40 -04:00
9502aaf2b9 Allow markup in selection prompts
Closes #221
2021-03-14 21:27:44 -04:00
e4dda283bb Adds overloads for MarkUp methods without args
These methods don't require a string.format call so we'll directly call the Render method without a call to string.format.

Added bonus of a a couple fewer allocations too.
2021-03-08 15:04:55 +01:00
stf
1c769c6610 Add Progress.HideCompleted 2021-03-04 07:47:00 -05:00
c64884854f Make it possible to set Value directly 2021-02-25 11:56:32 +01:00
a1050fc676 Handle output to stderr 2021-02-14 18:08:42 +01:00
102e2dc38d Allow formatting breakdown charts with lambda expr
Relates to #252
2021-02-13 17:09:51 +01:00
705cf745ea Add formatting support for breakdown chart values
Closes #252
2021-02-05 11:53:55 +01:00
b64e016e8c Add breakdown chart support
This also cleans up the bar chart code slightly and fixes
some minor bugs that were detected in related code.

Closes #244
2021-02-01 01:03:39 +01:00
a23bec4082 Add profile support
Closes #231
2021-01-19 17:53:03 +01:00
07db28bb6f Add enhancements to progress widget
* Adds TransferSpeedColumn
* Adds DownloadedColumn
* Adds ElapsedTimeColumn
* Minor enhancements to existing columns
2021-01-12 14:10:07 +01:00
8261b25e5c Fix tree rendering
Fixes some tree rendering problems where lines were not properly drawn
at some levels during some circumstances.

* Change the API back to only allow one root.
* Now uses a stack based approach to rendering instead of recursion.
* Removes the need for measuring the whole tree in advance.
  Leave this up to each child to render.
2021-01-10 15:55:11 +01:00
0e0f4b4220 Add interactive prompts for selecting values
* Adds SelectionPrompt
* Adds MultiSelectionPrompt

Closes #210
2021-01-09 09:37:28 +01:00
1f211d3e1f Add convenience methods for tree nodes 2021-01-03 23:28:55 +01:00
87e6b42409 Add tree example 2021-01-03 23:28:55 +01:00
4bfb24bfcb Streamline tree API a bit 2021-01-03 23:28:55 +01:00
179e243214 Clean up table rendering a bit 2021-01-02 09:33:22 +01:00
e71db7f78c fix some nullability issues 2020-12-31 11:09:03 +01:00
7dccb310f3 Add support for bar charts
Closes #103
2020-12-23 10:05:08 +01:00
1cf30f62fc Add autocomplete for text prompt
Closes #166
2020-12-22 11:31:22 +01:00
acf01e056f Clean up status related code a bit 2020-12-09 08:37:32 +01:00