102 Commits

Author SHA1 Message Date
Patrik Svensson
c3ec6a7363
Add Layout widget (#1041)
* Add width to panels
* Add height to panels
* Replace RenderContext with RenderOptions
* Remove exclusivity from alternative buffer
* Add Layout widget
* Add Align widget
2022-11-15 10:12:17 +01:00
Patrik Svensson
7dce4af552 Add support for .NET 7.0 2022-11-10 12:01:13 +01:00
Gary McDougall
eb02c3d534
Custom mask for secret (#970)
* Masking Character added, not yet used.

* Setting the masking character can be chained with other extensions.

* Added string extension for masking, and replaced hardcoded asterisks.

* Check if mask is null first.

* Fixed Typo in previous test and added new test for custom masks.

* Added tests for masking with null character

* Added docs and example.

* Adjusted extensions so that Mask is integrated into Secret extension. Updated Exampls and Tests accordingly
2022-09-26 20:34:41 +02:00
Patrik Svensson
dc93edef15 Remove the 'net50' TFM
Also updates all dependencies to the latest version.

Closes #829
2022-07-02 11:18:34 +02:00
dependabot[bot]
ff8fd9ed2a Bump Newtonsoft.Json from 12.0.3 to 13.0.1 in /examples/Console/Columns
Bumps [Newtonsoft.Json](https://github.com/JamesNK/Newtonsoft.Json) from 12.0.3 to 13.0.1.
- [Release notes](https://github.com/JamesNK/Newtonsoft.Json/releases)
- [Commits](https://github.com/JamesNK/Newtonsoft.Json/compare/12.0.3...13.0.1)

---
updated-dependencies:
- dependency-name: Newtonsoft.Json
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-06-30 14:32:43 +02:00
Patrik Svensson
36ca22ffac Move Spectre.Console.Cli to it's own package 2022-05-15 00:09:52 +02:00
Patrik Svensson
fbe1d0b6f2
Add documentation for TextPath widget (#757) 2022-03-01 20:56:58 +01:00
Patrik Svensson
eb4a7d3bf4 Add support for alignment 2022-02-23 09:06:51 -05:00
Patrik Svensson
5e41a2f505 Add support for styling segments 2022-02-23 09:06:51 -05:00
Patrik Svensson
66fc949e2a Initial work on TextPath widget 2022-02-20 23:26:04 -05:00
Phil Scott
c2da268129
Docs redesign (#728)
* Adding a dark mode
* Adding reference for types to summary pages
* Adding API Reference
* Adding modifiers to methods/fields/etc
* Minimizing files input
* Caching a lot of the output pages
* Cache only for each execution
* Adding API references to existing docs
2022-02-14 18:44:25 +01:00
Phil Scott
78958aae27 Adding better type names for return types and parameters
Uses the typenamehelper from Ben.Demystifer to help break down things like generic lists into their actual type display name.
2022-02-04 10:30:09 +01:00
Phil Scott
a0e20f299c Improves exception rendering for async methods 2022-02-03 17:10:30 +01:00
Nils Andresen
9a6d8d92b4 (#674) changed TypeResolver in Cli/logging
to adhere to the specifications set in #620
2022-01-02 10:26:04 +01:00
Patrik Svensson
ec1188b837 Use file scoped namespace declarations 2021-12-22 08:51:17 -05:00
Patrik Svensson
fd4b96944e Add support for alternate screen buffers
Closes #250
2021-11-30 12:13:14 -05:00
Patrik Svensson
225305f90e Update examples to net6.0
Closes #604
2021-11-23 22:30:45 -05:00
Nils Andresen
2f6b4f53c4 (#555) Clarify ITypeResolver returns null
and does not throw on unresolvable types.
Also changed the TypeResolverAdapter to adhere
to those expectations and removed the now no longer
needed try-catch from CommandPropertyBinder.
2021-11-14 01:19:27 +01:00
Patrik Svensson
e0395dfa2b Add AnsiConsole.Write method
This commit also obsoletes the `AnsiConsole.Render` method.

Closes #576
2021-10-05 09:33:33 -04:00
GitHubPang
d34012cad0 Fix typos in code comments 2021-09-13 22:58:52 -04:00
Patrik Svensson
e169df6303 Add support for manipulating individual table rows
Closes #500
2021-08-14 23:35:07 +02:00
Patrik Svensson
5f97f2300c Support cancellation of prompts
Closes #417
2021-07-11 23:10:17 -04:00
Patrik Svensson
6e2ca8449e Add solution for examples 2021-07-11 22:59:02 -04:00
Patrik Svensson
58eff30787 LineTreeGuide should not fall back to ASCII
If the user's environment didn't support unicode, we used
to fall back to using the AsciiTreeGuide if LineTreeGuide
was being used (which it is by default). This commit removes
that fallback since the characters used in LineTreeGuide is
covered by extended ASCII, which SHOULD be fine in almost all
scenarios.

Closes #324
2021-07-10 18:01:17 -04:00
Nils Andresen
b92827ce3d (#460) added an overload to AnsiConsole.Ask
that takes an additional default value.
2021-06-23 23:47:12 +02:00
Phil Scott
8b058d6342 Renaming analyzer test project to sandbox 2021-06-23 16:36:48 +02:00
Phil Scott
bdcc01ea68 Adding analyzers for common mistakes with live renderables 2021-06-23 16:36:48 +02:00
Phil Scott
4f293d887d Adding analyzer project
Contains two analyzers with fixes

* Use AnsiConsole over System.Console
* Favor local instance over static implementation
2021-06-23 16:36:48 +02:00
Phil Scott
46abadaccb Add AsciiCast demos for docs 2021-05-23 23:30:14 +02:00
Patrik Svensson
a2ed88e2eb Remove some Star Wars movies
Closes #424
2021-05-21 11:14:18 +02:00
Patrik Svensson
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
Patrik Svensson
315a52f3e9 Add support for hierarchical list prompts
Closes #412
2021-05-18 11:34:16 -04:00
Patrik Svensson
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
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
6a5c507936 Rename 'Demo' example to 'Showcase' 2021-04-09 22:01:05 +02:00
Patrik Svensson
ca036f6543 Add demo example 2021-04-07 20:32:07 -04:00
Patrik Svensson
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
Thomas Freudenberg
6bceac8a5e enable disposing ITypeResolver 2021-03-30 00:53:38 +02:00
Patrik Svensson
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
7f6f2437b1 Add support for exclusive mode 2021-03-15 13:14:40 -04:00
Patrik Svensson
c2bab0ebf8 Allow custom instructions for prompts
Closes #229
2021-03-14 21:27:44 -04:00
Phil Scott
1cd335e785
Serilog example for logging 2021-03-04 08:39:53 +01:00
Patrik Svensson
102e2dc38d Allow formatting breakdown charts with lambda expr
Relates to #252
2021-02-13 17:09:51 +01:00
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
705cf745ea Add formatting support for breakdown chart values
Closes #252
2021-02-05 11:53:55 +01:00
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
e20f6284f9 Clean up profile enrichment 2021-01-29 20:16:52 +01:00
David Butler
953008b5e3
Implemented buffer/stream constructors for CanvasImage (#246)
* Implemented buffer/stream constructors for CanvasImage and added section to Canvas example

Signed-off-by: David Butler <mail@davidbutlerdesign.co.uk>
2021-01-27 18:12:22 +01:00
Patrik Svensson
a23bec4082 Add profile support
Closes #231
2021-01-19 17:53:03 +01:00
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