Compare commits

...

7 Commits

Author SHA1 Message Date
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
173 changed files with 6156 additions and 882 deletions

View File

@@ -82,4 +82,12 @@ jobs:
shell: bash
run: |
dotnet tool restore
dotnet cake
dotnet cake
- name: Upload Verify Test Results
if: failure()
uses: actions/upload-artifact@v2
with:
name: verify-test-results
path: |
**/*.received.*

2
.gitignore vendored
View File

@@ -88,3 +88,5 @@ packages
# Windows
Thumbs.db
*.received.*

View File

@@ -31,7 +31,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Statiq.Web" Version="1.0.0-beta.11" />
<PackageReference Include="Statiq.Web" Version="1.0.0-beta.13" />
<PackageReference Include="MinVer" PrivateAssets="All" Version="2.3.1" />
</ItemGroup>

33
docs/input/figlet.md Normal file
View File

@@ -0,0 +1,33 @@
Title: Figlet
Order: 5
---
Spectre.Console can render [FIGlet](http://www.figlet.org/) text by using the `FigletText` class.
# Default font
```csharp
AnsiConsole.Render(
new FigletText("Hello")
.LeftAligned()
.Color(Color.Red));
```
```text
_ _ _ _
| | | | ___ | | | | ___
| |_| | / _ \ | | | | / _ \
| _ | | __/ | | | | | (_) |
|_| |_| \___| |_| |_| \___/
```
# Custom font
```csharp
var font = FigletFont.Load("starwars.flf");
AnsiConsole.Render(
new FigletText(font, "Hello")
.LeftAligned()
.Color(Color.Red));
```

99
docs/input/prompt.md Normal file
View File

@@ -0,0 +1,99 @@
Title: Prompt
Order: 4
---
Sometimes you want to get some input from the user, and for this
you can use the `Prompt<TResult>`.
# Confirmation
```csharp
if (!AnsiConsole.Confirm("Run example?"))
{
return;
}
```
```text
Run example? [y/n] (y): _
```
# Simple
```csharp
// Ask for the user's name
string name = AnsiConsole.Ask<string>("What's your [green]name[/]?");
// Ask for the user's age
int age = AnsiConsole.Ask<int>("What's your [green]age[/]?");
```
```text
What's your name? Patrik
What's your age? 37
```
# Choices
```csharp
var fruit = AnsiConsole.Prompt(
new TextPrompt<string>("What's your [green]favorite fruit[/]?")
.InvalidChoiceMessage("[red]That's not a valid fruit[/]")
.DefaultValue("Orange")
.AddChoice("Apple")
.AddChoice("Banana")
.AddChoice("Orange"));
```
```text
What's your favorite fruit? [Apple/Banana/Orange] (Orange): _
```
# Validation
```csharp
var age = AnsiConsole.Prompt(
new TextPrompt<int>("What's the secret number?")
.Validate(age =>
{
return age switch
{
< 99 => ValidationResult.Error("[red]Too low[/]"),
> 99 => ValidationResult.Error("[red]Too high[/]"),
_ => ValidationResult.Success(),
};
}));
```
```text
What's the secret number? 32
Too low
What's the secret number? 102
Too high
What's the secret number? _
```
# Secrets
```csharp
var password = AnsiConsole.Prompt(
new TextPrompt<string>("Enter [green]password[/]")
.PromptStyle("red")
.Secret());
```
```text
Enter password: ************_
```
# Optional
```csharp
var color = AnsiConsole.Prompt(
new TextPrompt<string>("[grey][[Optional]][/] [green]Favorite color[/]?")
.AllowEmpty());
```
```text
[Optional] Favorite color? _
```

View File

@@ -0,0 +1,15 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net5.0</TargetFramework>
<IsPackable>false</IsPackable>
<Title>Figlet</Title>
<Description>Demonstrates how to render FIGlet text.</Description>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Spectre.Console\Spectre.Console.csproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,14 @@
using Spectre.Console;
namespace EmojiExample
{
public static class Program
{
public static void Main(string[] args)
{
AnsiConsole.Render(new FigletText("Left aligned").LeftAligned().Color(Color.Red));
AnsiConsole.Render(new FigletText("Centered").Centered().Color(Color.Green));
AnsiConsole.Render(new FigletText("Right aligned").RightAligned().Color(Color.Blue));
}
}
}

View File

@@ -1,3 +1,4 @@
using System;
using Spectre.Console;
namespace InfoExample
@@ -12,6 +13,7 @@ namespace InfoExample
.AddRow("[b]Color system[/]", $"{AnsiConsole.Capabilities.ColorSystem}")
.AddRow("[b]Supports ansi?[/]", $"{YesNo(AnsiConsole.Capabilities.SupportsAnsi)}")
.AddRow("[b]Legacy console?[/]", $"{YesNo(AnsiConsole.Capabilities.LegacyConsole)}")
.AddRow("[b]Interactive?[/]", $"{YesNo(Environment.UserInteractive)}")
.AddRow("[b]Buffer width[/]", $"{AnsiConsole.Console.Width}")
.AddRow("[b]Buffer height[/]", $"{AnsiConsole.Console.Height}");

View File

@@ -0,0 +1,77 @@
using Spectre.Console;
namespace Cursor
{
public static class Program
{
public static void Main(string[] args)
{
// Confirmation
if (!AnsiConsole.Confirm("Run prompt example?"))
{
AnsiConsole.MarkupLine("Ok... :(");
return;
}
// String
AnsiConsole.WriteLine();
AnsiConsole.Render(new Rule("[yellow]Strings[/]").RuleStyle("grey").LeftAligned());
var name = AnsiConsole.Ask<string>("What's your [green]name[/]?");
// String with choices
AnsiConsole.WriteLine();
AnsiConsole.Render(new Rule("[yellow]Choices[/]").RuleStyle("grey").LeftAligned());
var fruit = AnsiConsole.Prompt(
new TextPrompt<string>("What's your [green]favorite fruit[/]?")
.InvalidChoiceMessage("[red]That's not a valid fruit[/]")
.DefaultValue("Orange")
.AddChoice("Apple")
.AddChoice("Banana")
.AddChoice("Orange"));
// Integer
AnsiConsole.WriteLine();
AnsiConsole.Render(new Rule("[yellow]Integers[/]").RuleStyle("grey").LeftAligned());
var age = AnsiConsole.Prompt(
new TextPrompt<int>("How [green]old[/] are you?")
.PromptStyle("green")
.ValidationErrorMessage("[red]That's not a valid age[/]")
.Validate(age =>
{
return age switch
{
<= 0 => ValidationResult.Error("[red]You must at least be 1 years old[/]"),
>= 123 => ValidationResult.Error("[red]You must be younger than the oldest person alive[/]"),
_ => ValidationResult.Success(),
};
}));
// Secret
AnsiConsole.WriteLine();
AnsiConsole.Render(new Rule("[yellow]Secrets[/]").RuleStyle("grey").LeftAligned());
var password = AnsiConsole.Prompt(
new TextPrompt<string>("Enter [green]password[/]?")
.PromptStyle("red")
.Secret());
// Optional
AnsiConsole.WriteLine();
AnsiConsole.Render(new Rule("[yellow]Optional[/]").RuleStyle("grey").LeftAligned());
var color = AnsiConsole.Prompt(
new TextPrompt<string>("[grey][[Optional]][/] What is your [green]favorite color[/]?")
.AllowEmpty());
// Summary
AnsiConsole.WriteLine();
AnsiConsole.Render(new Rule("[yellow]Results[/]").RuleStyle("grey").LeftAligned());
AnsiConsole.Render(new Table().AddColumns("[grey]Question[/]", "[grey]Answer[/]")
.RoundedBorder()
.BorderColor(Color.Grey)
.AddRow("[grey]Name[/]", name)
.AddRow("[grey]Favorite fruit[/]", fruit)
.AddRow("[grey]Age[/]", age.ToString())
.AddRow("[grey]Password[/]", password)
.AddRow("[grey]Favorite color[/]", string.IsNullOrEmpty(color) ? "Unknown" : color));
}
}
}

View File

@@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp3.1</TargetFramework>
<LangVersion>9</LangVersion>
<IsPackable>false</IsPackable>
<Title>Prompt</Title>
<Description>Demonstrates how to get input from a user.</Description>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Spectre.Console\Spectre.Console.csproj" />
</ItemGroup>
</Project>

View File

@@ -1,7 +1,7 @@
<Project>
<PropertyGroup Label="Settings">
<Deterministic>true</Deterministic>
<LangVersion>8.0</LangVersion>
<LangVersion>9.0</LangVersion>
<DebugSymbols>true</DebugSymbols>
<DebugType>embedded</DebugType>
<MinVerSkip Condition="'$(Configuration)' == 'Debug'">true</MinVerSkip>

View File

@@ -0,0 +1,719 @@
flf2a$ 7 6 22 15 4
starwars.flf by Ryan Youck (youck@cs.uregina.ca) Dec 25/1994
I am not responsible for use of this font
Based on Big.flf by Glenn Chappell
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@
$ $@@
__ $@
| |$@
| |$@
| |$@
|__|$@
(__)$@
$@@
_ _ @
( | )@
V V @
$ @
$ @
$ @
@@
_ _ @
_| || |_$@
|_ __ _|@
_| || |_ @
|_ __ _|@
|_||_| $@
@@
__,--,_.@
/ |@
| (----`@
\ \ $@
.----) | $@
|_ __/ $@
'--' $@@
_ ___$ @
/ \ / /$ @
( o ) / / $ @
\_/ / / _$ @
/ / / \ @
/ / ( o )@
/__/ \_/ @@
@
___ @
( _ ) $@
/ _ \/\@
| (_> <@
\___/\/@
$@@
__ @
(_ )@
|/ @
$ @
$ @
$ @
@@
___@
/ /@
| |$@
| |$@
| |$@
| |$@
\__\@@
___ @
\ \ @
| |@
| |@
| |@
| |@
/__/ @@
_ @
/\| |/\ @
\ ` ' /$@
|_ _|@
/ , . \$@
\/|_|\/ @
@@
@
_ @
_| |_$@
|_ _|@
|_| $@
$ @
@@
@
@
$ @
$ @
__ @
(_ )@
|/ @@
@
@
______ @
|______|@
$ @
$ @
@@
@
@
@
$ @
__ @
(__)@
@@
___@
/ /@
/ / @
/ /$ @
/ /$ @
/__/$ @
@@
___ $@
/ _ \ $@
| | | |$@
| | | |$@
| |_| |$@
\___/ $@
$@@
__ $@
/_ |$@
| |$@
| |$@
| |$@
|_|$@
$@@
___ $@
|__ \ $@
$) |$@
/ / $@
/ /_ $@
|____|$@
$@@
____ $@
|___ \ $@
__) |$@
|__ < $@
___) |$@
|____/ $@
$@@
_ _ $@
| || | $@
| || |_ $@
|__ _|$@
| | $@
|_| $@
$@@
_____ $@
| ____|$@
| |__ $@
|___ \ $@
___) |$@
|____/ $@
$@@
__ $@
/ / $@
/ /_ $@
| '_ \ $@
| (_) |$@
\___/ $@
$@@
______ $@
|____ |$@
$/ / $@
/ / $@
/ / $@
/_/ $@
$@@
___ $@
/ _ \ $@
| (_) |$@
> _ < $@
| (_) |$@
\___/ $@
$@@
___ $@
/ _ \ $@
| (_) |$@
\__, |$@
/ / $@
/_/ $@
$@@
@
_ @
(_)@
$ @
_ @
(_)@
@@
@
_ @
(_)@
$ @
_ @
( )@
|/ @@
___@
/ /@
/ /$@
< <$ @
\ \$@
\__\@
@@
@
______ @
|______|@
______ @
|______|@
@
@@
___ @
\ \$ @
\ \ @
> >@
/ / @
/__/$ @
@@
______ $@
| \ $@
`----) |$@
/ / $@
|__| $@
__ $@
(__) $@@
____ @
/ __ \ @
/ / _` |@
| | (_| |@
\ \__,_|@
\____/ @
@@
___ $ @
/ \ $ @
/ ^ \$ @
/ /_\ \$ @
/ _____ \$ @
/__/ \__\$@
$@@
.______ $@
| _ \ $@
| |_) |$@
| _ < $@
| |_) |$@
|______/ $@
$@@
______$@
/ |@
| ,----'@
| | $@
| `----.@
\______|@
$@@
_______ $@
| \$@
| .--. |@
| | | |@
| '--' |@
|_______/$@
$@@
_______ @
| ____|@
| |__ $@
| __| $@
| |____ @
|_______|@
@@
_______ @
| ____|@
| |__ $@
| __| $@
| | $ @
|__| @
@@
_______ @
/ _____|@
| | __ $@
| | |_ |$@
| |__| |$@
\______|$@
$@@
__ __ $@
| | | |$@
| |__| |$@
| __ |$@
| | | |$@
|__| |__|$@
$@@
__ $@
| |$@
| |$@
| |$@
| |$@
|__|$@
$@@
__ $@
| |$@
| |$@
.--. | |$@
| `--' |$@
\______/ $@
$@@
__ ___$@
| |/ /$@
| ' / $@
| < $@
| . \ $@
|__|\__\$@
$@@
__ $@
| | $@
| | $@
| | $@
| `----.@
|_______|@
$@@
.___ ___.$@
| \/ |$@
| \ / |$@
| |\/| |$@
| | | |$@
|__| |__|$@
$@@
.__ __.$@
| \ | |$@
| \| |$@
| . ` |$@
| |\ |$@
|__| \__|$@
$@@
______ $@
/ __ \ $@
| | | |$@
| | | |$@
| `--' |$@
\______/ $@
$@@
.______ $@
| _ \ $@
| |_) |$@
| ___/ $@
| | $ @
| _| $ @
$ @@
______ $ @
/ __ \ $ @
| | | | $ @
| | | | $ @
| `--' '--. @
\_____\_____\@
$ @@
.______ $ @
| _ \ $ @
| |_) | $ @
| / $ @
| |\ \----.@
| _| `._____|@
$@@
_______.@
/ |@
| (----`@
\ \ $@
.----) | $@
|_______/ $@
$@@
.___________.@
| |@
`---| |----`@
| | $ @
| | $ @
|__| $ @
$ @@
__ __ $@
| | | |$@
| | | |$@
| | | |$@
| `--' |$@
\______/ $@
$@@
____ ____$@
\ \ / /$@
\ \/ /$ @
\ /$ @
\ /$ @
\__/$ @
$ @@
____ __ ____$@
\ \ / \ / /$@
\ \/ \/ /$ @
\ /$ @
\ /\ /$ @
\__/ \__/$ @
$ @@
___ ___$@
\ \ / /$@
\ V / $@
> < $@
/ . \ $@
/__/ \__\$@
$@@
____ ____$@
\ \ / /$@
\ \/ /$ @
\_ _/$ @
| |$ @
|__|$ @
$ @@
________ $@
| / $@
`---/ / $@
/ / $@
/ /----.@
/________|@
$@@
____ @
| |@
| |-`@
| | $@
| | $@
| |-.@
|____|@@
___ @
\ \ $ @
\ \$ @
\ \$ @
\ \$@
\__\@
@@
____ @
| |@
`-| |@
| |@
| |@
.-| |@
|____|@@
___ @
/ \ @
/--^--\@
$@
$@
$@
$@@
@
@
@
$ @
$ @
______ @
|______|@@
__ @
( _)@
\| @
$ @
$ @
$ @
@@
___ $ @
/ \ $ @
/ ^ \$ @
/ /_\ \$ @
/ _____ \$ @
/__/ \__\$@
$@@
.______ $@
| _ \ $@
| |_) |$@
| _ < $@
| |_) |$@
|______/ $@
$@@
______$@
/ |@
| ,----'@
| | $@
| `----.@
\______|@
$@@
_______ $@
| \$@
| .--. |@
| | | |@
| '--' |@
|_______/$@
$@@
_______ @
| ____|@
| |__ $@
| __| $@
| |____ @
|_______|@
@@
_______ @
| ____|@
| |__ $@
| __| $@
| | $ @
|__| @
@@
_______ @
/ _____|@
| | __ $@
| | |_ |$@
| |__| |$@
\______|$@
$@@
__ __ $@
| | | |$@
| |__| |$@
| __ |$@
| | | |$@
|__| |__|$@
$@@
__ $@
| |$@
| |$@
| |$@
| |$@
|__|$@
$@@
__ $@
| |$@
| |$@
.--. | |$@
| `--' |$@
\______/ $@
$@@
__ ___$@
| |/ /$@
| ' / $@
| < $@
| . \ $@
|__|\__\$@
$@@
__ $@
| | $@
| | $@
| | $@
| `----.@
|_______|@
$@@
.___ ___.$@
| \/ |$@
| \ / |$@
| |\/| |$@
| | | |$@
|__| |__|$@
$@@
.__ __.$@
| \ | |$@
| \| |$@
| . ` |$@
| |\ |$@
|__| \__|$@
$@@
______ $@
/ __ \ $@
| | | |$@
| | | |$@
| `--' |$@
\______/ $@
$@@
.______ $@
| _ \ $@
| |_) |$@
| ___/ $@
| | $ @
| _| $ @
$ @@
______ $ @
/ __ \ $ @
| | | | $ @
| | | | $ @
| `--' '--. @
\_____\_____\@
$ @@
.______ $ @
| _ \ $ @
| |_) | $ @
| / $ @
| |\ \----.@
| _| `._____|@
$@@
_______.@
/ |@
| (----`@
\ \ $@
.----) | $@
|_______/ $@
$@@
.___________.@
| |@
`---| |----`@
| | $ @
| | $ @
|__| $ @
$ @@
__ __ $@
| | | |$@
| | | |$@
| | | |$@
| `--' |$@
\______/ $@
$@@
____ ____$@
\ \ / /$@
\ \/ /$ @
\ /$ @
\ /$ @
\__/$ @
$ @@
____ __ ____$@
\ \ / \ / /$@
\ \/ \/ /$ @
\ /$ @
\ /\ /$ @
\__/ \__/$ @
$ @@
___ ___$@
\ \ / /$@
\ V / $@
> < $@
/ . \ $@
/__/ \__\$@
$@@
____ ____$@
\ \ / /$@
\ \/ /$ @
\_ _/$ @
| |$ @
|__|$ @
$ @@
________ $@
| / $@
`---/ / $@
/ / $@
/ /----.@
/________|@
$@@
___@
/ /@
| |$@
/ /$ @
\ \$ @
| |$@
\__\@@
__ $@
| |$@
| |$@
| |$@
| |$@
| |$@
|__|$@@
___ @
\ \$ @
| | @
\ \@
/ /@
| | @
/__/$ @@
__ _ @
/ \/ |@
|_/\__/ @
$ @
$ @
$ @
@@
_ _ @
(_)_(_) @
/ \ @
/ _ \ @
/ ___ \ @
/_/ \_\@
@@
_ _ @
(_)_(_)@
/ _ \ @
| | | |@
| |_| |@
\___/ @
@@
_ _ @
(_) (_)@
| | | |@
| | | |@
| |_| |@
\___/ @
@@
_ _ @
(_) (_)@
__ _ @
/ _` |@
| (_| |@
\__,_|@
@@
_ _ @
(_) (_)@
___ @
/ _ \ @
| (_) |@
\___/ @
@@
_ _ @
(_) (_)@
_ _ @
| | | |@
| |_| |@
\__,_|@
@@
___ @
/ _ \ @
| | ) |@
| |< < @
| | ) |@
| ||_/ @
|_| @@

View File

@@ -0,0 +1,46 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
using Xunit.Sdk;
namespace Spectre.Console.Tests
{
public sealed class EmbeddedResourceDataAttribute : DataAttribute
{
private readonly string _args;
public EmbeddedResourceDataAttribute(string args)
{
_args = args ?? throw new ArgumentNullException(nameof(args));
}
public override IEnumerable<object[]> GetData(MethodInfo testMethod)
{
var result = new object[1];
result[0] = ReadManifestData(_args);
return new[] { result };
}
public static string ReadManifestData(string resourceName)
{
if (resourceName is null)
{
throw new ArgumentNullException(nameof(resourceName));
}
using (var stream = ResourceReader.LoadResourceStream(resourceName))
{
if (stream == null)
{
throw new InvalidOperationException("Could not load manifest resource stream.");
}
using (var reader = new StreamReader(stream))
{
return reader.ReadToEnd().NormalizeLineEndings();
}
}
}
}
}

View File

@@ -0,0 +1,3 @@
+-Greeting----+
| Hello World |
+-------------+

View File

@@ -0,0 +1,3 @@
╔═Greeting════╗
║ Hello World ║
╚═════════════╝

View File

@@ -0,0 +1,3 @@
┏━Greeting━━━━┓
┃ Hello World ┃
┗━━━━━━━━━━━━━┛

View File

@@ -0,0 +1,3 @@
╭─Greeting────╮
│ Hello World │
╰─────────────╯

View File

@@ -0,0 +1,3 @@
┌─Greeting────┐
│ Hello World │
└─────────────┘

View File

@@ -0,0 +1,11 @@
2020 October
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│ Sun │ Mon │ Tue │ Wed │ Thu │ Fri │ Sat │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ │ │ │ │ 1 │ 2 │ 3* │
│ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │
│ 11 │ 12* │ 13 │ 14 │ 15 │ 16 │ 17 │
│ 18 │ 19 │ 20 │ 21 │ 22 │ 23 │ 24 │
│ 25 │ 26 │ 27 │ 28 │ 29 │ 30 │ 31 │
│ │ │ │ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

View File

@@ -0,0 +1,11 @@
2020 October
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│ Sun │ Mon │ Tue │ Wed │ Thu │ Fri │ Sat │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ │ │ │ │ 1 │ 2 │ 3* │
│ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │
│ 11 │ 12* │ 13 │ 14 │ 15 │ 16 │ 17 │
│ 18 │ 19 │ 20 │ 21 │ 22 │ 23 │ 24 │
│ 25 │ 26 │ 27 │ 28 │ 29 │ 30 │ 31 │
│ │ │ │ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

View File

@@ -0,0 +1,11 @@
2020 October
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│ Sun │ Mon │ Tue │ Wed │ Thu │ Fri │ Sat │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ │ │ │ │ 1 │ 2 │ 3* │
│ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │
│ 11 │ 12* │ 13 │ 14 │ 15 │ 16 │ 17 │
│ 18 │ 19 │ 20 │ 21 │ 22 │ 23 │ 24 │
│ 25 │ 26 │ 27 │ 28 │ 29 │ 30 │ 31 │
│ │ │ │ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

View File

@@ -0,0 +1,11 @@
Oktober 2020
┌─────┬────┬────┬────┬────┬────┬────┐
│ Mo │ Di │ Mi │ Do │ Fr │ Sa │ So │
├─────┼────┼────┼────┼────┼────┼────┤
│ │ │ │ 1 │ 2 │ 3* │ 4 │
│ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │ 11 │
│ 12* │ 13 │ 14 │ 15 │ 16 │ 17 │ 18 │
│ 19 │ 20 │ 21 │ 22 │ 23 │ 24 │ 25 │
│ 26 │ 27 │ 28 │ 29 │ 30 │ 31 │ │
│ │ │ │ │ │ │ │
└─────┴────┴────┴────┴────┴────┴────┘

View File

@@ -0,0 +1,11 @@
2020 October
┌─────┬─────┬─────┬─────┬─────┬─────┬─────┐
│ Sun │ Mon │ Tue │ Wed │ Thu │ Fri │ Sat │
├─────┼─────┼─────┼─────┼─────┼─────┼─────┤
│ │ │ │ │ 1 │ 2 │ 3* │
│ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 10 │
│ 11 │ 12* │ 13 │ 14 │ 15 │ 16 │ 17 │
│ 18 │ 19 │ 20 │ 21 │ 22 │ 23 │ 24 │
│ 25 │ 26 │ 27 │ 28 │ 29 │ 30 │ 31 │
│ │ │ │ │ │ │ │
└─────┴─────┴─────┴─────┴─────┴─────┴─────┘

View File

@@ -0,0 +1,4 @@
╭────────────────────╮ ╭────────────────╮ ╭─────────────────╮
│ Savannah Thompson │ │ Sophie Ramos │ │ Katrin Goldberg │
│ Australia │ │ United States │ │ Germany │
╰────────────────────╯ ╰────────────────╯ ╰─────────────────╯

View File

@@ -0,0 +1,4 @@
System.InvalidOperationException: Throwing!
at Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(Nullable`1 number) in /xyz/Exceptions.cs:nn
at Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exception>b__0_0() in /xyz/ExceptionTests.cs:nn
at Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn

View File

@@ -0,0 +1,7 @@
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

View File

@@ -0,0 +1,4 @@
System.InvalidOperationException: Throwing!
at MethodThatThrows(Nullable`1 number) in /xyz/Exceptions.cs:nn
at <Should_Write_Exception_With_Shortened_Methods>b__2_0() in /xyz/ExceptionTests.cs:nn
at GetException(Action action) in /xyz/ExceptionTests.cs:nn

View File

@@ -0,0 +1,4 @@
InvalidOperationException: Throwing!
at Spectre.Console.Tests.Data.TestExceptions.MethodThatThrows(Nullable`1 number) in /xyz/Exceptions.cs:nn
at Spectre.Console.Tests.Unit.ExceptionTests.<>c.<Should_Write_Exception_With_Shortened_Types>b__1_0() in /xyz/ExceptionTests.cs:nn
at Spectre.Console.Tests.Unit.ExceptionTests.GetException(Action action) in /xyz/ExceptionTests.cs:nn

View File

@@ -0,0 +1,7 @@
.______ ___ .___________..______ __ __ ___ ____ __ ____ ___ _______. __ __ _______ .______ _______
| _ \ / \ | || _ \ | | | |/ / \ \ / \ / / / \ / | | | | | | ____|| _ \ | ____|
| |_) | / ^ \ `---| |----`| |_) | | | | ' / \ \/ \/ / / ^ \ | (----` | |__| | | |__ | |_) | | |__
| ___/ / /_\ \ | | | / | | | < \ / / /_\ \ \ \ | __ | | __| | / | __|
| | / _____ \ | | | |\ \----.| | | . \ \ /\ / / _____ \ .----) | | | | | | |____ | |\ \----.| |____
| _| /__/ \__\ |__| | _| `._____||__| |__|\__\ \__/ \__/ /__/ \__\ |_______/ |__| |__| |_______|| _| `._____||_______|

View File

@@ -0,0 +1,6 @@
____ _ ____ _
/ ___| _ __ ___ ___ | |_ _ __ ___ / ___| ___ _ __ ___ ___ | | ___
\___ \ | '_ \ / _ \ / __| | __| | '__| / _ \ | | / _ \ | '_ \ / __| / _ \ | | / _ \
___) | | |_) | | __/ | (__ | |_ | | | __/ _ | |___ | (_) | | | | | \__ \ | (_) | | | | __/
|____/ | .__/ \___| \___| \__| |_| \___| (_) \____| \___/ |_| |_| |___/ \___/ |_| \___|
|_|

View File

@@ -0,0 +1,6 @@
____ _ ____ _
/ ___| _ __ ___ ___ | |_ _ __ ___ / ___| ___ _ __ ___ ___ | | ___
\___ \ | '_ \ / _ \ / __| | __| | '__| / _ \ | | / _ \ | '_ \ / __| / _ \ | | / _ \
___) | | |_) | | __/ | (__ | |_ | | | __/ _ | |___ | (_) | | | | | \__ \ | (_) | | | | __/
|____/ | .__/ \___| \___| \__| |_| \___| (_) \____| \___/ |_| |_| |___/ \___/ |_| \___|
|_|

View File

@@ -0,0 +1,6 @@
____ _ ____ _
/ ___| _ __ ___ ___ | |_ _ __ ___ / ___| ___ _ __ ___ ___ | | ___
\___ \ | '_ \ / _ \ / __| | __| | '__| / _ \ | | / _ \ | '_ \ / __| / _ \ | | / _ \
___) | | |_) | | __/ | (__ | |_ | | | __/ _ | |___ | (_) | | | | | \__ \ | (_) | | | | __/
|____/ | .__/ \___| \___| \__| |_| \___| (_) \____| \___/ |_| |_| |___/ \___/ |_| \___|
|_|

View File

@@ -0,0 +1,12 @@
____ _ _ _
| _ \ __ _ | |_ _ __ (_) | | __ __ __ __ _ ___
| |_) | / _` | | __| | '__| | | | |/ / \ \ /\ / / / _` | / __|
| __/ | (_| | | |_ | | | | | < \ V V / | (_| | \__ \
|_| \__,_| \__| |_| |_| |_|\_\ \_/\_/ \__,_| |___/
_
| |__ ___ _ __ ___
| '_ \ / _ \ | '__| / _ \
| | | | | __/ | | | __/
|_| |_| \___| |_| \___|

View File

@@ -0,0 +1,12 @@
____ _ ____
/ ___| _ __ ___ ___ | |_ _ __ ___ / ___| ___
\___ \ | '_ \ / _ \ / __| | __| | '__| / _ \ | | / _ \
___) | | |_) | | __/ | (__ | |_ | | | __/ _ | |___ | (_) |
|____/ | .__/ \___| \___| \__| |_| \___| (_) \____| \___/
|_|
_
_ __ ___ ___ | | ___
| '_ \ / __| / _ \ | | / _ \
| | | | \__ \ | (_) | | | | __/
|_| |_| |___/ \___/ |_| \___|

View File

@@ -0,0 +1,3 @@
Foo Bar Baz
Qux Corgi Waldo
GraultGarplyFred

View File

@@ -0,0 +1,4 @@
Options
-h, --help Show command line help.
-c, --configuration The configuration to run for.
The default for most projects is Debug.

View File

@@ -0,0 +1,3 @@
Foo Bar Baz
Qux Corgi Waldo
Grault Garply Fred

View File

@@ -0,0 +1,2 @@
Qux Corgi Waldo
Grault Garply Fred

View File

@@ -0,0 +1,3 @@
Foo Bar Baz
Qux Corgi Waldo
Grault Garply Fred

View File

@@ -0,0 +1,12 @@
┌───────┬───────┐
│ Foo │ Bar │
├───────┼───────┤
│ Baz │ Qux │
│ Corgi │ Waldo │
└───────┴───────┘

View File

@@ -0,0 +1,12 @@
┌───────┬───────┐
│ Foo │ Bar │
├───────┼───────┤
│ Baz │ Qux │
│ Corgi │ Waldo │
└───────┴───────┘

View File

@@ -0,0 +1,16 @@
┌───────┬─────────────┐
│ Foo │Bar │
├───────┼─────────────┤
│ Baz │Qux │
│ Corgi │ │
│ │ ┌───────┐ │
│ │ │ Waldo │ │
│ │ └───────┘ │
│ │ │
└───────┴─────────────┘

View File

@@ -0,0 +1,3 @@
┌───────────────────────┐
│ Hello World │
└───────────────────────┘

View File

@@ -0,0 +1,4 @@
┌─Greet…─┐
│ Hello │
│ World │
└────────┘

View File

@@ -0,0 +1,3 @@
┌──────────────────────────────────────────────────────────────────────────────┐
│ Hello World │
└──────────────────────────────────────────────────────────────────────────────┘

View File

@@ -0,0 +1,3 @@
┌───────────────────────┐
│ Hello World │
└───────────────────────┘

View File

@@ -0,0 +1,7 @@
┌───────────────────────┐
│ I heard you like 📦 │
│ │
│ │
│ │
│ So I put a 📦 in a 📦 │
└───────────────────────┘

View File

@@ -0,0 +1,3 @@
┌─────────────┐
│ Hello World │
└─────────────┘

View File

@@ -0,0 +1,5 @@
┌─────────────────┐
│ ┌─────────────┐ │
│ │ Hello World │ │
│ └─────────────┘ │
└─────────────────┘

View File

@@ -0,0 +1,3 @@
┌───────────────────────────────────Greeting───────────────────────────────────┐
│ Hello World │
└──────────────────────────────────────────────────────────────────────────────┘

View File

@@ -0,0 +1,3 @@
┌─Greeting─────────────────────────────────────────────────────────────────────┐
│ Hello World │
└──────────────────────────────────────────────────────────────────────────────┘

View File

@@ -0,0 +1,3 @@
┌─Greeting─────────────────────────────────────────────────────────────────────┐
│ Hello World │
└──────────────────────────────────────────────────────────────────────────────┘

View File

@@ -0,0 +1,4 @@
┌─────────────┐
│ Hello World │
│ Foo Bar │
└─────────────┘

View File

@@ -0,0 +1,6 @@
┌───────────────────┐
│ │
│ Hello World │
│ │
│ │
└───────────────────┘

View File

@@ -0,0 +1,3 @@
┌───────────┐
│Hello World│
└───────────┘

View File

@@ -0,0 +1,3 @@
┌─────────────────────────────────────────────────────────────────────Greeting─┐
│ Hello World │
└──────────────────────────────────────────────────────────────────────────────┘

View File

@@ -0,0 +1,5 @@
┌────┐
│ │
│ 💩 │
│ │
└────┘

View File

@@ -0,0 +1,4 @@
╭─Short paths──────────────────────────────────────────────────────────────────────╮
│ at System.Runtime.CompilerServices.TaskAwaiter. │
│ HandleNonSuccessAndDebuggerNotification(Task task) │
╰──────────────────────────────────────────────────────────────────────────────────╯

View File

@@ -0,0 +1 @@
Favorite fruit? [Banana/Orange] (Banana): Orange

View File

@@ -0,0 +1 @@
Favorite fruit? [Banana/Orange] (Banana): Banana

View File

@@ -0,0 +1,3 @@
Favorite fruit? [Banana/Orange] (Banana): Apple
Please select one of the available options
Favorite fruit? [Banana/Orange] (Banana): Banana

View File

@@ -0,0 +1,7 @@
Guess number: 22
Too low
Guess number: 102
Too high
Guess number: ABC
Invalid input
Guess number: 99

View File

@@ -0,0 +1,5 @@
[
Age? ninety-nine,
Invalid input,
Age? 99
]

View File

@@ -0,0 +1,10 @@
<pre style="font-size:90%;font-family:consolas,'Courier New',monospace">
<span>┌─────────────────┬───────┬─────┐</span>
<span>│ </span><span style="color: #FF0000;background-color: #000000">Foo</span><span> │ </span><span style="color: #008000;font-weight: bold;font-style: italic">Bar</span><span> │ </span><span style="color: #0000FF">Qux</span><span> │</span>
<span>├─────────────────┼───────┼─────┤</span>
<span>│ </span><span style="text-decoration: underline">Corgi</span><span> │ </span><span style="font-weight: bold;font-style: italic;text-decoration: line-through">Waldo</span><span> │ </span><span style="color: #7F7F7F">Zap</span><span> │</span>
<span>│ </span><span style="color: #FF0000">╭─────────────╮</span><span> │ │ │</span>
<span>│ </span><span style="color: #FF0000">│</span><span> </span><span style="color: #0000FF">Hello World</span><span> </span><span style="color: #FF0000">│</span><span> │ │ │</span>
<span>│ </span><span style="color: #FF0000">╰─────────────╯</span><span> │ │ │</span>
<span>└─────────────────┴───────┴─────┘</span>
</pre>

View File

@@ -0,0 +1,8 @@
┌─────────────────┬───────┬─────┐
│ Foo │ Bar │ Qux │
├─────────────────┼───────┼─────┤
│ Corgi │ Waldo │ Zap │
│ ╭─────────────╮ │ │ │
│ │ Hello World │ │ │ │
│ ╰─────────────╯ │ │ │
└─────────────────┴───────┴─────┘

View File

@@ -0,0 +1,7 @@
Hello
┌─────┬─────┐
│ Foo │ Bar │
├─────┼─────┤
│ Baz │ Qux │
└─────┴─────┘
World

View File

@@ -0,0 +1,7 @@
┌─────────────┬─────┐
│ Foo │ Bar │
├─────────────┼─────┤
│ HELLO WORLD │ │
│ Hello │ Qux │
│ World │ │
└─────────────┴─────┘

View File

@@ -0,0 +1,7 @@
┌────────────────────────────────────────────────────┬─────┐
│ Foo │ Bar │
├────────────────────────────────────────────────────┼─────┤
│ HELLO WORLD │ │
│ Hello │ Qux │
│ World │ │
└────────────────────────────────────────────────────┴─────┘

View File

@@ -0,0 +1 @@
──────────── Hello World ! ─────────────

View File

@@ -0,0 +1 @@
════════════════════════════════════════

View File

@@ -0,0 +1 @@
───────────── Hello World ──────────────

View File

@@ -0,0 +1 @@
── Hello World ─────────────────────────

View File

@@ -0,0 +1 @@
───────────────────────── Hello World ──

View File

@@ -0,0 +1 @@
────────────────────────────────────────

View File

@@ -0,0 +1 @@
═════════════ Hello World ══════════════

View File

@@ -0,0 +1 @@
───────────── Hello World ──────────────

View File

@@ -0,0 +1,43 @@
[
[
{
Text: Foo,
Style: {
Foreground: {},
Background: {}
}
},
{
Text: Bar,
Style: {
Foreground: {},
Background: {}
}
}
],
[
{
Text: Baz,
Style: {
Foreground: {},
Background: {}
}
},
{
Text: Qux,
Style: {
Foreground: {},
Background: {}
}
}
],
[
{
Text: Corgi,
Style: {
Foreground: {},
Background: {}
}
}
]
]

View File

@@ -0,0 +1,45 @@
[
[
{
Text: Foo,
Style: {
Foreground: {},
Background: {}
}
}
],
[
{
Text: Bar,
Style: {
Foreground: {},
Background: {}
}
}
],
[
{
Text: Baz,
Style: {
Foreground: {},
Background: {}
}
},
{
Text: Qux,
Style: {
Foreground: {},
Background: {}
}
}
],
[
{
Text: Corgi,
Style: {
Foreground: {},
Background: {}
}
}
]
]

View File

@@ -0,0 +1,26 @@
{
Item1: {
Text: Foo,
Style: {
Foreground: {
R: 255
},
Background: {
G: 128
},
Decoration: Bold
}
},
Item2: {
Text: Bar,
Style: {
Foreground: {
R: 255
},
Background: {
G: 128
},
Decoration: Bold
}
}
}

View File

@@ -0,0 +1,8 @@
+----------+----------+
| Header 1 | Header 2 |
|----------+----------|
| Cell | Cell |
| Cell | Cell |
|----------+----------|
| Footer 1 | Footer 2 |
+----------+----------+

View File

@@ -0,0 +1,8 @@
+---------------------+
| Header 1 | Header 2 |
|----------+----------|
| Cell | Cell |
| Cell | Cell |
|----------+----------|
| Footer 1 | Footer 2 |
+---------------------+

View File

@@ -0,0 +1,8 @@
+----------+----------+
| Header 1 | Header 2 |
|==========+==========|
| Cell | Cell |
| Cell | Cell |
+----------+----------+
| Footer 1 | Footer 2 |
+----------+----------+

View File

@@ -0,0 +1,8 @@
╔══════════╦══════════╗
║ Header 1 ║ Header 2 ║
╠══════════╬══════════╣
║ Cell ║ Cell ║
║ Cell ║ Cell ║
╠══════════╬══════════╣
║ Footer 1 ║ Footer 2 ║
╚══════════╩══════════╝

View File

@@ -0,0 +1,8 @@
╔══════════╤══════════╗
║ Header 1 │ Header 2 ║
╟──────────┼──────────╢
║ Cell │ Cell ║
║ Cell │ Cell ║
╟──────────┼──────────╢
║ Footer 1 │ Footer 2 ║
╚══════════╧══════════╝

View File

@@ -0,0 +1,8 @@
┏━━━━━━━━━━┳━━━━━━━━━━┓
┃ Header 1 ┃ Header 2 ┃
┣━━━━━━━━━━╋━━━━━━━━━━┫
┃ Cell ┃ Cell ┃
┃ Cell ┃ Cell ┃
┣━━━━━━━━━━╋━━━━━━━━━━┫
┃ Footer 1 ┃ Footer 2 ┃
┗━━━━━━━━━━┻━━━━━━━━━━┛

View File

@@ -0,0 +1,8 @@
┏━━━━━━━━━━┯━━━━━━━━━━┓
┃ Header 1 │ Header 2 ┃
┠──────────┼──────────┨
┃ Cell │ Cell ┃
┃ Cell │ Cell ┃
┠──────────┼──────────┨
┃ Footer 1 │ Footer 2 ┃
┗━━━━━━━━━━┷━━━━━━━━━━┛

View File

@@ -0,0 +1,8 @@
┏━━━━━━━━━━┳━━━━━━━━━━┓
┃ Header 1 ┃ Header 2 ┃
┡━━━━━━━━━━╇━━━━━━━━━━┩
│ Cell │ Cell │
│ Cell │ Cell │
├──────────┼──────────┤
│ Footer 1 │ Footer 2 │
└──────────┴──────────┘

View File

@@ -0,0 +1,8 @@
───────────────────────
Header 1 Header 2
───────────────────────
Cell Cell
Cell Cell
───────────────────────
Footer 1 Footer 2
───────────────────────

View File

@@ -0,0 +1,7 @@
| Header 1 | Header 2 |
| -------- | -------- |
| Cell | Cell |
| Cell | Cell |
| Footer 1 | Footer 2 |

View File

@@ -0,0 +1,7 @@
| Header 1 | Header 2 |
| -------- | :------: |
| Cell | Cell |
| Cell | Cell |
| Footer 1 | Footer 2 |

View File

@@ -0,0 +1,7 @@
| Header 1 | Header 2 |
| -------- | :------- |
| Cell | Cell |
| Cell | Cell |
| Footer 1 | Footer 2 |

View File

@@ -0,0 +1,7 @@
| Header 1 | Header 2 |
| -------- | -------: |
| Cell | Cell |
| Cell | Cell |
| Footer 1 | Footer 2 |

View File

@@ -0,0 +1,8 @@
Header 1 │ Header 2
──────────┼──────────
Cell │ Cell
Cell │ Cell
──────────┼──────────
Footer 1 │ Footer 2

View File

@@ -0,0 +1,8 @@
Header 1 │ Header 2
══════════╪══════════
Cell │ Cell
Cell │ Cell
══════════╪══════════
Footer 1 │ Footer 2

View File

@@ -0,0 +1,8 @@
Header 1 │ Header 2
━━━━━━━━━━┿━━━━━━━━━━
Cell │ Cell
Cell │ Cell
━━━━━━━━━━┿━━━━━━━━━━
Footer 1 │ Footer 2

View File

@@ -0,0 +1,4 @@
Header 1 Header 2
Cell Cell
Cell Cell
Footer 1 Footer 2

View File

@@ -0,0 +1,8 @@
╭──────────┬──────────╮
│ Header 1 │ Header 2 │
├──────────┼──────────┤
│ Cell │ Cell │
│ Cell │ Cell │
├──────────┼──────────┤
│ Footer 1 │ Footer 2 │
╰──────────┴──────────╯

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