cocoanut 0.2.1

A minimal, declarative macOS GUI framework for Rust
# Changelog

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

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Type-safe `CallbackId` wrapper for improved API safety
- New style modifiers: `.margin()`, `.italic()`, `.alignment()`
- `Alignment` enum for text/content alignment (Leading, Center, Trailing)
- Comprehensive API documentation with examples
- `CONTRIBUTING.md` guide for contributors
- GitHub Actions CI/CD workflow
- Quality check script (`scripts/quality-check.sh`)
- Helper methods for `State<T>`: `.modify()`, `.map()`
- Better error messages with more context

### Changed
- Improved error handling with more descriptive error types
- Enhanced documentation for public APIs
- Better code organization with section separators in constructors

### Fixed
- Added missing `Rendering` error variant for better error reporting

## [0.2.0] - 2024-03-17

### Added
- Complete rewrite from scratch
- Single `View` type with `ViewKind` enum (26 view types)
- Single `renderer.rs` — all AppKit mapping in one file
- 7 source files, ~2000 lines (down from 114 files, 26,878 lines)
- JSON serializable view tree (`ViewDesc`)
- 29 tests + 1 doctest
- ObjC target/action dispatch via `CocoanutActionHandler`
- `event::register(id, closure)` global callback registry
- All controls wired: Button, Checkbox, Radio, Toggle, Slider, Dropdown, DatePicker, ColorPicker
- `State<T>` with `on_change` listeners
- `counter_state()` convenience function
- `bind_label(state, tag, format_fn)` for tag-based NSView label updates
- `.tag(N)` modifier for identifying views
- 26 view types: VStack, HStack, ZStack, Spacer, Text, Label, TextField, SecureField, TextArea, Button, Checkbox, Radio, Slider, Toggle, Dropdown, DatePicker, ColorPicker, ScrollView, TabView, SplitView, GroupBox, WebView, TableView, ProgressBar, Image, Custom
- Dark mode: `Appearance` enum, `.dark()`/`.light()`, `set_appearance()`
- Accessibility: `.accessibility(label)` on all views
- Menu actions: `MenuItem::on_action(callback_id)`
- Zero compiler warnings

### Changed
- Complete architecture redesign following KISS, DRY, SoC principles
- Declarative API similar to SwiftUI
- Reactive state management

## [0.1.0] - Initial Release

Initial prototype version.

[Unreleased]: https://github.com/yingkitw/cocoanut/compare/v0.2.0...HEAD
[0.2.0]: https://github.com/yingkitw/cocoanut/releases/tag/v0.2.0
[0.1.0]: https://github.com/yingkitw/cocoanut/releases/tag/v0.1.0