diff --git a/.gitattributes b/.gitattributes index ef82812..efdba87 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,64 +1,2 @@ -############################################################################### -# Set default behavior to automatically normalize line endings. -############################################################################### * text=auto *.sh text eol=lf - -############################################################################### -# Set default behavior for command prompt diff. -# -# This is need for earlier builds of msysgit that does not have it on by -# default for csharp files. -# Note: This is only used by command line -############################################################################### -#*.cs diff=csharp - -############################################################################### -# Set the merge driver for project and solution files -# -# Merging from the command prompt will add diff markers to the files if there -# are conflicts (Merging from VS is not affected by the settings below, in VS -# the diff markers are never inserted). Diff markers may cause the following -# file extensions to fail to load in VS. An alternative would be to treat -# these files as binary and thus will always conflict and require user -# intervention with every merge. To do so, just uncomment the entries below -############################################################################### -#*.sln merge=binary -#*.csproj merge=binary -#*.vbproj merge=binary -#*.vcxproj merge=binary -#*.vcproj merge=binary -#*.dbproj merge=binary -#*.fsproj merge=binary -#*.lsproj merge=binary -#*.wixproj merge=binary -#*.modelproj merge=binary -#*.sqlproj merge=binary -#*.wwaproj merge=binary - -############################################################################### -# behavior for image files -# -# image files are treated as binary by default. -############################################################################### -#*.jpg binary -#*.png binary -#*.gif binary - -############################################################################### -# diff behavior for common document formats -# -# Convert binary document formats to text before diffing them. This feature -# is only available from the command line. Turn it on by uncommenting the -# entries below. -############################################################################### -#*.doc diff=astextplain -#*.DOC diff=astextplain -#*.docx diff=astextplain -#*.DOCX diff=astextplain -#*.dot diff=astextplain -#*.DOT diff=astextplain -#*.pdf diff=astextplain -#*.PDF diff=astextplain -#*.rtf diff=astextplain -#*.RTF diff=astextplain diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index aa22b9d..e69de29 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -1 +0,0 @@ -# These are supported funding model platforms diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8410cd0..a5658cf 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,22 +30,15 @@ jobs: - name: Restore dependencies run: dotnet restore ShellUI.slnx - # Generates src/ShellUI.Components/wwwroot/shellui-all.css fresh on every run. - # File is gitignored — the Windows + Linux Tailwind CLI binaries produce - # byte-different output, so drift-checking a committed file failed spuriously. - # Instead we regenerate and validate content properties. + # Regenerated every run: it's gitignored because Windows and Linux Tailwind builds differ byte for byte. - name: Build precompiled CSS bundle - # Invoke via `bash` (not `./script.sh`) so we don't rely on the file's - # executable bit. Windows contributors can edit and commit without - # remembering `git update-index --chmod=+x`. + # Run through bash so the executable bit doesn't matter. run: | set -euxo pipefail bash scripts/rebuild-precompiled-css.sh BUNDLE=src/ShellUI.Components/wwwroot/shellui-all.css test -f "$BUNDLE" || (echo "ERROR: bundle was not produced"; exit 1) - # Content assertions using grep -F (fixed-string, no regex escaping headaches). - # These catch classes of bugs we've actually shipped before — worth the paranoia. grep -Fq -- '--background' "$BUNDLE" || (echo "ERROR: theme vars not in bundle"; exit 1) grep -Fq '.bg-background' "$BUNDLE" || (echo "ERROR: core utility rule missing"; exit 1) grep -Fq 'hover\:bg-accent' "$BUNDLE" || (echo "ERROR: hover: modifier rules missing"; exit 1) @@ -53,8 +46,7 @@ jobs: grep -Fq 'px-2\.5' "$BUNDLE" || (echo "ERROR: Badge padding class px-2.5 missing (variant .cs helpers not scanned?)"; exit 1) grep -Fq 'border-transparent' "$BUNDLE" || (echo "ERROR: border-transparent missing (variant .cs helpers not scanned?)"; exit 1) - # Size guard — keep the threshold above the current component bundle, - # but below runaway output (for example, an unminified full Tailwind base). + # Above the current bundle, below an accidental full Tailwind build. size=$(wc -c < "$BUNDLE") echo "precompiled bundle size: ${size} bytes" if [ "$size" -gt 150000 ]; then @@ -68,8 +60,7 @@ jobs: - name: Run tests run: dotnet test ShellUI.slnx --no-restore --no-build --configuration Release --verbosity normal - # End-to-end build of a scaffolded project — catches anything the in-process - # TemplateCompileTests miss (missing usings, dependency resolution). + # Builds a scaffolded project; catches what TemplateCompileTests can't. - name: Smoke-test CLI scaffolding shell: bash run: | @@ -84,8 +75,6 @@ jobs: cd SmokeApp shellui init --tailwind standalone --yes - # Assert init produced a working host: App.razor patched with render mode, - # theme bootstrap, and shellui.js script tag. grep -q 'HeadOutlet @rendermode="InteractiveServer"' Components/App.razor || (echo "init did not patch HeadOutlet @rendermode"; exit 1) grep -q 'Routes @rendermode="InteractiveServer"' Components/App.razor || (echo "init did not patch Routes @rendermode"; exit 1) grep -q 'ShellUI theme bootstrap' Components/App.razor || (echo "init did not inject theme bootstrap"; exit 1) @@ -95,32 +84,22 @@ jobs: exit 1 fi - # Assert input.css has the full theme, not just @import "tailwindcss"; grep -q '@theme inline' wwwroot/input.css || (echo "init did not write full theme to input.css"; exit 1) grep -q ':root' wwwroot/input.css || (echo "init did not write :root variables to input.css"; exit 1) grep -q '\.dark' wwwroot/input.css || (echo "init did not write .dark variables to input.css"; exit 1) shellui add chart pie-chart dashboard-02 data-table --force - # NuGet dependencies (Blazor-ApexCharts, System.Linq.Dynamic.Core) should - # now be added automatically by `shellui add`. Assert they appear in the - # project file so a regression in the auto-install fails loudly here. grep -q 'Blazor-ApexCharts' SmokeApp.csproj || (echo "shellui add chart did not add Blazor-ApexCharts NuGet dep"; exit 1) grep -q 'System.Linq.Dynamic.Core' SmokeApp.csproj || (echo "shellui add data-table did not add System.Linq.Dynamic.Core NuGet dep"; exit 1) - # And the DataTable models file must land at Components/UI/Models/, not be missing. test -f Components/UI/Models/DataTableModels.cs || (echo "shellui add data-table did not install data-table-models"; exit 1) - # chart-styles ships the CSS for the custom tooltip + ApexCharts chrome. - # Without it, hovering a chart shows invisible white-on-white text. + # Without charts.css, chart tooltips render white on white. test -f wwwroot/css/charts.css || (echo "shellui add chart did not install chart-styles CSS"; exit 1) grep -q '/, not the root. + # A dynamic import of shellui-sidebar.js 404s once compiled into a consumer's RCL. grep -q 'ShellUI.initSidebar' Components/UI/SidebarProvider.razor || (echo "SidebarProvider did not call ShellUI.initSidebar"; exit 1) if grep -Fq 'shellui-sidebar.js' Components/UI/SidebarProvider.razor; then echo "SidebarProvider still dynamically imports shellui-sidebar.js" @@ -134,8 +113,7 @@ jobs: dotnet build -c Debug - # Every direct target must install and compile together; this catches missing - # dependencies and template compile errors that per-template tests can't see. + # Catches missing dependencies that per-template tests can't see. ALL=$(python3 - "$GITHUB_WORKSPACE" <<'PY' import os, re, sys root = sys.argv[1] @@ -155,12 +133,7 @@ jobs: dotnet build -c Debug done - # Pure-NuGet install path — `dotnet add package ShellUI.Components` without - # the CLI. Uses a one-off NuGet.config that whitelists ONLY the local feed, - # so a missing local package can't silently fall back to nuget.org and pull - # an older version (which would mask whether the current PR's package is - # correct). $GITHUB_WORKSPACE is absolute — relative paths from inside the - # temp consumer dir would resolve to the wrong root. + # Package-only install from a local-only feed, so nuget.org can't mask a broken package. - name: NuGet-only install — verify safelist ships shell: bash run: | @@ -169,8 +142,6 @@ jobs: test -d "$LOCAL_FEED" || (echo "local feed not found at $LOCAL_FEED — did the pack step run?"; exit 1) ls "$LOCAL_FEED"/*.nupkg | head -3 - # DIAGNOSTIC: dump what's actually inside the fresh nupkg. The precompiled - # bundle must ship as a static web asset for consumers to `` it. echo "---nupkg contents (looking for shellui-all.css):---" unzip -l "$LOCAL_FEED"/ShellUI.Components*.nupkg | grep -E 'shellui-all|staticwebassets/' | head -10 || echo " (no matches — bundle not in nupkg!)" echo "---source wwwroot check:---" @@ -181,8 +152,6 @@ jobs: dotnet new blazor -o NuGetSmoke --no-restore cd NuGetSmoke - # Pin restore to only the local feed; nuget.org explicitly disabled so a - # broken local feed can't be papered over by a public-published older version. cat > NuGet.config < @@ -193,19 +162,12 @@ jobs: EOF - # Evict every cached ShellUI.Components from ~/.nuget/packages before restore. - # The runner-level cache is restored from actions/cache and may contain a - # stale copy of the current version from an earlier CI run (before we added - # the precompiled bundle, .cs scan, etc.). NuGet prefers cached over local - # feeds when version matches, so a stale cache silently masks the fresh - # nupkg. Wildcard covers any version — future-proof. + # A cached copy of the same version would shadow the fresh nupkg. rm -rf ~/.nuget/packages/shellui.components dotnet add package ShellUI.Components --prerelease - # The safelist gets copied into wwwroot/ during the consumer's build by - # the package's build/ShellUI.Components.targets — auto-imported by NuGet. - # Need to actually build the project, not just restore, for the Copy to run. + # The package's .targets copies the safelist during build, so restore alone isn't enough. dotnet build -c Debug SAFELIST="wwwroot/shellui-classes.txt" @@ -216,16 +178,10 @@ jobs: exit 1 ) - # Sanity: the safelist contains real Tailwind classes grep -q 'bg-background' "$SAFELIST" || (echo "safelist appears malformed — missing core Tailwind class 'bg-background'"; exit 1) wc -l "$SAFELIST" - # In .NET 10, MapStaticAssets() doesn't physically copy static web assets - # from referenced packages into the consumer's bin/ during `dotnet build` - # — it uses a manifest and reads from the extracted NuGet cache at runtime. - # So the correct assertion is "does the file exist in the extracted package - # cache after restore", which proves it'll be served at - # `_content/ShellUI.Components/shellui-all.css` in the running app. + # .NET 10 serves package assets from the NuGet cache, not bin/, so check the extracted package. BUNDLE="$(find ~/.nuget/packages/shellui.components -name 'shellui-all.css' -type f | head -1)" if [ -z "$BUNDLE" ]; then echo "ERROR: shellui-all.css not in consumer's extracted NuGet cache — the pure-NuGet install path is broken." @@ -237,8 +193,6 @@ jobs: BUNDLE_SIZE=$(wc -c < "$BUNDLE") echo "bundle size: $BUNDLE_SIZE bytes" - # Spot-check a handful of representative rules using fixed-string grep - # (no regex escaping headaches). These catch classes of bugs we've hit. grep -Fq -- '--background' "$BUNDLE" || (echo "ERROR: bundle missing --background theme var"; exit 1) grep -Fq '.bg-background' "$BUNDLE" || (echo "ERROR: bundle missing .bg-background utility"; exit 1) grep -Fq 'hover\:bg-accent' "$BUNDLE" || (echo "ERROR: bundle missing hover:bg-accent modifier rule"; exit 1) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fa558cb..e1644d9 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -53,15 +53,14 @@ jobs: - name: Restore dependencies run: dotnet restore ShellUI.slnx - # Generate the precompiled CSS bundle before build so releases always ship - # a fresh one. File is gitignored — regenerated on every CI/release run. + # shellui-all.css is gitignored, so every release regenerates it. - name: Build precompiled CSS bundle run: | set -euxo pipefail bash scripts/rebuild-precompiled-css.sh BUNDLE=src/ShellUI.Components/wwwroot/shellui-all.css test -f "$BUNDLE" || (echo "ERROR: bundle was not produced"; exit 1) - # Content sanity — same assertions ci.yml runs. + # Same checks as ci.yml. grep -q -- '--background:' "$BUNDLE" || (echo "ERROR: theme vars missing"; exit 1) grep -q '\.bg-background' "$BUNDLE" || (echo "ERROR: utilities missing"; exit 1) echo "release bundle size: $(wc -c < "$BUNDLE") bytes" @@ -75,9 +74,7 @@ jobs: - name: Pack NuGet packages run: dotnet pack ShellUI.slnx --no-build --configuration Release -p:ContinuousIntegrationBuild=true - # ShellUI.Core and ShellUI.Templates are internal-only — they have no public API - # surface that consumers reference. Only the CLI tool and the Components runtime - # library are pushed to NuGet. + # Core and Templates are internal; only the CLI and Components are published. - name: Publish to NuGet run: | dotnet nuget push src/ShellUI.CLI/bin/Release/*.nupkg --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json --skip-duplicate diff --git a/.gitignore b/.gitignore index db285ba..3cdd1a9 100644 --- a/.gitignore +++ b/.gitignore @@ -366,8 +366,5 @@ shellui-installation-tests/ # Preview publish output (testing artifacts) preview-publish/ -# Generated Tailwind bundle — regenerated in CI, not committed. -# Windows and Linux Tailwind CLI produce byte-different output; committing -# would cause spurious drift-check failures. Local devs: run -# `bash scripts/rebuild-precompiled-css.sh` before running Path A tests. +# Regenerated in CI; run scripts/rebuild-precompiled-css.sh locally. src/ShellUI.Components/wwwroot/shellui-all.css diff --git a/Directory.Build.props b/Directory.Build.props index d9e1aba..645d1b0 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,12 +1,11 @@ - + - 0.3.0 + 0.3.1 - $(ShellUIVersion) $(ShellUIVersion)-$(ShellUIVersionSuffix) @@ -15,7 +14,6 @@ $(Version) - ShellUI ShellUI diff --git a/NET10/BlazorInteractiveServer/BlazorInteractiveServer.csproj b/NET10/BlazorInteractiveServer/BlazorInteractiveServer.csproj index 93737b4..f9f7fbb 100644 --- a/NET10/BlazorInteractiveServer/BlazorInteractiveServer.csproj +++ b/NET10/BlazorInteractiveServer/BlazorInteractiveServer.csproj @@ -11,11 +11,6 @@ - - - diff --git a/NET10/BlazorInteractiveServer/Components/App.razor b/NET10/BlazorInteractiveServer/Components/App.razor index b034cfb..5883faa 100644 --- a/NET10/BlazorInteractiveServer/Components/App.razor +++ b/NET10/BlazorInteractiveServer/Components/App.razor @@ -6,29 +6,23 @@ - - - - - "; var result = InitService.RewriteAppRazor(bare); @@ -108,8 +105,6 @@ public void RewriteAppRazor_IsIdempotent() [Fact] public void RewriteAppRazor_PreservesExistingRenderMode() { - // If the user (or another tool) already set a different render mode (e.g. Auto), - // we must not overwrite it. const string custom = @"" + "\n" + @""; diff --git a/ShellUI.Tests/IntegrationTest1.cs b/ShellUI.Tests/IntegrationTest1.cs index 15e185b..4c5163d 100644 --- a/ShellUI.Tests/IntegrationTest1.cs +++ b/ShellUI.Tests/IntegrationTest1.cs @@ -17,29 +17,23 @@ public CliIntegrationTests() [Fact] public async Task InitCommand_DoesNotCrash() { - // Create a minimal Blazor project await CreateTestBlazorProject(); - // Run init command with --yes flag (just test it doesn't crash) var exitCode = await RunShellUICommand("init --yes"); - // We expect it to work, but if it fails due to missing dependencies in test env, that's ok - // The important thing is it doesn't crash the process - Assert.True(exitCode == 0 || exitCode == 1); // 0 = success, 1 = expected failure in test env + // init may fail in the test environment; it only must not crash. + Assert.True(exitCode == 0 || exitCode == 1); } [Fact] public async Task AddCommand_DoesNotCrash() { - // Create a minimal Blazor project await CreateTestBlazorProject(); - // Test: Add button component (just test it doesn't crash) var exitCode = await RunShellUICommand("add button"); - // We expect it to work, but if it fails due to missing dependencies in test env, that's ok - // The important thing is it doesn't crash the process - Assert.True(exitCode == 0 || exitCode == 1); // 0 = success, 1 = expected failure in test env + // add may fail in the test environment; it only must not crash. + Assert.True(exitCode == 0 || exitCode == 1); } private async Task CreateTestBlazorProject() @@ -64,7 +58,6 @@ private async Task CreateTestBlazorProject() private async Task RunShellUICommand(string args) { - // Get the path to the CLI from the test directory perspective var solutionDir = Path.GetFullPath(Path.Combine(Directory.GetCurrentDirectory(), "..")); var cliPath = Path.Combine(solutionDir, "src", "ShellUI.CLI", "bin", "Release", "net10.0", "ShellUI.CLI.dll"); diff --git a/ShellUI.Tests/NuGetDepsAndSuggestionsTests.cs b/ShellUI.Tests/NuGetDepsAndSuggestionsTests.cs index 15673a9..f64fc46 100644 --- a/ShellUI.Tests/NuGetDepsAndSuggestionsTests.cs +++ b/ShellUI.Tests/NuGetDepsAndSuggestionsTests.cs @@ -22,8 +22,6 @@ public void FindClosestMatch_SuggestsExpectedComponent(string typo, string expec [Fact] public void FindClosestMatch_ReturnsNullForExactMatch() { - // Exact matches have distance 0 and are excluded from suggestions — - // the caller already knows the component exists. Assert.Null(ComponentRegistry.FindClosestMatch("button")); } @@ -36,8 +34,7 @@ public void FindClosestMatch_ReturnsNullWhenNothingIsClose() [Fact] public void FindClosestMatch_DoesNotSuggestHiddenSubComponents() { - // `data-table-models` is IsAvailable=false (installed only as a dep of data-table). - // A user typo like "data-table-modls" should not be redirected to it. + // Hidden entries are never suggested. var result = ComponentRegistry.FindClosestMatch("data-table-modls"); Assert.NotEqual("data-table-models", result); } @@ -80,9 +77,7 @@ public void Chart_DeclaresBlazorApexCharts() [InlineData("multi-series-chart")] public void ChartVariants_TransitivelyPullInBlazorApexCharts(string componentName) { - // Chart family components don't declare the NuGet dep themselves — they depend - // on `chart` which does. Verify the dependency chain is intact so the installer's - // recursive walk picks up the package. + // Chart types get the NuGet package through their `chart` dependency. var metadata = ComponentRegistry.GetMetadata(componentName); Assert.NotNull(metadata); Assert.Contains("chart", metadata!.Dependencies); @@ -91,10 +86,7 @@ public void ChartVariants_TransitivelyPullInBlazorApexCharts(string componentNam public class DependencyGraphTests { - // Every dependency name declared by any registered component must itself resolve - // via ComponentRegistry.GetMetadata. Catches the class of bug where a sub-component - // template exists on disk but is never wired into the registry — the CLI then - // reports "Failed: " and the consumer project won't compile. + // An unregistered dependency makes `shellui add` report "Failed: ". [Fact] public void EveryDeclaredDependency_ResolvesInRegistry() { @@ -112,10 +104,7 @@ public void EveryDeclaredDependency_ResolvesInRegistry() string.Join("\n ", missing)); } - // Every installable component (IsAvailable = true) must route through the - // GetComponentContent switch. Sub-component stubs registered as IsAvailable = false - // with intentionally-empty Content are allowed — they exist only so the CLI can - // resolve them as dependency names when the parent renders their markup inline. + // Hidden parts may have empty Content when the parent renders their markup. [Fact] public void EveryInstallableComponent_HasContentMapping() { @@ -135,13 +124,7 @@ public void EveryInstallableComponent_HasContentMapping() public class HiddenNetworkDependencyTests { - // ShellUI never links Google Material Symbols/Icons or Font Awesome and every - // component uses inline SVG for its chrome. When a template depends on an - // external icon font the raw icon name ("expand_more", "cloud_upload", ...) - // shows as literal text or the glyph slot renders empty on consumers. - // Fail loudly here so the SVG-swap convention stays enforced across the whole - // registry — the specific classes below cover both Material families and - // Font Awesome's solid/regular/brands. + // Consumers don't load icon fonts, so the icon name would render as text. [Theory] [InlineData("material-symbols-outlined")] // Material Symbols (newer variable font) [InlineData("material-symbols-rounded")] @@ -167,15 +150,7 @@ public void NoTemplate_DependsOnExternalIconFont(string cssClass) public class RelativeJsModuleImportTests { - // A component whose C# does JSRuntime.InvokeAsync("import", "./foo.js") resolves that - // path against the current page URL. That only works when ShellUI is installed straight - // into the host app; the moment the generated component is compiled into a consumer's - // own Razor Class Library, the asset is served from _content// instead and the - // import 404s — silently, since every one of these calls is wrapped in try/catch. - // ShellUI's established fix for this shape of bug (see ThemeToggle, InputOTP, - // CommandPalette, Combobox, ...) is to route through the already-loaded global - // `window.ShellUI` object (shellui.js, loaded via one host-controlled immediately before blazor.web.js — provides - // window.ShellUI.* (addClassToDocument, focusElement, copyToClipboard, …) for - // ThemeToggle, CopyButton, InputOTP, FileUpload, Command. The pattern matches - // both the modern `@Assets["_framework/blazor.web.js"]` and the bare form. + // shellui.js must load before blazor.web.js; matches both @Assets[...] and the bare form. if (!content.Contains("shellui.js")) { content = Regex.Replace( @@ -548,8 +512,6 @@ internal static string RewriteWasmIndexHtml(string content) return content; } - // Idempotent injection of a stylesheet before . Used by post-install - // hooks when a component ships a CSS asset (e.g. chart-styles → css/charts.css). internal static string InjectStylesheetLink(string content, string href) { var linkTag = $""; @@ -560,8 +522,6 @@ internal static string InjectStylesheetLink(string content, string href) return Regex.Replace(content, @"", $" {linkTag}\n", RegexOptions.IgnoreCase); } - // Used by ComponentInstaller after `shellui add` so newly-installed CSS assets - // are wired into the host without requiring the user to edit App.razor by hand. internal static async Task InjectStylesheetIntoHostAsync(string href) { var cwd = Directory.GetCurrentDirectory(); @@ -602,7 +562,6 @@ private static void RemoveBootstrapFiles() AnsiConsole.MarkupLine("[cyan]Checking for Bootstrap files to clean up...[/]"); var deletedCount = 0; - // 1. Delete wwwroot/lib/bootstrap (.NET 9+) and wwwroot/bootstrap (.NET 8) foreach (var folder in new[] { Path.Combine("lib", "bootstrap"), "bootstrap" }) { var bootstrapDir = Path.Combine(wwwrootPath, folder); @@ -612,7 +571,6 @@ private static void RemoveBootstrapFiles() deletedCount++; } - // 2. Delete bootstrap css files in wwwroot/css var cssPath = Path.Combine(wwwrootPath, "css"); if (Directory.Exists(cssPath)) { diff --git a/src/ShellUI.CLI/Services/ProjectDetector.cs b/src/ShellUI.CLI/Services/ProjectDetector.cs index fc15eb1..1c1cbb8 100644 --- a/src/ShellUI.CLI/Services/ProjectDetector.cs +++ b/src/ShellUI.CLI/Services/ProjectDetector.cs @@ -36,7 +36,6 @@ private static ProjectType DetectProjectType(XDocument doc, string csprojPath) { var projectDir = Path.GetDirectoryName(csprojPath) ?? ""; - // Check for Program.cs patterns var programCsPath = Path.Combine(projectDir, "Program.cs"); if (File.Exists(programCsPath)) { @@ -52,7 +51,6 @@ private static ProjectType DetectProjectType(XDocument doc, string csprojPath) return ProjectType.BlazorServerSideRendering; } - // Fallback: check SDK var sdk = doc.Root?.Attribute("Sdk")?.Value ?? ""; if (sdk.Contains("Web")) return ProjectType.BlazorServerSideRendering; diff --git a/src/ShellUI.CLI/Services/TailwindDownloader.cs b/src/ShellUI.CLI/Services/TailwindDownloader.cs index 4a789b0..2c7ef6e 100644 --- a/src/ShellUI.CLI/Services/TailwindDownloader.cs +++ b/src/ShellUI.CLI/Services/TailwindDownloader.cs @@ -48,7 +48,6 @@ private static async Task DownloadTailwindCliAsync(string destinationPath) var bytes = await response.Content.ReadAsByteArrayAsync(); await File.WriteAllBytesAsync(destinationPath, bytes); - // Make executable on Unix systems if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { var process = System.Diagnostics.Process.Start("chmod", $"+x {destinationPath}"); diff --git a/src/ShellUI.CLI/ShellUI.CLI.csproj b/src/ShellUI.CLI/ShellUI.CLI.csproj index b1f13c8..cbeaba9 100644 --- a/src/ShellUI.CLI/ShellUI.CLI.csproj +++ b/src/ShellUI.CLI/ShellUI.CLI.csproj @@ -16,7 +16,6 @@ enable enable - true shellui ShellUI.CLI diff --git a/src/ShellUI.Components/AccordionType.cs b/src/ShellUI.Components/AccordionType.cs index e704d64..38a38e3 100644 --- a/src/ShellUI.Components/AccordionType.cs +++ b/src/ShellUI.Components/AccordionType.cs @@ -2,6 +2,6 @@ namespace ShellUI.Components; public enum AccordionType { - Single, // one open at a time - Multiple // multiple open + Single, + Multiple } diff --git a/src/ShellUI.Components/Components/AppSidebar.razor b/src/ShellUI.Components/Components/AppSidebar.razor index 25693e5..85f6f2d 100644 --- a/src/ShellUI.Components/Components/AppSidebar.razor +++ b/src/ShellUI.Components/Components/AppSidebar.razor @@ -3,7 +3,6 @@ @* AppSidebar - Inset sidebar. Usage: SidebarProvider > AppSidebar + SidebarInset. Collapsible: Offcanvas or Icon. *@ - @* Header: Logo & Company *@ @@ -18,10 +17,8 @@ - @* Content *@ - @* NavMain: Platform *@ Platform @@ -59,7 +56,6 @@ - @* NavProjects *@ Projects @@ -87,7 +83,6 @@ - @* NavSecondary (pushed to bottom) *@ @@ -106,7 +101,6 @@ - @* Footer: User Profile *@ @@ -118,7 +112,6 @@ data-size="lg" title="Shewart" class="peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-none ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 group-data-[collapsible=icon]:!size-8 group-data-[collapsible=icon]:!p-0 group-data-[collapsible=icon]:!rounded-full group-data-[collapsible=icon]:!justify-center group-data-[collapsible=icon]:!items-center"> - @* Icon + expandable arrows when collapsed *@