@tantainnovative/ndpr-toolkit 3.10.4 → 3.10.5
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.
- package/CHANGELOG.md +197 -155
- package/dist/adapters.js +1 -1
- package/dist/adapters.mjs +1 -1
- package/dist/chunk-73BMSK67.js +1 -0
- package/dist/chunk-7PMPKVY3.mjs +1 -0
- package/dist/{chunk-7ZZO7GVB.js → chunk-C2KEXHRX.js} +1 -1
- package/dist/chunk-G7JKRYM5.mjs +1 -0
- package/dist/{chunk-P4LNLCSF.js → chunk-H3IULCE3.js} +1 -1
- package/dist/chunk-R3CU7DTT.js +1 -0
- package/dist/{chunk-PCU6GKBE.mjs → chunk-TAHSSITO.mjs} +1 -1
- package/dist/{chunk-UASG46LP.mjs → chunk-XC3DLYEG.mjs} +1 -1
- package/dist/{chunk-6N5SJO4T.mjs → chunk-XN2UYZXH.mjs} +11 -11
- package/dist/{chunk-M6VSZEFM.js → chunk-YWCBI7SI.js} +11 -11
- package/dist/consent.js +1 -1
- package/dist/consent.mjs +1 -1
- package/dist/headless.js +1 -1
- package/dist/headless.mjs +1 -1
- package/dist/hooks.js +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/policy.js +1 -1
- package/dist/policy.mjs +1 -1
- package/dist/server.js +1 -1
- package/dist/server.mjs +1 -1
- package/dist/unstyled.js +1 -1
- package/dist/unstyled.mjs +1 -1
- package/package.json +3 -7
- package/dist/chunk-BRS52EDT.js +0 -1
- package/dist/chunk-PL4XNCQA.mjs +0 -1
- package/dist/chunk-ROTLSZMV.js +0 -1
- package/dist/chunk-U5RWJRGA.mjs +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
## [3.10.5](https://github.com/mr-tanta/ndpr-toolkit/compare/v3.10.4...v3.10.5) (2026-05-27)
|
|
6
|
+
|
|
7
|
+
First of six releases on the post-audit roadmap (3.10.5 → 3.10.6 → 3.11.0 → 3.12.0 → 3.13.0 → 4.0.0). This patch covers the "real bugs consumers actively hit" tier — no API changes observable to consumers.
|
|
8
|
+
|
|
9
|
+
### `ConsentManager` no longer resets user toggles on parent re-render
|
|
10
|
+
|
|
11
|
+
The options-init `useEffect` previously depended on the `options` reference identity. When a parent re-rendered with an inline-literal `options` array (the common case), the effect re-ran and reset every toggled consent. The effect now depends on a stable hash of `(id + defaultValue)` pairs, so re-init only fires when the option set actually changes. Regression test added (`ConsentManager-stable-options.test.tsx`).
|
|
12
|
+
|
|
13
|
+
### `apiAdapter` default error handler surfaces the response body
|
|
14
|
+
|
|
15
|
+
When a `save()` or `remove()` failed with a 4xx/5xx, the default `console.warn` previously only printed the status code — the body (often `{"error":"…","fields":{…}}`) was dropped. The new handler emits the status line synchronously, then asynchronously clones the response and appends up to 256 chars of body text. Robust against mock-Response objects that lack `.clone()`.
|
|
16
|
+
|
|
17
|
+
### `PolicyExporter` failure message is actionable
|
|
18
|
+
|
|
19
|
+
The catch-all "An error occurred during export. Please try again." string masked the real cause (typically a missing `jspdf` / `docx` peer dep). The new message includes the underlying error text (capped 200 chars) with the `[ndpr-toolkit/policy]` prefix.
|
|
20
|
+
|
|
21
|
+
### `cookieAdapter` default `expires` 365 → 180 days
|
|
22
|
+
|
|
23
|
+
6 months is a more privacy-conservative consent-refresh cadence and aligns with typical NDPA + GDPR commentary on consent longevity. Existing callers can pass `expires: 365` explicitly to preserve the old behaviour.
|
|
24
|
+
|
|
25
|
+
### `examples/dsr-backend-prod` PII hygiene
|
|
26
|
+
|
|
27
|
+
- The Resend mock-mode stdout transport no longer prints the full email body by default (the body contains the requester's full name and reference). Set `DSR_MOCK_PRINT_BODY=1` in dev if you really want the body. Only the metadata (from/to/subject) prints by default.
|
|
28
|
+
- The Prisma persist-failure log path was spreading `err.meta`, which on Prisma errors often contains the failing column VALUES (email, fullName, identifierValue). It now logs `{ code, message: truncated(200) }` only.
|
|
29
|
+
|
|
30
|
+
### Build / dependency / repo hygiene
|
|
31
|
+
|
|
32
|
+
- `next` bumped to `^16.2.6` (clears 7 dev-only High advisories).
|
|
33
|
+
- `lucide-react` removed from root `peerDependencies` + `peerDependenciesMeta`. Zero internal importers exist, so listing it as a peer was bloat for consumers (an optional install they'd never actually use).
|
|
34
|
+
- Root `package.json#devDependencies` self-reference to `@tantainnovative/ndpr-toolkit` widened from `^3.7.0` to `^3.10.0`. (Initially attempted removal — turns out the docs site's `import …from '@tantainnovative/ndpr-toolkit/{core,policy,server}'` paths rely on the self-dep for TS resolution under pnpm. Properly killing it requires switching to `tsconfig.paths` mapping at the docs site, deferred to 3.11.0.)
|
|
35
|
+
- `packages/ndpr-toolkit/package.json` marked `"private": true` so it's clear it's the drift surface, not the publish surface. Slated for full removal in 4.0.
|
|
36
|
+
- Deleted 3 dead root tsconfigs (`tsconfig.lib.json`, `tsconfig.lib-check.json`, `tsconfig.declarations.json`) — referenced from nowhere.
|
|
37
|
+
- Deleted orphan files: `examples/consent-examples.tsx`, `UPGRADE_SUMMARY.md` (April-2025 doc superseded by the docs site upgrade guides), `public/screenshots/dpia-demo.png` (referenced from nowhere).
|
|
38
|
+
- Untracked `test-installation/` (already in `.gitignore`).
|
|
39
|
+
- `CHANGELOG.md`: 155 wrong-org links repaired (`tantainnovative/ndpr-toolkit` → `mr-tanta/ndpr-toolkit`) so historical compare-links resolve.
|
|
40
|
+
|
|
41
|
+
### Verification
|
|
42
|
+
|
|
43
|
+
- Jest: **1212 / 1212 passing** (was 1211 — +1 ConsentManager stability test)
|
|
44
|
+
- `tsc --noEmit` clean
|
|
45
|
+
- `pnpm verify:tarball --skip-ts`: clean across all 22 subpaths
|
|
46
|
+
|
|
5
47
|
## [3.10.4](https://github.com/mr-tanta/ndpr-toolkit/compare/v3.10.3...v3.10.4) (2026-05-26)
|
|
6
48
|
|
|
7
49
|
A 20-agent audit surfaced six ship-blocker-class issues. All six are fixed in this patch.
|
|
@@ -536,189 +578,189 @@ This release lands changes flagged by integrating teams using the toolkit in pro
|
|
|
536
578
|
* **phase1:** add v3.3.1 integration feedback triage ([37b4a92](https://github.com/mr-tanta/ndpr-toolkit/commit/37b4a922f5364da8da595ca971785ddabf1a9074))
|
|
537
579
|
* rename external-feedback references for public release ([afb7fa0](https://github.com/mr-tanta/ndpr-toolkit/commit/afb7fa000c2c9d575bf46c26b0271896b49db04e))
|
|
538
580
|
|
|
539
|
-
## [3.3.1](https://github.com/
|
|
581
|
+
## [3.3.1](https://github.com/mr-tanta/ndpr-toolkit/compare/v3.3.0...v3.3.1) (2026-04-23)
|
|
540
582
|
|
|
541
583
|
|
|
542
584
|
### Features
|
|
543
585
|
|
|
544
|
-
* add Next.js App Router example project ([8772478](https://github.com/
|
|
545
|
-
* add Nigerian Pidgin (pcm) locale support ([dc31a10](https://github.com/
|
|
586
|
+
* add Next.js App Router example project ([8772478](https://github.com/mr-tanta/ndpr-toolkit/commit/8772478e6cf642bc5da278ca771824f0a1d44825)), closes [#13](https://github.com/mr-tanta/ndpr-toolkit/issues/13)
|
|
587
|
+
* add Nigerian Pidgin (pcm) locale support ([dc31a10](https://github.com/mr-tanta/ndpr-toolkit/commit/dc31a102853c6206f86d990663ea1318e41f0297)), closes [#12](https://github.com/mr-tanta/ndpr-toolkit/issues/12)
|
|
546
588
|
|
|
547
589
|
|
|
548
590
|
### Bug Fixes
|
|
549
591
|
|
|
550
|
-
* patch 6 Dependabot vulnerabilities via pnpm overrides ([51695a6](https://github.com/
|
|
551
|
-
* resolve all audit findings — docs, hydration, hooks, DX, and tests ([a0fa3a5](https://github.com/
|
|
552
|
-
* resolve type errors in DSR test files after any-to-unknown migration ([6412195](https://github.com/
|
|
553
|
-
* update outdated test counts and stats across docs and marketing ([b8d3845](https://github.com/
|
|
592
|
+
* patch 6 Dependabot vulnerabilities via pnpm overrides ([51695a6](https://github.com/mr-tanta/ndpr-toolkit/commit/51695a6dbe257826f5ff6c45a68d76920c9987b2))
|
|
593
|
+
* resolve all audit findings — docs, hydration, hooks, DX, and tests ([a0fa3a5](https://github.com/mr-tanta/ndpr-toolkit/commit/a0fa3a50a78b249e64d4e604890b4ca7c0da48e0))
|
|
594
|
+
* resolve type errors in DSR test files after any-to-unknown migration ([6412195](https://github.com/mr-tanta/ndpr-toolkit/commit/64121956635c65e588351b8249497a4b8aa2f56e))
|
|
595
|
+
* update outdated test counts and stats across docs and marketing ([b8d3845](https://github.com/mr-tanta/ndpr-toolkit/commit/b8d38453a0347d01fa79cbe4a83d87c05a98a4f2))
|
|
554
596
|
|
|
555
|
-
## [3.3.0](https://github.com/
|
|
597
|
+
## [3.3.0](https://github.com/mr-tanta/ndpr-toolkit/compare/v3.2.1...v3.3.0) (2026-04-23)
|
|
556
598
|
|
|
557
599
|
|
|
558
600
|
### Features
|
|
559
601
|
|
|
560
|
-
* i18n, accessibility, type safety, backend completion, and DX improvements ([8fa6d83](https://github.com/
|
|
602
|
+
* i18n, accessibility, type safety, backend completion, and DX improvements ([8fa6d83](https://github.com/mr-tanta/ndpr-toolkit/commit/8fa6d830eeeec50d53b8e28076a790c31e423852))
|
|
561
603
|
|
|
562
604
|
|
|
563
605
|
### Bug Fixes
|
|
564
606
|
|
|
565
|
-
* resolve type errors in adapter test files for CI ([7c4b5b9](https://github.com/
|
|
607
|
+
* resolve type errors in adapter test files for CI ([7c4b5b9](https://github.com/mr-tanta/ndpr-toolkit/commit/7c4b5b9194776f6d92b347064f447d6f681f6f7d))
|
|
566
608
|
|
|
567
609
|
|
|
568
610
|
### Documentation
|
|
569
611
|
|
|
570
|
-
* add comprehensive NDPA compliance guide for React/Next.js ([9be4502](https://github.com/
|
|
571
|
-
* add screenshots and visual badges to README ([4aff0df](https://github.com/
|
|
572
|
-
* add v3.2.1 release blog post covering all 42 fixes ([1dd9310](https://github.com/
|
|
612
|
+
* add comprehensive NDPA compliance guide for React/Next.js ([9be4502](https://github.com/mr-tanta/ndpr-toolkit/commit/9be450253fed53efcfe095cabe161b97a8834e05))
|
|
613
|
+
* add screenshots and visual badges to README ([4aff0df](https://github.com/mr-tanta/ndpr-toolkit/commit/4aff0dfb5d8d1ffb07a388ccee445aec5bdcaa54)), closes [#11](https://github.com/mr-tanta/ndpr-toolkit/issues/11)
|
|
614
|
+
* add v3.2.1 release blog post covering all 42 fixes ([1dd9310](https://github.com/mr-tanta/ndpr-toolkit/commit/1dd93105b6f4444cf9a6287ae6f21845c0d998d9))
|
|
573
615
|
|
|
574
|
-
## [3.2.1](https://github.com/
|
|
616
|
+
## [3.2.1](https://github.com/mr-tanta/ndpr-toolkit/compare/v1.0.11...v3.2.1) (2026-04-15)
|
|
575
617
|
|
|
576
618
|
|
|
577
619
|
### Features
|
|
578
620
|
|
|
579
|
-
* add adapter support and compound components to Breach module ([27bc8c4](https://github.com/
|
|
580
|
-
* add adapter support and compound components to CrossBorder module ([810d04f](https://github.com/
|
|
581
|
-
* add adapter support and compound components to DPIA module ([87f15fb](https://github.com/
|
|
582
|
-
* add adapter support and compound components to DSR module ([0099a4f](https://github.com/
|
|
583
|
-
* add adapter support and compound components to LawfulBasis module ([a973de4](https://github.com/
|
|
584
|
-
* add adapter support and compound components to Policy module ([4b58327](https://github.com/
|
|
585
|
-
* add adapter support and compound components to ROPA module ([22ee47c](https://github.com/
|
|
586
|
-
* add adapter support to useConsent hook ([3aee8fe](https://github.com/
|
|
587
|
-
* add adapters entry point ([13971d1](https://github.com/
|
|
588
|
-
* add adaptive policy section generators ([7bb28a6](https://github.com/
|
|
589
|
-
* add blog system with MDX posts and SEO ([8388e0f](https://github.com/
|
|
590
|
-
* add classNames + unstyled props to all 19 components ([c1731ff](https://github.com/
|
|
591
|
-
* add compliance checker sidebar and draft save indicator ([aaa34df](https://github.com/
|
|
592
|
-
* add compliance score engine ([fc6d92a](https://github.com/
|
|
593
|
-
* add composeAdapters for multi-target persistence ([b92f072](https://github.com/
|
|
594
|
-
* add comprehensive design system and site components ([28fc38f](https://github.com/
|
|
595
|
-
* add Consent compound sub-components ([598ea5a](https://github.com/
|
|
596
|
-
* add Consent.Provider compound component ([8b1c622](https://github.com/
|
|
597
|
-
* add create-ndpr CLI scaffolder ([60ae4dd](https://github.com/
|
|
598
|
-
* add cross-border transfer assessment module (NDPA Part VI) ([36e8160](https://github.com/
|
|
599
|
-
* add DOCX policy export with optional dependency ([2ead6a3](https://github.com/
|
|
600
|
-
* add Drizzle ORM schema and adapters ([dab8a2e](https://github.com/
|
|
601
|
-
* add Drizzle schema, integration example, and documentation ([fe95508](https://github.com/
|
|
602
|
-
* add Express routes and middleware ([35fcf69](https://github.com/
|
|
603
|
-
* add HTML and Markdown policy export ([f30ea3d](https://github.com/
|
|
604
|
-
* add i18n locale support with default English strings ([a0aa702](https://github.com/
|
|
605
|
-
* add JSON-LD structured data to key pages for Google rich results ([ebf9298](https://github.com/
|
|
606
|
-
* add lawful basis tracker module (NDPA Section 25) ([cdd39e3](https://github.com/
|
|
607
|
-
* add localStorage adapter ([a49e565](https://github.com/
|
|
608
|
-
* add NDPA policy compliance checker with 15 requirements ([596fb27](https://github.com/
|
|
609
|
-
* add NDPRConsent zero-config preset ([1720afa](https://github.com/
|
|
610
|
-
* add NDPRDashboard compliance dashboard component ([8579c5d](https://github.com/
|
|
611
|
-
* add Next.js App Router API routes ([0053bdc](https://github.com/
|
|
612
|
-
* add PDF policy export with cover page and TOC ([6aa2515](https://github.com/
|
|
613
|
-
* add policy engine types and template context ([b5fea8c](https://github.com/
|
|
614
|
-
* add policy review step with section cards and export panel ([c00e697](https://github.com/
|
|
615
|
-
* add policy wizard step components (about, data, processing) ([3be7142](https://github.com/
|
|
616
|
-
* add PolicyPage, update preset and entry points for adaptive wizard ([b2da198](https://github.com/
|
|
617
|
-
* add PostHog analytics integration ([f154d41](https://github.com/
|
|
618
|
-
* add Prisma ORM adapters for all modules ([8200979](https://github.com/
|
|
619
|
-
* add record of processing activities (ROPA) module ([54ab04e](https://github.com/
|
|
620
|
-
* add REST API adapter ([42207bc](https://github.com/
|
|
621
|
-
* add sessionStorage, cookie, and memory adapters ([cc419e5](https://github.com/
|
|
622
|
-
* add site header/footer, 5 SEO blog posts, updated sitemap ([5278c18](https://github.com/
|
|
623
|
-
* add StorageAdapter interface ([98eec0a](https://github.com/
|
|
624
|
-
* add useAdaptivePolicyWizard hook ([f6abf13](https://github.com/
|
|
625
|
-
* add zero-config presets for all remaining modules ([9ecc714](https://github.com/
|
|
626
|
-
* auto-update version and stats across the site ([cfe468f](https://github.com/
|
|
627
|
-
* complete site redesign with blue primary palette ([410fac6](https://github.com/
|
|
628
|
-
* comprehensive SEO overhaul for organic discovery ([97d3b79](https://github.com/
|
|
629
|
-
* export compliance score from core and hooks entry points ([3310797](https://github.com/
|
|
630
|
-
* export Consent compound components from consent entry point ([be2ea70](https://github.com/
|
|
631
|
-
* improve internal linking and update sitemap ([2b50f33](https://github.com/
|
|
632
|
-
* modular imports and lightweight core — v2.1.0 ([3cbb5a6](https://github.com/
|
|
633
|
-
* privacy policy upgrade — adaptive wizard, compliance checker, professional exports ([a84e4f9](https://github.com/
|
|
634
|
-
* redesign 7 implementation guide pages ([19711fa](https://github.com/
|
|
635
|
-
* redesign consent, dsr, dpia, breach demo pages ([5373a2f](https://github.com/
|
|
636
|
-
* redesign consent, dsr, dpia, breach, policy component doc pages ([248ee0f](https://github.com/
|
|
637
|
-
* redesign demo site with interactive playgrounds ([1cedd1b](https://github.com/
|
|
638
|
-
* redesign docs landing and demos landing pages ([27de488](https://github.com/
|
|
639
|
-
* redesign homepage with new design system ([31a74ee](https://github.com/
|
|
640
|
-
* redesign lawful-basis, cross-border, ropa, hooks doc pages ([c2455cb](https://github.com/
|
|
641
|
-
* redesign policy, lawful-basis, cross-border, ropa demo pages ([9e00802](https://github.com/
|
|
642
|
-
* redesign v3 guide pages (adapters, compounds, presets, score, backend, styling) ([5bbc7e3](https://github.com/
|
|
643
|
-
* scaffold ndpr-recipes package with Prisma schema ([20b6943](https://github.com/
|
|
644
|
-
* update policy demo page with AdaptivePolicyWizard ([428176b](https://github.com/
|
|
645
|
-
* update SEO metadata, sitemap, and structured data for v3 ([aea1a06](https://github.com/
|
|
646
|
-
* use published AdaptivePolicyWizard in policy demo ([0b2d7fc](https://github.com/
|
|
647
|
-
* use published toolkit imports in consent and DSR demos ([8d86102](https://github.com/
|
|
648
|
-
* use published toolkit imports in lawful-basis, cross-border, ropa demos ([bac2b3a](https://github.com/
|
|
649
|
-
* v2.2.0 — fully customizable styling with classNames + unstyled ([3558c27](https://github.com/
|
|
650
|
-
* v2.3.0 — theming, portal, typed callbacks, templates, provider ([9743c44](https://github.com/
|
|
651
|
-
* v2.4.0 — resolve 30 developer feedback items ([01a9930](https://github.com/
|
|
652
|
-
* v3.0.0 — layered architecture, adapters, compound components, presets, compliance score, backend recipes, CLI scaffolder, dashboard ([d46b641](https://github.com/
|
|
621
|
+
* add adapter support and compound components to Breach module ([27bc8c4](https://github.com/mr-tanta/ndpr-toolkit/commit/27bc8c4e9aec0f665e8cd2854c4a4febaf411596))
|
|
622
|
+
* add adapter support and compound components to CrossBorder module ([810d04f](https://github.com/mr-tanta/ndpr-toolkit/commit/810d04ff17cdf452942ba1ef1b3908efe73f3cfe))
|
|
623
|
+
* add adapter support and compound components to DPIA module ([87f15fb](https://github.com/mr-tanta/ndpr-toolkit/commit/87f15fb465af118e15b1ba06a92275283872984a))
|
|
624
|
+
* add adapter support and compound components to DSR module ([0099a4f](https://github.com/mr-tanta/ndpr-toolkit/commit/0099a4f61eb7a3a99892e2101eed151bf772829c))
|
|
625
|
+
* add adapter support and compound components to LawfulBasis module ([a973de4](https://github.com/mr-tanta/ndpr-toolkit/commit/a973de407b721fc20f37b2f2c1ecbee3e78bb3e8))
|
|
626
|
+
* add adapter support and compound components to Policy module ([4b58327](https://github.com/mr-tanta/ndpr-toolkit/commit/4b5832757249824f9b3c20cf8c375a4f80d1ab25))
|
|
627
|
+
* add adapter support and compound components to ROPA module ([22ee47c](https://github.com/mr-tanta/ndpr-toolkit/commit/22ee47c284e7523453d2f36719708cabdae38544))
|
|
628
|
+
* add adapter support to useConsent hook ([3aee8fe](https://github.com/mr-tanta/ndpr-toolkit/commit/3aee8fede3a29d5b4f94f99b0894abc5177a017e))
|
|
629
|
+
* add adapters entry point ([13971d1](https://github.com/mr-tanta/ndpr-toolkit/commit/13971d15abbbe25e6cb8ea677d4a9c60a5b84d2b))
|
|
630
|
+
* add adaptive policy section generators ([7bb28a6](https://github.com/mr-tanta/ndpr-toolkit/commit/7bb28a6b1c0d724036fe15b354c635eeece2cbc5))
|
|
631
|
+
* add blog system with MDX posts and SEO ([8388e0f](https://github.com/mr-tanta/ndpr-toolkit/commit/8388e0fd3fce4904bcfa98b6325743e84f22250c))
|
|
632
|
+
* add classNames + unstyled props to all 19 components ([c1731ff](https://github.com/mr-tanta/ndpr-toolkit/commit/c1731ff8a15fc51c88f33888703fac468be8311b))
|
|
633
|
+
* add compliance checker sidebar and draft save indicator ([aaa34df](https://github.com/mr-tanta/ndpr-toolkit/commit/aaa34df035d71bfcf2cabf1ef120ac0a45928c0c))
|
|
634
|
+
* add compliance score engine ([fc6d92a](https://github.com/mr-tanta/ndpr-toolkit/commit/fc6d92ab10814571605882cf85ddf045b5bcddd6))
|
|
635
|
+
* add composeAdapters for multi-target persistence ([b92f072](https://github.com/mr-tanta/ndpr-toolkit/commit/b92f07251c33b53e05df50d54e2b6daf697272f7))
|
|
636
|
+
* add comprehensive design system and site components ([28fc38f](https://github.com/mr-tanta/ndpr-toolkit/commit/28fc38ff2880171774761931192728c8e89425f4))
|
|
637
|
+
* add Consent compound sub-components ([598ea5a](https://github.com/mr-tanta/ndpr-toolkit/commit/598ea5a152b6223cb3f68056eb01ece6209285e1))
|
|
638
|
+
* add Consent.Provider compound component ([8b1c622](https://github.com/mr-tanta/ndpr-toolkit/commit/8b1c6225e6b5695be1d0e6bcb11009ffedfd592b))
|
|
639
|
+
* add create-ndpr CLI scaffolder ([60ae4dd](https://github.com/mr-tanta/ndpr-toolkit/commit/60ae4dd0b9048f9f7163509307b5e7293b8dc1f6))
|
|
640
|
+
* add cross-border transfer assessment module (NDPA Part VI) ([36e8160](https://github.com/mr-tanta/ndpr-toolkit/commit/36e8160f31c8103c611cc9249f9862fc9e7183ec))
|
|
641
|
+
* add DOCX policy export with optional dependency ([2ead6a3](https://github.com/mr-tanta/ndpr-toolkit/commit/2ead6a3152491928716ef2f2d6928a947f0c60e7))
|
|
642
|
+
* add Drizzle ORM schema and adapters ([dab8a2e](https://github.com/mr-tanta/ndpr-toolkit/commit/dab8a2e5680ac6339bc510090aa2864df5e5981c))
|
|
643
|
+
* add Drizzle schema, integration example, and documentation ([fe95508](https://github.com/mr-tanta/ndpr-toolkit/commit/fe95508528db5e57cdaba1af94031523b76af5cd))
|
|
644
|
+
* add Express routes and middleware ([35fcf69](https://github.com/mr-tanta/ndpr-toolkit/commit/35fcf69bf74176f25226d56ca23f7d9102b04eff))
|
|
645
|
+
* add HTML and Markdown policy export ([f30ea3d](https://github.com/mr-tanta/ndpr-toolkit/commit/f30ea3d72b80b2fd90e937d66abb8d820c0d279e))
|
|
646
|
+
* add i18n locale support with default English strings ([a0aa702](https://github.com/mr-tanta/ndpr-toolkit/commit/a0aa70221396bef638d7ddbae4f23052d7878074))
|
|
647
|
+
* add JSON-LD structured data to key pages for Google rich results ([ebf9298](https://github.com/mr-tanta/ndpr-toolkit/commit/ebf929887da8c0e215d334758101e7b6d23d0842))
|
|
648
|
+
* add lawful basis tracker module (NDPA Section 25) ([cdd39e3](https://github.com/mr-tanta/ndpr-toolkit/commit/cdd39e3e997cf81277dd0fbac1dfc571c1bd6729))
|
|
649
|
+
* add localStorage adapter ([a49e565](https://github.com/mr-tanta/ndpr-toolkit/commit/a49e565081b5d73f2e9806ad1e326ad689af90f5))
|
|
650
|
+
* add NDPA policy compliance checker with 15 requirements ([596fb27](https://github.com/mr-tanta/ndpr-toolkit/commit/596fb27c75c8588cc367f10d344dcaf21cbd67e4))
|
|
651
|
+
* add NDPRConsent zero-config preset ([1720afa](https://github.com/mr-tanta/ndpr-toolkit/commit/1720afad2d734ec210f6dafe5249689ac2d77100))
|
|
652
|
+
* add NDPRDashboard compliance dashboard component ([8579c5d](https://github.com/mr-tanta/ndpr-toolkit/commit/8579c5d41c36f74d21626406eea3013a1c4fb34b))
|
|
653
|
+
* add Next.js App Router API routes ([0053bdc](https://github.com/mr-tanta/ndpr-toolkit/commit/0053bdc3b7e598535fd8ae757fde432ac1b3c46e))
|
|
654
|
+
* add PDF policy export with cover page and TOC ([6aa2515](https://github.com/mr-tanta/ndpr-toolkit/commit/6aa251575a440936b0b120db161baf6dc75adfec))
|
|
655
|
+
* add policy engine types and template context ([b5fea8c](https://github.com/mr-tanta/ndpr-toolkit/commit/b5fea8c29b8ffe2edf77e785b9c9da9f276e0999))
|
|
656
|
+
* add policy review step with section cards and export panel ([c00e697](https://github.com/mr-tanta/ndpr-toolkit/commit/c00e697ef22b02e7afc4c472139ae408b7fe1ca1))
|
|
657
|
+
* add policy wizard step components (about, data, processing) ([3be7142](https://github.com/mr-tanta/ndpr-toolkit/commit/3be7142869ac3a94298425b630538bc500a4559b))
|
|
658
|
+
* add PolicyPage, update preset and entry points for adaptive wizard ([b2da198](https://github.com/mr-tanta/ndpr-toolkit/commit/b2da1988c19f872b658431e9ed8a5b4549705abf))
|
|
659
|
+
* add PostHog analytics integration ([f154d41](https://github.com/mr-tanta/ndpr-toolkit/commit/f154d41e10379fde1fd52a7dd3dda92d04c8b5ef))
|
|
660
|
+
* add Prisma ORM adapters for all modules ([8200979](https://github.com/mr-tanta/ndpr-toolkit/commit/820097903e3ab5eb43bf980dee7eb93d7499769d))
|
|
661
|
+
* add record of processing activities (ROPA) module ([54ab04e](https://github.com/mr-tanta/ndpr-toolkit/commit/54ab04ec27b1c35f80d4276f6be8313486ad5ebb))
|
|
662
|
+
* add REST API adapter ([42207bc](https://github.com/mr-tanta/ndpr-toolkit/commit/42207bcbe09ebccd9c924ce44790b652c44d0221))
|
|
663
|
+
* add sessionStorage, cookie, and memory adapters ([cc419e5](https://github.com/mr-tanta/ndpr-toolkit/commit/cc419e5ef7ad35dd3613de0b931e384337fa141d))
|
|
664
|
+
* add site header/footer, 5 SEO blog posts, updated sitemap ([5278c18](https://github.com/mr-tanta/ndpr-toolkit/commit/5278c1878052f32aa93f51d5d98b09d470c670ca))
|
|
665
|
+
* add StorageAdapter interface ([98eec0a](https://github.com/mr-tanta/ndpr-toolkit/commit/98eec0a454fd96406fc1057c8d548bde51b0bfe1))
|
|
666
|
+
* add useAdaptivePolicyWizard hook ([f6abf13](https://github.com/mr-tanta/ndpr-toolkit/commit/f6abf13f5bb907d435734545533478b80e01ba62))
|
|
667
|
+
* add zero-config presets for all remaining modules ([9ecc714](https://github.com/mr-tanta/ndpr-toolkit/commit/9ecc714d631554e384a1b64dc5a8700cde898a17))
|
|
668
|
+
* auto-update version and stats across the site ([cfe468f](https://github.com/mr-tanta/ndpr-toolkit/commit/cfe468f299f28b7840603ab579fc23db9be83f93))
|
|
669
|
+
* complete site redesign with blue primary palette ([410fac6](https://github.com/mr-tanta/ndpr-toolkit/commit/410fac688cd6ae9e860e8e36dfb3074af5f52201)), closes [#2563](https://github.com/mr-tanta/ndpr-toolkit/issues/2563)
|
|
670
|
+
* comprehensive SEO overhaul for organic discovery ([97d3b79](https://github.com/mr-tanta/ndpr-toolkit/commit/97d3b799b106a31b06b753fce131f79689f5ba28))
|
|
671
|
+
* export compliance score from core and hooks entry points ([3310797](https://github.com/mr-tanta/ndpr-toolkit/commit/3310797f2d9cadbb1a66b6234a28a4f1bce03ee7))
|
|
672
|
+
* export Consent compound components from consent entry point ([be2ea70](https://github.com/mr-tanta/ndpr-toolkit/commit/be2ea70dba820502732f94fbad81ae69afc261f3))
|
|
673
|
+
* improve internal linking and update sitemap ([2b50f33](https://github.com/mr-tanta/ndpr-toolkit/commit/2b50f33defa03cde2eef3c6ac963930ea5ed16c2))
|
|
674
|
+
* modular imports and lightweight core — v2.1.0 ([3cbb5a6](https://github.com/mr-tanta/ndpr-toolkit/commit/3cbb5a6ad1f4d5417d400ed43d8331b3c84739cd))
|
|
675
|
+
* privacy policy upgrade — adaptive wizard, compliance checker, professional exports ([a84e4f9](https://github.com/mr-tanta/ndpr-toolkit/commit/a84e4f9ca061a911a562b04022b3459e0b1a61bb))
|
|
676
|
+
* redesign 7 implementation guide pages ([19711fa](https://github.com/mr-tanta/ndpr-toolkit/commit/19711fad8d0e7aed22b9c1444511f3c2969a8e0f))
|
|
677
|
+
* redesign consent, dsr, dpia, breach demo pages ([5373a2f](https://github.com/mr-tanta/ndpr-toolkit/commit/5373a2ffffb2f100c498239d3da183e6dc803933))
|
|
678
|
+
* redesign consent, dsr, dpia, breach, policy component doc pages ([248ee0f](https://github.com/mr-tanta/ndpr-toolkit/commit/248ee0fb71b6c2cce36bc4f31e7116ac13c4e93c))
|
|
679
|
+
* redesign demo site with interactive playgrounds ([1cedd1b](https://github.com/mr-tanta/ndpr-toolkit/commit/1cedd1ba4e6b9b3a0fedd5cd9b2bfc80396945c6))
|
|
680
|
+
* redesign docs landing and demos landing pages ([27de488](https://github.com/mr-tanta/ndpr-toolkit/commit/27de488cbf71b7218293920b28f3bfcf3f11ac84))
|
|
681
|
+
* redesign homepage with new design system ([31a74ee](https://github.com/mr-tanta/ndpr-toolkit/commit/31a74ee185e7ccf681999fe970a0de16fc437e3a))
|
|
682
|
+
* redesign lawful-basis, cross-border, ropa, hooks doc pages ([c2455cb](https://github.com/mr-tanta/ndpr-toolkit/commit/c2455cb5c2e7821264a40453efc07a7d94c9283c))
|
|
683
|
+
* redesign policy, lawful-basis, cross-border, ropa demo pages ([9e00802](https://github.com/mr-tanta/ndpr-toolkit/commit/9e008025e35c51747eff2c5fb09876972e6f45ab))
|
|
684
|
+
* redesign v3 guide pages (adapters, compounds, presets, score, backend, styling) ([5bbc7e3](https://github.com/mr-tanta/ndpr-toolkit/commit/5bbc7e3366c98ffebb759333c772496c5dea842c))
|
|
685
|
+
* scaffold ndpr-recipes package with Prisma schema ([20b6943](https://github.com/mr-tanta/ndpr-toolkit/commit/20b69435f6b0f56bc057b42bd2c0577b744e50e2))
|
|
686
|
+
* update policy demo page with AdaptivePolicyWizard ([428176b](https://github.com/mr-tanta/ndpr-toolkit/commit/428176bb763a5a6baa0ab60de373f900d381c6d3))
|
|
687
|
+
* update SEO metadata, sitemap, and structured data for v3 ([aea1a06](https://github.com/mr-tanta/ndpr-toolkit/commit/aea1a060e1ec7dd8e104e3fa5ad9e4fec6cc0a32))
|
|
688
|
+
* use published AdaptivePolicyWizard in policy demo ([0b2d7fc](https://github.com/mr-tanta/ndpr-toolkit/commit/0b2d7fc6d4afe3fe25a7a2400cdce22b12b41990))
|
|
689
|
+
* use published toolkit imports in consent and DSR demos ([8d86102](https://github.com/mr-tanta/ndpr-toolkit/commit/8d86102a41b02ee7d775eaf6d1e2501cd647b562))
|
|
690
|
+
* use published toolkit imports in lawful-basis, cross-border, ropa demos ([bac2b3a](https://github.com/mr-tanta/ndpr-toolkit/commit/bac2b3a894009a2bd1df37b966202f152741fb0f))
|
|
691
|
+
* v2.2.0 — fully customizable styling with classNames + unstyled ([3558c27](https://github.com/mr-tanta/ndpr-toolkit/commit/3558c275a0d9d3dd286f8f8e242ab35f7e7bc4ae))
|
|
692
|
+
* v2.3.0 — theming, portal, typed callbacks, templates, provider ([9743c44](https://github.com/mr-tanta/ndpr-toolkit/commit/9743c4445d7882659bb5c45afcbea22bf580639f))
|
|
693
|
+
* v2.4.0 — resolve 30 developer feedback items ([01a9930](https://github.com/mr-tanta/ndpr-toolkit/commit/01a99301d4c655b8f34536284adbe8557866d022))
|
|
694
|
+
* v3.0.0 — layered architecture, adapters, compound components, presets, compliance score, backend recipes, CLI scaffolder, dashboard ([d46b641](https://github.com/mr-tanta/ndpr-toolkit/commit/d46b641086d10ea061191289bcaf96fe5674e0e3))
|
|
653
695
|
|
|
654
696
|
|
|
655
697
|
### Bug Fixes
|
|
656
698
|
|
|
657
|
-
* add @testing-library/dom peer dependency for CI compatibility ([626b517](https://github.com/
|
|
658
|
-
* add adapters and presets to root package.json exports, exclude template packages from tsc ([178bf7f](https://github.com/
|
|
659
|
-
* add dark-mode overrides for Related Guides links and Tailwind theme classes in docs ([e26aef6](https://github.com/
|
|
660
|
-
* add force-static export to robots and sitemap for static build ([b1a5791](https://github.com/
|
|
661
|
-
* add PostHog env variables to build:lib step ([5401268](https://github.com/
|
|
662
|
-
* add presets entry to tsup config and fix types paths ([d3805da](https://github.com/
|
|
663
|
-
* consent demo toggles now update state correctly ([fc710d2](https://github.com/
|
|
664
|
-
* correct all ComplianceInput and ComplianceReport field names in docs ([2e64943](https://github.com/
|
|
665
|
-
* correct code snippets in consent demo ([b6c3edf](https://github.com/
|
|
666
|
-
* correct consent component and hook API references in docs ([c5b6b84](https://github.com/
|
|
667
|
-
* correct consent demo code examples to match actual API ([5040aad](https://github.com/
|
|
668
|
-
* correct documentation URLs to ndprtoolkit.com.ng ([7be38fe](https://github.com/
|
|
669
|
-
* correct StorageAdapter interface in docs, expand compound components guide ([92fd16e](https://github.com/
|
|
670
|
-
* deep QA audit — 50+ fixes across entire project ([adbd94c](https://github.com/
|
|
671
|
-
* eliminate all 404s, broken links, and misinformation ([8d1bdb7](https://github.com/
|
|
672
|
-
* eliminate all vulnerabilities (52 → 0) ([e6dc1b7](https://github.com/
|
|
673
|
-
* explicitly add PostHog env variables to Next.js config ([5ba341d](https://github.com/
|
|
674
|
-
* export DSRFormSubmission and BreachFormSubmission from per-module entry points ([ae5cf79](https://github.com/
|
|
675
|
-
* handle missing PostHog env variables gracefully ([6851e24](https://github.com/
|
|
676
|
-
* improve mobile responsiveness across all demo pages and homepage ([1027de7](https://github.com/
|
|
677
|
-
* improve privacy policy demo UI with comprehensive dark-mode overrides ([ce7f3ea](https://github.com/
|
|
678
|
-
* move force-static export before function declaration in sitemap ([36ee87a](https://github.com/
|
|
679
|
-
* pass onGenerate prop to PolicyGenerator in demo ([dff0c05](https://github.com/
|
|
680
|
-
* preserve code block indentation and add language labels ([4cb8fca](https://github.com/
|
|
681
|
-
* QA audit — resolve bugs, type conflicts, and stale references ([4884735](https://github.com/
|
|
682
|
-
* redesign footer with proper attribution ([d8c9bac](https://github.com/
|
|
683
|
-
* redesign navbar with better contrast and SVG logo ([4946b10](https://github.com/
|
|
684
|
-
* reduce vulnerabilities from 60 to 14 ([9dd5614](https://github.com/
|
|
685
|
-
* remove blue left border from demo cards ([a112678](https://github.com/
|
|
686
|
-
* reorganize static HTML for proper GitHub Pages routing ([256b31f](https://github.com/
|
|
687
|
-
* replace rainbow color palette with unified blue brand identity ([c140ff0](https://github.com/
|
|
688
|
-
* resolve 42 bugs across security, hooks, adapters, components, and utils ([d5f160f](https://github.com/
|
|
689
|
-
* resolve picomatch and flatted security vulnerabilities ([82cb446](https://github.com/
|
|
690
|
-
* resolve strict TypeScript errors in test files ([085ca52](https://github.com/
|
|
691
|
-
* resolve type mismatches in cross-border, ropa, lawful-basis demos ([1269e6e](https://github.com/
|
|
692
|
-
* standardize docs to use pnpm and per-module imports ([fbdbf16](https://github.com/
|
|
693
|
-
* transparent nav background, explicit gradient on CTA button ([45bd144](https://github.com/
|
|
694
|
-
* unify color scheme, fix links, remove legacy-peer-deps ([e35d4c1](https://github.com/
|
|
695
|
-
* update demo imports to use local source and fix React bundling ([831a501](https://github.com/
|
|
696
|
-
* update homepage hero with accurate data ([b931230](https://github.com/
|
|
697
|
-
* update nav colors and design tokens ([b9fb7c2](https://github.com/
|
|
698
|
-
* use async useEffect for adapter load in NDPRROPA preset ([a1b3820](https://github.com/
|
|
699
|
-
* use constants for PostHog env variables to ensure build-time inlining ([4ed9c1c](https://github.com/
|
|
700
|
-
* use existing PolicyGenerator in demo until adaptive wizard is published ([d5f195f](https://github.com/
|
|
701
|
-
* useDPIA isComplete() no longer mutates state during render ([fd7ea9d](https://github.com/
|
|
702
|
-
* wrap consent demo page in ConsentProvider to fix loading issue ([8ba7cf0](https://github.com/
|
|
699
|
+
* add @testing-library/dom peer dependency for CI compatibility ([626b517](https://github.com/mr-tanta/ndpr-toolkit/commit/626b5172e0a6c8960bcdba50b5bb298a504f8075))
|
|
700
|
+
* add adapters and presets to root package.json exports, exclude template packages from tsc ([178bf7f](https://github.com/mr-tanta/ndpr-toolkit/commit/178bf7fc612dd4824f9ee3a57afd15b6007a6f5b))
|
|
701
|
+
* add dark-mode overrides for Related Guides links and Tailwind theme classes in docs ([e26aef6](https://github.com/mr-tanta/ndpr-toolkit/commit/e26aef6d939b21650b5b1b3c480822f4cc5c3c07))
|
|
702
|
+
* add force-static export to robots and sitemap for static build ([b1a5791](https://github.com/mr-tanta/ndpr-toolkit/commit/b1a5791d3ccaba85a847796664a3f848d4039bdd))
|
|
703
|
+
* add PostHog env variables to build:lib step ([5401268](https://github.com/mr-tanta/ndpr-toolkit/commit/54012681b0fb103293675e3ee865443cadc74c26))
|
|
704
|
+
* add presets entry to tsup config and fix types paths ([d3805da](https://github.com/mr-tanta/ndpr-toolkit/commit/d3805da3555055bd3ddbc903f2966972be1574b6))
|
|
705
|
+
* consent demo toggles now update state correctly ([fc710d2](https://github.com/mr-tanta/ndpr-toolkit/commit/fc710d2841088ef936f0aeccb932748dd367807f))
|
|
706
|
+
* correct all ComplianceInput and ComplianceReport field names in docs ([2e64943](https://github.com/mr-tanta/ndpr-toolkit/commit/2e64943cc7ffe8b5d899e7deda4067b102db336f))
|
|
707
|
+
* correct code snippets in consent demo ([b6c3edf](https://github.com/mr-tanta/ndpr-toolkit/commit/b6c3edfab78df5ac1eadc4fc9aa396e06541c307))
|
|
708
|
+
* correct consent component and hook API references in docs ([c5b6b84](https://github.com/mr-tanta/ndpr-toolkit/commit/c5b6b8473cc0099ec8ae2980fa884fbcd86836da))
|
|
709
|
+
* correct consent demo code examples to match actual API ([5040aad](https://github.com/mr-tanta/ndpr-toolkit/commit/5040aadb3cd32b6b8e16bdc0159dd70d760064d0))
|
|
710
|
+
* correct documentation URLs to ndprtoolkit.com.ng ([7be38fe](https://github.com/mr-tanta/ndpr-toolkit/commit/7be38fecaa5b67b680ddd5a6cb52ab0018e7850c))
|
|
711
|
+
* correct StorageAdapter interface in docs, expand compound components guide ([92fd16e](https://github.com/mr-tanta/ndpr-toolkit/commit/92fd16e72d1aa9247811fffc9ba483f5202be080))
|
|
712
|
+
* deep QA audit — 50+ fixes across entire project ([adbd94c](https://github.com/mr-tanta/ndpr-toolkit/commit/adbd94cdfc74636ab02fe4910bbc68837c81c0fb))
|
|
713
|
+
* eliminate all 404s, broken links, and misinformation ([8d1bdb7](https://github.com/mr-tanta/ndpr-toolkit/commit/8d1bdb7725e1255025b4b2063b6e764a07d46621))
|
|
714
|
+
* eliminate all vulnerabilities (52 → 0) ([e6dc1b7](https://github.com/mr-tanta/ndpr-toolkit/commit/e6dc1b7455471fef453082a56ef659f16bab82cc))
|
|
715
|
+
* explicitly add PostHog env variables to Next.js config ([5ba341d](https://github.com/mr-tanta/ndpr-toolkit/commit/5ba341dcc20fd8968dedf842b39468b191fc86e0))
|
|
716
|
+
* export DSRFormSubmission and BreachFormSubmission from per-module entry points ([ae5cf79](https://github.com/mr-tanta/ndpr-toolkit/commit/ae5cf79c8301d83b910dcca2e4d8479f384ed69c)), closes [#14](https://github.com/mr-tanta/ndpr-toolkit/issues/14)
|
|
717
|
+
* handle missing PostHog env variables gracefully ([6851e24](https://github.com/mr-tanta/ndpr-toolkit/commit/6851e2445fb43bcc14faa424c28c8e38e26a0b8f))
|
|
718
|
+
* improve mobile responsiveness across all demo pages and homepage ([1027de7](https://github.com/mr-tanta/ndpr-toolkit/commit/1027de731b0b1bd8c34c5497c9439f7cec6a2f46))
|
|
719
|
+
* improve privacy policy demo UI with comprehensive dark-mode overrides ([ce7f3ea](https://github.com/mr-tanta/ndpr-toolkit/commit/ce7f3ea08fcdaef625d3c1a604e8726fb7dbff2a)), closes [#2563](https://github.com/mr-tanta/ndpr-toolkit/issues/2563)
|
|
720
|
+
* move force-static export before function declaration in sitemap ([36ee87a](https://github.com/mr-tanta/ndpr-toolkit/commit/36ee87a95594a6accecd131e010bf0c5130ab941))
|
|
721
|
+
* pass onGenerate prop to PolicyGenerator in demo ([dff0c05](https://github.com/mr-tanta/ndpr-toolkit/commit/dff0c059a1f55fdb2843331c56ab2b915dcc3c3c))
|
|
722
|
+
* preserve code block indentation and add language labels ([4cb8fca](https://github.com/mr-tanta/ndpr-toolkit/commit/4cb8fca1fca96241b4959b3ceaa6c62835f673de))
|
|
723
|
+
* QA audit — resolve bugs, type conflicts, and stale references ([4884735](https://github.com/mr-tanta/ndpr-toolkit/commit/48847354b7e6a187544e783a49b6f2f92942c2a2))
|
|
724
|
+
* redesign footer with proper attribution ([d8c9bac](https://github.com/mr-tanta/ndpr-toolkit/commit/d8c9bac0fa69f28fc5612fb8a22584df3be7a688))
|
|
725
|
+
* redesign navbar with better contrast and SVG logo ([4946b10](https://github.com/mr-tanta/ndpr-toolkit/commit/4946b105785882439d72a6222030fd1590ef8d33))
|
|
726
|
+
* reduce vulnerabilities from 60 to 14 ([9dd5614](https://github.com/mr-tanta/ndpr-toolkit/commit/9dd5614d3fade0768c1fd99d8093920931a52816))
|
|
727
|
+
* remove blue left border from demo cards ([a112678](https://github.com/mr-tanta/ndpr-toolkit/commit/a11267886ba00e83f37bd6f72c6a686b74f13d3c))
|
|
728
|
+
* reorganize static HTML for proper GitHub Pages routing ([256b31f](https://github.com/mr-tanta/ndpr-toolkit/commit/256b31f5e4efcc99c7b0cb9c7794b3a9ae303436))
|
|
729
|
+
* replace rainbow color palette with unified blue brand identity ([c140ff0](https://github.com/mr-tanta/ndpr-toolkit/commit/c140ff078165263a19cc36bcbe25a50ea02a992b))
|
|
730
|
+
* resolve 42 bugs across security, hooks, adapters, components, and utils ([d5f160f](https://github.com/mr-tanta/ndpr-toolkit/commit/d5f160f4bdbae6601b5c683c2a3c6245e2fd2727))
|
|
731
|
+
* resolve picomatch and flatted security vulnerabilities ([82cb446](https://github.com/mr-tanta/ndpr-toolkit/commit/82cb4463fc6a3bd8699c9a3d51e426ae3c701437))
|
|
732
|
+
* resolve strict TypeScript errors in test files ([085ca52](https://github.com/mr-tanta/ndpr-toolkit/commit/085ca52db4c9732c9436bf53ca2a8d3c904c411b))
|
|
733
|
+
* resolve type mismatches in cross-border, ropa, lawful-basis demos ([1269e6e](https://github.com/mr-tanta/ndpr-toolkit/commit/1269e6e9931eceb3c01ea0d1efa9806b3e2285fa))
|
|
734
|
+
* standardize docs to use pnpm and per-module imports ([fbdbf16](https://github.com/mr-tanta/ndpr-toolkit/commit/fbdbf16647d31afc28caf3347818ece2018a8b6d))
|
|
735
|
+
* transparent nav background, explicit gradient on CTA button ([45bd144](https://github.com/mr-tanta/ndpr-toolkit/commit/45bd144393640c1e7e8634505c8037b50bc74c94))
|
|
736
|
+
* unify color scheme, fix links, remove legacy-peer-deps ([e35d4c1](https://github.com/mr-tanta/ndpr-toolkit/commit/e35d4c1737f76206bc75c1a824033f8d1f570c7e))
|
|
737
|
+
* update demo imports to use local source and fix React bundling ([831a501](https://github.com/mr-tanta/ndpr-toolkit/commit/831a501b5b9c909e535e2f020484cab22970fedd))
|
|
738
|
+
* update homepage hero with accurate data ([b931230](https://github.com/mr-tanta/ndpr-toolkit/commit/b931230d8dcc1c772cee019c33870ad9d6a6c924))
|
|
739
|
+
* update nav colors and design tokens ([b9fb7c2](https://github.com/mr-tanta/ndpr-toolkit/commit/b9fb7c2ad45742cfcf0afc09153eee79e3de4173))
|
|
740
|
+
* use async useEffect for adapter load in NDPRROPA preset ([a1b3820](https://github.com/mr-tanta/ndpr-toolkit/commit/a1b38207ac488c7a400e272157894ec62afb26a1))
|
|
741
|
+
* use constants for PostHog env variables to ensure build-time inlining ([4ed9c1c](https://github.com/mr-tanta/ndpr-toolkit/commit/4ed9c1ca65eba51cc51c638f7c16eaed7ea93f5e))
|
|
742
|
+
* use existing PolicyGenerator in demo until adaptive wizard is published ([d5f195f](https://github.com/mr-tanta/ndpr-toolkit/commit/d5f195f55fa1977e3a910a6824a38f327ec45176))
|
|
743
|
+
* useDPIA isComplete() no longer mutates state during render ([fd7ea9d](https://github.com/mr-tanta/ndpr-toolkit/commit/fd7ea9d5f22a9987fa7e62f54704b3ed28a5fd9f))
|
|
744
|
+
* wrap consent demo page in ConsentProvider to fix loading issue ([8ba7cf0](https://github.com/mr-tanta/ndpr-toolkit/commit/8ba7cf09112f3a74a0187100c2291b8bd7b0fd7c))
|
|
703
745
|
|
|
704
746
|
|
|
705
747
|
### Documentation
|
|
706
748
|
|
|
707
|
-
* add import paths guide to docs site ([6d7e19a](https://github.com/
|
|
708
|
-
* add internationalization and CLI scaffolder guide pages ([2dab79a](https://github.com/
|
|
709
|
-
* add privacy and analytics disclosure to README ([aac2c69](https://github.com/
|
|
710
|
-
* add v3 guides for adapters, compounds, presets, compliance score, and backend integration ([47503e2](https://github.com/
|
|
711
|
-
* add v3 quick start sections to consent, dsr, breach component docs ([1519501](https://github.com/
|
|
712
|
-
* expand backend integration guide and add NDPRDashboard docs ([592d63d](https://github.com/
|
|
713
|
-
* overhaul documentation and demo site for NDPA 2023 ([cde6517](https://github.com/
|
|
714
|
-
* rewrite README for v3.0.0 ([97fca14](https://github.com/
|
|
715
|
-
* update site homepage and docs landing for v3.0.0 ([9f6c37c](https://github.com/
|
|
749
|
+
* add import paths guide to docs site ([6d7e19a](https://github.com/mr-tanta/ndpr-toolkit/commit/6d7e19a6584bdc0f22e8947b1fa51375ee2f51e8))
|
|
750
|
+
* add internationalization and CLI scaffolder guide pages ([2dab79a](https://github.com/mr-tanta/ndpr-toolkit/commit/2dab79a46728c88a218cec32a0c9af7584d1b6f9))
|
|
751
|
+
* add privacy and analytics disclosure to README ([aac2c69](https://github.com/mr-tanta/ndpr-toolkit/commit/aac2c69593265d59e6cd5552a9f5b1802cdb384a))
|
|
752
|
+
* add v3 guides for adapters, compounds, presets, compliance score, and backend integration ([47503e2](https://github.com/mr-tanta/ndpr-toolkit/commit/47503e2a3738e951d6103205ecbc31579cd9ab9a))
|
|
753
|
+
* add v3 quick start sections to consent, dsr, breach component docs ([1519501](https://github.com/mr-tanta/ndpr-toolkit/commit/1519501041885c2608b3044f06f9da4aa3f2d4a6))
|
|
754
|
+
* expand backend integration guide and add NDPRDashboard docs ([592d63d](https://github.com/mr-tanta/ndpr-toolkit/commit/592d63d5b85f8a07d50562fef73b17403cd33141))
|
|
755
|
+
* overhaul documentation and demo site for NDPA 2023 ([cde6517](https://github.com/mr-tanta/ndpr-toolkit/commit/cde651729bc40436ec2b5bf062151fa1bb8eb5c6))
|
|
756
|
+
* rewrite README for v3.0.0 ([97fca14](https://github.com/mr-tanta/ndpr-toolkit/commit/97fca1462f813ecfbfdda9cfbc94a0d7eec493c9))
|
|
757
|
+
* update site homepage and docs landing for v3.0.0 ([9f6c37c](https://github.com/mr-tanta/ndpr-toolkit/commit/9f6c37c3e74c30b142de6c89bd8fd04067b02b77))
|
|
716
758
|
|
|
717
759
|
|
|
718
760
|
### Code Refactoring
|
|
719
761
|
|
|
720
|
-
* migrate existing modules from NDPR to NDPA 2023 ([abbec76](https://github.com/
|
|
721
|
-
* update type definitions for NDPA 2023 ([db6e5e3](https://github.com/
|
|
762
|
+
* migrate existing modules from NDPR to NDPA 2023 ([abbec76](https://github.com/mr-tanta/ndpr-toolkit/commit/abbec7640a816c7c64a1b249581aa57e162cfe56))
|
|
763
|
+
* update type definitions for NDPA 2023 ([db6e5e3](https://github.com/mr-tanta/ndpr-toolkit/commit/db6e5e305f47bb729587a2cf49ef5f992d81d761))
|
|
722
764
|
|
|
723
765
|
## [3.2.0] — 2026-04-14
|
|
724
766
|
|
|
@@ -974,35 +1016,35 @@ All v2 APIs continue to work unchanged. The deprecated `storageOptions`/`storage
|
|
|
974
1016
|
- Breach notification workflow targets NDPC instead of NITDA
|
|
975
1017
|
- PostHog moved from dependencies to devDependencies
|
|
976
1018
|
|
|
977
|
-
### [1.0.12](https://github.com/
|
|
1019
|
+
### [1.0.12](https://github.com/mr-tanta/ndpr-toolkit/compare/v1.0.11...v1.0.12) (2025-09-30)
|
|
978
1020
|
|
|
979
1021
|
|
|
980
1022
|
### Bug Fixes
|
|
981
1023
|
|
|
982
|
-
* reorganize static HTML for proper GitHub Pages routing ([256b31f](https://github.com/
|
|
1024
|
+
* reorganize static HTML for proper GitHub Pages routing ([256b31f](https://github.com/mr-tanta/ndpr-toolkit/commit/256b31f5e4efcc99c7b0cb9c7794b3a9ae303436))
|
|
983
1025
|
|
|
984
|
-
### [1.0.11](https://github.com/
|
|
1026
|
+
### [1.0.11](https://github.com/mr-tanta/ndpr-toolkit/compare/v1.0.10...v1.0.11) (2025-09-29)
|
|
985
1027
|
|
|
986
1028
|
|
|
987
1029
|
### Bug Fixes
|
|
988
1030
|
|
|
989
|
-
* support custom domain and update author contact info ([cc30680](https://github.com/
|
|
1031
|
+
* support custom domain and update author contact info ([cc30680](https://github.com/mr-tanta/ndpr-toolkit/commit/cc306808b63a672ae4867cfbe8ced51da11a87ec))
|
|
990
1032
|
|
|
991
|
-
### [1.0.10](https://github.com/
|
|
1033
|
+
### [1.0.10](https://github.com/mr-tanta/ndpr-toolkit/compare/v1.0.9...v1.0.10) (2025-09-29)
|
|
992
1034
|
|
|
993
1035
|
|
|
994
1036
|
### Documentation
|
|
995
1037
|
|
|
996
|
-
* update author information ([8f866ef](https://github.com/
|
|
1038
|
+
* update author information ([8f866ef](https://github.com/mr-tanta/ndpr-toolkit/commit/8f866ef59246676a0936c43777cc9ec951d19810))
|
|
997
1039
|
|
|
998
|
-
### [1.0.9](https://github.com/
|
|
1040
|
+
### [1.0.9](https://github.com/mr-tanta/ndpr-toolkit/compare/v1.0.8...v1.0.9) (2025-09-29)
|
|
999
1041
|
|
|
1000
1042
|
|
|
1001
1043
|
### Bug Fixes
|
|
1002
1044
|
|
|
1003
|
-
* correct ConsentManager usage in demo page and add gh-pages ([c742a9d](https://github.com/
|
|
1004
|
-
* migrate ESLint to v9 flat config and configure lint-staged ([dd6d5ad](https://github.com/
|
|
1005
|
-
* resolve GitHub Actions failures - remove husky prepare script and fix pnpm lockfile compatibility ([c787ba8](https://github.com/
|
|
1045
|
+
* correct ConsentManager usage in demo page and add gh-pages ([c742a9d](https://github.com/mr-tanta/ndpr-toolkit/commit/c742a9dca89ef3de6b82ea74ea6c1f694a50c503))
|
|
1046
|
+
* migrate ESLint to v9 flat config and configure lint-staged ([dd6d5ad](https://github.com/mr-tanta/ndpr-toolkit/commit/dd6d5ad91245ce97bf610a3168bc7ddaf32963c7))
|
|
1047
|
+
* resolve GitHub Actions failures - remove husky prepare script and fix pnpm lockfile compatibility ([c787ba8](https://github.com/mr-tanta/ndpr-toolkit/commit/c787ba81260a20fed999b2dc795fd21cc91f514e))
|
|
1006
1048
|
|
|
1007
1049
|
## [1.0.7] - 2025-01-10
|
|
1008
1050
|
|
package/dist/adapters.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkR3CU7DTT_js=require('./chunk-R3CU7DTT.js'),chunkC2KEXHRX_js=require('./chunk-C2KEXHRX.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,"cookieAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.b}});Object.defineProperty(exports,"sessionStorageAdapter",{enumerable:true,get:function(){return chunkC2KEXHRX_js.a}});Object.defineProperty(exports,"localStorageAdapter",{enumerable:true,get:function(){return chunkVWED6UTN_js.a}});
|
package/dist/adapters.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{a as apiAdapter,c as composeAdapters,b as memoryAdapter}from'./chunk-
|
|
1
|
+
export{a as apiAdapter,c as composeAdapters,b as memoryAdapter}from'./chunk-7PMPKVY3.mjs';export{b as cookieAdapter,a as sessionStorageAdapter}from'./chunk-XC3DLYEG.mjs';export{a as localStorageAdapter}from'./chunk-DBZSN4WP.mjs';import'./chunk-ZJYULEER.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkAME4HJR4_js=require('./chunk-AME4HJR4.js'),chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js'),react=require('react'),jsxRuntime=require('react/jsx-runtime');var G=({options:g,settings:d,onSave:S,title:l="Manage Your Privacy Settings",description:R="Update your consent preferences at any time. Required cookies cannot be disabled as they are necessary for the website to function. Consent management is provided in accordance with NDPA Sections 25-26.",saveButtonText:M="Save Preferences",resetButtonText:w="Reset to Defaults",version:_="1.0",className:f="",buttonClassName:v="",primaryButtonClassName:T="",secondaryButtonClassName:$="",classNames:n,unstyled:e,showSuccessMessage:k=true,successMessage:D="Your preferences have been saved.",successMessageDuration:P=3e3})=>{let[u,c]=react.useState({}),[q,b]=react.useState(false),p=react.useRef(null);react.useEffect(()=>()=>{p.current&&clearTimeout(p.current);},[]);let x=react.useMemo(()=>g.map(t=>`${t.id}:${t.defaultValue?"1":"0"}`).join("|"),[g]);react.useEffect(()=>{if(d&&d.consents)c(d.consents);else {let t={};g.forEach(o=>{t[o.id]=o.defaultValue||false;}),c(t);}},[x,d]);let y=(t,o)=>{c(s=>chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a({},s),{[t]:o}));},E=()=>{let t={consents:u,timestamp:Date.now(),version:_,method:"manager",hasInteracted:true};S(t),k&&(b(true),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{b(false);},P));},I=()=>{let t={};g.forEach(o=>{t[o.id]=o.defaultValue||false;}),c(t);},L=`ndpr-consent-manager__button ndpr-consent-manager__button--primary ${v} ${T}`.trim(),V=`ndpr-consent-manager__button ndpr-consent-manager__button--secondary ${v} ${$}`.trim(),F=(n==null?void 0:n.primaryButton)||(n==null?void 0:n.saveButton)||L,O=(n==null?void 0:n.secondaryButton)||(n==null?void 0:n.resetButton)||V,Y=`ndpr-consent-manager${f?` ${f}`:""}`;return jsxRuntime.jsxs("div",{"data-ndpr-component":"consent-manager",className:chunkAME4HJR4_js.a(Y,n==null?void 0:n.root,e),children:[jsxRuntime.jsx("h2",{className:chunkAME4HJR4_js.a("ndpr-consent-manager__title",n==null?void 0:n.title,e),children:l}),jsxRuntime.jsx("p",{className:chunkAME4HJR4_js.a("ndpr-consent-manager__description",n==null?void 0:n.description,e),children:R}),jsxRuntime.jsx("div",{className:chunkAME4HJR4_js.a("ndpr-consent-manager__options-list",n==null?void 0:n.optionsList,e),children:g.map(t=>{let o=`consent-manager-${t.id}`;return jsxRuntime.jsxs("div",{className:chunkAME4HJR4_js.a("ndpr-consent-manager__option",n==null?void 0:n.optionItem,e),children:[jsxRuntime.jsxs("div",{className:e?"":"ndpr-consent-manager__option-info",children:[jsxRuntime.jsx("h3",{className:e?"":"ndpr-consent-manager__option-label",children:t.label}),jsxRuntime.jsx("p",{className:e?"":"ndpr-consent-manager__option-description",children:t.description})]}),jsxRuntime.jsxs("label",{htmlFor:o,className:e?"":"ndpr-consent-manager__toggle-wrapper",children:[jsxRuntime.jsx("input",{id:o,type:"checkbox",className:e?"":"ndpr-consent-manager__toggle-input",checked:u[t.id]||false,onChange:s=>y(t.id,s.target.checked),disabled:t.required}),jsxRuntime.jsx("span",{"aria-hidden":"true",className:chunkAME4HJR4_js.a("ndpr-consent-manager__toggle",n==null?void 0:n.toggle,e)}),jsxRuntime.jsxs("span",{className:e?"":"ndpr-consent-manager__toggle-status",children:[u[t.id]?"Enabled":"Disabled",t.required&&jsxRuntime.jsx("span",{className:e?"":"ndpr-consent-manager__required-marker",children:"(Required)"})]})]})]},t.id)})}),q&&jsxRuntime.jsx("div",{className:e?"":"ndpr-consent-manager__success","aria-live":"polite",role:"status",children:D}),jsxRuntime.jsxs("div",{className:e?"":"ndpr-consent-manager__buttons",children:[jsxRuntime.jsx("button",{onClick:E,className:chunkAME4HJR4_js.a(F,n==null?void 0:n.saveButton,e),children:M}),jsxRuntime.jsx("button",{onClick:I,className:chunkAME4HJR4_js.a(O,n==null?void 0:n.resetButton,e),children:w})]}),jsxRuntime.jsxs("div",{className:e?"":"ndpr-consent-manager__meta",children:[jsxRuntime.jsxs("p",{children:["Last updated: ",d?new Date(d.timestamp).toLocaleString():"Never"]}),jsxRuntime.jsxs("p",{children:["Version: ",_]})]})]})};exports.a=G;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {d,b,a}from'./chunk-ZJYULEER.mjs';function M(e){return e.response?e.response.status>=500:true}function $(e){return new Promise(s=>setTimeout(s,e))}function O(e){return e?typeof e=="function"?e():e:{}}function q(e,s={}){var w,k,g;let{headers:a$1,credentials:d$1="same-origin",loadMethod:u="GET",saveMethod:c="POST",unwrap:A,retry:p,onError:h,onSuccess:l,fetchInit:x}=s,T=(w=p==null?void 0:p.attempts)!=null?w:0,C=(k=p==null?void 0:p.baseDelayMs)!=null?k:250,E=(g=p==null?void 0:p.shouldRetry)!=null?g:M,y=h!=null?h:(t=>{if(t.method==="load")return;let o=t.method==="save"?"save to":"delete from";if(t.response){console.warn(`[ndpr-toolkit] Failed to ${o} ${t.endpoint}: ${t.response.status}`);try{let r=typeof t.response.clone=="function"?t.response.clone():null;r&&typeof r.text=="function"&&r.text().then(i=>{let n=i.length>256?`${i.slice(0,256)}\u2026`:i;n.trim()&&console.warn(`[ndpr-toolkit] ${o} ${t.endpoint} response body: ${n}`);}).catch(()=>{});}catch(r){}}else console.warn(`[ndpr-toolkit] Failed to ${o} ${t.endpoint}`);});function v(t,o,r){return d(this,null,function*(){for(let i=0;i<=T;i++){let n,S;try{n=yield fetch(e,b(a(a({},x),o),{headers:a(a({},O(a$1)),o.headers),credentials:d$1}));}catch(b){S=b;}if(n&&n.ok)return {ok:true,response:n};let R={method:t,endpoint:e,error:S,response:n,status:n==null?void 0:n.status,payload:r,attempt:i};if(i===T||!E(R))return y(R),{ok:false};yield $(C*Math.pow(2,i));}return {ok:false}})}return {load(){return d(this,null,function*(){let t=yield v("load",{method:u,headers:{}});if(!t.ok)return null;try{let o=yield t.response.json(),r=A?A(o):o;return l&&l({method:"load",endpoint:e,response:t.response,data:r!=null?r:void 0}),r}catch(o){return y({method:"load",endpoint:e,error:o,response:t.response,status:t.response.status,attempt:T}),null}})},save(t){return d(this,null,function*(){let o=yield v("save",{method:c,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},t);o.ok&&l&&l({method:"save",endpoint:e,response:o.response,payload:t});})},remove(){return d(this,null,function*(){let t=yield v("remove",{method:"DELETE",headers:{}});t.ok&&l&&l({method:"remove",endpoint:e,response:t.response});})}}}function F(e){let s=e!=null?e:null;return {load(){return s},save(a){s=a;},remove(){s=null;}}}function H(e,...s){return {load(){return e.load()},save(a){let d=e.save(a),u=()=>{for(let c of s)try{c.save(a);}catch(A){console.warn("[ndpr-toolkit] Secondary adapter save failed:",A);}};if(d instanceof Promise)return d.then(()=>u());u();},remove(){let a=e.remove(),d=()=>{for(let u of s)try{u.remove();}catch(c){console.warn("[ndpr-toolkit] Secondary adapter remove failed:",c);}};if(a instanceof Promise)return a.then(()=>d());d();}}}export{q as a,F as b,H as c};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';function p(t){return {load(){if(typeof window=="undefined")return null;try{let e=sessionStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return null}},save(e){if(typeof window!="undefined")try{sessionStorage.setItem(t,JSON.stringify(e));}catch(i){}},remove(){if(typeof window!="undefined")try{sessionStorage.removeItem(t);}catch(e){}}}}function m(t,e={}){let{domain:i,path:s="/",expires:d=
|
|
1
|
+
'use strict';function p(t){return {load(){if(typeof window=="undefined")return null;try{let e=sessionStorage.getItem(t);return e?JSON.parse(e):null}catch(e){return null}},save(e){if(typeof window!="undefined")try{sessionStorage.setItem(t,JSON.stringify(e));}catch(i){}},remove(){if(typeof window!="undefined")try{sessionStorage.removeItem(t);}catch(e){}}}}function m(t,e={}){let{domain:i,path:s="/",expires:d=180,secure:u=true,sameSite:c="Lax"}=e;return {load(){if(typeof document=="undefined")return null;try{let n=encodeURIComponent(t),a=document.cookie.split(";").map(o=>o.trim()).find(o=>o.startsWith(`${n}=`));if(!a)return null;let r=a.indexOf("=");return JSON.parse(decodeURIComponent(a.slice(r+1)))}catch(n){return null}},save(n){if(typeof document=="undefined")return;let a=u||c==="None",r=`${encodeURIComponent(t)}=${encodeURIComponent(JSON.stringify(n))}; path=${s}; samesite=${c}`;if(d>0){let o=new Date;o.setDate(o.getDate()+d),r+=`; expires=${o.toUTCString()}`;}i&&(r+=`; domain=${i}`),a&&(r+="; secure"),document.cookie=r;},remove(){if(typeof document=="undefined")return;let n=`${encodeURIComponent(t)}=; path=${s}; expires=Thu, 01 Jan 1970 00:00:00 GMT`;i&&(n+=`; domain=${i}`),document.cookie=n;}}}exports.a=p;exports.b=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {a}from'./chunk-SFGW37LE.mjs';import {b,a as a$1}from'./chunk-ZJYULEER.mjs';import {useState,useRef,useEffect,useMemo}from'react';import {jsxs,jsx}from'react/jsx-runtime';var G=({options:g,settings:d,onSave:S,title:l="Manage Your Privacy Settings",description:R="Update your consent preferences at any time. Required cookies cannot be disabled as they are necessary for the website to function. Consent management is provided in accordance with NDPA Sections 25-26.",saveButtonText:M="Save Preferences",resetButtonText:w="Reset to Defaults",version:_="1.0",className:f="",buttonClassName:v="",primaryButtonClassName:T="",secondaryButtonClassName:$="",classNames:n,unstyled:e,showSuccessMessage:k=true,successMessage:D="Your preferences have been saved.",successMessageDuration:P=3e3})=>{let[u,c]=useState({}),[q,b$1]=useState(false),p=useRef(null);useEffect(()=>()=>{p.current&&clearTimeout(p.current);},[]);let x=useMemo(()=>g.map(t=>`${t.id}:${t.defaultValue?"1":"0"}`).join("|"),[g]);useEffect(()=>{if(d&&d.consents)c(d.consents);else {let t={};g.forEach(o=>{t[o.id]=o.defaultValue||false;}),c(t);}},[x,d]);let y=(t,o)=>{c(s=>b(a$1({},s),{[t]:o}));},E=()=>{let t={consents:u,timestamp:Date.now(),version:_,method:"manager",hasInteracted:true};S(t),k&&(b$1(true),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{b$1(false);},P));},I=()=>{let t={};g.forEach(o=>{t[o.id]=o.defaultValue||false;}),c(t);},L=`ndpr-consent-manager__button ndpr-consent-manager__button--primary ${v} ${T}`.trim(),V=`ndpr-consent-manager__button ndpr-consent-manager__button--secondary ${v} ${$}`.trim(),F=(n==null?void 0:n.primaryButton)||(n==null?void 0:n.saveButton)||L,O=(n==null?void 0:n.secondaryButton)||(n==null?void 0:n.resetButton)||V,Y=`ndpr-consent-manager${f?` ${f}`:""}`;return jsxs("div",{"data-ndpr-component":"consent-manager",className:a(Y,n==null?void 0:n.root,e),children:[jsx("h2",{className:a("ndpr-consent-manager__title",n==null?void 0:n.title,e),children:l}),jsx("p",{className:a("ndpr-consent-manager__description",n==null?void 0:n.description,e),children:R}),jsx("div",{className:a("ndpr-consent-manager__options-list",n==null?void 0:n.optionsList,e),children:g.map(t=>{let o=`consent-manager-${t.id}`;return jsxs("div",{className:a("ndpr-consent-manager__option",n==null?void 0:n.optionItem,e),children:[jsxs("div",{className:e?"":"ndpr-consent-manager__option-info",children:[jsx("h3",{className:e?"":"ndpr-consent-manager__option-label",children:t.label}),jsx("p",{className:e?"":"ndpr-consent-manager__option-description",children:t.description})]}),jsxs("label",{htmlFor:o,className:e?"":"ndpr-consent-manager__toggle-wrapper",children:[jsx("input",{id:o,type:"checkbox",className:e?"":"ndpr-consent-manager__toggle-input",checked:u[t.id]||false,onChange:s=>y(t.id,s.target.checked),disabled:t.required}),jsx("span",{"aria-hidden":"true",className:a("ndpr-consent-manager__toggle",n==null?void 0:n.toggle,e)}),jsxs("span",{className:e?"":"ndpr-consent-manager__toggle-status",children:[u[t.id]?"Enabled":"Disabled",t.required&&jsx("span",{className:e?"":"ndpr-consent-manager__required-marker",children:"(Required)"})]})]})]},t.id)})}),q&&jsx("div",{className:e?"":"ndpr-consent-manager__success","aria-live":"polite",role:"status",children:D}),jsxs("div",{className:e?"":"ndpr-consent-manager__buttons",children:[jsx("button",{onClick:E,className:a(F,n==null?void 0:n.saveButton,e),children:M}),jsx("button",{onClick:I,className:a(O,n==null?void 0:n.resetButton,e),children:w})]}),jsxs("div",{className:e?"":"ndpr-consent-manager__meta",children:[jsxs("p",{children:["Last updated: ",d?new Date(d.timestamp).toLocaleString():"Never"]}),jsxs("p",{children:["Version: ",_]})]})]})};export{G as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkC2KEXHRX_js=require('./chunk-C2KEXHRX.js'),chunkB46SJB5V_js=require('./chunk-B46SJB5V.js'),chunkVWED6UTN_js=require('./chunk-VWED6UTN.js'),react=require('react');function F(n){if(!n)return chunkVWED6UTN_js.a("ndpr_consent");let{storageKey:o="ndpr_consent",storageType:i="localStorage"}=n;return i==="sessionStorage"?chunkC2KEXHRX_js.a(o):i==="cookie"?chunkC2KEXHRX_js.b(o,n.cookieOptions):chunkVWED6UTN_js.a(o)}function k(n,o,i,r,a,g,l){if(n){i(n);let{valid:s,errors:c}=chunkB46SJB5V_js.a(n);r(s),a(c),g(!(s&&n.version===o));}else g(true);l(false);}function z({options:n,adapter:o,storageOptions:i,version:r="1.0",onChange:a}){let g=o!=null?o:F(i),l=react.useRef(g);l.current=g;let[s,c]=react.useState(null),[y,d]=react.useState(false),[E,C]=react.useState(false),[w,S]=react.useState([]),[I,v]=react.useState(true);react.useEffect(()=>{let e=false;try{let t=l.current.load();t instanceof Promise?t.then(m=>{e||k(m,r,c,C,S,d,v);},()=>{e||(d(!0),v(!1));}):k(t,r,c,C,S,d,v);}catch(t){e||(d(true),v(false));}return ()=>{e=true;}},[r]);let h=react.useCallback(e=>{let{valid:t,errors:m}=chunkB46SJB5V_js.a(e);C(t),S(m),a==null||a(e),Promise.resolve(l.current.save(e)).catch(P=>{console.warn("[ndpr-toolkit] Failed to save consent:",P);});},[a]),f=react.useCallback(e=>{let t={consents:e,timestamp:Date.now(),version:r,method:"explicit",hasInteracted:true};c(t),h(t),d(false);},[r,h]),L=react.useCallback(()=>{let e={};n.forEach(t=>{e[t.id]=true;}),f(e);},[n,f]),U=react.useCallback(()=>{let e={};n.forEach(t=>{e[t.id]=t.required||false;}),f(e);},[n,f]),V=react.useCallback(e=>!!(s!=null&&s.consents[e]),[s]),j=react.useCallback(()=>{c(null),d(true),C(false),S([]),Promise.resolve(l.current.remove()).catch(e=>{console.warn("[ndpr-toolkit] Failed to remove consent:",e);});},[]);return {settings:s,hasConsent:V,updateConsent:f,acceptAll:L,rejectAll:U,shouldShowBanner:y,isValid:E,validationErrors:w,resetConsent:j,isLoading:I}}exports.a=z;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkRFPLZDIO_js=require('./chunk-RFPLZDIO.js');function M(e){return e.response?e.response.status>=500:true}function $(e){return new Promise(s=>setTimeout(s,e))}function O(e){return e?typeof e=="function"?e():e:{}}function q(e,s={}){var w,k,g;let{headers:a,credentials:d="same-origin",loadMethod:u="GET",saveMethod:c="POST",unwrap:A,retry:p,onError:h,onSuccess:l,fetchInit:x}=s,T=(w=p==null?void 0:p.attempts)!=null?w:0,C=(k=p==null?void 0:p.baseDelayMs)!=null?k:250,E=(g=p==null?void 0:p.shouldRetry)!=null?g:M,y=h!=null?h:(t=>{if(t.method==="load")return;let o=t.method==="save"?"save to":"delete from";if(t.response){console.warn(`[ndpr-toolkit] Failed to ${o} ${t.endpoint}: ${t.response.status}`);try{let r=typeof t.response.clone=="function"?t.response.clone():null;r&&typeof r.text=="function"&&r.text().then(i=>{let n=i.length>256?`${i.slice(0,256)}\u2026`:i;n.trim()&&console.warn(`[ndpr-toolkit] ${o} ${t.endpoint} response body: ${n}`);}).catch(()=>{});}catch(r){}}else console.warn(`[ndpr-toolkit] Failed to ${o} ${t.endpoint}`);});function v(t,o,r){return chunkRFPLZDIO_js.d(this,null,function*(){for(let i=0;i<=T;i++){let n,S;try{n=yield fetch(e,chunkRFPLZDIO_js.b(chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},x),o),{headers:chunkRFPLZDIO_js.a(chunkRFPLZDIO_js.a({},O(a)),o.headers),credentials:d}));}catch(b){S=b;}if(n&&n.ok)return {ok:true,response:n};let R={method:t,endpoint:e,error:S,response:n,status:n==null?void 0:n.status,payload:r,attempt:i};if(i===T||!E(R))return y(R),{ok:false};yield $(C*Math.pow(2,i));}return {ok:false}})}return {load(){return chunkRFPLZDIO_js.d(this,null,function*(){let t=yield v("load",{method:u,headers:{}});if(!t.ok)return null;try{let o=yield t.response.json(),r=A?A(o):o;return l&&l({method:"load",endpoint:e,response:t.response,data:r!=null?r:void 0}),r}catch(o){return y({method:"load",endpoint:e,error:o,response:t.response,status:t.response.status,attempt:T}),null}})},save(t){return chunkRFPLZDIO_js.d(this,null,function*(){let o=yield v("save",{method:c,headers:{"Content-Type":"application/json"},body:JSON.stringify(t)},t);o.ok&&l&&l({method:"save",endpoint:e,response:o.response,payload:t});})},remove(){return chunkRFPLZDIO_js.d(this,null,function*(){let t=yield v("remove",{method:"DELETE",headers:{}});t.ok&&l&&l({method:"remove",endpoint:e,response:t.response});})}}}function F(e){let s=e!=null?e:null;return {load(){return s},save(a){s=a;},remove(){s=null;}}}function H(e,...s){return {load(){return e.load()},save(a){let d=e.save(a),u=()=>{for(let c of s)try{c.save(a);}catch(A){console.warn("[ndpr-toolkit] Secondary adapter save failed:",A);}};if(d instanceof Promise)return d.then(()=>u());u();},remove(){let a=e.remove(),d=()=>{for(let u of s)try{u.remove();}catch(c){console.warn("[ndpr-toolkit] Secondary adapter remove failed:",c);}};if(a instanceof Promise)return a.then(()=>d());d();}}}exports.a=q;exports.b=F;exports.c=H;
|