@tantainnovative/ndpr-toolkit 5.5.0 → 5.6.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 (45) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +25 -0
  3. package/dist/chunk-675DXBED.mjs +1 -0
  4. package/dist/{chunk-QKXGVT2Q.js → chunk-GJH7YFBO.js} +1 -1
  5. package/dist/chunk-H3Q3I6XC.js +1 -0
  6. package/dist/{chunk-XCKX2WKD.js → chunk-HCZDQWHY.js} +1 -1
  7. package/dist/chunk-LAAJVTUV.mjs +1 -0
  8. package/dist/{chunk-JXK5RUR3.mjs → chunk-ME77GU4Q.mjs} +1 -1
  9. package/dist/chunk-MGXWQW5I.mjs +1 -0
  10. package/dist/chunk-VFRGCBJY.js +1 -0
  11. package/dist/{chunk-PQ5IPUJN.mjs → chunk-VXLOPB33.mjs} +1 -1
  12. package/dist/chunk-ZVWSSXV2.js +1 -0
  13. package/dist/consent.d.mts +88 -0
  14. package/dist/consent.d.ts +88 -0
  15. package/dist/consent.js +1 -1
  16. package/dist/consent.mjs +1 -1
  17. package/dist/core.d.mts +88 -0
  18. package/dist/core.d.ts +88 -0
  19. package/dist/core.js +1 -1
  20. package/dist/core.mjs +1 -1
  21. package/dist/headless.d.mts +163 -0
  22. package/dist/headless.d.ts +163 -0
  23. package/dist/headless.js +1 -1
  24. package/dist/headless.mjs +1 -1
  25. package/dist/hooks.d.mts +90 -0
  26. package/dist/hooks.d.ts +90 -0
  27. package/dist/hooks.js +1 -1
  28. package/dist/hooks.mjs +1 -1
  29. package/dist/index.d.mts +105 -0
  30. package/dist/index.d.ts +105 -0
  31. package/dist/index.js +1 -1
  32. package/dist/index.mjs +1 -1
  33. package/dist/server.d.mts +88 -0
  34. package/dist/server.d.ts +88 -0
  35. package/dist/server.js +1 -1
  36. package/dist/server.mjs +1 -1
  37. package/package.json +1 -1
  38. package/dist/chunk-DKLJ5DYN.js +0 -1
  39. package/dist/chunk-OW4GO3JF.js +0 -1
  40. package/dist/chunk-Q5KB2DN3.mjs +0 -1
  41. package/dist/chunk-R3ZKV2J7.mjs +0 -1
  42. package/dist/chunk-SZXHNJGG.mjs +0 -1
  43. package/dist/chunk-WKY26JLT.js +0 -1
  44. /package/dist/{chunk-YQTZWPOS.mjs → chunk-23CULZBM.mjs} +0 -0
  45. /package/dist/{chunk-OVW5ASY3.js → chunk-VKDW2IHV.js} +0 -0
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  "use client";
2
- export{a as NDPRDashboard}from'./chunk-ZIZL37BG.mjs';export{b as BreachNotificationManager,a as BreachRiskAssessment,c as RegulatoryReportGenerator}from'./chunk-EF5CLD4V.mjs';export{a as BreachReportForm}from'./chunk-5ZMYNOMR.mjs';export{c as PolicyExporter,a as PolicyGenerator,b as PolicyPreview}from'./chunk-5E56KT7E.mjs';export{a as LawfulBasisTracker}from'./chunk-RW7V7DDR.mjs';export{a as CrossBorderTransferManager}from'./chunk-6UGLAVRM.mjs';export{a as ROPAManager}from'./chunk-2ASQQYJR.mjs';export{b as formatNdprAuditReport,a as runNdprAudit}from'./chunk-JXK5RUR3.mjs';export{a as useBreachNotificationAssessment,d as useComplianceAuditReturn,b as useComplianceScore,c as useDCPMI}from'./chunk-Q5KB2DN3.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';export{b as DEFAULT_DCPMI_FEES_NGN,a as DEFAULT_DCPMI_THRESHOLDS,c as classifyDCPMI,d as generateComplianceAuditReturn}from'./chunk-SZXHNJGG.mjs';export{a as getComplianceScore}from'./chunk-6A7M4CGJ.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{a as assessBreachNotification}from'./chunk-WJSUVPYX.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';import'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{a as ConsentStorage}from'./chunk-XOH4WXOZ.mjs';export{a as ConsentManager}from'./chunk-CNCEP66F.mjs';export{a as ConsentBanner}from'./chunk-HMKXK23C.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{a as useConsent}from'./chunk-PQ5IPUJN.mjs';export{a as useFocusTrap}from'./chunk-YTU4FNM2.mjs';import'./chunk-XC3DLYEG.mjs';export{b as validateConsentOptionsStructured,a as validateConsentStructured}from'./chunk-R3ZKV2J7.mjs';export{a as DSRDashboard,b as DSRTracker}from'./chunk-AS2M5OTX.mjs';export{a as DSRRequestForm}from'./chunk-EAV4BZKO.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';export{a as DPIAReport,b as StepIndicator}from'./chunk-MIQQYXTE.mjs';export{a as DPIAQuestionnaire}from'./chunk-YZHEEGGK.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';import {b,a}from'./chunk-ITCY2Z66.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as resolveClass}from'./chunk-SFGW37LE.mjs';export{a as NDPRProvider,b as useNDPRConfig}from'./chunk-PHA3YMFO.mjs';import'./chunk-5LJ652AH.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsx}from'react/jsx-runtime';var Ie=({theme:o,className:t,children:s})=>{let n=useMemo(()=>{if(!o)return;let r={};if(o.colors){let e=o.colors;e.primary!==void 0&&(r["--ndpr-primary"]=e.primary),e.primaryHover!==void 0&&(r["--ndpr-primary-hover"]=e.primaryHover),e.primaryForeground!==void 0&&(r["--ndpr-primary-foreground"]=e.primaryForeground),e.background!==void 0&&(r["--ndpr-background"]=e.background),e.surface!==void 0&&(r["--ndpr-surface"]=e.surface),e.foreground!==void 0&&(r["--ndpr-foreground"]=e.foreground),e.muted!==void 0&&(r["--ndpr-muted"]=e.muted),e.mutedForeground!==void 0&&(r["--ndpr-muted-foreground"]=e.mutedForeground),e.border!==void 0&&(r["--ndpr-border"]=e.border),e.input!==void 0&&(r["--ndpr-input"]=e.input),e.ring!==void 0&&(r["--ndpr-ring"]=e.ring),e.success!==void 0&&(r["--ndpr-success"]=e.success),e.destructive!==void 0&&(r["--ndpr-destructive"]=e.destructive),e.warning!==void 0&&(r["--ndpr-warning"]=e.warning);}if(o.radius){let e=o.radius;e.sm!==void 0&&(r["--ndpr-radius-sm"]=e.sm),e.base!==void 0&&(r["--ndpr-radius"]=e.base),e.lg!==void 0&&(r["--ndpr-radius-lg"]=e.lg),e.full!==void 0&&(r["--ndpr-radius-full"]=e.full);}if(o.spacing){let e=o.spacing;e[1]!==void 0&&(r["--ndpr-space-1"]=e[1]),e[2]!==void 0&&(r["--ndpr-space-2"]=e[2]),e[3]!==void 0&&(r["--ndpr-space-3"]=e[3]),e[4]!==void 0&&(r["--ndpr-space-4"]=e[4]),e[5]!==void 0&&(r["--ndpr-space-5"]=e[5]),e[6]!==void 0&&(r["--ndpr-space-6"]=e[6]),e[8]!==void 0&&(r["--ndpr-space-8"]=e[8]);}if(o.shadow){let e=o.shadow;e.sm!==void 0&&(r["--ndpr-shadow-sm"]=e.sm),e.base!==void 0&&(r["--ndpr-shadow"]=e.base),e.lg!==void 0&&(r["--ndpr-shadow-lg"]=e.lg);}if(o.font){let e=o.font;e.sans!==void 0&&(r["--ndpr-font-sans"]=e.sans),e.sizeXs!==void 0&&(r["--ndpr-font-size-xs"]=e.sizeXs),e.sizeSm!==void 0&&(r["--ndpr-font-size-sm"]=e.sizeSm),e.sizeBase!==void 0&&(r["--ndpr-font-size-base"]=e.sizeBase),e.sizeLg!==void 0&&(r["--ndpr-font-size-lg"]=e.sizeLg),e.sizeXl!==void 0&&(r["--ndpr-font-size-xl"]=e.sizeXl),e.lineHeight!==void 0&&(r["--ndpr-line-height"]=e.lineHeight),e.lineHeightTight!==void 0&&(r["--ndpr-line-height-tight"]=e.lineHeightTight);}if(o.transition){let e=o.transition;e.base!==void 0&&(r["--ndpr-transition"]=e.base),e.slow!==void 0&&(r["--ndpr-transition-slow"]=e.slow);}if(o.z){let e=o.z;e.banner!==void 0&&(r["--ndpr-z-banner"]=String(e.banner)),e.modal!==void 0&&(r["--ndpr-z-modal"]=String(e.modal));}return Object.keys(r).length>0?r:void 0},[o]),p=o==null?void 0:o.mode;return jsx("div",{"data-ndpr-theme":"","data-theme":p,className:t,style:n,children:s})};var Le=({variant:o="short",className:t,hidden:s})=>{if(s)return null;let n=o==="long"?b:a;return jsx("p",{role:"note",className:t!=null?t:"ndpr-legal-notice","data-ndpr-legal-notice":o,children:n})};export{Le as LegalNotice,Ie as NDPRThemeProvider};
2
+ export{a as NDPRDashboard}from'./chunk-ZIZL37BG.mjs';export{b as BreachNotificationManager,a as BreachRiskAssessment,c as RegulatoryReportGenerator}from'./chunk-EF5CLD4V.mjs';export{a as BreachReportForm}from'./chunk-5ZMYNOMR.mjs';export{c as PolicyExporter,a as PolicyGenerator,b as PolicyPreview}from'./chunk-5E56KT7E.mjs';export{a as LawfulBasisTracker}from'./chunk-RW7V7DDR.mjs';export{a as CrossBorderTransferManager}from'./chunk-6UGLAVRM.mjs';export{a as ROPAManager}from'./chunk-2ASQQYJR.mjs';export{b as formatNdprAuditReport,a as runNdprAudit}from'./chunk-ME77GU4Q.mjs';export{a as useBreachNotificationAssessment,e as useComplianceAuditReturn,b as useComplianceScore,d as useCookieScan,c as useDCPMI}from'./chunk-LAAJVTUV.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';export{b as DEFAULT_DCPMI_FEES_NGN,a as DEFAULT_DCPMI_THRESHOLDS,c as classifyDCPMI,d as generateComplianceAuditReturn}from'./chunk-MGXWQW5I.mjs';export{a as getComplianceScore}from'./chunk-6A7M4CGJ.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{a as assessBreachNotification}from'./chunk-WJSUVPYX.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';import'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{a as ConsentStorage}from'./chunk-XOH4WXOZ.mjs';export{a as ConsentManager}from'./chunk-CNCEP66F.mjs';export{a as ConsentBanner}from'./chunk-HMKXK23C.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{a as useConsent}from'./chunk-VXLOPB33.mjs';export{a as useFocusTrap}from'./chunk-YTU4FNM2.mjs';import'./chunk-XC3DLYEG.mjs';export{c as KNOWN_COOKIES,d as scanCookies,b as validateConsentOptionsStructured,a as validateConsentStructured}from'./chunk-675DXBED.mjs';export{a as DSRDashboard,b as DSRTracker}from'./chunk-AS2M5OTX.mjs';export{a as DSRRequestForm}from'./chunk-EAV4BZKO.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{a as useDSR}from'./chunk-ZSRO4L3C.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';export{a as DPIAReport,b as StepIndicator}from'./chunk-MIQQYXTE.mjs';export{a as DPIAQuestionnaire}from'./chunk-YZHEEGGK.mjs';export{a as useDPIA}from'./chunk-I3V3ITN7.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';import {b,a}from'./chunk-ITCY2Z66.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as resolveClass}from'./chunk-SFGW37LE.mjs';export{a as NDPRProvider,b as useNDPRConfig}from'./chunk-PHA3YMFO.mjs';import'./chunk-5LJ652AH.mjs';import'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';import {useMemo}from'react';import {jsx}from'react/jsx-runtime';var ke=({theme:o,className:t,children:s})=>{let n=useMemo(()=>{if(!o)return;let r={};if(o.colors){let e=o.colors;e.primary!==void 0&&(r["--ndpr-primary"]=e.primary),e.primaryHover!==void 0&&(r["--ndpr-primary-hover"]=e.primaryHover),e.primaryForeground!==void 0&&(r["--ndpr-primary-foreground"]=e.primaryForeground),e.background!==void 0&&(r["--ndpr-background"]=e.background),e.surface!==void 0&&(r["--ndpr-surface"]=e.surface),e.foreground!==void 0&&(r["--ndpr-foreground"]=e.foreground),e.muted!==void 0&&(r["--ndpr-muted"]=e.muted),e.mutedForeground!==void 0&&(r["--ndpr-muted-foreground"]=e.mutedForeground),e.border!==void 0&&(r["--ndpr-border"]=e.border),e.input!==void 0&&(r["--ndpr-input"]=e.input),e.ring!==void 0&&(r["--ndpr-ring"]=e.ring),e.success!==void 0&&(r["--ndpr-success"]=e.success),e.destructive!==void 0&&(r["--ndpr-destructive"]=e.destructive),e.warning!==void 0&&(r["--ndpr-warning"]=e.warning);}if(o.radius){let e=o.radius;e.sm!==void 0&&(r["--ndpr-radius-sm"]=e.sm),e.base!==void 0&&(r["--ndpr-radius"]=e.base),e.lg!==void 0&&(r["--ndpr-radius-lg"]=e.lg),e.full!==void 0&&(r["--ndpr-radius-full"]=e.full);}if(o.spacing){let e=o.spacing;e[1]!==void 0&&(r["--ndpr-space-1"]=e[1]),e[2]!==void 0&&(r["--ndpr-space-2"]=e[2]),e[3]!==void 0&&(r["--ndpr-space-3"]=e[3]),e[4]!==void 0&&(r["--ndpr-space-4"]=e[4]),e[5]!==void 0&&(r["--ndpr-space-5"]=e[5]),e[6]!==void 0&&(r["--ndpr-space-6"]=e[6]),e[8]!==void 0&&(r["--ndpr-space-8"]=e[8]);}if(o.shadow){let e=o.shadow;e.sm!==void 0&&(r["--ndpr-shadow-sm"]=e.sm),e.base!==void 0&&(r["--ndpr-shadow"]=e.base),e.lg!==void 0&&(r["--ndpr-shadow-lg"]=e.lg);}if(o.font){let e=o.font;e.sans!==void 0&&(r["--ndpr-font-sans"]=e.sans),e.sizeXs!==void 0&&(r["--ndpr-font-size-xs"]=e.sizeXs),e.sizeSm!==void 0&&(r["--ndpr-font-size-sm"]=e.sizeSm),e.sizeBase!==void 0&&(r["--ndpr-font-size-base"]=e.sizeBase),e.sizeLg!==void 0&&(r["--ndpr-font-size-lg"]=e.sizeLg),e.sizeXl!==void 0&&(r["--ndpr-font-size-xl"]=e.sizeXl),e.lineHeight!==void 0&&(r["--ndpr-line-height"]=e.lineHeight),e.lineHeightTight!==void 0&&(r["--ndpr-line-height-tight"]=e.lineHeightTight);}if(o.transition){let e=o.transition;e.base!==void 0&&(r["--ndpr-transition"]=e.base),e.slow!==void 0&&(r["--ndpr-transition-slow"]=e.slow);}if(o.z){let e=o.z;e.banner!==void 0&&(r["--ndpr-z-banner"]=String(e.banner)),e.modal!==void 0&&(r["--ndpr-z-modal"]=String(e.modal));}return Object.keys(r).length>0?r:void 0},[o]),p=o==null?void 0:o.mode;return jsx("div",{"data-ndpr-theme":"","data-theme":p,className:t,style:n,children:s})};var Me=({variant:o="short",className:t,hidden:s})=>{if(s)return null;let n=o==="long"?b:a;return jsx("p",{role:"note",className:t!=null?t:"ndpr-legal-notice","data-ndpr-legal-notice":o,children:n})};export{Me as LegalNotice,ke as NDPRThemeProvider};
package/dist/server.d.mts CHANGED
@@ -806,6 +806,44 @@ declare interface CookieAdapterOptions {
806
806
  sameSite?: 'Strict' | 'Lax' | 'None';
807
807
  }
808
808
 
809
+ /** How a present cookie was classified. */
810
+ export declare type CookieMatchSource = 'declared' | 'known' | 'none';
811
+
812
+ export declare interface CookieScanOptions {
813
+ /**
814
+ * The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
815
+ * Defaults to `document.cookie` in the browser, or `''` on the server.
816
+ */
817
+ cookieString?: string;
818
+ /** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
819
+ asOf?: number;
820
+ /** Extra known cookies, checked before the built-in registry (so they can override it). */
821
+ knownCookies?: DeclaredCookie[];
822
+ /** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
823
+ useKnownRegistry?: boolean;
824
+ }
825
+
826
+ export declare interface CookieScanResult {
827
+ /** When the scan ran (epoch ms). */
828
+ scannedAt: number;
829
+ /** Number of cookies present. */
830
+ total: number;
831
+ /** Every present cookie, classified. */
832
+ cookies: ScannedCookie[];
833
+ /** Cookies that matched one of your declared cookies. */
834
+ declared: ScannedCookie[];
835
+ /** Cookies present but NOT in your declaration — the compliance gap. */
836
+ undeclared: ScannedCookie[];
837
+ /** Undeclared cookies the built-in registry could still identify. */
838
+ identified: ScannedCookie[];
839
+ /** Undeclared cookies that could not be identified at all. */
840
+ unknown: ScannedCookie[];
841
+ /** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
842
+ byCategory: Record<string, ScannedCookie[]>;
843
+ /** True when there are no undeclared cookies. */
844
+ complete: boolean;
845
+ }
846
+
809
847
  /**
810
848
  * Creates a new audit entry from consent settings. If `previousSettings` is
811
849
  * provided, the action is automatically determined by comparing old and new
@@ -1019,6 +1057,30 @@ declare interface DCPMIThresholds {
1019
1057
  */
1020
1058
  export declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
1021
1059
 
1060
+ /**
1061
+ * Cookie scanner — audits the cookies actually present in the browser against
1062
+ * the cookies you have declared, surfacing undeclared cookies that put you out
1063
+ * of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
1064
+ * specific, informed consent).
1065
+ *
1066
+ * Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
1067
+ * `Cookie:` header on the server, a test fixture), or call it in the browser
1068
+ * and it reads `document.cookie`. Safe to import from a server bundle.
1069
+ */
1070
+ /** A cookie you declare against a consent category. */
1071
+ export declare interface DeclaredCookie {
1072
+ /** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
1073
+ name: string | RegExp;
1074
+ /** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
1075
+ category: string;
1076
+ /** Who sets the cookie (e.g. 'Google Analytics'). */
1077
+ provider?: string;
1078
+ /** What the cookie is used for — surfaced in your cookie policy. */
1079
+ purpose?: string;
1080
+ /** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
1081
+ prefix?: boolean;
1082
+ }
1083
+
1022
1084
  /**
1023
1085
  * Comprehensive set of 16 data categories spanning identity, financial,
1024
1086
  * behavioral, sensitive, and children groups. Used to populate the wizard
@@ -1613,6 +1675,14 @@ export declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' |
1613
1675
  */
1614
1676
  export declare function isNDPCApprovalRequired(mechanism: TransferMechanism): boolean;
1615
1677
 
1678
+ /**
1679
+ * Built-in registry of widely deployed third-party cookies, so an undeclared
1680
+ * cookie can often still be identified (provider + likely category). Override
1681
+ * or extend via {@link CookieScanOptions.knownCookies}; categories follow the
1682
+ * common necessary / functional / analytics / marketing taxonomy.
1683
+ */
1684
+ export declare const KNOWN_COOKIES: DeclaredCookie[];
1685
+
1616
1686
  /**
1617
1687
  * Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
1618
1688
  * Every processing activity must have a documented lawful basis
@@ -2608,6 +2678,24 @@ export declare function runNdprAudit(input: NdprAuditInput, options?: NdprAuditO
2608
2678
  */
2609
2679
  export declare function sanitizeInput(input: string): string;
2610
2680
 
2681
+ /**
2682
+ * Scan the cookies present against your declared cookies and a registry of
2683
+ * well-known third-party cookies. Returns which cookies are declared, which are
2684
+ * undeclared (and whether they can still be identified), and a per-category view.
2685
+ */
2686
+ export declare function scanCookies(declared?: DeclaredCookie[], options?: CookieScanOptions): CookieScanResult;
2687
+
2688
+ export declare interface ScannedCookie {
2689
+ /** The cookie name as found in the cookie string. */
2690
+ name: string;
2691
+ /** Resolved consent category, or `null` when it could not be classified. */
2692
+ category: string | null;
2693
+ /** Whether it matched your declaration, only the known registry, or nothing. */
2694
+ matchedBy: CookieMatchSource;
2695
+ provider?: string;
2696
+ purpose?: string;
2697
+ }
2698
+
2611
2699
  /**
2612
2700
  * Additional conditions required for processing sensitive personal data
2613
2701
  * per NDPA Section 30
package/dist/server.d.ts CHANGED
@@ -806,6 +806,44 @@ declare interface CookieAdapterOptions {
806
806
  sameSite?: 'Strict' | 'Lax' | 'None';
807
807
  }
808
808
 
809
+ /** How a present cookie was classified. */
810
+ export declare type CookieMatchSource = 'declared' | 'known' | 'none';
811
+
812
+ export declare interface CookieScanOptions {
813
+ /**
814
+ * The cookie string to scan, in `document.cookie` form (`a=1; b=2`).
815
+ * Defaults to `document.cookie` in the browser, or `''` on the server.
816
+ */
817
+ cookieString?: string;
818
+ /** Reference timestamp (epoch ms) recorded on the result. Defaults to `Date.now()`. */
819
+ asOf?: number;
820
+ /** Extra known cookies, checked before the built-in registry (so they can override it). */
821
+ knownCookies?: DeclaredCookie[];
822
+ /** Whether to fall back to the built-in known-cookie registry for undeclared cookies. @default true */
823
+ useKnownRegistry?: boolean;
824
+ }
825
+
826
+ export declare interface CookieScanResult {
827
+ /** When the scan ran (epoch ms). */
828
+ scannedAt: number;
829
+ /** Number of cookies present. */
830
+ total: number;
831
+ /** Every present cookie, classified. */
832
+ cookies: ScannedCookie[];
833
+ /** Cookies that matched one of your declared cookies. */
834
+ declared: ScannedCookie[];
835
+ /** Cookies present but NOT in your declaration — the compliance gap. */
836
+ undeclared: ScannedCookie[];
837
+ /** Undeclared cookies the built-in registry could still identify. */
838
+ identified: ScannedCookie[];
839
+ /** Undeclared cookies that could not be identified at all. */
840
+ unknown: ScannedCookie[];
841
+ /** Present cookies grouped by resolved category; unclassified cookies go under `uncategorized`. */
842
+ byCategory: Record<string, ScannedCookie[]>;
843
+ /** True when there are no undeclared cookies. */
844
+ complete: boolean;
845
+ }
846
+
809
847
  /**
810
848
  * Creates a new audit entry from consent settings. If `previousSettings` is
811
849
  * provided, the action is automatically determined by comparing old and new
@@ -1019,6 +1057,30 @@ declare interface DCPMIThresholds {
1019
1057
  */
1020
1058
  export declare type DCPMITier = 'UHL' | 'EHL' | 'OHL' | 'listed' | 'none';
1021
1059
 
1060
+ /**
1061
+ * Cookie scanner — audits the cookies actually present in the browser against
1062
+ * the cookies you have declared, surfacing undeclared cookies that put you out
1063
+ * of step with your cookie notice (NDPA 2023 S.25-26 / NDPC GAID 2025 on
1064
+ * specific, informed consent).
1065
+ *
1066
+ * Pure and DOM-optional: pass `cookieString` to scan an arbitrary value (a
1067
+ * `Cookie:` header on the server, a test fixture), or call it in the browser
1068
+ * and it reads `document.cookie`. Safe to import from a server bundle.
1069
+ */
1070
+ /** A cookie you declare against a consent category. */
1071
+ export declare interface DeclaredCookie {
1072
+ /** Exact cookie name, a prefix (with `prefix: true`), or a RegExp matched against the name. */
1073
+ name: string | RegExp;
1074
+ /** Consent category this cookie belongs to (e.g. 'necessary', 'analytics', 'marketing'). */
1075
+ category: string;
1076
+ /** Who sets the cookie (e.g. 'Google Analytics'). */
1077
+ provider?: string;
1078
+ /** What the cookie is used for — surfaced in your cookie policy. */
1079
+ purpose?: string;
1080
+ /** Treat a string `name` as a prefix match instead of an exact match. Ignored for RegExp names. */
1081
+ prefix?: boolean;
1082
+ }
1083
+
1022
1084
  /**
1023
1085
  * Comprehensive set of 16 data categories spanning identity, financial,
1024
1086
  * behavioral, sensitive, and children groups. Used to populate the wizard
@@ -1613,6 +1675,14 @@ export declare type Industry = 'fintech' | 'healthcare' | 'ecommerce' | 'saas' |
1613
1675
  */
1614
1676
  export declare function isNDPCApprovalRequired(mechanism: TransferMechanism): boolean;
1615
1677
 
1678
+ /**
1679
+ * Built-in registry of widely deployed third-party cookies, so an undeclared
1680
+ * cookie can often still be identified (provider + likely category). Override
1681
+ * or extend via {@link CookieScanOptions.knownCookies}; categories follow the
1682
+ * common necessary / functional / analytics / marketing taxonomy.
1683
+ */
1684
+ export declare const KNOWN_COOKIES: DeclaredCookie[];
1685
+
1616
1686
  /**
1617
1687
  * Lawful Basis types aligned with NDPA 2023 Part III (Sections 24-28)
1618
1688
  * Every processing activity must have a documented lawful basis
@@ -2608,6 +2678,24 @@ export declare function runNdprAudit(input: NdprAuditInput, options?: NdprAuditO
2608
2678
  */
2609
2679
  export declare function sanitizeInput(input: string): string;
2610
2680
 
2681
+ /**
2682
+ * Scan the cookies present against your declared cookies and a registry of
2683
+ * well-known third-party cookies. Returns which cookies are declared, which are
2684
+ * undeclared (and whether they can still be identified), and a per-category view.
2685
+ */
2686
+ export declare function scanCookies(declared?: DeclaredCookie[], options?: CookieScanOptions): CookieScanResult;
2687
+
2688
+ export declare interface ScannedCookie {
2689
+ /** The cookie name as found in the cookie string. */
2690
+ name: string;
2691
+ /** Resolved consent category, or `null` when it could not be classified. */
2692
+ category: string | null;
2693
+ /** Whether it matched your declaration, only the known registry, or nothing. */
2694
+ matchedBy: CookieMatchSource;
2695
+ provider?: string;
2696
+ purpose?: string;
2697
+ }
2698
+
2611
2699
  /**
2612
2700
  * Additional conditions required for processing sensitive personal data
2613
2701
  * per NDPA Section 30
package/dist/server.js CHANGED
@@ -1 +1 @@
1
- 'use strict';var chunkR3CU7DTT_js=require('./chunk-R3CU7DTT.js'),chunkLP5KXMBY_js=require('./chunk-LP5KXMBY.js'),chunkNUOHT3LO_js=require('./chunk-NUOHT3LO.js'),chunkXCKX2WKD_js=require('./chunk-XCKX2WKD.js'),chunkJS7SYL5P_js=require('./chunk-JS7SYL5P.js'),chunkWKY26JLT_js=require('./chunk-WKY26JLT.js'),chunk7TTXS7JX_js=require('./chunk-7TTXS7JX.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkY346CURW_js=require('./chunk-Y346CURW.js'),chunkD2ZKDQVL_js=require('./chunk-D2ZKDQVL.js'),chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js'),chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkC2KEXHRX_js=require('./chunk-C2KEXHRX.js'),chunkDKLJ5DYN_js=require('./chunk-DKLJ5DYN.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkR2ZZMATR_js=require('./chunk-R2ZZMATR.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunk7563FVMY_js=require('./chunk-7563FVMY.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"apiAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.a}});Object.defineProperty(exports,"composeAdapters",{enumerable:true,get:function(){return chunkR3CU7DTT_js.c}});Object.defineProperty(exports,"memoryAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.b}});Object.defineProperty(exports,"arabicLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.e}});Object.defineProperty(exports,"frenchLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.f}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunkNUOHT3LO_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"formatNdprAuditReport",{enumerable:true,get:function(){return chunkXCKX2WKD_js.b}});Object.defineProperty(exports,"runNdprAudit",{enumerable:true,get:function(){return chunkXCKX2WKD_js.a}});Object.defineProperty(exports,"exportDOCX",{enumerable:true,get:function(){return chunkJS7SYL5P_js.d}});Object.defineProperty(exports,"exportHTML",{enumerable:true,get:function(){return chunkJS7SYL5P_js.a}});Object.defineProperty(exports,"exportMarkdown",{enumerable:true,get:function(){return chunkJS7SYL5P_js.b}});Object.defineProperty(exports,"exportPDF",{enumerable:true,get:function(){return chunkJS7SYL5P_js.c}});Object.defineProperty(exports,"classifyDCPMI",{enumerable:true,get:function(){return chunkWKY26JLT_js.c}});Object.defineProperty(exports,"generateComplianceAuditReturn",{enumerable:true,get:function(){return chunkWKY26JLT_js.d}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunk7TTXS7JX_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"assessBreachNotification",{enumerable:true,get:function(){return chunkY346CURW_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.b}});Object.defineProperty(exports,"DEFAULT_DATA_CATEGORIES",{enumerable:true,get:function(){return chunk6LJHLE6G_js.d}});Object.defineProperty(exports,"UNFILLED_PREFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.a}});Object.defineProperty(exports,"UNFILLED_SUFFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunk6LJHLE6G_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunk6LJHLE6G_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunk6LJHLE6G_js.f}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"cookieAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.b}});Object.defineProperty(exports,"sessionStorageAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.a}});Object.defineProperty(exports,"validateConsentOptionsStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.b}});Object.defineProperty(exports,"validateConsentStructured",{enumerable:true,get:function(){return chunkDKLJ5DYN_js.a}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequestStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.b}});Object.defineProperty(exports,"validateDsrSubmissionStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.b}});Object.defineProperty(exports,"localStorageAdapter",{enumerable:true,get:function(){return chunkVWED6UTN_js.a}});
1
+ 'use strict';var chunkR3CU7DTT_js=require('./chunk-R3CU7DTT.js'),chunkLP5KXMBY_js=require('./chunk-LP5KXMBY.js'),chunkNUOHT3LO_js=require('./chunk-NUOHT3LO.js'),chunkHCZDQWHY_js=require('./chunk-HCZDQWHY.js'),chunkJS7SYL5P_js=require('./chunk-JS7SYL5P.js'),chunkVFRGCBJY_js=require('./chunk-VFRGCBJY.js'),chunk7TTXS7JX_js=require('./chunk-7TTXS7JX.js'),chunk3YTAOT5O_js=require('./chunk-3YTAOT5O.js'),chunkY346CURW_js=require('./chunk-Y346CURW.js'),chunkD2ZKDQVL_js=require('./chunk-D2ZKDQVL.js'),chunk6LJHLE6G_js=require('./chunk-6LJHLE6G.js'),chunkYFBDJ4FH_js=require('./chunk-YFBDJ4FH.js'),chunkWZYCBW2R_js=require('./chunk-WZYCBW2R.js'),chunk4CVBQC66_js=require('./chunk-4CVBQC66.js'),chunk3IA3KDII_js=require('./chunk-3IA3KDII.js'),chunkC2KEXHRX_js=require('./chunk-C2KEXHRX.js'),chunkZVWSSXV2_js=require('./chunk-ZVWSSXV2.js'),chunkUXUMYP4L_js=require('./chunk-UXUMYP4L.js'),chunkR2ZZMATR_js=require('./chunk-R2ZZMATR.js'),chunkTQZWJGJ2_js=require('./chunk-TQZWJGJ2.js'),chunkZVOIR4QH_js=require('./chunk-ZVOIR4QH.js'),chunk7563FVMY_js=require('./chunk-7563FVMY.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js');require('./chunk-RFPLZDIO.js');Object.defineProperty(exports,"apiAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.a}});Object.defineProperty(exports,"composeAdapters",{enumerable:true,get:function(){return chunkR3CU7DTT_js.c}});Object.defineProperty(exports,"memoryAdapter",{enumerable:true,get:function(){return chunkR3CU7DTT_js.b}});Object.defineProperty(exports,"arabicLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.e}});Object.defineProperty(exports,"frenchLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.f}});Object.defineProperty(exports,"hausaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.c}});Object.defineProperty(exports,"igboLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.b}});Object.defineProperty(exports,"pidginLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.d}});Object.defineProperty(exports,"yorubaLocale",{enumerable:true,get:function(){return chunkLP5KXMBY_js.a}});Object.defineProperty(exports,"ORG_POLICY_TEMPLATE_REGISTRY",{enumerable:true,get:function(){return chunkNUOHT3LO_js.a}});Object.defineProperty(exports,"createOrgTemplate",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"templateContextFor",{enumerable:true,get:function(){return chunkNUOHT3LO_js.b}});Object.defineProperty(exports,"formatNdprAuditReport",{enumerable:true,get:function(){return chunkHCZDQWHY_js.b}});Object.defineProperty(exports,"runNdprAudit",{enumerable:true,get:function(){return chunkHCZDQWHY_js.a}});Object.defineProperty(exports,"exportDOCX",{enumerable:true,get:function(){return chunkJS7SYL5P_js.d}});Object.defineProperty(exports,"exportHTML",{enumerable:true,get:function(){return chunkJS7SYL5P_js.a}});Object.defineProperty(exports,"exportMarkdown",{enumerable:true,get:function(){return chunkJS7SYL5P_js.b}});Object.defineProperty(exports,"exportPDF",{enumerable:true,get:function(){return chunkJS7SYL5P_js.c}});Object.defineProperty(exports,"classifyDCPMI",{enumerable:true,get:function(){return chunkVFRGCBJY_js.c}});Object.defineProperty(exports,"generateComplianceAuditReturn",{enumerable:true,get:function(){return chunkVFRGCBJY_js.d}});Object.defineProperty(exports,"getComplianceScore",{enumerable:true,get:function(){return chunk7TTXS7JX_js.a}});Object.defineProperty(exports,"calculateBreachSeverity",{enumerable:true,get:function(){return chunk3YTAOT5O_js.a}});Object.defineProperty(exports,"assessBreachNotification",{enumerable:true,get:function(){return chunkY346CURW_js.a}});Object.defineProperty(exports,"DEFAULT_POLICY_SECTIONS",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.c}});Object.defineProperty(exports,"DEFAULT_POLICY_VARIABLES",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.d}});Object.defineProperty(exports,"createBusinessPolicyTemplate",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.e}});Object.defineProperty(exports,"findUnfilledTokens",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.a}});Object.defineProperty(exports,"generatePolicyText",{enumerable:true,get:function(){return chunkD2ZKDQVL_js.b}});Object.defineProperty(exports,"DEFAULT_DATA_CATEGORIES",{enumerable:true,get:function(){return chunk6LJHLE6G_js.d}});Object.defineProperty(exports,"UNFILLED_PREFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.a}});Object.defineProperty(exports,"UNFILLED_SUFFIX",{enumerable:true,get:function(){return chunk6LJHLE6G_js.b}});Object.defineProperty(exports,"assemblePolicy",{enumerable:true,get:function(){return chunk6LJHLE6G_js.c}});Object.defineProperty(exports,"createDefaultContext",{enumerable:true,get:function(){return chunk6LJHLE6G_js.e}});Object.defineProperty(exports,"evaluatePolicyCompliance",{enumerable:true,get:function(){return chunk6LJHLE6G_js.f}});Object.defineProperty(exports,"assessTransferRisk",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.h}});Object.defineProperty(exports,"getTransferMechanismDescription",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.f}});Object.defineProperty(exports,"isNDPCApprovalRequired",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.e}});Object.defineProperty(exports,"validateTransfer",{enumerable:true,get:function(){return chunkYFBDJ4FH_js.g}});Object.defineProperty(exports,"assessComplianceGaps",{enumerable:true,get:function(){return chunkWZYCBW2R_js.c}});Object.defineProperty(exports,"generateLawfulBasisSummary",{enumerable:true,get:function(){return chunkWZYCBW2R_js.d}});Object.defineProperty(exports,"getLawfulBasisDescription",{enumerable:true,get:function(){return chunkWZYCBW2R_js.b}});Object.defineProperty(exports,"validateProcessingActivity",{enumerable:true,get:function(){return chunkWZYCBW2R_js.a}});Object.defineProperty(exports,"exportROPAToCSV",{enumerable:true,get:function(){return chunk4CVBQC66_js.c}});Object.defineProperty(exports,"generateROPASummary",{enumerable:true,get:function(){return chunk4CVBQC66_js.b}});Object.defineProperty(exports,"identifyComplianceGaps",{enumerable:true,get:function(){return chunk4CVBQC66_js.d}});Object.defineProperty(exports,"validateProcessingRecord",{enumerable:true,get:function(){return chunk4CVBQC66_js.a}});Object.defineProperty(exports,"appendAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.c}});Object.defineProperty(exports,"createAuditEntry",{enumerable:true,get:function(){return chunk3IA3KDII_js.a}});Object.defineProperty(exports,"getAuditLog",{enumerable:true,get:function(){return chunk3IA3KDII_js.b}});Object.defineProperty(exports,"cookieAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.b}});Object.defineProperty(exports,"sessionStorageAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.a}});Object.defineProperty(exports,"KNOWN_COOKIES",{enumerable:true,get:function(){return chunkZVWSSXV2_js.c}});Object.defineProperty(exports,"scanCookies",{enumerable:true,get:function(){return chunkZVWSSXV2_js.d}});Object.defineProperty(exports,"validateConsentOptionsStructured",{enumerable:true,get:function(){return chunkZVWSSXV2_js.b}});Object.defineProperty(exports,"validateConsentStructured",{enumerable:true,get:function(){return chunkZVWSSXV2_js.a}});Object.defineProperty(exports,"sanitizeInput",{enumerable:true,get:function(){return chunkUXUMYP4L_js.a}});Object.defineProperty(exports,"formatDSRRequestStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.b}});Object.defineProperty(exports,"validateDsrSubmissionStructured",{enumerable:true,get:function(){return chunkR2ZZMATR_js.a}});Object.defineProperty(exports,"assessDPIARisk",{enumerable:true,get:function(){return chunkTQZWJGJ2_js.a}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_LONG",{enumerable:true,get:function(){return chunkZVOIR4QH_js.b}});Object.defineProperty(exports,"LEGAL_DISCLAIMER_SHORT",{enumerable:true,get:function(){return chunkZVOIR4QH_js.a}});Object.defineProperty(exports,"legalDisclaimerBlock",{enumerable:true,get:function(){return chunkZVOIR4QH_js.c}});Object.defineProperty(exports,"defaultLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.a}});Object.defineProperty(exports,"mergeLocale",{enumerable:true,get:function(){return chunk7563FVMY_js.b}});Object.defineProperty(exports,"localStorageAdapter",{enumerable:true,get:function(){return chunkVWED6UTN_js.a}});
package/dist/server.mjs CHANGED
@@ -1 +1 @@
1
- export{a as apiAdapter,c as composeAdapters,b as memoryAdapter}from'./chunk-7PMPKVY3.mjs';export{e as arabicLocale,f as frenchLocale,c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-KUI5W44P.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-CWY2FMIC.mjs';export{b as formatNdprAuditReport,a as runNdprAudit}from'./chunk-JXK5RUR3.mjs';export{d as exportDOCX,a as exportHTML,b as exportMarkdown,c as exportPDF}from'./chunk-IVSNHT24.mjs';export{c as classifyDCPMI,d as generateComplianceAuditReturn}from'./chunk-SZXHNJGG.mjs';export{a as getComplianceScore}from'./chunk-6A7M4CGJ.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{a as assessBreachNotification}from'./chunk-WJSUVPYX.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';export{d as DEFAULT_DATA_CATEGORIES,a as UNFILLED_PREFIX,b as UNFILLED_SUFFIX,c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{b as cookieAdapter,a as sessionStorageAdapter}from'./chunk-XC3DLYEG.mjs';export{b as validateConsentOptionsStructured,a as validateConsentStructured}from'./chunk-R3ZKV2J7.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-5LJ652AH.mjs';export{a as localStorageAdapter}from'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
1
+ export{a as apiAdapter,c as composeAdapters,b as memoryAdapter}from'./chunk-7PMPKVY3.mjs';export{e as arabicLocale,f as frenchLocale,c as hausaLocale,b as igboLocale,d as pidginLocale,a as yorubaLocale}from'./chunk-KUI5W44P.mjs';export{a as ORG_POLICY_TEMPLATE_REGISTRY,b as createOrgTemplate,b as templateContextFor}from'./chunk-CWY2FMIC.mjs';export{b as formatNdprAuditReport,a as runNdprAudit}from'./chunk-ME77GU4Q.mjs';export{d as exportDOCX,a as exportHTML,b as exportMarkdown,c as exportPDF}from'./chunk-IVSNHT24.mjs';export{c as classifyDCPMI,d as generateComplianceAuditReturn}from'./chunk-MGXWQW5I.mjs';export{a as getComplianceScore}from'./chunk-6A7M4CGJ.mjs';export{a as calculateBreachSeverity}from'./chunk-WTGKZX7J.mjs';export{a as assessBreachNotification}from'./chunk-WJSUVPYX.mjs';export{c as DEFAULT_POLICY_SECTIONS,d as DEFAULT_POLICY_VARIABLES,e as createBusinessPolicyTemplate,a as findUnfilledTokens,b as generatePolicyText}from'./chunk-NBQQ2GN3.mjs';export{d as DEFAULT_DATA_CATEGORIES,a as UNFILLED_PREFIX,b as UNFILLED_SUFFIX,c as assemblePolicy,e as createDefaultContext,f as evaluatePolicyCompliance}from'./chunk-BIJSMSUU.mjs';export{h as assessTransferRisk,f as getTransferMechanismDescription,e as isNDPCApprovalRequired,g as validateTransfer}from'./chunk-7BJXI2HI.mjs';export{c as assessComplianceGaps,d as generateLawfulBasisSummary,b as getLawfulBasisDescription,a as validateProcessingActivity}from'./chunk-LWIKDDSU.mjs';export{c as exportROPAToCSV,b as generateROPASummary,d as identifyComplianceGaps,a as validateProcessingRecord}from'./chunk-XP5PL6K7.mjs';export{c as appendAuditEntry,a as createAuditEntry,b as getAuditLog}from'./chunk-V7UFP6QU.mjs';export{b as cookieAdapter,a as sessionStorageAdapter}from'./chunk-XC3DLYEG.mjs';export{c as KNOWN_COOKIES,d as scanCookies,b as validateConsentOptionsStructured,a as validateConsentStructured}from'./chunk-675DXBED.mjs';export{a as sanitizeInput}from'./chunk-EWVK45Z3.mjs';export{b as formatDSRRequestStructured,a as validateDsrSubmissionStructured}from'./chunk-RRVML7CU.mjs';export{a as assessDPIARisk}from'./chunk-LRRENTT5.mjs';export{b as LEGAL_DISCLAIMER_LONG,a as LEGAL_DISCLAIMER_SHORT,c as legalDisclaimerBlock}from'./chunk-ITCY2Z66.mjs';export{a as defaultLocale,b as mergeLocale}from'./chunk-5LJ652AH.mjs';export{a as localStorageAdapter}from'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tantainnovative/ndpr-toolkit",
3
- "version": "5.5.0",
3
+ "version": "5.6.0",
4
4
  "private": false,
5
5
  "packageManager": "pnpm@10.34.1",
6
6
  "description": "Nigeria Data Protection Toolkit — enterprise-grade compliance components for the Nigeria Data Protection Act (NDPA) 2023",
@@ -1 +0,0 @@
1
- 'use strict';function i(e){let t=[];if((!e.consents||Object.keys(e.consents).length===0)&&t.push({field:"consents",code:"consents_required",message:"Consent settings must include at least one consent option"}),e.timestamp?(typeof e.timestamp!="number"||isNaN(e.timestamp))&&t.push({field:"timestamp",code:"timestamp_invalid",message:"Consent timestamp must be a valid number"}):t.push({field:"timestamp",code:"timestamp_required",message:"Consent timestamp is required"}),e.version||t.push({field:"version",code:"version_required",message:"Consent version is required"}),e.method||t.push({field:"method",code:"method_required",message:"Consent collection method is required"}),e.hasInteracted===void 0&&t.push({field:"hasInteracted",code:"has_interacted_required",message:"User interaction status is required"}),e.timestamp){let r=new Date;r.setMonth(r.getMonth()-13);let s=r.getTime();e.timestamp<s&&t.push({field:"timestamp",code:"consent_stale",message:"Consent is older than 13 months and should be refreshed"});}return t.length>0?{valid:false,errors:t}:{valid:true,errors:[],data:e}}function n(e){let t=[];return (!e||e.length===0)&&t.push({field:"options",code:"options_required",message:"At least one consent option is required"}),e==null||e.forEach((r,s)=>{(!r.purpose||r.purpose.trim()==="")&&t.push({field:`options[${s}].purpose`,code:"purpose_required",message:`Consent option "${r.id}" is missing a purpose. NDPA Section 26 requires consent to be specific to a stated purpose.`});}),t.length>0?{valid:false,errors:t}:{valid:true,errors:[],data:e}}exports.a=i;exports.b=n;
@@ -1 +0,0 @@
1
- 'use strict';var chunkWKY26JLT_js=require('./chunk-WKY26JLT.js'),chunk7TTXS7JX_js=require('./chunk-7TTXS7JX.js'),chunkY346CURW_js=require('./chunk-Y346CURW.js'),react=require('react');function u(t,e){return react.useMemo(()=>chunkY346CURW_js.a(t,e),[t,e])}function M({input:t}){let e=JSON.stringify(t);return react.useMemo(()=>chunk7TTXS7JX_js.a(t),[e])}function D(t,e){return react.useMemo(()=>chunkWKY26JLT_js.c(t,e),[t.dataSubjectsInSixMonths,t.isDesignated,e])}function P(t,e){return react.useMemo(()=>chunkWKY26JLT_js.d(t,e),[t.commencementDate,t.asOf,t.tier,e])}exports.a=u;exports.b=M;exports.c=D;exports.d=P;
@@ -1 +0,0 @@
1
- import {c,d}from'./chunk-SZXHNJGG.mjs';import {a as a$1}from'./chunk-6A7M4CGJ.mjs';import {a}from'./chunk-WJSUVPYX.mjs';import {useMemo}from'react';function u(t,e){return useMemo(()=>a(t,e),[t,e])}function M({input:t}){let e=JSON.stringify(t);return useMemo(()=>a$1(t),[e])}function D(t,e){return useMemo(()=>c(t,e),[t.dataSubjectsInSixMonths,t.isDesignated,e])}function P(t,e){return useMemo(()=>d(t,e),[t.commencementDate,t.asOf,t.tier,e])}export{u as a,M as b,D as c,P as d};
@@ -1 +0,0 @@
1
- function i(e){let t=[];if((!e.consents||Object.keys(e.consents).length===0)&&t.push({field:"consents",code:"consents_required",message:"Consent settings must include at least one consent option"}),e.timestamp?(typeof e.timestamp!="number"||isNaN(e.timestamp))&&t.push({field:"timestamp",code:"timestamp_invalid",message:"Consent timestamp must be a valid number"}):t.push({field:"timestamp",code:"timestamp_required",message:"Consent timestamp is required"}),e.version||t.push({field:"version",code:"version_required",message:"Consent version is required"}),e.method||t.push({field:"method",code:"method_required",message:"Consent collection method is required"}),e.hasInteracted===void 0&&t.push({field:"hasInteracted",code:"has_interacted_required",message:"User interaction status is required"}),e.timestamp){let r=new Date;r.setMonth(r.getMonth()-13);let s=r.getTime();e.timestamp<s&&t.push({field:"timestamp",code:"consent_stale",message:"Consent is older than 13 months and should be refreshed"});}return t.length>0?{valid:false,errors:t}:{valid:true,errors:[],data:e}}function n(e){let t=[];return (!e||e.length===0)&&t.push({field:"options",code:"options_required",message:"At least one consent option is required"}),e==null||e.forEach((r,s)=>{(!r.purpose||r.purpose.trim()==="")&&t.push({field:`options[${s}].purpose`,code:"purpose_required",message:`Consent option "${r.id}" is missing a purpose. NDPA Section 26 requires consent to be specific to a stated purpose.`});}),t.length>0?{valid:false,errors:t}:{valid:true,errors:[],data:e}}export{i as a,n as b};
@@ -1 +0,0 @@
1
- import {a}from'./chunk-ZJYULEER.mjs';var N={ohl:200,ehl:1e3,uhl:5e3},x={UHL:25e4,EHL:1e5,OHL:1e4};function T(e,i={}){let t=a(a({},N),i.thresholds),a$1=a(a({},x),i.fees),r=e==null?void 0:e.dataSubjectsInSixMonths,l=typeof r=="number"&&r>0?Math.floor(r):0,n;l>t.uhl?n="UHL":l>=t.ehl?n="EHL":l>=t.ohl?n="OHL":e!=null&&e.isDesignated?n="listed":n="none";let s=n!=="none",c=n==="UHL"||n==="EHL"||n==="OHL"?a$1[n]:0,o=[];return n==="listed"&&o.push("Designated as a DCPMI below the volume tiers \u2014 confirm the applicable registration tier and fee with the NDPC."),s&&o.push(n==="OHL"?"OHL organisations renew their NDPC registration annually and file Compliance Audit Returns (CAR) each year.":"Register once with the NDPC, then file Compliance Audit Returns (CAR) annually."),o.push("Thresholds, fees, and filing dates follow the NDPC GAID 2025 baseline and can change \u2014 verify against current NDPC guidance before relying on them."),{tier:n,isDCPMI:s,annualFeeNGN:c,registration:{required:s,renewsAnnually:n==="OHL"},compliance:{auditReturnsAnnual:s,initialAuditWithinMonths:15},notes:o,dataSubjectsConsidered:l}}function O(e){return String(e).padStart(2,"0")}function y(e){let[i,t,a]=e.split("-").map(Number);return new Date(Date.UTC(i,t-1,a))}function H(e){return e.toISOString().slice(0,10)}function S(e,i){let[t,a,r]=e.split("-").map(Number);return H(new Date(Date.UTC(t,a-1+i,r)))}function R(){return new Date().toISOString().slice(0,10)}function U(e,i={}){var f,C,b,g,p,M,I;let t=(f=e.asOf)!=null?f:R(),a=(C=i.initialAuditWithinMonths)!=null?C:15,r=(g=(b=i.annualDeadline)==null?void 0:b.month)!=null?g:3,l=(M=(p=i.annualDeadline)==null?void 0:p.day)!=null?M:31,n=(I=i.deadlineOverrides)!=null?I:{},s=e.tier===void 0?true:e.tier!=="none",c=S(e.commencementDate,a),o=P=>{var A;return (A=n[P])!=null?A:`${P}-${O(r)}-${O(l)}`},h=Number(t.slice(0,4)),D=o(h);t>D&&(h+=1,D=o(h));let L=Math.round((y(D).getTime()-y(t).getTime())/864e5),m=t>=c,u=[];return s?(u.push("File the Compliance Audit Return with the NDPC via the NDPC Information Management Portal (NIMP)."),m&&u.push("The initial compliance-audit window has elapsed \u2014 ensure the initial audit has been conducted.")):u.push("Compliance Audit Returns apply only to Data Controllers/Processors of Major Importance."),u.push("Filing deadlines follow the NDPC GAID 2025 baseline and can be extended \u2014 verify the current deadline with the NDPC."),{applicable:s,schedule:{commencementDate:e.commencementDate,initialAuditWithinMonths:a,initialAuditDueDate:c,nextFilingDeadline:D,filingYear:h},status:{initialAuditDue:m,daysUntilNextDeadline:L},notes:u,asOf:t}}export{N as a,x as b,T as c,U as d};
@@ -1 +0,0 @@
1
- 'use strict';var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js');var N={ohl:200,ehl:1e3,uhl:5e3},x={UHL:25e4,EHL:1e5,OHL:1e4};function T(e,i={}){let t=chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},N),i.thresholds),a=chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},x),i.fees),r=e==null?void 0:e.dataSubjectsInSixMonths,l=typeof r=="number"&&r>0?Math.floor(r):0,n;l>t.uhl?n="UHL":l>=t.ehl?n="EHL":l>=t.ohl?n="OHL":e!=null&&e.isDesignated?n="listed":n="none";let s=n!=="none",c=n==="UHL"||n==="EHL"||n==="OHL"?a[n]:0,o=[];return n==="listed"&&o.push("Designated as a DCPMI below the volume tiers \u2014 confirm the applicable registration tier and fee with the NDPC."),s&&o.push(n==="OHL"?"OHL organisations renew their NDPC registration annually and file Compliance Audit Returns (CAR) each year.":"Register once with the NDPC, then file Compliance Audit Returns (CAR) annually."),o.push("Thresholds, fees, and filing dates follow the NDPC GAID 2025 baseline and can change \u2014 verify against current NDPC guidance before relying on them."),{tier:n,isDCPMI:s,annualFeeNGN:c,registration:{required:s,renewsAnnually:n==="OHL"},compliance:{auditReturnsAnnual:s,initialAuditWithinMonths:15},notes:o,dataSubjectsConsidered:l}}function O(e){return String(e).padStart(2,"0")}function y(e){let[i,t,a]=e.split("-").map(Number);return new Date(Date.UTC(i,t-1,a))}function H(e){return e.toISOString().slice(0,10)}function S(e,i){let[t,a,r]=e.split("-").map(Number);return H(new Date(Date.UTC(t,a-1+i,r)))}function R(){return new Date().toISOString().slice(0,10)}function U(e,i={}){var f,C,b,g,p,M,I;let t=(f=e.asOf)!=null?f:R(),a=(C=i.initialAuditWithinMonths)!=null?C:15,r=(g=(b=i.annualDeadline)==null?void 0:b.month)!=null?g:3,l=(M=(p=i.annualDeadline)==null?void 0:p.day)!=null?M:31,n=(I=i.deadlineOverrides)!=null?I:{},s=e.tier===void 0?true:e.tier!=="none",c=S(e.commencementDate,a),o=P=>{var A;return (A=n[P])!=null?A:`${P}-${O(r)}-${O(l)}`},h=Number(t.slice(0,4)),D=o(h);t>D&&(h+=1,D=o(h));let L=Math.round((y(D).getTime()-y(t).getTime())/864e5),m=t>=c,u=[];return s?(u.push("File the Compliance Audit Return with the NDPC via the NDPC Information Management Portal (NIMP)."),m&&u.push("The initial compliance-audit window has elapsed \u2014 ensure the initial audit has been conducted.")):u.push("Compliance Audit Returns apply only to Data Controllers/Processors of Major Importance."),u.push("Filing deadlines follow the NDPC GAID 2025 baseline and can be extended \u2014 verify the current deadline with the NDPC."),{applicable:s,schedule:{commencementDate:e.commencementDate,initialAuditWithinMonths:a,initialAuditDueDate:c,nextFilingDeadline:D,filingYear:h},status:{initialAuditDue:m,daysUntilNextDeadline:L},notes:u,asOf:t}}exports.a=N;exports.b=x;exports.c=T;exports.d=U;
File without changes
File without changes