mirror of
https://github.com/spectreconsole/spectre.console.git
synced 2025-10-25 15:19:23 +00:00
Compare commits
51 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
eba2a8cc76 | ||
|
|
bc6ba26840 | ||
|
|
54be64ec84 | ||
|
|
3e6e0990c5 | ||
|
|
4a8a4ab048 | ||
|
|
b793482ebb | ||
|
|
f895bb175d | ||
|
|
4258cbfb85 | ||
|
|
83982347f6 | ||
|
|
879dd9fbb1 | ||
|
|
c1e9c1a99f | ||
|
|
a9b97fa4dc | ||
|
|
55c3f3b7a8 | ||
|
|
02ff3fc910 | ||
|
|
c3ec6a7363 | ||
|
|
9ce3b99cd6 | ||
|
|
a70cc90797 | ||
|
|
7dce4af552 | ||
|
|
02f9d26473 | ||
|
|
995ef10b8b | ||
|
|
4ea64ccb9c | ||
|
|
a755cc5d9c | ||
|
|
2a493cfee9 | ||
|
|
9df6ed213c | ||
|
|
6a4d8c8f30 | ||
|
|
5f1121e8e1 | ||
|
|
d7babcc6e4 | ||
|
|
f085da76c1 | ||
|
|
8fa53f8fb1 | ||
|
|
f6a7c96413 | ||
|
|
a91a3c12ad | ||
|
|
82de4a55c4 | ||
|
|
db095217b7 | ||
|
|
7b23456d3e | ||
|
|
cbfcc37a46 | ||
|
|
999c59909b | ||
|
|
fd8d271a10 | ||
|
|
8b5836f4e4 | ||
|
|
5581ad2f05 | ||
|
|
d339442df8 | ||
|
|
422012c994 | ||
|
|
4f0ec87522 | ||
|
|
eb02c3d534 | ||
|
|
088db165ed | ||
|
|
1082ac1efc | ||
|
|
a60910c15f | ||
|
|
73ab977f26 | ||
|
|
79913ab238 | ||
|
|
9a7ac7b5b2 | ||
|
|
9cbfda9e4a | ||
|
|
bb013dcc52 |
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -2,7 +2,7 @@
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: bug
|
||||
labels: ["bug", "needs triage"]
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
2
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -2,7 +2,7 @@
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: enhancement
|
||||
labels: ["feature", "needs triage"]
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
18
.github/workflows/backlog.yaml
vendored
Normal file
18
.github/workflows/backlog.yaml
vendored
Normal 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 }}
|
||||
12
.github/workflows/ci.yaml
vendored
12
.github/workflows/ci.yaml
vendored
@@ -1,5 +1,5 @@
|
||||
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
||||
name: Continuous Integration
|
||||
name: Pull Request
|
||||
on: pull_request
|
||||
|
||||
env:
|
||||
@@ -20,7 +20,7 @@ jobs:
|
||||
uses: actions/checkout@master
|
||||
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v2
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
@@ -75,13 +75,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v2
|
||||
|
||||
- name: Integration Tests
|
||||
shell: bash
|
||||
run: |
|
||||
dotnet tool restore
|
||||
dotnet example --all --skip live --skip livetable --skip prompt --skip screens
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
|
||||
6
.github/workflows/publish.yaml
vendored
6
.github/workflows/publish.yaml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v2
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
- name: Build
|
||||
shell: bash
|
||||
@@ -65,7 +65,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v2
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
@@ -106,7 +106,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup .NET SDK
|
||||
uses: actions/setup-dotnet@v2
|
||||
uses: actions/setup-dotnet@v3
|
||||
|
||||
- name: Publish
|
||||
shell: bash
|
||||
|
||||
@@ -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
|
||||
@@ -4,7 +4,7 @@ _[ برای پایتون، بسیار الهام گرفته شده است.
|
||||
|
||||
## فهرست
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
_[](https://www.nuget.org/packages/spectre.console)_
|
||||
|
||||
綺麗なコンソールアプリケーションを簡単に作成するための.NET Standard 2.0ライブラリです。
|
||||
綺麗なコンソールアプリケーションを簡単に作成するための.NETライブラリです。
|
||||
Python用の素晴らしい[Rich ライブラリ](https://github.com/willmcgugan/rich)に強く影響を受けています。
|
||||
|
||||
## 目次
|
||||
|
||||
34
README.md
34
README.md
@@ -1,19 +1,21 @@
|
||||
# `Spectre.Console`
|
||||
|
||||
_[](https://www.nuget.org/packages/spectre.console)_ [](https://app.netlify.com/sites/spectreconsole/deploys)
|
||||
_[](https://www.nuget.org/packages/spectre.console)_ _[](https://www.nuget.org/packages/spectre.console.cli)_ [](https://app.netlify.com/sites/spectreconsole/deploys)
|
||||
|
||||
A .NET 5/.NET Standard 2.0 library that makes it easier to create beautiful, cross platform, console applications.
|
||||
A .NET library that makes it easier to create beautiful, cross platform, console applications.
|
||||
It is heavily inspired by the excellent [Rich library](https://github.com/willmcgugan/rich)
|
||||
for Python.
|
||||
for Python. For detailed usage instructions, [please refer to the documentation at https://spectreconsole.net/.](https://spectreconsole.net/)
|
||||
|
||||
## Table of Contents
|
||||
|
||||
1. [Features](#features)
|
||||
2. [Installing](#installing)
|
||||
3. [Documentation](#documentation)
|
||||
4. [Examples](#examples)
|
||||
5. [Sponsors](#sponsors)
|
||||
5. [License](#license)
|
||||
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
|
||||
|
||||
@@ -72,21 +74,31 @@ 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 Gunanrsson](https://github.com/kimgunnarsson)
|
||||
* [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)
|
||||
|
||||
I really appreciate it.
|
||||
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
|
||||
|
||||
Spectre.Console is provided as-is under the MIT license. For more information see LICENSE.
|
||||
|
||||
* For SixLabors.ImageSharp, see https://github.com/SixLabors/ImageSharp/blob/master/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
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
_[](https://www.nuget.org/packages/spectre.console)_
|
||||
|
||||
Uma biblioteca .NET 5/.NET Standard 2.0 que torna mais fácil criar aplicativos de console bonitos e multiplataforma.
|
||||
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.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
_[](https://www.nuget.org/packages/spectre.console)_
|
||||
|
||||
`Spectre.Console`是一个 .NET 5/.NET Standard 2.0 的库,可以更轻松地创建美观的跨平台控制台应用程序。
|
||||
`Spectre.Console`是一个 .NET 的库,可以更轻松地创建美观的跨平台控制台应用程序。
|
||||
|
||||
深受 [Rich](https://github.com/willmcgugan/rich) 这个Python优秀库的启发。
|
||||
|
||||
|
||||
10
build.cake
10
build.cake
@@ -17,7 +17,7 @@ Task("Build")
|
||||
DotNetBuild("./src/Spectre.Console.sln", new DotNetBuildSettings {
|
||||
Configuration = configuration,
|
||||
NoIncremental = context.HasArgument("rebuild"),
|
||||
MSBuildSettings = new DotNetCoreMSBuildSettings()
|
||||
MSBuildSettings = new DotNetMSBuildSettings()
|
||||
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
||||
});
|
||||
});
|
||||
@@ -29,7 +29,7 @@ Task("Build-Analyzer")
|
||||
DotNetBuild("./src/Spectre.Console.Analyzer.sln", new DotNetBuildSettings {
|
||||
Configuration = configuration,
|
||||
NoIncremental = context.HasArgument("rebuild"),
|
||||
MSBuildSettings = new DotNetCoreMSBuildSettings()
|
||||
MSBuildSettings = new DotNetMSBuildSettings()
|
||||
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
||||
});
|
||||
});
|
||||
@@ -41,7 +41,7 @@ Task("Build-Examples")
|
||||
DotNetBuild("./examples/Examples.sln", new DotNetBuildSettings {
|
||||
Configuration = configuration,
|
||||
NoIncremental = context.HasArgument("rebuild"),
|
||||
MSBuildSettings = new DotNetCoreMSBuildSettings()
|
||||
MSBuildSettings = new DotNetMSBuildSettings()
|
||||
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
||||
});
|
||||
});
|
||||
@@ -80,7 +80,7 @@ Task("Package")
|
||||
NoRestore = true,
|
||||
NoBuild = true,
|
||||
OutputDirectory = "./.artifacts",
|
||||
MSBuildSettings = new DotNetCoreMSBuildSettings()
|
||||
MSBuildSettings = new DotNetMSBuildSettings()
|
||||
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
||||
});
|
||||
|
||||
@@ -89,7 +89,7 @@ Task("Package")
|
||||
NoRestore = true,
|
||||
NoBuild = true,
|
||||
OutputDirectory = "./.artifacts",
|
||||
MSBuildSettings = new DotNetCoreMSBuildSettings()
|
||||
MSBuildSettings = new DotNetMSBuildSettings()
|
||||
.TreatAllWarningsAs(MSBuildTreatAllWarningsAs.Error)
|
||||
});
|
||||
});
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<RunWorkingDirectory>$(MSBuildProjectDirectory)</RunWorkingDirectory>
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);output\**;.gitignore</DefaultItemExcludes>
|
||||
<NoWarn>MVC1000</NoWarn>
|
||||
|
||||
0
docs/Preview.ps1
Normal file → Executable file
0
docs/Preview.ps1
Normal file → Executable file
@@ -23,7 +23,8 @@ namespace Docs
|
||||
{
|
||||
"../../src/Spectre.Console/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
|
||||
"../../src/Spectre.Console.Cli/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
|
||||
"../../src/Spectre.Console.ImageSharp/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs"
|
||||
"../../src/Spectre.Console.ImageSharp/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs",
|
||||
"../../src/Spectre.Console.Json/**/{!bin,!obj,!packages,!*.Tests,}/**/*.cs"
|
||||
})
|
||||
.AddSetting(Constants.ExampleSourceFiles, new List<string>
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
# 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) 5.0.202 or higher (as defined in the repository root `global.json` file).
|
||||
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
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"sdk": {
|
||||
"version": "6.0.300",
|
||||
"version": "7.0.100",
|
||||
"rollForward": "latestFeature"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
@{
|
||||
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 Standard 2.0 library that makes it easier to create beautiful console applications";
|
||||
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)}/";
|
||||
}
|
||||
@@ -254,6 +254,7 @@ c-9 -4 -271 61 -315 78 -29 11 -28 12 79 55 59 24 111 46 114 49 3 3 33 -36
|
||||
<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>
|
||||
|
||||
@@ -5,6 +5,7 @@ Highlights:
|
||||
- Bold, Italic, Underline, strikethrough
|
||||
- Dim, Invert
|
||||
- Conceal, slowblink, rapidblink
|
||||
- Links
|
||||
---
|
||||
|
||||
Note that what styles that can be used is defined by the system or your terminal software, and may not appear as they should.
|
||||
@@ -46,4 +47,8 @@ Note that what styles that can be used is defined by the system or your terminal
|
||||
<td><code>strikethrough</code></td>
|
||||
<td>Shows text with a horizontal line through the center</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><code>link</link></td>
|
||||
<td>Creates a clickable link within text</td>
|
||||
</tr>
|
||||
</table>
|
||||
3
docs/input/assets/casts/breakdown-chart-plain.cast
Normal file
3
docs/input/assets/casts/breakdown-chart-plain.cast
Normal file
@@ -0,0 +1,3 @@
|
||||
{"version": 2, "width": 122, "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"]
|
||||
|
||||
3
docs/input/assets/casts/breakdown-chart-rich.cast
Normal file
3
docs/input/assets/casts/breakdown-chart-rich.cast
Normal file
@@ -0,0 +1,3 @@
|
||||
{"version": 2, "width": 122, "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"]
|
||||
|
||||
2
docs/input/assets/casts/grid-rich.cast
Normal file
2
docs/input/assets/casts/grid-rich.cast
Normal file
@@ -0,0 +1,2 @@
|
||||
{"version": 2, "width": 40, "height": 3, "timestamp": 1667342769, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
|
||||
[0.0, "o", "\u001b[38;5;9;48;5;0mHeader 1\u001b[0m \u001b[38;5;2;48;5;0mHeader 2\u001b[0m \u001b[38;5;12;48;5;0mHeader 3\u001b[0m\r\nRow 1 Row 2 Row 3\r\n"]
|
||||
3
docs/input/assets/casts/json-plain.cast
Normal file
3
docs/input/assets/casts/json-plain.cast
Normal file
@@ -0,0 +1,3 @@
|
||||
{"version": 2, "width": 62, "height": 20, "title": "json (plain)", "env": {"TERM": "Spectre.Console"}}
|
||||
[0, "o", "\u001B[37m\u250C\u2500Some JSON in a panel\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[37m{\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[34m\u0022hello\u0022\u001B[0m\u001B[37m:\u001B[0m \u001B[32m32\u001B[0m\u001B[37m,\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[34m\u0022world\u0022\u001B[0m\u001B[37m:\u001B[0m \u001B[37m{\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[34m\u0022foo\u0022\u001B[0m\u001B[37m:\u001B[0m \u001B[32m21\u001B[0m\u001B[37m,\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[34m\u0022bar\u0022\u001B[0m\u001B[37m:\u001B[0m \u001B[32m255\u001B[0m\u001B[37m,\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[34m\u0022baz\u0022\u001B[0m\u001B[37m:\u001B[0m \u001B[37m[\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[32m0.32\u001B[0m\u001B[37m,\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[32m0.33e-32\u001B[0m\u001B[37m,\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[32m0.42e32\u001B[0m\u001B[37m,\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[32m0.55e\u002B32\u001B[0m\u001B[37m,\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[37m{\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[34m\u0022hello\u0022\u001B[0m\u001B[37m:\u001B[0m \u001B[31m\u0022world\u0022\u001B[0m\u001B[37m,\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[34m\u0022lol\u0022\u001B[0m\u001B[37m:\u001B[0m \u001B[37mnull\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[37m}\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[37m]\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[37m}\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2502\u001B[0m \u001B[37m}\u001B[0m \u001B[37m\u2502\u001B[0m\r\n\u001B[37m\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\u001B[0m\r\n"]
|
||||
|
||||
3
docs/input/assets/casts/json-rich.cast
Normal file
3
docs/input/assets/casts/json-rich.cast
Normal file
@@ -0,0 +1,3 @@
|
||||
{"version": 2, "width": 62, "height": 20, "title": "json (rich)", "env": {"TERM": "Spectre.Console"}}
|
||||
[0, "o", "\u001B[38;5;11m\u256D\u2500Some JSON in a panel\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;8m{\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;12m\u0022hello\u0022\u001B[0m\u001B[38;5;11m:\u001B[0m \u001B[38;5;2m32\u001B[0m\u001B[38;5;8m,\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;12m\u0022world\u0022\u001B[0m\u001B[38;5;11m:\u001B[0m \u001B[38;5;8m{\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;12m\u0022foo\u0022\u001B[0m\u001B[38;5;11m:\u001B[0m \u001B[38;5;2m21\u001B[0m\u001B[38;5;8m,\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;12m\u0022bar\u0022\u001B[0m\u001B[38;5;11m:\u001B[0m \u001B[38;5;2m255\u001B[0m\u001B[38;5;8m,\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;12m\u0022baz\u0022\u001B[0m\u001B[38;5;11m:\u001B[0m \u001B[38;5;8m[\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;2m0.32\u001B[0m\u001B[38;5;8m,\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;2m0.33e-32\u001B[0m\u001B[38;5;8m,\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;2m0.42e32\u001B[0m\u001B[38;5;8m,\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;2m0.55e\u002B32\u001B[0m\u001B[38;5;8m,\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;8m{\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;12m\u0022hello\u0022\u001B[0m\u001B[38;5;11m:\u001B[0m \u001B[38;5;9m\u0022world\u0022\u001B[0m\u001B[38;5;8m,\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;12m\u0022lol\u0022\u001B[0m\u001B[38;5;11m:\u001B[0m \u001B[38;5;8mnull\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;8m}\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;8m]\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;8m}\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2502\u001B[0m \u001B[38;5;8m}\u001B[0m \u001B[38;5;11m\u2502\u001B[0m\r\n\u001B[38;5;11m\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F\u001B[0m\r\n"]
|
||||
|
||||
3
docs/input/assets/casts/layout-plain.cast
Normal file
3
docs/input/assets/casts/layout-plain.cast
Normal file
@@ -0,0 +1,3 @@
|
||||
{"version": 2, "width": 82, "height": 24, "title": "layout (plain)", "env": {"TERM": "Spectre.Console"}}
|
||||
[0, "o", "\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\u250C\u2500Top (40 x 12)\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 Placeholder \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 Hello \u001B[34mWorld!\u001B[0m \u2502\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\r\n\u2502 \u2502\u250C\u2500Bottom (40 x 12)\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 Placeholder \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518"]
|
||||
|
||||
3
docs/input/assets/casts/layout-rich.cast
Normal file
3
docs/input/assets/casts/layout-rich.cast
Normal file
@@ -0,0 +1,3 @@
|
||||
{"version": 2, "width": 82, "height": 24, "title": "layout (rich)", "env": {"TERM": "Spectre.Console"}}
|
||||
[0, "o", "\u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\u256D\u2500Top (40 x 12)\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 Placeholder \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 Hello \u001B[38;5;12mWorld!\u001B[0m \u2502\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F\r\n\u2502 \u2502\u256D\u2500Bottom (40 x 12)\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256E\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 Placeholder \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2502 \u2502\u2502 \u2502\r\n\u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256F"]
|
||||
|
||||
2
docs/input/assets/casts/padder-rich.cast
Normal file
2
docs/input/assets/casts/padder-rich.cast
Normal file
@@ -0,0 +1,2 @@
|
||||
{"version": 2, "width": 40, "height": 6, "timestamp": 1667448519, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
|
||||
[0.0, "o", " \r\n \u001b[38;5;9;48;5;0mPadded Text I\u001b[0m \u001b[38;5;12;48;5;0mPadded Text II\u001b[0m \r\n \r\n"]
|
||||
3
docs/input/assets/casts/panel-plain.cast
Normal file
3
docs/input/assets/casts/panel-plain.cast
Normal file
@@ -0,0 +1,3 @@
|
||||
{"version": 2, "width": 122, "height": 24, "title": "panel (plain)", "env": {"TERM": "Spectre.Console"}}
|
||||
[0, "o", "\u2554\u2550\u2550\u001B[4mPasta Menu\u001B[0m\u2550\u2550\u2557\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u2551 \u001B[31mSpaghetti\u001B[0m \u2551\r\n\u2551 \u001B[31mLinguini\u001B[0m \u2551\r\n\u2551 \u001B[31mFettucine\u001B[0m \u2551\r\n\u2551 \u001B[31mTortellini\u001B[0m \u2551\r\n\u2551 \u001B[31mCapellini\u001B[0m \u2551\r\n\u2551 \u001B[31mLasagna\u001B[0m \u2551\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\r\n"]
|
||||
|
||||
3
docs/input/assets/casts/panel-rich.cast
Normal file
3
docs/input/assets/casts/panel-rich.cast
Normal file
@@ -0,0 +1,3 @@
|
||||
{"version": 2, "width": 122, "height": 24, "title": "panel (rich)", "env": {"TERM": "Spectre.Console"}}
|
||||
[0, "o", "\u2554\u2550\u2550\u001B[4mPasta Menu\u001B[0m\u2550\u2550\u2557\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u2551 \u001B[38;5;9mSpaghetti\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mLinguini\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mFettucine\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mTortellini\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mCapellini\u001B[0m \u2551\r\n\u2551 \u001B[38;5;9mLasagna\u001B[0m \u2551\r\n\u2551 \u2551\r\n\u2551 \u2551\r\n\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u2550\u255D\r\n"]
|
||||
|
||||
2
docs/input/assets/casts/rows-rich.cast
Normal file
2
docs/input/assets/casts/rows-rich.cast
Normal file
@@ -0,0 +1,2 @@
|
||||
{"version": 2, "width": 50, "height": 5, "timestamp": 1667278514, "env": {"SHELL": "/bin/bash", "TERM": "xterm-256color"}}
|
||||
[0, "o", "\u001b[38;5;9;48;5;0mItem 1\u001b[0m\r\n\u001b[38;5;2;48;5;0mItem 2\u001b[0m\r\n\u001b[38;5;12;48;5;0mItem 3\u001b[0m\r\n"]
|
||||
@@ -1,6 +1,6 @@
|
||||
Title: Hello, World
|
||||
Description: To help track new releases, updates and planning for Spectre.Console, we've added a new blog to the documentation.
|
||||
Published: 20210711
|
||||
Published: 2021-07-11
|
||||
Category: News
|
||||
---
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Title: Spectre.Console 0.41 released!
|
||||
Description: In this release we (mostly Phil) have been focusing on getting the new fancy Roslyn Analyzers out the door...
|
||||
Published: 20210719
|
||||
Published: 2021-07-19
|
||||
Category: Release Notes
|
||||
Excluded: false
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Title: Spectre.Console 0.43 released!
|
||||
Description: Now with .NET 6 support... and more!
|
||||
Published: 20211216
|
||||
Published: 2021-12-16
|
||||
Category: Release Notes
|
||||
Excluded: false
|
||||
---
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Title: Spectre.Console 0.44 released!
|
||||
Description: Alternate screen buffers, better exception rendering... and more!
|
||||
Published: 20220327
|
||||
Published: 2022-03-27
|
||||
Category: Release Notes
|
||||
Excluded: false
|
||||
---
|
||||
|
||||
@@ -0,0 +1,55 @@
|
||||
Title: Spectre.Console 0.45 released!
|
||||
Description: .NET 5 dropped, Spectre.Console.Cli moved to separate NuGet package
|
||||
Published: 2022-09-10
|
||||
Category: Release Notes
|
||||
Excluded: false
|
||||
---
|
||||
|
||||
Version 0.45 of Spectre.Console has been released!
|
||||
|
||||
There are some big changes with this release, which you can
|
||||
read all about below.
|
||||
|
||||
## Spectre.Console.Cli Moved
|
||||
|
||||
All CLI parsing-related functionality has been moved to its own NuGet
|
||||
package: [Spectre.Console.Cli](https://www.nuget.org/packages/spectre.console.cli).
|
||||
|
||||
The reasoning for this is that we want to play better with other CLI parsing libraries
|
||||
without the confusion of having two libraries for CLI handling intermixed.
|
||||
|
||||
We're sorry for breaking things like this, but we're sure it's the best
|
||||
decision moving forward.
|
||||
|
||||
## .NET5 Support Dropped
|
||||
|
||||
This version has dropped `.NET5` support, which has reached EOL.
|
||||
|
||||
## New Contributors
|
||||
|
||||
* [@drewnoakes](https://github.com/drewnoakes) made their first contribution in [#781](https://github.com/spectreconsole/spectre.console/pull/781)
|
||||
* [@renovate](https://github.com/renovate) made their first contribution in [#785](https://github.com/spectreconsole/spectre.console/pull/785)
|
||||
* [@leo](https://github.com/leo)-costa made their first contribution in [#782](https://github.com/spectreconsole/spectre.console/pull/782)
|
||||
* [@wanglong126](https://github.com/wanglong126) made their first contribution in [#819](https://github.com/spectreconsole/spectre.console/pull/819)
|
||||
* [@ivml](https://github.com/ivml) made their first contribution in [#834](https://github.com/spectreconsole/spectre.console/pull/834)
|
||||
* [@dependabot](https://github.com/dependabot) made their first contribution in [#849](https://github.com/spectreconsole/spectre.console/pull/849)
|
||||
* [@danielchalmers](https://github.com/danielchalmers) made their first contribution in [#850](https://github.com/spectreconsole/spectre.console/pull/850)
|
||||
* [@nkochnev](https://github.com/nkochnev) made their first contribution in [#920](https://github.com/spectreconsole/spectre.console/pull/920)
|
||||
* [@lonix1](https://github.com/lonix1) made their first contribution in [#938](https://github.com/spectreconsole/spectre.console/pull/938)
|
||||
|
||||
## What's Changed
|
||||
|
||||
* Move `Spectre.Console.Cli` to its own package by [@patriksvensson](https://github.com/patriksvensson) in [#827](https://github.com/spectreconsole/spectre.console/pull/827)
|
||||
* Remove the 'net50' TFM by [@patriksvensson](https://github.com/patriksvensson) in [#877](https://github.com/spectreconsole/spectre.console/pull/877)
|
||||
* Corrected section heading in `Status` by [@drewnoakes](https://github.com/drewnoakes) in [#781](https://github.com/spectreconsole/spectre.console/pull/781)
|
||||
* Upgrade dotnet example tool to `1.6.0` by [@leo](https://github.com/leo)-costa in [#782](https://github.com/spectreconsole/spectre.console/pull/782)
|
||||
* Fix documentation workflow by [@patriksvensson](https://github.com/patriksvensson) in [#799](https://github.com/spectreconsole/spectre.console/pull/799)
|
||||
* Fix missing API reference pages for `Spectre.Console.Cli` by [@ivml](https://github.com/ivml) in [#834](https://github.com/spectreconsole/spectre.console/pull/834)
|
||||
* Fix the "Escaping Interpolated Strings" documentation by [@0xced](https://github.com/0xced) in [#837](https://github.com/spectreconsole/spectre.console/pull/837)
|
||||
* Check for null in `TextPrompt` by [@danielchalmers](https://github.com/danielchalmers) in [#850](https://github.com/spectreconsole/spectre.console/pull/850)
|
||||
* Fix `ArgumentNullException` on .NET Framework by [@nils](https://github.com/nils)-a in [#923](https://github.com/spectreconsole/spectre.console/pull/923)
|
||||
* Add command description to command help message by [@nkochnev](https://github.com/nkochnev) in [#920](https://github.com/spectreconsole/spectre.console/pull/920)
|
||||
* Fix missing call to `Validate` when using `CommandConstructorBinde` by [@nils](https://github.com/nils)-a in [#924](https://github.com/spectreconsole/spectre.console/pull/924)
|
||||
* Modified `MarkupTokenizer`, so that escaped markup inside markup is valid by [@nils](https://github.com/nils)-a in [#911](https://github.com/spectreconsole/spectre.console/pull/911)
|
||||
* Detect non-interactive console via `Console.IsInputRedirected` instead of `Environment.UserInteractive` by [@bastianeicher](https://github.com/bastianeicher) in [#824](https://github.com/spectreconsole/spectre.console/pull/824)
|
||||
* Set the `DevelopmentDependency` flag on the `Spectre.Console.Analyzer` project by [@0xced](https://github.com/0xced) in [#950](https://github.com/spectreconsole/spectre.console/pull/950)
|
||||
@@ -1,6 +1,6 @@
|
||||
Title: Short title, less than 50 characters
|
||||
Description: Longer description, with optional *bold* and **italic** characters. Shouldn't be TOO long but can span multiple lines.
|
||||
Published: 20210710
|
||||
Published: 2021-07-10
|
||||
Category: Release Notes | News | or whatever
|
||||
Excluded: true
|
||||
---
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
Title: Welcome!
|
||||
Description: Spectre.Console is a .NET Standard 2.0 library that makes it easier to create beautiful console applications.
|
||||
Description: Spectre.Console is a .NET library that makes it easier to create beautiful console applications.
|
||||
Order: 0
|
||||
---
|
||||
|
||||
Spectre.Console is a `.NET Standard 2.0` library that makes it easier
|
||||
Spectre.Console is a `.NET` library that makes it easier
|
||||
to create beautiful console applications.
|
||||
|
||||
## Spectre.Console.AnsiConsole Features
|
||||
|
||||
@@ -35,7 +35,7 @@ AnsiConsole.Write(table);
|
||||
|
||||
## Convenience methods
|
||||
|
||||
There is also convenience methods on `AnsiConsole` that can be used
|
||||
There are also convenience methods on `AnsiConsole` that can be used
|
||||
to write markup text to the console without instantiating a new `Markup`
|
||||
instance.
|
||||
|
||||
@@ -66,7 +66,7 @@ AnsiConsole.Markup("[red]{0}[/]", Markup.Escape("Hello [World]"));
|
||||
|
||||
## Escaping Interpolated Strings
|
||||
|
||||
When working with interpolated string, you can use the `MarkupInterpolated` and `MarkupLineInterpolated` methods to automatically escape the values in the interpolated string holes.
|
||||
When working with interpolated strings, you can use the `MarkupInterpolated` and `MarkupLineInterpolated` methods to automatically escape the values in the interpolated string "holes".
|
||||
|
||||
```csharp
|
||||
string hello = "Hello [World]";
|
||||
@@ -75,8 +75,7 @@ AnsiConsole.MarkupInterpolated($"[red]{hello}[/]");
|
||||
|
||||
## Setting background color
|
||||
|
||||
You can set the background color in markup by prefixing the color with
|
||||
`on`.
|
||||
You can set the background color in markup by prefixing the color with `on`.
|
||||
|
||||
```csharp
|
||||
AnsiConsole.Markup("[bold yellow on blue]Hello[/]");
|
||||
@@ -106,6 +105,15 @@ AnsiConsole.Markup("[rgb(255,0,0)]Baz[/] ");
|
||||
|
||||
For a list of colors, see the [Colors](xref:colors) appendix section.
|
||||
|
||||
## Links
|
||||
|
||||
To output a clickable link, you can use the `[link]` style.
|
||||
|
||||
```csharp
|
||||
AnsiConsole.Markup("[link]https://spectreconsole.net[/]");
|
||||
AnsiConsole.Markup("[link=https://spectreconsole.net]Spectre Console Documentation[/]");
|
||||
```
|
||||
|
||||
## Styles
|
||||
|
||||
For a list of styles, see the [Styles](xref:styles) appendix section.
|
||||
@@ -65,6 +65,23 @@ What's the secret number? _
|
||||
Enter password: ************_
|
||||
```
|
||||
|
||||
## Masks
|
||||
|
||||
<?# Example symbol="M:Prompt.Program.AskPasswordWithCustomMask" project="Prompt" /?>
|
||||
|
||||
|
||||
```text
|
||||
Enter password: ------------_
|
||||
```
|
||||
|
||||
You can utilize a null character to completely hide input.
|
||||
|
||||
<?# Example symbol="M:Prompt.Program.AskPasswordWithNullMask" project="Prompt" /?>
|
||||
|
||||
```text
|
||||
Enter password: _
|
||||
```
|
||||
|
||||
## Optional
|
||||
|
||||
<?# Example symbol="M:Prompt.Program.AskColor" project="Prompt" /?>
|
||||
|
||||
@@ -14,7 +14,7 @@ After that you will need to reference the `Spectre.Console` namespace.
|
||||
Once that is done, you can start using all the available features.
|
||||
|
||||
```csharp
|
||||
using Spectre.Console
|
||||
using Spectre.Console;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
|
||||
@@ -13,7 +13,6 @@ Use `BarChart` to render bar charts to the console.
|
||||
|
||||
<?# AsciiCast cast="bar-chart" /?>
|
||||
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic usage
|
||||
|
||||
134
docs/input/widgets/breakdownchart.md
Normal file
134
docs/input/widgets/breakdownchart.md
Normal file
@@ -0,0 +1,134 @@
|
||||
Title: Breakdown Chart
|
||||
Order: 25
|
||||
Description: "Use **BreakdownChart** to render breakdown charts to the console."
|
||||
Highlights:
|
||||
- Custom colors
|
||||
- Labels
|
||||
- Use your own data with a converter.
|
||||
Reference: T:Spectre.Console.BreakdownChart
|
||||
|
||||
---
|
||||
|
||||
Use `BreakdownChart` to render breakdown charts to the console.
|
||||
|
||||
<?# AsciiCast cast="breakdown-chart" /?>
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic usage
|
||||
|
||||
```csharp
|
||||
AnsiConsole.Write(new BreakdownChart()
|
||||
.Width(60)
|
||||
// Add item is in the order of label, value, then color.
|
||||
.AddItem("SCSS", 80, Color.Red)
|
||||
.AddItem("HTML", 28.3, Color.Blue)
|
||||
.AddItem("C#", 22.6, Color.Green)
|
||||
.AddItem("JavaScript", 6, Color.Yellow)
|
||||
.AddItem("Ruby", 6, Color.LightGreen)
|
||||
.AddItem("Shell", 0.1, Color.Aqua));
|
||||
```
|
||||
|
||||
### Additional Styling
|
||||
|
||||
```csharp
|
||||
// Render chart at full width of console.
|
||||
AnsiConsole.Write(new BreakdownChart()
|
||||
.FullSize()
|
||||
.AddItem("SCSS", 80, Color.Red)
|
||||
.AddItem("HTML", 28.3, Color.Blue)
|
||||
.AddItem("C#", 22.6, Color.Green)
|
||||
.AddItem("JavaScript", 6, Color.Yellow)
|
||||
.AddItem("Ruby", 6, Color.LightGreen)
|
||||
.AddItem("Shell", 0.1, Color.Aqua));
|
||||
```
|
||||
|
||||
```csharp
|
||||
// Show percentage signs after the values in the chart.
|
||||
AnsiConsole.Write(new BreakdownChart()
|
||||
.ShowPercentage()
|
||||
.AddItem("SCSS", 80, Color.Red)
|
||||
.AddItem("HTML", 28.3, Color.Blue)
|
||||
.AddItem("C#", 22.6, Color.Green)
|
||||
.AddItem("JavaScript", 6, Color.Yellow)
|
||||
.AddItem("Ruby", 6, Color.LightGreen)
|
||||
.AddItem("Shell", 0.1, Color.Aqua));
|
||||
```
|
||||
|
||||
```csharp
|
||||
// Hide tags displaying in the chart altogether.
|
||||
AnsiConsole.Write(new BreakdownChart()
|
||||
.HideTag()
|
||||
.AddItem("SCSS", 80, Color.Red)
|
||||
.AddItem("HTML", 28.3, Color.Blue)
|
||||
.AddItem("C#", 22.6, Color.Green)
|
||||
.AddItem("JavaScript", 6, Color.Yellow)
|
||||
.AddItem("Ruby", 6, Color.LightGreen)
|
||||
.AddItem("Shell", 0.1, Color.Aqua));
|
||||
```
|
||||
|
||||
```csharp
|
||||
// Hide the values next to the tag from displaying in the chart.
|
||||
AnsiConsole.Write(new BreakdownChart()
|
||||
.HideTagValues()
|
||||
.AddItem("SCSS", 80, Color.Red)
|
||||
.AddItem("HTML", 28.3, Color.Blue)
|
||||
.AddItem("C#", 22.6, Color.Green)
|
||||
.AddItem("JavaScript", 6, Color.Yellow)
|
||||
.AddItem("Ruby", 6, Color.LightGreen)
|
||||
.AddItem("Shell", 0.1, Color.Aqua));
|
||||
```
|
||||
|
||||
### Additional Functionality
|
||||
|
||||
#### Add items with converter
|
||||
|
||||
```csharp
|
||||
// Create a list of fruits with their colors
|
||||
var items = new List<(string Label, double Value, Color color)>
|
||||
{
|
||||
("Apple", 12, Color.Green),
|
||||
("Orange", 54, Color.Orange1),
|
||||
("Banana", 33, Color.Yellow),
|
||||
};
|
||||
|
||||
// Render the chart
|
||||
AnsiConsole.Write(new BreakdownChart()
|
||||
.FullSize()
|
||||
.ShowPercentage()
|
||||
.AddItems(items, (item) => new BreakdownChartItem(
|
||||
item.Label, item.Value, item.color)));
|
||||
```
|
||||
|
||||
#### Add items implementing IBreakdownChartItem
|
||||
|
||||
```csharp
|
||||
// Declare Fruit that implements IBreakdownChartItem
|
||||
public sealed class Fruit : IBreakdownChartItem
|
||||
{
|
||||
public string Label { get; set; }
|
||||
public double Value { get; set; }
|
||||
public Color Color { get; set; }
|
||||
|
||||
public Fruit(string label, double value, Color color)
|
||||
{
|
||||
Label = label;
|
||||
Value = value;
|
||||
Color = color;
|
||||
}
|
||||
}
|
||||
|
||||
// Create a list of fruits
|
||||
var items = new List<Fruit>
|
||||
{
|
||||
new Fruit("Apple", 12, Color.Green),
|
||||
new Fruit("Orange", 54, Color.Orange1),
|
||||
new Fruit("Banana", 33, Color.Yellow),
|
||||
}
|
||||
|
||||
// Render chart
|
||||
AnsiConsole.Write(new BreakdownChart()
|
||||
.Width(60)
|
||||
.AddItem(new Fruit("Mango", 3, Color.Orange4))
|
||||
.AddItems(items));
|
||||
```
|
||||
54
docs/input/widgets/columns.md
Normal file
54
docs/input/widgets/columns.md
Normal file
@@ -0,0 +1,54 @@
|
||||
Title: Columns
|
||||
Description: "Use **Columns** to render widgets in vertical columns to the console."
|
||||
Highlights:
|
||||
- Custom colors
|
||||
- Labels
|
||||
- Use your own data with a converter.
|
||||
Reference: T:Spectre.Console.Columns
|
||||
|
||||
---
|
||||
|
||||
Use `Columns` to render widgets in vertical columns to the console.
|
||||
|
||||
<?# AsciiCast cast="columns" /?>
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic usage
|
||||
|
||||
```csharp
|
||||
// Render two items on separate columns to Console
|
||||
AnsiConsole.Write(new Columns(
|
||||
new Text("Item 1"),
|
||||
new Text("Item 2")
|
||||
));
|
||||
```
|
||||
|
||||
### Add items from an IEnumerable
|
||||
|
||||
```csharp
|
||||
// Create a list of Items
|
||||
var columns = new List<Text>(){
|
||||
new Text("Item 1"),
|
||||
new Text("Item 2"),
|
||||
new Text("Item 3")
|
||||
};
|
||||
|
||||
// Render each item in list on separate line
|
||||
AnsiConsole.Write(new Columns(columns));
|
||||
```
|
||||
|
||||
### Apply custom styles to each column
|
||||
|
||||
```csharp
|
||||
// Create a list of Items, apply separate styles to each
|
||||
var columns = new List<Text>(){
|
||||
new Text("Item 1", new Style(Color.Red, Color.Black)),
|
||||
new Text("Item 2", new Style(Color.Green, Color.Black)),
|
||||
new Text("Item 3", new Style(Color.Blue, Color.Black))
|
||||
};
|
||||
|
||||
// Renders each item with own style
|
||||
AnsiConsole.Write(new Columns(columns));
|
||||
```
|
||||
|
||||
98
docs/input/widgets/grid.md
Normal file
98
docs/input/widgets/grid.md
Normal file
@@ -0,0 +1,98 @@
|
||||
Title: Grid
|
||||
Order: 45
|
||||
Description: "Use **Grid** to render items in a grid pattern."
|
||||
Highlights:
|
||||
- Custom colors
|
||||
- Labels
|
||||
- Use your own data with a converter.
|
||||
Reference: T:Spectre.Console.Grid
|
||||
|
||||
---
|
||||
|
||||
Use `Grid` to render items in a grid pattern.
|
||||
|
||||
<?# AsciiCast cast="grid" /?>
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic usage
|
||||
|
||||
```csharp
|
||||
var grid = new Grid();
|
||||
|
||||
// Add columns
|
||||
grid.AddColumn();
|
||||
grid.AddColumn();
|
||||
grid.AddColumn();
|
||||
|
||||
// Add header row
|
||||
grid.AddRow(new string[]{"Header 1", "Header 2", "Header 3"});
|
||||
grid.AddRow(new string[]{"Row 1", "Row 2", "Row 3"});
|
||||
|
||||
// Write to Console
|
||||
AnsiConsole.Write(grid);
|
||||
```
|
||||
|
||||
### Align and style items within cells
|
||||
|
||||
```csharp
|
||||
var grid = new Grid();
|
||||
|
||||
// Add columns
|
||||
grid.AddColumn();
|
||||
grid.AddColumn();
|
||||
grid.AddColumn();
|
||||
|
||||
// Add header row
|
||||
grid.AddRow(new Text[]{
|
||||
new Text("Header 1", new Style(Color.Red, Color.Black)).LeftAligned(),
|
||||
new Text("Header 2", new Style(Color.Green, Color.Black)).Centered(),
|
||||
new Text("Header 3", new Style(Color.Blue, Color.Black)).RightAligned()
|
||||
});
|
||||
|
||||
// Add content row
|
||||
grid.AddRow(new Text[]{
|
||||
new Text("Row 1").LeftAligned(),
|
||||
new Text("Row 2").Centered(),
|
||||
new Text("Row 3").RightAligned()
|
||||
});
|
||||
|
||||
// Write centered cell grid contents to Console
|
||||
AnsiConsole.Write(grid);
|
||||
```
|
||||
|
||||
### Embed a grid within a grid
|
||||
|
||||
```csharp
|
||||
var grid = new Grid();
|
||||
|
||||
// Add columns
|
||||
grid.AddColumn();
|
||||
grid.AddColumn();
|
||||
grid.AddColumn();
|
||||
|
||||
// Add header row
|
||||
grid.AddRow(new Text[]{
|
||||
new Text("Header 1", new Style(Color.Red, Color.Black)).LeftAligned(),
|
||||
new Text("Header 2", new Style(Color.Green, Color.Black)).Centered(),
|
||||
new Text("Header 3", new Style(Color.Blue, Color.Black)).RightAligned()
|
||||
});
|
||||
|
||||
var embedded = new Grid();
|
||||
|
||||
embedded.AddColumn();
|
||||
embedded.AddColumn();
|
||||
|
||||
embedded.AddRow(new Text("Embedded I"), new Text("Embedded II"));
|
||||
embedded.AddRow(new Text("Embedded III"), new Text("Embedded IV"));
|
||||
|
||||
// Add content row
|
||||
grid.AddRow(
|
||||
new Text("Row 1").LeftAligned(),
|
||||
new Text("Row 2").Centered(),
|
||||
embedded
|
||||
);
|
||||
|
||||
// Write centered cell grid contents to Console
|
||||
AnsiConsole.Write(grid);
|
||||
```
|
||||
69
docs/input/widgets/json.md
Normal file
69
docs/input/widgets/json.md
Normal file
@@ -0,0 +1,69 @@
|
||||
Title: JSON
|
||||
Order: 70
|
||||
Description: "Use *ImageSharp* to parse images and render them as Ascii art to the console."
|
||||
Reference: T:Spectre.Console.Json.JsonText
|
||||
---
|
||||
|
||||
To add JSON superpowers to
|
||||
your console application to render JSON text, you will need to install
|
||||
the [Spectre.Console.Json](https://www.nuget.org/packages/Spectre.Console.Json) NuGet package.
|
||||
|
||||
```text
|
||||
> dotnet add package Spectre.Console.Json
|
||||
```
|
||||
|
||||
## Rendering JSON
|
||||
|
||||
Once you've added the `Spectre.Console.Json` NuGet package,
|
||||
you can start rendering JSON to the console.
|
||||
|
||||
```csharp
|
||||
using Spectre.Console.Json;
|
||||
|
||||
var json = new JsonText(
|
||||
"""
|
||||
{
|
||||
"hello": 32,
|
||||
"world": {
|
||||
"foo": 21,
|
||||
"bar": 255,
|
||||
"baz": [
|
||||
0.32, 0.33e-32,
|
||||
0.42e32, 0.55e+32,
|
||||
{
|
||||
"hello": "world",
|
||||
"lol": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
""");
|
||||
|
||||
AnsiConsole.Write(
|
||||
new Panel(json)
|
||||
.Header("Some JSON in a panel")
|
||||
.Collapse()
|
||||
.RoundedBorder()
|
||||
.BorderColor(Color.Yellow));
|
||||
```
|
||||
|
||||
### Result
|
||||
|
||||
<?# AsciiCast cast="json" /?>
|
||||
|
||||
## Styling
|
||||
|
||||
All the different JSON parts can be customized to have unique styles.
|
||||
|
||||
```csharp
|
||||
AnsiConsole.Write(
|
||||
new JsonText(json)
|
||||
.BracesColor(Color.Red)
|
||||
.BracketColor(Color.Green)
|
||||
.ColonColor(Color.Blue)
|
||||
.CommaColor(Color.Red)
|
||||
.StringColor(Color.Green)
|
||||
.NumberColor(Color.Blue)
|
||||
.BooleanColor(Color.Red)
|
||||
.NullColor(Color.Green));
|
||||
```
|
||||
64
docs/input/widgets/layout.md
Normal file
64
docs/input/widgets/layout.md
Normal file
@@ -0,0 +1,64 @@
|
||||
Title: Layout
|
||||
Order: 45
|
||||
Description: "Use **Layout** to layout widgets in the terminal."
|
||||
Reference: T:Spectre.Console.Layout
|
||||
|
||||
---
|
||||
|
||||
Use `Layout` to layout widgets in the terminal.
|
||||
|
||||
<?# AsciiCast cast="layout" /?>
|
||||
|
||||
## Usage
|
||||
|
||||
```csharp
|
||||
// Create the layout
|
||||
var layout = new Layout("Root")
|
||||
.SplitColumns(
|
||||
new Layout("Left"),
|
||||
new Layout("Right")
|
||||
.SplitRows(
|
||||
new Layout("Top"),
|
||||
new Layout("Bottom")));
|
||||
|
||||
// Update the left column
|
||||
layout["Left"].Update(
|
||||
new Panel(
|
||||
Align.Center(
|
||||
new Markup("Hello [blue]World![/]"),
|
||||
VerticalAlignment.Middle))
|
||||
.Expand());
|
||||
|
||||
// Render the layout
|
||||
AnsiConsole.Write(layout);
|
||||
```
|
||||
|
||||
## Setting minimum size
|
||||
|
||||
```csharp
|
||||
layout["Left"].MinimumSize(10);
|
||||
```
|
||||
|
||||
## Setting ratio
|
||||
|
||||
```csharp
|
||||
layout["Left"].Ratio(2);
|
||||
```
|
||||
|
||||
## Settings explicit size
|
||||
|
||||
```csharp
|
||||
layout["Left"].Size(32);
|
||||
```
|
||||
|
||||
## Hide layout
|
||||
|
||||
```csharp
|
||||
layout["Left"].Invisible();
|
||||
```
|
||||
|
||||
## Show layout
|
||||
|
||||
```csharp
|
||||
layout["Left"].Visible();
|
||||
```
|
||||
68
docs/input/widgets/padder.md
Normal file
68
docs/input/widgets/padder.md
Normal file
@@ -0,0 +1,68 @@
|
||||
Title: Padder
|
||||
Order: 55
|
||||
Description: "Use **Padder** to add padding around a Widget."
|
||||
Highlights:
|
||||
- Custom colors
|
||||
- Labels
|
||||
- Use your own data with a converter.
|
||||
Reference: T:Spectre.Console.Padder
|
||||
|
||||
---
|
||||
|
||||
Use `Padder` to add padding around a Widget.
|
||||
|
||||
<?# AsciiCast cast="padder" /?>
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic usage
|
||||
|
||||
```csharp
|
||||
// Create three text elements
|
||||
var paddedText_I = new Text("Padded Text I", new Style(Color.Red, Color.Black));
|
||||
var paddedText_II = new Text("Padded Text II", new Style(Color.Green, Color.Black));
|
||||
var paddedText_III = new Text("Padded Text III", new Style(Color.Blue, Color.Black));
|
||||
|
||||
// Apply padding to the three text elements
|
||||
var pad_I = new Padder(paddedText_I).PadRight(16).PadBottom(0).PadTop(4);
|
||||
var pad_II = new Padder(paddedText_II).PadBottom(0).PadTop(2);
|
||||
var pad_III = new Padder(paddedText_III).PadLeft(16).PadBottom(0).PadTop(0);
|
||||
|
||||
// Insert padded elements within single-row grid
|
||||
var grid = new Grid();
|
||||
|
||||
grid.AddColumn();
|
||||
grid.AddColumn();
|
||||
grid.AddColumn();
|
||||
|
||||
grid.AddRow(pad_I, pad_II, pad_III);
|
||||
|
||||
// Write grid and it's padded contents to the Console
|
||||
AnsiConsole.Write(grid);
|
||||
```
|
||||
|
||||
### Padding element within a padded element
|
||||
|
||||
```csharp
|
||||
// Create two text elements
|
||||
var paddedText_I = new Text("Padded Text I", new Style(Color.Red, Color.Black));
|
||||
var paddedText_II = new Text("Padded Text II", new Style(Color.Blue, Color.Black));
|
||||
|
||||
// Create, apply padding on text elements
|
||||
var pad_I = new Padder(paddedText_I).PadRight(2).PadBottom(0).PadTop(0);
|
||||
var pad_II = new Padder(paddedText_II).PadLeft(2).PadBottom(0).PadTop(0);
|
||||
|
||||
// Insert the text elements into a single row grid
|
||||
var grid = new Grid();
|
||||
|
||||
grid.AddColumn();
|
||||
grid.AddColumn();
|
||||
|
||||
grid.AddRow(pad_I, pad_II);
|
||||
|
||||
// Apply horizontal and vertical padding on the grid
|
||||
var paddedGrid = new Padder(grid).Padding(4,1);
|
||||
|
||||
// Write the padded grid to the Console
|
||||
AnsiConsole.Write(paddedGrid);
|
||||
```
|
||||
61
docs/input/widgets/panel.md
Normal file
61
docs/input/widgets/panel.md
Normal file
@@ -0,0 +1,61 @@
|
||||
Title: Panel
|
||||
Order: 0
|
||||
RedirectFrom: panels
|
||||
Description: "The **Panel** widget can be used to organize text into a rendered box."
|
||||
Reference: T:Spectre.Console.Panel
|
||||
|
||||
---
|
||||
|
||||
The `Panel` widget can be used to organize text into a rendered box.
|
||||
|
||||
<?# AsciiCast cast="panel" /?>
|
||||
|
||||
## Usage
|
||||
|
||||
To render a panel, create a `Panel` instance, passing a string to its constructor to assign the contents.
|
||||
|
||||
```csharp
|
||||
var panel = new Panel("Hello World");
|
||||
```
|
||||
|
||||
## Appearance
|
||||
|
||||
# Headers
|
||||
|
||||
```csharp
|
||||
// Sets the header
|
||||
panel.Header = new PanelHeader("Some text");
|
||||
```
|
||||
|
||||
# Borders
|
||||
|
||||
For a list of borders, see the [Borders](xref:borders) appendix section.
|
||||
|
||||
```csharp
|
||||
// Sets the border
|
||||
panel.Border = BoxBorder.Ascii;
|
||||
panel.Border = BoxBorder.Square;
|
||||
panel.Border = BoxBorder.Rounded;
|
||||
panel.Border = BoxBorder.Heavy;
|
||||
panel.Border = BoxBorder.Double;
|
||||
panel.Border = BoxBorder.None;
|
||||
```
|
||||
|
||||
# Padding
|
||||
|
||||
```csharp
|
||||
// Sets the padding
|
||||
panel.Padding = new Padding(2, 2, 2, 2);
|
||||
```
|
||||
|
||||
# Expand
|
||||
|
||||
Enabling the Expand property will cause the Panel to be as wide as the console.
|
||||
Otherwise, the Panel width will be automatically calculated based on its content.
|
||||
Note that this auto-calculation is not based on the Panel Header, so a Header that
|
||||
is long in length may get truncated with certain content.
|
||||
|
||||
```csharp
|
||||
// Sets the expand property
|
||||
panel.Expand = true;
|
||||
```
|
||||
54
docs/input/widgets/rows.md
Normal file
54
docs/input/widgets/rows.md
Normal file
@@ -0,0 +1,54 @@
|
||||
Title: Rows
|
||||
Order: 20
|
||||
Description: "Use **Rows** to render widgets in horiztonal rows to the console."
|
||||
Highlights:
|
||||
- Custom colors
|
||||
- Labels
|
||||
- Use your own data with a converter.
|
||||
Reference: T:Spectre.Console.Rows
|
||||
|
||||
---
|
||||
|
||||
Use `Rows` to render widgets in horizontal rows to the console.
|
||||
|
||||
<?# AsciiCast cast="rows" /?>
|
||||
|
||||
## Usage
|
||||
|
||||
### Basic usage
|
||||
|
||||
```csharp
|
||||
// Render two items on separate rows to Console
|
||||
AnsiConsole.Write(new Rows(
|
||||
new Text("Item 1"),
|
||||
new Text("Item 2")
|
||||
));
|
||||
```
|
||||
|
||||
### Add items from an IEnumerable
|
||||
|
||||
```csharp
|
||||
// Create a list of Items
|
||||
var rows = new List<Text>(){
|
||||
new Text("Item 1"),
|
||||
new Text("Item 2"),
|
||||
new Text("Item 3")
|
||||
};
|
||||
|
||||
// Render each item in list on separate line
|
||||
AnsiConsole.Write(new Rows(rows));
|
||||
```
|
||||
|
||||
### Apply custom styles to each row
|
||||
|
||||
```csharp
|
||||
// Create a list of Items, apply separate styles to each
|
||||
var rows = new List<Text>(){
|
||||
new Text("Item 1", new Style(Color.Red, Color.Black)),
|
||||
new Text("Item 2", new Style(Color.Green, Color.Black)),
|
||||
new Text("Item 3", new Style(Color.Blue, Color.Black))
|
||||
};
|
||||
|
||||
// Renders each item with own style
|
||||
AnsiConsole.Write(new Rows(rows));
|
||||
```
|
||||
1
docs/package-lock.json
generated
1
docs/package-lock.json
generated
@@ -5,6 +5,7 @@
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "docs",
|
||||
"version": "1.0.0",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<div id="container">
|
||||
<div id="console">
|
||||
<div class="line"><span style="color:var(--brightBlack)">╭─</span><span style="color:var(--folder)"></span><span style="background-color:var(--folder);color:var(--black)"> ~/spectre.console</span><span style="color:var(--folder);background-color:var(--dotnet)"></span><span style="background-color:var(--blue)"> .NET 5.0 </span><span style="color:var(--dotnet);background-color:var(--git)"></span><span style="background-color:var(--git);color:var(--background)">  main </span><span style="color:var(--git)"></span></div>
|
||||
<div class="line"><span style="color:var(--brightBlack)">╭─</span><span style="color:var(--folder)"></span><span style="background-color:var(--folder);color:var(--black)"> ~/spectre.console</span><span style="color:var(--folder);background-color:var(--dotnet)"></span><span style="background-color:var(--blue)"> .NET 7.0 </span><span style="color:var(--dotnet);background-color:var(--git)"></span><span style="background-color:var(--git);color:var(--background)">  main </span><span style="color:var(--git)"></span></div>
|
||||
<div class="line"><span style="color:var(--brightBlack)">╰─</span> dotnet run</div>
|
||||
<div class="line"></div>
|
||||
<div class="line">╭────────────────────────────────────────────────────────╮</div>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"isRoot": true,
|
||||
"tools": {
|
||||
"cake.tool": {
|
||||
"version": "2.2.0",
|
||||
"version": "3.0.0",
|
||||
"commands": [
|
||||
"dotnet-cake"
|
||||
]
|
||||
@@ -15,7 +15,7 @@
|
||||
]
|
||||
},
|
||||
"dotnet-example": {
|
||||
"version": "1.6.0",
|
||||
"version": "2.0.0",
|
||||
"commands": [
|
||||
"dotnet-example"
|
||||
]
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<ExampleName>Delegates</ExampleName>
|
||||
<ExampleDescription>Demonstrates how to specify commands as delegates.</ExampleDescription>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<ExampleName>Demo</ExampleName>
|
||||
<ExampleDescription>Demonstrates the most common use cases of Spectre.Cli.</ExampleDescription>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<ExampleName>Dynamic</ExampleName>
|
||||
<ExampleDescription>Demonstrates how to define dynamic commands.</ExampleDescription>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<ExampleName>Injection</ExampleName>
|
||||
<ExampleDescription>Demonstrates how to use dependency injection with Spectre.Cli.</ExampleDescription>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<IsPackable>false</IsPackable>
|
||||
<ExampleName>Logging</ExampleName>
|
||||
<ExampleDescription>Demonstrates how to dynamically configure Serilog for logging using parameters from a command.</ExampleDescription>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Screens</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to use alternate screens.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Borders</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates the different kind of borders.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -84,7 +84,7 @@ public static class Program
|
||||
private static void HorizontalRule(string title)
|
||||
{
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule($"[white bold]{title}[/]").RuleStyle("grey").LeftAligned());
|
||||
AnsiConsole.Write(new Rule($"[white bold]{title}[/]").RuleStyle("grey").LeftJustified());
|
||||
AnsiConsole.WriteLine();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Calendars</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render calendars.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Canvas</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render pixels and images.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -40,7 +40,7 @@ public static class Program
|
||||
private static void Render(IRenderable canvas, string title)
|
||||
{
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule($"[yellow]{title}[/]").LeftAligned().RuleStyle("grey"));
|
||||
AnsiConsole.Write(new Rule($"[yellow]{title}[/]").LeftJustified().RuleStyle("grey"));
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(canvas);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Charts</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render charts in a console.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Colors</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to use [yellow]c[/][red]o[/][green]l[/][blue]o[/][aqua]r[/][lime]s[/] in the console.</ExampleDescription>
|
||||
<ExampleGroup>Misc</ExampleGroup>
|
||||
|
||||
@@ -23,7 +23,7 @@ public static class Program
|
||||
{
|
||||
AnsiConsole.ResetColors();
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule("[yellow bold underline]3-bit Colors[/]").RuleStyle("grey").LeftAligned());
|
||||
AnsiConsole.Write(new Rule("[yellow bold underline]3-bit Colors[/]").RuleStyle("grey").LeftJustified());
|
||||
AnsiConsole.WriteLine();
|
||||
|
||||
for (var i = 0; i < 8; i++)
|
||||
@@ -46,7 +46,7 @@ public static class Program
|
||||
{
|
||||
AnsiConsole.ResetColors();
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule("[yellow bold underline]4-bit Colors[/]").RuleStyle("grey").LeftAligned());
|
||||
AnsiConsole.Write(new Rule("[yellow bold underline]4-bit Colors[/]").RuleStyle("grey").LeftJustified());
|
||||
AnsiConsole.WriteLine();
|
||||
|
||||
for (var i = 0; i < 16; i++)
|
||||
@@ -69,7 +69,7 @@ public static class Program
|
||||
{
|
||||
AnsiConsole.ResetColors();
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule("[yellow bold underline]8-bit Colors[/]").RuleStyle("grey").LeftAligned());
|
||||
AnsiConsole.Write(new Rule("[yellow bold underline]8-bit Colors[/]").RuleStyle("grey").LeftJustified());
|
||||
AnsiConsole.WriteLine();
|
||||
|
||||
for (var i = 0; i < 16; i++)
|
||||
@@ -96,7 +96,7 @@ public static class Program
|
||||
{
|
||||
AnsiConsole.ResetColors();
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule("[yellow bold underline]24-bit Colors[/]").RuleStyle("grey").LeftAligned());
|
||||
AnsiConsole.Write(new Rule("[yellow bold underline]24-bit Colors[/]").RuleStyle("grey").LeftJustified());
|
||||
AnsiConsole.WriteLine();
|
||||
|
||||
AnsiConsole.Write(new ColorBox(width: 80, height: 15));
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Columns</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render data into columns.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Cursor</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to move the cursor.</ExampleDescription>
|
||||
<ExampleGroup>Misc</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Emojis</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render emojis.</ExampleDescription>
|
||||
<ExampleGroup>Misc</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Exceptions</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render formatted exceptions.</ExampleDescription>
|
||||
<ExampleGroup>Misc</ExampleGroup>
|
||||
|
||||
@@ -19,17 +19,17 @@ public static class Program
|
||||
catch (Exception ex)
|
||||
{
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule("Default").LeftAligned());
|
||||
AnsiConsole.Write(new Rule("Default").LeftJustified());
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.WriteException(ex);
|
||||
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule("Compact").LeftAligned());
|
||||
AnsiConsole.Write(new Rule("Compact").LeftJustified());
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.WriteException(ex, ExceptionFormats.ShortenEverything | ExceptionFormats.ShowLinks);
|
||||
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule("Compact + Custom colors").LeftAligned());
|
||||
AnsiConsole.Write(new Rule("Compact + Custom colors").LeftJustified());
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.WriteException(ex, new ExceptionSettings
|
||||
{
|
||||
@@ -56,7 +56,7 @@ public static class Program
|
||||
catch (Exception ex)
|
||||
{
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule("Async").LeftAligned());
|
||||
AnsiConsole.Write(new Rule("Async").LeftJustified());
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.WriteException(ex, ExceptionFormats.ShortenPaths);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Figlet</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render FIGlet text.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -6,8 +6,8 @@ public static class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
AnsiConsole.Write(new FigletText("Left aligned").LeftAligned().Color(Color.Red));
|
||||
AnsiConsole.Write(new FigletText("Left aligned").LeftJustified().Color(Color.Red));
|
||||
AnsiConsole.Write(new FigletText("Centered").Centered().Color(Color.Green));
|
||||
AnsiConsole.Write(new FigletText("Right aligned").RightAligned().Color(Color.Blue));
|
||||
AnsiConsole.Write(new FigletText("Right aligned").RightJustified().Color(Color.Blue));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Grids</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render grids in a console.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Info</ExampleTitle>
|
||||
<ExampleDescription>Displays the capabilities of the current console.</ExampleDescription>
|
||||
<ExampleGroup>Misc</ExampleGroup>
|
||||
|
||||
16
examples/Console/Json/Json.csproj
Normal file
16
examples/Console/Json/Json.csproj
Normal file
@@ -0,0 +1,16 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Json</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to print syntax highlighted JSON.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Shared\Shared.csproj" />
|
||||
<ProjectReference Include="..\..\..\src\Spectre.Console.Json\Spectre.Console.Json.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
36
examples/Console/Json/Program.cs
Normal file
36
examples/Console/Json/Program.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using Spectre.Console;
|
||||
using Spectre.Console.Json;
|
||||
|
||||
namespace Json;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
var json = new JsonText(
|
||||
"""
|
||||
{
|
||||
"hello": 32,
|
||||
"world": {
|
||||
"foo": 21,
|
||||
"bar": 255,
|
||||
"baz": [
|
||||
0.32, 0.33e-32,
|
||||
0.42e32, 0.55e+32,
|
||||
{
|
||||
"hello": "world",
|
||||
"lol": null
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
""");
|
||||
|
||||
AnsiConsole.Write(
|
||||
new Panel(json)
|
||||
.Header("Some JSON in a panel")
|
||||
.Collapse()
|
||||
.RoundedBorder()
|
||||
.BorderColor(Color.Yellow));
|
||||
}
|
||||
}
|
||||
15
examples/Console/Layout/Layout.csproj
Normal file
15
examples/Console/Layout/Layout.csproj
Normal file
@@ -0,0 +1,15 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Layout</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to use layouts.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\..\Shared\Shared.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
60
examples/Console/Layout/Program.cs
Normal file
60
examples/Console/Layout/Program.cs
Normal file
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using Spectre.Console;
|
||||
|
||||
namespace Layouts;
|
||||
|
||||
public static class Program
|
||||
{
|
||||
public static void Main()
|
||||
{
|
||||
var layout = CreateLayout();
|
||||
AnsiConsole.Write(layout);
|
||||
|
||||
Console.ReadKey(true);
|
||||
}
|
||||
|
||||
private static Layout CreateLayout()
|
||||
{
|
||||
var layout = new Layout();
|
||||
|
||||
layout.SplitRows(
|
||||
new Layout("Top")
|
||||
.SplitColumns(
|
||||
new Layout("Left")
|
||||
.SplitRows(
|
||||
new Layout("LeftTop"),
|
||||
new Layout("LeftBottom")),
|
||||
new Layout("Right").Ratio(2),
|
||||
new Layout("RightRight").Size(3)),
|
||||
new Layout("Bottom"));
|
||||
|
||||
layout["LeftBottom"].Update(
|
||||
new Panel("[blink]PRESS ANY KEY TO QUIT[/]")
|
||||
.Expand()
|
||||
.BorderColor(Color.Yellow)
|
||||
.Padding(0, 0));
|
||||
|
||||
layout["Right"].Update(
|
||||
new Panel(
|
||||
new Table()
|
||||
.AddColumns("[blue]Qux[/]", "[green]Corgi[/]")
|
||||
.AddRow("9", "8")
|
||||
.AddRow("7", "6")
|
||||
.Expand())
|
||||
.Header("A [yellow]Table[/] in a [blue]Panel[/] (Ratio=2)")
|
||||
.Expand());
|
||||
|
||||
layout["RightRight"].Update(
|
||||
new Panel("Explicit-size-is-[yellow]3[/]")
|
||||
.BorderColor(Color.Yellow)
|
||||
.Padding(0, 0));
|
||||
|
||||
layout["Bottom"].Update(
|
||||
new Panel(
|
||||
new FigletText("Hello World"))
|
||||
.Header("Some [green]Figlet[/] text")
|
||||
.Expand());
|
||||
|
||||
return layout;
|
||||
}
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Links</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render links in a console.</ExampleDescription>
|
||||
<ExampleGroup>Misc</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Live</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to do live updates.</ExampleDescription>
|
||||
<ExampleGroup>Live</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>LiveTable</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to do live updates in a table.</ExampleDescription>
|
||||
<ExampleGroup>Live</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<ExampleTitle>Minimal</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates a minimal console application.</ExampleDescription>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Panels</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render items in panels.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -17,7 +17,7 @@ public static class Program
|
||||
|
||||
// Left adjusted panel with text
|
||||
AnsiConsole.Write(
|
||||
new Panel(new Text("Left adjusted\nLeft").LeftAligned())
|
||||
new Panel(new Text("Left adjusted\nLeft").LeftJustified())
|
||||
.Expand()
|
||||
.SquareBorder()
|
||||
.Header("[red]Left[/]"));
|
||||
@@ -32,7 +32,7 @@ public static class Program
|
||||
|
||||
// Right adjusted, rounded panel with text
|
||||
AnsiConsole.Write(
|
||||
new Panel(new Text("Right adjusted\nRight").RightAligned())
|
||||
new Panel(new Text("Right adjusted\nRight").RightJustified())
|
||||
.Expand()
|
||||
.RoundedBorder()
|
||||
.Header("[blue]Right[/]")
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Paths</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render paths.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -58,9 +58,9 @@ public static class Program
|
||||
var table = new Table().BorderColor(Color.Grey).Title("Aligned").RoundedBorder();
|
||||
table.AddColumns("[grey]Alignment[/]", "[grey]Path[/]");
|
||||
|
||||
table.AddRow(new Text("Left"), new TextPath(path).LeftAligned());
|
||||
table.AddRow(new Text("Left"), new TextPath(path).LeftJustified());
|
||||
table.AddRow(new Text("Center"), new TextPath(path).Centered());
|
||||
table.AddRow(new Text("Right"), new TextPath(path).RightAligned());
|
||||
table.AddRow(new Text("Right"), new TextPath(path).RightJustified());
|
||||
|
||||
AnsiConsole.Write(table);
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Progress</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to show progress bars.</ExampleDescription>
|
||||
<ExampleGroup>Status</ExampleGroup>
|
||||
|
||||
@@ -35,12 +35,18 @@ namespace Prompt
|
||||
WriteDivider("Secrets");
|
||||
var password = AskPassword();
|
||||
|
||||
WriteDivider("Mask");
|
||||
var mask = AskPasswordWithCustomMask();
|
||||
|
||||
WriteDivider("Null Mask");
|
||||
var nullMask = AskPasswordWithNullMask();
|
||||
|
||||
WriteDivider("Optional");
|
||||
var color = AskColor();
|
||||
|
||||
// Summary
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule("[yellow]Results[/]").RuleStyle("grey").LeftAligned());
|
||||
AnsiConsole.Write(new Rule("[yellow]Results[/]").RuleStyle("grey").LeftJustified());
|
||||
AnsiConsole.Write(new Table().AddColumns("[grey]Question[/]", "[grey]Answer[/]")
|
||||
.RoundedBorder()
|
||||
.BorderColor(Color.Grey)
|
||||
@@ -49,13 +55,15 @@ namespace Prompt
|
||||
.AddRow("[grey]Favorite sport[/]", sport)
|
||||
.AddRow("[grey]Age[/]", age.ToString())
|
||||
.AddRow("[grey]Password[/]", password)
|
||||
.AddRow("[grey]Mask[/]", mask)
|
||||
.AddRow("[grey]Null Mask[/]", nullMask)
|
||||
.AddRow("[grey]Favorite color[/]", string.IsNullOrEmpty(color) ? "Unknown" : color));
|
||||
}
|
||||
|
||||
private static void WriteDivider(string text)
|
||||
{
|
||||
AnsiConsole.WriteLine();
|
||||
AnsiConsole.Write(new Rule($"[yellow]{text}[/]").RuleStyle("grey").LeftAligned());
|
||||
AnsiConsole.Write(new Rule($"[yellow]{text}[/]").RuleStyle("grey").LeftJustified());
|
||||
}
|
||||
|
||||
public static bool AskConfirmation()
|
||||
@@ -147,6 +155,22 @@ namespace Prompt
|
||||
.Secret());
|
||||
}
|
||||
|
||||
public static string AskPasswordWithCustomMask()
|
||||
{
|
||||
return AnsiConsole.Prompt(
|
||||
new TextPrompt<string>("Enter [green]password[/]?")
|
||||
.PromptStyle("red")
|
||||
.Secret('-'));
|
||||
}
|
||||
|
||||
public static string AskPasswordWithNullMask()
|
||||
{
|
||||
return AnsiConsole.Prompt(
|
||||
new TextPrompt<string>("Enter [green]password[/]?")
|
||||
.PromptStyle("red")
|
||||
.Secret(null));
|
||||
}
|
||||
|
||||
public static string AskColor()
|
||||
{
|
||||
return AnsiConsole.Prompt(
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<LangVersion>9</LangVersion>
|
||||
<ExampleTitle>Prompt</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to get input from a user.</ExampleDescription>
|
||||
|
||||
@@ -11,14 +11,14 @@ public static class Program
|
||||
new Rule()
|
||||
.RuleStyle(Style.Parse("yellow"))
|
||||
.AsciiBorder()
|
||||
.LeftAligned());
|
||||
.LeftJustified());
|
||||
|
||||
// Left aligned title
|
||||
Render(
|
||||
new Rule("[blue]Left aligned[/]")
|
||||
.RuleStyle(Style.Parse("red"))
|
||||
.DoubleBorder()
|
||||
.LeftAligned());
|
||||
.LeftJustified());
|
||||
|
||||
// Centered title
|
||||
Render(
|
||||
@@ -31,7 +31,7 @@ public static class Program
|
||||
Render(
|
||||
new Rule("[red]Right aligned[/]")
|
||||
.RuleStyle(Style.Parse("blue"))
|
||||
.RightAligned());
|
||||
.RightJustified());
|
||||
}
|
||||
|
||||
private static void Render(Rule rule)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Rules</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render horizontal rules (lines).</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Showcase</ExampleTitle>
|
||||
<ExampleDescription>Demonstation of Spectre.Console.</ExampleDescription>
|
||||
<ExampleGroup>Misc</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Status</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to show status updates.</ExampleDescription>
|
||||
<ExampleGroup>Status</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Tables</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render tables in a console.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleTitle>Trees</ExampleTitle>
|
||||
<ExampleDescription>Demonstrates how to render trees in a console.</ExampleDescription>
|
||||
<ExampleGroup>Widgets</ExampleGroup>
|
||||
|
||||
@@ -77,6 +77,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Paths", "Console\Paths\Path
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Spectre.Console.Cli", "..\src\Spectre.Console.Cli\Spectre.Console.Cli.csproj", "{EFAADF6A-C77D-41EC-83F5-BBB4FFC5A6D7}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Layout", "Console\Layout\Layout.csproj", "{A9FDE73A-8452-4CA3-B366-3F900597E132}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Json", "Console\Json\Json.csproj", "{ABE3E734-0756-4D5A-B28A-E6E526D9927D}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -507,6 +511,30 @@ Global
|
||||
{EFAADF6A-C77D-41EC-83F5-BBB4FFC5A6D7}.Release|x64.Build.0 = Release|Any CPU
|
||||
{EFAADF6A-C77D-41EC-83F5-BBB4FFC5A6D7}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{EFAADF6A-C77D-41EC-83F5-BBB4FFC5A6D7}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A9FDE73A-8452-4CA3-B366-3F900597E132}.Release|x86.Build.0 = Release|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Release|x64.Build.0 = Release|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{ABE3E734-0756-4D5A-B28A-E6E526D9927D}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -20,12 +20,12 @@ public sealed class ColorBox : Renderable
|
||||
_width = width;
|
||||
}
|
||||
|
||||
protected override Measurement Measure(RenderContext context, int maxWidth)
|
||||
protected override Measurement Measure(RenderOptions options, int maxWidth)
|
||||
{
|
||||
return new Measurement(1, GetWidth(maxWidth));
|
||||
}
|
||||
|
||||
protected override IEnumerable<Segment> Render(RenderContext context, int maxWidth)
|
||||
protected override IEnumerable<Segment> Render(RenderOptions options, int maxWidth)
|
||||
{
|
||||
maxWidth = GetWidth(maxWidth);
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ExampleVisible>false</ExampleVisible>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
{
|
||||
"projects": [ "src", "tests" ],
|
||||
"sdk": {
|
||||
"version": "6.0.300",
|
||||
"rollForward": "latestFeature"
|
||||
"version": "7.0.100"
|
||||
}
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user