Compare commits

...

778 Commits
0.1.0 ... main

Author SHA1 Message Date
nsnail
a46321c06b Support command description localization
eg.
 [CommandOption("-a|--args")]
 [Description(nameof(Str.GitArgs))]
 [Localization(typeof(Str))]
 public string Args { get; set; }

The program will go to the autogenerated class "Str.designer.cs" of the Resx file,  to looking for local value of the the resource symbol "GitArgs" , instead of displaying the original: "GitArgs"
2024-11-29 14:52:42 +08:00
Tom Deseyn
29ab313bb9
Async overloads for AnsiConsole Prompt/Ask/Confirm. (#1194)
* Add async overloads for Prompt/Ask/Confirm.

* Added unit test coverage - AskAsync, ConfirmAsync

* Reordered methods to group non-async/async of the same tests together

---------

Co-authored-by: Frank Ray <52075808+FrankRay78@users.noreply.github.com>
2024-11-28 10:56:19 +00:00
Phil Scott
92daeb739d Update Docs SDK version to 9.0.100, disable NuGetAudit temporarily, and upgrade Scriban to version 5.12.0 for generator 2024-11-23 21:05:36 +01:00
Phil Scott
43e9669395 Update documentation packages to latest versions
* HighlightService was modified to support GetClassifiedSpansAsync method
* Updated Program.cs to pull in the proper location of the Json and ImageSharp extension projects
* Statiq must have changed how they are doing xrefs, so I adjusted those to be more specific with a few links
2024-11-23 14:48:46 +01:00
Phil Scott
ab8384acf6 Update PolySharp to version 1.15.0 and remove Nullable package references 2024-11-23 14:47:01 +01:00
Phil Scott
b2689be3ed Enhance ExceptionFormatter for AOT compatibility by adding fallback handling for stack frames. 2024-11-22 22:55:01 +01:00
Phil Scott
835143d95f Add Native AOT support documentation and update project files for AOT compatibility 2024-11-22 22:55:01 +01:00
Phil Scott
8f2a859087 Fallback to using GetConverter if GetIntrinsicConverter doesn't find one. 2024-11-22 22:55:01 +01:00
Phil Scott
2be8e8da4e Adds fallback for ExceptionFormatter in AOT 2024-11-22 22:55:01 +01:00
Phil Scott
2a8810affd Explicitly marks Spectre.Console.Cli as not trimmable and not appropriate for AOT scenarios. Additionally adds a warning to CommandApp for users who may try it. 2024-11-22 22:55:01 +01:00
Phil Scott
e1d21e7e61 Adding polysharp properly 2024-11-22 22:55:01 +01:00
Phil Scott
c7c3ebdf57 Fix assembly name retrieval for FSharp.Core in TypeNameHelper to work better in AOT scenarios 2024-11-22 22:55:01 +01:00
Phil Scott
b67af32423 Add RequiresDynamicCode attribute to exception formatter to indicate incompatability with AOT 2024-11-22 22:55:01 +01:00
Phil Scott
10773a5625 Refactor enum value retrieval to use EnumUtils for better compatibility with NetStandard 2.0 and AOT 2024-11-22 22:55:01 +01:00
Phil Scott
4802751357 Add AOT compatibility and PolySharp package support 2024-11-22 22:55:01 +01:00
Frank Ray
4515d89705
ProgressTask.GetPercentage() returns 100 when max value is 0 (#1694) 2024-11-22 12:44:00 +01:00
Patrik Svensson
be45494d6e
Merge pull request #1691 from phil-scott-78/emoji-perf 2024-11-21 00:30:24 +01:00
Phil Scott
69689d2ba1 Changes Emoji dictionary to OrdinalIgnoreCase for performance
This code is ran on startup, and instantiating a new InvariantCultureIgnoreCase was taking up 11ms, which was half the time in AOT.
2024-11-20 17:55:33 -05:00
Tim Pilius
aa9e5c48c6
Adding TransferSpeedColumn configuration to display bits/bytes + binary/decimal prefixes (#904)
* Adding configuration to TransferSpeedColumn to be able to display in both bytes/bits, as well as using binary/decimal prefix definitions.

---------

Co-authored-by: Frank Ray <52075808+FrankRay78@users.noreply.github.com>
2024-11-19 15:41:49 +00:00
PascalSenn
8d06daf355
Fixed typo in Segment description (#1687) 2024-11-19 06:09:22 +01:00
Mattias Karlsson
cecfdc386c
Fix typos (#1684) 2024-11-13 15:00:21 +01:00
Patrik Svensson
375a708c43
Add net9.0 support, remove legacy TFM:s (#1682)
* Update .NET SDK to 9.0.100
* Remove net6.0
* Remove net7.0
* Update dependencies
* Install correct .NET SDK:s in GitHub Actions
2024-11-13 14:54:01 +01:00
Jonathan Sheely
574ead6d46
Added hex color conversion (#1432)
* Added hex color conversion

---------

Co-authored-by: Frank Ray <52075808+FrankRay78@users.noreply.github.com>
Co-authored-by: Nils Andresen <nils@nils-andresen.de>
2024-11-13 13:35:26 +01:00
BlazeFace
a87277e859
Adding Enricher for Azure Pipelines (#1675) 2024-11-04 16:30:35 +01:00
Patrik Svensson
fdc03f2081
Merge pull request #1514 from BlazeFace/blz/issues/1390 2024-10-30 01:36:05 +01:00
BlazeFace
3eb620a44e Fix typo 2024-10-26 07:27:31 -07:00
BlazeFace
bc88da8056 Added last file and used fluent style, relocated test 2024-10-26 07:25:38 -07:00
BlazeFace
00b9aecb4f Add new test files 2024-10-26 07:18:52 -07:00
BlazeFace
444dbed259 Merge remote-tracking branch 'upstream/main' into blz/issues/1390
# Conflicts:
#	src/Tests/Spectre.Console.Tests/Expectations/Widgets/Layout/Render_Layout_With_Three_And_One_Columns.Output.verified.txt
2024-10-25 17:47:02 -07:00
Arman Ossi Loko
a32dc8030b Fixed docs examples URLs redirecting to the examples repository 2024-10-18 11:33:23 +02:00
renovate[bot]
75547b2436 chore: Update dependency Verify.Xunit to 26.4.5 2024-09-14 14:47:38 +02:00
renovate[bot]
22d1cbe01f chore: Update dependency Roslynator.Analyzers to 4.12.5 2024-09-14 14:36:40 +02:00
Patrik Svensson
7f8ed509bb Fix strange sentence in docs 2024-09-14 14:15:32 +02:00
Cédric Luthi
c70a8b8fc5 Improve exception if a (multi)selection prompt is used incorrectly
Before this commit, the selection prompt would throw an `InvalidOperationException` (Sequence contains no elements) and the multi selection prompt would throw an `ArgumentOutOfRangeException` (Index was out of range. Must be non-negative and less than the size of the collection.)

Both would occur because the prompts were never meant to be empty.
2024-09-11 10:16:21 +02:00
renovate[bot]
b470af11f7
chore: Update dependency Microsoft.NET.Test.Sdk to 17.11.1 (#1630)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-11 09:00:27 +02:00
renovate[bot]
23b160a3f5
chore: Update dependency Verify.Xunit to 26.4.4 (#1624)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-11 08:57:27 +02:00
renovate[bot]
1345a6347a
chore: Update dependency MinVer to v6 (#1629)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-09-11 08:52:25 +02:00
Davide Piccinini
78f3f80b17
Update documentation: add example for the Text Prompt usage (#1636) 2024-09-10 09:03:20 +02:00
Davide Piccinini
a55b80220d
Enhance the style of the checkboxes for multi-selection (#1244)
* Enhance the checkboxes' style for multi-selection by applying the selected style, if available, to the checkboxes currently selected.
2024-09-09 16:35:01 +02:00
Davide Piccinini
f8a4b2271d Add unit test to ensure code coverage 2024-09-09 14:28:13 +02:00
Davide Piccinini
dba7ad0875 Fix SA1513 line 38 Tree.cs 2024-09-09 14:28:13 +02:00
Davide Piccinini
322ed2efbb Fix error SA1300 in full property creation 2024-09-09 14:28:13 +02:00
Davide Piccinini
156d254208 Fix issue 1153 on expanded tree 2024-09-09 14:28:13 +02:00
d.piccinini
3437130bf0 Removed blank line 2024-09-09 10:21:00 +02:00
d.piccinini
32384f7b8d Add custom highligh style for single calendar event 2024-09-09 10:21:00 +02:00
Cédric Luthi
32361d3f15
Cleanup prompt tests (#1635)
* Move Should_Search_In_Remapped_Result into the SelectionPromptTests class where it belongs
* Use file sealed class for CustomItem, like it's done with CustomSelectionItem in the selection prompt tests
2024-09-07 15:19:55 +01:00
Daniel Cazzulino
b9d2d2df6d Add spanish translation for help strings 2024-09-06 20:36:30 +02:00
Daniel Cazzulino
8e44a83737 Simplify InternalsVisibleTo
If the $(PublicKey) property is used, the SDK targets will automatically use it for the assembly attributes.

See https://github.com/dotnet/sdk/pull/3439

Simplifies https://github.com/spectreconsole/spectre.console/pull/1623
2024-09-06 20:31:18 +02:00
Patrik Svensson
fd69ad0b01 Fix search bug in prompt related to custom item types
Closes #1626
2024-09-03 00:46:18 +02:00
Kirill Osenkov
753894de94 Bump Spectre.Verify.Extensions to strong-named version
Remove NoWarn now that Spectre.Verify.Extensions is strong-named
2024-09-02 02:49:21 +02:00
renovate[bot]
dc2cb40b79 chore: Update rickstaa/top-issues-action action to v1.3.101 2024-08-30 09:40:24 +02:00
renovate[bot]
511f798f0f chore: Update dependency Microsoft.NET.Test.Sdk to 17.11.0 2024-08-30 09:34:15 +02:00
renovate[bot]
2081c0fd9a chore: Update dependency dotnet-sdk to v8.0.401 2024-08-30 09:30:53 +02:00
Patrik Svensson
96512f353f Fix regression in Razor syntax 2024-08-30 09:18:07 +02:00
Patrik Svensson
56feea11a1 Fix the workflow. Third time the charm? 2024-08-30 09:01:52 +02:00
Patrik Svensson
45c24055fa (Hopefully) fix workflow 2024-08-30 09:01:03 +02:00
Patrik Svensson
d56139756c Lock SDK for documentation for now 2024-08-30 08:59:15 +02:00
Patrik Svensson
7af1eedca7
Merge pull request #1623 from KirillOsenkov/dev/kirillo/snk 2024-08-30 07:45:19 +02:00
Kirill Osenkov
6116af3844 Strong name the assemblies 2024-08-29 16:52:55 -07:00
Patrik Svensson
2cc6c457ad
Merge pull request #1603 from spectreconsole/renovate/verify.xunit-26.x
chore: Update dependency Verify.Xunit to v26.2.0
2024-08-10 13:07:40 +02:00
renovate[bot]
f02b46107e
chore: Update dependency Verify.Xunit to v26.2.0 2024-08-10 10:41:25 +00:00
Patrik Svensson
42fd801876 Preparations for the 1.0 release
* Less cluttered solution layout.
* Move examples to a repository of its own.
* Move Roslyn analyzer to a repository of its own.
* Enable central package management.
* Clean up csproj files.
* Add README file to NuGet packages.
2024-08-06 15:38:28 +02:00
tonwin618
bb72b44d60 Delete based on character width when pressing Backspace. 2024-08-01 11:07:16 +02:00
ymqn
d79e6adc5f Updated test expectations to match changes in HtmlEncoder 2024-07-25 23:13:06 +02:00
ymqn
64b9ef582d Fixed incorrect decoration check from Bold to Italic in HtmlEncoder.BuildCss 2024-07-25 23:13:06 +02:00
renovate[bot]
a19c84e25a chore: Update dependency SixLabors.ImageSharp to v3.1.5 [SECURITY] 2024-07-22 19:50:33 +02:00
Jan Klass
b61fff042b Make method reference to Markup.Escape more obvious
best-practices refers and links to the `Markup.Escape` method but labeled it `EscapeMarkup`.

I got quite confused trying to find EscapeMarkup. Using the typical *class dot method* pattern seems preferable. It also matches what you write in code.
2024-06-23 14:29:25 +02:00
Jan Klass
ca441dbe7a Fix outdated issue label reference 'up for grabs' -> 'good first issue' 2024-06-23 14:28:52 +02:00
Jan Klass
f6bcf67cbe Update MSDN link to learn.microsoft.com 2024-06-23 14:27:33 +02:00
Daniel Cazzulino
5c87d7fa04 Allow using -? as a shorthand for -h
Given that it's quite a common switch and extremely unlikely to be already in use for something else, we can just consider it to be the same as having entered `-h` as an arg.

This adds the `?` as a valid option character name.

Fixes #1547
2024-05-29 08:38:55 +02:00
renovate[bot]
0e2ed511a5 chore: Update dependency Microsoft.NET.Test.Sdk to v17.10.0 2024-05-22 18:18:50 +02:00
Mattias Karlsson
7b13148773 Trim trailing comma in settings 2024-05-17 16:51:45 +02:00
renovate[bot]
e5a6459c52 chore: Update rickstaa/top-issues-action action to v1.3.100 2024-04-27 16:43:19 +02:00
renovate[bot]
68b28b57f2 chore: Update dependency Roslynator.Analyzers to v4.12.2 2024-04-27 16:42:58 +02:00
renovate[bot]
43b5ac99f9 chore: Update dependency dotnet-sdk to v8.0.204 2024-04-27 11:34:51 +02:00
Sean Fausett
b1b50a21f7 Remove redundant explain settings ctor 2024-04-27 07:41:08 +02:00
Patrik Svensson
5d4b2c88e5 Add extension method to use automatic application version 2024-04-25 20:28:13 +02:00
Patrik Svensson
3acc90e47c Make -v|--version opt-in
We added an automatic version option in 0.49. We did this with good
intentions, but forgot that people might already use --version
as an option for a root command.

This commit makes -v|--version completely opt-in.
2024-04-25 20:28:13 +02:00
Patrik Svensson
88515b7d7f Add Verify.Tool dotnet tool 2024-04-25 20:28:13 +02:00
Patrik Svensson
c5e11626b5 Add blog post for 0.49 release 2024-04-23 15:18:52 +02:00
Patrik Svensson
2ead177404 Update social card to show .NET 8.0 2024-04-23 15:18:42 +02:00
Patrik Svensson
71f762f646 Add token representation to remaining arguments
Before, when adding parsed information to the IRemainingArguments.Parsed,
we used the name of the parsed option ('foo') instead of it's
representation ('--foo'). This commit fixes that.
2024-04-23 14:10:04 +02:00
Patrik Svensson
95bff47b85 Expose raw arguments on the command context 2024-04-20 22:17:31 +02:00
renovate[bot]
de04619f88 chore: Update dependency Roslynator.Analyzers to v4.12.1 2024-04-17 09:53:53 +02:00
Frank Ray
ecdfdd4b85
Please upvote 👍 if you are interested in it (#1491) 2024-04-16 08:43:29 +01:00
Frank Ray
a893a9601e
Top Issues GitHub Action (#1488) 2024-04-14 12:47:55 +01:00
BlazeFace
d52d14e848 Undo debug change and add method group 2024-04-13 17:23:26 -07:00
BlazeFace
a62e79992b Undo debug changes 2024-04-13 17:20:12 -07:00
BlazeFace
4f22f5b7c3 Add Reference File 2024-04-13 17:19:19 -07:00
BlazeFace
ff7282ecb8 Adding test and update render to fix issue with rendering separator when headers are hidden fixing issue 1391. 2024-04-14 02:05:13 +02:00
BlazeFace
eb38f76a6a
Fixing #1507 AddDelegate uses an abstract type when used in a branch (#1509) 2024-04-13 13:40:12 +01:00
BlazeFace
20a2f727f7 Updating test and Ratio calculation 2024-04-09 06:03:45 -07:00
Phil Scott
fc0b553a4a Revert "Fixed render issue where writeline inside status caused corrupt output #415 #694"
This reverts commit 71a5d830671220e601e4e6ab4d4c352ae0e0a64a.

The commit introduced major flickering when working with LiveRenderables

Fixes #1466
2024-04-01 19:47:20 +02:00
Yennefer
1a3249cdae
Improve XmlDoc output (#1503)
* Add command description and examples in XML Output

Closes #1115
2024-03-29 20:30:59 +01:00
Frank Ray
43f9ae92ad Pipe character for listing options - Fully implemented and tested. 2024-03-18 16:31:55 +01:00
Gerardo Grignoli
e66d3aab2e
Added NoStackTrace to ExceptionFormats (#1489) 2024-03-08 15:26:45 +00:00
Tom Longhurst
d921ac6f02
Positioned Progress Tasks - Before or After Other Tasks (#1250) 2024-03-07 08:38:59 +00:00
renovate[bot]
5acd83a3ef chore: Update dependency SixLabors.ImageSharp to v3.1.3 2024-03-05 08:05:38 +01:00
Stuart Lang
397b742bec
Add selection orompt Search (#1289)
* Add selection prompt search as you type

* Fix small bug

* Simplify

* Simplify

* Remove spacebar as a selection prompt submit key

* Trigger CI

* Update src/Spectre.Console/Prompts/SelectionPrompt.cs

Co-authored-by: Martin Costello <martin@martincostello.com>

* Simplifty Mask method

* Handle multi-selection prompt better

* Update API naming

* Address feedback

* Add some tests

* Remove whitespace

* Improve search and highlighting

* Add test case for previous issue

* Add extra test case

* Make prompt searchable

---------

Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Patrik Svensson <patrik@patriksvensson.se>
2024-02-25 12:57:27 +01:00
Martin Costello
d30b08201d Remove [DebuggerDisplay] from Paragraph
The `_text` field no longer exists, so hovering over instances in the debugger just shows an error message.
2024-02-23 14:25:32 +01:00
renovate[bot]
8da05bcc17 chore: Update dependency Roslynator.Analyzers to v4.11.0 2024-02-19 18:31:54 +01:00
renovate[bot]
badcd642ec chore: Update dependency dotnet-example to v3.1.0 2024-02-18 21:20:34 +01:00
Patrik Svensson
fde9ee04cf Automatically register command settings
Closes #428
2024-02-15 21:33:51 +01:00
renovate[bot]
b6e0b2389a chore: Update dependency Verify.Xunit to v23.2.0 2024-02-15 07:45:54 +01:00
renovate[bot]
3f5e8aabf5 chore: Update dependency dotnet-sdk to v8.0.200 2024-02-14 10:54:08 +01:00
renovate[bot]
ead874e6b2 chore: Update dependency dotnet-example to v3 2024-02-13 10:07:55 +01:00
Patrik Svensson
e13410861d Update dependencies to latest version 2024-02-13 09:34:00 +01:00
Daniel Weber
bf3b91a535 Don't erase the prompt text when backspacing on a secret prompt with a null mask. 2024-02-13 09:01:24 +01:00
Daniel Weber
72704529c5 Delete [UsesVerify] which has become obsolete through the latest update. 2024-02-13 08:53:16 +01:00
Patrik Svensson
b21e07ea94 Update dependencies
* Add support for C# 12
* Run all tests on all major .NET SDKs
* Only build on Ubuntu
* Do not build docs for pull requests
* Add Cédric Luthi, and Frank Ray to authors
* Drop netstandard2.0 for ImageSharp plugin
2024-01-31 20:51:49 +01:00
Jonathan Sheely
703d653ec5
Adds ValueFormatter to ProgressBar 2024-01-31 17:37:05 +01:00
Caelan Sayler
71631b248a
Fix potential deadlock when cancelling prompts (#1439) 2024-01-31 12:02:01 +01:00
Tony Knight
63c22575ea
Direct contributors to the current CONTRIBUTING.md (#1435) 2024-01-22 23:15:04 +01:00
Frank Ray
9cc888e5ad
Make HelpProvider colors configurable (#1408) 2024-01-18 15:31:28 +01:00
Frank Ray
d5b4621233 Fully addresses review comments 2024-01-15 19:22:34 +01:00
Frank Ray
cee97821d6 Fix stylecop warning 2024-01-15 19:22:34 +01:00
Frank Ray
55c763a5c2 Completed 2024-01-15 19:22:34 +01:00
Frank Ray
d03c10623c Unit test to reproduce the -v/--version bug 2024-01-15 19:22:34 +01:00
Donovan Brown
5a52c1f277 Updated typo in commandApp.md
There was a sentence where the word `commits` should have been `commands`.
2024-01-13 18:58:32 +01:00
Nils Andresen
544e6a92df
Added the ITypeResolver to the ExceptionHandler (#1411) 2024-01-06 23:34:02 +00:00
Nils Andresen
a94bc15746
Add the possibility to register multiple interceptors (#1412)
Having the interceptors registered with the ITypeRegistrar also enables the usage of ITypeResolver in interceptors.
2024-01-06 22:28:20 +00:00
Chet Husk
e7ce6a69b7 Allow specifying a property to ignore the use of build-time packages for versioning and analysis 2024-01-03 21:45:16 +01:00
Patrik Svensson
7cf7e84dd8 Remove mandelbrot example due to conflicting license
Closes #1423
Closes #1424
2024-01-03 21:31:16 +01:00
Nils Andresen
6f1f29967d (#1363) fix rendering of ListPrompt for odd pageSizes 2024-01-01 10:19:09 +01:00
Nils Andresen
006da0f9ea (#971) added spectre.console.cli to quick-start. 2024-01-01 10:17:59 +01:00
Nils Andresen
c62f79eded Bump CodeAnalyses references
So we can benefit from roslyn issue 69309
and have consistent EOL sequences, even on
auto-generated using statements.
2023-11-28 00:14:54 +01:00
Nils Andresen
1d19079913 add last commit to .git-blame-ignore-revs 2023-11-28 00:14:54 +01:00
Nils Andresen
44300c871f fixed line-endings 2023-11-28 00:14:54 +01:00
Nils Andresen
989c0b9904 added a .gitattributes file
to force lf checkouts on windows
2023-11-28 00:14:54 +01:00
Patrik Svensson
cb52eb63ce Add blog post for 0.48 2023-11-22 22:13:48 +01:00
Patrik Svensson
7397169a27 Update Cake to 4.0.0 2023-11-20 13:14:40 +01:00
Patrik Svensson
ffdb47d77f Build generator as part of build 2023-11-20 13:14:40 +01:00
Patrik Svensson
383bee0e3e Do not push packages to GitHub 2023-11-19 12:18:22 +01:00
Patrik Svensson
4d6541dd14 Add back net7.0 TFM for tests 2023-11-19 12:18:22 +01:00
Patrik Svensson
b1e0896a0d Add net8.0 support 2023-11-14 22:24:53 +01:00
Will Baldoumas
e07ccd9f66
Allow Confirmation Prompt Styling (#1210)
* Allow Confirmation Prompt Styling

* Remove style null check

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

* Remove style null coalesce

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

* Update comment

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

* Remove style null check

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

* Update comment

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

* Remove style null coalesce

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>

---------

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>
2023-11-13 18:23:09 +01:00
Frank Ray
250b1f4c9c
Add localization support to help provider (#1349)
Closes #1349
2023-11-11 00:22:52 +01:00
Nils Andresen
023c77ff09 fixed the build-errors
All of which I introduced earlier.
2023-11-11 00:09:08 +01:00
Nils Andresen
dc402220f2 (#1313) fixed errors in FakeTypeRegistrar and FakeTypeResolver
to make the unit tests pass.
2023-11-11 00:09:08 +01:00
Nils Andresen
c448d0d5f6 (#1313) Add TypeRegistrarBaseTests for the FakeTypeRegistrar
So it also works according to our assumptions.
2023-11-11 00:09:08 +01:00
Nils Andresen
3da367f29f (#1313) fix mixing of Registrations
i.e. combining Register, RegisterInstance and RegisterLazy
2023-11-11 00:09:08 +01:00
Nils Andresen
ead7115cbe (#1313) Add new test to TypeRegistrarBaseTests
to assert the assumptions we're making in the code.
2023-11-11 00:09:08 +01:00
Nils Andresen
1fd028942f (#1313) removed the default registration of the IHelpProvider 2023-11-11 00:09:08 +01:00
Cédric Luthi
4219bbbf61 Allow passing a nullable style in DefaultValueStyle() and ChoicesStyle()
This will allow to slightly simplify the implementation of #1210

See also related discussion on https://github.com/spectreconsole/spectre.console/pull/1349#discussion_r1388385384
2023-11-10 08:01:18 +01:00
Cédric Luthi
29a43686d4 Fix AnsiConsoleOutput safe height
The safe height (introduced in 3e2eea730bf0f6fe4a5e336faa312b526d351079) would be 80 (the value of the safe width) instead of 24.

Removing the explicit `defaultValue` parameter ensures that the correct constants are used, i.e. Constants.DefaultTerminalWidth and Constants.DefaultTerminalHeight.
2023-11-09 12:11:56 +01:00
Patrik Svensson
63b940cf0e
Merge pull request #1338 from nils-a/feature/GH-1188 2023-10-19 11:12:09 +02:00
Nils Andresen
bbf58ee814
(#1188) Rows measure greedy 2023-10-19 07:46:12 +02:00
Patrik Svensson
e2a674815d
Merge pull request #1318 from nils-a/feature/GH-1317 2023-09-27 08:57:52 +02:00
Nils Andresen
343b98944d
added a minimal PR template 2023-09-27 08:28:08 +02:00
Andrew Rathbun
2bbb7c1ab6
Update Showcase.csproj - minor typo (#1315) 2023-09-23 15:55:56 +02:00
Cédric Luthi
5296e56b1c
Fix DefaultValue for FileInfo and DirectoryInfo (#1238)
Commit d3f4f5f208ee76a22ff39c13df4d150712685f5f introduced automatic conversion to FileInfo and DirectoryInfo but failed to properly handle the conversion if the value comes from the [DefaultValue] attribute.

Using both `var (converter, stringConstructor) = GetConverter(...)` and `var (converter, _) = GetConverter(...)` should have been a red flag!
2023-09-21 12:05:42 +01:00
Patrik Svensson
943c045fab
Fixes TextPath rendering bugs (#1308)
* Do not emit line break when rendering
* Don't be greedy when measuring.
* Fix a condition that decides if the path fits in the allotted space.

Closes #1307
2023-09-18 08:04:57 +02:00
Fraser Waters
2af3f7faeb
Add an example showing the decorations off (#1191) 2023-09-16 23:08:52 +02:00
Phil Scott
ed9e198d60
Progress bar header and footer (#1262) 2023-09-16 22:39:43 +02:00
Patrik Svensson
3bee7212b7
Merge pull request #1303 from nils-a/feature/GH-684 2023-09-16 19:37:00 +02:00
Patrik Svensson
c82d8c4523
Add option to show separator between table rows (#1304)
* Add option to show separator between table rows
* Panels should show header if borders are not shown

Closes #835
2023-09-16 18:49:12 +02:00
Nils Andresen
bef21e8a21
(#684) Enable setting the color of the values in a BreakdownChart 2023-09-15 20:12:06 +02:00
Ola Bäcker
037e109699
Fix figlet centering possibly throwing due to negative size (#1302) 2023-09-14 19:50:12 +02:00
Nils Andresen
f7befacd79
(#644) Specified settings for the argument vector (#1301) 2023-09-13 09:06:25 +02:00
Fraser Waters
cec5fb4595
Render tables with zero-width columns (#1197)
Fixes https://github.com/spectreconsole/spectre.console/issues/361
2023-09-12 15:46:25 +02:00
Nils Andresen
9c86391fb6
(#1297) change all SetErrorHandler to SetExceptionHandler (#1298) 2023-09-12 13:57:02 +02:00
Nils Andresen
a3dcb31729
Update ColumnsSample to showcase nicer data (#1295)
Also, I switched the base width of the AsciiCast back
to 82 (from 120) so newly created casts are no longer
overflowing the display with on the pages.

Re-created the Panel and BreakdownChart casts, as
they were currently overflowing due to the 120 chars
width of the cast.
2023-09-12 12:58:18 +02:00
Patrik Svensson
1002c6fe27
Merge pull request #1294 from nils-a/feature/GH-1279 2023-09-11 23:45:39 +02:00
Nils Andresen
c64797d681
(#1279) added the missing columns-cast 2023-09-11 23:26:54 +02:00
Frank Ray
131b37fff8
Allow custom help providers (#1259)
Allow custom help providers

* Version option will show in help even with a default command

* Reserve `-v` and `--version` as special Spectre.Console command line arguments (nb. breaking change for Spectre.Console users who have a default command with a settings class that uses either of these switches).

* Help writer correctly determines if trailing commands exist and whether to display them as optional or mandatory in the usage statement.

* Ability to control the number of indirect commands to display in the help text when the command itself doesn't have any examples of its own. Defaults to 5 (for backward compatibility) but can be set to any integer or zero to disable completely.

* Significant increase in unit test coverage for the help writer.

* Minor grammatical improvements to website documentation.
2023-09-08 09:51:33 +02:00
Tomasz Prasołek
813a53cdfa Fix Rule widget docs 2023-07-16 12:29:04 +02:00
Cédric Luthi
2af901a814 Remove unnecessary [NotNull] attributes
When subclassing `Command<TSettings>` which has the [NotNull] attributes, Rider/ReSharper gives this warning:
> Nullability of type of parameter 'context' in method does not match overridden member `int Spectre.Console.Cli.Command<TSettings>.Execute(CommandContext, TSettings)` (possibly because of nullability attributes)

When subclassing `Command<TSettings>` which does not have the [NotNull] attributes, Rider/ReSharper gives this warning:
> The nullability attribute has no effect and can be safely removed

The solution is simply to remove the [NotNull] attributes.

Since `<Nullable>enable</Nullable>` is set in the project, they are actually not necessary. By the way, the non-generic `Command` class does not have the [NotNull] attributes.
2023-07-12 15:26:12 +02:00
Cédric Luthi
83afa97017 Set end_of_line to LF instead of CRLF
This matches the actual content of the repository (except for a few files which have CRLF instead of LF)

The motivation behind this change is that Rider observes the .editorconfig rules and changes the line ending to CRLF on save. When submitting pull requests the diff is full of changes because all the end of lines were changed from LF to CRLF. By setting `end_of_line` to `LF` the end of lines are not changed on save and the diffs are clean when submitting pull requests.
2023-07-12 15:25:52 +02:00
Jeppe Roi Kristensen
e0ded712e8 Add fix to avoid exception on Rows with no children 2023-06-13 00:36:06 +02:00
Cédric Luthi
d484e832f5 Relax the SDK requirements by rolling forward to the latest feature
This was initially introduced in 3c5b98123b4c9cd50a37da25ca9a3fd34ac7f479 by Daniel Cazzulino, then reverted in 82de4a55c48e269225ff2b137850a303b3776879 by Patrick Svensson because of a bug in the .NET 6.0.401 SDK.
2023-06-07 13:41:09 +02:00
fredrikbentzen
71a5d83067 Fixed render issue where writeline inside status caused corrupt output #415 #694 2023-06-04 20:31:12 +02:00
Ignacio Calvo
35ce60b596
Implemented AddAsyncDelegate (#766) 2023-05-25 11:31:01 +01:00
Frank Ray
0ec70a44db
Async command unit tests 2023-05-19 17:19:17 +01:00
Patrik Svensson
1ee2653cf8
Merge pull request #1231 from FrankRay78/Blog-post-for-0.47.0
Blog post for 0.47.0 (updated)
2023-05-19 18:05:06 +02:00
Frank Ray
4c0178cf9a
Merge branch 'main' into Blog-post-for-0.47.0 2023-05-19 16:50:48 +01:00
Frank Ray
296bc61837 Updated links and github usernames to markdown url format so they render as native html links 2023-05-19 16:48:48 +01:00
Frank Ray
766ccb1f1b Minor grammatical update 2023-05-19 16:40:57 +02:00
Frank Ray
f7314dc2e8 Blog post for 0.47.0 2023-05-19 16:40:57 +02:00
Frank Ray
f453890d13 Minor grammatical update 2023-05-19 12:26:35 +01:00
Frank Ray
2c8f459806 Blog post for 0.47.0 2023-05-19 12:22:28 +01:00
Elisha Aguilera
018f4ebd17
Minor refactors (#1081) 2023-05-14 15:30:27 +01:00
Andrii Rublov
404b052a5f
Add ability to pass example args using params syntax (#1166) 2023-05-12 12:08:42 +01:00
Cédric Luthi
dac2097321
Add support for arrays in [DefaultValue] attributes (#1164)
Fixes #1163
2023-05-11 14:26:53 +01:00
Cédric Luthi
6acf9b8c63
Add an implicit operator to convert from Color to Style (#1160) 2023-05-10 14:20:12 +01:00
Patrik Svensson
3ec0fee795
Merge pull request #1218 from phillip-haydon/patch-1 2023-04-24 08:56:25 +02:00
Phillip Haydon
5843a4545e
Fix coconut spelling 2023-04-24 14:37:06 +08:00
Patrik Svensson
d64d3ec770
Merge pull request #1211 from MaxAtoms/main 2023-04-03 16:32:18 +02:00
Thomas M. Schöller
4dcbd30285
Merge branch 'spectreconsole:main' into main 2023-04-03 12:45:34 +02:00
MaxAtoms
1334319dd1
Add Alacritty as supported Ansi console 2023-04-03 12:42:24 +02:00
Frank Ray
714cf179cb
Command line improvements (#1103)
Closes #187
Closes #203
Closes #1059
2023-04-02 22:43:21 +02:00
Patrik Svensson
70da3f40ff
Merge pull request #1161 from MartinZikmund/dev/mazi/stringcomparer-confirmation 2023-03-16 09:57:15 +01:00
Martin Zikmund
5075732564 Adjustments based on code review 2023-03-16 09:45:42 +01:00
Gérald Barré
10467a2912 Do not register analyzers if SpectreConsole is not available in the current compilation 2023-03-13 20:07:41 -04:00
Gérald Barré
a7ab1b690e Use SymbolEqualityComparer.Default when possible 2023-03-13 20:03:12 -04:00
Gérald Barré
142942b8a2 Simplify access to the SemanticModel in analyzers 2023-03-13 19:58:40 -04:00
Gérald Barré
0bab835293 Forward CancellationToken to GetOperation 2023-03-13 19:57:08 -04:00
Patrik Svensson
a6af9a6842
Merge pull request #1183 from Frassle/promptExampleTypo 2023-03-01 18:43:46 +01:00
Cédric Luthi
d3f4f5f208
Add support for converting command parameters into FileInfo and DirectoryInfo (#1145)
Add support for converting command parameters that doesn't have a built-in TypeConverter but has a constructor that takes a string. For CLI apps, FileInfo and DirectoryInfo will likely be the most useful ones, but there may be others.
2023-03-01 12:02:43 +00:00
Fraser Waters
cbbdb3369c Fix minor typo in Prompt example 2023-02-26 22:22:31 +00:00
Gérald Barré
6740f0b02b Add support for static lambda and delegate 2023-02-24 19:04:01 -05:00
Gérald Barré
f7f99ec899 Simplify and make the code fix more robust 2023-02-24 19:04:01 -05:00
Gérald Barré
955fe07bac Allow to apply code fix in top-level statements 2023-02-24 19:04:01 -05:00
Patrik Svensson
819b948e78
Merge pull request #1174 from meziantou/missing-stringcomparison 2023-02-22 16:03:29 +01:00
Gérald Barré
baa8220a52
Use StringComparison.Ordinal instead of culture-sensitive comparisons 2023-02-20 20:23:06 -05:00
Martin Zikmund
9cd7b24e65 Allow configuration of confirmation prompt comparison via StringComparer 2023-02-11 17:09:16 +01:00
Ilya Hryapko
04610cf492
Alias for command branches (#411) 2023-02-09 14:26:06 +00:00
Patrik Svensson
f4183e0462
Merge pull request #1152 from MartinZikmund/dev/mazi/confirmation-insensitive 2023-02-04 20:44:34 +01:00
Martin Zikmund
29846ba505 Ensure correct comparer is used for TextPrompt 2023-02-04 19:56:37 +01:00
Patrik Svensson
92318ce1fb
Merge pull request #1151 from MartinZikmund/dev/mazi/confirmation-insensitive 2023-02-04 13:41:14 +01:00
Martin Zikmund
720db951f3 feat: Allow case-insensitive confirmation prompt 2023-02-04 13:24:11 +01:00
Patrik Svensson
e042fe15e4
Merge pull request #1143 from wbaldoumas/alignment-vs-justification-docs-fixes 2023-01-26 03:38:25 +01:00
Will Baldoumas
62b30d6072 Alignment => Justification Docs Fixes 2023-01-25 17:45:30 -08:00
Patrik Svensson
beca0b2419
Merge pull request #1141 from 0xced/better-conversion-errors 2023-01-24 20:15:02 +01:00
Cédric Luthi
de847b90e4 Improve conversion error messages
When a conversion to an enum fails, list all the valid enum values in the error message.

Message before this commit:
> Error: heimday is not a valid value for DayOfWeek.

Message after this commit:
> Error: Failed to convert 'heimday' to DayOfWeek. Valid values are 'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'
2023-01-24 19:40:11 +01:00
Cédric Luthi
7b9553dd22
Add possibility to set description and/or data for the default command (#1091) 2023-01-12 12:12:27 +00:00
Patrik Svensson
f223f6061c Add blog post for 0.46 release 2023-01-10 04:00:15 +01:00
Patrik Svensson
eba2a8cc76 Add layout documentation 2023-01-10 00:17:11 +01:00
Patrik Svensson
bc6ba26840 Fix title of JSON docs 2023-01-10 00:17:11 +01:00
Patrik Svensson
54be64ec84
Add JSON text renderer (#1086)
* Add JsonText widget to render highlighted JSON

Closes #1051
2022-12-31 18:17:15 +00:00
Cédric Luthi
3e6e0990c5
Automatically display default values of options in the help page (#1032)
Fixes #973
2022-12-28 20:28:41 +00:00
krisrok
4a8a4ab048
Show help for default command (#953)
Shows help if the default command was called without any arguments but has required arguments.
This way it does not hinder execution of a default command without any required arguments.

When called without args:
- Default command with required params -> Show help
- Default command with required params and additional commands -> Show help including additional commands
- Default command without required params -> Execute command
2022-12-14 17:19:12 +00:00
Frank Ray
b793482ebb
Command line argument parsing improvements (#1048)
* Support negative numbers as command option values
* Support command line options before arguments
* POSIX-compliant handling of quotes (double and single, terminated and unterminated), whitespace, hyphens, and special characters (e.g. emojis)
2022-12-05 01:07:53 +01:00
Nils Andresen
f895bb175d modified tokenizer to not break on on ]]] at the end of a style 2022-12-01 22:32:32 +01:00
Jaime Finat Sáez
4258cbfb85
Performance issue solved (#1096) 2022-11-30 18:13:31 +01:00
Arve Systad
83982347f6 Inline CommandArgument required/optional style in template parameter docs 2022-11-25 09:27:18 +01:00
Tom Kerkhove
879dd9fbb1 docs: Update Sponsors 2022-11-24 14:02:59 +01:00
Frank Ray
c1e9c1a99f
Clarified the license for SixLabors.ImageSharp (#1073)
* Clarified the license for SixLabors.ImageSharp

* Updated after review by @JimBobSquarePants
2022-11-17 15:21:01 +01:00
Brandon Wood
a9b97fa4dc fixed panel/table copypasta 2022-11-16 00:07:49 +01:00
Patrik Svensson
55c3f3b7a8 Figlet text should not pad on right side automatically 2022-11-15 12:36:49 +01:00
Patrik Svensson
02ff3fc910 Fix alignment bug 2022-11-15 12:36:49 +01:00
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
9ce3b99cd6 Remove integration tests 2022-11-10 12:01:13 +01:00
Patrik Svensson
a70cc90797 Fix issues with nullability and netstandard2.0 2022-11-10 12:01:13 +01:00
Patrik Svensson
7dce4af552 Add support for .NET 7.0 2022-11-10 12:01:13 +01:00
Steve Smith
02f9d26473 Update README.md
Add docs link above the fold.
2022-11-04 09:25:35 +01:00
Setenay
995ef10b8b
Created a Columns widget documentation (#1044) 2022-11-04 09:21:18 +01:00
Elisha Aguilera
4ea64ccb9c
Added documentation guide for the Padder Widget (#1046) 2022-11-04 09:20:38 +01:00
Elisha Aguilera
a755cc5d9c
Added documentation guide for Grid Widget (#1043) 2022-11-02 12:59:41 +01:00
Elisha Aguilera
2a493cfee9 Added documentation for Rows widget 2022-11-01 09:48:38 +01:00
Steve Smith
9df6ed213c Minor typo fixes
Hope this is helpful, cheers!
2022-10-19 20:13:07 +02:00
Łukasz Sowa
6a4d8c8f30
Add culture option to TypeConverterHelper, TextPrompt and AnsiConsole (#1014)
* Add culture option to TypeConverterHelper, TextPrompt and AnsiConsole

* Add IHasCulture interface
2022-10-15 11:19:06 +02:00
Patrick
5f1121e8e1 Create panel documentation 2022-10-15 06:44:48 +02:00
renovate[bot]
d7babcc6e4 chore: Update dependency cake.tool to v2.3.0 2022-10-14 19:10:01 +02:00
picture-vision
f085da76c1 Added Suckless Simple Terminal (st) to list of ansi terminals 2022-10-13 22:32:11 +02:00
nilaoda
8fa53f8fb1 Allow PACKET key on MultiSelectionPrompt 2022-10-13 20:43:03 +02:00
Benjamin Michaelis
f6a7c96413 Create Test, allow for conditional trim 2022-10-13 20:42:23 +02:00
Benjamin Michaelis
a91a3c12ad Remove trimming 2022-10-13 20:42:23 +02:00
Patrik Svensson
82de4a55c4 Pin SDK due to bug in .NET 6.0.401
Restoring tools seems to fail due to an AbandonedMutexException.
Pinning the SDK to a previous version should work.
2022-10-13 14:35:57 +02:00
Benjamin Michaelis
db095217b7
Add documentation for Breakdown Chart (#1000)
* Begin breakdown chart documentation
* Fix generator build failure
* Add in breakdown chart graphics
* Add breakdown chart documentation and move cast files
2022-10-06 22:02:25 +02:00
Patrik Svensson
7b23456d3e Add 'need triage' label to new issues 2022-10-04 22:38:52 +02:00
Patrik Svensson
cbfcc37a46 Add new and transferred issues to project
When a new issue is created or an issue is transferred
from another project, we add the issue to the Spectre.Console project
(https://github.com/orgs/spectreconsole/projects/1).
2022-10-04 22:38:52 +02:00
Salvage
999c59909b Fix @ being used in figlet font 2022-10-01 17:12:11 +02:00
renovate[bot]
fd8d271a10 chore: Update dependency Microsoft.NET.Test.Sdk to v17.3.2 2022-10-01 17:10:10 +02:00
Johan Lindfors
8b5836f4e4 Adding value: a single semi-colon! 2022-10-01 15:38:55 +02:00
renovate[bot]
5581ad2f05 chore: Update actions/setup-dotnet action to v3 2022-09-30 13:38:16 +02:00
Patrik Svensson
d339442df8
Join .NET Foundation (#978) 2022-09-27 08:36:07 +02:00
Salvage
422012c994 Make documentation consistent 2022-09-26 23:32:57 -04:00
Salvage
4f0ec87522 Allow selections to wrap around 2022-09-26 23:32:57 -04: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
nkochnev
088db165ed Added tests on backward direction of autocomplete 2022-09-19 08:58:45 +02:00
nkochnev
1082ac1efc Backward direction of autocomplete with Tab + Shift 2022-09-19 08:58:45 +02:00
Eduardo Cáceres
a60910c15f Update .NET 5 -> .NET 6 in docs 2022-09-19 08:47:23 +02:00
renovate[bot]
73ab977f26 chore: Update dependency Wcwidth.Sources to v1 2022-09-17 13:52:22 +02:00
Phil Scott
79913ab238 being explicit about date formats for blog posts 2022-09-12 04:41:22 +02:00
Phil Scott
9a7ac7b5b2 updating social card image to .NET 6 2022-09-12 04:41:22 +02:00
Gary McDougall
9cbfda9e4a Added details for using links within markup. 2022-09-10 21:51:03 -04:00
Patrik Svensson
bb013dcc52 Add blog post for 0.45 2022-09-10 12:06:32 -04:00
lonix1
af9f5ea97d
[docs] fixed typo (#956) 2022-09-09 13:33:06 +02:00
Cédric Luthi
e96a821ead Set the DevelopmentDependency flag on the Spectre.Console.Analyzer project
It was applied by mistake on Spectre.Console in #938.
2022-09-06 19:03:22 +02:00
lonix1
506253bc34 build: set nuget package as dev dependency
Docs: https://github.com/NuGet/Home/wiki/DevelopmentDependency-support-for-PackageReference
2022-08-29 10:20:32 +02:00
Bastian Eicher
90c2d988ab Detect non-interactive console via System.Console.IsInputRedirected instead of Environment.UserInteractive 2022-08-29 08:57:53 +02:00
Nils Andresen
2bd1383cbe Fixed punctuation 2022-08-29 08:54:30 +02:00
Nils Andresen
00a9ba325e restructured MarkupTokenizer a bit. 2022-08-29 08:54:30 +02:00
Nils Andresen
540bc1307c fixed warning 2022-08-29 08:54:30 +02:00
Nils Andresen
a6618f762c Modified MarkupTokenizer
So escaped markup in markup is valid.
2022-08-29 08:54:30 +02:00
Nils Andresen
638149f44b fixed punctuation in exception 2022-08-29 08:54:30 +02:00
Nils Andresen
0d72b94f9c added some breaking unit tests 2022-08-29 08:54:30 +02:00
Nils Andresen
0d19ccd8a6 (#916) fixed missing call to Validate when using CommandConstructorBinder 2022-08-18 12:03:11 +02:00
nkochnev
78d841e3dc
Added command description to command help message (#920) 2022-08-17 16:59:08 +02:00
Nils Andresen
d94dc2fcb2 fixed build error
error NU1504: Duplicate 'PackageReference' items
found. Remove the duplicate items or use the Update
functionality to ensure a consistent restore behavior. The duplicate
'PackageReference' items are: System.Memory 4.5.5, System.Memory 4.5.5.
2022-08-17 16:03:44 +02:00
Nils Andresen
9d985f0f0a (#922) fixed ArgumentNullException on .NET Framework
It seems, when Spectre.Console is compiled for
netstandard2.0, StackTrace.GetFrames() returns null
instead of an empty array.
2022-08-17 16:03:44 +02:00
renovate[bot]
3a7b8aa1d2 chore: Update dependency xunit to v2.4.2 2022-08-03 15:04:26 +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
renovate[bot]
b4cf7a76d3 chore: Update actions/upload-artifact action to v3 2022-07-01 12:45:58 +02:00
Patrik Svensson
45a051150f Fix for 'chore:' CI criteria 2022-07-01 12:42:24 +02:00
Patrik Svensson
47ef9a685e Do not run CI for commits starting with 'chore' 2022-07-01 12:36:48 +02:00
renovate[bot]
8ca602b986 chore: Update actions/setup-node action to v3 2022-07-01 12:08:53 +02:00
renovate[bot]
a11ae6a93d chore: Update actions/setup-dotnet action to v2 2022-07-01 12:08:37 +02:00
renovate[bot]
b13ff8ebcc chore: Update actions/checkout action to v3 2022-07-01 12:08:25 +02:00
renovate[bot]
90e6a1aa21 chore: Update actions/cache action to v3 2022-07-01 12:08:01 +02:00
Daniel Chalmers
f3a82073d9 Check for null argument in TextPrompt 2022-06-30 20:08:04 +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
1eeb32c704 Ignore the docs project 2022-06-30 14:24:03 +02:00
Cédric Luthi
c32decfa55 Fix the "Escaping Interpolated Strings" documentation
* `MarkupLineInterpolated` instead of `MarkupInterpolated`
* Use an actual interpolated string in sample code to make it valid
2022-06-30 13:55:52 +02:00
ivml
564c7b8f4e fix: API reference pages for Spectre.Console.Cli
This commit fixes #833.

`Spectre.Console.Cli` was moved into its own project, and the path to the new project was not added to the list of source files when building the documentation.
2022-05-17 17:46:50 +02:00
Patrik Svensson
5b2b4375a4 Update build script to package Spectre.Console.Cli 2022-05-15 00:09:52 +02:00
Patrik Svensson
70bbc24911 Update Cake to 2.2.0 2022-05-15 00:09:52 +02:00
Patrik Svensson
36ca22ffac Move Spectre.Console.Cli to it's own package 2022-05-15 00:09:52 +02:00
老大哥
b600832e00 add cross platform 2022-04-27 15:12:51 +02:00
Patrik Svensson
da1c471c18 Give GH Actions jobs a more suitable name 2022-04-15 10:44:14 +02:00
Patrik Svensson
b6b963c03c Update GPR dependency 2022-04-15 10:43:52 +02:00
Patrik Svensson
7e1fb43f21 Install .NET SDK 6.0.101 2022-04-15 10:28:49 +02:00
renovate[bot]
47fde1875b
chore: Update dependency MinVer to v2.5.0 (#803)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-07 23:47:08 +02:00
renovate[bot]
eb85f5860e
chore: Update dependency cake.tool to v2.1.0 (#809)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-07 23:46:15 +02:00
Nils Andresen
25a61bea91 Renovate: Ignore all updates to resources/scripts
those are used only during development, hence there
is no need to auto-update them.
2022-04-07 10:27:02 +02:00
renovate[bot]
bad6672d76
chore: Update dependency Microsoft.SourceLink.GitHub to v1.1.1 (#801)
Co-authored-by: Renovate Bot <bot@renovateapp.com>
2022-04-05 08:46:35 +02:00
Patrik Svensson
f614032c82
Fix documentation workflow (#799)
Only publish documentation when we publish artifacts.
2022-04-05 08:40:30 +02:00
Leonardo Costa
585f010b26
Upgrade dotnet example tool to 1.6.0 (#782) 2022-04-04 16:20:25 +02:00
renovate[bot]
90b917c38c
Configure Renovate (#785)
* Add renovate.json

* Added a bit more configuration

also moved the config into .github subfolder so not to clutter
the root folder.

* ignore npm updates in docs

Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Nils Andresen <nils@nils-andresen.de>
2022-04-03 22:16:48 +02:00
Drew Noakes
edbe9d6ebc
Change section heading (#781)
This appears to have been copy/pasted from progress.md, which has a similar structure.
2022-03-31 14:18:24 +02:00
Patrik Svensson
90de1847d8 Add blog post for 0.44 2022-03-27 22:46:17 +02:00
Andreas Grünwald
38d9386e00
Add option to configure the style of the choices list and the default value in TextPrompt (#681)
* Allow setting the style of the default value in TextPrompt

Add property "DefaultValueStyle" to TextPrompt which allows setting the style in which the default value is rendered.
When no style is set, the value is displayed as green text, keeping the existing behavior.

* Allow setting the style in which a TextPrompt's choices are displayed

Add property "ChoicesStyle" to TextPrompt which allows setting the style in the prompt's choices are rendered.
When no style is set, choices are displayed as blue text, keeping the existing behavior.
2022-03-27 19:38:01 +02:00
Cédric Luthi
7998ece6b6
Obsolete the AnsiConsoleFactory class (#585)
`AnsiConsoleFactory` should be an internal static class. Creating an `IAnsiConsole` can be achieved through `Spectre.Console.AnsiConsole.Create(AnsiConsoleSettings)`

Since `AnsiConsoleFactory` is public, it can't be changed from a non static class to a static class so obsoleting it is the second best thing to do.

Eventually, when `AnsiConsoleFactory` becomes internal and static, `AnsiConsole.Create` can be simplified to this (and the private static field `_factory` can be removed)

```
public static IAnsiConsole Create(AnsiConsoleSettings settings)
{
    return AnsiConsoleFactory.Create(settings);
}
```
2022-03-22 22:36:04 +01:00
Phil Scott
1d8154f9b0
Introduce MarkupInterpolated and MarkupLineInterpolated extensions (#761)
* Introduce MarkupInterpolated and MarkupLineInterpolated extensions

These new methods enable easily writing markup with a nice and intuitive syntax without having to worry about escaping the markup.

```csharp
string input = args[0];
string output = Process(input);
AnsiConsole.MarkupLineInterpolated($"[blue]{input}[/] -> [green]{output}[/]");

```

The `Interpolated` suffix was inspired by the Entity Framework Core [FromSqlInterpolated][1] method.

[1]: https://docs.microsoft.com/en-us/ef/core/querying/raw-sql#passing-parameters

* Fixing whitespace to match file scoped namespaces

* Adding FromInterpolated helper to Markup widget

Allows automatic handling of interpolated strings to be used on the Markup widget. This would be helpful for people working with Tables and the Tree control who would not be using the MarkupInterpolated methods.

* Documentation for markup interpolated methods.

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>
2022-03-22 22:34:25 +01:00
Phil Scott
1f2629e2e1 Adding a short template file for new documentation. 2022-03-05 22:51:01 +01:00
Patrik Svensson
a6364e066b
Fix path and description for TextPath docs (#758) 2022-03-02 10:24:33 +01: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
Andrew Armstrong
921d595269 Update SixLabors.ImageSharp reference to 2.0.0 2022-02-23 09:29:35 +01:00
Phil Scott
899dd20b65 Optimizing build
* Upgrades Statiq.Web to which contains analyzer perf improvements
* Dropping script front matter when not needed from blog archives
* Trimming down the number of files tailwind examines when building the css file to only a subset of the docs.
* Updates Playwright to latest version
* Updates tailwind and asciienma to latest
* Removes npm packages that are no longer required
2022-02-22 08:56:27 +01:00
Andrew Rublyov
8ae3d258e4 Add another missing nullables 2022-02-20 23:57:06 -05:00
Andrew Rublyov
974aa1afda Fix inheritance and nullables in settings.md 2022-02-20 23:57:06 -05:00
Patrik Svensson
66fc949e2a Initial work on TextPath widget 2022-02-20 23:26:04 -05:00
Phil Scott
d6cdd1fbda Adding a best practices guide. 2022-02-20 17:10:03 +01:00
Patrik Svensson
bec3315d91 skip-ci: Fix typo 2022-02-16 01:40:47 +01:00
Patrik Svensson
d465d93a9b Add Netlify badge 2022-02-16 00:44:52 +01:00
Patrik Svensson
782a99d726 Add Netlify attribution to footer 2022-02-16 00:36:01 +01:00
Patrik Svensson
b6be693007 Update copyright 2022-02-16 00:35:10 +01:00
Patrik Svensson
f9a85e017a Only build docs once :) 2022-02-15 18:02:25 +01:00
Phil Scott
36e5350968 Tweaking font-size and line-height for smaller screens 2022-02-15 17:28:27 +01:00
Phil Scott
3ac63d2670 Configures deployment to netlify 2022-02-14 21:09:38 +01: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
74a2e10ff0 Making tuples pretty too 2022-02-04 10:30:09 +01:00
Phil Scott
e8eb5b85b9 Updating documentation output to match new Exception rendering. 2022-02-04 10:30:09 +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
Cédric Luthi
ff4215f431 Simplify exception formatting
Now that exceptions are not _parsed_ anymore (#513 and #637), keeping the `ExceptionInfo` and `StackFrameInfo` internal classes doesn't make much sense anymore. The `Exception` and `StackFrame` types can be used by the `ExceptionFormatter` class directly, without conversion.
2022-02-03 10:02:32 -05:00
Steven
f221c1f25c
add overload taking params array (#682) 2022-01-15 19:51:17 +01:00
Jouni Heikniemi
0b988ff65c
Fix WithExample call on the CommandApp doc page to match reality (#689) 2022-01-13 21:43:31 +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
52c1d9122b
Add global usings (#668)
* Use global usings

* Fix namespace declarations for test projects
2021-12-23 16:50:31 +01:00
Patrik Svensson
eb6a9d8d04 Add .git-blame-ignore-revs 2021-12-22 08:51:17 -05:00
Patrik Svensson
ec1188b837 Use file scoped namespace declarations 2021-12-22 08:51:17 -05:00
Patrik Svensson
1dbaf50935 Add release notes for 0.43.0 2021-12-22 08:50:31 -05:00
Phil Scott
523adc6c49 Including dotnet tools restore into ci build 2021-12-21 19:44:16 +01:00
Phil Scott
bba5f0c5dc Trying to rework dotnet tools for docs and playwright 2021-12-21 19:44:16 +01:00
Patrik Svensson
19ff48f4b8 Clean up .NET SDK installation 2021-12-15 22:54:27 +01:00
Patrik Svensson
8fcd2e59d6 Install .NET 5 as part of build 2021-12-15 22:47:05 +01:00
Patrik Svensson
8ce40bac3c Fix documentation build 2021-12-15 22:43:03 +01:00
Cédric Luthi
8e762e4618 Simplify stack frame parsing
This is the natural extension of #513 which already removed a lot of regex parsing. 

The `ExceptionParser` class is renamed into `ExceptionConverter` because there is no more string parsing performed at all. `Exception` is converted into `ExceptionInfo` and `StackFrame` is converted into `StackFrameInfo`.
2021-12-15 22:24:34 +01:00
zameer fouzan
37f661a963
fix: table title's first letter is getting capitalized by default (#652)
fix for #638
2021-12-07 13:03:30 +01:00
Nils Andresen
55633b59fa (#645) Ordered CommandArguments by position
in CommandModelValidator
2021-12-02 11:15:25 +01:00
Phil Scott
3f561e0902 Update Roslynator.Analyzers to version 3.3
I kept running into https://github.com/JosefPihrt/Roslynator/issues/833 when using Rider, but it seems this was fixed in version 3.2 thanks to a fix in how they are doing assemblies. Looks like this would also include benefits for people using VS2022 too
2021-12-02 11:10:49 +01:00
Phil Scott
461348f2fb
Update asciinema (#648)
* Updating doc build dependencies

Updates playwright to latest version. This requires an update in how it is ran as part of the statiq build set up to ensure dependencies exist for the run.

Also brings misc packages up to date to fix vulnerabilities.

* Updates CI to use node v16 and dotnet 5

Playwright CLI currently needs net5 to execute. There is a PR in the works to get it running on net6 but until then the recommended steps it to have both installed.
2021-12-01 13:40:51 +01:00
Patrik Svensson
fd4b96944e Add support for alternate screen buffers
Closes #250
2021-11-30 12:13:14 -05:00
Tim Waalewijn
2e5d18fa78
Added the ability to hide CommandOptions. (#642)
CommandOptions now has an IsHidden property that, when set to true, will cause the option to be hidden from the following cases:

- Help text using `-h|--help`
- Xml representations generated with the `cli xml` command
- Diagnostics displayed with the `cli explain` command

Hidden options can still be outputted with `cli explain` using the `--hidden` option that is also used to display hidden commands.

Fixes #631
2021-11-29 23:16:54 +01:00
Cédric Luthi
168f35202d
Fix exception formatting for generic methods (#639)
The generic parameters were double escaped and would display as `[[T0,T1,TRet]]` instead of `[T0,T1,TRet]`. This is because the `builder.AppendWithStyle` method already escapes its value so the caller must not escape the passed value.
2021-11-26 10:23:20 +01:00
Patrik Svensson
225305f90e Update examples to net6.0
Closes #604
2021-11-23 22:30:45 -05:00
Cédric Luthi
8fed3bc575
Fix type conversion in the default pair deconstructor implementation (#618)
The code using the TypeConverter was written backwards (using `ConvertTo` instead of `ConvertFrom` and would thus throw an exception.
2021-11-22 15:07:58 +01:00
Cédric Luthi
19eb273813 Fix typo in PairDeconstructor class name
PairDeconstuctor → PairDeconstructor (was missing an 'r')

Keeping `PairDeconstuctor` and marking it as obsolete since it's a public type.
2021-11-14 10:36:16 +01:00
Nils Andresen
48df9cf68b (#555) added TypeRegistrarBaseTests
as a very simple test harness to test implementations of
ITypeRegistrar / ITypeResolver
2021-11-14 01:19:27 +01: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
21ac952307
Remove Render from docs in favor of Write (#613)
The `Render` method has been obsoleted.
2021-11-09 21:22:18 +01:00
Patrik Svensson
e86f9d3c5a Allow color numbers in markup expressions
Closes #614
2021-11-09 09:32:50 -05:00
Patrik Svensson
9c9eb04f91
Upgrade .NET SDK to 6.0.100 (#616)
* Update to .NET 6.0.100

* Update Cake to 2.0.0-rc0001
2021-11-09 08:19:36 +01:00
Nils Andresen
ba4b7b97f8 Escape any Markup when displaying selected prompt items
If the item contained escaped markup, after the call to RemoveMarkup
the string will contain unescaped markup (that the user explicitly had
escaped before) for those cases we need to escape all remaining markup.
2021-11-02 22:56:54 +01:00
Patrik Svensson
b738187b28 Fix publish workflow error 2021-10-30 01:52:25 +02:00
Nils Andresen
b3ef7d4fa6 fixed documentation for selection and multiselection (#499) 2021-10-30 01:50:18 +02:00
Nils Andresen
c5c1852fc3 (#606) added ExceptionHandler to ICommandAppSettings
So exceptions can be handled in Spectre.Console.Cli.
Also, some documentation was added.
2021-10-30 01:41:29 +02:00
Nils Andresen
045d0922c8 fixed spelling in Exception 2021-10-30 00:05:16 +02:00
Nils Andresen
949f35defd (#502) Added GetParent and GetParents to MultiSelectionPrompt
So it it possible to find the parent(s) of a given item.
2021-10-30 00:05:16 +02:00
GitHubPang
f5a2735501
Fix a typo in code comment (#579) 2021-10-29 21:12:01 +02:00
Patrik Svensson
d02c9e552e
Add net6.0 TFM (#603)
Closes #602
2021-10-29 21:05:17 +02:00
Antonio Valentini
a4ae36738b typos 2021-10-23 16:05:56 -04:00
Patrik Svensson
35d2750b68 Internalizes the WcWidth package
This way, there is no need to download the WcWidth package,
and it also becomes easier to debug issues related to
Unicode cell widths.
2021-10-18 15:09:54 -04:00
Phil Scott
4d2d927caa Upgrades Statiq and re-enables docs publishing
Previous versions of Statiq had a bug with .NET 6 RC1. The latest has a workaround that allows publishing
2021-10-15 20:31:57 +02:00
Magnus Lindhe
174d285035 Update sponsors.md
Fixing a typo in October. I should be ashamed :)
2021-10-10 09:40:09 +02:00
Patrik Svensson
e8e92e7f44 Remove path criteria for publish workflow 2021-10-05 17:57:25 +02:00
Patrik Svensson
3718502eee Update workflow 2021-10-05 17:55:08 +02:00
Patrik Svensson
39cfc7a62f Allow workflows to run for workflow changes 2021-10-05 17:54:02 +02:00
Patrik Svensson
2e90ef28e4 Allow workflows to run for test and example changes 2021-10-05 17:52:30 +02:00
Patrik Svensson
2a3763cdc7 Prove that remaining args works in strict mode
Closes #496
2021-10-05 09:34:08 -04: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
Cédric Luthi
ca2e6ce0ad Improve the error message when acquiring the interactive semaphore fails
Using the same error message as in the sync version of the `Run` method which is indeed much better than "Could not aquire the interactive semaphore".
2021-10-05 00:51:54 +02:00
rifatx
fa15389158
Add support custom max value for barcharts (#545) 2021-10-05 00:49:09 +02:00
Cédric Luthi
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
GitHubPang
644fb76d61 Fix a typo for Spectre1021 2021-09-27 20:50:51 -04:00
Christopher Rollings
e3dfe23b59
Work done to allow user to update table cell. (#546) 2021-09-27 13:03:45 +02:00
Phil Scott
ad23855b0a Adds a segment builder for merging multiple segments
When merging a large amount of segments together we were doing a tremendous amount of allocation especially related to strings due to concatination.

This adds an internal SegmentBuilder that uses a stringbuilder for building up the text rather than creating a new instance and doing a concat operation for each segment.
2021-09-27 10:49:44 +02:00
GitHubPang
64f444114a Fix typos 2021-09-23 19:08:03 -04:00
Patrik Svensson
b058c54f3c Disable GH Action workflow for docs 2021-09-23 23:26:31 +02:00
Patrik Svensson
8cfe06e77a Expose extension method that gets the cell width of text 2021-09-18 23:20:28 +02:00
Patrik Svensson
48d49d6e18 Add extension method to get the cell width of a character 2021-09-18 23:20:28 +02:00
Nils Andresen
49e8a980a7 Removed the additional registration of ICommand 2021-09-18 23:19:34 +02:00
GitHubPang
d34012cad0 Fix typos in code comments 2021-09-13 22:58:52 -04:00
Nils Andresen
c3510f3036 fixed 404 in documentation
links were pointing to ./commandApp, however
the generated page is ./commandapp
2021-09-08 12:02:01 +02:00
Cédric Luthi
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
Cédric Luthi
ffd24ec451 Fix intermittent test failure
When running on .NET Framework, the `Should_Report_Max_Remaining_Time_For_Extremely_Small_Progress` would intermittently fail with the following error:
```
task.RemainingTime
    should be
10675199.02:48:05.4775807
    but was
null
```

This is because it's possible that the two increment share the same timestamp thus making the `RemainingTime` null. To ensure the two increments don't share the same timestamp, we sleep for one millisecond.

Although I have only observed this issue on .NET Framework it would be possible that it occasionally also occur on .NET Core.
2021-08-30 11:08:24 +02:00
Cédric Luthi
e081593012 Fix parsing of exceptions on .NET Framework
On .NET Framework, `exception.ToString()` uses a slightly different format than on .NET Core.

So in order to properly transform an `Exception` into an `ExceptionInfo` on both .NET Core and .NET Framework we use `exception.StackTrace` + `exception.InnerException`. As an added benefit, it greatly simplifies the implementation of the `ExceptionParser` class.
2021-08-30 11:08:24 +02:00
Cédric Luthi
bf95564ebb Make tests run on .NET Framework 4.8
Since Spectre.Console targets .NET Standard 2.0 it makes sense to also run tests on .NET Framework (Windows only)

This makes two tests fail: `Should_Write_Exception_With_Inner_Exception` and `Should_Write_Exceptions_With_Generic_Type_Parameters_In_Callsite_As_Expected`.

Received (inner exception not handled):
```
System.InvalidOperationException: Something threw!System.InvalidOperationException: Throwing!
  at Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(Nullable`1 number) in /xyz/Exceptions.cs:nn
  at Spectre.Console.Tests.Data.TestExceptions.ThrowWithInnerException() in /xyz/Exceptions.cs:nn
```

Verified:
```
System.InvalidOperationException: Something threw!
     System.InvalidOperationException: Throwing!
       at Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(Nullable`1 number) in /xyz/Exceptions.cs:nn
       at Spectre.Console.Tests.Data.TestExceptions.ThrowWithInnerException() in /xyz/Exceptions.cs:nn
  at Spectre.Console.Tests.Data.TestExceptions.ThrowWithInnerException() in /xyz/Exceptions.cs:nn
  at Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exception_With_Inner_Exception>b__3_0() in /xyz/ExceptionTests.cs:nn
  at Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn
```
2021-08-30 11:08:24 +02:00
Daniel Cazzulino
3c5b98123b Make building more flexible by allowing feature bands
Currently, the latest stable .NET5 is version 5.0.400, which 
fails with `latestPatch` but works with `latestFeature`. 

Given that the project doesn't appear to depend on any low
level primitives or behaviors that might break from .NET 
feature band upgrades, it's far more convenient for contributors 
to have a more flexible requirement.
2021-08-24 17:18:03 +02:00
Liam Sho
7276e11ecc Add a test for rendering table with EA characters
Test rending a table with East Asia characters (Chinese, Japanese, Korean).

The verified text file may look weird, but it looks normal and correctly in Console (tested in Windows Terminal, Terminal.app in macOS Monterey)
2021-08-24 16:45:30 +02:00
Liam Sho
d306ad82d1 Fix ArgumentOutOfRangeException when rendering a table
When rendering a table with East Asia characters (take 2 English alphabets width) will throw ArgumentOutOfRangeException.
2021-08-24 16:45:30 +02:00
Patrik Svensson
d96817dc9c Do not share semaphore between consoles
Closes #494
2021-08-14 23:43:09 +02:00
Patrik Svensson
e169df6303 Add support for manipulating individual table rows
Closes #500
2021-08-14 23:35:07 +02:00
Patrik Svensson
57731c0d55 Add release notes for version 0.41 2021-07-19 23:12:38 +02:00
Phil Scott
170901f584 Adds additional check that analyzer is within a method
Resolve #487
2021-07-19 22:31:25 +02:00
Phil Scott
c2b25eea8a Using browser context for social cards
Scott Hanselman recommended using the context instead of the browser object. Browser object creates a new context on each call which is a new process. Obviously we don't want that. 

Also added an extra check for a load based on network idle. This will not only ensure things are loaded, but there is a built in 500ms timeout looking for inactivity which will let the font rendering process do it's thing which seems to lag a tad with Chromium.

And while we are at it, preloading the font can't hurt.
2021-07-18 11:23:23 +02:00
Phil Scott
223642b797
Add blog to docs (#484)
* Adding social card infrastructure
* Upgrades doc project to .NET 6
* Adds Playwright
* Changes the console to a web project for Playwright
* Adds social card template
* Added blog content
* Parallelized social image processing
* Updating CI to use .NET 6 for docs build
2021-07-15 19:53:01 +02:00
Nils Andresen
32d7ea15bd
Change LogCommandSettings to CommandSettings in example
Instead of `LogCommandSettings` for the `Settings` of the `HelloCommand`
2021-07-15 09:39:25 +02:00
Patrik Svensson
fa5a1e88ec Clean up Widgets
* Move /Widgets/Live/* to /Live/*
* Move /Widgets/Prompt/* to /Prompts/*
* Move tests and expectations to match the new locations
2021-07-14 08:38:44 -04:00
Antonio Valentini
d532e1011f
Add default value parameter to Confirm extension
Closes #482
2021-07-12 08:47:36 +02:00
Patrik Svensson
5f97f2300c Support cancellation of prompts
Closes #417
2021-07-11 23:10:17 -04:00
Patrik Svensson
884cb8ddd4 Install correct .NET Core SDK 2021-07-11 22:59:02 -04:00
Patrik Svensson
314e50b531 Move analyzer to own solution 2021-07-11 22:59:02 -04:00
Patrik Svensson
d9f06413d0 Remove examples from main solution 2021-07-11 22:59:02 -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
Patrik Svensson
aa59f6cd55 Update .NET Core SDK to 5.0.301 2021-07-05 09:15:54 +02:00
Patrik Svensson
2011cb2eff Do not append suffix to text prompt
Do not append suffix to text prompt unless
there are choices or a default value specified.

Closes #413
2021-07-05 09:15:54 +02:00
Patrik Svensson
865552c3f2 Add support for selecting prompt items
Closes #447
2021-06-28 08:41:24 -04:00
Phil Scott
fa553fd72e Adds documentation for analyzers 2021-06-25 09:56:20 +02:00
Patrik Svensson
a186fd94ac Preserve whitespace trivia when applying code fix 2021-06-23 23:04:37 -04:00
Nils Andresen
6b5b31957c Added a TypeRegistrar to CommandAppTester
exposed as a public property.
For convenience, and to keep the similarity to the real CommandApp
it is also available in the ctor of CommandAppTester.
2021-06-24 01:42:29 +02: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
Patrik Svensson
c9b178ac96 Moved analyzer tests to its own project
Also moves tests to `./test` which makes it possible
for all test projects to share the same .editorconfig
files and similar.
2021-06-23 22:47:12 +02:00
Phil Scott
721d73e9eb Renames BaseAnalyzer to SpectreAnalyzer 2021-06-23 16:36:48 +02:00
Phil Scott
8b058d6342 Renaming analyzer test project to sandbox 2021-06-23 16:36:48 +02:00
Phil Scott
d1048260cc Making the project ready for deployment
Analyzer package needs all the dependencies to be private assets, and it's output pushed to teh analyzers/dotnet/cs folder. 

We don't want anything in the lib folder, so it also disables the auto build output and warnings that there are no files for the target framework in the lib folder
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
GianHodgson
d015a4966f Hardblank 2021-06-21 01:23:18 +02:00
18-F-cali
5cbe9d40b0 Removed extra line from example code. 2021-06-19 02:38:01 +02:00
Chris Missal
5faa61fa64 Correct documentation comment text 2021-06-09 23:56:30 +02:00
C. Augusto Proiete
087f216bcf Add README translation to Brazilian Portuguese (pt-BR) 2021-06-09 23:44:45 +02:00
Ahmed Şeref
ebd7bb5949 Update canvas.md 2021-06-09 23:43:55 +02:00
Phil Scott
0bf97cb666 Adding additional tests for property binding with value types 2021-06-08 21:21:35 +02:00
Phil Scott
ebb1076dd0 Check for default value before writing property values
Previous version was overwriting values that might have been set via a property initializer.

Closes #422
2021-06-08 21:21:35 +02:00
Phil Scott
21f731ebd5 Using Statiq processes for tailwind commands
Tweaks tailwind to use jit mode and misc content tweaks


Changes point in which tailwind is built
2021-05-28 14:31:57 +02:00
Patrik Svensson
397860e42e Revert PR #436
Using Statiq processes for tailwind commands

This reverts commit adb600c4301db4c0d9ce52cb6a4fe410db2baa17.
This reverts commit ab83e41051d198b550898ff5be30062214779308.
2021-05-26 13:41:49 +02:00
Phil Scott
adb600c430 Tweaks tailwind to use jit mode and misc content tweaks 2021-05-26 10:31:15 +02:00
Dave Glick
ab83e41051 Using Statiq processes for tailwind commands 2021-05-26 10:31:15 +02:00
Phil Scott
0d2a75aeee Add Cascadia Code as a webfont for fallback
This is only for Android (hopefully) which has a system font that doesn't have standard width box drawing characters. 

Other systems should still use their defaults.
2021-05-24 15:42:12 +02:00
Cédric Luthi
bfdaef95d6
Fix OverflowException when estimating the progress remaining time (#404)
Fix OverflowException when estimating the progress remaining time
2021-05-24 09:56:29 +02:00
Phil Scott
cb8dc97847 Removes inline-block from console output in docs
This was causing the output to wrap in chrome on ipad and only the ipad. Not quite sure why it was needed in the first place so it's gone.
2021-05-24 09:44:27 +02:00
Patrik Svensson
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
Phil Scott
46abadaccb Add AsciiCast demos for docs 2021-05-23 23:30:14 +02:00
Phil Scott
69fdae70c0 Fixes non-interactive progress bars from rendering little info
If any task was not-started or finishes then everything stops rendering. I suspect this worked ok but wasn't noticed until we introduced the indeterminate progress task that starts off not-started which caused everything to bail early in the demos.
2021-05-22 09:17:34 +02:00
Patrik Svensson
91a0be86a3 Remove empty solution folder 2021-05-21 11:14:18 +02:00
Patrik Svensson
ab09a30bc7 Update dotnet example 2021-05-21 11:14:18 +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
Johan Lindfors
5d68020abb Wrong method in code example
Wrong method called in the documentation for the Calendar widget.
2021-05-19 13:46:39 +02:00
Patrik Svensson
315a52f3e9 Add support for hierarchical list prompts
Closes #412
2021-05-18 11:34:16 -04:00
Ion Dormenco
c147929f16
Add color aliases 2021-05-12 23:44:11 +02:00
Patrik Svensson
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
Sean Fausett
1dfc6bdadc Fix async race condition 2021-05-10 09:18:58 +02:00
Sean Fausett
2ba06577ef
Improve CommandApp error message rendering
* Move line break to end of error message
* Move line break to start of each help section

Closes #392
2021-05-10 09:17:20 +02:00
Crypto Compress
ea5b7338ad renamed *`1.cs to *OfT.cs 2021-05-09 08:35:10 -05:00
Patrik Svensson
4d88a6ab69 Play nice with type converters 2021-05-09 08:26:08 -05:00
Patrik Svensson
1dd1945297 Add parameter value provider support
Adds support for parameter value providers which makes it
possible to set custom values for parameters.
2021-05-09 08:26:08 -05:00
Patrik Svensson
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
Patrik Svensson
e48ae9600a Revert shrinking of example.png 2021-04-29 17:17:02 -05:00
chenxuuu
d63255aa5f update to the latest version 2021-04-29 18:05:30 +02:00
Phil Scott
9a68b27b31 Shrinks PNGs and converts large gif to webm
PNGs were ran through TinyPng. Table.gif was weighing in at over 1.7mb
on my machine. Converted to webm and it's down to 80kb which is pretty
nice for something on the home page. Other gifs didn't have that much of
an improvement so I just left them as GIFs.
2021-04-25 02:52:36 +02:00
Phil Scott
2a9fbb1ee9
New doc theme (#387) 2021-04-24 22:20:59 +02:00
Sean Fausett
b568098d5e Fix required vs optional argument denotation 2021-04-23 23:34:33 -04:00
Patrik Svensson
cba02070f9 Add method to get VT/ANSI codes for renderables 2021-04-23 13:09:44 -04:00
Phil Scott
01f707c78d Exposes Pretty property of CommandAppException
If a user is propagating the exceptions we aren't going to automatically display them. They might still want to get this exception message and use it, so we'll make it publicly available.
2021-04-23 16:44:41 +02:00
Phil Scott
8d67c0a6b4 Removes printing of error messages when propagating 2021-04-23 16:44:41 +02:00
Patrik Svensson
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
Fraser Waters
91f910326c Fix maxWidth bug in Panel
Panel could pass a maxWidth to the child Render function that was greater than the maxWidth that was passed to the Panel render function.
I noticed this when trying to nest a table in a panel and the word wrapping was being disabled.

N.B It might be that Table.Measure ought to not return a measurment larger than maxWidth, but this Panel change seems defensivly sensible regardless.
2021-04-22 22:14:49 +02:00
Phil Scott
79af013bf2 Expanding CLI docs
Adding new pages for commandApp, commands and settings.
2021-04-21 17:51:59 +02:00
Patrik Svensson
04efd1719c Add new test framework for consoles 2021-04-19 20:39:45 -04:00
Phil Scott
f5a9c0ca26 Removes automatic registration of settings
Original intention was to register Settings automatically for DI. This ran into problem when the container verifies the configuration is valid for a settings using the constructor for initialization. It tries to resolve the parameters and fails.

This removes the automatic registration and falls back ActivatorCreateInstance when no Setting is registered.
2021-04-18 22:41:05 +02:00
Loïc Sharma
23564612c1
Make AsyncCommand a little more discoverable (#375) 2021-04-18 09:35:37 +02:00
Phil Scott
f2b8afffb3 Marks Spectre.Console.Testing as not a test project
Probably something that only bothers me, but I'm in a habit of running dotnet test at the solution level. It was discovering this project as a test project even though it isn't. This produces an error complaining about not having a testhost.dll. I'm pretty sure this comes in via a props when xunit is referenced. 

This attribute in the csproj marks the project explicitly as not a test project
2021-04-17 09:30:33 +02: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
Phil Scott
bc9f610258 Added "--hidden" param to explain feature
Probably shouldn't include the hidden commands by default. This lets the user show them if needed.
2021-04-13 17:40:55 +02:00
Phil Scott
ae96606ab7 Adds default command to explain feature 2021-04-13 17:40:55 +02:00
Phil Scott
41ccc0b464 Adds CLI explain command
Wanted a command to break down how Spectre views the command model. This outputs all the relevant settings in a tree. You can get a short explanation for all the commands, or a detailed explanation for all commands (there is a flag to go vice versa on the detailed view if you want)

app cli explain
app cli explain myappcommand
app cli explain -d
2021-04-12 17:40:31 +02: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
2fe2bb3c32 Add parameterless Clear method for IAnsiConsole
Closes #338
2021-04-11 22:01:14 -04:00
Patrik Svensson
1fc6f22ea9 Remove Style.Clone method
Closes #362
2021-04-11 21:58:58 -04:00
Patrik Svensson
6a5c507936 Rename 'Demo' example to 'Showcase' 2021-04-09 22:01:05 +02:00
Patrik Svensson
efa3d3b130 Add NuGet.Config 2021-04-09 08:45:30 -04:00
Patrik Svensson
6007fcaafc Update to .NET SDK 5.0.202 2021-04-09 07:48:10 -04:00
Patrik Svensson
13ac38ed04 Fix color system mapping bug
Closes #342
2021-04-08 12:18:54 -04:00
Patrik Svensson
ca036f6543 Add demo example 2021-04-07 20:32:07 -04:00
Phil Scott
36ec3d1fd3 Adds rune width caching for cell length calculations 2021-04-07 23:59:23 +02:00
Patrik Svensson
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
Christian Wischenbart
39b59c8d4a Cleanup AnsiSequences.cs
1. Update CSI constant to include the [ character.
See ECMA-48 Section 8.3.16
https://www.ecma-international.org/wp-content/uploads/ECMA-48_5th_edition_june_1991.pdf

2. Use string interpolation, because it's easier to read
(and internally uses a StringBuilder)

3. Add ESC constant, because the AnsiBuilder needs it to create links.

4. Remove unused SGR overload.
2021-04-06 22:51:42 +02:00
Phil Scott
8cf7794852 Adding unit tests for settings constructor 2021-04-06 22:48:51 +02:00
Phil Scott
4edc647fdd Falls back to null for settings constructor 2021-04-06 22:48:51 +02:00
Christian Wischenbart
be45a0ff4e Fix AnsiConsoleBackend.Clear
1. Add an ED3 command to clear the scroll buffer.

This command is not in the original ANSI terminal control sequences but
was added later to XTerm to account for the fact that most modern
terminals have a scroll-buffer.

https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h4-Functions-using-CSI-_-ordered-by-the-final-character-lparen-s-rparen:CSI-Ps-J.1C8A

This command is now awailable in basically
all terminals with scroll-buffers

2. Change CUP coordinates to 1, 1

The coordinates 0, 0 also worked, but strictly speaking they are outside
the available screen area and are capped to 1, 1 anyways.

This commit fixes #337
2021-04-06 22:42:03 +02:00
Christian Wischenbart
256fcdd27f Remove redundant Style constructor. 2021-04-06 07:30:31 -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
Phil Scott
a690ce4955 Marks nullable bools as flags too 2021-04-05 16:14:13 +02:00
Andreia Gaita
759b16aed9 Fix OS version detection 2021-04-04 09:28:20 -04:00
Phil Scott
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
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
MB
6121203fee Rename tree to root so the example compiles.
The 'root' variable does not exist in current context. Either should call Render(tree) or have it renamed to root. I've chosen root as it's more consistent with the examples later on.
2021-04-02 23:32:15 +02:00
Phil Scott
9204671b27 Uses Environment.TickCount for seed instead of DateTime.Now 2021-04-02 18:52:18 +02:00
Phil Scott
c765bbd0dd Uses OSVersion instead of RegEx to detect Windows Build info
Perf improvement.
2021-04-02 18:51:30 +02:00
Thomas Freudenberg
6bceac8a5e enable disposing ITypeResolver 2021-03-30 00:53:38 +02:00
Patrik Svensson
1ed7e65fcb Make VT-100 sequences easier to understand 2021-03-28 12:51:19 -04: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
Alexey Golub
2ba6da3514
Respect encoding of TextWriter provided to AnsiConsole.Create(...) 2021-03-25 21:19:49 +01:00
Alexey Golub
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
Patrik Svensson
9c46c21e27 Fix argument order
Closes #319
2021-03-24 18:58:17 -04:00
Reilly Wood
c643ec735d Fix documentation for ProgressContext.AddTask 2021-03-24 07:34:56 -04:00
Phil Scott
b17eabaa1f Adds helper overloads for Markup calls without args
Without specific overloads without the args string.format will get called even if it's not needed. 

This closes #309
2021-03-22 19:14:59 +01: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
Patrik Svensson
9502aaf2b9 Allow markup in selection prompts
Closes #221
2021-03-14 21:27:44 -04:00
Patrik Svensson
57a8e6ccc1 Support Home, End, PgUp, and PgDown in prompts
Closes #296
2021-03-14 21:27:44 -04:00
Patrik Svensson
8c099a0038 Add Elmah.io as sponsor 2021-03-14 21:17:56 -04:00
Bastian Eicher
08b65cfa47 Fix Windows ANSI support detection with redirected stderr 2021-03-14 23:41:07 +01:00
Christopher-Marcel Esser
2540f48622 Hide examples of hidden commands 2021-03-13 23:21:48 +01:00
Phil Scott
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
Phil Scott
da9c6ee4c2 Add IProgress<double> to ProgressTask.cs
Makes the Report method an explicit implementation to allow for better interoperability with standard .NET progress functionality while keeping backwards compatibility with existing ProgressTask functionality.

Closes #285
2021-03-07 09:24:44 +01:00
Phil Scott
855127f32a Changes progress task IsFinished to account for stopped tasks
Previous behavior was that the only way to get a task to a finished state was to artificially set the Value to MaxValue.

With this change StopTask() will also complete the task with the change that a task cannot be restarted.
2021-03-07 09:24:21 +01:00
stf
fa731070d8 update the docs
To improve discoveratbility of the new option
2021-03-04 07:47:00 -05:00
stf
ef08c5bf2b Improve the unit test around HideCompleted 2021-03-04 07:47:00 -05:00
stf
1c769c6610 Add Progress.HideCompleted 2021-03-04 07:47:00 -05:00
Phil Scott
1cd335e785
Serilog example for logging 2021-03-04 08:39:53 +01:00
Patrik Svensson
29e6e34f83 Support setting the static console 2021-03-01 15:22:35 -05:00
Phil Scott
bff3438a5a using loop instead of linq
In both of these loops context is captured preventing caching of the lambda. this results in a pretty significant amount of allocations especially with progress bars that constantly are remeasuring
2021-03-01 08:22:45 +01:00
Oskar Klintrot
c64884854f Make it possible to set Value directly 2021-02-25 11:56:32 +01:00
Phil Scott
3a42c0a119 Adds DotSettings and tweaks editoconfigs for tests
R# and Rider have quite a bit of noise related to documentation in the testing projects so this disables those warnings.

In the main projects, R# and Rider complain loudly about the namespaces not matching the file structure. The DotSettings file disables that warning.

Once you get rid of that noise there are quite a few opportunities for trimming out redundant code that R# points out especially with the nullable support enabled, plus there are some bugs related to multiple enumerations worth looking into I think.
2021-02-23 22:34:33 +01:00
Thomas Freudenberg
525b414ff8
Make alignment of TaskDescriptionColumn configurable 2021-02-16 23:33:47 +01:00
Thomas Freudenberg
ed0fb29be4 Make default answer for confirmation prompt configurable 2021-02-16 23:32:49 +01:00
Phil Scott
04d0e663d5 Extends maximum size of remaining and elapsed time displayed, plus a failsafe
Elapsed and remaining now support > 9 hours, and if a timespan can't be rendered in that size **:**:** will be displayed
2021-02-16 23:31:55 +01:00
Patrik Svensson
17ee8990f4 Update example image 2021-02-15 13:01:30 +01:00
Bastian Eicher
a1050fc676 Handle output to stderr 2021-02-14 18:08:42 +01:00
Phil Scott
9312663bde
Adds text and Progress bar spinner column for tasks yet to be started 2021-02-14 18:03:57 +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
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
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
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
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
Milosz Krajewski
ad49b6aa67
GH-242: Fix version retrieval for single file applications (#245) 2021-01-26 00:45:38 +01:00
Patrik Svensson
31a5e17a45 Remove InteractivityDetector 2021-01-19 18:12:15 +01:00
Patrik Svensson
f06dc7e7d8 GitHub actions should use default width (for now) 2021-01-19 18:12:15 +01:00
Patrik Svensson
a23bec4082 Add profile support
Closes #231
2021-01-19 17:53:03 +01:00
Patrik Svensson
913a7b1e37 Add support for default choice in selection prompt
Closes #234
2021-01-15 17:05:11 +01:00
Nick
63bae278a9
Add support for selection prompt highlighting 2021-01-15 15:23:09 +01:00
Eslami Sepehr
1a747696a8
Add Persian README 2021-01-15 09:08:37 +01:00
Matt Constable
994540d97f
Add cycle detection to tree rendering 2021-01-14 18:37:22 +01:00
Thomas Freudenberg
dee3c01629 mask default value when prompt is a secret 2021-01-14 17:44:18 +01:00
Mattias Karlsson
a3e11b24e5 (GH-226) Switch ParameterValidationAttribute check to IsNullOrWhiteSpace
* fixes #226
2021-01-13 20:31:33 +01:00
Jay Turpin
35568ab823 Updated Commands with with new Execute() method signature 2021-01-13 19:48:15 +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
ριтєя мαяχ
d87d8e4422 Update exceptions.md 2021-01-10 20:45:44 +01:00
Patrik Svensson
a977fdadff Fix tree node collection type 2021-01-10 16:59:40 +01:00
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
0e0f4b4220 Add interactive prompts for selecting values
* Adds SelectionPrompt
* Adds MultiSelectionPrompt

Closes #210
2021-01-09 09:37:28 +01:00
Patrik Svensson
3a593857c8 Add progress and status result overloads 2021-01-06 09:54:45 +01:00
Patrik Svensson
11e192e750 Update Canvas tests 2021-01-06 09:54:45 +01:00
Thomas Freudenberg
8901450283
Allow returning a result from Progress.StartAsync/Status.StartAsync 2021-01-06 08:08:38 +01:00
Patrik Svensson
0796bad598 Add contributing guidelines 2021-01-05 14:38:29 +01:00
Matt Constable
5b553a4106
Added canvas unit tests & fix canvas scaling bug 2021-01-05 14:00:04 +01:00
Patrik Svensson
1bb0b9ccc6 Fix expectation structure 2021-01-05 11:09:35 +01:00
Matt Constable
9ad5f2daeb
Fix console detection for Cygwin/WSL-Shell on Windows 2021-01-04 18:24:56 +01:00
Patrik Svensson
1f211d3e1f Add convenience methods for tree nodes 2021-01-03 23:28:55 +01:00
Patrik Svensson
87e6b42409 Add tree example 2021-01-03 23:28:55 +01:00
Patrik Svensson
1aa958ced3 Add support for multiple tree roots 2021-01-03 23:28:55 +01:00
Patrik Svensson
4bfb24bfcb Streamline tree API a bit 2021-01-03 23:28:55 +01:00
Matt Constable
b136d0299b
Add tree widget 2021-01-02 10:01:16 +01:00
Patrik Svensson
179e243214 Clean up table rendering a bit 2021-01-02 09:33:22 +01:00
Patrik Svensson
c6210f75ca Prevent endless loop in tokenization
Closes #198
2021-01-01 23:01:51 +01:00
Patrik Svensson
b81739567b Fix argument order in help
Closes #188
2021-01-01 13:43:28 +01:00
Patrik Svensson
5cf41725a5 Do not split remaining args on space
Closes #186
2021-01-01 12:19:37 +01:00
Matthew Constable
f561d71e4e Remove unused Segment.TruncateWithEllipsis method 2020-12-31 17:29:50 +01:00
Simon Cropp
e71db7f78c fix some nullability issues 2020-12-31 11:09:03 +01:00
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
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
4e2251fd62 Add migration guide for Spectre.Cli 2020-12-29 10:29:26 +01:00
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
Thomas Freudenberg
0bbf9b81a9
Adds optional function to get the display string for TextPrompt choices 2020-12-26 18:17:46 +01:00
Simon Cropp
041aea2ae5 spelling 2020-12-26 18:16:41 +01:00
Simon Cropp
f417e297cd update test refs
the latest of shouldy has better nullable attributes
2020-12-26 18:13:35 +01:00
Simon Cropp
5045b8b959 remove pdb AllowedOutputExtensionsInPackageBuildOutputFolder 2020-12-26 18:12:19 +01:00
Patrik Svensson
7dccb310f3 Add support for bar charts
Closes #103
2020-12-23 10:05:08 +01:00
Patrik Svensson
1cf30f62fc Add autocomplete for text prompt
Closes #166
2020-12-22 11:31:22 +01:00
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
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
ee305702e8 Update issue templates 2020-12-14 10:36:05 +01:00
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
acf01e056f Clean up status related code a bit 2020-12-09 08:37:32 +01:00
Patrik Svensson
501db5d287 Add status support 2020-12-09 00:07:02 +01:00
Patrik Svensson
cbed41e637 Add support for different spinners 2020-12-06 15:41:45 +01:00
Patrik Svensson
3c504155bc Fix progress rendering bug 2020-12-04 10:19:09 +01:00
Patrik Svensson
ae32785f21 Add progress task list support 2020-12-04 07:29:48 +01:00
chenxuuu
c61e386440
Add Chinese README 2020-11-30 05:56:25 +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
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
4f6eca4fcb Fix rendering of exceptions with generic params
Closes #145
2020-11-24 22:16:17 +01:00
Patrik Svensson
a5125d640c Add initial FIGlet docs 2020-11-22 03:27:15 +01:00
Patrik Svensson
a59e0dcb21 Add FIGlet text support
Closes #97
2020-11-22 03:09:42 +01:00
Simon Cropp
bde61cc6ff
Verify: Use custom test directory 2020-11-20 23:27:35 +01:00
Simon Cropp
5c33b87a9c
Add Verify for testing 2020-11-20 16:22:23 +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
0d209d8f18 Add text prompt support 2020-11-19 12:24:04 +01:00
Patrik Svensson
380c6aca45 Add net5.0 target framework 2020-11-11 15:28:32 +01:00
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
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
Martin Andersen
bca1c889d1 Add Padding extension
Add extension method for specifying horizontal and vertical padding.
Similar constructor for `Padding` already existed.

Update documentation for table column appearance (padding).

Update
`Should_Render_Padded_Object_Correctly_When_Nested_Within_Other_Object`
test to use new extension method.
2020-10-27 09:09:30 +01:00
Takahito Yamatoya
9915a0d6a8 Update Documentation for escape 2020-10-27 09:08:27 +01:00
Takahito Yamatoya
f34fc43d00 Update documentation for aligning tables 2020-10-27 09:08:27 +01:00
Patrik Svensson
e7f497050c Add row and column accessors for tables and grids 2020-10-26 18:15:27 +01:00
Martin Andersen
3e5e22d6c2 Update documentation
- ExceptionFormat -> ExceptionFormats.
- Fix link to documentation.
- Add cross reference to Styles.
- Render table in example code.
- Add code for setting background color.
2020-10-26 15:31:44 +01:00
Patrik Svensson
10daf727e9 Fix outdated documentation 2020-10-26 12:20:17 +01:00
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
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
Takahito Yamatoya
037a215a78
Add documentation for rule 2020-10-22 08:53:20 +02:00
Patrik Svensson
9afc1ea721 Add support for aligning tables 2020-10-21 18:15:51 +02:00
Takahito Yamatoya
b52056ee49
Update documentation for calendar 2020-10-20 21:55:29 +02:00
Patrik Svensson
3941fd81ab Move table and calendar docs 2020-10-20 02:32:04 +02:00
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
1410cba6c5 Add Markdown.Escape method 2020-10-20 01:09:26 +02:00
Patrik Svensson
70fc14e9cd Add new ctors for Rows and Columns widgets 2020-10-19 21:25:28 +02:00
Takahito Yamatoya
0b4359a52a
Add installation instructions
* to add how to install

* fix

* remove empty line
2020-10-19 16:50:54 +02:00
Patrik Svensson
cb2924a609 Add table heading and footnote support
Closes #116
2020-10-19 15:46:57 +02:00
Takahito Yamatoya
5c119ee0c3
Add documentation for calendar 2020-10-19 15:44:16 +02:00
Takahito Yamatoya
b9d182b6e3
Add README.jp.md 2020-10-19 15:42:33 +02:00
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
Takahito Yamatoya
a2f507e58f update sample output 2020-10-18 06:56:47 +02:00
Takahito Yamatoya
d1d06d6a6b fix incorrect command 2020-10-18 06:56:47 +02:00
Patrik Svensson
52718c499c Fix minor typo in example 2020-10-17 13:22:01 +02:00
Patrik Svensson
7ef1ac483a Fix overflow splitting bug
Closes #93
2020-10-17 12:37:20 +02:00
Takahito Yamatoya
c0875c912a fix incorrect link 2020-10-17 12:16:18 +02:00
Patrik Svensson
3f2ca49071 Add calendar control
Closes #101
2020-10-16 23:02:53 +02:00
Khalid Abuhakmeh
0a0380ae0a Don't throw when console is small
this just returns an empty collection when
take is 0. It leads to some strange output, but
it doesn't blow up.

 #93
2020-10-08 22:17:12 +02:00
Patrik Svensson
ae92c606bb Add support for remapping emojis
Closes #94
2020-10-07 17:33:05 +02:00
Patrik Svensson
68e92f3365 Add various exception improvements 2020-10-07 11:57:28 +02:00
Patrik Svensson
39a8588dc3 Rename ExceptionFormats.None 2020-10-07 11:57:28 +02:00
Patrik Svensson
3c3afe7439 Add support for rendering exceptions 2020-10-05 07:03:02 +02:00
Gary Ewan Park
971f9032ba (doc) Dynamically generate sections
Rather than hard-coding them.  Then, as the number of sections increase,
no additional changes will be required here.
2020-10-03 16:30:21 +02:00
Gary Ewan Park
5149557560 (doc) Remove hard-coded link
Rather than specifying spectre.console directly in the layout, figure out
the URL using GetLink method.
2020-10-03 16:30:21 +02:00
Khalid Abuhakmeh
e0947708c9 Generalized Search
Generalized the search to work with any table
with some basic classes and some updated
JavaScript, we can now search colors and emojis.
2020-10-02 19:39:02 +02:00
Patrik Svensson
b1db8a9403 Clean up border code
Removed caching that really didn't do anything anymore.
2020-10-01 23:05:02 +02:00
Khalid Abuhakmeh
a2f8652575 Add Search To Emoji Page
This adds a typeahead search feature
for the very large emoji table. It filters as you type to find if an emoji exists or not.

The JavaScript could be adapted to work on all tables in the future.
2020-10-01 22:00:39 +02:00
Khalid Abuhakmeh
672faa131f Update Docs Readme
Added some more context to the docs readme for
folks looking to contribute. Also added the license
so its clear what the license of the docs site is. As
a small tweak I removed a duplicate string value and
use the Constant.
2020-10-01 20:51:32 +02:00
Patrik Svensson
e429f6434b Update examples 2020-10-01 14:43:08 +02:00
Patrik Svensson
93ec7401c8 Add support for markdown tables
Closes #85

* Split Border into BoxBorder and TableBorder
* Change how different table parts are composed
* Add markdown table border
2020-10-01 14:43:08 +02:00
Patrik Svensson
697273917e Move console encoder to rendering namespace 2020-09-21 17:07:05 +02:00
Patrik Svensson
2943535973 Make segments immutable 2020-09-21 17:03:17 +02:00
Patrik Svensson
cd0d182f12 Add support for recording console output
This commit adds support for recording console output
as well as exporting it to either text or HTML. A user can
also provide their own encoder if they wish.
2020-09-21 13:33:28 +02:00
Patrik Svensson
b197f278ed Add support for rows
Closes #69
2020-09-20 19:17:33 +02:00
Patrik Svensson
3847a8949f Fix bug with uris being interpreted as emojis
Closes #82
2020-09-20 13:00:44 +02:00
Patrik Svensson
eeb3f967b6 Update emoji support
* Add constants for emojis
* Move emoji shortcode rendering to Markup
* Add documentation
* Add example
* Add tests
2020-09-18 16:11:51 +02:00
Patrik Svensson
090b30f731 Use Wcwidth library 2020-09-18 15:31:12 +02:00
Patrik Svensson
df291ef84e Fix Info example emoji problem
The emojis that previously were used, used Unicode combinators
which are not fully supported. Changing to :thumbs_up: and :thumbs_down:
instead.
2020-09-17 10:58:50 +02:00
Patrik Svensson
7d6104ace4 Add padder widget
This commit adds a padder can be use to pad other IRenderable
objects such as tables, panels, grids, text, etc.
2020-09-17 10:58:50 +02:00
Kristian Hellang
314456ca17 Add emoji codes to example 2020-09-17 10:35:15 +02:00
Kristian Hellang
b7f654cd7f Replace emoji in segment text 2020-09-17 10:35:15 +02:00
Kristian Hellang
fea8a36e8a Add generated Emoji class with corresponding non-generated file 2020-09-17 10:35:15 +02:00
Kristian Hellang
0632b38477 Fix relative path in existing color script 2020-09-17 10:35:15 +02:00
Kristian Hellang
a7b7d4e556 Add Generator command to generate emoji lookup table 2020-09-17 10:35:15 +02:00
Kristian Hellang
11d331e31d Add .DS_Store to .gitignore 2020-09-17 10:35:15 +02:00
Patrik Svensson
ce670a7ca9 Add link identity generator 2020-09-12 14:47:32 +02:00
Patrik Svensson
101e244059 Minor clean up 2020-09-12 10:46:57 +02:00
Patrik Svensson
504746c5dc Add link support for supported terminals
Also refactors the code quite a bit, to make it a bit more
easier to add features like this in the future.

Closes #75
2020-09-11 17:44:56 +02:00
Patrik Svensson
1601ef24b3 Update border documentation 2020-09-09 14:27:40 +02:00
Patrik Svensson
b46d0fa4f6 Group IAnsiConsole extensions in csproj 2020-09-09 08:47:55 +02:00
Patrik Svensson
4f06687104 Restructure solution a bit 2020-09-09 08:43:48 +02:00
Patrik Svensson
003e15686f Add documentation for tables
Also moves "Colors" and "Styles" sections to appendix.
2020-09-08 18:21:52 +02:00
Patrik Svensson
3e9796849b Add more borders for grids, tables, and panels
* Ascii2
* AsciiDoubleHead
* Double
* DoubleEdge
* Heavy
* HeavyEdge
* HeavyHead
* Horizontal
* Minimal
* MinimalDoubleHead
* MinimalHeavyHead
* Simple
* SimpleHeavy
2020-09-08 00:16:20 +02:00
Patrik Svensson
3cc19520b0 Add implicit conversion op from string to Style
Closes #71
2020-09-06 23:03:51 +02:00
Patrik Svensson
87bde3e5a2 Remove BorderKind in favour of Border 2020-09-06 12:29:48 +02:00
Patrik Svensson
e6e9a4d950 Add description for 'Info' example 2020-09-05 08:52:06 +02:00
Patrik Svensson
29ce14e1e8 Rename 'Diagnostic' example to 'Info' 2020-09-05 08:50:00 +02:00
Patrik Svensson
ceb3572d6a Make table and grid extension methods fluent 2020-09-05 08:49:36 +02:00
Patrik Svensson
13c56eca01 Allow mutation of segments 2020-09-05 08:39:48 +02:00
Patrik Svensson
a477884d36 Move Panel extensions to Spectre.Console namespace 2020-09-05 08:20:13 +02:00
Patrik Svensson
ae6d2c63a3 Add column support
Adds support for rendering arbitrary data into columns.

Closes #67
2020-09-05 07:45:38 +02:00
Patrik Svensson
e946289bd9 Make styles composable
Also adds some new extension methods and make some APIs a bit more consistent.

Closes #64
2020-09-03 21:26:20 +02:00
Patrik Svensson
bcaaa6b2d3 Update table of contents (skip-ci) 2020-09-03 20:04:06 +02:00
Patrik Svensson
d3588a4b06 Remove styles and colors (skip-ci) 2020-09-03 20:03:26 +02:00
Patrik Svensson
7471e9d38c Add panel header support
Closes #63
2020-09-03 19:02:29 +02:00
Patrik Svensson
9f8ca6d648 Add text overflow support
Closes #61
2020-09-03 14:57:57 +02:00
Patrik Svensson
88edfe68ec Add border for color representations 2020-09-02 09:55:44 +02:00
Patrik Svensson
5d32764a64 Fix typo: SRG -> SGR 2020-09-02 09:02:59 +02:00
Patrik Svensson
4f6c9c62c7 Set fetch depth to 0 2020-09-01 22:05:46 +02:00
Patrik Svensson
f2677213a4 Separate build and run when publishing docs 2020-09-01 22:00:44 +02:00
Patrik Svensson
bdaf00a556 Remove empty documentation pages 2020-09-01 21:51:25 +02:00
Patrik Svensson
7de4b6c7b9 Build docs as part of CI 2020-09-01 21:50:36 +02:00
Patrik Svensson
0bc801e3eb Build docs when source change 2020-09-01 21:40:49 +02:00
Patrik Svensson
88a82cdad0 Build docs in release mode 2020-09-01 21:39:40 +02:00
Patrik Svensson
0cecb555d5 Show documentation version in footer 2020-09-01 21:33:15 +02:00
Patrik Svensson
52e3ee17b0 Fix logo link 2020-09-01 21:28:52 +02:00
Dave Glick
caf7661e66 Moves all the pages up a level and hardcodes the section name 2020-09-01 21:23:01 +02:00
Dave Glick
65f0a085cc Updated to the latest Statiq Web with breakage fixes 2020-09-01 21:03:47 +02:00
Patrik Svensson
a123806cd8 Add docs for escaping [ and ] in markup 2020-09-01 16:52:40 +02:00
Patrik Svensson
173645cdd2 Added documentation for markup text 2020-08-31 14:05:28 +02:00
Patrik Svensson
7fd2efaeb5 Merge segments before rendering
This will reduce the number of segments to render
and produce cleaner ANSI escape code sequences.

Closes #46
2020-08-30 12:40:34 +02:00
Patrik Svensson
47fd646d21 Enable publish for all tags (skip-ci) 2020-08-30 10:22:53 +02:00
Patrik Svensson
a06859dcb5 Only publish on tags (skip-ci) 2020-08-30 10:12:53 +02:00
Patrik Svensson
7d3a67e6ae Always publish tags (skip-ci) 2020-08-30 10:04:29 +02:00
Patrik Svensson
f4497b1278 Docs: Added color number (skip-ci) 2020-08-29 11:25:19 +02:00
Patrik Svensson
a16daade6c Fallback to default buffer size
Also fixes a bug when using Spectre.Console in GitHub Actions.
2020-08-28 11:56:54 +02:00
Khalid Abuhakmeh
ab73d16583 Fix Unescaped Bracket
Was throwing error because of unescaped end bracket
at the end of options.
2020-08-27 20:53:10 +02:00
Patrik Svensson
f2566f2ca4 Remove commented out code (skip-ci) 2020-08-27 20:13:35 +02:00
Patrik Svensson
358b0225b4 Add documentation header (skip-ci) 2020-08-27 20:12:13 +02:00
Patrik Svensson
68aaf8a2fa Embed symbols in package 2020-08-27 19:31:44 +02:00
Patrik Svensson
1b2f2dab82 Do not depend on System.Memory 2020-08-27 19:31:12 +02:00
Patrik Svensson
270658b0bb Add hard coded links to root (skip-ci) 2020-08-27 16:51:04 +02:00
Patrik Svensson
21c210dc8a Potential fix for link root (skip-ci) 2020-08-27 16:03:31 +02:00
Patrik Svensson
c546835198 Add host info to docs (skip-ci) 2020-08-27 15:48:53 +02:00
Patrik Svensson
3a432b11c8 Update workflow for publishing docs (skip-ci) 2020-08-27 15:38:17 +02:00
Patrik Svensson
3210afb698 Add workflow for pushing docs 2020-08-27 15:31:12 +02:00
Patrik Svensson
f1912b1d44 Add initial docs 2020-08-27 15:12:03 +02:00
Patrik Svensson
decb887b0a Throw if markup contains unescaped close tag 2020-08-27 09:44:55 +02:00
Patrik Svensson
31f117aed0 Clean up public API
* Make things a bit more consistent
* Add extension methods to configure things like tables, panels and grids.
2020-08-26 15:10:19 +02:00
Patrik Svensson
c111c7d463 Restructure and update example image 2020-08-25 11:19:58 +02:00
Patrik Svensson
695327ec72 Update README 2020-08-25 10:27:57 +02:00
Patrik Svensson
6df90442b7 Add support for setting border color
Closes #51
2020-08-25 10:27:57 +02:00
Patrik Svensson
7182d01a23 Fix typo in "Bonjour le monde" (skip-ci)
Closes #50
2020-08-25 09:17:40 +02:00
Patrik Svensson
8a01b93aca Don't limit tables and grids to markup text
Closes #13
2020-08-24 23:28:40 +02:00
Patrik Svensson
effdecb1d4 Add GitHub Sponsors data (skip-ci) 2020-08-24 12:04:01 +02:00
Patrik Svensson
4cfe55cc27 Emit native line breaks 2020-08-16 13:47:57 +02:00
Patrik Svensson
5b33f80213 Fix line ending problem with text 2020-08-16 12:26:51 +02:00
Patrik Svensson
d7bbaf4a85 Add word wrapping for text
Closes #18
2020-08-14 18:19:24 +02:00
Patrik Svensson
0119364728 Add examples of how to use Spectre.Console 2020-08-12 14:59:17 +02:00
Patrik Svensson
1d74fb909c Add support for adding empty rows
This affects grids and tables.
2020-08-11 17:49:28 +02:00
Patrik Svensson
5d132220ba Enable nullable reference types
Closes #36
2020-08-11 17:24:34 +02:00
Patrik Svensson
a273f74758 Add aliases for styles
Closes #37
2020-08-11 16:45:05 +02:00
Patrik Svensson
717931f11c Add support for RGB colors
Closes #34
2020-08-11 16:45:05 +02:00
Patrik Svensson
bcfc495843 Add support for hex colors
Closes #33
2020-08-11 16:45:05 +02:00
Patrik Svensson
9aa36c4cf0 Do not include cell separators in grid
Closes #40
2020-08-11 11:53:34 +02:00
Patrik Svensson
22d4af4482 Preserve line breaks 2020-08-10 11:42:34 +02:00
Patrik Svensson
f4d1796e40 Do not split lines if width is 0
Closes #32
2020-08-09 11:53:56 +02:00
Patrik Svensson
2dd0eb9f74 Add support for column alignment and padding
Closes #12
Closes #31
2020-08-08 23:11:34 +02:00
Patrik Svensson
fa85216554 Add fallback for unicode borders 2020-08-07 22:24:38 +02:00
Patrik Svensson
d475e3b30a Reset colors before line break
Closes #28
2020-08-07 13:12:03 +02:00
Patrik Svensson
9637066927 Add better algorithm for calculating column widths
Closes #14
2020-08-07 12:55:33 +02:00
AdmiringWorm
0b4321115a Add background color examples in Sample console 2020-08-07 08:20:20 +02:00
AdmiringWorm
5cd9ece31a Add check for IsDefault when comparing Colors 2020-08-07 08:20:20 +02:00
AdmiringWorm
b0341862cf Add failing unit test for comparing black and default color 2020-08-07 08:20:20 +02:00
AdmiringWorm
2e7b3d520a Update regex to correctly identify Windows 10
When running .NET Core 2.1 or .NET Framework 4.6.1, the used regex for
detecting Windows 10 TrueColor support does not match the OSDescription.
The reason for this is because on those frameworks the description has
trailing whitespaces, but they do not on .NET Core 3.1.
This commit updates the regex to ignore any trailing whitespaces.
2020-08-07 08:11:34 +02:00
Patrik Svensson
646f51a628 Fix NuGet badge (skip-ci) 2020-08-05 16:03:09 +02:00
Patrik Svensson
a0bd481255 Add package icon
Closes #20
2020-08-05 15:49:43 +02:00
Patrik Svensson
6d197c5140 Add border support for panels
Closes #11
2020-08-05 15:28:15 +02:00
Patrik Svensson
108e56c229 Add rounded border 2020-08-05 14:19:45 +02:00
Patrik Svensson
66994cd904 Add grid support 2020-08-05 00:44:05 +02:00
Patrik Svensson
f9bd936254 Add support for showing no border 2020-08-05 00:44:05 +02:00
Patrik Svensson
a068fc68c3 Add support for tables 2020-08-04 22:24:13 +02:00
Patrik Svensson
aa34c145b9 skip-ci: Do not explicitly fetch tags 2020-08-04 09:35:29 +02:00
Patrik Svensson
98cf63f485 Rename Style and Appearance
* Renames Style -> Decoration
* Renames Appearance -> Style
* Adds Style.Parse and Style.TryParse
2020-08-03 23:30:47 +02:00
Patrik Svensson
c3286a4842 Rename folder 2020-08-03 15:34:33 +02:00
Patrik Svensson
e5bf2bd498 Autogenerate known colors and palettes
This will make it a bit easier to make changes
2020-08-03 15:22:39 +02:00
Patrik Svensson
5267ebda49 Get color names from lookup table
Also adds tests for Color struct and fixes a bug
that had to do with equality.
2020-08-03 11:32:17 +02:00
Patrik Svensson
f19202b427 Improve text composite
- A `Text` object should not be able to justify itself.
  All justification needs to be done by a parent.
- Apply colors and styles to part of a `Text` object
- Markup parser should return a `Text` object
2020-08-02 22:45:01 +02:00
Patrik Svensson
8e4f33bba4 Added initial support for rendering composites
This is far from complete, but it's a start
and it will enable us to create things like tables
and other complex objects in the long run.
2020-07-30 22:55:42 +02:00
Patrik Svensson
e596e6eb4f Add example showing how to use System.ConsoleColor 2020-07-24 22:52:25 +02:00
Patrik Svensson
a80120babc skip-ci: Fix typo in README 2020-07-24 22:47:18 +02:00
Patrik Svensson
214d510d6d skip-ci: Add System.ConsoleColor info to README 2020-07-24 22:46:17 +02:00
Patrik Svensson
0986a5f744 Add parser and renderer for markup language 2020-07-24 22:37:33 +02:00
Patrik Svensson
b72a695c35 Remove <public> keyword from IAnsiConsole 2020-07-23 18:33:07 +02:00
Patrik Svensson
6a7733cabf Add convenience methods for writing values to the Console (#1)
* Remove IAnsiConsole.WriteLine
* Add WriteLine extensions for IAnsiConsole
* Add Write extensions for IAnsiConsole
* Add Write and WriteLine method for AnsiConsole
2020-07-23 13:24:03 +02:00
Patrik Svensson
36e2034a1c skip-ci: Add NuGet badge 2020-07-21 12:17:08 +02:00
1391 changed files with 104811 additions and 2875 deletions

View File

@ -2,7 +2,7 @@ root = true
[*]
charset = utf-8
end_of_line = CRLF
end_of_line = LF
indent_style = space
indent_size = 4
insert_final_newline = false
@ -26,10 +26,10 @@ indent_size = 2
[*.md]
trim_trailing_whitespace = false
[*.sh]
end_of_line = lf
[*.cs]
# Prefer file scoped namespace declarations
csharp_style_namespace_declarations = file_scoped:warning
# Sort using and Import directives with System.* appearing first
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false

5
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1,5 @@
# Use file scoped namespace declarations
7b2da0a4f63bf3ceab99d2c88535e74155f2b99c
# fix line-endings
e2ad4b1ea5555e701cda4fd400bb6592e318e1ff

4
.gitattributes vendored Normal file
View File

@ -0,0 +1,4 @@
* text=auto
*.cs text eol=lf
*.md text eol=lf

31
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,31 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ["bug", "needs triage"]
assignees: ''
---
**Information**
- OS: [eg Windows/Linux/MacOS]
- Version: [e.g. 0.33.0]
- Terminal: [e.g Windows Terminal]
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior.
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.
---
Please upvote :+1: this issue if you are interested in it.

View File

@ -0,0 +1,23 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ["feature", "needs triage"]
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.
---
Please upvote :+1: this issue if you are interested in it.

1
.github/funding.yml vendored Normal file
View File

@ -0,0 +1 @@
github: patriksvensson

22
.github/pull_request_template.md vendored Normal file
View File

@ -0,0 +1,22 @@
<!--
Do NOT open a PR without discussing the changes on an open issue, first.
Add the issue number here. e.g. #123
-->
fixes #
<!-- formalities. These are not optional. -->
- [ ] I have read the [Contribution Guidelines](https://github.com/spectreconsole/spectre.console/blob/main/CONTRIBUTING.md)
- [ ] I have commented on the issue above and discussed the intended changes
- [ ] A maintainer has signed off on the changes and the issue was assigned to me
- [ ] All newly added code is adequately covered by tests
- [ ] All existing tests are still running without errors
- [ ] The documentation was modified to reflect the changes _OR_ no documentation changes are required.
## Changes
<!-- describe the changes you made. -->
---
Please upvote :+1: this pull request if you are interested in it.

20
.github/renovate.json vendored Normal file
View File

@ -0,0 +1,20 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base"
],
"dependencyDashboard": false,
"commitMessagePrefix": "chore:",
"labels": ["dependencies"],
"npm": {
"ignorePaths": [
"**/node_modules/**",
"**/bower_components/**",
"docs/**"
]
},
"ignorePaths": [
"resources/scripts/**",
"docs/**"
]
}

18
.github/workflows/backlog.yaml vendored Normal file
View File

@ -0,0 +1,18 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Add issues/PRs to backlog automatically
on:
issues:
types:
- opened
- transferred
jobs:
add-to-project:
name: Add issue to backlog
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main
with:
project-url: https://github.com/orgs/spectreconsole/projects/1
github-token: ${{ secrets.PROJECT_TOKEN }}

View File

@ -1,44 +1,44 @@
name: Continuous Integration
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Pull Request
on: pull_request
env:
# Set the DOTNET_SKIP_FIRST_TIME_EXPERIENCE environment variable to stop wasting time caching packages
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending usage data to Microsoft
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
###################################################
# BUILD
###################################################
build:
name: Build
if: "!contains(github.event.head_commit.message, 'skip-ci')"
strategy:
matrix:
kind: ['linux', 'windows', 'macOS']
include:
- kind: linux
os: ubuntu-latest
- kind: windows
os: windows-latest
- kind: macOS
os: macos-latest
runs-on: ${{ matrix.os }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Get Git tags'
run: git fetch --tags
shell: bash
- name: Setup dotnet
uses: actions/setup-dotnet@v1
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.301
dotnet-version: |
8.0.x
9.0.x
- name: Build
shell: bash
run: |
dotnet tool restore
dotnet cake
dotnet cake
- name: Upload Verify Test Results
if: failure()
uses: actions/upload-artifact@v4
with:
name: verify-test-results
path: |
**/*.received.*

View File

@ -1,3 +1,4 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Publish
on:
@ -8,75 +9,31 @@ on:
- main
env:
# Set the DOTNET_SKIP_FIRST_TIME_EXPERIENCE environment variable to stop wasting time caching packages
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
# Disable sending usage data to Microsoft
DOTNET_CLI_TELEMETRY_OPTOUT: true
jobs:
###################################################
# BUILD
###################################################
build:
name: Build
if: "!contains(github.event.head_commit.message, 'skip-ci')"
strategy:
matrix:
kind: ['linux', 'windows', 'macOS']
include:
- kind: linux
os: ubuntu-latest
- kind: windows
os: windows-latest
- kind: macOS
os: macos-latest
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: 'Get Git tags'
run: git fetch --tags
shell: bash
- name: Setup dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.301
- name: Build
shell: bash
run: |
dotnet tool restore
dotnet cake
###################################################
# PUBLISH
###################################################
publish:
name: Publish
needs: [build]
if: "!contains(github.event.head_commit.message, 'skip-ci')"
build:
name: Publish NuGet Packages
if: "!contains(github.event.head_commit.message, 'skip-ci') || startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: 'Get Git tags'
run: git fetch --tags
shell: bash
- name: Setup dotnet
uses: actions/setup-dotnet@v1
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
dotnet-version: 3.1.301
dotnet-version: |
8.0.x
9.0.x
- name: Publish
shell: bash
@ -84,4 +41,44 @@ jobs:
dotnet tool restore
dotnet cake --target="publish" \
--nuget-key="${{secrets.NUGET_API_KEY}}" \
--github-key="${{secrets.GITHUB_TOKEN}}"
--github-key="${{secrets.GITHUB_TOKEN}}"
###################################################
# DOCS
###################################################
documentation:
name: Publish Documentation
needs: [build]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '16'
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-
- name: Publish Documentation
shell: bash
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NETLIFY_ACCESS_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
run: |
cd docs
dotnet tool restore
dotnet run --configuration Release -- deploy

View File

@ -0,0 +1,24 @@
name: Top issues action.
on:
schedule:
- cron: '0 0 */1 * *'
jobs:
ShowAndLabelTopIssues:
name: Display and label top issues.
runs-on: ubuntu-latest
steps:
- name: Top Issues action
uses: rickstaa/top-issues-action@v1.3.101
env:
github_token: ${{ secrets.GITHUB_TOKEN }}
with:
top_list_size: 10
label: true
dashboard: true
dashboard_show_total_reactions: true
top_issues: true
top_bugs: true
top_features: true
feature_label: feature
top_pull_requests: true

7
.gitignore vendored
View File

@ -5,6 +5,8 @@
[Pp]ackages/
/.artifacts/
/[Tt]ools/
.idea
.DS_Store
# Cakeup
cakeup-x86_64-latest.exe
@ -77,7 +79,6 @@ x64/
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
_NCrunch_*
@ -86,3 +87,7 @@ packages
# Windows
Thumbs.db
*.received.*
node_modules

View File

@ -2,45 +2,131 @@
## Our Pledge
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, caste, color, religion, or sexual
identity and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to creating a positive environment include:
Examples of behavior that contributes to a positive environment for our
community include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall
community
Examples of unacceptable behavior by participants include:
Examples of unacceptable behavior include:
* The use of sexualized language or imagery and unwelcome sexual attention or advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* The use of sexualized language or imagery, and sexual attention or advances of
any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting
* Publishing others' private information, such as a physical or email address,
without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
## Enforcement Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at hello@spectresystems.se. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
conduct@dotnetfoundation.org.
All complaints will be reviewed and investigated promptly and fairly.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series of
actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or permanent
ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within the
community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.1, available at
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/
Community Impact Guidelines were inspired by
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
For answers to common questions about this code of conduct, see the FAQ at
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
[https://www.contributor-covenant.org/translations][translations].
[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

161
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,161 @@
# Contribution Guidelines
* [Prerequisites](#prerequisites)
* [Definition of trivial contributions](#definition-of-trivial-contributions)
* [Code](#code)
* [Code style](#code-style)
* [Dependencies](#dependencies)
* [Unit tests](#unit-tests)
* [Contributing process](#contributing-process)
* [Get buyoff or find open community issues or features](#get-buyoff-or-find-open-community-issues-or-features)
* [Set up your environment](#Set-up-your-environment)
* [Prepare commits](#prepare-commits)
* [Submit pull request](#Submit-pull-request)
* [Respond to feedback on pull request](#respond-to-feedback-on-pull-request)
* [Other general information](#other-general-information)
* [Acknowledgement](#acknowledgement)
## Prerequisites
By contributing to Spectre.Console, you assert that:
* The contribution is your own original work.
* You have the right to assign the copyright for the work (it is not owned by your employer, or
you have been given copyright assignment in writing).
* You [license](https://github.com/spectreconsole/spectre.console/blob/main/LICENSE) the contribution under the terms applied to the rest of the Spectre.Console project.
* You agree to follow the [code of conduct](https://github.com/spectreconsole/spectre.console/blob/main/CODE_OF_CONDUCT.md).
## Definition of trivial contributions
It's hard to define what is a trivial contribution. Sometimes even a 1 character change can be considered significant.
Unfortunately because it can be subjective, the decision on what is trivial comes from the maintainers of the project
and not from folks contributing to the project.
What is generally considered trivial:
* Fixing a typo.
* Documentation changes.
## Code
### Code style
Normal .NET coding guidelines apply.
See the [Framework Design Guidelines](https://learn.microsoft.com/en-us/dotnet/standard/design-guidelines/) for more information.
### Dependencies
The assembly `Spectre.Console` should have no dependencies except the .NET BCL library.
### Unit tests
Make sure to run all unit tests before creating a pull request.
Any new code should also have reasonable unit test coverage.
## Contributing process
### Get buyoff or find open community issues or features
* Through GitHub, or through the [GitHub discussions](https://github.com/spectreconsole/spectre.console/discussions) (preferred),
you talk about a feature you would like to see (or a bug), and why it should be in Spectre.Console.
* If approved through the GitHub discussions, ensure an accompanying GitHub issue is created with
information and a link back to the discussion.
* Once you get a nod from someone in the Spectre.Console Team, you can start on the feature.
* Alternatively, if a feature is on the issues list with the
[good first issue](https://github.com/spectreconsole/spectre.console/labels/good%20first%20issue) label,
it is open for a community member (contributor) to patch. You should comment that you are signing up for it on
the issue so someone else doesn't also sign up for the work.
### Set up your environment
* You create, or update, a fork of `spectreconsole/spectre.console` under your GitHub account.
* From there you create a branch named specific to the feature.
* In the branch you do work specific to the feature.
* Please also observe the following:
* No reformatting
* No changing files that are not specific to the feature.
* More covered below in the **Prepare commits** section.
* Test your changes and please help us out by updating and implementing some automated tests.
It is recommended that all contributors spend some time looking over the tests in the source code.
You can't go wrong emulating one of the existing tests and then changing it specific to the behavior you are testing.
* Please do not update your branch from the main branch unless we ask you to. See the responding to feedback section below.
### Prepare commits
This section serves to help you understand what makes a good commit.
A commit should observe the following:
* A commit is a small logical unit that represents a change.
* Should include new or changed tests relevant to the changes you are making.
* No unnecessary whitespace. Check for whitespace with `git diff --check` and `git diff --cached --check` before commit.
* You can stage parts of a file for commit.
### Submit pull request
Prerequisites:
* You are making commits in a feature branch.
* All code should compile without errors or warnings.
* All tests should be passing.
Submitting PR:
* Once you feel it is ready, submit the pull request to the `spectreconsole/spectre.console` repository against the `main` branch
unless specifically requested to submit it against another branch.
* In the case of a larger change that is going to require more discussion,
please submit a PR sooner. Waiting until you are ready may mean more changes than you are
interested in if the changes are taking things in a direction the maintainers do not want to go.
* In the pull request, outline what you did and point to specific conversations (as in URLs)
and issues that you are resolving. This is a tremendous help for us in evaluation and acceptance.
* Once the pull request is in, please do not delete the branch or close the pull request
(unless something is wrong with it).
* One of the Spectre.Console team members, or one of the maintainers, will evaluate it within a
reasonable time period (which is to say usually within 1-3 weeks). Some things get evaluated
faster or fast tracked. We are human and we have active lives outside of open source so don't
fret if you haven't seen any activity on your pull request within a month or two.
We don't have a Service Level Agreement (SLA) for pull requests.
Just know that we will evaluate your pull request.
### Respond to feedback on pull request
We may have feedback for you to fix or change some things. We generally like to see that pushed against
the same topic branch (it will automatically update the Pull Request). You can also fix/squash/rebase
commits and push the same topic branch with `--force` (it's generally acceptable to do this on topic
branches not in the main repository, it is generally unacceptable and should be avoided at all costs
against the main repository).
If we have comments or questions when we do evaluate it and receive no response, it will probably
lessen the chance of getting accepted. Eventually, this means it will be closed if it is not accepted.
Please know this doesn't mean we don't value your contribution, just that things go stale. If in the
future you want to pick it back up, feel free to address our concerns/questions/feedback and reopen
the issue/open a new PR (referencing old one).
Sometimes we may need you to rebase your commit against the latest code before we can review it further.
If this happens, you can do the following:
* `git fetch upstream` (upstream remote would be `spectreconsole/spectre.console`)
* `git checkout main`
* `git rebase upstream/main`
* `git checkout your-branch`
* `git rebase main`
* Fix any merge conflicts
* `git push origin your-branch` (origin would be your GitHub repo or `your-github-username/spectre.console` in this case).
You may need to `git push origin your-branch --force` to get the commits pushed.
This is generally acceptable with topic branches not in the mainstream repository.
The only reasons a pull request should be closed and resubmitted are as follows:
* When the pull request is targeting the wrong branch (this doesn't happen as often).
* When there are updates made to the original by someone other than the original contributor.
Then the old branch is closed with a note on the newer branch this supersedes #github_number.
## Other general information
If you reformat code or hit core functionality without an approval from a person on the Spectre.Console Team,
it's likely that no matter how awesome it looks afterwards, it will probably not get accepted.
Reformatting code makes it harder for us to evaluate exactly what was changed.
If you do these things, it will be make evaluation and acceptance easy.
Now if you stray outside of the guidelines we have above, it doesn't mean we are going to ignore
your pull request. It will just make things harder for us.
Harder for us roughly translates to a longer SLA for your pull request.
## Acknowledgement
This contribution guide was taken from the [Chocolatey project](https://chocolatey.org/)
with permission and was edited to follow Spectre.Console's conventions and processes.

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020 Spectre Systems AB
Copyright (c) 2020 Patrik Svensson, Phil Scott, Nils Andresen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

6
NuGet.Config Normal file
View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
</packageSources>
</configuration>

60
README.fa.md Normal file
View File

@ -0,0 +1,60 @@
# `Spectre.Console`
_[![Spectre.Console NuGet Version](https://img.shields.io/nuget/v/spectre.console.svg?style=flat&label=NuGet%3A%20Spectre.Console)](https://www.nuget.org/packages/spectre.console)_
<div dir="rtl">
یک کتابخانه .NET. که ایجاد Console Applicationهای زیبا و cross platform را آسان‌تر می‌کند.
از کتابخانه عالی [Rich](https://github.com/willmcgugan/rich) برای پایتون، بسیار الهام گرفته شده است.
## فهرست
1. [امکانات](#features)
2. [نصب](#installing)
3. [مستندات](#documentation)
4. [مثال‌ها](#examples)
5. [مجوز](#license)
<h2 id="features">امکانات</h2>
* با در نظر گرفتن تست واحد نوشته شده است.
* جداول، چارچوب‌ها، پنل‌ها و یک زبان نشانه گذاری که از [rich](https://github.com/willmcgugan/rich) الهام گرفته شده است را پشتیبانی می‌کند.
* از رایج ترین پارامترهای SRG در هنگام فرم دهی متن مانند پررنگ، کم نور، اریب، زیرخط، خط زدن و چشمک زدن پشتیبانی می‌کند.
* پشتیبانی از رنگ‌های 28/8/4/3-بیت در ترمینال.
این کتابخانه توانایی ترمینال فعلی را تشخیص داده و در صورت لزوم رنگ‌ها را کاهش می‌دهد.
![Example](docs/input/assets/images/example.png)
<h2 id="installing">نصب</h2>
سریع ترین راه برای شروع `Spectre.Console` نصب از طریق NuGet Package می‌باشد.
<pre dir="ltr">
dotnet add package Spectre.Console
</pre>
<h2 id="documentation">مستندات</h2>
مستندات `Spectre.Console` را در اینجا می‌توایند پیدا کنید:
<div dir="ltr">
https://spectreconsole.net/
</div>
<h2 id="examples">مثال‌ها</h2>
To see `Spectre.Console` in action, please see the
[examples repository](https://github.com/spectreconsole/examples).
<h2 id="license">مجوز</h2>
<div dir="ltr">
Copyright © Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray
</div>
همانطور که Spectre.Console تحت مجوز MIT ارائه شده است؛ برای کسب اطلاعات بیشتر به مجوز مراجعه کنید.
* برای SixLabors.ImageSharp، مشاهده کنید: https://github.com/SixLabors/ImageSharp/blob/master/LICENSE
</div>

414
README.jp.md Normal file
View File

@ -0,0 +1,414 @@
# `Spectre.Console`
_[![Spectre.Console NuGet Version](https://img.shields.io/nuget/v/spectre.console.svg?style=flat&label=NuGet%3A%20Spectre.Console)](https://www.nuget.org/packages/spectre.console)_
綺麗なコンソールアプリケーションを簡単に作成するための.NETライブラリです。
Python用の素晴らしい[Rich ライブラリ](https://github.com/willmcgugan/rich)に強く影響を受けています。
## 目次
1. [特徴](#特徴)
2. [](#例)
3. [使用方法](#使用方法)
3.1. [Static APIの利用](#static-apiの利用)
3.2. [コンソールの作成](#コンソールの作成)
4. [例の実行](#例の実行)
5. [クイックスタート](#クイックスタート)
6. [マークアップ](#マークアップ)
7. [絵文字](#絵文字)
8. [テーブル](#テーブル)
9. [例外](#例外)
## 特徴
* ユニットテストを意識して書いています。
* table、grid、panel、マークアップ言語に影響を受けた [rich](https://github.com/willmcgugan/rich) に対応しています。
* 太字、薄字、斜字、下線、斜線、点滅などの一般的なSGR parameters に対応しています。
* ターミナルで 3/4/8/24ビットカラーに対応しています。
ライブラリは現在のターミナルの性能を検知し、必要なカラーにダウングレードします
## 例
![Example](docs/input/assets/images/example.png)
## 使用方法
`Spectre.Console` APIはステートフルで、スレッドセーフではありません。
異なるスレッドからコンソールに書く必要がある場合、通常の`System.Console` APIを使用するときと同様、適切な注意を払ってください。
現在の端末がANSIエスケープシーケンスに対応していない場合、
`Spectre.Console`は、`System.Console` APIの利用に切り替わります。
_メモ: このライブラリは現在開発中で、APIは1.0のリリースまでの間に変更されたり、
削除されたりする可能性があります。_
### Static APIの利用
`System.Console` APIでするように、テキストを出力したいだけの時にはstatic APIが最適ですが、綺麗です。
```csharp
AnsiConsole.Foreground = Color.CornflowerBlue;
AnsiConsole.Decoration = Decoration.Underline | Decoration.Bold;
AnsiConsole.WriteLine("Hello World!");
AnsiConsole.Reset();
AnsiConsole.MarkupLine("[bold yellow on red]{0}[/] [underline]world[/]!", "Goodbye");
```
もし、デフォルトの`IAnsiConsole`への参照を取得したい場合、
`AnsiConsole.Console`経由でアクセスできます。
### コンソールの作成
単体テスト中にコードの実行環境を制御したい場合など、
特定の機能をもつコンソールを明示的に作成すると便利なことがあります。
単体テストの一部としてコードで `AnsiConsole`を使わないことを推奨します。
```csharp
IAnsiConsole console = AnsiConsole.Create(
new AnsiConsoleSettings()
{
Ansi = AnsiSupport.Yes,
ColorSystem = ColorSystemSupport.TrueColor,
Out = new StringWriter(),
});
```
_メモ: 主導でコンソールを作成しているときに特定のカラーシステムを指定できたとしても、
ユーザーのターミナルでは使えないかもしれないことを覚えておいてください。
テスト用にIAnsiConsoleを作成していない限り、
常に`ColorSystemSupport.Detect``AnsiSupport.Detect`を使用してください。_
## 例の実行
Spectre.Consoleでできることを見るために、
[dotnet-example](https://github.com/patriksvensson/dotnet-example)グローバルツールをインストールします。
```
> dotnet tool restore
```
このリポジトリで提供している例が一覧表示されます
```
> dotnet example
╭────────────┬───────────────────────────────────────┬──────────────────────────────────────────────────────╮
│ Name │ Path │ Description │
├────────────┼───────────────────────────────────────┼──────────────────────────────────────────────────────┤
│ Borders │ examples/Borders/Borders.csproj │ Demonstrates the different kind of borders. │
│ Calendars │ examples/Calendars/Calendars.csproj │ Demonstrates how to render calendars. │
│ Colors │ examples/Colors/Colors.csproj │ Demonstrates how to use colors in the console. │
│ Columns │ examples/Columns/Columns.csproj │ Demonstrates how to render data into columns. │
│ Emojis │ examples/Emojis/Emojis.csproj │ Demonstrates how to render emojis. │
│ Exceptions │ examples/Exceptions/Exceptions.csproj │ Demonstrates how to render formatted exceptions. │
│ Grids │ examples/Grids/Grids.csproj │ Demonstrates how to render grids in a console. │
│ Info │ examples/Info/Info.csproj │ Displays the capabilities of the current console. │
│ Links │ examples/Links/Links.csproj │ Demonstrates how to render links in a console. │
│ Panels │ examples/Panels/Panels.csproj │ Demonstrates how to render items in panels. │
│ Rules │ examples/Rules/Rules.csproj │ Demonstrates how to render horizontal rules (lines). │
│ Tables │ examples/Tables/Tables.csproj │ Demonstrates how to render tables in a console. │
│ Trees │ examples/Trees/Trees.csproj │ Demonstrates how to render trees in a console. │
╰────────────┴───────────────────────────────────────┴──────────────────────────────────────────────────────╯
```
そして、例を実行します
```
> dotnet example tables
┌──────────┬──────────┬────────┐
│ Foo │ Bar │ Baz │
├──────────┼──────────┼────────┤
│ Hello │ World! │ │
│ Bonjour │ le │ monde! │
│ Hej │ Världen! │ │
└──────────┴──────────┴────────┘
```
## クイックスタート
pectre.Consoleの利用を開始する最初の方法は、Nugetパッケージをインストールすることです。
```shell
> dotnet add package Spectre.Console
```
その後、`Spectre.Console`名前空間を参照する必要があります。一度参照したら、提供されている全ての機能を使用できます。
```csharp
using Spectre.Console
public static class Program
{
public static void Main(string[] args)
{
AnsiConsole.Markup("[underline red]Hello[/] World!");
}
}
```
## マークアップ
`Markup`クラスは、コンソールにリッチなテキストを出力することができます。
### 文法
コンソールマークアップはbbcodeに影響を受けた文法を利用します。角括弧でスタイルを書いたらスタイルを参照、例えば、`[bold red]`
は、`[/]`で閉じるまでスタイルが適用されます。
```csharp
AnsiConsole.Render(new Markup("[bold yellow]Hello[/] [red]World![/]"));
```
`Markup` クラスは`IRenderable`を実装しており、table、grid、Panelを使用できることを意味します。
`IRenderable`のレンダリングに対応している多くのクラスは、リッチテキストの描画を上書きます。
```csharp
var table = new Table();
table.AddColumn(new TableColumn(new Markup("[yellow]Foo[/]")));
table.AddColumn(new TableColumn("[blue]Bar[/]"));
```
### 便利なメソッド
`AnsiConsole`には、新しい`Markup`インスタンスをインスタンス化することなく、コンソールにマークアップテキストを書き込める便利なメソッドがあります。
```csharp
AnsiConsole.Markup("[underline green]Hello[/] ");
AnsiConsole.MarkupLine("[bold]World[/]");
```
### エスケープ文字列
`[`を出力するために、 `[[`を利用し、`]`を出力するために`]]`を利用します。
```csharp
AnsiConsole.Markup("[[Hello]] "); // [Hello]
AnsiConsole.Markup("[red][[World]][/]"); // [World]
```
`SafeMarkup`拡張メソッドを使用することもできます。
```csharp
AnsiConsole.Markup("[red]{0}[/]", "Hello [World]".SafeMarkup());
```
### カラー
`new Style(foreground: Color.Maroon)`のようなコード、または、`AnsiConsole.Markup("[maroon on blue]Hello[/]")`のようなマークアップテキストで色を使用できます。
### 背景色の設定
カラー指定の際に、`on`を付けることで、マークアップで背景色を設定できます。
```
[bold yellow on blue]Hello[/]
[default on blue]World[/]
```
### 絵文字の描画
マークアップの一部として絵文字を出力するために、emojiショートコードが使用できます。
```csharp
AnsiConsole.MarkupLine("Hello :globe_showing_europe_africa:!");
```
emojiのスタイルについては、付録の[Emoji](./appendix/emojis) を参照してください。
### カラー
上の例では、全ての色は名前で参照されています。
しかし、16進数やRGB表現をマークダウンで色指定に使用できます。
```csharp
AnsiConsole.Markup("[red]Foo[/] ");
AnsiConsole.Markup("[#ff0000]Bar[/] ");
AnsiConsole.Markup("[rgb(255,0,0)]Baz[/] ");
```
## 絵文字
どのような絵文字が使用できるかは、使用しているOSやターミナルに依存し、どのように表示されるかは保証されません。絵文字の幅計算は正確ではないため、表、パネル、グリッドで使用する場合は表示がずれるかもしれません。
完全な互換性を確保するために、Unicode 13.0 より以前の`Emoji_Presentation`カテゴリにあるものだけを使用することを検討してください。
公式の絵文字一覧
https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
```csharp
// Markup
AnsiConsole.MarkupLine("Hello :globe_showing_europe_africa:!");
// Constant
var hello = "Hello " + Emoji.Known.GlobeShowingEuropeAfrica;
```
テキスト内の絵文字を置き換えることができます。
```csharp
var phrase = "Mmmm :birthday_cake:";
var rendered
```
既存の絵文字を別のものにしたり、完全に新しい物を追加したいことがあります。このために、`Emoji.Remap`メソッドを使用できます。
この方法は、マークアップ文字と`Emoji.Replace`の両方で動作します。
```csharp
// Remap the emoji
Emoji.Remap("globe_showing_europe_africa", "😄");
// Render markup
AnsiConsole.MarkupLine("Hello :globe_showing_europe_africa:!");
// Replace emojis in string
var phrase = "Hello :globe_showing_europe_africa:!";
var rendered = Emoji.Replace(phrase);
```
## テーブル
テーブルはターミナルで表データを表示するのに完璧な方法です。
`Spectre.Console` は、テーブルの描画にとても優れていて、全てのカラムは中に合わせて調整してくれます。
`IRenderable`を実装しているものは、列ヘッダやセル、別のテーブルとして使用できます。
### 使い方
テーブルを描画するために、`Table`インスタンスを作成し、必要な数の列を追加し、行を追加します。
テーブルをコンソールの`Render`メソッドに渡して終わりです。
```csharp
// テーブルの作成
var table = new Table();
// 列の追加
table.AddColumn("Foo");
table.AddColumn(new TableColumn("Bar").Centered());
// 行の追加
table.AddRow("Baz", "[green]Qux[/]");
table.AddRow(new Markup("[blue]Corgi[/]"), new Panel("Waldo"));
// コンソールにテーブルの描画
AnsiConsole.Render(table);
```
これは次のように出力を描画します。
![Table](docs/input/assets/images/table.png)
### 罫線
```csharp
// 罫線を設定します
table.SetBorder(Border.None);
table.SetBorder(Border.Ascii);
table.SetBorder(Border.Square);
table.SetBorder(Border.Rounded);
```
### 拡大 / 縮小
```csharp
// テーブル幅を最大に設定します
table.Expand();
// テーブル幅を最小に設定します
table.Collapse();
```
### ヘッダーを隠す
```csharp
// 全ての列のヘッダーを隠します
table.HideHeaders();
```
### テーブル幅の設定
```csharp
// テーブル幅50セルに設定します
table.SetWidth(50);
```
### 整列(アライメント)
```csharp
// 整列を明示的に設定する
column.SetAlignment(Justify.Right);
```
### パディング
```csharp
// 左と右のパディングを設定する
column.SetPadding(left: 3, right: 5);
// 個別にパディングを設定する
column.PadLeft(3);
column.PadRight(5);
```
### 列改行の無効化
```csharp
// 列改行の無効化
column.NoWrap();
```
### 列幅の設定
```csharp
// 列幅の設定(これはまだ柔軟な拡張メソッドがありません)
column.Width = 15;
```
## 例外
例外はターミナルで見たときに読みやすいとは限りません。
`WriteException`メソッドを使用することで、例外をもう少し読みやすくすることができます。
```csharp
AnsiConsole.WriteException(ex);
```
![exception](docs/input/assets/images/exception.png)
### 例外の省略表示
例外の特定部分を短くして、さらに読みやすくしたり、パスをクリック可能なハイパーリンクにすることもできます。
ハイパーリンクがクリックできるかはターミナル次第です。
```csharp
AnsiConsole.WriteException(ex,
ExceptionFormats.ShortenPaths | ExceptionFormats.ShortenTypes |
ExceptionFormats.ShortenMethods | ExceptionFormats.ShowLinks);
```
![exception](docs/input/assets/images/compact_exception.png)
### 例外出力のカスタマイズ
例外の特定部分を短縮するだけでなく、デフォルトのスタイルを上書きすることもできます。
```csharp
AnsiConsole.WriteException(ex, new ExceptionSettings
{
Format = ExceptionFormats.ShortenEverything | ExceptionFormats.ShowLinks,
Style = new ExceptionStyle
{
Exception = Style.WithForeground(Color.Grey),
Message = Style.WithForeground(Color.White),
NonEmphasized = Style.WithForeground(Color.Cornsilk1),
Parenthesis = Style.WithForeground(Color.Cornsilk1),
Method = Style.WithForeground(Color.Red),
ParameterName = Style.WithForeground(Color.Cornsilk1),
ParameterType = Style.WithForeground(Color.Red),
Path = Style.WithForeground(Color.Red),
LineNumber = Style.WithForeground(Color.Cornsilk1),
}
});
```
![exception](docs/input/assets/images/custom_exception.png)

113
README.md
View File

@ -1,71 +1,90 @@
# `Spectre.Console`
A .NET Standard 2.0 library that makes it easier to create beautiful console applications.
It is heavily inspired by the excellent [Rich library](https://github.com/willmcgugan/rich)
for Python.
_[![Spectre.Console NuGet Version](https://img.shields.io/nuget/v/spectre.console.svg?style=flat&label=NuGet%3A%20Spectre.Console)](https://www.nuget.org/packages/spectre.console)_ _[![Spectre.Console CLI NuGet Version](https://img.shields.io/nuget/v/spectre.console.cli.svg?style=flat&label=NuGet%3A%20Spectre.Console.Cli)](https://www.nuget.org/packages/spectre.console.cli)_ [![Netlify Status](https://api.netlify.com/api/v1/badges/1eaf215a-eb9c-45e4-8c64-c90b62963149/deploy-status)](https://app.netlify.com/sites/spectreconsole/deploys)
A .NET library that makes it easier to create beautiful, cross platform, console applications.
It is heavily inspired by the excellent Python library, [Rich](https://github.com/willmcgugan/rich). Detailed instructions for using `Spectre.Console` are located on the project website, https://spectreconsole.net
## Table of Contents
1. [Features](#features)
1. [Installing](#installing)
1. [Documentation](#documentation)
1. [Examples](#examples)
1. [Sponsors](#sponsors)
1. [Code of Conduct](#code-of-conduct)
1. [.NET Foundation](#net-foundation)
1. [License](#license)
## Features
* Written with unit testing in mind.
* Supports tables, grids, panels, and a [Rich](https://github.com/willmcgugan/rich) inspired markup language.
* Supports the most common SRG parameters when it comes to text
styling such as bold, dim, italic, underline, strikethrough,
and blinking text.
* Supports 3/4/8/24-bit colors in the terminal.
The library will detect the capabilities of the current terminal
and downgrade colors as needed.
* Written with unit testing in mind.
## Example
![Example](docs/input/assets/images/example.png)
![Example](https://spectresystems.se/assets/open-source/spectre-console/example.png)
## Important Notices
## Usage
> [!IMPORTANT]\
> We use the [Top Issues Dashboard](https://github.com/spectreconsole/spectre.console/issues/1517) for tracking community demand. Please upvote :+1: the issues and pull requests you are interested in.
The `Spectre.Console` API is stateful and is not thread-safe.
If you need to write to the console from different threads, make sure that
you take appropriate precautions, just like when you use the
regular `System.Console` API.
## Installing
If the current terminal does not support ANSI escape sequences,
`Spectre.Console` will fallback to using the `System.Console` API.
_NOTE: This library is currently under development and API's
might change or get removed at any point up until a 1.0 release._
### Using the static API
The static API is perfect when you just want to output text
like you usually do with the `System.Console` API, but prettier.
The fastest way of getting started using `Spectre.Console` is to install the NuGet package.
```csharp
AnsiConsole.Foreground = Color.CornflowerBlue;
AnsiConsole.Style = Styles.Underline | Styles.Bold;
AnsiConsole.WriteLine("Hello World!");
AnsiConsole.Reset();
AnsiConsole.WriteLine("Good bye!");
AnsiConsole.WriteLine();
dotnet add package Spectre.Console
```
If you want to get a reference to the default `IAnsiConsole`,
you can access it via `AnsiConsole.Console`.
## Documentation
### Creating a console
The documentation for `Spectre.Console` can be found at
https://spectreconsole.net
Sometimes it's useful to explicitly create a console with specific
capabilities, such as during unit testing when you want control
over the environment your code runs in.
## Examples
```csharp
IAnsiConsole console = AnsiConsole.Create(
new AnsiConsoleSettings()
{
Ansi = AnsiSupport.Yes,
ColorSystem = ColorSystemSupport.TrueColor,
Out = new StringWriter(),
});
```
To see `Spectre.Console` in action, please see the
[examples repository](https://github.com/spectreconsole/examples).
_NOTE: Even if you can specify a specific color system to use
when manually creating a console, remember that the user's terminal
might not be able to use it, so unless you're creating an IAnsiConsole
for testing, always use `ColorSystemSupport.Detect` and `AnsiSupport.Detect`._
## Sponsors
The following people are [sponsoring](https://github.com/sponsors/patriksvensson)
`Spectre.Console` to show their support and to ensure the longevity of the project.
* [Rodney Littles II](https://github.com/RLittlesII)
* [Martin Björkström](https://github.com/bjorkstromm)
* [Dave Glick](https://github.com/daveaglick)
* [Kim Gunnarsson](https://github.com/kimgunnarsson)
* [Andrew McClenaghan](https://github.com/andymac4182)
* [C. Augusto Proiete](https://github.com/augustoproiete)
* [Viktor Elofsson](https://github.com/vktr)
* [Steven Knox](https://github.com/stevenknox)
* [David Pendray](https://github.com/dpen2000)
* [Elmah.io](https://github.com/elmahio)
* [Tom Kerkhove](https://github.com/tomkerkhove)
We really appreciate it.
**Thank you very much!**
## Code of Conduct
This project has adopted the code of conduct defined by the Contributor Covenant to clarify expected behavior in our community.
For more information see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
## .NET Foundation
This project is supported by the [.NET Foundation](https://dotnetfoundation.org).
## License
Copyright © Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray
`Spectre.Console` is provided as-is under the MIT license. For more information see LICENSE.
* SixLabors.ImageSharp, a library which `Spectre.Console` relies upon, is licensed under Apache 2.0 when distributed as part of `Spectre.Console`. The Six Labors Split License covers all other usage, see: https://github.com/SixLabors/ImageSharp/blob/master/LICENSE

74
README.pt-BR.md Normal file
View File

@ -0,0 +1,74 @@
# `Spectre.Console`
_[![Spectre.Console NuGet Versão](https://img.shields.io/nuget/v/spectre.console.svg?style=flat&label=NuGet%3A%20Spectre.Console)](https://www.nuget.org/packages/spectre.console)_
Uma biblioteca .NET que torna mais fácil criar aplicativos de console bonitos e multiplataforma.
É fortemente inspirada na excelente [biblioteca Rich](https://github.com/willmcgugan/rich)
para Python.
## Índice de Conteúdo
1. [Funcionalidades](#funcionalidades)
2. [Instalação](#instalação)
3. [Documentação](#documentação)
4. [Exemplos](#exemplos)
5. [Patrocinadores](#patrocinadores)
5. [Licença](#licença)
## Funcionalidades
* Desenvolvida com testes unitários em mente.
* Suporta tabelas, grades, painéis, e uma linguagem de marcação inspirada em [rich](https://github.com/willmcgugan/rich).
* Suporta os parâmetros SRG mais comuns quando se trata de estilo de texto,
como negrito, esmaecido, itálico, sublinhado, tachado
e texto piscando.
* Suporta cores de 3/4/8/24 bits no terminal.
A biblioteca detectará os recursos do terminal atual
e reduz as cores conforme necessário.
![Exemplo](docs/input/assets/images/example.png)
## Instalação
A maneira mais rápida de começar a usar o `Spectre.Console` é instalar o pacote NuGet.
```csharp
dotnet add package Spectre.Console
```
## Documentação
A documentação do `Spectre.Console` pode ser encontrada em
https://spectreconsole.net/
## Exemplos
To see `Spectre.Console` in action, please see the
[examples repository](https://github.com/spectreconsole/examples).
## Patrocinadores
As seguintes pessoas estão [patrocinando](https://github.com/sponsors/patriksvensson)
o Spectre.Console para mostrar o seu apoio e garantir a longevidade do projeto.
* [Rodney Littles II](https://github.com/RLittlesII)
* [Martin Björkström](https://github.com/bjorkstromm)
* [Dave Glick](https://github.com/daveaglick)
* [Kim Gunanrsson](https://github.com/kimgunnarsson)
* [Andrew McClenaghan](https://github.com/andymac4182)
* [C. Augusto Proiete](https://github.com/augustoproiete)
* [Viktor Elofsson](https://github.com/vktr)
* [Steven Knox](https://github.com/stevenknox)
* [David Pendray](https://github.com/dpen2000)
* [Elmah.io](https://github.com/elmahio)
Eu estou muito agradecido.
**Muito obrigado!**
## Licença
Copyright © Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray
Spectre.Console é fornecido no estado em que se encontra sob a licença do MIT. Para obter mais informações, consulte o arquivo [LICENSE](LICENSE.md).
* Para SixLabors.ImageSharp, consulte https://github.com/SixLabors/ImageSharp/blob/master/LICENSE

69
README.zh.md Normal file
View File

@ -0,0 +1,69 @@
# `Spectre.Console`
_[![Spectre.Console NuGet Version](https://img.shields.io/nuget/v/spectre.console.svg?style=flat&label=NuGet%3A%20Spectre.Console)](https://www.nuget.org/packages/spectre.console)_
`Spectre.Console`是一个 .NET 的库,可以更轻松地创建美观的跨平台控制台应用程序。
深受 [Rich](https://github.com/willmcgugan/rich) 这个Python优秀库的启发。
## 目录
1. [功能](#功能)
2. [安装](#安装)
3. [文档](#文档)
4. [例子](#例子)
5. [Sponsors](#Sponsors)
6. [开源许可](#开源许可)
## 功能
* 编写时考虑到了单元测试。
* 支持 tables、grid、panel 和 [rich](https://github.com/willmcgugan/rich) 所支持的标记语言。
* 支持大部分的 SRG 参数,包括粗体、暗淡字、斜体、下划线、删除线和闪烁文本。
* 支持终端显示 3/4/8/24 位色。自动检测终端类型,自适应颜色范围。
![例子](docs/input/assets/images/example.png)
## 安装
最快的安装方式就是用NuGet包管理直接安装`Spectre.Console`
```csharp
dotnet add package Spectre.Console
```
## 文档
`Spectre.Console`的文档可以在这里查看
https://spectreconsole.net/
## 例子
To see `Spectre.Console` in action, please see the
[examples repository](https://github.com/spectreconsole/examples).
## Sponsors
下面这些用户正在[sponsor](https://github.com/sponsors/patriksvensson)上支持着Spectre.Console确保这个项目的持续维护。
* [Rodney Littles II](https://github.com/RLittlesII)
* [Martin Björkström](https://github.com/bjorkstromm)
* [Dave Glick](https://github.com/daveaglick)
* [Kim Gunanrsson](https://github.com/kimgunnarsson)
* [Andrew McClenaghan](https://github.com/andymac4182)
* [C. Augusto Proiete](https://github.com/augustoproiete)
* [Viktor Elofsson](https://github.com/vktr)
* [Steven Knox](https://github.com/stevenknox)
* [David Pendray](https://github.com/dpen2000)
* [Elmah.io](https://github.com/elmahio)
我对此表示十分感激
**非常感谢各位!**
## 开源许可
版权所有 © Patrik Svensson, Phil Scott, Nils Andresen, Cédric Luthi, Frank Ray
Spectre.Console 基于 MIT 协议提供。查看 LICENSE 文件了解更多信息。
* SixLabors.ImageSharp 的协议请查看 https://github.com/SixLabors/ImageSharp/blob/master/LICENSE

View File

@ -4,13 +4,33 @@ var configuration = Argument("configuration", "Release");
////////////////////////////////////////////////////////////////
// Tasks
Task("Clean")
.Does(context =>
{
context.CleanDirectory("./.artifacts");
});
Task("Build")
.IsDependentOn("Clean")
.Does(context =>
{
DotNetCoreBuild("./src/Spectre.Console.sln", new DotNetCoreBuildSettings {
Information("Compiling generator...");
DotNetBuild("./resources/scripts/Generator/Generator.sln", new DotNetBuildSettings {
Configuration = configuration,
Verbosity = DotNetVerbosity.Minimal,
NoLogo = true,
NoIncremental = context.HasArgument("rebuild"),
MSBuildSettings = new DotNetCoreMSBuildSettings()
MSBuildSettings = new DotNetMSBuildSettings()
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
});
Information("\nCompiling Spectre.Console...");
DotNetBuild("./src/Spectre.Console.sln", new DotNetBuildSettings {
Configuration = configuration,
Verbosity = DotNetVerbosity.Minimal,
NoLogo = true,
NoIncremental = context.HasArgument("rebuild"),
MSBuildSettings = new DotNetMSBuildSettings()
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
});
});
@ -19,64 +39,41 @@ Task("Test")
.IsDependentOn("Build")
.Does(context =>
{
DotNetCoreTest("./src/Spectre.Console.Tests/Spectre.Console.Tests.csproj", new DotNetCoreTestSettings {
DotNetTest("./src/Tests/Spectre.Console.Tests/Spectre.Console.Tests.csproj", new DotNetTestSettings {
Configuration = configuration,
Verbosity = DotNetVerbosity.Minimal,
NoLogo = true,
NoRestore = true,
NoBuild = true,
});
DotNetTest("./src/Tests/Spectre.Console.Cli.Tests/Spectre.Console.Cli.Tests.csproj", new DotNetTestSettings {
Configuration = configuration,
Verbosity = DotNetVerbosity.Minimal,
NoLogo = true,
NoRestore = true,
NoBuild = true,
});
});
Task("Package")
.IsDependentOn("Test")
//.IsDependentOn("Test")
.Does(context =>
{
context.CleanDirectory("./.artifacts");
context.DotNetCorePack($"./src/Spectre.Console.sln", new DotNetCorePackSettings {
context.DotNetPack($"./src/Spectre.Console.sln", new DotNetPackSettings {
Configuration = configuration,
NoRestore = true,
NoBuild = true,
Verbosity = DotNetVerbosity.Minimal,
NoLogo = true,
NoRestore = false,
NoBuild = false,
OutputDirectory = "./.artifacts",
MSBuildSettings = new DotNetCoreMSBuildSettings()
MSBuildSettings = new DotNetMSBuildSettings()
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
.WithProperty("SymbolPackageFormat", "snupkg")
});
});
Task("Publish-GitHub")
.WithCriteria(ctx => BuildSystem.IsRunningOnGitHubActions, "Not running on GitHub Actions")
.IsDependentOn("Package")
.Does(context =>
{
var apiKey = Argument<string>("github-key", null);
if(string.IsNullOrWhiteSpace(apiKey)) {
throw new CakeException("No GitHub API key was provided.");
}
// Publish to GitHub Packages
var exitCode = 0;
foreach(var file in context.GetFiles("./.artifacts/*.nupkg"))
{
context.Information("Publishing {0}...", file.GetFilename().FullPath);
exitCode += StartProcess("dotnet",
new ProcessSettings {
Arguments = new ProcessArgumentBuilder()
.Append("gpr")
.Append("push")
.AppendQuoted(file.FullPath)
.AppendSwitchSecret("-k", " ", apiKey)
}
);
}
if(exitCode != 0)
{
throw new CakeException("Could not push GitHub packages.");
}
});
Task("Publish-NuGet")
.WithCriteria(ctx => BuildSystem.IsRunningOnGitHubActions, "Not running on GitHub Actions")
//.WithCriteria(ctx => BuildSystem.IsRunningOnGitHubActions, "Not running on GitHub Actions")
.IsDependentOn("Package")
.Does(context =>
{
@ -89,10 +86,11 @@ Task("Publish-NuGet")
foreach(var file in context.GetFiles("./.artifacts/*.nupkg"))
{
context.Information("Publishing {0}...", file.GetFilename().FullPath);
DotNetCoreNuGetPush(file.FullPath, new DotNetCoreNuGetPushSettings
DotNetNuGetPush(file.FullPath, new DotNetNuGetPushSettings
{
Source = "https://api.nuget.org/v3/index.json",
ApiKey = apiKey,
SkipDuplicate = true
});
}
});
@ -101,7 +99,6 @@ Task("Publish-NuGet")
// Targets
Task("Publish")
.IsDependentOn("Publish-GitHub")
.IsDependentOn("Publish-NuGet");
Task("Default")

40
docs/.gitignore vendored Normal file
View File

@ -0,0 +1,40 @@
[Bb]in/
[Bb]uild/
[Oo]bj/
[Dd]ebug/
[Rr]elease/
[Pp]ackages/
[Tt]ools/
![Tt]ools/packages.config
[Oo]utput/
[Cc]ache/
![Ii]nput/
nuget.exe
*.com
*.class
*.exe
*.o
*.so
*.user
Thumbs.db
_ReSharper*
*ReSharper.user
*dotCover
.JustCode
*.suo
.svn
ipch
*.ilk
*.sdf
*.opensdf
*.pdb
/*.~vsd
*UpgradeWizard*
.vs/*
TestResult.xml
/debug.log
/packages.xml
*.ncrunch*
.*crunch*.local.xml
/_NCrunch_Statiq.Framework
*.pfx

61
docs/Docs.csproj Normal file
View File

@ -0,0 +1,61 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
<DefaultItemExcludes>$(DefaultItemExcludes);output\**;.gitignore</DefaultItemExcludes>
<NoWarn>MVC1000</NoWarn>
<MinVerSkip>true</MinVerSkip>
<!--
Disable NuGetAudit for now, there is an in progress PR with Statiq regarding these packages,
but since since this is just a generator we are safe to ignore this for now.
-->
<NuGetAudit>false</NuGetAudit>
</PropertyGroup>
<ItemGroup>
<Compile Remove="input\**" />
<Compile Remove="sass\**" />
<Compile Include="input\api\Sections\_ConstantValue.cshtml.cs" />
</ItemGroup>
<ItemGroup>
<None Include="input\**">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
<None Include="sass\**">
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
</None>
</ItemGroup>
<ItemGroup>
<None Remove="src\Data\emojis.json" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="src\Data\emojis.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Playwright" Version="1.49.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Statiq.CodeAnalysis" Version="1.0.0-beta.72" />
<PackageReference Include="Statiq.Common" Version="1.0.0-beta.72" />
<PackageReference Include="Statiq.Web" Version="1.0.0-beta.60" />
<PackageReference Include="MinVer" PrivateAssets="All" Version="6.0.0" />
<PackageReference Include="Statiq.Web.Netlify" Version="1.0.0-beta.60" />
</ItemGroup>
<ItemGroup>
<Folder Include="input\assets\images\emojis\" />
</ItemGroup>
<Target Name="Versioning" BeforeTargets="MinVer">
<PropertyGroup Label="Build">
<MinVerDefaultPreReleasePhase>preview</MinVerDefaultPreReleasePhase>
<MinVerVerbosity>normal</MinVerVerbosity>
</PropertyGroup>
</Target>
</Project>

25
docs/Docs.sln Normal file
View File

@ -0,0 +1,25 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30011.22
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Docs", "Docs.csproj", "{C337F609-A890-4E52-BDA3-91658039B0E3}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{C337F609-A890-4E52-BDA3-91658039B0E3}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C337F609-A890-4E52-BDA3-91658039B0E3}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C337F609-A890-4E52-BDA3-91658039B0E3}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C337F609-A890-4E52-BDA3-91658039B0E3}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2FB3922B-494A-45EB-A479-FC507B8E107C}
EndGlobalSection
EndGlobal

1
docs/Preview.ps1 Executable file
View File

@ -0,0 +1 @@
dotnet run -- preview

77
docs/Program.cs Normal file
View File

@ -0,0 +1,77 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using Docs.Extensions;
using Docs.Shortcodes;
using Docs.Utilities;
using Microsoft.Extensions.DependencyInjection;
using Statiq.App;
using Statiq.Common;
using Statiq.Core;
using Statiq.Web;
namespace Docs
{
public static class Program
{
public static async Task<int> Main(string[] args) =>
await Bootstrapper.Factory
.CreateWeb(args)
.AddSetting(Keys.Host, "spectreconsole.net")
.AddSetting(Keys.LinksUseHttps, true)
.AddSetting(Constants.EditLink, ConfigureEditLink())
.AddSetting(Constants.SourceFiles, new List<string>
{
"../../src/Spectre.Console/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
"../../src/Spectre.Console.Cli/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
"../../src/Extensions/Spectre.Console.ImageSharp/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
"../../src/Extensions/Spectre.Console.Json/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs"
})
.AddSetting(Constants.ExampleSourceFiles, new List<string>
{
"../../examples/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
}
)
.ConfigureServices(i =>
{
i.AddSingleton(new TypeNameLinks());
})
.ConfigureSite("spectreconsole", "spectre.console", "main")
.AddShortcode("Children", typeof(ChildrenShortcode))
.AddShortcode("ColorTable", typeof(ColorTableShortcode))
.AddShortcode("EmojiTable", typeof(EmojiTableShortcode))
.AddShortcode("Alert", typeof(AlertShortcode))
.AddShortcode("Info", typeof(InfoShortcode))
.AddShortcode("AsciiCast", typeof(AsciiCastShortcode))
.AddShortcode("Example", typeof(ExampleSnippet))
.AddPipelines()
.BuildPipeline(
"Bootstrap",
builder => builder
.WithInputReadFiles("../node_modules/asciinema-player/dist/bundle/asciinema-player.js")
.WithProcessModules(new SetDestination(Config.FromDocument(doc => new NormalizedPath($"./assets/{doc.Source.FileName}")), true))
.WithOutputWriteFiles()
)
.AddProcess(ProcessTiming.Initialization, _ => new ProcessLauncher("npm", "install --audit false --fund false --progress false")
{
LogErrors = false
})
.AddProcess(ProcessTiming.Initialization, _ => new ProcessLauncher("dotnet", "playwright install chromium"))
.AddProcess(ProcessTiming.BeforeDeployment, _ => new ProcessLauncher("npm", "run build:tailwind")
{
LogErrors = false
})
.RunAsync();
private static Config<string> ConfigureEditLink()
{
return Config.FromDocument((doc, ctx) =>
{
return string.Format("https://github.com/{0}/{1}/edit/{2}/docs/input/{3}",
ctx.GetString(Constants.Site.Owner),
ctx.GetString(Constants.Site.Repository),
ctx.GetString(Constants.Site.Branch),
doc.Source.GetRelativeInputPath());
});
}
}
}

46
docs/README.md Normal file
View File

@ -0,0 +1,46 @@
# Documentation
To start contributing to the [Spectre.Console](https://github.com/spectreconsole/spectre.console) documentation, you will need the [.NET Core SDK](https://dot.net) 7.0.100 or higher (as defined in the repository root `global.json` file).
## Running Preview Site
The documentation site uses [Statiq](https://statiq.dev), a static site generator. To build the documentation site run the following in a command-line terminal.
```
> Preview.ps1
```
After the build is complete, you can navigate to [http://localhost:5080](http://localhost:5080).
## Npm
The site uses some tools from the JavaScript ecosystem including npm. While Statiq will execute `npm install` and other commands as needed, you need to have [npm installed](https://www.npmjs.com/get-npm) before running a site build.
## Editing Content
The documentation is written using [Markdown](https://www.markdownguide.org/basic-syntax/).
Markdown files can be found under the following directories:
- [/input](./input)
- [/appendix](./input/appendix)
## Editing Layout
Layout and styling can also be found in the [input](./input) directory. Look for Sass, Css, and Images under the [assets](./input/assets) directory.
## Custom Build Features
The documentation site has custom enhancements to Statiq located under the [./src](./src) directory.
## License
MIT License
Copyright (c) 2020 Patrik Svensson, Phil Scott, Nils Andresen
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

12
docs/dotnet-tools.json Normal file
View File

@ -0,0 +1,12 @@
{
"version": 1,
"isRoot": true,
"tools": {
"microsoft.playwright.cli": {
"version": "1.2.3",
"commands": [
"playwright"
]
}
}
}

6
docs/global.json Normal file
View File

@ -0,0 +1,6 @@
{
"sdk": {
"version": "9.0.100",
"rollForward": "latestFeature"
}
}

1
docs/input/CNAME Normal file
View File

@ -0,0 +1 @@
spectreconsole.net

View File

@ -0,0 +1,72 @@
Title: Short title of the Widget being documented. Typically the class name
Order: 99999
Description: Description of the widget. This will be displayed on social card
Highlights:
- List features.
- These will be used for the social card.
- Keep to three items.
Reference:
- T:Spectre.Console.BarChart
Hidden: true
---
<!---
Documentation steps
1. Edit front matter. Change all fields. Order dictates how it is sorted in the sidebar. Remove hidden attributes.
Make sure to reference the appropriate XMLDOC page. You can find this by looking in the generated HTML
of the API reference section. You can reference multiple items e.g. types, methods, etc that are related to the Widget.
2. Remove comments as you edit the fields.
3. All widgets should have at minimum description and a usage section.
-->
<!---
Short description of the widget. Can be the same as the description above
-->
<!---
Optional: Embed an asciicast. The cast parameter should be the base name of the cast. There are two files,
one suffixed with -rich.cast and a second named -plain.cast. The cast attribute should be the name without
the suffix.
To generate a new cast file, open the \resources\scripts\Generator\Generator.sln project and add a new sample in the
Commands/AsciiCast/Samples/ folder. If the widget is static such as a tree or a table, try and animate the widget
using the Live widget to change the content or styling.
Running the generator project with by executing
dotnet run -- samples -l
and pick your sample. This will generate a new asciicast in the docs/input/assets/casts folder which can then be referenced via:
<?# AsciiCast cast="sample-name" /?>
-->
## Usage
### Basic usage
<!---
Code sample for a default output of the widget. Code Samples can be embedded with a markdown code block or
linked to via the Example snipped. The example snippet takes the XMLDOC reference of the snippet from the Examples
project that you want to reference.
If linking to a method it will, by default, only include the method body. Include BodyOnly="false" to include
the entire method including the declaration.
<?# Example symbol="M:Prompt.Program.AskConfirmation" /?>
-->
### Additional Styling
<!---
Include additional examples of styling or functionality
-->
### More styling and functions
<!---
Include additional examples of styling or functionality
-->

View File

@ -0,0 +1,8 @@
@using Statiq.Common
@using Statiq.Razor
@using Statiq.Web
@using Statiq.Web.Pipelines
@using Docs
@using Docs.Utilities;
@inherits StatiqRazorPage<IDocument>

View File

@ -0,0 +1,3 @@
@{
Layout = @"_layout.cshtml";
}

308
docs/input/_layout.cshtml Normal file
View File

@ -0,0 +1,308 @@
@using Docs.Extensions
@using Statiq.CodeAnalysis
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="@Context.GetLink("/assets/styles.css")" rel="stylesheet"/>
<link rel="preconnect" href="https://fonts.gstatic.com"/>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap" rel="stylesheet"/>
<link rel="apple-touch-icon" sizes="180x180" href="@Context.GetLink("/assets/favicons/apple-touch-icon.png")">
<link rel="icon" type="image/png" sizes="32x32" href="@Context.GetLink("/assets/favicons/favicon-32x32.png")">
<link rel="icon" type="image/png" sizes="16x16" href="@Context.GetLink("/assets/favicons/favicon-16x16.png")">
@{
string title = Document.ContainsKey(Keys.Title) ? $"Spectre.Console - {Document.GetString(Keys.Title)}" : "Spectre.Console";
string description = Document.ContainsKey(Constants.Description) ? Document.GetString(Constants.Description) : "Spectre.Console is a .NET library that makes it easier to create beautiful console applications";
var card = Context.FindCard(Model.Id);
var urlBase = $"https://{Document.GetString(Keys.Host)}/";
}
<title>@title</title>
<meta name="description" content="@description"/>
<meta name="xref" content="@HtmlEncoder.Encode(Document.GetString(WebKeys.Xref))" />
@if (card != null)
{
<meta name="twitter:card" content="summary_large_image"/>
<meta name="og:title" content="@title"/>
<meta name="og:description" content="@description"/>
<meta name="og:image" content="@(urlBase + card)"/>
}
<script>
if (localStorage.theme === 'dark' || (!('theme' in localStorage) && window.matchMedia('(prefers-color-scheme: dark)').matches)) {
document.documentElement.classList.add('dark');
} else {
document.documentElement.classList.remove('dark');
}
</script>
</head>
<body class="antialiased text-slate-800 dark:text-slate-200 bg-slate-100 dark:bg-slate-800 transition-colors min-h-full flex flex-col">
<header class="flex-none sticky top-0 z-40 text-sm font-medium bg-slate-200 backdrop-blur dark:bg-slate-800 ring-1 ring-slate-900 dark:ring-slate-700 ring-opacity-5 shadow-lg py-2 md:py-4">
<nav class="flex flex-row container mx-auto items-center">
<a class="flex flex-row items-center" href="@Context.GetLink("/")">
<svg xmlns="http://www.w3.org/2000/svg"
id="logo" class="w-auto h-10 md:h-12 fill-slate-700 dark:fill-slate-400 dark:stroke-slate-900" height="48" width="48" viewBox="0 0 1270.000000 1270.000000"
preserveAspectRatio="xMidYMid meet">
<metadata>
Created by potrace 1.16, written by Peter Selinger 2001-2019
</metadata>
<g transform="translate(0.000000,1270.000000) scale(0.100000,-0.100000)">
<path d="M799 10610 c-199 -48 -354 -191 -414 -383 l-25 -78 0 -3084 0 -3084
25 -79 c45 -141 155 -270 289 -335 124 -61 -80 -57 2819 -57 l2646 0 5 -43 c3
-23 8 -71 11 -105 13 -137 88 -334 179 -471 57 -85 187 -219 247 -254 25 -15
76 -34 112 -43 87 -22 163 -7 246 46 120 78 195 211 234 411 l23 124 14 -55
c63 -263 172 -511 326 -741 94 -142 229 -291 313 -348 272 -185 583 -197 750
-30 66 67 84 109 89 215 4 90 4 91 -51 230 -108 276 -137 477 -122 868 l7 196
77 0 c55 0 118 -11 229 -39 l154 -38 50 -84 c103 -172 221 -427 277 -599 38
-120 70 -274 86 -412 8 -75 21 -155 29 -178 37 -106 117 -199 220 -253 51 -26
202 -35 283 -17 83 18 193 97 268 192 157 199 256 485 286 825 11 122 6 524
-7 583 -5 24 -1 26 62 43 64 16 67 16 80 0 39 -50 109 -215 149 -351 25 -85
55 -174 67 -199 73 -156 261 -206 441 -117 65 32 110 70 159 135 128 169 178
414 157 764 -8 143 -38 350 -55 376 -2 4 7 25 22 46 77 112 168 344 200 504
l16 86 87 28 c188 60 391 170 498 269 132 122 183 230 183 383 0 71 -5 98 -24
138 -24 52 -82 112 -138 141 -52 28 -205 30 -378 5 -80 -11 -179 -23 -220 -27
l-75 -6 -29 56 c-33 65 -137 182 -211 236 -75 55 -156 94 -382 181 -110 43
-221 87 -245 100 -54 27 -92 69 -125 138 -25 52 -26 59 -20 180 4 69 16 200
26 291 52 430 53 809 5 1170 -54 405 -249 740 -569 979 -136 102 -297 190
-419 231 l-36 12 0 433 c0 433 0 434 -25 512 -52 167 -171 292 -341 360 l-69
28 -4215 2 c-2318 0 -4231 -3 -4251 -7z m8363 -1476 c417 -53 735 -193 962
-423 98 -98 155 -175 210 -282 84 -160 117 -292 141 -559 28 -313 17 -684 -30
-1025 -9 -60 -18 -164 -22 -230 -10 -208 22 -314 136 -452 76 -91 124 -118
391 -218 307 -116 377 -155 450 -249 23 -31 41 -58 39 -60 -2 -2 -47 8 -99 21
-131 35 -268 36 -360 3 -132 -47 -248 -116 -364 -218 -163 -143 -516 -488
-703 -687 -350 -372 -504 -514 -701 -644 -348 -231 -878 -408 -1322 -442 -409
-31 -796 45 -1059 208 -111 69 -249 210 -292 298 -32 65 -34 76 -33 165 1 104
23 178 85 287 75 131 137 194 430 441 181 152 251 295 250 511 -1 152 -16 223
-117 560 -35 117 -61 217 -58 222 3 5 20 9 38 9 55 0 217 31 261 50 53 23 103
73 132 131 43 88 56 187 59 437 2 266 -1 258 91 292 108 40 254 21 330 -45 35
-30 35 -32 53 -170 41 -311 106 -484 206 -546 48 -29 168 -48 381 -59 188 -10
432 -1 548 20 76 14 206 56 266 86 64 32 122 101 144 170 15 49 17 82 12 253
-5 198 -27 398 -52 482 -42 146 -125 221 -290 265 -57 15 -108 19 -268 19
l-197 0 0 45 c0 120 -37 255 -82 300 -76 77 -210 5 -291 -157 -31 -60 -67
-184 -67 -229 0 -27 -6 -34 -41 -50 -65 -29 -159 -98 -195 -144 -34 -43 -67
-119 -79 -181 l-6 -35 -57 28 c-114 57 -270 58 -379 2 -61 -31 -70 -21 -49 54
33 118 16 442 -29 536 -38 79 -114 84 -188 12 -68 -66 -136 -230 -137 -330 l0
-29 -61 7 c-34 3 -93 6 -131 6 l-69 0 6 48 c14 97 56 282 84 368 155 475 486
821 963 1008 108 42 308 94 430 110 62 9 124 17 138 20 76 11 479 5 592 -10z
m-7029 -78 c18 -8 261 -243 569 -552 582 -584 560 -559 543 -651 -6 -33 -69
-101 -523 -557 -553 -554 -564 -564 -644 -551 -89 15 -151 110 -128 198 10 37
65 95 463 495 l452 452 -472 473 c-414 414 -472 477 -478 510 -25 132 98 235
218 183z m7169 -1405 c164 -57 201 -136 234 -502 37 -414 9 -486 -212 -558
-155 -50 -298 -64 -579 -57 -249 6 -398 23 -439 50 -95 62 -177 346 -180 621
-1 135 0 142 28 203 50 109 148 179 304 218 149 37 329 53 567 50 191 -2 216
-4 277 -25z m-2002 -174 c95 -34 118 -52 152 -114 52 -94 63 -159 62 -368 -1
-358 -44 -479 -187 -520 -146 -42 -612 -65 -727 -36 -153 38 -196 98 -226 316
-16 120 -31 487 -21 527 9 35 89 121 140 151 99 58 228 76 522 73 200 -2 214
-3 285 -29z m-1604 -443 c45 -33 67 -70 71 -121 5 -59 -25 -117 -77 -147 -35
-21 -47 -21 -980 -24 -520 -2 -964 0 -988 3 -57 8 -116 60 -130 115 -19 75 12
146 78 182 34 17 75 18 1017 16 974 -3 982 -3 1009 -24z m5329 -2140 c66 -7
173 -14 237 -14 103 0 146 5 247 26 24 5 24 5 18 -64 -15 -159 -89 -371 -180
-515 l-43 -68 -57 113 c-72 145 -160 261 -318 422 l-126 128 51 -7 c28 -3 105
-13 171 -21z m-812 -652 c53 -41 140 -115 193 -165 96 -91 224 -231 224 -245
0 -5 -30 -18 -67 -30 -79 -25 -305 -84 -308 -80 -1 2 -12 53 -24 113 -28 135
-70 268 -127 402 -24 57 -44 106 -44 109 0 9 43 -20 153 -104z m-1173 -560
c-9 -4 -271 61 -315 78 -29 11 -28 12 79 55 59 24 111 46 114 49 3 3 33 -36
67 -87 34 -50 59 -93 55 -95z"/>
</g>
</svg>
<span class="text-lg md:text-2xl font-light ml-2 lg:ml-4 font-mono tracking-tighter">Spectre.Console</span>
</a>
<div class="ml-auto">
<ul class="flex flex-row">
<li>
<button aria-label="Toggle Dark Mode" class="mr-4 dark:text-yellow-300 stroke-1 opacity-80" onclick="swapTheme()">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9.663 17h4.673M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"/>
</svg>
</button>
</li>
<li>
<a class="flex flex-row items-center text-rose-700 dark:text-rose-500" href="https://github.com/sponsors/patriksvensson">
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6 mr-1" fill="none" viewBox="0 0 24 24" stroke="currentColor">
<title>Sponsor</title>
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4.318 6.318a4.5 4.5 0 000 6.364L12 20.364l7.682-7.682a4.5 4.5 0 00-6.364-6.364L12 7.636l-1.318-1.318a4.5 4.5 0 00-6.364 0z"/>
</svg>
<span class="hidden sm:block">Sponsor</span>
</a>
</li>
<li class="ml-4">
<a class="flex flex-row items-center text-gray-600 fill-slate-200 stroke-slate-800 fill-slate-900 dark:stroke-slate-500 dark:fill-slate-300 dark:text-slate-300" href="https://github.com/spectreconsole/spectre.console">
<svg role="img" class="h-6 w-6 mr-1" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<title>GitHub icon</title>
<path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12"/>
</svg>
<span class="hidden sm:block">GitHub</span>
</a>
</li>
</ul>
</div>
</nav>
</header>
<main class="container mx-auto pt-8 w-full">
<div class="flex flex-col-reverse lg:flex-row">
<nav class="flex-none font-light text-sm xl:text-base sm:mr-16 mt-8 pt-6 lg:mt-0 lg:pt-0 lg:pb-10 border-t border-gray-300 lg:border-t-0">
@{
var sidebar = Context.GetSidebar();
var root = sidebar.Node;
<div class="text-xl @(Document.IdEquals(root) ? "font-bold" : null)">
@if (sidebar.ShowLink)
{
@Html.DocumentLink(root)
}
else
{
@sidebar.Title;
}
</div>
@foreach (var sidebarItem in sidebar.Leafs)
{
var document = sidebarItem.Node;
if (string.IsNullOrWhiteSpace(sidebarItem.Title))
{
continue;
}
var documentChildren = sidebarItem.Leafs;
<div class="text-teal-800 font-medium dark:text-teal-400 mt-4">
@if (sidebarItem.ShowLink)
{
@Html.DocumentLink(document)
}
else
{
@sidebarItem.Title;
}
</div>
@if (documentChildren.Any())
{
<div class="ml-2 flex flex-row flex-wrap lg:flex-col border-separate">
@foreach (var childItem in documentChildren)
{
var child = childItem.Node;
<div class="mt-2 mr-4 @(Document.IdEquals(child) ? "font-bold" : null)">
@Html.DocumentLink(child)
</div>
}
</div>
}
}
}
</nav>
<article class="flex-1 min-w-0">
<header class="text-slate-900 dark:text-slate-50 mb-4">
@RenderSection("header", required: false)
@if (!IsSectionDefined("header"))
{
<h1 class="text-2xl md:text-4xl font-extrabold">@(Document.GetString(Keys.Title) ?? Document.GetTitle())</h1>
}
@RenderSection("subheading", required: false)
</header>
<div class="prose prose-sm md:prose-base prose-slate dark:prose-invert max-w-full font-light lg:leading-loose">
@RenderBody()
@{
var referenceLinks = Model.GetList<string>(Constants.ApiReference);
if (referenceLinks != null)
{
<h3>References</h3>
<ul>
@foreach (var link in referenceLinks)
{
if (Context.TryGetXrefDocument(link, out var refDoc, out string error))
{
<li>
@{
var kind = refDoc.GetString(CodeAnalysisKeys.SpecificKind);
var prefix = string.Empty;
var containingType = @refDoc.GetDocument(CodeAnalysisKeys.ContainingType);
if (containingType != null)
{
prefix = containingType.GetString(CodeAnalysisKeys.DisplayName) + ".";
}
}
@if (!string.IsNullOrWhiteSpace(prefix)){ <span class="text-slate-600 dark:text-slate-400">@prefix</span>}@Html.DocumentLink(refDoc, refDoc.GetString(CodeAnalysisKeys.DisplayName) ?? refDoc.GetTitle()) <span class="ml-4 uppercase text-xs text-slate-700 dark:text-slate-400">@kind</span>
</li>
}
else
{
Context.LogWarning(Model, $"Error finding xref for {link} - {error}");
}
}
</ul>
}
}
</div>
</article>
</div>
</main>
<footer class="py-4 md:py-8 mt-8 bg-gray-100 dark:bg-slate-800 text-sm border-t border-gray-200 dark:border-slate-700">
<div class="container">
<div class="flex flex-row">
<span>© @DateTime.Today.Year Patrik Svensson, Phil Scott, Nils Andresen</span>
<span class="ml-auto">Powered by <a href="https://www.netlify.com/">Netlify</a></span>
<span class="ml-auto">Supported by the <a href="https://dotnetfoundation.org">.NET Foundation</a></span>
<span class="ml-auto">@VersionUtilities.GetVersion()</span>
</div>
</div>
</footer>
<script>
// adapted from https://www.w3schools.com/howto/howto_js_filter_table.asp
function search(input, searchTarget, columnIndex) {
// Declare variables
var filter, table, tr, td, i, txtValue;
filter = input.value.toUpperCase();
table = document.getElementById(searchTarget);
tr = table.getElementsByTagName("tr");
// Loop through all table rows, and hide those who don't match the search query
for (i = 0; i < tr.length; i++) {
td = tr[i].getElementsByTagName("td")[columnIndex];
if (td) {
txtValue = td.textContent || td.innerText;
if (txtValue.toUpperCase().indexOf(filter) > -1) {
tr[i].style.display = "";
} else {
tr[i].style.display = "none";
}
}
}
}
</script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/prism.min.js" integrity="sha512-YBk7HhgDZvBxmtOfUdvX0z8IH2d10Hp3aEygaMNhtF8fSOvBZ16D/1bXZTJV6ndk/L/DlXxYStP8jrF77v2MIg==" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/prism/1.23.0/plugins/autoloader/prism-autoloader.min.js" integrity="sha512-zc7WDnCM3aom2EziyDIRAtQg1mVXLdILE09Bo+aE1xk0AM2c2cVLfSW9NrxE5tKTX44WBY0Z2HClZ05ur9vB6A==" crossorigin="anonymous"></script>
<script src="@Context.GetLink("/assets/asciinema-player.js")"></script>
<script>
document.querySelectorAll('asciinema-player').forEach(cast => {
AsciinemaPlayer.create(cast.attributes['src'].value, cast, {autoplay: true, fit: 'none', fontSize: 'inherit'});
});
</script>
<script>
function swapTheme(){
if (document.documentElement.classList.contains('dark')) {
document.documentElement.classList.remove('dark');
localStorage.theme = 'light';
} else {
document.documentElement.classList.add('dark');
localStorage.theme = 'dark';
}
}
</script>
</body>
</html>

View File

@ -0,0 +1,38 @@
---
Title: SpectreXxxx
Description: Rule title
Category: Usage
Severity: Hidden, Info, Warning, or Error
Excluded: true
---
## Cause
A concise-as-possible description of when this rule is violated. If there's a lot to explain, begin with "A violation of this rule occurs when..."
## Reason for rule
Explain why the user should care about the violation.
## How to fix violations
To fix a violation of this rule, [describe how to fix a violation].
## Examples
### Violates
Example(s) of code that violates the rule.
### Does not violate
Example(s) of code that does not violate the rule.
## How to suppress violations
**If the severity of your analyzer isn't _Warning_, delete this section.**
```csharp
#pragma warning disable Spectre1000 // <Rule name>
#pragma warning restore Spectre1000 // <Rule name>
```

View File

@ -0,0 +1,56 @@
---
Title: Spectre1021
Description: Avoid prompting for input while a current renderable is running.
Category: Usage
Severity: Warning
---
## Cause
A violation of this rule occurs when an AnsiConsole prompt is called within the context of an executing renderable e.g. `Progress`, `Status` and `Live`. Concurrent LiveRenderable are not supported and will cause issues when running simultaneously.
## Reason for rule
When LiveRenderable such as `Progress`, `Status` or `Live` are running they expect to be running exclusively. They rely on ANSI sequences to draw and keep the console experience consistent. Prompts also rely on ANSI sequences for their drawing. Simultaneous running can result in corrupt output.
## How to fix violations
Redesign logic to allow one LiveRenderable to complete before using a prompt or prompt before starting the operation.
## Examples
### Violates
```csharp
AnsiConsole.Progress().Start(ctx =>
{
// code to update progress bar
var answer = AnsiConsole.Confirm("Continue?");
});
```
### Does not violate
```csharp
AnsiConsole.Progress().Start(ctx =>
{
// code to update progress bar
// persist state to restart progress after asking question
});
var answer = AnsiConsole.Confirm("Continue?");
AnsiConsole.Progress().Start(ctx =>
{
// apply persisted state
// code to update progress bar
```
## How to suppress violations
```csharp
#pragma warning disable Spectre1021 // <Rule name>
#pragma warning restore Spectre1021 // <Rule name>
```

View File

@ -0,0 +1,3 @@
@{
Layout = @"_layout.cshtml";
}

View File

@ -0,0 +1,10 @@
@inherits StatiqRazorPage<IDocument>
@{
Layout = @"../../_layout.cshtml";
}
<p>@Document.GetString("Description")</p>
@RenderBody()

View File

@ -0,0 +1,31 @@
Title: Roslyn Analyzers
Order: 20
---
<code>Spectre.Console.Analyzer</code> provides analyzers for common mistakes when using Spectre.Console. It can be installed via nuget
<pre><code>nuget install Spectre.Console.Analyzer</code></pre>
<h2>Supported Analyzers</h2>
<table>
<thead>
<tr>
<th>Analyzer</th>
<th>Description</th>
<th>Category</th>
<th>Severity</th>
</tr>
</thead>
<tbody>
@foreach (IDocument child in OutputPages.GetChildrenOf(Document))
{
<tr>
<td>@Html.DocumentLink(child)</td>
<td>@child.GetString("Description")</td>
<td>@child.GetString("Category") </td>
<td>@child.GetString("Severity") </td>
</tr>
}
</tbody>
</table>

View File

@ -0,0 +1,27 @@
---
Title: Spectre1000
Description: Use AnsiConsole instead of System.Console
Category: Usage
Severity: Warning
---
## Cause
A violation of this rule occurs when `System.Console` is used for common methods exposed by Spectre.Console.
## Reason for rule
Methods implemented in Spectre.Console should be used over direct access to `System.Console` to allow for enhancements and
features to be enabled.
## How to fix violations
To fix a violation of this rule, change from `System.Console` to `Spectre.Console.AnsiConsole`.
## How to suppress violations
```csharp
#pragma warning disable Spectre1000 // Use AnsiConsole instead of System.Console
#pragma warning restore Spectre1000 // Use AnsiConsole instead of System.Console
```

View File

@ -0,0 +1,63 @@
---
Title: Spectre1010
Description: Favor the use of the instance of AnsiConsole over the static helper
Category: Usage
Severity: Info
---
## Cause
A violation of this rule occurs when the static helper `AnsiConsole` is used when a field or method parameter of type
`IAnsiConsole` is available.
## Reason for rule
Use of `IAnsiConsole` improves testability of the code, and also allows upstream callers the ability to customize the console
capabilities and features. When a field variable or parameter is available it should be used to ensure the code takes advantage
of that configuration.
## How to fix violations
To fix a violation of this rule, change from `AnsiConsole` to the name of the local instance.
## Examples
### Violates
```csharp
class Example
{
private IAnsiConsole _ansiConsole;
public Example(IAnsiConsole ansiConsole)
{
_ansiConsole = ansiConsole;
}
public Run()
{
AnsiConsole.WriteLine("Running...");
}
}
```
### Does not violate
```csharp
class Example
{
private IAnsiConsole _ansiConsole;
public Example(IAnsiConsole ansiConsole)
{
_ansiConsole = ansiConsole;
}
public Run()
{
_ansiConsole.WriteLine("Running...");
}
}
```

View File

@ -0,0 +1,46 @@
---
Title: Spectre1020
Description: Avoid calling other live renderables while a current renderable is running.
Category: Usage
Severity: Warning
---
## Cause
A violation of this rule occurs when a child LiveRenderable i.e. `Progress`, `Status` and `Live` are called within the context of an executing renderable. Concurrent LiveRenderable are not supported and will cause issues when running simultaneously.
## Reason for rule
When LiveRenderable such as `Progress`, `Status` or `Live` are running they expect to be running exclusively. They rely on ANSI sequences to draw and keep the console experience consistent. With simultaneous calls both renderables compete with the console causing concurrent writes corrupting the output.
## How to fix violations
Redesign logic to allow one LiveRenderable to complete before starting a second renderable.
## Examples
### Violates
```csharp
AnsiConsole.Progress().Start(ctx => {
AnsiConsole.Status().Start("Running status too...", statusCtx => {});
});
```
### Does not violate
```csharp
AnsiConsole.Progress().Start(ctx => {
// run progress and complete tasks
});
AnsiConsole.Status().Start("Running status afterwards...", statusCtx => {});
```
## How to suppress violations
```csharp
#pragma warning disable Spectre1020 // <Rule name>
#pragma warning restore Spectre1020 // <Rule name>
```

View File

@ -0,0 +1,19 @@
@using Statiq.CodeAnalysis
@using Docs.Pipelines
@using Docs.Extensions
@foreach (IGrouping<string, IDocument> typeGroup
in Outputs.FromPipeline(nameof(Api))
.Where(x => x.GetBool(CodeAnalysisKeys.IsResult)
&& x.GetString(CodeAnalysisKeys.Kind) == "NamedType"
&& Document.IdEquals(x.GetDocument(CodeAnalysisKeys.ContainingAssembly)))
.GroupBy(x => x.GetString(CodeAnalysisKeys.SpecificKind))
.OrderBy(x => x.Key))
{
<h2>@typeGroup.Key</h2>
@foreach (var type in typeGroup)
{
<ul>
<li>@Context.GetTypeLink(type)</li>
</ul>
}
}

View File

@ -0,0 +1,4 @@
@await Html.PartialAsync("../Sections/_Syntax.cshtml")
@await Html.PartialAsync("../Sections/_Examples.cshtml")
@await Html.PartialAsync("../Sections/_Remarks.cshtml")
@await Html.PartialAsync("../Sections/_SeeAlso.cshtml")

View File

@ -0,0 +1,9 @@
@await Html.PartialAsync("../Sections/_Summary.cshtml")
@await Html.PartialAsync("../Sections/_Syntax.cshtml")
@await Html.PartialAsync("../Sections/_SymbolInfo.cshtml")
@await Html.PartialAsync("../Sections/_Examples.cshtml")
@await Html.PartialAsync("../Sections/_Remarks.cshtml")
@await Html.PartialAsync("../Sections/_Attributes.cshtml")
@await Html.PartialAsync("../Sections/_Parameters.cshtml")
@await Html.PartialAsync("../Sections/_Value.cshtml")
@await Html.PartialAsync("../Sections/_SeeAlso.cshtml")

View File

@ -0,0 +1,10 @@
@await Html.PartialAsync("../Sections/_Summary.cshtml")
@await Html.PartialAsync("../Sections/_Syntax.cshtml")
@await Html.PartialAsync("../Sections/_SymbolInfo.cshtml")
@await Html.PartialAsync("../Sections/_Examples.cshtml")
@await Html.PartialAsync("../Sections/_Remarks.cshtml")
@await Html.PartialAsync("../Sections/_Attributes.cshtml")
@await Html.PartialAsync("../Sections/_TypeParameters.cshtml")
@await Html.PartialAsync("../Sections/_Parameters.cshtml")
@await Html.PartialAsync("../Sections/_ReturnValue.cshtml")
@await Html.PartialAsync("../Sections/_SeeAlso.cshtml")

View File

@ -0,0 +1,15 @@
@await Html.PartialAsync("../Sections/_Summary.cshtml")
@await Html.PartialAsync("../Sections/_Syntax.cshtml")
@await Html.PartialAsync("../Sections/_SymbolInfo.cshtml")
@await Html.PartialAsync("../Sections/_Examples.cshtml")
@await Html.PartialAsync("../Sections/_Remarks.cshtml")
@await Html.PartialAsync("../Sections/_Attributes.cshtml")
@await Html.PartialAsync("../Sections/_TypeParameters.cshtml")
@await Html.PartialAsync("../Sections/_Constructors.cshtml")
@await Html.PartialAsync("../Sections/_Events.cshtml")
@await Html.PartialAsync("../Sections/_Fields.cshtml")
@await Html.PartialAsync("../Sections/_Properties.cshtml")
@await Html.PartialAsync("../Sections/_Methods.cshtml")
@await Html.PartialAsync("../Sections/_ExtensionMethods.cshtml")
@await Html.PartialAsync("../Sections/_Operators.cshtml")
@await Html.PartialAsync("../Sections/_SeeAlso.cshtml")

View File

@ -0,0 +1,25 @@
@using Statiq.CodeAnalysis
@using Docs.Extensions
@await Html.PartialAsync("../Sections/_Summary.cshtml")
@{
foreach (IGrouping<string, IDocument> typeGroup
in Document.GetDocuments(CodeAnalysisKeys.MemberTypes)
.Where(x => x.GetBool(CodeAnalysisKeys.IsResult) && x.GetString(CodeAnalysisKeys.Kind) == "NamedType")
.GroupBy(x => x.GetString(CodeAnalysisKeys.SpecificKind)))
{
<h3>@typeGroup.Key</h3>
<div class="doc-summary short-term">
<div>
<dl>
@foreach (var type in typeGroup.OrderBy(x => x.GetString(CodeAnalysisKeys.DisplayName)).ToList())
{
<div>
<dt>@Context.GetTypeLink(type)</dt>
<dd>@Html.Raw(type.GetString(CodeAnalysisKeys.Summary))</dd>
</div>
}
</dl>
</div>
</div>
}
}

View File

@ -0,0 +1,9 @@
@await Html.PartialAsync("../Sections/_Summary.cshtml")
@await Html.PartialAsync("../Sections/_Syntax.cshtml")
@await Html.PartialAsync("../Sections/_SymbolInfo.cshtml")
@await Html.PartialAsync("../Sections/_Examples.cshtml")
@await Html.PartialAsync("../Sections/_Remarks.cshtml")
@await Html.PartialAsync("../Sections/_Attributes.cshtml")
@await Html.PartialAsync("../Sections/_Parameters.cshtml")
@await Html.PartialAsync("../Sections/_Value.cshtml")
@await Html.PartialAsync("../Sections/_SeeAlso.cshtml")

View File

@ -0,0 +1,26 @@
@using Statiq.CodeAnalysis
@using Docs.Extensions
@{
IReadOnlyList<IDocument> attributes = Document.GetDocumentList(CodeAnalysisKeys.Attributes);
if (attributes?.Count > 0)
{
<h3>Attributes</h3>
<div class="doc-summary">
<div>
<dl>
@foreach (var attribute in attributes)
{
var type = attribute.GetDocument(CodeAnalysisKeys.Type);
<div>
<dt>
@Context.GetTypeLink(type)
</dt>
<dd>@Html.Raw(type.GetString(CodeAnalysisKeys.Summary))</dd>
</div>
}
</dl>
</div>
</div>
}
}

View File

@ -0,0 +1,22 @@
@using Statiq.CodeAnalysis
@using Microsoft.AspNetCore.Html
@if(Document.GetBool(CodeAnalysisKeys.HasConstantValue))
{
var constantValue = Document.Get(CodeAnalysisKeys.ConstantValue);
<h3>Constant Value</h3>
<div class="doc-summary">
<div>
<dl>
<div>
<dt>
@(new HtmlString(constantValue?.ToString() ?? "null"))
</dt>
<dd>@(new HtmlString(constantValue?.GetType().Name ?? string.Empty))</dd>
</div>
</dl>
</div>
</div>
}

View File

@ -0,0 +1,6 @@
namespace Docs.input.api.Sections;
public class _ConstantValue_cshtml
{
}

View File

@ -0,0 +1,29 @@
@using Statiq.CodeAnalysis
@using Docs.Extensions
@{
var constructors = Document.GetDocumentList(CodeAnalysisKeys.Constructors)
?.Where(x => x.GetBool(CodeAnalysisKeys.IsResult))
.OrderBy(x => x.GetString(CodeAnalysisKeys.DisplayName))
.ToList();
if (constructors?.Count > 0)
{
<h3>Constructors</h3>
<div class="doc-summary">
<div>
<dl>
@foreach (var constructor in constructors)
{
<div>
<dt>
@constructor.GetModifiers() @Context.GetTypeLink(constructor, false)
</dt>
<dd>@Html.Raw(constructor.GetString(CodeAnalysisKeys.Summary))</dd>
</div>
}
</dl>
</div>
</div>
}
}

View File

View File

@ -0,0 +1,9 @@
@using Statiq.CodeAnalysis
@{
var examples = Document.GetString(CodeAnalysisKeys.Example);
if (!examples.IsNullOrWhiteSpace())
{
<h3>Examples</h3>
<div>@Html.Raw(examples)</div>
}
}

View File

@ -0,0 +1,40 @@
@using Statiq.CodeAnalysis
@using Docs.Extensions
@using Microsoft.CodeAnalysis
@{
var modelSymbol = Document.Get<ITypeSymbol>(CodeAnalysisKeys.Symbol);
IReadOnlyList<IDocument> methods = Document.GetDocumentList(CodeAnalysisKeys.ExtensionMethods)
?.Where(x => x.GetBool(CodeAnalysisKeys.IsResult))
.OrderBy(x => x.GetString(CodeAnalysisKeys.DisplayName))
.ToList();
if (methods?.Count > 0)
{
<h3>Extension Methods</h3>
<div class="doc-summary">
<div>
<dl>
@foreach (var method in methods)
{
ISymbol reducedSymbol = method.Get<IMethodSymbol>(CodeAnalysisKeys.Symbol)?.ReduceExtensionMethod(modelSymbol);
string reducedName = reducedSymbol?.ToDisplayString(new SymbolDisplayFormat(
typeQualificationStyle: SymbolDisplayTypeQualificationStyle.NameAndContainingTypes,
genericsOptions: SymbolDisplayGenericsOptions.IncludeTypeParameters,
parameterOptions: SymbolDisplayParameterOptions.IncludeType,
memberOptions: SymbolDisplayMemberOptions.IncludeParameters,
miscellaneousOptions: SymbolDisplayMiscellaneousOptions.UseSpecialTypes));
<div>
<dt>
@method.GetModifiers(skipStatic:true) @method.GetDocument(CodeAnalysisKeys.ReturnType).GetString(CodeAnalysisKeys.DisplayName) @Context.GetTypeLink(method,reducedName, false)
</dt>
<dd>@Html.Raw(method.GetString(CodeAnalysisKeys.Summary))</dd>
</div>
}
</dl>
</div>
</div>
}
}

View File

@ -0,0 +1,59 @@
@using Statiq.CodeAnalysis
@using Microsoft.AspNetCore.Html
@using Docs.Extensions
@{
var isEnum = Document.GetString(CodeAnalysisKeys.SpecificKind) == "Enum";
IReadOnlyList<IDocument> fields;
if (isEnum)
{
fields = Document.GetDocumentList(CodeAnalysisKeys.Members)?.Where(x => x.GetBool(CodeAnalysisKeys.IsResult) && x.GetString(CodeAnalysisKeys.Kind) == "Field")
.OrderBy(x => x.Get(CodeAnalysisKeys.ConstantValue) as int? ?? 0)
.ToList();
}
else
{
fields = Document.GetDocumentList(CodeAnalysisKeys.Members)?.Where(x => x.GetBool(CodeAnalysisKeys.IsResult) && x.GetString(CodeAnalysisKeys.Kind) == "Field")
.OrderBy(x => x.GetString(CodeAnalysisKeys.DisplayName))
.ToList();
}
if (fields?.Count > 0)
{
<h3>Fields</h3>
<div class="doc-summary">
<div>
<dl>
@foreach (var field in fields)
{
<div>
<dt>
<div class="flex flex-row">
<div class="w-4/5">
@if (isEnum)
{
@Context.GetTypeLink(field, false)
}
else
{
@field.GetModifiers() @Context.GetTypeLink(field.GetDocument(CodeAnalysisKeys.Type))
@Context.GetTypeLink(field, false)
}
</div>
<div>
@(field.GetBool(CodeAnalysisKeys.HasConstantValue) ? new HtmlString(field.Get(CodeAnalysisKeys.ConstantValue)?.ToString() ?? "null") : new HtmlString(string.Empty))
</div>
</div>
</dt>
<dd>
@Html.Raw(field.GetString(CodeAnalysisKeys.Summary))
</dd>
</div>
}
</dl>
</div>
</div>
}
}

View File

@ -0,0 +1,30 @@
@using Statiq.CodeAnalysis
@using Docs.Extensions
@{
IReadOnlyList<IDocument> methods = Model.GetDocumentList(CodeAnalysisKeys.Members)
?.Where(x => x.GetBool(CodeAnalysisKeys.IsResult) && x.GetString(CodeAnalysisKeys.Kind) == "Method")
.OrderBy(x => x.GetString(CodeAnalysisKeys.DisplayName))
.ToList();
if (methods?.Count > 0)
{
<h3>Methods</h3>
<div class="doc-summary">
<div>
<dl>
@foreach (var method in methods)
{
<div>
<dt>
@method.GetModifiers() @method.GetDocument(CodeAnalysisKeys.ReturnType).GetString(CodeAnalysisKeys.DisplayName) @Context.GetTypeLink(method, false)
</dt>
<dd>@Html.Raw(method.GetString(CodeAnalysisKeys.Summary))</dd>
</div>
}
</dl>
</div>
</div>
}
}

View File

@ -0,0 +1,25 @@
@using Statiq.CodeAnalysis
@using Docs.Extensions
@{
var parameters = Model.GetDocumentList(CodeAnalysisKeys.Parameters);
var paramComments = Model.GetList<ReferenceComment>(CodeAnalysisKeys.Params);
if (parameters?.Count > 0)
{
<h3>Parameters</h3>
<div class="doc-summary">
<div>
<dl>
@foreach (var parameter in parameters)
{
<div>
<dt>
@Context.GetTypeLink(parameter.GetDocument(CodeAnalysisKeys.Type)) <span class="identifier">@parameter.GetString(CodeAnalysisKeys.Name)</span>
</dt>
<dd>@Html.Raw(paramComments?.Where(x => x.Name.Equals(parameter.GetString(CodeAnalysisKeys.Name))).Select(x => x.Html).FirstOrDefault()) </dd>
</div>
}
</dl>
</div>
</div>
}
}

View File

@ -0,0 +1,30 @@
@using Statiq.CodeAnalysis
@using Docs.Extensions
@{
IReadOnlyList<IDocument> properties = Model.GetDocumentList(CodeAnalysisKeys.Members)
?.Where(x => x.GetBool(CodeAnalysisKeys.IsResult) && x.GetString(CodeAnalysisKeys.Kind) == "Property")
.OrderBy(x => x.GetString(CodeAnalysisKeys.DisplayName))
.ToList();
if (properties?.Count > 0)
{
<h3>Properties</h3>
<div class="doc-summary">
<div>
<dl>
@foreach (var property in properties)
{
<div>
<dt>
@property.GetModifiers() @property.GetDocument(CodeAnalysisKeys.Type).GetString(CodeAnalysisKeys.DisplayName) @Context.GetTypeLink(property, false)
</dt>
<dd>@Html.Raw(property.GetString(CodeAnalysisKeys.Summary))</dd>
</div>
}
</dl>
</div>
</div>
}
}

View File

@ -0,0 +1,9 @@
@using Statiq.CodeAnalysis
@{
var remarks = Document.GetString(CodeAnalysisKeys.Remarks);
if (!remarks.IsNullOrWhiteSpace())
{
<h3>Remarks</h3>
<div>@Html.Raw(remarks)</div>
}
}

View File

@ -0,0 +1,23 @@
@using Statiq.CodeAnalysis
@using Docs.Extensions
@{
var returnType = Model.GetDocument(CodeAnalysisKeys.ReturnType);
var returns = Model.GetString(CodeAnalysisKeys.Returns);
if ((returnType != null && returnType.GetString(CodeAnalysisKeys.DisplayName) != "void") || !string.IsNullOrWhiteSpace(returns))
{
<h3>Returns</h3>
<div class="doc-summary">
<div>
<dl>
<div>
<dt>
@Context.GetTypeLink(returnType, false)
</dt>
<dd></dd>
</div>
</dl>
</div>
</div>
}
}

View File

@ -0,0 +1,14 @@
@using Statiq.CodeAnalysis
@{
var seeAlso = Document.GetList<string>(CodeAnalysisKeys.SeeAlso);
if (seeAlso?.Count > 0)
{
<h3 id="SeeAlso">See Also</h3>
<ul>
@foreach (string seeAlsoComment in seeAlso)
{
<li>@Html.Raw(seeAlsoComment)</li>
}
</ul>
}
}

View File

@ -0,0 +1,7 @@
@{
var summary = Document.GetString("Summary");
if (!summary.IsNullOrWhiteSpace())
{
<div class="my-4 md:my-8">@Html.Raw(summary)</div>
}
}

View File

@ -0,0 +1,131 @@
@using Statiq.CodeAnalysis
@using Docs.Extensions
@{
var containingAssembly = Document.GetDocument(CodeAnalysisKeys.ContainingAssembly);
var containingNamespace = Document.GetDocument(CodeAnalysisKeys.ContainingNamespace);
var containingType = Document.GetDocument(CodeAnalysisKeys.ContainingType);
var type = Document.GetDocument(CodeAnalysisKeys.Type);
var overridden = Document.GetDocument(CodeAnalysisKeys.Overridden);
IReadOnlyList<IDocument> allInterfaces = Document.GetDocumentList(CodeAnalysisKeys.AllInterfaces);
IReadOnlyList<IDocument> baseTypes = Document.GetDocumentList(CodeAnalysisKeys.BaseTypes)?
.Where(i => !i.GetString(CodeAnalysisKeys.QualifiedName).Equals("System.Object"))
.Reverse()
.ToList();
IReadOnlyList<IDocument> derivedTypes = Document.GetDocumentList(CodeAnalysisKeys.DerivedTypes);
IReadOnlyList<IDocument> implementingTypes = Document.GetDocumentList(CodeAnalysisKeys.ImplementingTypes);
if (containingAssembly is object
|| containingNamespace is object
|| allInterfaces?.Count > 0
|| baseTypes?.Count > 0
|| derivedTypes?.Count > 0
|| implementingTypes?.Count > 0)
{
<div class="doc-summary tiny-term">
<div>
<dl>
@if (containingAssembly != null)
{
<div>
<dt>Assembly</dt>
<dd>containingAssembly</dd>
</div>
}
@if (containingNamespace != null)
{
<div>
<dt>Namespace</dt>
<dd>@Context.GetTypeLink(containingNamespace)</dd>
</div>
}
@if (containingType != null)
{
<div>
<dt>Containing Type</dt>
<dd>@Context.GetTypeLink(containingType)</dd>
</div>
}
@if (overridden != null)
{
<div>
<dt>Overridden</dt>
<dd>@Context.GetTypeLink(overridden)</dd>
</div>
}
@if (allInterfaces?.Count > 0)
{
<div>
<dt>Interfaces</dt>
<dd>
<ul class="list-unstyled">
@foreach (var interfaceDocument in allInterfaces)
{
<li>@Context.GetTypeLink(interfaceDocument)</li>
}
</ul>
</dd>
</div>
}
@if (baseTypes?.Count > 0)
{
<div>
<dt>Base Types</dt>
<dd>
<ul class="list-unstyled">
@foreach (var baseType in baseTypes)
{
<li>@Context.GetTypeLink(baseType)</li>
}
</ul>
</dd>
</div>
}
@if (derivedTypes?.Count > 0)
{
<div>
<dt>Derived Types</dt>
<dd>
<ul class="list-unstyled">
@foreach (var derivedType in derivedTypes)
{
<li>@Context.GetTypeLink(derivedType)</li>
}
</ul>
</dd>
</div>
}
@if (implementingTypes?.Count > 0)
{
<div>
<dt>Implementing Types</dt>
<dd>
<ul class="list-unstyled">
@foreach (var implementingType in implementingTypes)
{
<li>@Context.GetTypeLink(implementingType)</li>
}
</ul>
</dd>
</div>
}
@if (type != null)
{
<div>
<dt>@Document.GetString(CodeAnalysisKeys.Kind) Type</dt>
<dd>@Context.GetTypeLink(type)</dd>
</div>
}
</dl>
</div>
</div>
}
}

View File

@ -0,0 +1,8 @@
@using Statiq.CodeAnalysis
@{
string syntax = Document.GetString(CodeAnalysisKeys.Syntax);
if (!syntax.IsNullOrWhiteSpace())
{
<pre class="language-csharp"><code class="language-csharp">@syntax</code></pre>
}
}

View File

@ -0,0 +1,26 @@
@using Statiq.CodeAnalysis
@{
var typeParameters = Model.GetDocumentList(CodeAnalysisKeys.TypeParameters);
var typeParams = Model.GetList<ReferenceComment>(CodeAnalysisKeys.TypeParams);
if (typeParameters?.Count > 0)
{
<h3>Parameters</h3>
<div class="doc-summary">
<div>
<dl>
@foreach (var typeParam in typeParameters)
{
<div>
<dt>
<code>@typeParam.GetString(CodeAnalysisKeys.Name)</code>
</dt>
<dd>@Html.Raw(typeParams?.Where(x => x.Name.Equals(typeParam.GetString(CodeAnalysisKeys.Name))).Select(x => x.Html).FirstOrDefault()) </dd>
</div>
}
</dl>
</div>
</div>
}
}

View File

@ -0,0 +1,12 @@
@using Statiq.CodeAnalysis
@using Docs.Extensions
@{
IDocument type = Document.GetDocument(CodeAnalysisKeys.Type);
string value = Document.GetString(CodeAnalysisKeys.Value);
}
@if (type is object && !string.IsNullOrWhiteSpace(value))
{
<p>@Context.GetTypeLink(type)</p>
<p>@Html.Raw(value)</p>
}

View File

@ -0,0 +1,48 @@
@using Statiq.CodeAnalysis
@using Docs.Extensions
@inherits StatiqRazorPage<IDocument>
@{
Layout = @"../_layout.cshtml";
}
@section header{
<h1 class="text-2xl md:text-4xl align-baseline font-extrabold">
@Document.GetString(CodeAnalysisKeys.DisplayName) <span class="text-lg md:text-2xl text-uppercase text-sky-600 dark:text-sky-400">@Document.GetString(CodeAnalysisKeys.SpecificKind)</span>
</h1>
<nav class="flex mt-2" aria-label="Breadcrumb">
<ol class="flex flex-col sm:flex-row sm:items-center space-x-2 lg:space-x-3">
@{
var isFirst = true;
}
@foreach (var parent in Context.GetExecutionCache("sidebar", ctx => ctx.OutputPages).GetAncestorsOf(Document, Document.IdEquals(Model)).Reverse().Skip(1))
{
<li>
<div class="flex items-center">
@if (isFirst)
{
isFirst = false;
}
else
{
<svg class="flex-shrink-0 h-5 w-5 mr-2 lg:mr-3 text-slate-400 dark:text-slate-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
<path fill-rule="evenodd" d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z" clip-rule="evenodd"/>
</svg>
}
<span class="font-light text-sm text-slate-600 dark:text-slate-300" >@Html.DocumentLink(parent, parent.GetString(WebKeys.Title, parent.GetTitle()))</span>
</div>
</li>
}
</ol>
</nav>
}
@await Html.PartialAsync($"Kind/_{Model.GetString(CodeAnalysisKeys.Kind)}.cshtml", Model)
@{
IgnoreBody();
}

View File

@ -0,0 +1,11 @@
Title: API Reference
Order: 10000
---
<p>The Spectre.Console API reference is organized by namespace. Each namespace has one or more classes for working with Console applications.</p>
<ul>
@foreach (var child in OutputPages.GetChildrenOf(Document).OrderBy(i => i.GetTitle()))
{
<li>@Html.DocumentLink(child)</li>
}
</ul>

View File

@ -0,0 +1,39 @@
Title: Borders
Order: 2
Description: "*Spectre.Console* makes it easy to create tables and panels with a variety of different styles of borders."
Highlights:
- Rounded
- Square
- Heavy
- And more...
---
There are different built-in borders you can use for tables and panels.
## Table borders
![Examples of table borders](../assets/images/borders/table.png)
### Example
To set a table border to `SimpleHeavy`:
```csharp
var table = new Table();
table.Border = TableBorder.SimpleHeavy;
```
---
## Panel borders
![Examples of panel borders](../assets/images/borders/panel.png)
### Example
To set a panel border to `Rounded`:
```csharp
var panel = new Panel("Hello World");
panel.Border = BoxBorder.Rounded;
```

View File

@ -0,0 +1,27 @@
Title: Colors
Order: 0
Description: "*Spectre.Console* allows easy rendering of the standard ANSI colors of your terminal, and also supports rendering up to 24-bit colors depending on the capabilities of your terminal."
Highlights:
- Predefined common colors
- Easy syntax for inline styling
---
The following is a list of the standard 8-bit colors supported in terminals.
Note that the first 16 colors are generally defined by the system or your terminal software, and may not display exactly as rendered here.
## Usage
You can either use the colors in code, such as `new Style(foreground: Color.Maroon)` or
in markup text such as `AnsiConsole.Markup("[maroon on blue]Hello[/]")`.
## Standard colors
<input
id="colorSearch"
type="search"
oninput="search(this, 'color-results', 2)"
placeholder="Search for colors.."
title="Type in a color" />
<?# ColorTable /?>

View File

@ -0,0 +1,70 @@
Title: Emojis
Order: 3
Description: "For terminals that support Emojis, *Spectre.Console* supports a simple syntax for rendering emojis."
Highlights:
- ":rocket: becomes 🚀"
- ":waning_gibbous_moon: becomes 🌖"
---
Please note that what emojis that can be used is completely up to
the operating system and/or terminal you're using, and no guarantees
can be made of how it will look. Calculating the width of emojis
is also not an exact science in many ways, so milage might vary when
used in tables, panels or grids.
To ensure best compatibility, consider only using emojis introduced
before Unicode 13.0 that belongs in the `Emoji_Presentation` category
in the official emoji list at
https://www.unicode.org/Public/UCD/latest/ucd/emoji/emoji-data.txt
## Usage
```csharp
// Markup
AnsiConsole.MarkupLine("Hello :globe_showing_europe_africa:!");
// Constant
var hello = "Hello " + Emoji.Known.GlobeShowingEuropeAfrica;
```
## Replacing emojis in text
```csharp
var phrase = "Mmmm :birthday_cake:";
var rendered = Emoji.Replace(phrase);
```
## Remapping or adding an emoji
Sometimes you want to remap an existing emoji, or
add a completely new one. For this you can use the
`Emoji.Remap` method. This approach works both with
markup strings and `Emoji.Replace`.
```csharp
// Remap the emoji
Emoji.Remap("globe_showing_europe_africa", "😄");
// Render markup
AnsiConsole.MarkupLine("Hello :globe_showing_europe_africa:!");
// Replace emojis in string
var phrase = "Hello :globe_showing_europe_africa:!";
var rendered = Emoji.Replace(phrase);
```
## Emojis
_The images in the table below might not render correctly in your
browser for the same reasons mentioned in the `Compatibility` section._
<input
id="emojiSearch"
type="search"
oninput="search(this, 'emoji-results', 2)"
placeholder="Search for emojis.."
title="Type in an emoji name" />
<?# EmojiTable /?>

View File

@ -0,0 +1,11 @@
Title: Appendix
Order: 100
---
<h1>Sections</h1>
<ul>
@foreach (IDocument child in OutputPages.GetChildrenOf(Document))
{
<li>@Html.DocumentLink(child)</li>
}
</ul>

View File

@ -0,0 +1,47 @@
Title: Spinners
Order: 4
Description: "*Spectre.Console* supports over 80 different types of spinners, and allows new ones to be defined. They are used automatically with the controls"
Highlights:
- Status display
- Progress display
---
For all available spinners, see https://jsfiddle.net/sindresorhus/2eLtsbey/embedded/result/
## Usage
Spinners can be used with [Progress](xref:live-progress) and [Status](xref:live-status).
```csharp
AnsiConsole.Status()
.Spinner(Spinner.Known.Star)
.Start("Thinking...", ctx => {
// Omitted
});
```
## Implementing a spinner
To implement your own spinner, all you have to do is
inherit from the `Spinner` base class.
In the example below, the spinner will alternate between
the characters `A`, `B` and `C` every 100 ms.
```csharp
public sealed class MySpinner : Spinner
{
// The interval for each frame
public override TimeSpan Interval => TimeSpan.FromMilliseconds(100);
// Whether or not the spinner contains unicode characters
public override bool IsUnicode => false;
// The individual frames of the spinner
public override IReadOnlyList<string> Frames =>
new List<string>
{
"A", "B", "C",
};
}
```

View File

@ -0,0 +1,55 @@
Title: Styles
Order: 1
Description: "*Spectre.Console* makes it easy to write text with different styles beyond colors. Depending on your terminal, it can make it easy to use styles such as"
Highlights:
- Bold, Italic, Underline, strikethrough
- Dim, Invert
- Conceal, slowblink, rapidblink
- Links
Xref: appendix-styles
---
Note that what styles that can be used is defined by the system or your terminal software, and may not appear as they should.
<table class="table">
<tr>
<td><code>bold</code></td>
<td>Bold text</td>
</tr>
<tr>
<td><code>dim</code></td>
<td>Dim or faint text</td>
</tr>
<tr>
<td><code>italic</code></td>
<td>Italic text</td>
</tr>
<tr>
<td><code>underline</code></td>
<td>Underlined text</td>
</tr>
<tr>
<td><code>invert</code></td>
<td>Swaps the foreground and background colors</td>
</tr>
<tr>
<td><code>conceal</code></td>
<td>Hides the text</td>
</tr>
<tr>
<td><code>slowblink</code></td>
<td>Makes text blink slowly</td>
</tr>
<tr>
<td><code>rapidblink</code></td>
<td>Makes text blink</td>
</tr>
<tr>
<td><code>strikethrough</code></td>
<td>Shows text with a horizontal line through the center</td>
</tr>
<tr>
<td><code>link</code></td>
<td>Creates a clickable link within text</td>
</tr>
</table>

Binary file not shown.

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 5, "title": "bar-chart (plain)", "env": {"TERM": "Spectre.Console"}}
[0, "o", " \u001B[1;4;32mNumber of fruits\u001B[0m \r\n Apple \u001B[37m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 12\u001B[0m\u001B[37m \u001B[0m\r\nOrange \u001B[32m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 54\u001B[0m\r\nBanana \u001B[31m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 33\u001B[0m\u001B[37m \u001B[0m\r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 5, "title": "bar-chart (rich)", "env": {"TERM": "Spectre.Console"}}
[0, "o", " \u001B[1;4;38;5;2mNumber of fruits\u001B[0m \r\n Apple \u001B[38;5;11m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 12\u001B[0m\u001B[38;5;8m \u001B[0m\r\nOrange \u001B[38;5;2m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 54\u001B[0m\r\nBanana \u001B[38;5;9m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588 33\u001B[0m\u001B[38;5;8m \u001B[0m\r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 5, "title": "breakdown-chart (plain)", "env": {"TERM": "Spectre.Console"}}
[0, "o", "\u001B[31m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[34m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[32m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[37m\u2588\u2588\u001B[0m\u001B[37m\u2588\u2588\u001B[0m\r\n\u001B[31m\u25A0\u001B[0m SCSS \u001B[37m80\u001B[0m \u001B[34m\u25A0\u001B[0m HTML \u001B[37m28.3\u001B[0m \u001B[32m\u25A0\u001B[0m C# \u001B[37m22.6\u001B[0m \u001B[37m\u25A0\u001B[0m JavaScript \u001B[37m6\u001B[0m \r\n\u001B[37m\u25A0\u001B[0m Ruby \u001B[37m6\u001B[0m \u001B[36m\u25A0\u001B[0m Shell \u001B[37m0.1\u001B[0m \r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 5, "title": "breakdown-chart (rich)", "env": {"TERM": "Spectre.Console"}}
[0, "o", "\u001B[38;5;9m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[38;5;12m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[38;5;2m\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u001B[0m\u001B[38;5;11m\u2588\u2588\u001B[0m\u001B[38;5;119m\u2588\u2588\u001B[0m\r\n\u001B[38;5;9m\u25A0\u001B[0m SCSS \u001B[38;5;8m80\u001B[0m \u001B[38;5;12m\u25A0\u001B[0m HTML \u001B[38;5;8m28.3\u001B[0m \u001B[38;5;2m\u25A0\u001B[0m C# \u001B[38;5;8m22.6\u001B[0m \u001B[38;5;11m\u25A0\u001B[0m JavaScript \u001B[38;5;8m6\u001B[0m \r\n\u001B[38;5;119m\u25A0\u001B[0m Ruby \u001B[38;5;8m6\u001B[0m \u001B[38;5;14m\u25A0\u001B[0m Shell \u001B[38;5;8m0.1\u001B[0m \r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 12, "title": "calendar-culture (plain)", "env": {"TERM": "Spectre.Console"}}
[0, "o", " \u001B[37mOktober 2020\u001B[0m \r\n\u250C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 M\u00E5n \u2502 Tis \u2502 Ons \u2502 Tor \u2502 Fre \u2502 L\u00F6r \u2502 S\u00F6n \u2502\r\n\u251C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2524\r\n\u2502 \u2502 \u2502 \u2502 1 \u2502 2 \u2502 3 \u2502 4 \u2502\r\n\u2502 5 \u2502 6 \u2502 7 \u2502 8 \u2502 9 \u2502 10 \u2502 11 \u2502\r\n\u2502 12 \u2502 13 \u2502 14 \u2502 15 \u2502 16 \u2502 17 \u2502 18 \u2502\r\n\u2502 19 \u2502 20 \u2502 21 \u2502 22 \u2502 23 \u2502 24 \u2502 25 \u2502\r\n\u2502 26 \u2502 27 \u2502 28 \u2502 29 \u2502 30 \u2502 31 \u2502 \u2502\r\n\u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2518\r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 12, "title": "calendar-culture (rich)", "env": {"TERM": "Spectre.Console"}}
[0, "o", " \u001B[38;5;7mOktober 2020\u001B[0m \r\n\u250C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 M\u00E5n \u2502 Tis \u2502 Ons \u2502 Tor \u2502 Fre \u2502 L\u00F6r \u2502 S\u00F6n \u2502\r\n\u251C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2524\r\n\u2502 \u2502 \u2502 \u2502 1 \u2502 2 \u2502 3 \u2502 4 \u2502\r\n\u2502 5 \u2502 6 \u2502 7 \u2502 8 \u2502 9 \u2502 10 \u2502 11 \u2502\r\n\u2502 12 \u2502 13 \u2502 14 \u2502 15 \u2502 16 \u2502 17 \u2502 18 \u2502\r\n\u2502 19 \u2502 20 \u2502 21 \u2502 22 \u2502 23 \u2502 24 \u2502 25 \u2502\r\n\u2502 26 \u2502 27 \u2502 28 \u2502 29 \u2502 30 \u2502 31 \u2502 \u2502\r\n\u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2518\r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 12, "title": "calendar-header (plain)", "env": {"TERM": "Spectre.Console"}}
[0, "o", " \u001B[1;34m2020 October\u001B[0m \r\n\u250C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 Sun \u2502 Mon \u2502 Tue \u2502 Wed \u2502 Thu \u2502 Fri \u2502 Sat \u2502\r\n\u251C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2524\r\n\u2502 \u2502 \u2502 \u2502 \u2502 1 \u2502 2 \u2502 3 \u2502\r\n\u2502 4 \u2502 5 \u2502 6 \u2502 7 \u2502 8 \u2502 9 \u2502 10 \u2502\r\n\u2502 11 \u2502 12 \u2502 13 \u2502 14 \u2502 15 \u2502 16 \u2502 17 \u2502\r\n\u2502 18 \u2502 19 \u2502 20 \u2502 21 \u2502 22 \u2502 23 \u2502 24 \u2502\r\n\u2502 25 \u2502 26 \u2502 27 \u2502 28 \u2502 29 \u2502 30 \u2502 31 \u2502\r\n\u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2518\r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 12, "title": "calendar-header (rich)", "env": {"TERM": "Spectre.Console"}}
[0, "o", " \u001B[1;38;5;12m2020 October\u001B[0m \r\n\u250C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 Sun \u2502 Mon \u2502 Tue \u2502 Wed \u2502 Thu \u2502 Fri \u2502 Sat \u2502\r\n\u251C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2524\r\n\u2502 \u2502 \u2502 \u2502 \u2502 1 \u2502 2 \u2502 3 \u2502\r\n\u2502 4 \u2502 5 \u2502 6 \u2502 7 \u2502 8 \u2502 9 \u2502 10 \u2502\r\n\u2502 11 \u2502 12 \u2502 13 \u2502 14 \u2502 15 \u2502 16 \u2502 17 \u2502\r\n\u2502 18 \u2502 19 \u2502 20 \u2502 21 \u2502 22 \u2502 23 \u2502 24 \u2502\r\n\u2502 25 \u2502 26 \u2502 27 \u2502 28 \u2502 29 \u2502 30 \u2502 31 \u2502\r\n\u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2518\r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 12, "title": "calendar-highlight (plain)", "env": {"TERM": "Spectre.Console"}}
[0, "o", " \u001B[37m2020 October\u001B[0m \r\n\u250C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 Sun \u2502 Mon \u2502 Tue \u2502 Wed \u2502 Thu \u2502 Fri \u2502 Sat \u2502\r\n\u251C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2524\r\n\u2502 \u2502 \u2502 \u2502 \u2502 1 \u2502 2 \u2502 3 \u2502\r\n\u2502 4 \u2502 5 \u2502 6 \u2502 7 \u2502 8 \u2502 9 \u2502 10 \u2502\r\n\u2502 \u001B[1;37m11*\u001B[0m \u2502 12 \u2502 13 \u2502 14 \u2502 15 \u2502 16 \u2502 17 \u2502\r\n\u2502 18 \u2502 19 \u2502 20 \u2502 21 \u2502 22 \u2502 23 \u2502 24 \u2502\r\n\u2502 25 \u2502 26 \u2502 27 \u2502 28 \u2502 29 \u2502 30 \u2502 31 \u2502\r\n\u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2518\r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 12, "title": "calendar-highlight (rich)", "env": {"TERM": "Spectre.Console"}}
[0, "o", " \u001B[38;5;7m2020 October\u001B[0m \r\n\u250C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 Sun \u2502 Mon \u2502 Tue \u2502 Wed \u2502 Thu \u2502 Fri \u2502 Sat \u2502\r\n\u251C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2524\r\n\u2502 \u2502 \u2502 \u2502 \u2502 1 \u2502 2 \u2502 3 \u2502\r\n\u2502 4 \u2502 5 \u2502 6 \u2502 7 \u2502 8 \u2502 9 \u2502 10 \u2502\r\n\u2502 \u001B[1;38;5;11m11*\u001B[0m \u2502 12 \u2502 13 \u2502 14 \u2502 15 \u2502 16 \u2502 17 \u2502\r\n\u2502 18 \u2502 19 \u2502 20 \u2502 21 \u2502 22 \u2502 23 \u2502 24 \u2502\r\n\u2502 25 \u2502 26 \u2502 27 \u2502 28 \u2502 29 \u2502 30 \u2502 31 \u2502\r\n\u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2518\r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 12, "title": "calendar (plain)", "env": {"TERM": "Spectre.Console"}}
[0, "o", " \u001B[37m2020 October\u001B[0m \r\n\u250C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 Sun \u2502 Mon \u2502 Tue \u2502 Wed \u2502 Thu \u2502 Fri \u2502 Sat \u2502\r\n\u251C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2524\r\n\u2502 \u2502 \u2502 \u2502 \u2502 1 \u2502 2 \u2502 3 \u2502\r\n\u2502 4 \u2502 5 \u2502 6 \u2502 7 \u2502 8 \u2502 9 \u2502 10 \u2502\r\n\u2502 11 \u2502 12 \u2502 13 \u2502 14 \u2502 15 \u2502 16 \u2502 17 \u2502\r\n\u2502 18 \u2502 19 \u2502 20 \u2502 21 \u2502 22 \u2502 23 \u2502 24 \u2502\r\n\u2502 25 \u2502 26 \u2502 27 \u2502 28 \u2502 29 \u2502 30 \u2502 31 \u2502\r\n\u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2518\r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 12, "title": "calendar (rich)", "env": {"TERM": "Spectre.Console"}}
[0, "o", " \u001B[38;5;7m2020 October\u001B[0m \r\n\u250C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u252C\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 Sun \u2502 Mon \u2502 Tue \u2502 Wed \u2502 Thu \u2502 Fri \u2502 Sat \u2502\r\n\u251C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u253C\u2500\u2500\u2500\u2500\u2500\u2524\r\n\u2502 \u2502 \u2502 \u2502 \u2502 1 \u2502 2 \u2502 3 \u2502\r\n\u2502 4 \u2502 5 \u2502 6 \u2502 7 \u2502 8 \u2502 9 \u2502 10 \u2502\r\n\u2502 11 \u2502 12 \u2502 13 \u2502 14 \u2502 15 \u2502 16 \u2502 17 \u2502\r\n\u2502 18 \u2502 19 \u2502 20 \u2502 21 \u2502 22 \u2502 23 \u2502 24 \u2502\r\n\u2502 25 \u2502 26 \u2502 27 \u2502 28 \u2502 29 \u2502 30 \u2502 31 \u2502\r\n\u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502 \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2518\r\n"]

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 24, "title": "canvas-image (plain)", "env": {"TERM": "Spectre.Console"}}
[0, "o", " \u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[40m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m \r\n \u001B[41m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m\u001B[40m \u001B[0m \r\n \u001B[41m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m\u001B[40m \u001B[0m \r\n \u001B[41m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[41m \u001B[0m \r\n \u001B[43m \u001B[0m\u001B[47m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[40m \u001B[0m \r\n \u001B[40m \u001B[0m\u001B[43m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[41m \u001B[0m \r\n\u001B[40m \u001B[0m\u001B[43m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[41m \u001B[0m \r\n\u001B[40m \u001B[0m\u001B[43m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[47m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m \r\n\u001B[40m \u001B[0m\u001B[43m \u001B[0m\u001B[47m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m \r\n\u001B[40m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[40m \u001B[0m \r\n\u001B[40m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m\u001B[40m \u001B[0m \r\n\u001B[40m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m\u001B[40m \u001B[0m \r\n\u001B[40m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[40m \u001B[0m \r\n\u001B[40m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[41m \u001B[0m \r\n\u001B[40m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[40m \u001B[0m\u001B[40m \u001B[0m\u001B[40m \u001B[0m \u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m\u001B[43m \u001B[0m \r\n \u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m\u001B[41m \u001B[0m \r\n"]

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 24, "title": "canvas (plain)", "env": {"TERM": "Spectre.Console"}}
[0, "o", "\u001B[42m \u001B[0m\u001B[41m \u001B[0m\r\n\u001B[42m \u001B[0m\u001B[47m \u001B[0m \u001B[47m \u001B[0m\u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m \u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m\u001B[47m \u001B[0m \u001B[47m \u001B[0m\u001B[47m \u001B[0m\r\n\u001B[42m \u001B[0m\u001B[44m \u001B[0m\u001B[47m \u001B[0m\r\n"]

View File

@ -0,0 +1,3 @@
{"version": 2, "width": 84, "height": 24, "title": "canvas (rich)", "env": {"TERM": "Spectre.Console"}}
[0, "o", "\u001B[48;5;2m \u001B[0m\u001B[48;5;9m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m\u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m\u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m \u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m\u001B[48;5;15m \u001B[0m \u001B[48;5;15m \u001B[0m\u001B[48;5;11m \u001B[0m\r\n\u001B[48;5;2m \u001B[0m\u001B[48;5;12m \u001B[0m\u001B[48;5;11m \u001B[0m\r\n"]

View File

@ -0,0 +1,43 @@
{"version": 2, "width": 84, "height": 24, "title": "columns (plain)", "env": {"TERM": "Spectre.Console"}}
[0, "o", "\u001B[?25l"]
[0.094, "o", "\u001B[1;37mApple\u001B[0m "]
[0.297, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m "]
[0.5, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m "]
[0.719, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m "]
[0.922, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m "]
[1.125, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m "]
[1.344, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m "]
[1.563, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m"]
[1.766, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m"]
[1.969, "o", "\r\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m\r\n\u001B[1;37mCherry\u001B[0m "]
[2.172, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m\r\n\u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m "]
[2.375, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m\r\n\u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m "]
[2.594, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m\r\n\u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m "]
[2.797, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m\r\n\u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m "]
[3, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m\r\n\u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \u001B[1;37mGrape\u001B[0m "]
[3.219, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m\r\n\u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m"]
[3.422, "o", "\r\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m \u001B[1;37mBreadfruit\u001B[0m\r\n\u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m\r\n\u001B[1;37mJackfruit\u001B[0m "]
[3.625, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m "]
[3.828, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m "]
[4.047, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m "]
[4.25, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m "]
[4.453, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m "]
[4.672, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m "]
[4.875, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m "]
[5.094, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m "]
[5.297, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m "]
[5.516, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m "]
[5.734, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m "]
[5.953, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m "]
[6.172, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m "]
[6.375, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m "]
[6.594, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m "]
[6.797, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m "]
[7.016, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m \u001B[1;37mSalmonberry\u001B[0m "]
[7.234, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m \u001B[1;37mSalmonberry\u001B[0m \u001B[1;37mStrawberry\u001B[0m "]
[7.438, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m \u001B[1;37mSalmonberry\u001B[0m \u001B[1;37mStrawberry\u001B[0m \r\n\u001B[1;37mXimenia\u001B[0m "]
[7.641, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m \u001B[1;37mSalmonberry\u001B[0m \u001B[1;37mStrawberry\u001B[0m \r\n\u001B[1;37mXimenia\u001B[0m "]
[7.641, "o", "\r\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K\u001B[1A\u001B[2K"]
[7.641, "o", "\u001B[?25h"]
[7.656, "o", "\u001B[1;37mApple\u001B[0m \u001B[1;37mApricot\u001B[0m \u001B[1;37mAvocado\u001B[0m \u001B[1;37mBanana\u001B[0m \u001B[1;37mBlackberry\u001B[0m \u001B[1;37mBlueberry\u001B[0m \u001B[1;37mBoysenberry\u001B[0m\r\n\u001B[1;37mBreadfruit\u001B[0m \u001B[1;37mCacao\u001B[0m \u001B[1;37mCherry\u001B[0m \u001B[1;37mCloudberry\u001B[0m \u001B[1;37mCoconut\u001B[0m \u001B[1;37mDragonfruit\u001B[0m \u001B[1;37mElderberry\u001B[0m \r\n\u001B[1;37mGrape\u001B[0m \u001B[1;37mGrapefruit\u001B[0m \u001B[1;37mJackfruit\u001B[0m \u001B[1;37mKiwifruit\u001B[0m \u001B[1;37mLemon\u001B[0m \u001B[1;37mLime\u001B[0m \u001B[1;37mMango\u001B[0m \r\n\u001B[1;37mMelon\u001B[0m \u001B[1;37mOrange\u001B[0m \u001B[1;37mBlood orange\u001B[0m \u001B[1;37mClementine\u001B[0m \u001B[1;37mMandarine\u001B[0m \u001B[1;37mTangerine\u001B[0m \u001B[1;37mPapaya\u001B[0m \r\n\u001B[1;37mPassionfruit\u001B[0m \u001B[1;37mPlum\u001B[0m \u001B[1;37mPineapple\u001B[0m \u001B[1;37mPomelo\u001B[0m \u001B[1;37mRaspberry\u001B[0m \u001B[1;37mSalmonberry\u001B[0m \u001B[1;37mStrawberry\u001B[0m \r\n\u001B[1;37mXimenia\u001B[0m \u001B[1;37mYuzu\u001B[0m \r\n"]

Some files were not shown because too many files have changed in this diff Show More