|
| 1 | +# Changelog |
| 2 | + |
| 3 | +All notable changes to `react-native-update-gate` will be documented in this file. |
| 4 | + |
| 5 | +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), |
| 6 | +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). |
| 7 | + |
| 8 | +## [Unreleased] |
| 9 | + |
| 10 | +## [0.2.0] — 2026-05-18 |
| 11 | + |
| 12 | +### Added |
| 13 | +- **`accent` shorthand prop** on `<ForceUpdateModal>` and `<SuggestUpdateBanner>`. |
| 14 | + Override just the primary colour without spreading a full theme object: |
| 15 | + ```tsx |
| 16 | + <ForceUpdateModal visible={true} accent="#0F62FE" /> |
| 17 | + ``` |
| 18 | +- **`theme` prop now accepts `Partial<UpdateGateTheme>`** — pass only the |
| 19 | + properties you want to override. Merged on top of the context theme + platform default. |
| 20 | +- **`createTheme(overrides)` helper** exported for building a complete theme |
| 21 | + from partial overrides. |
| 22 | +- **`withAlpha(color, alpha)` helper** exported for tinted colour utilities. |
| 23 | +- **Built-in default icons** for both components: |
| 24 | + - `ForceUpdateModal` ships a 72×72 download-arrow card (`↓`) in tinted accent. |
| 25 | + - `SuggestUpdateBanner` ships a 32×32 up-arrow chip (`↑`) in tinted accent. |
| 26 | + - Replace either via the new `icon` prop with any ReactNode (SVG, Lottie, Image). |
| 27 | +- **Subtle icon bob animation** on the default modal icon (3 px, 1.6 s loop). |
| 28 | +- **Optional `@react-native-community/blur` integration** — installs as an |
| 29 | + optional peer dependency. When installed, the modal uses a true frosted-glass |
| 30 | + backdrop on iOS. Falls back gracefully to a darker scrim when not installed. |
| 31 | + |
| 32 | +### Changed |
| 33 | +- Modal redesigned in iOS / Liquid Glass aesthetic: pill button, tinted accent |
| 34 | + bar above title, soft floating shadow, tinted version-label pill. |
| 35 | +- Banner redesigned with a left accent bar, tinted icon chip, pill action button, |
| 36 | + larger close-button hit target. |
| 37 | +- Default `radius` bumped from 20 → 24 for softer card corners. |
| 38 | +- Default backdrop opacity slightly reduced for a cleaner look. |
| 39 | + |
| 40 | +### Fixed |
| 41 | +- `useTheme` now correctly merges partial themes from context + props + accent |
| 42 | + shorthand (was previously all-or-nothing). |
| 43 | + |
| 44 | +## [0.1.1] — 2026-05-15 |
| 45 | + |
| 46 | +### Fixed |
| 47 | +- `<SuggestUpdateBanner>` now handles dismissal internally. Tapping the `×` close |
| 48 | + button, tapping the action button, or `autoHideAfter` elapsing all hide the |
| 49 | + banner immediately without requiring the consumer to wire `onDismiss` or |
| 50 | + track local state. The banner re-appears automatically when the `visible` |
| 51 | + prop transitions from `false` back to `true` (e.g. a new release bumps the |
| 52 | + `latestAvailable` threshold). |
| 53 | + |
| 54 | +### Changed |
| 55 | +- `onDismiss` is now an **optional** callback fired *after* dismissal completes |
| 56 | + (for analytics / persistence). Existing consumers that passed it continue to |
| 57 | + work unchanged. |
| 58 | + |
| 59 | +## [0.1.0] — 2026-05-15 |
| 60 | + |
| 61 | +### Added |
| 62 | +- `evaluateUpdate(input)` — pure verdict function (`'force' | 'suggest' | 'none'`). |
| 63 | +- `presentUpdate(mode)` — platform-aware UI trigger. |
| 64 | +- `configureUpdateGate(config)` — one-time package config. |
| 65 | +- `useUpdate(input)` — React hook with `AppState` resume re-check. |
| 66 | +- `<ForceUpdateModal>` — animated, themeable, accessible blocking modal for iOS (and Android fallback). |
| 67 | +- `<SuggestUpdateBanner>` — dismissible banner for non-critical updates. |
| 68 | +- `<UpdateGateThemeProvider>` + `useTheme()` — theming primitives. |
| 69 | +- Android native module wrapping Google's Play App Update SDK 2.x (IMMEDIATE flow). |
| 70 | +- iOS: zero native code — pure-RN modal + `Linking` deep-link to App Store. |
| 71 | +- Server-driven version threshold support (`minRequired` + `latestAvailable`). |
| 72 | +- TypeScript types shipped (`strict`, `noUncheckedIndexedAccess`). |
| 73 | +- ESM + CommonJS dual build via `react-native-builder-bob`. |
| 74 | +- Jest test suite covering verdict matrix, config, and hook. |
0 commit comments