@broberg/legal 0.0.0-stage → 0.1.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.
package/README.md CHANGED
@@ -1,3 +1,26 @@
1
- # Temporary Holding Version
1
+ # @broberg/legal
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ **Status: 0.1.0 — every document is a DRAFT (`draft: true`, rendered as «UDKAST») until the owner's lawyer has reviewed it (F110.3).**
4
+
5
+ One set of legal documents for every broberg.ai product — `terms`, `privacy`, `trust`, `dpa`,
6
+ `support` — the same text everywhere, Danish as the master (Danish prevails), English beside it.
7
+ Sites **style and re-flow**; they never edit. Served as npm and at `legal.broberg.ai` (F110.5).
8
+
9
+ ```ts
10
+ import { createLibrary, renderHtml } from "@broberg/legal";
11
+ const doc = library.getDocument({ doc: "privacy", locale: "da", product: "jam" });
12
+ doc.version; doc.contentHash; doc.stale; doc.sections; // sections → blocks with stable ids
13
+ renderHtml(doc); // semantic HTML, data-legal-id on every section and block
14
+ ```
15
+
16
+ - **Content is data:** sections → blocks (`p`, `note`, `list`, `table`) with ids that are the
17
+ same in every locale. **Product facts** (hosting, data categories, sub-processors, whether
18
+ conversation analysis applies) come from one registry and are turned into text by fixed
19
+ per-locale templates — a site cannot word its own exception.
20
+ - **contentHash** = sha256 of the canonical JSON of the resolved document. An acceptance or a
21
+ signed contract records version + contentHash, so "which text?" has an exact answer.
22
+ - **stale:** a translation made from an older master is still returned but marked stale.
23
+ - **Placeholders** (`{customer.name}` …) are a fixed list; an unknown one is refused.
24
+ - Zero dependencies (a built-in SHA-256, proven against FIPS vectors and node:crypto).
25
+
26
+ Plan: `docs/features/F110-legal-documents.md`.