Add programmatic consent API to @probo/cookie-banner

Expose a ConsentManager singleton via `@probo/cookie-banner/consent`
(ESM) and `window.Probo.consent` (IIFE) so customers can check and
react to consent state in their bundled JavaScript code, solving the
problem of third-party SDKs initialized programmatically that cannot
be blocked via data-cookie-consent attributes.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-05-13 14:59:48 +04:00
committed by Émile Ré
parent 2040931405
commit 4078567c04
5 changed files with 121 additions and 1 deletions

View File

@@ -16,6 +16,11 @@
"types": "./dist/headless/index.d.ts",
"import": "./dist/cookie-banner-headless.mjs",
"default": "./dist/cookie-banner-headless.mjs"
},
"./consent": {
"types": "./dist/consent.d.ts",
"import": "./dist/cookie-banner-consent.mjs",
"default": "./dist/cookie-banner-consent.mjs"
}
},
"scripts": {