# Changelog

All notable changes to this project are documented here.  
Version numbers follow [Semantic Versioning](https://semver.org/) and match `library.properties`.  
Git tags use the `v` prefix (e.g. `v0.1.0`).

## [0.2.0] — 2026-06-25

### Added

- **Menu** per-state colors: `setActiveFill`, `setActiveText`, `setInactiveFill`, `setInactiveText`, `setInactiveEdge` (+ clear helpers)
- **Screen** optional custom theme (`setTheme`, `clearTheme`) — `UI::activeTheme()` resolves screen override
- **Asset prefetch** on navigation: `screenPrefetchAssets()` warms SD/volume icons and first anim frame before draw
- `imageAssetDrawReady()` — check whether a file-backed asset is cached and drawable
- `iconAnimDrawRect()` — consistent icon/anim hit box from widget bounds
- `Image::asImage()` widget cast for prefetch and tooling
- `Menu::itemIcon()` / `itemBadge()` accessors
- Live Preview docs: USB vs Bluetooth port selection, expanded troubleshooting

### Changed

- Animated icon patch path: first-frame bootstrap (`lastAnimFrame == 0xff`), SD warm before blit, up to 16 anim snap slots
- Emoji icon default draw size **32px** when widget has no explicit bounds
- `iconAnimDrawInitial()` returns `bool` (frame ready)
- Transition **fade** fixes RGB565 endianness in framebuffer snapshots
- Transitions prefetch leaving + entering screen assets; release SD cache on screen change
- Volume/SD draw: skip **RGB565 zero** pixels when no alpha file (transparent holes in opaque assets)
- Optional alpha file open failures no longer log as hard errors
- `LucarneDisplay.cpp` formatting and buffer blit helpers aligned with full-buffer mode

### Fixed

- Animated icons on volume/SD could stall on first frame until cache warm
- Fade transitions could show wrong colors on ESP32 full framebuffer (byte order)

## [0.1.4] — 2026-06-25

### Added

- Internal flash partition assets (`ImageStorage::Volume`) via `mountVolume()` — FFat, LittleFS, SPIFFS
- `LucarneStorageConfig.h` and sketch-level `LucarneUserConfig.h` for conditional SD / volume backends
- Animated icon frames loaded from SD and volume (PSRAM-aware frame cache, `setSdCacheMaxBytes`)
- RLE-compressed RGB565 flash images (`LucarneImageRle`)
- Opaque baked emoji icons (no per-frame alpha) and `setAnimReadyBudget()` for animation RAM limits
- Display `peekPixel()` / `writeBufferRect()` for full-buffer compositing
- Documentation: [`docs/ASSETS.md`](docs/ASSETS.md), [`docs/VOLUME.md`](docs/VOLUME.md), updated Studio and runtime guides

### Fixed

- Volume file paths no longer double-prefix `/ffat` when opening assets
- `ImageAsset` metadata read correctly from PROGMEM on ESP32
- UTF-8 decode edge case affecting icon and label rendering

## [0.1.3] — 2026-06-25

### Added

- SD card image loading for `Image` widgets (`ImageStorage::Sd`, RAM cache, row streaming fallback)
- Animated icon support (APNG emoji frames exported as `IconAnimAsset`, partial screen refresh)
- `setIconAnimSpeedPercent()` to tune animation playback speed
- Icon refs by name (`setIconRef`, Tabler / Fluent / custom / animated) on Icon, Menu, and Button widgets
- `Projet_setup.h` export: shared SPI bus, display pins, SD mount helpers
- Studio: PNG transparency and BMP import, export total size, images resized to on-screen usage

### Fixed

- ESP32 PROGMEM access for animated icon frames and string lookups (`strcmp_P`, `pgm_read_*`)
- Animated icons no longer trigger full-screen redraws every frame

## [0.1.2] — 2026-06-25

### Fixed

- ESP32 compile: include `ImageAsset` in `LucarneWidget.h`
- ESP32 compile: expose icon/image draw helpers used by `LucarneIconDraw`
- ESP32 compile: replace AVR-only `dtostrf` with `snprintf` in Gauge widget

## [0.1.1] — 2026-06-26

### Changed

- Align `library.json` with `library.properties` for PlatformIO and registry tooling
- Enable Arduino Library Manager lint in CI

## [0.1.0] — 2026-06-25

### Added

- ST7789 and ST7735S display drivers with rotation and panel offsets
- Graphics layer with optional framebuffer (full / direct modes, PSRAM-aware)
- UI runtime: screens, theme, data store, transitions, menu navigation
- Widgets: Label, Metric, Bar, Icon, Menu, Image, Button, Switch, Slider, Chart, Gauge, List
- Physical input: GPIO buttons, rotary encoder, touch feed
- Built-in Fira Sans fonts (`LucarneFontBody`, `LucarneFontTitle`)
- Lucarne Studio web editor (blueprint, designer, fonts, simulate, export)
- USB Live Preview for ESP32-S3
- Examples: HelloLucarne, LucarneDiag, LucarneUI, LucarneMenu, LucarnePreview
- Online documentation at [lucarne.techalchemy.fr](https://lucarne.techalchemy.fr/doc/)

[0.2.0]: https://github.com/Pupariaa/Lucarne/releases/tag/v0.2.0
[0.1.4]: https://github.com/Pupariaa/Lucarne/releases/tag/v0.1.4
[0.1.3]: https://github.com/Pupariaa/Lucarne/releases/tag/v0.1.3
[0.1.2]: https://github.com/Pupariaa/Lucarne/releases/tag/v0.1.2
[0.1.1]: https://github.com/Pupariaa/Lucarne/releases/tag/v0.1.1
[0.1.0]: https://github.com/Pupariaa/Lucarne/releases/tag/v0.1.0
