# Changelog

All notable changes to `smix-selector` are documented in this file.

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

## [Unreleased]

## [0.1.0] - 2026-05-26

### Added

- Initial release. Ported from TS `src/core/selector.ts` +
  `src/core/resolve-selector.ts:153-184` (v1.5 c5i-d maestro parity
  lock-in for the five-field OR-match semantics).
- `Selector` enum with 6 base forms: `Text` / `Id` / `Label` /
  `Role { role, name? }` / `Focused` / `Anchor`.
- `Pattern` enum with string-or-regex JSON wire form
  (untagged string ↔ `Pattern::Text`, tagged `{regex, flags}` ↔
  `Pattern::Regex`); auto-`i` flag injection matches TS regex
  default-case-insensitive behavior.
- `CompiledPattern` runtime cache shape exposed as a separate type
  so callers can amortize the ~16 µs regex compile across many
  candidates (see [BUDGETS.md](BUDGETS.md) "Design note: Pattern /
  CompiledPattern split").
- `Modifiers` (6 spatial keys + 3 index keys) + `IndexModifiers`
  for anchor-only base + `AnchorBox` for recursive nested anchors.
- `match_text` (SDK convenience, compiles on every call) +
  `match_text_compiled` (hot-loop API, pre-compiled).
- `describe_selector` cold-path renderer used in failure messages.
- `True` newtype (zero-cost zero-sized type for `focused: true` /
  `anchor.inside: true` JSON wire shape).
- 5-12× speedup over TS V8 baseline on string matches, 5-11× on
  pre-compiled regex matches. See [BUDGETS.md](BUDGETS.md) and
  [PERFORMANCE.md](../../PERFORMANCE.md).
- `tests/perf_gate.rs` regression budgets for the nine hot paths.
- `benches/matchtext.rs` criterion baseline.
- Fuzz targets `selector_parse` + `pattern_compile`.
