diff --git a/package-lock.json b/package-lock.json index c6e210f27..5966cb0a4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20182,7 +20182,7 @@ }, "packages/cookie-banner": { "name": "@probo/cookie-banner", - "version": "0.4.1", + "version": "0.5.0", "license": "MIT", "devDependencies": { "esbuild": "^0.27.0", diff --git a/packages/cookie-banner/CHANGELOG.md b/packages/cookie-banner/CHANGELOG.md index ebd814a2b..ff0119f84 100644 --- a/packages/cookie-banner/CHANGELOG.md +++ b/packages/cookie-banner/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to the `@probo/cookie-banner` SDK will be documented in this ## Unreleased +## [0.5.0] - 2026-05-20 + +### Added + +- Expose a programmatic consent API via a `ConsentManager` singleton (`@probo/cookie-banner/consent` ESM entrypoint and `window.Probo.consent` on the IIFE), so customers can read and react to consent state from their own bundled JavaScript — unblocking third-party SDKs that initialize programmatically and cannot be gated via `data-cookie-consent` attributes +- `ConsentManager` exposes a `subscribe()` method (unifying `onReady` + `onChange` with immediate replay) and `getAll()` now returns a cached, referentially stable snapshot, making it safe to use with React's `useSyncExternalStore` +- Share the `ConsentManager` singleton across bundles on `globalThis` so multiple copies of the SDK on the same page see the same state + ## [0.4.1] - 2026-05-13 ### Changed diff --git a/packages/cookie-banner/package.json b/packages/cookie-banner/package.json index 78a0a961a..116b0f6ae 100644 --- a/packages/cookie-banner/package.json +++ b/packages/cookie-banner/package.json @@ -1,6 +1,6 @@ { "name": "@probo/cookie-banner", - "version": "0.4.1", + "version": "0.5.0", "description": "Probo cookie consent banner SDK", "type": "module", "main": "dist/cookie-banner.mjs",