Skip to content

Latest commit

 

History

History
393 lines (311 loc) · 18.9 KB

File metadata and controls

393 lines (311 loc) · 18.9 KB

Changelog

All notable changes to StarUI will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[Unreleased]

0.4.3 - 2026-04-08

Added

  • Field component — composable form field primitives with auto-wired IDs, client-side validation (validate=), responsive orientation, and error-state propagation. Includes FieldSet, FieldLegend, FieldGroup, FieldContent, FieldLabel, FieldDescription, FieldSeparator, and FieldError.

Changed

  • Bump starhtml dependency from >=0.5.21 to >=0.6.0 (starlette 1.0 compatibility, built-in form handling)

0.4.2 - 2026-03-13

Fixed

  • star status and star diff now handle stale manifest paths when component_dir changes in pyproject.toml

0.4.1 - 2026-03-13

Changed

  • Unified component/block CLI and registry APIs into single parameterized functions

0.4.0 - 2026-03-13

Added

  • Combobox component — searchable dropdown with keyboard navigation, custom rendering, and multi-select support
  • star sort command — sort Tailwind classes in Python files using Tailwind's canonical order; --check mode for CI
  • Blocks system — multi-file component bundles (star add <block>, star list --installed, star update)
  • UserButton block — avatar dropdown with user info, theme toggle, and sign-out action
  • AspectRatio component — content within a desired ratio, prevents layout shift
  • Collapsible component — expand/collapse with smooth CSS grid animation, nesting, and disabled state
  • Drawer component — slide-from-edge panel with drag-to-dismiss, all 4 directions, modal/non-modal
  • InputOTP component — one-time password input with individual character slots and caret animation
  • ScrollArea component — custom styled scrollbars with vertical/horizontal/both orientations and auto-hide
  • Slider component — single value and dual-thumb range slider with vertical orientation support

0.3.2 - 2026-03-02

Fixed

  • star dev wrapper uses dotted module path for package layouts

0.3.1 - 2026-03-02

Added

  • star status — color-coded component health table showing up-to-date, modified, update-available, and missing states via local checksum comparison against both manifest and remote registry; falls back gracefully when offline
  • star update — smart component updater that compares remote checksums against local, skips already-current components, warns about locally modified files (skips by default), requires --force to overwrite modifications, and updates manifest after install
  • star diff <component> — unified diff between local file and registry version for reviewing upstream changes before updating
  • star add overwrite protection: detects conflicts, prompts with confirm("Overwrite?", default=False), --force bypasses; existing dependencies are skipped automatically
  • Registry manifest system (.starui/manifest.json) with SHA256 checksums, version tracking, and atomic writes

Changed

  • CLI config migrated from starui.toml to [tool.starui] in pyproject.toml, following Python ecosystem conventions
  • All CLI commands now use unified config resolution: CLI flag > pyproject.toml > auto-detect
  • star init accepts --component-dir flag and --no-interaction for CI usage
  • star build and star dev now respect configured paths instead of hardcoding static/css/

Fixed

  • star dev hot-reload callback was always truthy even when disabled — now correctly None when --no-hot-reload
  • star build result display treated 0 build time or 0 byte CSS as missing (truthiness vs is not None)
  • star build swallowed deliberate typer.Exit in generic exception handler

0.3.0 - 2026-03-02

Added

  • Menubar component with hover-intent navigation, submenus, checkbox/radio items, and keyboard support
  • NavigationMenu component with viewport popover, timer-based hover, and content panels
  • Pagination component with sliding page window, jump-5 ellipsis, and reactive page state
  • SimplePagination helper for common pagination patterns
  • CLI star status, star diff, star update commands for component management
  • Registry manifest system with checksum-based integrity verification

Changed

  • Registry restructured — components moved to registry/components/, metadata derived from source via AST
  • Component conciseness audit across all 35+ components: consistent patterns, removed dead code, improved accessibility attributes

0.2.1 - 2026-03-01

Changed

  • Sheet rewritten to use native HTML <dialog> with CSS transitions and backdrop animations
  • Dialog and AlertDialog migrated to native <dialog> element
  • Tabs variant system reworked — "plain" renamed to "line", new active indicator styling
  • Toast ordering system with fixed-size slots and View Transition API animations
  • Calendar added caption_layout parameter ("label" vs "dropdown"), shows outside dates
  • Command added optional shortcut parameter for global keyboard triggers
  • Switch added size parameter ("default", "sm")
  • DropdownMenu smart scroll with --popover-available-height and overflow handling
  • CodeBlock self-contained token colors, removed starlighter theme dependency
  • Alert added live parameter for conditional role="alert"
  • Component context passing simplified with new inject_context() utility
  • Requires starhtml >=0.5.12

0.2.0 - 2026-02-26

Added

  • Toast / Toaster — Sonner-inspired notifications with success, error, warning, info, and destructive variants
  • DropdownMenu — full dropdown menu system with items, checkboxes, radio groups, sub-menus, and keyboard navigation
  • Table — data table with header, body, footer, and caption support
  • Skeleton — loading state placeholders

0.1.8 - 2025-08-31

Added

  • ✨ New Components

    • Added Avatar component with image fallback support using Datastar reactivity
    • Added Accordion component with collapsible content sections
    • Added Toggle and ToggleGroup components for toggle button functionality
    • Added Progress component with determinate and indeterminate states
    • Added Separator component for visual content separation
  • 📚 Documentation Site

    • Launched comprehensive documentation site with live component previews
    • Added interactive component playground with code examples
    • Implemented syntax highlighting for code snippets
    • Created component API reference documentation

Changed

  • 🎨 Avatar Component Design

    • Simplified Avatar API to match ShadCN's minimalist approach (4 core components)
    • Moved complex patterns (groups, badges, colored initials) to composition examples
    • Reduced component size from 256 lines to 107 lines for better maintainability
  • 🔧 Tabs Component Refactor

    • Made Tabs component more semantic with id-based approach
    • Improved accessibility with proper ARIA attributes
    • Enhanced keyboard navigation support
  • 🔥 Live Reload & Build System

    • Rewrote watchdog implementation for better CSS change detection
    • Enhanced file watcher to properly track CSS modifications during development
    • Fixed hot-reload reliability for style changes
    • Improved CSS build pipeline for faster development feedback

Fixed

  • 🐛 Component Issues

    • Fixed Avatar fallback mechanism to properly show on image load errors
    • Resolved Datastar attribute handling in Avatar components
    • Fixed contrast issues with auto-generated avatar colors in light/dark modes
  • 🔄 Development Experience

    • Fixed live reload not triggering on CSS changes
    • Resolved watchdog file system event handling for style updates
    • Fixed CSS compilation race conditions during hot reload

0.1.7 - 2025-08-30

Added

  • 📚 Typography Plugin Integration
    • Added @tailwindcss/typography plugin support for rich content styling
    • Integrated Typography component with Tailwind Typography plugin for article and prose content
    • Enhanced prose component with size variants (sm, base, lg) for different content contexts

Changed

  • ✨ Typography Component System

    • Introduced comprehensive Typography components (H1-H6, Display, Lead, Subtitle, P, Blockquote, etc.)
    • Fixed HTML tag conflicts by using prefixed imports (HTMLH1, HTMLP, etc.) in components
    • Standardized text styling with semantic components for better content hierarchy
  • 🔧 Build System Improvements

    • Rewrote watchdog implementation for better CSS change detection
    • Enhanced file watcher to properly track CSS modifications during development
    • Improved hot-reload reliability for style changes

Fixed

  • 🏷️ HTML Tag Version Conflicts
    • Resolved naming conflicts between StarHTML base tags and Typography components
    • Fixed component imports to use proper prefixing throughout the codebase
    • Ensured compatibility between raw HTML elements and styled Typography components

0.1.6 - 2025-08-29

Added

  • ✨ New Components
    • Added HoverCard component with smart mouseenter/mouseleave handling and positioning
    • Added Popover component with native Popover API integration and positioning
    • Added Select component with native popover dropdown and automatic width matching
    • Added Switch component with toggle functionality and accessibility
    • Added Textarea component with multi-line text input support

Fixed

  • 🎯 Positioning System Overhaul
    • Fixed positioning flash issue where floating elements briefly appear in wrong position
    • Enhanced position handler with opacity-based hiding during initial positioning
    • Improved native Popover API integration with deferred positioning initialization
    • Fixed scroll delta positioning for popovers, selects, and hover cards during viewport scrolling

Changed

  • 🔧 StarHTML API Migration (0.1.11 → 0.1.12)

    • Updated to new ds_signals API requiring value() wrapper for strings and js() for JavaScript expressions
    • Migrated components from manual signal management to injectable pattern using make_injectable() and inject_signals()
    • Replaced manual positioning code with enhanced Floating UI-powered position handler
    • Updated hover card to use proper ds_on_mouseenter/ds_on_mouseleave event handlers
  • ⚡ Component Architecture Improvements

    • Implemented signal injection pattern across all components for cleaner APIs
    • Removed requirement for users to manage signals manually - now auto-generated with UUIDs
    • Enhanced component processing with recursive signal injection for nested components (PopoverClose)
    • Improved component metadata registry with position handler dependencies
  • 🧹 Code Quality & Standards

    • Standardized import organization and formatting across all components
    • Removed unnecessary comments focusing on "why" over "what"
    • Applied consistent spacing and modern Python patterns
    • Enhanced error handling and edge case coverage

Technical

  • 📦 Dependency Management
    • Added dependency injection system for component handlers (position, scroll)
    • Enhanced component metadata with handler configuration support
    • Improved local component discovery with better error handling

0.1.5 - 2025-08-20

Fixed

  • 🚀 Tailwind v4 @source Directive Resolution
    • Fixed critical issue where star build and star dev couldn't scan Python CVA component definitions
    • Resolved subprocess working directory (cwd) handling in CSS builder
    • Fixed input.css path resolution to preserve relative @source directives
    • Ensures all component CSS classes are properly generated without manual workarounds
  • 🎨 Button Component Shadcn Parity
    • Completely overhauled Button component to match Shadcn UI pixel-perfectly
    • Fixed icon button sizing, alignment, and visual consistency
    • Added proper has-[>svg] conditional padding for all size variants
    • Implemented all Shadcn size variants (default, sm, lg, icon) with exact styling
    • Enhanced Iconify icon support with proper CSS targeting ([&_iconify-icon])
    • Fixed CVA variant/size conflicts and compound variant handling

Changed

  • 🧪 Improved Test Quality
    • Refactored metadata tests to focus on behavior rather than implementation details
    • Removed brittle string assertions that tested internal documentation
    • Enhanced test robustness for component metadata extraction
  • 📦 Cleaner Public API
    • Removed unused component_classes export from main package
    • Streamlined __init__.py imports for better maintainability

Added

  • 🛠️ Development Infrastructure
    • Added comprehensive test sandbox (test_sandbox/) with component preview app
    • Added Pyright configuration (pyrightconfig.json) for consistent type checking
    • Enhanced .gitignore with development artifacts (.sesskey)

0.1.4 - 2025-08-19

Added

  • 🛡️ FOUC Prevention in App Starter
    • Integrated fouc_script from StarHTML for flash-free theme loading
    • Supports both .dark class and data-theme attribute approaches
    • Automatic system preference detection on initial load

Changed

  • 🎨 Enhanced ThemeToggle Component
    • Simplified to work seamlessly with fouc_script
    • Support for arbitrary theme names (not just dark/light)
    • Cleaner reactive patterns using ds_effect
    • Renamed signal from $isDark to $isAlt for generic theme toggling
  • 📦 First-class Component Exports
    • Button and ThemeToggle now available as direct imports from starui
    • Enables from starui import Button, ThemeToggle for convenience

Fixed

  • 📁 CSS Path Detection in Init Command
    • Fixed critical issue where CSS output path was determined before directory creation
    • Now correctly detects and uses static/css/starui.css path
    • Ensures app starter template references correct CSS location
  • 🔧 Datastar Variable Scoping
    • Resolved duplicate variable declaration errors in ThemeToggle
    • Fixed scope conflicts between ds_on_load and ds_effect

0.1.3 - 2025-08-18

Added

  • 🎨 Optimized Template System
    • 57% CSS reduction with hybrid theming support
    • Enhanced ThemeToggle component with smart .dark class and data-theme detection
    • WCAG AA compliant OKLCH colors for better accessibility
    • Default theme system included in star init for immediate productivity

Changed

  • 🔧 Modern, Idiomatic Codebase
    • Refactored CLI commands (add.py, init.py) for concise, Pythonic patterns
    • Enhanced app starter template with semantic color system
    • Improved ThemeToggle to intelligently handle both Tailwind and semantic approaches
    • Updated dependency resolution system with comprehensive test coverage

Fixed

  • ✨ Enhanced Developer Experience
    • Removed CSS reset (Tailwind v4 handles it automatically)
    • Fixed StarHTML DatastarAttr type compatibility (no more type: ignore needed)
    • Enhanced component dependency system with theme_toggle → button resolution
    • Improved code formatting and linting compliance across all files

Technical

  • Updated StarHTML dependency to use latest GitHub version with DatastarAttr type fixes
  • Added comprehensive test suite for dependency resolution system
  • Enhanced ThemeToggle to support both .dark class and data-theme attribute approaches

0.1.2 - 2025-08-18

Changed

  • Updated default theme to use modern oklch color space matching shadcn v2 with Tailwind v4
  • Modernized type hints to use Python 3.10+ union syntax (X | None instead of Optional[X])
  • Improved code quality with more Pythonic patterns (dict comprehensions, walrus operator)

Fixed

  • Fixed CSS template generation - removed double curly braces that were causing Tailwind v4 errors
  • Fixed component import transformation - components now correctly import utilities from starui instead of relative imports

0.1.1 - 2025-08-17

Fixed

  • Fixed create-release workflow to correctly update only the project version
  • Fixed create-release workflow version extraction to use grep instead of tomli
  • Fixed GitHub Actions to use uv pip install instead of python -m pip install

0.1.0 - 2025-08-17

Added

  • 🎨 Core Component Library

    • Button component with shadcn/ui variants (default, destructive, outline, secondary, ghost, link)
    • Alert component with title and description support
    • Badge component with clickable variants
    • Card component with header, content, and footer sections
    • Input component with comprehensive form support
    • Label component with accessibility features
  • 🔧 CLI Tools

    • star init - Initialize new StarUI projects
    • star add <component> - Add components to existing projects
    • star dev <app.py> - Development server with hot reloading
    • star build - Build production CSS
    • star list - List available components
  • Modern Development Experience

    • Zero-configuration setup with sensible defaults
    • Automatic Tailwind CSS v4 integration
    • shadcn/ui color scheme and design tokens
    • CSS reset and dark mode support
    • File watching and hot reloading
  • 🎯 StarHTML Integration

    • Native StarHTML component compatibility
    • Type-safe component APIs with pragmatic flexibility
    • Proper FT return types and HTML attribute support
    • StarHTML dependency with type stubs
  • 📦 Build System & Quality

    • Modern Python packaging with pyproject.toml
    • Comprehensive GitHub Actions CI/CD
    • Code quality enforcement (ruff, pyright, pytest)
    • Automated PyPI publishing with manual version selection
    • 25% test coverage with behavior-focused testing

Technical Details

  • Dependencies: StarHTML, Typer, Watchdog, Requests, Pydantic, Rich
  • Python Support: 3.12+
  • Package Size: ~34KB wheel
  • Type Safety: 0 pyright errors with pragmatic configuration
  • Code Quality: 100% ruff compliance