Patrik Svensson and Phil Scott
cba02070f9
Add method to get VT/ANSI codes for renderables
2021-04-23 13:09:44 -04:00
Patrik Svensson and Phil Scott
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
Patrik Svensson and Phil Scott
04efd1719c
Add new test framework for consoles
2021-04-19 20:39:45 -04:00
Patrik Svensson and Phil Scott
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
Patrik Svensson and Phil Scott
3545e0f6b5
Add example infrastructure
...
* Add "Shared" projects for all examples
* Update "Colors" example with better TrueColor demo
* Use same namespace for all examples
2021-04-11 22:03:13 -04:00
Patrik Svensson and Phil Scott
2fe2bb3c32
Add parameterless Clear method for IAnsiConsole
...
Closes #338
2021-04-11 22:01:14 -04:00
Patrik Svensson and Phil Scott
1fc6f22ea9
Remove Style.Clone method
...
Closes #362
2021-04-11 21:58:58 -04:00
Patrik Svensson and Patrik Svensson
6a5c507936
Rename 'Demo' example to 'Showcase'
2021-04-09 22:01:05 +02:00
Patrik Svensson and Phil Scott
efa3d3b130
Add NuGet.Config
2021-04-09 08:45:30 -04:00
Patrik Svensson and Phil Scott
6007fcaafc
Update to .NET SDK 5.0.202
2021-04-09 07:48:10 -04:00
Patrik Svensson and Phil Scott
13ac38ed04
Fix color system mapping bug
...
Closes #342
2021-04-08 12:18:54 -04:00
Patrik Svensson and Phil Scott
ca036f6543
Add demo example
2021-04-07 20:32:07 -04:00
Patrik Svensson and Phil Scott
fe5096dceb
Fixes color system detection bug
...
If an application runs on Windows 10.0.15063 or above, on a
runtime prior to net5.0, the color system detection will fail
and fall back to 8-bit color support.
The reason for this is because the behavior of
Environment.OSVersion.Version differs between runtimes. Unless you're
running on net5.0, both the major and build version components will
not reflect those in the actual Windows version.
2021-04-07 11:15:45 -04:00
Patrik Svensson
dafbfe63ba
Update link to docs site
2021-04-05 17:54:32 +02:00
Patrik Svensson
a2ab522516
Add CNAME
2021-04-05 17:45:29 +02:00
Patrik Svensson
8778ab1739
Set new host for docs
2021-04-05 17:41:18 +02:00
Patrik Svensson
693e1fa170
Update links, references and copyright
2021-04-05 16:59:09 +02:00
Patrik Svensson
4b37a4708f
Update documentation
2021-04-05 16:48:02 +02:00
Patrik Svensson and Phil Scott
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
Patrik Svensson and Phil Scott
1ed7e65fcb
Make VT-100 sequences easier to understand
2021-03-28 12:51:19 -04:00
Patrik Svensson and Phil Scott
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
Patrik Svensson and Phil Scott
9c46c21e27
Fix argument order
...
Closes #319
2021-03-24 18:58:17 -04:00
Patrik Svensson and Phil Scott
7f6f2437b1
Add support for exclusive mode
2021-03-15 13:14:40 -04:00
Patrik Svensson and Phil Scott
c2bab0ebf8
Allow custom instructions for prompts
...
Closes #229
2021-03-14 21:27:44 -04:00
Patrik Svensson and Phil Scott
9502aaf2b9
Allow markup in selection prompts
...
Closes #221
2021-03-14 21:27:44 -04:00
Patrik Svensson and Phil Scott
57a8e6ccc1
Support Home, End, PgUp, and PgDown in prompts
...
Closes #296
2021-03-14 21:27:44 -04:00
Patrik Svensson and Phil Scott
8c099a0038
Add Elmah.io as sponsor
2021-03-14 21:17:56 -04:00
Patrik Svensson and Phil Scott
29e6e34f83
Support setting the static console
2021-03-01 15:22:35 -05:00
Patrik Svensson
17ee8990f4
Update example image
2021-02-15 13:01:30 +01:00
Patrik Svensson and Patrik Svensson
102e2dc38d
Allow formatting breakdown charts with lambda expr
...
Relates to #252
2021-02-13 17:09:51 +01:00
Patrik Svensson and Patrik Svensson
28e9c14de4
Register the console lazily in CLI type registrar
...
This should fix a strange bug we're seeing in Cake on macOS.
2021-02-12 02:04:59 +01:00
Patrik Svensson
fd217ffc83
Update sponsor text
2021-02-11 23:22:43 +01:00
Patrik Svensson
95ec04df40
Add sponsor information
2021-02-11 23:20:11 +01:00
Patrik Svensson and Patrik Svensson
705cf745ea
Add formatting support for breakdown chart values
...
Closes #252
2021-02-05 11:53:55 +01:00
Patrik Svensson and Patrik Svensson
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
Patrik Svensson and Patrik Svensson
58400fe74e
Fix code generation
...
Previous changes introduced some bugs to the
code generation scripts and templates, which
now have been fixed.
2021-01-29 21:46:08 +01:00
Patrik Svensson and Patrik Svensson
e20f6284f9
Clean up profile enrichment
2021-01-29 20:16:52 +01:00
Patrik Svensson and Patrik Svensson
31a5e17a45
Remove InteractivityDetector
2021-01-19 18:12:15 +01:00
Patrik Svensson and Patrik Svensson
f06dc7e7d8
GitHub actions should use default width (for now)
2021-01-19 18:12:15 +01:00
Patrik Svensson and Patrik Svensson
a23bec4082
Add profile support
...
Closes #231
2021-01-19 17:53:03 +01:00
Patrik Svensson and Patrik Svensson
913a7b1e37
Add support for default choice in selection prompt
...
Closes #234
2021-01-15 17:05:11 +01:00
Patrik Svensson and Patrik Svensson
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
Patrik Svensson and Patrik Svensson
a977fdadff
Fix tree node collection type
2021-01-10 16:59:40 +01:00
Patrik Svensson and Patrik Svensson
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
Patrik Svensson and Patrik Svensson
0e0f4b4220
Add interactive prompts for selecting values
...
* Adds SelectionPrompt
* Adds MultiSelectionPrompt
Closes #210
2021-01-09 09:37:28 +01:00
Patrik Svensson and Patrik Svensson
3a593857c8
Add progress and status result overloads
2021-01-06 09:54:45 +01:00
Patrik Svensson and Patrik Svensson
11e192e750
Update Canvas tests
2021-01-06 09:54:45 +01:00
Patrik Svensson and Patrik Svensson
0796bad598
Add contributing guidelines
2021-01-05 14:38:29 +01:00
Patrik Svensson and Patrik Svensson
1bb0b9ccc6
Fix expectation structure
2021-01-05 11:09:35 +01:00
Patrik Svensson and Patrik Svensson
1f211d3e1f
Add convenience methods for tree nodes
2021-01-03 23:28:55 +01:00
Patrik Svensson and Patrik Svensson
87e6b42409
Add tree example
2021-01-03 23:28:55 +01:00
Patrik Svensson and Patrik Svensson
1aa958ced3
Add support for multiple tree roots
2021-01-03 23:28:55 +01:00
Patrik Svensson and Patrik Svensson
4bfb24bfcb
Streamline tree API a bit
2021-01-03 23:28:55 +01:00
Patrik Svensson and Patrik Svensson
179e243214
Clean up table rendering a bit
2021-01-02 09:33:22 +01:00
Patrik Svensson and Patrik Svensson
c6210f75ca
Prevent endless loop in tokenization
...
Closes #198
2021-01-01 23:01:51 +01:00
Patrik Svensson and Patrik Svensson
b81739567b
Fix argument order in help
...
Closes #188
2021-01-01 13:43:28 +01:00
Patrik Svensson and Patrik Svensson
5cf41725a5
Do not split remaining args on space
...
Closes #186
2021-01-01 12:19:37 +01:00
Patrik Svensson and Patrik Svensson
79742ce9e3
Parse quoted strings correctly
...
When parsing quoted strings, space was not handled
properly in remaining arguments.
Fixes #186
2020-12-30 18:43:29 +01:00
Patrik Svensson and Patrik Svensson
241423dd16
Do not truncate command table
...
Temporary fix for commands not showing up if they
are missing a description. This is really a bug in the table
rendering and should be fixed there at some point.
Closes #192
2020-12-30 18:43:29 +01:00
Patrik Svensson and Patrik Svensson
4e2251fd62
Add migration guide for Spectre.Cli
2020-12-29 10:29:26 +01:00
Patrik Svensson and Patrik Svensson
0ae419326d
Add Spectre.Cli to Spectre.Console
...
* Renames Spectre.Cli to Spectre.Console.Cli.
* Now uses Verify with Spectre.Console.Cli tests.
* Removes some duplicate definitions.
Closes #168
2020-12-28 17:28:03 +01:00
Patrik Svensson and Patrik Svensson
7dccb310f3
Add support for bar charts
...
Closes #103
2020-12-23 10:05:08 +01:00
Patrik Svensson and Patrik Svensson
1cf30f62fc
Add autocomplete for text prompt
...
Closes #166
2020-12-22 11:31:22 +01:00
Patrik Svensson and Patrik Svensson
e280b82679
Fix dividing with infinity bug
...
When calculating the remaining time for a progress task,
we divide the value delta with the current speed.
If the speed is zero, then the resulting double will
be 'infinity' which will lead to TimeSpan.FromSeconds
throwing.
This commit fixes that bug by setting the speed to 1
if it's 0 when calculating the remaining time.
Closes #169
2020-12-17 00:43:47 +01:00
Patrik Svensson and Patrik Svensson
6932c95731
Fix bug when splitting text containing CJK chars
...
In Segment.Split, we didn't take cell width into account
when calculating the offset, which resulted in some "fun" bugs.
I've added a new overload for Segment.Split and obsoleted the old one.
Closes #150
2020-12-17 00:02:00 +01:00
Patrik Svensson and Patrik Svensson
63abcc92ba
Set max value for progress task properly
...
Also clamp the task value if it's greater than the max value.
Closes #163
2020-12-12 17:29:07 +01:00
Patrik Svensson and Patrik Svensson
acf01e056f
Clean up status related code a bit
2020-12-09 08:37:32 +01:00
Patrik Svensson and Patrik Svensson
501db5d287
Add status support
2020-12-09 00:07:02 +01:00
Patrik Svensson and Patrik Svensson
cbed41e637
Add support for different spinners
2020-12-06 15:41:45 +01:00
Patrik Svensson and Patrik Svensson
3c504155bc
Fix progress rendering bug
2020-12-04 10:19:09 +01:00
Patrik Svensson and Patrik Svensson
ae32785f21
Add progress task list support
2020-12-04 07:29:48 +01:00
Patrik Svensson
b7cd7dd53e
Fix grammar in Canvas Image docs
2020-11-25 13:52:17 +01:00
Patrik Svensson
3e1251b86a
Fix heading size
2020-11-25 13:41:11 +01:00
Patrik Svensson
01fdbac51e
Fix typo in package description
2020-11-25 12:16:26 +01:00
Patrik Svensson
b0b988a1e7
Add Canvas and CanvasImage docs
2020-11-25 12:15:25 +01:00
Patrik Svensson and Patrik Svensson
2a9fa223de
Add canvas and image support
...
Adds support for drawing "pixels" and displaying
images in the terminal.
2020-11-25 10:07:34 +01:00
Patrik Svensson and Patrik Svensson
4f6eca4fcb
Fix rendering of exceptions with generic params
...
Closes #145
2020-11-24 22:16:17 +01:00
Patrik Svensson and Patrik Svensson
a5125d640c
Add initial FIGlet docs
2020-11-22 03:27:15 +01:00
Patrik Svensson and Patrik Svensson
a59e0dcb21
Add FIGlet text support
...
Closes #97
2020-11-22 03:09:42 +01:00
Patrik Svensson
aaf77c3b25
Fix prompt example docs
2020-11-19 14:46:43 +01:00
Patrik Svensson
d70ad661fc
Add docs for text prompts
2020-11-19 14:25:24 +01:00
Patrik Svensson and Patrik Svensson
0d209d8f18
Add text prompt support
2020-11-19 12:24:04 +01:00
Patrik Svensson and Patrik Svensson
380c6aca45
Add net5.0 target framework
2020-11-11 15:28:32 +01:00
Patrik Svensson and Patrik Svensson
b1da5e7ba8
Add support for markup text in panel header
2020-11-07 20:43:53 +01:00
Patrik Svensson
be3350a411
Bump dotnet-example to 1.0.0
2020-11-03 18:14:41 +01:00
Patrik Svensson and Patrik Svensson
a1d11e9d0c
Add support for moving the cursor
2020-10-28 18:57:08 +01:00
Patrik Svensson
93d1971f48
Update rule example and docs
2020-10-27 17:30:50 +01:00
Patrik Svensson and Patrik Svensson
e7f497050c
Add row and column accessors for tables and grids
2020-10-26 18:15:27 +01:00
Patrik Svensson and Patrik Svensson
10daf727e9
Fix outdated documentation
2020-10-26 12:20:17 +01:00
Patrik Svensson and Patrik Svensson
03334f693d
Add support for table footers
2020-10-26 00:01:13 +01:00
Patrik Svensson
c9c0ad733f
Fix rendering bug when splitting lines
...
The bug might occur if there are wide characters such as emojis
at the end of a line. The SplitLines method mixed cell width
and text length, which might give incorrect results. This commit
makes sure that comparison and calculation is done using cell width
where it's appropriate.
2020-10-24 01:45:41 +02:00
Patrik Svensson and Patrik Svensson
041bd016a2
Remove verbs from extension methods
...
Removed the verbs from all extension methods that manipulate
properties which makes the API more succinct and easier to read.
Also added implicit conversion from string to Style.
As a good OSS citizen, I've obsoleted the old methods with
a warning for now, so this shouldn't break anyone using
the old methods.
2020-10-23 15:08:18 +02:00
Patrik Svensson and Patrik Svensson
9afc1ea721
Add support for aligning tables
2020-10-21 18:15:51 +02:00
Patrik Svensson and Patrik Svensson
3941fd81ab
Move table and calendar docs
2020-10-20 02:32:04 +02:00
Patrik Svensson and Patrik Svensson
5a1b8a1710
Add rule widget
...
Adds a new rule widget.
Also fixes some bugs I encountered while testing
some unrelated things in an extremely small console.
2020-10-20 01:45:53 +02:00
Patrik Svensson and Patrik Svensson
1410cba6c5
Add Markdown.Escape method
2020-10-20 01:09:26 +02:00
Patrik Svensson and Patrik Svensson
70fc14e9cd
Add new ctors for Rows and Columns widgets
2020-10-19 21:25:28 +02:00
Patrik Svensson and Patrik Svensson
cb2924a609
Add table heading and footnote support
...
Closes #116
2020-10-19 15:46:57 +02:00
Patrik Svensson and Patrik Svensson
bfffef630f
Do not draw tables that can't be drawn
...
This is a temporary fix for undrawable tables until we've
implemented a proper strategy. What this does is that it replaces
an undrawable table with an ellipsis (...). This should only
occur in either super big tables or deeply nested tables in a
console with a small buffer width.
2020-10-18 08:03:40 +02:00
Patrik Svensson
52718c499c
Fix minor typo in example
2020-10-17 13:22:01 +02:00