Commit Graph

78 Commits

Author SHA1 Message Date
d921ac6f02 Positioned Progress Tasks - Before or After Other Tasks (#1250) 2024-03-07 08:38:59 +00:00
397b742bec Add selection orompt Search (#1289)
* Add selection prompt search as you type

* Fix small bug

* Simplify

* Simplify

* Remove spacebar as a selection prompt submit key

* Trigger CI

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

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

* Simplifty Mask method

* Handle multi-selection prompt better

* Update API naming

* Address feedback

* Add some tests

* Remove whitespace

* Improve search and highlighting

* Add test case for previous issue

* Add extra test case

* Make prompt searchable

---------

Co-authored-by: Martin Costello <martin@martincostello.com>
Co-authored-by: Patrik Svensson <patrik@patriksvensson.se>
2024-02-25 12:57:27 +01:00
b6e0b2389a chore: Update dependency Verify.Xunit to v23.2.0 2024-02-15 07:45:54 +01:00
e13410861d Update dependencies to latest version 2024-02-13 09:34:00 +01:00
bf3b91a535 Don't erase the prompt text when backspacing on a secret prompt with a null mask. 2024-02-13 09:01:24 +01:00
72704529c5 Delete [UsesVerify] which has become obsolete through the latest update. 2024-02-13 08:53:16 +01:00
b21e07ea94 Update dependencies
* Add support for C# 12
* Run all tests on all major .NET SDKs
* Only build on Ubuntu
* Do not build docs for pull requests
* Add Cédric Luthi, and Frank Ray to authors
* Drop netstandard2.0 for ImageSharp plugin
2024-01-31 20:51:49 +01:00
703d653ec5 Adds ValueFormatter to ProgressBar 2024-01-31 17:37:05 +01:00
44300c871f fixed line-endings 2023-11-28 00:14:54 +01:00
4d6541dd14 Add back net7.0 TFM for tests 2023-11-19 12:18:22 +01:00
b1e0896a0d Add net8.0 support 2023-11-14 22:24:53 +01:00
bbf58ee814 (#1188) Rows measure greedy 2023-10-19 07:46:12 +02:00
943c045fab Fixes TextPath rendering bugs (#1308)
* Do not emit line break when rendering
* Don't be greedy when measuring.
* Fix a condition that decides if the path fits in the allotted space.

Closes #1307
2023-09-18 08:04:57 +02:00
3bee7212b7 Merge pull request #1303 from nils-a/feature/GH-684 2023-09-16 19:37:00 +02:00
c82d8c4523 Add option to show separator between table rows (#1304)
* Add option to show separator between table rows
* Panels should show header if borders are not shown

Closes #835
2023-09-16 18:49:12 +02:00
bef21e8a21 (#684) Enable setting the color of the values in a BreakdownChart 2023-09-15 20:12:06 +02:00
cec5fb4595 Render tables with zero-width columns (#1197)
Fixes https://github.com/spectreconsole/spectre.console/issues/361
2023-09-12 15:46:25 +02:00
e0ded712e8 Add fix to avoid exception on Rows with no children 2023-06-13 00:36:06 +02:00
71a5d83067 Fixed render issue where writeline inside status caused corrupt output #415 #694 2023-06-04 20:31:12 +02:00
6acf9b8c63 Add an implicit operator to convert from Color to Style (#1160) 2023-05-10 14:20:12 +01:00
54be64ec84 Add JSON text renderer (#1086)
* Add JsonText widget to render highlighted JSON

Closes #1051
2022-12-31 18:17:15 +00:00
b793482ebb Command line argument parsing improvements (#1048)
* Support negative numbers as command option values
* Support command line options before arguments
* POSIX-compliant handling of quotes (double and single, terminated and unterminated), whitespace, hyphens, and special characters (e.g. emojis)
2022-12-05 01:07:53 +01:00
f895bb175d modified tokenizer to not break on on ]]] at the end of a style 2022-12-01 22:32:32 +01:00
55c3f3b7a8 Figlet text should not pad on right side automatically 2022-11-15 12:36:49 +01:00
c3ec6a7363 Add Layout widget (#1041)
* Add width to panels
* Add height to panels
* Replace RenderContext with RenderOptions
* Remove exclusivity from alternative buffer
* Add Layout widget
* Add Align widget
2022-11-15 10:12:17 +01:00
7dce4af552 Add support for .NET 7.0 2022-11-10 12:01:13 +01:00
6a4d8c8f30 Add culture option to TypeConverterHelper, TextPrompt and AnsiConsole (#1014)
* Add culture option to TypeConverterHelper, TextPrompt and AnsiConsole

* Add IHasCulture interface
2022-10-15 11:19:06 +02:00
999c59909b Fix @ being used in figlet font 2022-10-01 17:12:11 +02:00
fd8d271a10 chore: Update dependency Microsoft.NET.Test.Sdk to v17.3.2 2022-10-01 17:10:10 +02:00
4f0ec87522 Allow selections to wrap around 2022-09-26 23:32:57 -04:00
eb02c3d534 Custom mask for secret (#970)
* Masking Character added, not yet used.

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

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

* Check if mask is null first.

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

* Added tests for masking with null character

* Added docs and example.

* Adjusted extensions so that Mask is integrated into Secret extension. Updated Exampls and Tests accordingly
2022-09-26 20:34:41 +02:00
088db165ed Added tests on backward direction of autocomplete 2022-09-19 08:58:45 +02:00
2bd1383cbe Fixed punctuation 2022-08-29 08:54:30 +02:00
00a9ba325e restructured MarkupTokenizer a bit. 2022-08-29 08:54:30 +02:00
540bc1307c fixed warning 2022-08-29 08:54:30 +02:00
a6618f762c Modified MarkupTokenizer
So escaped markup in markup is valid.
2022-08-29 08:54:30 +02:00
638149f44b fixed punctuation in exception 2022-08-29 08:54:30 +02:00
0d72b94f9c added some breaking unit tests 2022-08-29 08:54:30 +02:00
3a7b8aa1d2 chore: Update dependency xunit to v2.4.2 2022-08-03 15:04:26 +02:00
dc93edef15 Remove the 'net50' TFM
Also updates all dependencies to the latest version.

Closes #829
2022-07-02 11:18:34 +02:00
36ca22ffac Move Spectre.Console.Cli to it's own package 2022-05-15 00:09:52 +02:00
38d9386e00 Add option to configure the style of the choices list and the default value in TextPrompt (#681)
* Allow setting the style of the default value in TextPrompt

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

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

Add property "ChoicesStyle" to TextPrompt which allows setting the style in the prompt's choices are rendered.
When no style is set, choices are displayed as blue text, keeping the existing behavior.
2022-03-27 19:38:01 +02:00
1d8154f9b0 Introduce MarkupInterpolated and MarkupLineInterpolated extensions (#761)
* Introduce MarkupInterpolated and MarkupLineInterpolated extensions

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

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

```

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

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

* Fixing whitespace to match file scoped namespaces

* Adding FromInterpolated helper to Markup widget

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

* Documentation for markup interpolated methods.

Co-authored-by: Cédric Luthi <cedric.luthi@gmail.com>
2022-03-22 22:34:25 +01:00
eb4a7d3bf4 Add support for alignment 2022-02-23 09:06:51 -05:00
5e41a2f505 Add support for styling segments 2022-02-23 09:06:51 -05:00
66fc949e2a Initial work on TextPath widget 2022-02-20 23:26:04 -05:00
74a2e10ff0 Making tuples pretty too 2022-02-04 10:30:09 +01:00
78958aae27 Adding better type names for return types and parameters
Uses the typenamehelper from Ben.Demystifer to help break down things like generic lists into their actual type display name.
2022-02-04 10:30:09 +01:00
52c1d9122b Add global usings (#668)
* Use global usings

* Fix namespace declarations for test projects
2021-12-23 16:50:31 +01:00
ec1188b837 Use file scoped namespace declarations 2021-12-22 08:51:17 -05:00