* Allow setting the style of the default value in TextPrompt
Add property "DefaultValueStyle" to TextPrompt which allows setting the style in which the default value is rendered.
When no style is set, the value is displayed as green text, keeping the existing behavior.
* Allow setting the style in which a TextPrompt's choices are displayed
Add property "ChoicesStyle" to TextPrompt which allows setting the style in the prompt's choices are rendered.
When no style is set, choices are displayed as blue text, keeping the existing behavior.
`AnsiConsoleFactory` should be an internal static class. Creating an `IAnsiConsole` can be achieved through `Spectre.Console.AnsiConsole.Create(AnsiConsoleSettings)`
Since `AnsiConsoleFactory` is public, it can't be changed from a non static class to a static class so obsoleting it is the second best thing to do.
Eventually, when `AnsiConsoleFactory` becomes internal and static, `AnsiConsole.Create` can be simplified to this (and the private static field `_factory` can be removed)
```
public static IAnsiConsole Create(AnsiConsoleSettings settings)
{
return AnsiConsoleFactory.Create(settings);
}
```
* Introduce MarkupInterpolated and MarkupLineInterpolated extensions
These new methods enable easily writing markup with a nice and intuitive syntax without having to worry about escaping the markup.
```csharp
string input = args[0];
string output = Process(input);
AnsiConsole.MarkupLineInterpolated($"[blue]{input}[/] -> [green]{output}[/]");
```
The `Interpolated` suffix was inspired by the Entity Framework Core [FromSqlInterpolated][1] method.
[1]: https://docs.microsoft.com/en-us/ef/core/querying/raw-sql#passing-parameters
* Fixing whitespace to match file scoped namespaces
* Adding FromInterpolated helper to Markup widget
Allows automatic handling of interpolated strings to be used on the Markup widget. This would be helpful for people working with Tables and the Tree control who would not be using the MarkupInterpolated methods.
* Documentation for markup interpolated methods.
Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>
* Upgrades Statiq.Web to which contains analyzer perf improvements
* Dropping script front matter when not needed from blog archives
* Trimming down the number of files tailwind examines when building the css file to only a subset of the docs.
* Updates Playwright to latest version
* Updates tailwind and asciienma to latest
* Removes npm packages that are no longer required
* Adding a dark mode
* Adding reference for types to summary pages
* Adding API Reference
* Adding modifiers to methods/fields/etc
* Minimizing files input
* Caching a lot of the output pages
* Cache only for each execution
* Adding API references to existing docs
Now that exceptions are not _parsed_ anymore (#513 and #637), keeping the `ExceptionInfo` and `StackFrameInfo` internal classes doesn't make much sense anymore. The `Exception` and `StackFrame` types can be used by the `ExceptionFormatter` class directly, without conversion.
This is the natural extension of #513 which already removed a lot of regex parsing.
The `ExceptionParser` class is renamed into `ExceptionConverter` because there is no more string parsing performed at all. `Exception` is converted into `ExceptionInfo` and `StackFrame` is converted into `StackFrameInfo`.
I kept running into https://github.com/JosefPihrt/Roslynator/issues/833 when using Rider, but it seems this was fixed in version 3.2 thanks to a fix in how they are doing assemblies. Looks like this would also include benefits for people using VS2022 too
* Updating doc build dependencies
Updates playwright to latest version. This requires an update in how it is ran as part of the statiq build set up to ensure dependencies exist for the run.
Also brings misc packages up to date to fix vulnerabilities.
* Updates CI to use node v16 and dotnet 5
Playwright CLI currently needs net5 to execute. There is a PR in the works to get it running on net6 but until then the recommended steps it to have both installed.
CommandOptions now has an IsHidden property that, when set to true, will cause the option to be hidden from the following cases:
- Help text using `-h|--help`
- Xml representations generated with the `cli xml` command
- Diagnostics displayed with the `cli explain` command
Hidden options can still be outputted with `cli explain` using the `--hidden` option that is also used to display hidden commands.
Fixes#631
The generic parameters were double escaped and would display as `[[T0,T1,TRet]]` instead of `[T0,T1,TRet]`. This is because the `builder.AppendWithStyle` method already escapes its value so the caller must not escape the passed value.