diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 54c6517..aa73aed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,8 +36,32 @@ jobs: - name: Run tests run: dotnet test ShellUI.sln --no-restore --no-build --configuration Release --verbosity normal - - name: Pack NuGet packages - run: dotnet pack ShellUI.sln --no-build --configuration Release -p:ContinuousIntegrationBuild=true + # Guards against the template-escape bug class from shellui-fixes-for-lib.md + # (Fixes 2, 9, 10). TemplateCompileTests verifies generated content parses; + # this end-to-end build catches anything the syntactic check misses + # (e.g. missing using directives). + - name: Smoke-test CLI scaffolding + shell: bash + run: | + set -euxo pipefail + TMPDIR=$(mktemp -d) + dotnet pack src/ShellUI.CLI/ShellUI.CLI.csproj -c Release -o "$TMPDIR/nupkgs" --no-build + dotnet tool install --tool-path "$TMPDIR/tools" --add-source "$TMPDIR/nupkgs" ShellUI.CLI --prerelease + export PATH="$TMPDIR/tools:$PATH" + + mkdir -p "$TMPDIR/app" && cd "$TMPDIR/app" + dotnet new blazor -o SmokeApp --no-restore + cd SmokeApp + shellui init --tailwind standalone --yes + # Hit the three components that regressed last time: + shellui add chart pie-chart dashboard-02 --force || true + # Chart components reference ApexCharts.* types — `shellui add chart` + # does NOT auto-install Blazor-ApexCharts today (tracked as Fix 12.3: + # `nugetDependencies` field on component manifests). Add it explicitly + # here so the smoke test isolates THIS PR's bug class (template escapes) + # from that one. When Fix 12.3 lands, remove this line. + dotnet add package Blazor-ApexCharts --version 6.0.2 + dotnet build -c Debug - name: Upload build artifacts uses: actions/upload-artifact@v4 diff --git a/.github/workflows/preview-pages.yml b/.github/workflows/preview-pages.yml index 028b40c..9f67ebe 100644 --- a/.github/workflows/preview-pages.yml +++ b/.github/workflows/preview-pages.yml @@ -42,6 +42,11 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v4 + with: + # Auto-enable Pages on first run so this workflow can deploy without + # someone clicking through Settings → Pages first. Requires the + # GITHUB_TOKEN to have `pages: write` (already set above). + enablement: true - name: Upload artifact uses: actions/upload-pages-artifact@v3 diff --git a/README.md b/README.md index 04bb37a..f7108da 100644 --- a/README.md +++ b/README.md @@ -39,12 +39,12 @@ ShellUI transforms Blazor component development with a hybrid approach: - Powered by Tailwind CSS v4.1.18 (standalone CLI - no Node.js required!) - Best of both worlds: flexibility when you need it, convenience when you want it -## Current Status: 100 Components (Alpha) 🎉 +## Current Status: 68 Components (Alpha) 🎉 **ShellUI is in alpha!** Test and provide feedback before we ship stable. We've completed: - ✅ **CLI Tool** (`dotnet tool install -g ShellUI.CLI`) - ✅ **NuGet Package** (`dotnet add package ShellUI.Components`) -- ✅ **100 Components** with Tailwind v4.1.18 *(actual components only; *-variants, *-service auto-installed)* +- ✅ **68 Installable Components** with Tailwind v4.1.18 *(top-level components you `shellui add` — sub-components, variants, models, and services auto-install as dependencies)* - ✅ **Hybrid Workflow** (CLI + NuGet) - ✅ **No Node.js Required** (Standalone Tailwind CLI) - ✅ **Comprehensive Documentation** @@ -96,7 +96,7 @@ To update ShellUI version across all components: This single file change updates: - ✅ All NuGet packages (`ShellUI.CLI`, `ShellUI.Components`) -- ✅ All component templates (~100 installable components) +- ✅ All component templates (68 installable components) - ✅ Build configurations and metadata **Example for pre-release:** @@ -116,25 +116,30 @@ Results in version: `0.3.0-alpha.2` **For Advanced Users:** Future versions may support component-specific versioning for power users who need granular control. -### ✅ 100 Production-Ready Components +### ✅ 68 Production-Ready Components -**Form Components (14):** -Button, Input, Textarea, Select, Checkbox, RadioGroup, RadioGroupItem, Switch, Toggle, Label, Slider, Form, InputOTP +Counts below are top-level components you can `shellui add` directly. Sub-components (e.g. `SidebarTrigger`, `DialogContent`, `TableRow`), variants (`ButtonVariants`, `AlertVariants`, …), models, and services auto-install as dependencies and are not counted. -**Layout Components (15):** -Card, Dialog, Sheet, Drawer, Popover, Tooltip, Separator, ScrollArea, Resizable, Collapsible, Accordion, Breadcrumb, BreadcrumbItem, Sonner, Toast +**Form (17):** +Button, Checkbox, Combobox, DatePicker, DateRangePicker, FileUpload, Form, Input, InputOTP, Label, RadioGroup, Select, Slider, Switch, Textarea, TimePicker, Toggle -**Navigation Components (12):** -Navbar, Sidebar, NavigationMenu, NavigationMenuItem, Menubar, MenubarItem, Pagination, Tabs, Stepper +**Layout (12):** +Accordion, Breadcrumb, Card, Collapsible, DashboardLayout01, DashboardLayout02, LinkCard, Navbar, Resizable, ScrollArea, Separator, Sidebar -**Data Display (14):** -Table, TableHeader, TableBody, TableRow, TableHead, TableCell, DataTable, Badge, Avatar, Alert, Toast, Sonner, Skeleton, Progress, Loading +**Navigation (7):** +ContextMenu, Menubar, NavigationMenu, Pagination, PrevNextNav, Stepper, Tabs -**Interactive Components (8):** -Dropdown, Command, ContextMenu, HoverCard, ThemeToggle, EmptyState, FileUpload +**Overlay (8):** +AlertDialog, Command, Dialog, Drawer, Dropdown, HoverCard, Popover, Sheet -**Advanced Components (18):** -Calendar, DatePicker, DateRangePicker, TimePicker, Combobox, AlertDialog, Carousel, Charts (Chart, BarChart, LineChart, PieChart, AreaChart, MultiSeriesChart), CarouselItem, CarouselContent, CarouselPrevious, CarouselNext, CarouselDots +**Data Display (13):** +AreaChart, Avatar, Badge, BarChart, Calendar, Carousel, Chart, ChartSeries, DataTable, LineChart, MultiSeriesChart, PieChart, Table + +**Feedback (9):** +Alert, Callout, EmptyState, Loading, Progress, Skeleton, Sonner, Toast, Tooltip + +**Utility (2):** +CopyButton, ThemeToggle ### ✅ Tailwind CSS v4.1.18 Integration @@ -252,7 +257,7 @@ shellui init shellui add button input card dialog # Or: dotnet shellui add button input card dialog -shellui list # See all 100 available components +shellui list # See all 68 available components # Or: dotnet shellui list ``` @@ -294,7 +299,7 @@ Simply edit the component file in `Components/UI/` - it's yours to modify! | Hybrid Workflow | ✅ | ❌ | ❌ | ❌ | | Free & Open Source | ✅ | ✅ | Partial | ✅ | | Customization | Full | Limited | Limited | Limited | -| Components | 100+ | 70+ | 50+ | 80+ | +| Components | 68 | 70+ | 50+ | 80+ | | Current Status | Production Ready | Mature | Commercial | Mature | ## 📦 Package Overview @@ -606,7 +611,7 @@ MIT License - See LICENSE.txt for details ## Status -**Alpha:** 100 components, CLI + NuGet, Tailwind v4.1.18. Test before stable. +**Alpha:** 68 components, CLI + NuGet, Tailwind v4.1.18. Test before stable. **🚀 Ready to use today!** --- diff --git a/ShellUI.Tests/ShellUI.Tests.csproj b/ShellUI.Tests/ShellUI.Tests.csproj index 8f15fe3..aa45fab 100644 --- a/ShellUI.Tests/ShellUI.Tests.csproj +++ b/ShellUI.Tests/ShellUI.Tests.csproj @@ -10,6 +10,7 @@ + diff --git a/ShellUI.Tests/TemplateCompileTests.cs b/ShellUI.Tests/TemplateCompileTests.cs new file mode 100644 index 0000000..ecb3898 --- /dev/null +++ b/ShellUI.Tests/TemplateCompileTests.cs @@ -0,0 +1,154 @@ +using System.Linq; +using System.Text.RegularExpressions; +using Microsoft.CodeAnalysis; +using Microsoft.CodeAnalysis.CSharp; +using ShellUI.Templates; +using Xunit; + +namespace ShellUI.Tests; + +/// Verifies that the *generated* content of each template parses as valid C#. +/// For pure-.cs templates (variants), parse the whole content. +/// For .razor templates, extract the @code { ... } block and parse its body. +/// This catches the exact class of bug from shellui-fixes-for-lib.md (Fixes 2, 9, 10): +/// unescaped quotes inside C# verbatim strings that ship as compile errors to consumers. +public class TemplateCompileTests +{ + [Theory] + [InlineData("chart-variants")] + [InlineData("alert-variants")] + [InlineData("badge-variants")] + [InlineData("button-variants")] + public void CsharpTemplate_GeneratedContentParses(string componentName) + { + var content = ComponentRegistry.GetComponentContent(componentName); + Assert.False(string.IsNullOrWhiteSpace(content), $"{componentName} template has no content"); + + var tree = CSharpSyntaxTree.ParseText(content!); + var errors = tree.GetDiagnostics() + .Where(d => d.Severity == DiagnosticSeverity.Error) + .ToList(); + + Assert.True(errors.Count == 0, + $"{componentName} generated content has {errors.Count} parse error(s):\n" + + string.Join("\n", errors.Select(e => $" {e.Location.GetLineSpan().StartLinePosition}: {e.GetMessage()}"))); + } + + [Theory] + [InlineData("pie-chart")] + [InlineData("dashboard-02")] + [InlineData("button")] + [InlineData("dialog")] + public void RazorTemplate_CodeBlockParses(string componentName) + { + var content = ComponentRegistry.GetComponentContent(componentName); + Assert.False(string.IsNullOrWhiteSpace(content), $"{componentName} template has no content"); + + var codeBlock = ExtractCodeBlock(content!); + if (string.IsNullOrWhiteSpace(codeBlock)) + { + // Brace extraction failed — almost always because an unterminated string + // swallowed the closing brace. Surface a real diagnostic by parsing the + // raw @code-onward suffix as if it were C#; the line/column points at + // the actual offending escape. + var raw = StripRazorDirectives(content!); + var rawTree = CSharpSyntaxTree.ParseText($"class __Probe {{ {raw} }}"); + var rawErrors = rawTree.GetDiagnostics() + .Where(d => d.Severity == DiagnosticSeverity.Error) + // The only diagnostics that matter for this bug class are unterminated literals. + .Where(d => d.Id is "CS1010" or "CS1002" or "CS1003" or "CS1026" or "CS1513" or "CS1525" or "CS1056") + .Take(5) + .ToList(); + Assert.Fail( + $"{componentName} @code block could not be extracted — likely an unterminated " + + $"string literal in the template. Diagnostics:\n" + + string.Join("\n", rawErrors.Select(e => $" {e.Id} at {e.Location.GetLineSpan().StartLinePosition}: {e.GetMessage()}"))); + } + + // Wrap in a synthetic class so the code block parses standalone. + var wrapped = $"class __Probe {{ {codeBlock} }}"; + var tree = CSharpSyntaxTree.ParseText(wrapped); + var errors = tree.GetDiagnostics() + .Where(d => d.Severity == DiagnosticSeverity.Error) + .ToList(); + + Assert.True(errors.Count == 0, + $"{componentName} @code block has {errors.Count} parse error(s):\n" + + string.Join("\n", errors.Select(e => $" {e.Location.GetLineSpan().StartLinePosition}: {e.GetMessage()}"))); + } + + /// Strips Razor markup directives so the remaining text can be best-effort + /// parsed as C#. Not a real Razor parser — just enough to surface useful + /// diagnostics when ExtractCodeBlock fails. + private static string StripRazorDirectives(string razor) + { + // Drop everything before the first @code keyword if present, else return as-is. + var codeIdx = razor.IndexOf("@code", System.StringComparison.Ordinal); + return codeIdx >= 0 ? razor.Substring(codeIdx + 5) : razor; + } + + /// Extracts the body of the first `@code { ... }` block, balancing braces. + /// Returns null if no `@code` block is found. + private static string? ExtractCodeBlock(string razor) + { + var match = Regex.Match(razor, @"@code\s*\{"); + if (!match.Success) return null; + + var start = match.Index + match.Length; + var depth = 1; + var inString = false; + var inVerbatimString = false; + var inCharLiteral = false; + var inLineComment = false; + var inBlockComment = false; + + for (var i = start; i < razor.Length; i++) + { + var c = razor[i]; + var next = i + 1 < razor.Length ? razor[i + 1] : '\0'; + + if (inLineComment) + { + if (c == '\n') inLineComment = false; + continue; + } + if (inBlockComment) + { + if (c == '*' && next == '/') { inBlockComment = false; i++; } + continue; + } + if (inVerbatimString) + { + if (c == '"' && next == '"') { i++; continue; } // escaped "" + if (c == '"') inVerbatimString = false; + continue; + } + if (inString) + { + if (c == '\\' && next != '\0') { i++; continue; } + if (c == '"') inString = false; + continue; + } + if (inCharLiteral) + { + if (c == '\\' && next != '\0') { i++; continue; } + if (c == '\'') inCharLiteral = false; + continue; + } + + if (c == '/' && next == '/') { inLineComment = true; i++; continue; } + if (c == '/' && next == '*') { inBlockComment = true; i++; continue; } + if (c == '@' && next == '"') { inVerbatimString = true; i++; continue; } + if (c == '"') { inString = true; continue; } + if (c == '\'') { inCharLiteral = true; continue; } + + if (c == '{') depth++; + else if (c == '}') + { + depth--; + if (depth == 0) return razor.Substring(start, i - start); + } + } + return null; + } +} diff --git a/VERSIONING_STRATEGY.md b/VERSIONING_STRATEGY.md index fd91c56..d14ba9a 100644 --- a/VERSIONING_STRATEGY.md +++ b/VERSIONING_STRATEGY.md @@ -6,8 +6,8 @@ ShellUI follows a **unified versioning approach** where all components, CLI, and ## Version Number: v0.3.0-alpha.2 ✅ -**Current Release:** v0.3.0-alpha.2 -- ✅ 100 production-ready components +**Current Release:** v0.3.0-alpha.3 +- ✅ 68 installable production-ready components - ✅ CLI tool + NuGet packages - ✅ Full Blazor WebAssembly + Server support - ✅ Tailwind CSS v4.1.17 integration @@ -25,7 +25,7 @@ ShellUI follows a **unified versioning approach** where all components, CLI, and **Automatically Applied To:** - ✅ All NuGet packages (`ShellUI.CLI`, `ShellUI.Components`, `ShellUI.Core`) -- ✅ All ~100 component templates +- ✅ All 68 installable component templates (167 templates total including dependencies) - ✅ Build configurations - ✅ Component metadata diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.md index 613f006..41467d1 100644 --- a/docs/ARCHITECTURE.md +++ b/docs/ARCHITECTURE.md @@ -15,7 +15,7 @@ ShellUI is a CLI-first Blazor component library that copies components directly - ComponentInstaller (add, update – resolves dependencies, writes files) - ComponentManager (list, remove) -**ShellUI.Templates** (embedded in CLI) provides ComponentRegistry with 139 templates. `GetComponentContent(name)` returns Razor/C# source. +**ShellUI.Templates** (embedded in CLI) provides ComponentRegistry with 167 templates total (68 installable top-level components + sub-components, variants, models, services that auto-install as dependencies). `GetComponentContent(name)` returns Razor/C# source. **Packages:** ShellUI.Core (models/config), ShellUI.Components (NuGet – components, variants, services, theme CSS). @@ -30,19 +30,18 @@ ShellUI is a CLI-first Blazor component library that copies components directly ## Component Counts (Actual Components Only) -When you run `shellui add button`, that counts as **1 component**. Dependencies (button-variants, etc.) are auto-installed and **not** counted. - -| Category | Installable | Description | -|----------|-------------|-------------| -| Form | 14 | Button, Input, Select, Checkbox, Switch, etc. | -| Layout | 15 | Card, Dialog, Sheet, Drawer, Popover, etc. | -| Navigation | 12 | Navbar, Sidebar, Tabs, Breadcrumb, etc. | -| Data Display | 14 | Table, Badge, Avatar, Alert, Toast, Sonner, etc. | -| Feedback | 8 | Toast, Sonner, Loading, Skeleton, Progress, etc. | -| Overlay | 10 | Dialog, Sheet, Drawer, Tooltip, Popover, etc. | -| Charts | 9 | Chart, BarChart, LineChart, PieChart, etc. | -| Utility | 18 | ThemeToggle, CopyButton, ScrollArea, etc. | -| **Total** | **~100** | *Actual components only; *-variants, *-service excluded* | +When you run `shellui add button`, that counts as **1 component**. Dependencies (button-variants, etc.) are auto-installed and **not** counted. Counts derived from `ComponentRegistry` where `IsAvailable = true`. + +| Category | Installable | Examples | +|----------|-------------|----------| +| Form | 17 | Button, Input, Select, Checkbox, Switch, Combobox, DatePicker, … | +| Layout | 12 | Card, Sidebar, Navbar, Accordion, Resizable, DashboardLayout01/02, … | +| Navigation | 7 | Tabs, Menubar, NavigationMenu, Pagination, Stepper, … | +| Overlay | 8 | Dialog, Sheet, Drawer, Popover, Dropdown, Command, … | +| Data Display | 13 | Table, DataTable, Badge, Avatar, Calendar, Carousel, Chart family, … | +| Feedback | 9 | Alert, Callout, Toast, Sonner, Loading, Progress, Tooltip, … | +| Utility | 2 | CopyButton, ThemeToggle | +| **Total** | **68** | *Top-level components only; sub-components, variants, models, services excluded* | ## Project Structure diff --git a/docs/CLI_SYNTAX.md b/docs/CLI_SYNTAX.md index 57f0175..b5869b3 100644 --- a/docs/CLI_SYNTAX.md +++ b/docs/CLI_SYNTAX.md @@ -179,7 +179,7 @@ Examples: dotnet shellui list --json ``` -**Output:** A table with columns: Component, Status (installed/available), Version, Category, Description. Run `dotnet shellui list` to see all ~100 available components. +**Output:** A table with columns: Component, Status (installed/available), Version, Category, Description. Run `dotnet shellui list` to see all 68 installable components. ## update - Update Components diff --git a/docs/COMPARISON.md b/docs/COMPARISON.md index 400b26c..bc46fdb 100644 --- a/docs/COMPARISON.md +++ b/docs/COMPARISON.md @@ -9,7 +9,7 @@ A comprehensive comparison of ShellUI with other popular Blazor component librar | **Distribution** | CLI (Copy) | NuGet | NuGet | NuGet | NuGet | NuGet | | **Customization** | Full Source | Limited | Limited | Limited | Limited | Limited | | **CSS Framework** | Tailwind v4 | Custom | Bootstrap | Bootstrap/Custom | Ant Design | Custom | -| **Component Count** | 100+ | 50+ | 90+ | 80+ | 60+ | 60+ | +| **Component Count** | 68 | 50+ | 90+ | 80+ | 60+ | 60+ | | **Open Source** | Yes (MIT) | Yes (MIT) | Partial | Yes (MIT) | Yes (MIT) | Yes (MIT) | | **Commercial License** | Free | Free | Paid Plans | Free | Free | Free | | **Dark Mode** | Built-in | Built-in | Built-in | Built-in | Built-in | Built-in | diff --git a/docs/COMPONENT_ROADMAP.md b/docs/COMPONENT_ROADMAP.md index 583826d..db9cc00 100644 --- a/docs/COMPONENT_ROADMAP.md +++ b/docs/COMPONENT_ROADMAP.md @@ -2,29 +2,25 @@ **Goal:** Build ALL components from shadcn/ui + extras needed for ShellDocs (Blazor fumadocs equivalent) -## Current Status: 100 Installable Components - v0.3.0-alpha +## Current Status: 68 Installable Components - v0.3.0-alpha -### Completed (~100 install targets, dependencies auto-installed) +### Completed (68 install targets; sub-components, variants, models, services auto-installed) -**Form (11):** Button, Input, Textarea, Select, Checkbox, RadioGroup, RadioGroupItem, Switch, Toggle, Label, Slider +Counts are top-level components users invoke directly via `shellui add `. Anything that auto-installs as a dependency (e.g. `SidebarTrigger`, `DialogContent`, `ButtonVariants`, `SonnerService`) is not counted here. -**Layout (19):** Card, CardHeader, CardTitle, CardDescription, CardContent, CardFooter, Tabs, TabsList, TabsTrigger, TabsContent, TabModels, Navbar, Sidebar, Separator, Accordion, AccordionItem, AccordionTrigger, AccordionContent, Breadcrumb, BreadcrumbItem, Collapsible, CollapsibleTrigger, CollapsibleContent, Resizable +**Form (17):** Button, Checkbox, Combobox, DatePicker, DateRangePicker, FileUpload, Form, Input, InputOTP, Label, RadioGroup, Select, Slider, Switch, Textarea, TimePicker, Toggle -**Navigation (8):** NavigationMenu, NavigationMenuItem, Menubar, MenubarItem, Dropdown, Pagination, ScrollArea, Sheet +**Layout (12):** Accordion, Breadcrumb, Card, Collapsible, DashboardLayout01, DashboardLayout02, LinkCard, Navbar, Resizable, ScrollArea, Separator, Sidebar -**Feedback (7):** Alert, AlertVariants, Progress, Skeleton, Toast, Loading, EmptyState +**Navigation (7):** ContextMenu, Menubar, NavigationMenu, Pagination, PrevNextNav, Stepper, Tabs -**Overlay (8):** Dialog, DialogTrigger, DialogContent, DialogHeader, DialogFooter, DialogTitle, DialogDescription, DialogClose, AlertDialog, Popover, Tooltip, HoverCard, Drawer, ContextMenu, Command +**Overlay (8):** AlertDialog, Command, Dialog, Drawer, Dropdown, HoverCard, Popover, Sheet -**Data Display (10):** Badge, BadgeVariants, Avatar, AvatarVariants, Table, TableHeader, TableBody, TableRow, TableHead, TableCell, DataTable +**Data Display (13):** AreaChart, Avatar, Badge, BarChart, Calendar, Carousel, Chart, ChartSeries, DataTable, LineChart, MultiSeriesChart, PieChart, Table -**Data Visualization (7):** Chart, BarChart, LineChart, AreaChart, PieChart, MultiSeriesChart, ChartSeries, ChartVariants +**Feedback (9):** Alert, Callout, EmptyState, Loading, Progress, Skeleton, Sonner, Toast, Tooltip -**Advanced (6):** Carousel, CarouselItem, CarouselContent, CarouselPrevious, CarouselNext, CarouselDots - -**Form Advanced (5):** Form, InputOTP, Combobox, DatePicker, DateRangePicker, TimePicker - -**Utility (3):** ThemeToggle, Shell, ButtonVariants, ToggleVariants, FileUpload, Stepper, StepperList, StepperStep, StepperContent, Calendar +**Utility (2):** CopyButton, ThemeToggle --- @@ -124,7 +120,7 @@ ShellDocs will need: - v0.1.0 (Dec 2025) - 73 components, CLI + NuGet - v0.1.1 (Dec 2025) - Hotfix, package publishing -- **v0.3.0-alpha (Feb 2026) - Current alpha: Charts, 100 components, Tailwind 4.1.18** +- **v0.3.0-alpha (Feb 2026) - Current alpha: Charts, 68 installable components, Tailwind 4.1.18** - v0.3.0 (Q1 2026) - ShellDocs components (CodeBlock, MDX, Callout, Steps, etc.) - v0.4.0 (Q2 2026) - ShellDocs site launch - v1.0.0 (Q2-Q3 2026) - .NET 10, stable API, comprehensive docs diff --git a/docs/FAQ.md b/docs/FAQ.md index fdf4aac..71dc617 100644 --- a/docs/FAQ.md +++ b/docs/FAQ.md @@ -7,7 +7,7 @@ Quick answers to common questions about ShellUI. ### Q: What's the difference between NuGet package and CLI? **NuGet Package:** -- **Contains:** ALL 100+ components in a compiled DLL +- **Contains:** ALL 68 installable components in a compiled DLL - **Installation:** `dotnet add package ShellUI.Components` - **Format:** Compiled Razor Class Library (traditional) - **Usage:** Import and use immediately @@ -31,7 +31,7 @@ Quick answers to common questions about ShellUI. **YES! This is actually recommended!** ```bash -# 1. Install NuGet package (all 100+ components) +# 1. Install NuGet package (all 68 components) dotnet add package ShellUI.Components # 2. Use NuGet components everywhere diff --git a/docs/PROJECT_STATUS.md b/docs/PROJECT_STATUS.md index 7176c3b..209d860 100644 --- a/docs/PROJECT_STATUS.md +++ b/docs/PROJECT_STATUS.md @@ -4,8 +4,8 @@ **ShellUI alpha is available on NuGet!** Test before upgrading to stable. -- ✅ **Version 0.3.0-alpha.2** - 100 installable components (actual components only; dependencies auto-installed) -- ✅ **100 Production-Ready Components** - Fully functional and tested +- ✅ **Version 0.3.0-alpha.3** - 68 installable components (top-level only; sub-components, variants, models, services auto-installed) +- ✅ **68 Production-Ready Components** - Fully functional and tested - ✅ **CLI Tool Published** - `dotnet tool install -g ShellUI.CLI` - ✅ **NuGet Packages Published** - `ShellUI.Components`, `ShellUI.CLI`, `ShellUI.Templates` - ✅ **Hybrid Distribution** - CLI + NuGet packages (best of both worlds!) @@ -18,17 +18,21 @@ - [x] CLI Tool (`ShellUI.CLI`) - Published to NuGet - [x] Components Package (`ShellUI.Components`) - Published to NuGet - [x] Templates Package (`ShellUI.Templates`) - Embedded in CLI -- [x] Component Registry - 139 templates (~100 installable) +- [x] Component Registry - 167 templates (68 installable; rest are sub-components/variants/models/services that auto-install) - [x] Tailwind CSS Integration - v4.1.18 standalone CLI support - [x] MSBuild Integration - Automatic CSS compilation -### Components (100 Installable) -- [x] **Form Components (14)**: Button, Input, Textarea, Select, Checkbox, RadioGroup, RadioGroupItem, Switch, Toggle, Label, Slider, Form, InputOTP, Combobox -- [x] **Layout Components (15)**: Card, Dialog, Sheet, Drawer, Popover, Tooltip, Separator, ScrollArea, Resizable, Collapsible, Accordion, Sonner, Toast -- [x] **Navigation Components (12)**: Navbar, Sidebar, NavigationMenu, Menubar, MenubarItem, Pagination, Tabs, Stepper, Breadcrumb, BreadcrumbItem -- [x] **Data Display (14)**: Table, DataTable, Badge, Avatar, Alert, Toast, Sonner, Skeleton, Progress, Loading -- [x] **Interactive Components (8)**: Dropdown, Command, ContextMenu, HoverCard, ThemeToggle, EmptyState, FileUpload, CopyButton -- [x] **Advanced Components (18+)**: Calendar, DatePicker, DateRangePicker, TimePicker, AlertDialog, Carousel, Charts (Chart, BarChart, LineChart, PieChart, AreaChart, MultiSeriesChart) +### Components (68 Installable) + +Counts are top-level components users invoke directly via `shellui add `. Anything that auto-installs as a dependency (e.g. `SidebarTrigger`, `DialogContent`, `ButtonVariants`, `SonnerService`) is not counted. + +- [x] **Form (17)**: Button, Checkbox, Combobox, DatePicker, DateRangePicker, FileUpload, Form, Input, InputOTP, Label, RadioGroup, Select, Slider, Switch, Textarea, TimePicker, Toggle +- [x] **Layout (12)**: Accordion, Breadcrumb, Card, Collapsible, DashboardLayout01, DashboardLayout02, LinkCard, Navbar, Resizable, ScrollArea, Separator, Sidebar +- [x] **Navigation (7)**: ContextMenu, Menubar, NavigationMenu, Pagination, PrevNextNav, Stepper, Tabs +- [x] **Overlay (8)**: AlertDialog, Command, Dialog, Drawer, Dropdown, HoverCard, Popover, Sheet +- [x] **Data Display (13)**: AreaChart, Avatar, Badge, BarChart, Calendar, Carousel, Chart, ChartSeries, DataTable, LineChart, MultiSeriesChart, PieChart, Table +- [x] **Feedback (9)**: Alert, Callout, EmptyState, Loading, Progress, Skeleton, Sonner, Toast, Tooltip +- [x] **Utility (2)**: CopyButton, ThemeToggle ### Documentation - [x] README.md - Project overview and quick start @@ -73,7 +77,7 @@ | Milestone | Status | |-----------|--------| -| v0.3.0-alpha - 100 components, CLI, NuGet | ✅ Done | +| v0.3.0-alpha - 68 installable components, CLI, NuGet | ✅ Done | | Tailwind v4.1.18 standalone | ✅ Done | | Alpha testing & validation | 🔄 In progress | | v0.3.0 stable (after testing) | 🎯 Next | @@ -169,12 +173,12 @@ dotnet shellui add button input card - [x] CLI tool published to NuGet - [x] NuGet packages published (Components, CLI, Templates) - [x] Can initialize projects (no Node.js!) -- [x] 100 components working (both CLI and NuGet) +- [x] 68 installable components working (both CLI and NuGet) - [x] Basic documentation live - [ ] 50+ GitHub stars (in progress) ### Beta Success (Q2 2026) -- [x] 100+ components available +- [x] 68 installable components available - [ ] Component registry operational - [ ] Hybrid workflow proven - [ ] 500+ GitHub stars diff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.md index b0b1b5b..2791a56 100644 --- a/docs/QUICKSTART.md +++ b/docs/QUICKSTART.md @@ -1,6 +1,6 @@ # ShellUI Quick Start Guide -**Note:** ShellUI is in alpha with 100 components. Test and provide feedback! +**Note:** ShellUI is in alpha with 68 installable components. Test and provide feedback! ## What is ShellUI? @@ -164,7 +164,7 @@ Then use it: dotnet shellui list ``` -Output: A table showing component name, status (installed/available), version, category, and description. Run `dotnet shellui list` to see all ~100 components. +Output: A table showing component name, status (installed/available), version, category, and description. Run `dotnet shellui list` to see all 68 installable components. ### List only installed components diff --git a/src/ShellUI.CLI/README.md b/src/ShellUI.CLI/README.md index ff70338..e42dfad 100644 --- a/src/ShellUI.CLI/README.md +++ b/src/ShellUI.CLI/README.md @@ -110,7 +110,7 @@ dotnet shellui add dashboard-01 # or dashboard-02 ### Data Display - `table`, `data-table`, `badge`, `avatar`, `alert`, `toast`, `sonner`, `skeleton`, `progress`, `loading` -**~100 components total** (run `dotnet shellui list` for full list; dependencies auto-installed) +**68 installable components total** (run `dotnet shellui list` for full list; sub-components, variants, models, and services auto-install as dependencies) ### Interactive Components - `dropdown`, `accordion`, `toggle`, `theme-toggle`, `command`, `context-menu`, `hover-card` diff --git a/src/ShellUI.Components/Components/PieChart.razor b/src/ShellUI.Components/Components/PieChart.razor index 52e7e26..a5ce5bf 100644 --- a/src/ShellUI.Components/Components/PieChart.razor +++ b/src/ShellUI.Components/Components/PieChart.razor @@ -45,12 +45,12 @@ const label = w.globals.labels[seriesIndex]; const value = series[seriesIndex]; const color = w.config.colors[seriesIndex]; - - return '
' + - '
' + - '' + - '' + label + ':' + - '' + value + '' + + + return '
' + + '
' + + '' + + '' + label + ':' + + '' + value + '' + '
' + '
'; }" diff --git a/src/ShellUI.Components/README.md b/src/ShellUI.Components/README.md index 8b058b9..6b49708 100644 --- a/src/ShellUI.Components/README.md +++ b/src/ShellUI.Components/README.md @@ -4,7 +4,7 @@ Beautiful, accessible Blazor components inspired by shadcn/ui. A CLI-first compo ## Features -- 🎨 **100 Production-ready components** - Button, Input, Card, Dialog, Sonner, Table, Charts, and more +- 🎨 **68 Production-ready installable components** - Button, Input, Card, Dialog, Sonner, Table, Charts, and more (sub-components and variants ship as auto-installed dependencies) - 🎯 **CLI-first approach** - Install components individually with `dotnet shellui add` - 🎨 **Tailwind CSS styling** - Utility-first CSS with dark mode support - ♿ **Accessible by default** - Built with accessibility in mind diff --git a/src/ShellUI.Templates/README.md b/src/ShellUI.Templates/README.md index aaa1467..1672493 100644 --- a/src/ShellUI.Templates/README.md +++ b/src/ShellUI.Templates/README.md @@ -29,7 +29,7 @@ dotnet shellui add card dialog ## What's Included This package contains: -- **~100 Installable Component Templates** - Primary components (dependencies like *-variants auto-installed) +- **68 Installable Component Templates** - Top-level components (167 templates total; sub-components, variants, models, services auto-install as dependencies) - **Metadata** - Component metadata including dependencies, categories, and descriptions - **Registry** - Component registry for CLI discovery diff --git a/src/ShellUI.Templates/Templates/ChartVariantsTemplate.cs b/src/ShellUI.Templates/Templates/ChartVariantsTemplate.cs index 7f42081..38dda01 100644 --- a/src/ShellUI.Templates/Templates/ChartVariantsTemplate.cs +++ b/src/ShellUI.Templates/Templates/ChartVariantsTemplate.cs @@ -140,26 +140,26 @@ public static ApexCharts.ApexChartOptions GetOptions(ChartTheme th }, Custom = @""function({ series, seriesIndex, dataPointIndex, w }) { const xLabel = w.globals.labels[dataPointIndex] || ''; - let html = '
'; - + let html = '
'; + if (xLabel) { - html += '
' + xLabel + '
'; + html += '
' + xLabel + '
'; } - + w.globals.initialSeries.forEach((s, idx) => { const color = w.config.colors[idx]; const name = s.name || ''; - const value = series[idx] && series[idx][dataPointIndex] !== undefined - ? series[idx][dataPointIndex] + const value = series[idx] && series[idx][dataPointIndex] !== undefined + ? series[idx][dataPointIndex] : '-'; - - html += '
' + - '' + - '' + name + ':' + - '' + value + '' + + + html += '
' + + '' + + '' + name + ':' + + '' + value + '' + '
'; }); - + html += '
'; return html; }"" diff --git a/src/ShellUI.Templates/Templates/DashboardLayout02Template.cs b/src/ShellUI.Templates/Templates/DashboardLayout02Template.cs index fbed629..2988d06 100644 --- a/src/ShellUI.Templates/Templates/DashboardLayout02Template.cs +++ b/src/ShellUI.Templates/Templates/DashboardLayout02Template.cs @@ -83,7 +83,7 @@ private void BuildBreadcrumb() var segments = path.Split('/', StringSplitOptions.RemoveEmptyEntries); _breadcrumbItems.Clear(); - if (segments.Length == 0 || (segments.Length == 1 && segments[0] == "")) + if (segments.Length == 0 || (segments.Length == 1 && segments[0] == """")) { _breadcrumbItems.Add(new BreadcrumbItemData { Label = ""Home"", Href = ""/"", IsLast = true }); return; diff --git a/src/ShellUI.Templates/Templates/PieChartTemplate.cs b/src/ShellUI.Templates/Templates/PieChartTemplate.cs index ec6270a..6c73c23 100644 --- a/src/ShellUI.Templates/Templates/PieChartTemplate.cs +++ b/src/ShellUI.Templates/Templates/PieChartTemplate.cs @@ -63,12 +63,12 @@ protected override void OnParametersSet() const label = w.globals.labels[seriesIndex]; const value = series[seriesIndex]; const color = w.config.colors[seriesIndex]; - - return '
' + - '
' + - '' + - '' + label + ':' + - '' + value + '' + + + return '
' + + '
' + + '' + + '' + label + ':' + + '' + value + '' + '
' + '
'; }""