diff --git a/PwshSpectreConsole.Docs/astro.config.mjs b/PwshSpectreConsole.Docs/astro.config.mjs index 2679406..d94c1de 100644 --- a/PwshSpectreConsole.Docs/astro.config.mjs +++ b/PwshSpectreConsole.Docs/astro.config.mjs @@ -33,7 +33,7 @@ export default defineConfig({ }, { label: "Upgrading to v2", - link: "/guides/upgrading-to-2-0/", + link: "/guides/upgrading-to-v2/", badge: { text: "New", variant: "tip", diff --git a/PwshSpectreConsole.Docs/public/filebrowser.gif b/PwshSpectreConsole.Docs/public/filebrowser.gif new file mode 100644 index 0000000..1ba34ee Binary files /dev/null and b/PwshSpectreConsole.Docs/public/filebrowser.gif differ diff --git a/PwshSpectreConsole.Docs/src/content/docs/guides/upgrading-to-2-0.md b/PwshSpectreConsole.Docs/src/content/docs/guides/upgrading-to-v2.md similarity index 88% rename from PwshSpectreConsole.Docs/src/content/docs/guides/upgrading-to-2-0.md rename to PwshSpectreConsole.Docs/src/content/docs/guides/upgrading-to-v2.md index 4b9ed08..91b95e7 100644 --- a/PwshSpectreConsole.Docs/src/content/docs/guides/upgrading-to-2-0.md +++ b/PwshSpectreConsole.Docs/src/content/docs/guides/upgrading-to-v2.md @@ -5,12 +5,13 @@ description: Breaking and important changes. ## 🚀 Check out the Prerelease Build -Install or update to the pre-release version of the module. +Install or update to the latest version of the module. ```powershell -Install-Module PwshSpectreConsole -Scope CurrentUser -AllowPrerelease -# or update to the prerelease version -Update-Module PwshSpectreConsole -Scope CurrentUser -AllowPrerelease +# Install the latest version +Install-Module PwshSpectreConsole -Scope CurrentUser +# or update your existing version to the latest +Update-Module PwshSpectreConsole -Scope CurrentUser ``` ## 💥 Breaking Changes @@ -50,7 +51,15 @@ $fruits = @( } | Format-SpectreTable -Color Cyan1 ``` -### New Commandlets +### Live Rendering + +The `Invoke-SpectreLive` function allows you to run a scriptblock and update a renderable item live in real-time. This allow you to build simple terminal user interfaces or live updating dashboards. + +See the documentation for [`Invoke-SpectreLive`](/reference/live/invoke-spectrelive/) for more information and examples. + +![Filebrowser example](../../../../public/filebrowser.gif) + +### All New Commandlets New commandlets to make this PowerShell library compatible with the rest of the Spectre.Console C# library: diff --git a/PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1 b/PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1 index 731fdd0..288ad00 100644 --- a/PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1 +++ b/PwshSpectreConsole.Docs/src/powershell/UpdateDocs.ps1 @@ -191,7 +191,7 @@ foreach ($doc in $docs) { Set-Location "$PSScriptRoot/../../../PwshSpectreConsole" Push-Location -StackName "ExampleInvoke" Invoke-Expression $code - Set-SpectreColors -AccentColor "Turquoise2" + Set-SpectreColors -AccentColor "Blue" Pop-Location -StackName "ExampleInvoke" $recording = Stop-SpectreRecording -Title "Example $([int]$example++)" diff --git a/PwshSpectreConsole/public/formatting/Format-SpectreRows.ps1 b/PwshSpectreConsole/public/formatting/Format-SpectreRows.ps1 index 77d5952..c6f8d12 100644 --- a/PwshSpectreConsole/public/formatting/Format-SpectreRows.ps1 +++ b/PwshSpectreConsole/public/formatting/Format-SpectreRows.ps1 @@ -42,7 +42,7 @@ function Format-SpectreRows { if ($dataItem -is [Spectre.Console.Rendering.Renderable]) { $rowItems += $dataItem } elseif ($dataItem -is [string]) { - $rowItems += [Spectre.Console.Text]::new($dataItem) + $rowItems += $dataItem | ConvertTo-Renderable } else { throw "Data item must be a spectre renderable object or string" } @@ -51,7 +51,7 @@ function Format-SpectreRows { if ($Data -is [Spectre.Console.Rendering.Renderable]) { $rowItems += $Data } elseif ($Data -is [string]) { - $rowItems += [Spectre.Console.Text]::new($Data) + $rowItems += $Data | ConvertTo-Renderable } else { throw "Data item must be a spectre renderable object or string" }