# Changelog

All notable changes to `@pigmilcom/a11y` are documented here.

Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
Versions follow [Semantic Versioning](https://semver.org/).

---

## [1.2.3] - [1.2.9] - 2026-04-14

### Changed
- Add Multi-language (8 translations - en, es, fr, de, pt, zh, ar, hi)
- Fix widget theme mode
- Small bug fixes

---

## [1.2.2] - 2026-04-10

### Changed
- Bumped version; README and CHANGELOG added to published package

---

## [1.2.1] - 2026-04-10

### Added
- **`theme` prop** (`'auto'` | `'light'` | `'dark'`, default `'auto'`) on the React component
- **`data-theme` attribute** support on the CDN `<script>` tag
- Full **light theme** CSS override block — all widget elements adapt: button, backdrop, dialog, toggles, pills, footer
- Theme auto-detection via `window.matchMedia('(prefers-color-scheme: light)')` with live OS-change subscription
- README: `data-theme` table + CDN examples, updated Props table with `theme` column

### Technical
- `data-pgm-theme` attribute applied to trigger button, backdrop and dialog for CSS scoping
- Light accent shifts from `#00e5a0` (dark) to `#009e70` (light) for proper contrast on white backgrounds

---

## [1.2.0] - 2026-04-10

### Added
- `scripts/build-gh.mjs` — automated gh-pages deployment (`npm run build:gh`)
- `LICENSE` file (MIT + usage tier notes)
- `SECURITY.md`
- `CONTRIBUTING.md`

### Changed
- README: added free-tier limits (1,000 req/day · 30,000 req/month) and white-label full-version details

---

## [1.1.3] - 2026-04-10

### Fixed
- `dist` artifacts rebuilt after transient `type: module` misconfig was reverted

---

## [1.1.2] - 2026-04-10

### Added
- CDN `license.min.js` endpoint verified live at `https://cdn.pigmil.com/a11y/dist/license.min.js`

### Changed
- Rebuilt all dist artifacts against the live endpoint

---

## [1.1.1] - 2026-04-10

### Added
- `scripts/build-license.js` — builds `src/license.js` → `dist/license.min.js` as a standalone obfuscated UMD module (`window.PigmilLicense.validateLicense`)
- `src/.gitignore` — `license.js` excluded from git; never enters public repo

### Changed
- `src/cdn.jsx` — `loadLicenseScript()` dynamically injects `<script>` pointing to `https://cdn.pigmil.com/a11y/dist/license.min.js` before mounting; fails open if CDN is unreachable
- `src/widget.jsx` — removed static `import` of `license.js`; runtime lookup via `window?.PigmilLicense?.validateLicense` with fail-open fallback for npm users
- `tsup.cdn.config.mjs` — simplified; esbuild plugin no longer needed
- `package.json` — `build:license` added to pipeline
- CDN bundle reduced from 171 KB → 165 KB (license code loaded externally)

### Removed
- `scripts/obfuscate-cdn.js` (superseded by `build-license.js`)

---

## [1.1.0] - 2026-04-10

### Added
- SaaS license validation — domain checked against `api.pigmil.com/a11y/validate`
- `src/license.js` — session cache (30-min TTL), local-dev bypass, XOR-encoded endpoint
- Free / Pro plan gating — PIGMIL branding hidden on Pro plan
- `MOCK_MODE` flag for development (always returns `{ ok: true, plan: 'free' }`)

---

## [1.0.10] - 2026-04-10

### Added
- PIGMIL copyright notice in widget footer (collapsible, free plan only)
- `pgm-notice-btn`, `pgm-notice`, `pgm-notice-text`, `pgm-notice-gh` CSS classes

### Changed
- Full CSS and widget overhaul — all styles migrated to `pgm-*` namespace

---

## [1.0.9] - 2026-04-10

### Changed
- Removed Tailwind CSS dependency from build pipeline
- All styles now ship as hand-authored CSS in `src/a11y.css`

---

## [1.0.8] - 2026-04-10

### Added
- CDN / IIFE bundle (`dist/a11y.cdn.js`) via `tsup` IIFE format
- `src/cdn.jsx` entry point with `data-position` support and `PigmilA11y.mount()` / `unmount()` globals
- CSS inlined into CDN bundle via `src/a11y-css.js` (generated by `scripts/build-css.js`)
- `scripts/build-css.js` pipeline

---

## [1.0.7] - 2026-04-10

### Added
- Initial public release
- WCAG 2.1 accessibility widget with text size, high contrast, invert, grayscale, reduce motion, highlight links, text spacing, ADHD mode, dyslexia font
- React component with `className` prop
- `localStorage` persistence under `pgm-a11y` key
- Full keyboard & screen-reader support (`role="dialog"`, `aria-checked`, `aria-expanded`)
- ESM + CJS builds via tsup
