@tantainnovative/ndpr-toolkit 5.5.1 → 5.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/README.md +36 -0
  3. package/dist/{chunk-C77CRJLD.mjs → chunk-2T5MY2Q6.mjs} +1 -1
  4. package/dist/chunk-7PV64WEZ.js +1 -0
  5. package/dist/{chunk-VTBHDHYK.js → chunk-NTEYQLYM.js} +1 -1
  6. package/dist/chunk-PEUAA5EC.js +1 -0
  7. package/dist/chunk-PYSYBUIV.mjs +1 -0
  8. package/dist/chunk-QNXLY5EJ.mjs +1 -0
  9. package/dist/chunk-YMKN3YQL.js +1 -0
  10. package/dist/chunk-ZY4RCV5C.mjs +1 -0
  11. package/dist/consent.d.mts +114 -0
  12. package/dist/consent.d.ts +114 -0
  13. package/dist/consent.js +1 -1
  14. package/dist/consent.mjs +1 -1
  15. package/dist/core.d.mts +88 -0
  16. package/dist/core.d.ts +88 -0
  17. package/dist/core.js +1 -1
  18. package/dist/core.mjs +1 -1
  19. package/dist/headless.d.mts +163 -0
  20. package/dist/headless.d.ts +163 -0
  21. package/dist/headless.js +1 -1
  22. package/dist/headless.mjs +1 -1
  23. package/dist/hooks.d.mts +90 -0
  24. package/dist/hooks.d.ts +90 -0
  25. package/dist/hooks.js +1 -1
  26. package/dist/hooks.mjs +1 -1
  27. package/dist/index.d.mts +131 -0
  28. package/dist/index.d.ts +131 -0
  29. package/dist/index.js +1 -1
  30. package/dist/index.mjs +1 -1
  31. package/dist/presets-consent.d.mts +2 -0
  32. package/dist/presets-consent.d.ts +2 -0
  33. package/dist/presets-consent.js +1 -1
  34. package/dist/presets-consent.mjs +1 -1
  35. package/dist/presets.d.mts +2 -0
  36. package/dist/presets.d.ts +2 -0
  37. package/dist/presets.js +1 -1
  38. package/dist/presets.mjs +1 -1
  39. package/dist/server.d.mts +88 -0
  40. package/dist/server.d.ts +88 -0
  41. package/dist/server.js +1 -1
  42. package/dist/server.mjs +1 -1
  43. package/dist/unstyled.d.mts +64 -0
  44. package/dist/unstyled.d.ts +64 -0
  45. package/dist/unstyled.js +1 -1
  46. package/dist/unstyled.mjs +1 -1
  47. package/package.json +1 -1
  48. package/dist/chunk-HMKXK23C.mjs +0 -1
  49. package/dist/chunk-L2VO3MEJ.js +0 -1
  50. package/dist/chunk-PXUX4FYM.js +0 -1
  51. package/dist/chunk-YTU4FNM2.mjs +0 -1
  52. /package/dist/{chunk-YQTZWPOS.mjs → chunk-23CULZBM.mjs} +0 -0
  53. /package/dist/{chunk-OVW5ASY3.js → chunk-VKDW2IHV.js} +0 -0
package/dist/headless.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';require('./chunk-OVW5ASY3.js');var chunkT32YQT4Y_js=require('./chunk-T32YQT4Y.js'),chunkEHQVTFYO_js=require('./chunk-EHQVTFYO.js'),chunkRC3XFXTJ_js=require('./chunk-RC3XFXTJ.js'),chunkQHW4UKGJ_js=require('./chunk-QHW4UKGJ.js'),chunkIRRUYR6M_js=require('./chunk-IRRUYR6M.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkTLIHFGIJ_js=require('./chunk-TLIHFGIJ.js');require('./chunk-JS7SYL5P.js'),require('./chunk-VFRGCBJY.js'),require('./chunk-7TTXS7JX.js'),require('./chunk-3YTAOT5O.js'),require('./chunk-Y346CURW.js'),require('./chunk-D2ZKDQVL.js'),require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js');var chunkQKXGVT2Q_js=require('./chunk-QKXGVT2Q.js'),chunkL2VO3MEJ_js=require('./chunk-L2VO3MEJ.js');require('./chunk-C2KEXHRX.js'),require('./chunk-DKLJ5DYN.js');var chunkTVA6D6S4_js=require('./chunk-TVA6D6S4.js');require('./chunk-R2ZZMATR.js');var chunkJLQT3W3E_js=require('./chunk-JLQT3W3E.js');require('./chunk-TQZWJGJ2.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"useBreachNotificationAssessment",{enumerable:true,get:function(){return chunkT32YQT4Y_js.a}});Object.defineProperty(exports,"useComplianceAuditReturn",{enumerable:true,get:function(){return chunkT32YQT4Y_js.d}});Object.defineProperty(exports,"useComplianceScore",{enumerable:true,get:function(){return chunkT32YQT4Y_js.b}});Object.defineProperty(exports,"useDCPMI",{enumerable:true,get:function(){return chunkT32YQT4Y_js.c}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkEHQVTFYO_js.a}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.a}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkQHW4UKGJ_js.a}});Object.defineProperty(exports,"useLawfulBasis",{enumerable:true,get:function(){return chunkIRRUYR6M_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkTLIHFGIJ_js.a}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkQKXGVT2Q_js.a}});Object.defineProperty(exports,"useFocusTrap",{enumerable:true,get:function(){return chunkL2VO3MEJ_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkTVA6D6S4_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkJLQT3W3E_js.a}});
2
+ 'use strict';require('./chunk-VKDW2IHV.js');var chunkT32YQT4Y_js=require('./chunk-T32YQT4Y.js'),chunkEHQVTFYO_js=require('./chunk-EHQVTFYO.js'),chunkRC3XFXTJ_js=require('./chunk-RC3XFXTJ.js'),chunkQHW4UKGJ_js=require('./chunk-QHW4UKGJ.js'),chunkIRRUYR6M_js=require('./chunk-IRRUYR6M.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkTLIHFGIJ_js=require('./chunk-TLIHFGIJ.js');require('./chunk-JS7SYL5P.js'),require('./chunk-VFRGCBJY.js'),require('./chunk-7TTXS7JX.js'),require('./chunk-3YTAOT5O.js'),require('./chunk-Y346CURW.js'),require('./chunk-D2ZKDQVL.js'),require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js');var chunkQKXGVT2Q_js=require('./chunk-QKXGVT2Q.js'),chunkYMKN3YQL_js=require('./chunk-YMKN3YQL.js');require('./chunk-C2KEXHRX.js'),require('./chunk-DKLJ5DYN.js'),require('./chunk-PEUAA5EC.js');var chunkTVA6D6S4_js=require('./chunk-TVA6D6S4.js');require('./chunk-R2ZZMATR.js');var chunkJLQT3W3E_js=require('./chunk-JLQT3W3E.js');require('./chunk-TQZWJGJ2.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"useBreachNotificationAssessment",{enumerable:true,get:function(){return chunkT32YQT4Y_js.a}});Object.defineProperty(exports,"useComplianceAuditReturn",{enumerable:true,get:function(){return chunkT32YQT4Y_js.d}});Object.defineProperty(exports,"useComplianceScore",{enumerable:true,get:function(){return chunkT32YQT4Y_js.b}});Object.defineProperty(exports,"useDCPMI",{enumerable:true,get:function(){return chunkT32YQT4Y_js.c}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkEHQVTFYO_js.a}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.a}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkQHW4UKGJ_js.a}});Object.defineProperty(exports,"useLawfulBasis",{enumerable:true,get:function(){return chunkIRRUYR6M_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkTLIHFGIJ_js.a}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkQKXGVT2Q_js.a}});Object.defineProperty(exports,"useCookieScan",{enumerable:true,get:function(){return chunkYMKN3YQL_js.b}});Object.defineProperty(exports,"useFocusTrap",{enumerable:true,get:function(){return chunkYMKN3YQL_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkTVA6D6S4_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkJLQT3W3E_js.a}});
package/dist/headless.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import'./chunk-YQTZWPOS.mjs';export{a as useBreachNotificationAssessment,d as useComplianceAuditReturn,b as useComplianceScore,c as useDCPMI}from'./chunk-C5UYAOYX.mjs';export{a as useBreach}from'./chunk-RFXGD5NE.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-UVXS7KRV.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-KE2FZH2V.mjs';export{a as useLawfulBasis}from'./chunk-B6BRD5SL.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as useROPA}from'./chunk-FRMVSG4N.mjs';import'./chunk-IVSNHT24.mjs';import'./chunk-MGXWQW5I.mjs';import'./chunk-6A7M4CGJ.mjs';import'./chunk-WTGKZX7J.mjs';import'./chunk-WJSUVPYX.mjs';import'./chunk-NBQQ2GN3.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';export{a as useConsent}from'./chunk-PQ5IPUJN.mjs';export{a as useFocusTrap}from'./chunk-YTU4FNM2.mjs';import'./chunk-XC3DLYEG.mjs';import'./chunk-R3ZKV2J7.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';import'./chunk-RRVML7CU.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';import'./chunk-LRRENTT5.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
2
+ import'./chunk-23CULZBM.mjs';export{a as useBreachNotificationAssessment,d as useComplianceAuditReturn,b as useComplianceScore,c as useDCPMI}from'./chunk-C5UYAOYX.mjs';export{a as useBreach}from'./chunk-RFXGD5NE.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-UVXS7KRV.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-KE2FZH2V.mjs';export{a as useLawfulBasis}from'./chunk-B6BRD5SL.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as useROPA}from'./chunk-FRMVSG4N.mjs';import'./chunk-IVSNHT24.mjs';import'./chunk-MGXWQW5I.mjs';import'./chunk-6A7M4CGJ.mjs';import'./chunk-WTGKZX7J.mjs';import'./chunk-WJSUVPYX.mjs';import'./chunk-NBQQ2GN3.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';export{a as useConsent}from'./chunk-PQ5IPUJN.mjs';export{b as useCookieScan,a as useFocusTrap}from'./chunk-QNXLY5EJ.mjs';import'./chunk-XC3DLYEG.mjs';import'./chunk-R3ZKV2J7.mjs';import'./chunk-ZY4RCV5C.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';import'./chunk-RRVML7CU.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';import'./chunk-LRRENTT5.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
package/dist/hooks.d.mts CHANGED
@@ -478,6 +478,44 @@ export declare interface ConsentStorageOptions {
478
478
  };
479
479
  }
480
480
 
481
+ /** How a present cookie was classified. */
482
+ export declare type CookieMatchSource = 'declared' | 'known' | 'none';
483
+
484
+ export declare interface CookieScanOptions {
485
+ /**
486
+ * The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
487
+ * Defaults to `document.cookie` in the browser, or `''` on the server.
488
+ */
489
+ cookieString?: string;
490
+ /** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
491
+ asOf?: number;
492
+ /** Extra known cookies, checked before the built-in registry (so they can override it). */
493
+ knownCookies?: DeclaredCookie[];
494
+ /** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
495
+ useKnownRegistry?: boolean;
496
+ }
497
+
498
+ export declare interface CookieScanResult {
499
+ /** When the scan ran (epoch ms). */
500
+ scannedAt: number;
501
+ /** Number of cookies present. */
502
+ total: number;
503
+ /** Every present cookie, classified. */
504
+ cookies: ScannedCookie[];
505
+ /** Cookies that matched one of your declared cookies. */
506
+ declared: ScannedCookie[];
507
+ /** Cookies present but NOT in your declaration — the compliance gap. */
508
+ undeclared: ScannedCookie[];
509
+ /** Undeclared cookies the built-in registry could still identify. */
510
+ identified: ScannedCookie[];
511
+ /** Undeclared cookies that could not be identified at all. */
512
+ unknown: ScannedCookie[];
513
+ /** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
514
+ byCategory: Record<string, ScannedCookie[]>;
515
+ /** True when there are no undeclared cookies. */
516
+ complete: boolean;
517
+ }
518
+
481
519
  /**
482
520
  * Summary of cross-border transfer compliance
483
521
  */
@@ -667,6 +705,30 @@ declare interface DCPMIThresholds {
667
705
  */
668
706
  declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
669
707
 
708
+ /**
709
+ * Cookie scanner — audits the cookies actually present in the browser against
710
+ * the cookies you have declared, surfacing undeclared cookies that put you out
711
+ * of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
712
+ * specific, informed consent).
713
+ *
714
+ * Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
715
+ * `Cookie:` header on the server, a test fixture), or call it in the browser
716
+ * and it reads `document.cookie`. Safe to import from a server bundle.
717
+ */
718
+ /** A cookie you declare against a consent category. */
719
+ export declare interface DeclaredCookie {
720
+ /** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
721
+ name: string | RegExp;
722
+ /** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
723
+ category: string;
724
+ /** Who sets the cookie (e.g. 'Google Analytics'). */
725
+ provider?: string;
726
+ /** What the cookie is used for — surfaced in your cookie policy. */
727
+ purpose?: string;
728
+ /** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
729
+ prefix?: boolean;
730
+ }
731
+
670
732
  /** Options for DOCX export of the finalised policy. */
671
733
  declare interface DOCXExportOptions {
672
734
  includeTOC?: boolean;
@@ -1555,6 +1617,17 @@ export declare interface ROPASummary {
1555
1617
  lastUpdated: number;
1556
1618
  }
1557
1619
 
1620
+ export declare interface ScannedCookie {
1621
+ /** The cookie name as found in the cookie string. */
1622
+ name: string;
1623
+ /** Resolved consent category, or `null` when it could not be classified. */
1624
+ category: string | null;
1625
+ /** Whether it matched your declaration, only the known registry, or nothing. */
1626
+ matchedBy: CookieMatchSource;
1627
+ provider?: string;
1628
+ purpose?: string;
1629
+ }
1630
+
1558
1631
  /**
1559
1632
  * Additional conditions required for processing sensitive personal data
1560
1633
  * per NDPA Section 30
@@ -1987,6 +2060,23 @@ export declare interface UseConsentReturn {
1987
2060
  isLoading: boolean;
1988
2061
  }
1989
2062
 
2063
+ /**
2064
+ * React hook that scans `document.cookie` against your declared cookies on
2065
+ * mount and exposes a `rescan()` to re-run after you set or clear cookies.
2066
+ *
2067
+ * `result` is `null` until the first client-side scan, so server and first
2068
+ * client render agree (no hydration mismatch). `rescan` is stable and always
2069
+ * reads the latest `declared`/`options` — callers don't need to memoise them.
2070
+ */
2071
+ export declare function useCookieScan(declared?: DeclaredCookie[], options?: CookieScanOptions): UseCookieScanReturn;
2072
+
2073
+ export declare interface UseCookieScanReturn {
2074
+ /** The latest scan, or `null` before the first client-side scan (e.g. during SSR). */
2075
+ result: CookieScanResult | null;
2076
+ /** Re-read the cookies and recompute the scan with the current arguments. */
2077
+ rescan: () => void;
2078
+ }
2079
+
1990
2080
  /**
1991
2081
  * Hook for managing cross-border data transfers in compliance with NDPA Part VIII (Sections 41-43).
1992
2082
  *
package/dist/hooks.d.ts CHANGED
@@ -478,6 +478,44 @@ export declare interface ConsentStorageOptions {
478
478
  };
479
479
  }
480
480
 
481
+ /** How a present cookie was classified. */
482
+ export declare type CookieMatchSource = 'declared' | 'known' | 'none';
483
+
484
+ export declare interface CookieScanOptions {
485
+ /**
486
+ * The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
487
+ * Defaults to `document.cookie` in the browser, or `''` on the server.
488
+ */
489
+ cookieString?: string;
490
+ /** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
491
+ asOf?: number;
492
+ /** Extra known cookies, checked before the built-in registry (so they can override it). */
493
+ knownCookies?: DeclaredCookie[];
494
+ /** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
495
+ useKnownRegistry?: boolean;
496
+ }
497
+
498
+ export declare interface CookieScanResult {
499
+ /** When the scan ran (epoch ms). */
500
+ scannedAt: number;
501
+ /** Number of cookies present. */
502
+ total: number;
503
+ /** Every present cookie, classified. */
504
+ cookies: ScannedCookie[];
505
+ /** Cookies that matched one of your declared cookies. */
506
+ declared: ScannedCookie[];
507
+ /** Cookies present but NOT in your declaration — the compliance gap. */
508
+ undeclared: ScannedCookie[];
509
+ /** Undeclared cookies the built-in registry could still identify. */
510
+ identified: ScannedCookie[];
511
+ /** Undeclared cookies that could not be identified at all. */
512
+ unknown: ScannedCookie[];
513
+ /** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
514
+ byCategory: Record<string, ScannedCookie[]>;
515
+ /** True when there are no undeclared cookies. */
516
+ complete: boolean;
517
+ }
518
+
481
519
  /**
482
520
  * Summary of cross-border transfer compliance
483
521
  */
@@ -667,6 +705,30 @@ declare interface DCPMIThresholds {
667
705
  */
668
706
  declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
669
707
 
708
+ /**
709
+ * Cookie scanner — audits the cookies actually present in the browser against
710
+ * the cookies you have declared, surfacing undeclared cookies that put you out
711
+ * of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
712
+ * specific, informed consent).
713
+ *
714
+ * Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
715
+ * `Cookie:` header on the server, a test fixture), or call it in the browser
716
+ * and it reads `document.cookie`. Safe to import from a server bundle.
717
+ */
718
+ /** A cookie you declare against a consent category. */
719
+ export declare interface DeclaredCookie {
720
+ /** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
721
+ name: string | RegExp;
722
+ /** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
723
+ category: string;
724
+ /** Who sets the cookie (e.g. 'Google Analytics'). */
725
+ provider?: string;
726
+ /** What the cookie is used for — surfaced in your cookie policy. */
727
+ purpose?: string;
728
+ /** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
729
+ prefix?: boolean;
730
+ }
731
+
670
732
  /** Options for DOCX export of the finalised policy. */
671
733
  declare interface DOCXExportOptions {
672
734
  includeTOC?: boolean;
@@ -1555,6 +1617,17 @@ export declare interface ROPASummary {
1555
1617
  lastUpdated: number;
1556
1618
  }
1557
1619
 
1620
+ export declare interface ScannedCookie {
1621
+ /** The cookie name as found in the cookie string. */
1622
+ name: string;
1623
+ /** Resolved consent category, or `null` when it could not be classified. */
1624
+ category: string | null;
1625
+ /** Whether it matched your declaration, only the known registry, or nothing. */
1626
+ matchedBy: CookieMatchSource;
1627
+ provider?: string;
1628
+ purpose?: string;
1629
+ }
1630
+
1558
1631
  /**
1559
1632
  * Additional conditions required for processing sensitive personal data
1560
1633
  * per NDPA Section 30
@@ -1987,6 +2060,23 @@ export declare interface UseConsentReturn {
1987
2060
  isLoading: boolean;
1988
2061
  }
1989
2062
 
2063
+ /**
2064
+ * React hook that scans `document.cookie` against your declared cookies on
2065
+ * mount and exposes a `rescan()` to re-run after you set or clear cookies.
2066
+ *
2067
+ * `result` is `null` until the first client-side scan, so server and first
2068
+ * client render agree (no hydration mismatch). `rescan` is stable and always
2069
+ * reads the latest `declared`/`options` — callers don't need to memoise them.
2070
+ */
2071
+ export declare function useCookieScan(declared?: DeclaredCookie[], options?: CookieScanOptions): UseCookieScanReturn;
2072
+
2073
+ export declare interface UseCookieScanReturn {
2074
+ /** The latest scan, or `null` before the first client-side scan (e.g. during SSR). */
2075
+ result: CookieScanResult | null;
2076
+ /** Re-read the cookies and recompute the scan with the current arguments. */
2077
+ rescan: () => void;
2078
+ }
2079
+
1990
2080
  /**
1991
2081
  * Hook for managing cross-border data transfers in compliance with NDPA Part VIII (Sections 41-43).
1992
2082
  *
package/dist/hooks.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- 'use strict';require('./chunk-OVW5ASY3.js');var chunkT32YQT4Y_js=require('./chunk-T32YQT4Y.js'),chunkEHQVTFYO_js=require('./chunk-EHQVTFYO.js'),chunkRC3XFXTJ_js=require('./chunk-RC3XFXTJ.js'),chunkQHW4UKGJ_js=require('./chunk-QHW4UKGJ.js'),chunkIRRUYR6M_js=require('./chunk-IRRUYR6M.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkTLIHFGIJ_js=require('./chunk-TLIHFGIJ.js');require('./chunk-JS7SYL5P.js'),require('./chunk-VFRGCBJY.js'),require('./chunk-7TTXS7JX.js'),require('./chunk-3YTAOT5O.js'),require('./chunk-Y346CURW.js'),require('./chunk-D2ZKDQVL.js'),require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js');var chunkQKXGVT2Q_js=require('./chunk-QKXGVT2Q.js'),chunkL2VO3MEJ_js=require('./chunk-L2VO3MEJ.js');require('./chunk-C2KEXHRX.js'),require('./chunk-DKLJ5DYN.js');var chunkTVA6D6S4_js=require('./chunk-TVA6D6S4.js');require('./chunk-R2ZZMATR.js');var chunkJLQT3W3E_js=require('./chunk-JLQT3W3E.js');require('./chunk-TQZWJGJ2.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"useBreachNotificationAssessment",{enumerable:true,get:function(){return chunkT32YQT4Y_js.a}});Object.defineProperty(exports,"useComplianceAuditReturn",{enumerable:true,get:function(){return chunkT32YQT4Y_js.d}});Object.defineProperty(exports,"useComplianceScore",{enumerable:true,get:function(){return chunkT32YQT4Y_js.b}});Object.defineProperty(exports,"useDCPMI",{enumerable:true,get:function(){return chunkT32YQT4Y_js.c}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkEHQVTFYO_js.a}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.a}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkQHW4UKGJ_js.a}});Object.defineProperty(exports,"useLawfulBasis",{enumerable:true,get:function(){return chunkIRRUYR6M_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkTLIHFGIJ_js.a}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkQKXGVT2Q_js.a}});Object.defineProperty(exports,"useFocusTrap",{enumerable:true,get:function(){return chunkL2VO3MEJ_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkTVA6D6S4_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkJLQT3W3E_js.a}});
2
+ 'use strict';require('./chunk-VKDW2IHV.js');var chunkT32YQT4Y_js=require('./chunk-T32YQT4Y.js'),chunkEHQVTFYO_js=require('./chunk-EHQVTFYO.js'),chunkRC3XFXTJ_js=require('./chunk-RC3XFXTJ.js'),chunkQHW4UKGJ_js=require('./chunk-QHW4UKGJ.js'),chunkIRRUYR6M_js=require('./chunk-IRRUYR6M.js'),chunkHHK5LHEG_js=require('./chunk-HHK5LHEG.js'),chunkTLIHFGIJ_js=require('./chunk-TLIHFGIJ.js');require('./chunk-JS7SYL5P.js'),require('./chunk-VFRGCBJY.js'),require('./chunk-7TTXS7JX.js'),require('./chunk-3YTAOT5O.js'),require('./chunk-Y346CURW.js'),require('./chunk-D2ZKDQVL.js'),require('./chunk-6LJHLE6G.js'),require('./chunk-YFBDJ4FH.js'),require('./chunk-WZYCBW2R.js'),require('./chunk-4CVBQC66.js');var chunkQKXGVT2Q_js=require('./chunk-QKXGVT2Q.js'),chunkYMKN3YQL_js=require('./chunk-YMKN3YQL.js');require('./chunk-C2KEXHRX.js'),require('./chunk-DKLJ5DYN.js'),require('./chunk-PEUAA5EC.js');var chunkTVA6D6S4_js=require('./chunk-TVA6D6S4.js');require('./chunk-R2ZZMATR.js');var chunkJLQT3W3E_js=require('./chunk-JLQT3W3E.js');require('./chunk-TQZWJGJ2.js'),require('./chunk-ZVOIR4QH.js'),require('./chunk-VWED6UTN.js'),require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"useBreachNotificationAssessment",{enumerable:true,get:function(){return chunkT32YQT4Y_js.a}});Object.defineProperty(exports,"useComplianceAuditReturn",{enumerable:true,get:function(){return chunkT32YQT4Y_js.d}});Object.defineProperty(exports,"useComplianceScore",{enumerable:true,get:function(){return chunkT32YQT4Y_js.b}});Object.defineProperty(exports,"useDCPMI",{enumerable:true,get:function(){return chunkT32YQT4Y_js.c}});Object.defineProperty(exports,"useBreach",{enumerable:true,get:function(){return chunkEHQVTFYO_js.a}});Object.defineProperty(exports,"useDefaultPrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.b}});Object.defineProperty(exports,"usePrivacyPolicy",{enumerable:true,get:function(){return chunkRC3XFXTJ_js.a}});Object.defineProperty(exports,"useAdaptivePolicyWizard",{enumerable:true,get:function(){return chunkQHW4UKGJ_js.a}});Object.defineProperty(exports,"useLawfulBasis",{enumerable:true,get:function(){return chunkIRRUYR6M_js.a}});Object.defineProperty(exports,"useCrossBorderTransfer",{enumerable:true,get:function(){return chunkHHK5LHEG_js.a}});Object.defineProperty(exports,"useROPA",{enumerable:true,get:function(){return chunkTLIHFGIJ_js.a}});Object.defineProperty(exports,"useConsent",{enumerable:true,get:function(){return chunkQKXGVT2Q_js.a}});Object.defineProperty(exports,"useCookieScan",{enumerable:true,get:function(){return chunkYMKN3YQL_js.b}});Object.defineProperty(exports,"useFocusTrap",{enumerable:true,get:function(){return chunkYMKN3YQL_js.a}});Object.defineProperty(exports,"useDSR",{enumerable:true,get:function(){return chunkTVA6D6S4_js.a}});Object.defineProperty(exports,"useDPIA",{enumerable:true,get:function(){return chunkJLQT3W3E_js.a}});
package/dist/hooks.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- import'./chunk-YQTZWPOS.mjs';export{a as useBreachNotificationAssessment,d as useComplianceAuditReturn,b as useComplianceScore,c as useDCPMI}from'./chunk-C5UYAOYX.mjs';export{a as useBreach}from'./chunk-RFXGD5NE.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-UVXS7KRV.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-KE2FZH2V.mjs';export{a as useLawfulBasis}from'./chunk-B6BRD5SL.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as useROPA}from'./chunk-FRMVSG4N.mjs';import'./chunk-IVSNHT24.mjs';import'./chunk-MGXWQW5I.mjs';import'./chunk-6A7M4CGJ.mjs';import'./chunk-WTGKZX7J.mjs';import'./chunk-WJSUVPYX.mjs';import'./chunk-NBQQ2GN3.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';export{a as useConsent}from'./chunk-PQ5IPUJN.mjs';export{a as useFocusTrap}from'./chunk-YTU4FNM2.mjs';import'./chunk-XC3DLYEG.mjs';import'./chunk-R3ZKV2J7.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';import'./chunk-RRVML7CU.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';import'./chunk-LRRENTT5.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
2
+ import'./chunk-23CULZBM.mjs';export{a as useBreachNotificationAssessment,d as useComplianceAuditReturn,b as useComplianceScore,c as useDCPMI}from'./chunk-C5UYAOYX.mjs';export{a as useBreach}from'./chunk-RFXGD5NE.mjs';export{b as useDefaultPrivacyPolicy,a as usePrivacyPolicy}from'./chunk-UVXS7KRV.mjs';export{a as useAdaptivePolicyWizard}from'./chunk-KE2FZH2V.mjs';export{a as useLawfulBasis}from'./chunk-B6BRD5SL.mjs';export{a as useCrossBorderTransfer}from'./chunk-KDAZQO3N.mjs';export{a as useROPA}from'./chunk-FRMVSG4N.mjs';import'./chunk-IVSNHT24.mjs';import'./chunk-MGXWQW5I.mjs';import'./chunk-6A7M4CGJ.mjs';import'./chunk-WTGKZX7J.mjs';import'./chunk-WJSUVPYX.mjs';import'./chunk-NBQQ2GN3.mjs';import'./chunk-BIJSMSUU.mjs';import'./chunk-7BJXI2HI.mjs';import'./chunk-LWIKDDSU.mjs';import'./chunk-XP5PL6K7.mjs';export{a as useConsent}from'./chunk-PQ5IPUJN.mjs';export{b as useCookieScan,a as useFocusTrap}from'./chunk-QNXLY5EJ.mjs';import'./chunk-XC3DLYEG.mjs';import'./chunk-R3ZKV2J7.mjs';import'./chunk-ZY4RCV5C.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';import'./chunk-RRVML7CU.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';import'./chunk-LRRENTT5.mjs';import'./chunk-ITCY2Z66.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
package/dist/index.d.mts CHANGED
@@ -983,6 +983,8 @@ export declare interface ConsentBannerClassNames {
983
983
  saveButton?: string;
984
984
  customizePanel?: string;
985
985
  selectAllButton?: string;
986
+ /** The optional on-page cookie scan panel (shown in the customize view) */
987
+ cookieScanPanel?: string;
986
988
  /** Alias for acceptButton */
987
989
  primaryButton?: string;
988
990
  /** Alias for rejectButton */
@@ -1106,6 +1108,30 @@ export declare interface ConsentBannerProps {
1106
1108
  * Called when the banner is shown, accepted, rejected, customized, or dismissed.
1107
1109
  */
1108
1110
  onAnalytics?: (event: ConsentAnalyticsEvent) => void;
1111
+ /**
1112
+ * Show a "cookies on this page" scan panel inside the customize view. It
1113
+ * audits the cookies actually present against `declaredCookies` and flags
1114
+ * undeclared ones — a transparency / self-audit aid (NDPA S.25-26 specific,
1115
+ * informed consent). Off by default.
1116
+ * @default false
1117
+ */
1118
+ showCookieScan?: boolean;
1119
+ /**
1120
+ * The cookies you declare, matched against what's present when
1121
+ * `showCookieScan` is on. Without it, every present cookie is treated as
1122
+ * undeclared (though the built-in registry may still identify it).
1123
+ */
1124
+ declaredCookies?: DeclaredCookie[];
1125
+ /**
1126
+ * Options forwarded to the scan (e.g. `knownCookies`, `useKnownRegistry`,
1127
+ * or a `cookieString` to scan instead of `document.cookie`).
1128
+ */
1129
+ cookieScanOptions?: CookieScanOptions;
1130
+ /**
1131
+ * Heading for the cookie scan panel.
1132
+ * @default "Cookies on this page"
1133
+ */
1134
+ cookieScanTitle?: string;
1109
1135
  }
1110
1136
 
1111
1137
  /**
@@ -1369,6 +1395,44 @@ export declare interface CookieAdapterOptions {
1369
1395
  sameSite?: 'Strict' | 'Lax' | 'None';
1370
1396
  }
1371
1397
 
1398
+ /** How a present cookie was classified. */
1399
+ export declare type CookieMatchSource = 'declared' | 'known' | 'none';
1400
+
1401
+ export declare interface CookieScanOptions {
1402
+ /**
1403
+ * The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
1404
+ * Defaults to `document.cookie` in the browser, or `''` on the server.
1405
+ */
1406
+ cookieString?: string;
1407
+ /** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
1408
+ asOf?: number;
1409
+ /** Extra known cookies, checked before the built-in registry (so they can override it). */
1410
+ knownCookies?: DeclaredCookie[];
1411
+ /** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
1412
+ useKnownRegistry?: boolean;
1413
+ }
1414
+
1415
+ export declare interface CookieScanResult {
1416
+ /** When the scan ran (epoch ms). */
1417
+ scannedAt: number;
1418
+ /** Number of cookies present. */
1419
+ total: number;
1420
+ /** Every present cookie, classified. */
1421
+ cookies: ScannedCookie[];
1422
+ /** Cookies that matched one of your declared cookies. */
1423
+ declared: ScannedCookie[];
1424
+ /** Cookies present but NOT in your declaration — the compliance gap. */
1425
+ undeclared: ScannedCookie[];
1426
+ /** Undeclared cookies the built-in registry could still identify. */
1427
+ identified: ScannedCookie[];
1428
+ /** Undeclared cookies that could not be identified at all. */
1429
+ unknown: ScannedCookie[];
1430
+ /** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
1431
+ byCategory: Record<string, ScannedCookie[]>;
1432
+ /** True when there are no undeclared cookies. */
1433
+ complete: boolean;
1434
+ }
1435
+
1372
1436
  /**
1373
1437
  * Creates a new audit entry from consent settings. If `previousSettings` is
1374
1438
  * provided, the action is automatically determined by comparing old and new
@@ -1665,6 +1729,30 @@ export declare interface DCPMIThresholds {
1665
1729
  */
1666
1730
  export declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
1667
1731
 
1732
+ /**
1733
+ * Cookie scanner — audits the cookies actually present in the browser against
1734
+ * the cookies you have declared, surfacing undeclared cookies that put you out
1735
+ * of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
1736
+ * specific, informed consent).
1737
+ *
1738
+ * Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
1739
+ * `Cookie:` header on the server, a test fixture), or call it in the browser
1740
+ * and it reads `document.cookie`. Safe to import from a server bundle.
1741
+ */
1742
+ /** A cookie you declare against a consent category. */
1743
+ export declare interface DeclaredCookie {
1744
+ /** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
1745
+ name: string | RegExp;
1746
+ /** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
1747
+ category: string;
1748
+ /** Who sets the cookie (e.g. 'Google Analytics'). */
1749
+ provider?: string;
1750
+ /** What the cookie is used for — surfaced in your cookie policy. */
1751
+ purpose?: string;
1752
+ /** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
1753
+ prefix?: boolean;
1754
+ }
1755
+
1668
1756
  /** September 2025 GAID baseline annual fees (NGN). */
1669
1757
  export declare const DEFAULT_DCPMI_FEES_NGN: DCPMIFees;
1670
1758
 
@@ -2628,6 +2716,14 @@ declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' | 'educa
2628
2716
  */
2629
2717
  export declare function isNDPCApprovalRequired(mechanism: TransferMechanism): boolean;
2630
2718
 
2719
+ /**
2720
+ * Built-in registry of widely deployed third-party cookies, so an undeclared
2721
+ * cookie can often still be identified (provider + likely category). Override
2722
+ * or extend via {@link CookieScanOptions.knownCookies}; categories follow the
2723
+ * common necessary / functional / analytics / marketing taxonomy.
2724
+ */
2725
+ export declare const KNOWN_COOKIES: DeclaredCookie[];
2726
+
2631
2727
  /**
2632
2728
  * Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
2633
2729
  * Every processing activity must have a documented lawful basis
@@ -4350,6 +4446,24 @@ export declare function runNdprAudit(input: NdprAuditInput, options?: NdprAuditO
4350
4446
  */
4351
4447
  export declare function sanitizeInput(input: string): string;
4352
4448
 
4449
+ /**
4450
+ * Scan the cookies present against your declared cookies and a registry of
4451
+ * well-known third-party cookies. Returns which cookies are declared, which are
4452
+ * undeclared (and whether they can still be identified), and a per-category view.
4453
+ */
4454
+ export declare function scanCookies(declared?: DeclaredCookie[], options?: CookieScanOptions): CookieScanResult;
4455
+
4456
+ export declare interface ScannedCookie {
4457
+ /** The cookie name as found in the cookie string. */
4458
+ name: string;
4459
+ /** Resolved consent category, or `null` when it could not be classified. */
4460
+ category: string | null;
4461
+ /** Whether it matched your declaration, only the known registry, or nothing. */
4462
+ matchedBy: CookieMatchSource;
4463
+ provider?: string;
4464
+ purpose?: string;
4465
+ }
4466
+
4353
4467
  /**
4354
4468
  * Additional conditions required for processing sensitive personal data
4355
4469
  * per NDPA Section 30
@@ -4938,6 +5052,23 @@ declare interface UseConsentReturn {
4938
5052
  isLoading: boolean;
4939
5053
  }
4940
5054
 
5055
+ /**
5056
+ * React hook that scans `document.cookie` against your declared cookies on
5057
+ * mount and exposes a `rescan()` to re-run after you set or clear cookies.
5058
+ *
5059
+ * `result` is `null` until the first client-side scan, so server and first
5060
+ * client render agree (no hydration mismatch). `rescan` is stable and always
5061
+ * reads the latest `declared`/`options` — callers don't need to memoise them.
5062
+ */
5063
+ export declare function useCookieScan(declared?: DeclaredCookie[], options?: CookieScanOptions): UseCookieScanReturn;
5064
+
5065
+ export declare interface UseCookieScanReturn {
5066
+ /** The latest scan, or `null` before the first client-side scan (e.g. during SSR). */
5067
+ result: CookieScanResult | null;
5068
+ /** Re-read the cookies and recompute the scan with the current arguments. */
5069
+ rescan: () => void;
5070
+ }
5071
+
4941
5072
  /**
4942
5073
  * Hook for managing cross-border data transfers in compliance with NDPA Part VIII (Sections 41-43).
4943
5074
  *
package/dist/index.d.ts CHANGED
@@ -983,6 +983,8 @@ export declare interface ConsentBannerClassNames {
983
983
  saveButton?: string;
984
984
  customizePanel?: string;
985
985
  selectAllButton?: string;
986
+ /** The optional on-page cookie scan panel (shown in the customize view) */
987
+ cookieScanPanel?: string;
986
988
  /** Alias for acceptButton */
987
989
  primaryButton?: string;
988
990
  /** Alias for rejectButton */
@@ -1106,6 +1108,30 @@ export declare interface ConsentBannerProps {
1106
1108
  * Called when the banner is shown, accepted, rejected, customized, or dismissed.
1107
1109
  */
1108
1110
  onAnalytics?: (event: ConsentAnalyticsEvent) => void;
1111
+ /**
1112
+ * Show a "cookies on this page" scan panel inside the customize view. It
1113
+ * audits the cookies actually present against `declaredCookies` and flags
1114
+ * undeclared ones — a transparency / self-audit aid (NDPA S.25-26 specific,
1115
+ * informed consent). Off by default.
1116
+ * @default false
1117
+ */
1118
+ showCookieScan?: boolean;
1119
+ /**
1120
+ * The cookies you declare, matched against what's present when
1121
+ * `showCookieScan` is on. Without it, every present cookie is treated as
1122
+ * undeclared (though the built-in registry may still identify it).
1123
+ */
1124
+ declaredCookies?: DeclaredCookie[];
1125
+ /**
1126
+ * Options forwarded to the scan (e.g. `knownCookies`, `useKnownRegistry`,
1127
+ * or a `cookieString` to scan instead of `document.cookie`).
1128
+ */
1129
+ cookieScanOptions?: CookieScanOptions;
1130
+ /**
1131
+ * Heading for the cookie scan panel.
1132
+ * @default "Cookies on this page"
1133
+ */
1134
+ cookieScanTitle?: string;
1109
1135
  }
1110
1136
 
1111
1137
  /**
@@ -1369,6 +1395,44 @@ export declare interface CookieAdapterOptions {
1369
1395
  sameSite?: 'Strict' | 'Lax' | 'None';
1370
1396
  }
1371
1397
 
1398
+ /** How a present cookie was classified. */
1399
+ export declare type CookieMatchSource = 'declared' | 'known' | 'none';
1400
+
1401
+ export declare interface CookieScanOptions {
1402
+ /**
1403
+ * The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
1404
+ * Defaults to `document.cookie` in the browser, or `''` on the server.
1405
+ */
1406
+ cookieString?: string;
1407
+ /** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
1408
+ asOf?: number;
1409
+ /** Extra known cookies, checked before the built-in registry (so they can override it). */
1410
+ knownCookies?: DeclaredCookie[];
1411
+ /** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
1412
+ useKnownRegistry?: boolean;
1413
+ }
1414
+
1415
+ export declare interface CookieScanResult {
1416
+ /** When the scan ran (epoch ms). */
1417
+ scannedAt: number;
1418
+ /** Number of cookies present. */
1419
+ total: number;
1420
+ /** Every present cookie, classified. */
1421
+ cookies: ScannedCookie[];
1422
+ /** Cookies that matched one of your declared cookies. */
1423
+ declared: ScannedCookie[];
1424
+ /** Cookies present but NOT in your declaration — the compliance gap. */
1425
+ undeclared: ScannedCookie[];
1426
+ /** Undeclared cookies the built-in registry could still identify. */
1427
+ identified: ScannedCookie[];
1428
+ /** Undeclared cookies that could not be identified at all. */
1429
+ unknown: ScannedCookie[];
1430
+ /** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
1431
+ byCategory: Record<string, ScannedCookie[]>;
1432
+ /** True when there are no undeclared cookies. */
1433
+ complete: boolean;
1434
+ }
1435
+
1372
1436
  /**
1373
1437
  * Creates a new audit entry from consent settings. If `previousSettings` is
1374
1438
  * provided, the action is automatically determined by comparing old and new
@@ -1665,6 +1729,30 @@ export declare interface DCPMIThresholds {
1665
1729
  */
1666
1730
  export declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
1667
1731
 
1732
+ /**
1733
+ * Cookie scanner — audits the cookies actually present in the browser against
1734
+ * the cookies you have declared, surfacing undeclared cookies that put you out
1735
+ * of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
1736
+ * specific, informed consent).
1737
+ *
1738
+ * Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
1739
+ * `Cookie:` header on the server, a test fixture), or call it in the browser
1740
+ * and it reads `document.cookie`. Safe to import from a server bundle.
1741
+ */
1742
+ /** A cookie you declare against a consent category. */
1743
+ export declare interface DeclaredCookie {
1744
+ /** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
1745
+ name: string | RegExp;
1746
+ /** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
1747
+ category: string;
1748
+ /** Who sets the cookie (e.g. 'Google Analytics'). */
1749
+ provider?: string;
1750
+ /** What the cookie is used for — surfaced in your cookie policy. */
1751
+ purpose?: string;
1752
+ /** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
1753
+ prefix?: boolean;
1754
+ }
1755
+
1668
1756
  /** September 2025 GAID baseline annual fees (NGN). */
1669
1757
  export declare const DEFAULT_DCPMI_FEES_NGN: DCPMIFees;
1670
1758
 
@@ -2628,6 +2716,14 @@ declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' | 'educa
2628
2716
  */
2629
2717
  export declare function isNDPCApprovalRequired(mechanism: TransferMechanism): boolean;
2630
2718
 
2719
+ /**
2720
+ * Built-in registry of widely deployed third-party cookies, so an undeclared
2721
+ * cookie can often still be identified (provider + likely category). Override
2722
+ * or extend via {@link CookieScanOptions.knownCookies}; categories follow the
2723
+ * common necessary / functional / analytics / marketing taxonomy.
2724
+ */
2725
+ export declare const KNOWN_COOKIES: DeclaredCookie[];
2726
+
2631
2727
  /**
2632
2728
  * Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
2633
2729
  * Every processing activity must have a documented lawful basis
@@ -4350,6 +4446,24 @@ export declare function runNdprAudit(input: NdprAuditInput, options?: NdprAuditO
4350
4446
  */
4351
4447
  export declare function sanitizeInput(input: string): string;
4352
4448
 
4449
+ /**
4450
+ * Scan the cookies present against your declared cookies and a registry of
4451
+ * well-known third-party cookies. Returns which cookies are declared, which are
4452
+ * undeclared (and whether they can still be identified), and a per-category view.
4453
+ */
4454
+ export declare function scanCookies(declared?: DeclaredCookie[], options?: CookieScanOptions): CookieScanResult;
4455
+
4456
+ export declare interface ScannedCookie {
4457
+ /** The cookie name as found in the cookie string. */
4458
+ name: string;
4459
+ /** Resolved consent category, or `null` when it could not be classified. */
4460
+ category: string | null;
4461
+ /** Whether it matched your declaration, only the known registry, or nothing. */
4462
+ matchedBy: CookieMatchSource;
4463
+ provider?: string;
4464
+ purpose?: string;
4465
+ }
4466
+
4353
4467
  /**
4354
4468
  * Additional conditions required for processing sensitive personal data
4355
4469
  * per NDPA Section 30
@@ -4938,6 +5052,23 @@ declare interface UseConsentReturn {
4938
5052
  isLoading: boolean;
4939
5053
  }
4940
5054
 
5055
+ /**
5056
+ * React hook that scans `document.cookie` against your declared cookies on
5057
+ * mount and exposes a `rescan()` to re-run after you set or clear cookies.
5058
+ *
5059
+ * `result` is `null` until the first client-side scan, so server and first
5060
+ * client render agree (no hydration mismatch). `rescan` is stable and always
5061
+ * reads the latest `declared`/`options` — callers don't need to memoise them.
5062
+ */
5063
+ export declare function useCookieScan(declared?: DeclaredCookie[], options?: CookieScanOptions): UseCookieScanReturn;
5064
+
5065
+ export declare interface UseCookieScanReturn {
5066
+ /** The latest scan, or `null` before the first client-side scan (e.g. during SSR). */
5067
+ result: CookieScanResult | null;
5068
+ /** Re-read the cookies and recompute the scan with the current arguments. */
5069
+ rescan: () => void;
5070
+ }
5071
+
4941
5072
  /**
4942
5073
  * Hook for managing cross-border data transfers in compliance with NDPA Part VIII (Sections 41-43).
4943
5074
  *