# Changelog

## [1.0.22] - 2026-06-28
### Added
- **List**: Added internal filtering and sorting capabilities on the `List` component across all three layout modes (`normal`, `group`, `tree`). Supports `filter` and `order` attributes and state fields. In `tree` mode, filtering correctly propagates up to preserve parent-descendant hierarchy. Added a MutationObserver to listen to attribute changes and sync them reactively to internal component state.

## [1.0.21] - 2026-06-27
### Fixed
- **API**: Preserved declarative preset fields injected through `$.request.*` when the `API` component initializes its internal reactive request state.
- **Nav**: Restored horizontal dropdown behavior by removing container-level clipping, added `label`/`class` support for menu grouping, and switched vertical mode dropdown groups to inline expansion so long sidebars can scroll without popup clipping.

## [1.0.18] - 2026-06-11
### Changed
- **Component-Based Refactor**: Reorganized source code into independent, PascalCase named modules (e.g., `AutoForm.js`, `TagsInput.js`, `List.js`) to improve maintainability.
- **De-ESM Architecture**: Eliminated internal ESM `import`/`export` dependencies between modules. Logic is now shared via `globalThis` and registration patterns, ensuring 100% UMD compatibility.
- **Improved Encapsulation**: Each component is now a self-contained unit responsible for its own registration and internal logic.
- **Global API Consistency**: Ensured all public APIs (`HTTP`, `UI`, `AutoForm`, etc.) are consistently mounted to `globalThis`.

### Fixed
- **Scope Initialization**: Fixed a critical `TypeError` in `DatePicker` and `TagsInput` by refining parent scope inheritance and preventing recursive self-parenting in the underlying `state` engine.

## [1.0.13] - 2026-06-08
### Fixed
- **State Integration**: Bumped `@apigo.cc/state` to `1.0.18` to restore the globally injected `$`/`$$` helpers from the original UMD era, fixing `TagsInput` element targeting.
- **AutoForm Layout**: Fixed `horizontal` grid layout breakage caused by missing `AUTOFORM_STYLE` registration.
- **AutoForm Expansion**: Restored `AutoForm.register` with deep-blueprint `[control-wrapper]` physical insertion mechanism, fixing the blank rendering bug of `TagsInput` and `ColorPicker`.
- **Form Controls**: Removed `height: 100%` from `ColorPicker` preventing flex squash; fixed horizontal mode left-padding overflow for Check/Radio/Switch components.
- **Build**: Fully expunged `.mjs` artifacts from vite build pipeline to enforce UMD compliance.

## [1.0.12] - 2026-06-05
### Changed
- **De-ESM Refactor**: Fully transitioned the runtime environment to synchronous UMD loading, eliminating race conditions and rendering artifacts.
- **AutoForm Purification**: Purged all "black-box" patching logic that dynamically modified component templates. Field rendering now follows 100% transparent, explicit TEMPLATE logic.
- **Philosophy Alignment**: Removed all forbidden `RefreshState` calls from business logic, entrusting the asynchronous `MutationObserver` engine for all UI updates.

## [1.0.11] - 2026-06-05
### Changed
- Dependency: Updated `@apigo.cc/state` CDN script dependency to `1.0.16` for AutoForm nested field mounting bindings fix.

## [1.0.10] - 2026-06-05
### Fixed
- List: Removed reactive data-binding for `prevHeight` and `postHeight` and refactored virtual scroll to directly mutate padding DOM node heights, preventing reactive re-render overhead.
- List: Ignored elements with `offsetHeight === 0` during layout measurement, preventing hidden tab state (display: none) from polluting height average `avg`.
- List: Applied a safety minimum limit (16px) to average item height calculations to prevent `visibleCount` explosion.
- List: Implemented a synchronization re-entry lock using `setTimeout` in list refresh to cut recursive `scroll` event loops.
- Config: Configured `server.fs.allow: ['..']` in vite.config.js to allow local development cross-directory assets access (like fonts).

## [1.0.9] - 2026-06-05
### Changed
- Document: Comprehensive rewrite of base/README.md utilizing example-driven and static declaration binding paradigm.
- Document: Created base/CAPABILITY.md as the 100% complete spec checklist for all components and API.
- Config: Updated @apigo.cc/state dependency reference to v1.0.13.

## [1.0.8] - 2026-06-05
### Changed
- Bump version and align dependencies.

## [1.0.7] - 2026-05-29
### Added
- DatePicker: New control with range support (main/shadow field sync).
- ColorPicker: New control with color input and text hex input.
- IconPicker: New control with searchable Bootstrap Icons grid.
- AutoForm: Automatically registered the new controls.

## [1.0.6] - 2026-05-27
### Added
- AutoForm: Support data-driven visibility using `field.if` (utilizing state's `$$` double-calculation).
- AutoForm: Added reactive `data` property mapped to `state.data`.

### Changed
- AutoForm: Decoupled from global `State.editingData`. Data must now be passed via the `data` property.
- Internal: Optimized `_addAutoFormComponent` to support nested templates.

## [1.0.5] - 2026-05-23
### Added
- Documented project-wide "Manual DOM Sync" design principle for performance critical components.

### Fixed
- Verified VirtualScroll stability and timing.
- Synchronized component registration lifecycle during rapid DOM mutations.
