feat(core-consent): add ConsentProvider + useConsent() React subpath
Adds the ./react subpath to @repo/core-consent following the same pattern as @repo/core-analytics/react: - ConsentProvider wraps IConsent in React context - useConsent() returns the injected IConsent or throws ConsentContextError - RTL tests cover context propagation, grant/withdraw delegation, isGranted state reflection, getCategories, and missing-provider error - package.json: ./react export + React optional peerDep + RTL devDeps - tsconfig: extend react-library.json, include .tsx - vitest.config: jsdom environment for .test.tsx + jsdom setup Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
{
|
||||
"generatedAt": "2026-05-19T13:18:49.389Z",
|
||||
"commit": "ae4e0f2",
|
||||
"generatedAt": "2026-05-19T19:19:27.597Z",
|
||||
"commit": "33e3c09",
|
||||
"repo": {
|
||||
"statements": 96.72,
|
||||
"branches": 92.06,
|
||||
"functions": 96.83,
|
||||
"lines": 96.72,
|
||||
"statements": 96.74,
|
||||
"branches": 92.11,
|
||||
"functions": 96.86,
|
||||
"lines": 96.74,
|
||||
"counts": {
|
||||
"lf": 4607,
|
||||
"lh": 4456,
|
||||
"brf": 907,
|
||||
"brh": 835,
|
||||
"fnf": 284,
|
||||
"fnh": 275
|
||||
"lf": 4632,
|
||||
"lh": 4481,
|
||||
"brf": 912,
|
||||
"brh": 840,
|
||||
"fnf": 287,
|
||||
"fnh": 278
|
||||
}
|
||||
},
|
||||
"byPackage": {
|
||||
@@ -59,17 +59,17 @@
|
||||
}
|
||||
},
|
||||
"@repo/core-consent": {
|
||||
"statements": 99.69,
|
||||
"branches": 94.57,
|
||||
"functions": 96.77,
|
||||
"lines": 99.69,
|
||||
"statements": 99.72,
|
||||
"branches": 94.85,
|
||||
"functions": 97.06,
|
||||
"lines": 99.72,
|
||||
"counts": {
|
||||
"lf": 326,
|
||||
"lh": 325,
|
||||
"brf": 92,
|
||||
"brh": 87,
|
||||
"fnf": 31,
|
||||
"fnh": 30
|
||||
"lf": 351,
|
||||
"lh": 350,
|
||||
"brf": 97,
|
||||
"brh": 92,
|
||||
"fnf": 34,
|
||||
"fnh": 33
|
||||
}
|
||||
},
|
||||
"@repo/core-shared": {
|
||||
|
||||
Reference in New Issue
Block a user