@tantainnovative/ndpr-toolkit 3.6.0 → 3.6.1
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 +19 -0
- package/README.md +31 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,25 @@
|
|
|
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.6.1](https://github.com/mr-tanta/ndpr-toolkit/compare/v3.6.0...v3.6.1) (2026-05-24)
|
|
6
|
+
|
|
7
|
+
Phase A of the post-3.6.0 backlog — tooling foundation. Pure plumbing; no API changes on the main library, but `create-ndpr` (scoped) bumps to 0.2.0 and a new unscoped `create-ndpr` alias package ships.
|
|
8
|
+
|
|
9
|
+
### Companion packages
|
|
10
|
+
|
|
11
|
+
* **`@tantainnovative/create-ndpr@0.2.0`** — scaffolder no longer emits broken Prisma imports when you pick `ORM=None`. Templates now support `{{#if ORM=prisma|drizzle|none}}` conditional blocks. The consent route template emits working code for all three ORMs (Prisma queries, Drizzle queries, or an in-memory stub with TODO comments). Other route templates (still hardcoded to Prisma) are skipped with a clear message when `ORM=none` instead of generating broken output. Also fixes the `StorageAdapter<unknown>` type error in the generated `ndpr-layout.tsx` (now correctly types the apiAdapter as `StorageAdapter<ConsentSettings>` and adds a CSRF header example).
|
|
12
|
+
* **`create-ndpr@1.0.0` (NEW, unscoped)** — 30-line alias that delegates to the scoped CLI via `npx`. Lets `npm create ndpr@latest`, `npx create-ndpr`, `pnpm create ndpr`, and `bun create ndpr` all work alongside the existing `npx @tantainnovative/create-ndpr`.
|
|
13
|
+
|
|
14
|
+
### Docs
|
|
15
|
+
|
|
16
|
+
* README install block now shows all four idiomatic CLI invocations (`npm create ndpr@latest`, `npx create-ndpr`, the scoped form, pnpm and bun variants).
|
|
17
|
+
* README header now has "Open in StackBlitz" and "Open in CodeSandbox" badges that boot `examples/nextjs-app` zero-install in either environment.
|
|
18
|
+
* New "Bundle size guidance" subsection under "Available Import Paths" explains: (1) prefer narrow subpaths over root, (2) use `/presets/{consent,dsr,policy}` over the full `/presets` barrel when only one preset is needed, (3) the 3 manager components are heavy by design (they're full table+filter+modal UIs) — import from `/hooks` if you only need the hook, (4) `/server` carries zero React for SSR/edge/CI use.
|
|
19
|
+
|
|
20
|
+
### No library code changes
|
|
21
|
+
|
|
22
|
+
The main `@tantainnovative/ndpr-toolkit` package is unchanged from 3.6.0; the version bump is for changelog clarity and so the repo, npm, and CHANGELOG all reference the same version.
|
|
23
|
+
|
|
5
24
|
## [3.6.0](https://github.com/mr-tanta/ndpr-toolkit/compare/v3.5.5...v3.6.0) (2026-05-24)
|
|
6
25
|
|
|
7
26
|
### Features (developer feedback)
|
package/README.md
CHANGED
|
@@ -13,6 +13,9 @@ v3 ships **zero-config presets**, **pluggable storage adapters**, **compound com
|
|
|
13
13
|
|
|
14
14
|
**[Documentation](https://ndprtoolkit.com.ng)** | **[Live Demos](https://ndprtoolkit.com.ng/ndpr-demos)** | **[npm](https://www.npmjs.com/package/@tantainnovative/ndpr-toolkit)** | **[Blog](https://ndprtoolkit.com.ng/blog)** | **[v3.4.0 Release](https://github.com/mr-tanta/ndpr-toolkit/releases/tag/v3.4.0)**
|
|
15
15
|
|
|
16
|
+
[](https://stackblitz.com/github/mr-tanta/ndpr-toolkit/tree/main/examples/nextjs-app)
|
|
17
|
+
[](https://codesandbox.io/p/github/mr-tanta/ndpr-toolkit/main/examples/nextjs-app)
|
|
18
|
+
|
|
16
19
|
> **What's new in 3.4.0:** components now ship styled defaults via a real stylesheet — Tailwind is no longer required. Add `import "@tantainnovative/ndpr-toolkit/styles";` once in your app entry. Plus a new `/server` subpath for RSC-safe pure-logic imports (validators, generators, scoring) with zero React in the import graph. Backward-compatible at the component API level. Full notes on the [release page](https://github.com/mr-tanta/ndpr-toolkit/releases/tag/v3.4.0).
|
|
17
20
|
|
|
18
21
|
<p align="center">
|
|
@@ -112,7 +115,14 @@ bun add @radix-ui/react-switch @radix-ui/react-tabs @radix-ui/react-label @radix
|
|
|
112
115
|
Or scaffold instantly with the CLI:
|
|
113
116
|
|
|
114
117
|
```bash
|
|
118
|
+
# Recommended (idiomatic):
|
|
119
|
+
npm create ndpr@latest
|
|
120
|
+
|
|
121
|
+
# Equivalent — pick whichever fits your muscle memory:
|
|
122
|
+
npx create-ndpr
|
|
115
123
|
npx @tantainnovative/create-ndpr
|
|
124
|
+
pnpm create ndpr
|
|
125
|
+
bun create ndpr
|
|
116
126
|
```
|
|
117
127
|
|
|
118
128
|
---
|
|
@@ -415,7 +425,10 @@ Each component exports its `ClassNames` TypeScript interface for autocomplete. F
|
|
|
415
425
|
| `/server` | **Pure validators, generators, scoring, locales, adapters, types — zero React** | `tslib` | **Yes** |
|
|
416
426
|
| `/core` | Types, utility functions, NDPRProvider | `react`[^core] | Partial |
|
|
417
427
|
| `/hooks` | React hooks for all 8 modules | `react` | No |
|
|
418
|
-
| `/presets` |
|
|
428
|
+
| `/presets` | All zero-config preset components (barrel) | `react`, Radix peers | No |
|
|
429
|
+
| `/presets/consent` | **Just `NDPRConsent`** — narrower barrel for bundle size | `react`, Radix peers | No |
|
|
430
|
+
| `/presets/dsr` | **Just `NDPRSubjectRights`** | `react`, Radix peers | No |
|
|
431
|
+
| `/presets/policy` | **Just `NDPRPrivacyPolicy`** | `react`, Radix peers | No |
|
|
419
432
|
| `/adapters` | Storage adapters (localStorage, sessionStorage, cookie, api, memory, composeAdapters) | none | Yes |
|
|
420
433
|
| `/consent` | ConsentBanner, ConsentManager, `Consent.*` compound API, useConsent | `react` | No |
|
|
421
434
|
| `/dsr` | DSR components + hook | `react` | No |
|
|
@@ -430,6 +443,23 @@ Each component exports its `ClassNames` TypeScript interface for autocomplete. F
|
|
|
430
443
|
|
|
431
444
|
[^core]: `/core` re-exports the React `NDPRProvider` for backward compatibility. For strictly server-side imports use `/server` — it carries the same pure validators with no React surface.
|
|
432
445
|
|
|
446
|
+
### Bundle size guidance
|
|
447
|
+
|
|
448
|
+
The toolkit is published with `sideEffects: ["*.css"]`, so a modern bundler (Vite, Next.js / Webpack, esbuild, Bun) will tree-shake unused exports. A few practical rules to keep your bundle small:
|
|
449
|
+
|
|
450
|
+
1. **Prefer narrow subpaths over the root.** `import { useConsent } from '@tantainnovative/ndpr-toolkit/hooks'` is tighter than the same import from `.`. The root entry has more transitive exports and bundlers don't always trace them perfectly.
|
|
451
|
+
|
|
452
|
+
2. **Use the per-preset subpaths when you only need one preset.** `import { NDPRConsent } from '@tantainnovative/ndpr-toolkit/presets/consent'` is ~4 KB; the full `/presets` barrel is ~8 KB. Same for `/presets/dsr` and `/presets/policy`.
|
|
453
|
+
|
|
454
|
+
3. **The 3 manager components are intentionally heavy** (each is ~50 KB src — full table + filter + modal + wizard UIs):
|
|
455
|
+
- `LawfulBasisTracker` (from `/lawful-basis`)
|
|
456
|
+
- `ROPAManager` (from `/ropa`)
|
|
457
|
+
- `CrossBorderTransferManager` (from `/cross-border`)
|
|
458
|
+
|
|
459
|
+
If your app only needs the hook (e.g. you're rendering ROPA records inside your own admin UI), import from `/hooks` instead of the feature subpath — the hook chunk doesn't drag the manager component into your bundle.
|
|
460
|
+
|
|
461
|
+
4. **`/server` carries zero React.** For Server Actions, Route Handlers, scheduled jobs, or compliance-score computation in CI, prefer `/server` and you'll pay no React-tree cost.
|
|
462
|
+
|
|
433
463
|
---
|
|
434
464
|
|
|
435
465
|
## NDPA 2023 Overview
|
package/package.json
CHANGED