@sharadox/privacy-web-library 0.0.0-stage → 0.1.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/LICENCA.md ADDED
@@ -0,0 +1,76 @@
1
+ # Licença Sharadox de Código Aberto
2
+
3
+ Versão 0.1.0
4
+
5
+ O texto em língua portuguesa é o único texto original e vinculativo desta licença. A tradução para inglês (`LICENSE.md`) é meramente informativa; em caso de divergência prevalece o texto em português.
6
+
7
+ ## 1. Definições
8
+
9
+ Para efeitos desta licença:
10
+
11
+ 1. **«Obra»** — o programa de computador, a sua documentação e quaisquer outros conteúdos disponibilizados pelo Licenciante ao abrigo desta licença, em código-fonte ou em qualquer outra forma.
12
+ 2. **«Licenciante»** — o titular dos direitos de autor identificado no aviso de direitos de autor que acompanha a Obra.
13
+ 3. **«Licenciado»** — qualquer pessoa, singular ou coletiva, que exerça os direitos concedidos por esta licença.
14
+ 4. **«Obra Derivada»** — qualquer obra baseada na Obra ou que a incorpore, total ou parcialmente, com ou sem modificações, incluindo traduções, adaptações e programas que a integrem.
15
+ 5. **«Aviso»** — o aviso de direitos de autor do Licenciante e a indicação de que a Obra está licenciada ao abrigo desta licença, incluindo a respetiva versão.
16
+
17
+ ## 2. Concessão de direitos
18
+
19
+ 1. Nos termos desta licença, o Licenciante concede ao Licenciado uma licença mundial, gratuita, não exclusiva e por todo o prazo de proteção dos direitos de autor para:
20
+ 1. utilizar a Obra para qualquer finalidade, incluindo finalidades comerciais;
21
+ 2. reproduzir a Obra, total ou parcialmente, por qualquer meio e sob qualquer forma;
22
+ 3. modificar, traduzir, adaptar e transformar a Obra e criar Obras Derivadas;
23
+ 4. distribuir, publicar, comunicar ao público, colocar à disposição, vender e sublicenciar a Obra e as Obras Derivadas.
24
+ 2. Na medida em que o Licenciante seja titular de patentes necessariamente infringidas pela Obra tal como por si disponibilizada, concede igualmente ao Licenciado, nos mesmos termos, uma licença para utilizar essas patentes no exercício dos direitos previstos no número anterior.
25
+ 3. Esta licença não transmite a titularidade de quaisquer direitos, que permanecem do Licenciante.
26
+
27
+ ## 3. Condições
28
+
29
+ O exercício dos direitos concedidos fica sujeito às seguintes condições:
30
+
31
+ 1. Todas as cópias da Obra, ou de partes substanciais da mesma, e todas as Obras Derivadas distribuídas devem incluir o Aviso e uma cópia desta licença ou uma ligação estável para o seu texto.
32
+ 2. Quem distribuir uma versão modificada da Obra deve indicar de forma visível que a mesma foi modificada, não podendo apresentá-la como versão original do Licenciante.
33
+ 3. O Licenciado pode licenciar as suas próprias modificações ao abrigo de outros termos, desde que a parte da Obra que delas faça parte continue sujeita às condições desta licença.
34
+
35
+ ## 4. Nomes e marcas
36
+
37
+ Esta licença não concede qualquer direito sobre o nome, as marcas, os logótipos ou outros sinais distintivos do Licenciante, incluindo a designação «Sharadox», salvo na medida estritamente necessária para cumprir o dever de incluir o Aviso. É proibido utilizá-los para promover ou sugerir o apoio do Licenciante a Obras Derivadas ou a quaisquer produtos ou serviços sem autorização prévia e escrita.
38
+
39
+ ## 5. Exclusão de garantias
40
+
41
+ A Obra é disponibilizada «tal como está» e «conforme disponível», sem qualquer garantia, expressa ou tácita, incluindo, designadamente, garantias de comerciabilidade, de adequação a um fim específico, de ausência de erros ou de não violação de direitos de terceiros, na medida máxima permitida pela lei aplicável.
42
+
43
+ ## 6. Limitação de responsabilidade
44
+
45
+ 1. Na medida máxima permitida pela lei aplicável, o Licenciante não é responsável por quaisquer danos, diretos ou indiretos, incluindo lucros cessantes, perda de dados ou interrupção de atividade, resultantes da utilização ou da impossibilidade de utilização da Obra, ainda que tenha sido avisado da possibilidade da sua ocorrência.
46
+ 2. Nada nesta licença exclui ou limita a responsabilidade do Licenciante nos casos em que tal exclusão ou limitação não seja permitida por lei, designadamente por atos praticados com dolo ou culpa grave, nos termos do artigo 809.º e do n.º 2 do artigo 800.º do Código Civil, nem afeta os direitos que a lei imperativamente reconheça aos consumidores.
47
+
48
+ ## 7. Cessação
49
+
50
+ 1. Os direitos concedidos por esta licença cessam automaticamente se o Licenciado violar qualquer das suas condições.
51
+ 2. Os direitos são repostos se a violação for sanada no prazo de 30 dias a contar do momento em que o Licenciado dela tome conhecimento, salvo se o Licenciante tiver entretanto comunicado por escrito a sua oposição.
52
+ 3. A cessação não afeta as licenças validamente concedidas pelo Licenciado a terceiros que cumpram esta licença.
53
+
54
+ ## 8. Lei aplicável e foro
55
+
56
+ 1. Esta licença rege-se pela lei portuguesa, designadamente pelo Código do Direito de Autor e dos Direitos Conexos, aprovado pelo Decreto-Lei n.º 63/85, de 14 de março, e pelo Decreto-Lei n.º 252/94, de 20 de outubro, relativo à proteção jurídica dos programas de computador.
57
+ 2. Para a resolução de quaisquer litígios emergentes desta licença é competente o Tribunal Judicial da Comarca de Faro, sem prejuízo das normas imperativas de competência aplicáveis, nomeadamente as que protegem os consumidores.
58
+
59
+ ## 9. Versões da licença
60
+
61
+ O Licenciante pode publicar novas versões desta licença, identificadas por um número de versão. A Obra fica sujeita à versão indicada no Aviso. O Licenciado pode, se o Aviso o permitir, optar por qualquer versão posterior.
62
+
63
+ ## 10. Disposições finais
64
+
65
+ 1. Se alguma disposição desta licença for considerada inválida ou ineficaz, as restantes mantêm-se em vigor, devendo a disposição afetada ser interpretada de forma a aproximar-se, tanto quanto possível, da intenção original.
66
+ 2. A não exigência, em qualquer momento, do cumprimento de uma disposição desta licença não constitui renúncia ao direito de o exigir posteriormente.
67
+
68
+ ## Como aplicar esta licença
69
+
70
+ Inclua na Obra um ficheiro `LICENCA.md` com este texto, a tradução `LICENSE.md` e o seguinte aviso, preenchendo o ano e o titular:
71
+
72
+ ```
73
+ Direitos de autor © <ano> <titular>.
74
+ Licenciado ao abrigo da Licença Sharadox de Código Aberto, versão 0.1.0.
75
+ https://github.com/Sharadox/sharadox-open-source-license
76
+ ```
package/LICENSE.md ADDED
@@ -0,0 +1,76 @@
1
+ # Sharadox Open Source Licence
2
+
3
+ Version 0.1.0
4
+
5
+ This is an informative English translation. The Portuguese text (`LICENCA.md`) is the only original and binding text of this licence; if the two differ, the Portuguese text prevails.
6
+
7
+ ## 1. Definitions
8
+
9
+ For the purposes of this licence:
10
+
11
+ 1. **"Work"** — the computer program, its documentation and any other content made available by the Licensor under this licence, in source code or in any other form.
12
+ 2. **"Licensor"** — the copyright holder identified in the copyright notice that accompanies the Work.
13
+ 3. **"Licensee"** — any natural or legal person exercising the rights granted by this licence.
14
+ 4. **"Derivative Work"** — any work based on or incorporating the Work, in whole or in part, with or without modifications, including translations, adaptations and programs that integrate it.
15
+ 5. **"Notice"** — the Licensor's copyright notice and the statement that the Work is licensed under this licence, including its version.
16
+
17
+ ## 2. Grant of rights
18
+
19
+ 1. Under this licence, the Licensor grants the Licensee a worldwide, royalty-free, non-exclusive licence, for the whole term of copyright protection, to:
20
+ 1. use the Work for any purpose, including commercial purposes;
21
+ 2. reproduce the Work, in whole or in part, by any means and in any form;
22
+ 3. modify, translate, adapt and transform the Work and create Derivative Works;
23
+ 4. distribute, publish, communicate to the public, make available, sell and sublicense the Work and Derivative Works.
24
+ 2. To the extent the Licensor holds patents necessarily infringed by the Work as made available by it, the Licensor also grants the Licensee, on the same terms, a licence to use those patents in exercising the rights in the previous paragraph.
25
+ 3. This licence does not transfer ownership of any rights, which remain with the Licensor.
26
+
27
+ ## 3. Conditions
28
+
29
+ The exercise of the rights granted is subject to the following conditions:
30
+
31
+ 1. Every copy of the Work, or of substantial parts of it, and every distributed Derivative Work must include the Notice and a copy of this licence or a stable link to its text.
32
+ 2. Anyone distributing a modified version of the Work must state visibly that it has been modified and may not present it as the Licensor's original version.
33
+ 3. The Licensee may license their own modifications under other terms, provided the part of the Work included in them remains subject to the conditions of this licence.
34
+
35
+ ## 4. Names and trademarks
36
+
37
+ This licence grants no rights to the Licensor's name, trademarks, logos or other distinctive signs, including the name "Sharadox", except as strictly necessary to comply with the duty to include the Notice. Using them to promote or suggest the Licensor's endorsement of Derivative Works or of any products or services without prior written permission is prohibited.
38
+
39
+ ## 5. Disclaimer of warranties
40
+
41
+ The Work is provided "as is" and "as available", without any warranty, express or implied, including in particular warranties of merchantability, fitness for a particular purpose, absence of errors or non-infringement of third-party rights, to the maximum extent permitted by applicable law.
42
+
43
+ ## 6. Limitation of liability
44
+
45
+ 1. To the maximum extent permitted by applicable law, the Licensor is not liable for any damages, direct or indirect, including loss of profits, loss of data or business interruption, arising from the use of or inability to use the Work, even if advised of the possibility of such damages.
46
+ 2. Nothing in this licence excludes or limits the Licensor's liability where such exclusion or limitation is not permitted by law, in particular for acts committed with intent or gross negligence, under article 809 and article 800(2) of the Portuguese Civil Code, nor does it affect rights that the law mandatorily grants to consumers.
47
+
48
+ ## 7. Termination
49
+
50
+ 1. The rights granted by this licence terminate automatically if the Licensee breaches any of its conditions.
51
+ 2. The rights are reinstated if the breach is remedied within 30 days of the Licensee becoming aware of it, unless the Licensor has meanwhile objected in writing.
52
+ 3. Termination does not affect licences validly granted by the Licensee to third parties who comply with this licence.
53
+
54
+ ## 8. Governing law and jurisdiction
55
+
56
+ 1. This licence is governed by Portuguese law, in particular the Code of Copyright and Related Rights, approved by Decree-Law no. 63/85 of 14 March, and Decree-Law no. 252/94 of 20 October on the legal protection of computer programs.
57
+ 2. The Judicial Court of the District of Faro has jurisdiction over any dispute arising from this licence, without prejudice to applicable mandatory rules of jurisdiction, in particular those protecting consumers.
58
+
59
+ ## 9. Licence versions
60
+
61
+ The Licensor may publish new versions of this licence, identified by a version number. The Work is subject to the version stated in the Notice. If the Notice allows it, the Licensee may choose any later version.
62
+
63
+ ## 10. Final provisions
64
+
65
+ 1. If any provision of this licence is held invalid or unenforceable, the remaining provisions stay in force, and the affected provision shall be interpreted as closely as possible to its original intent.
66
+ 2. Failure to enforce any provision of this licence at any time does not waive the right to enforce it later.
67
+
68
+ ## How to apply this licence
69
+
70
+ Include in the Work a `LICENCA.md` file with the Portuguese text, this translation as `LICENSE.md`, and the following notice, filling in the year and holder:
71
+
72
+ ```
73
+ Direitos de autor © <ano> <titular>.
74
+ Licenciado ao abrigo da Licença Sharadox de Código Aberto, versão 0.1.0.
75
+ https://github.com/Sharadox/sharadox-open-source-license
76
+ ```
package/NOTICE.md ADDED
@@ -0,0 +1,3 @@
1
+ Direitos de autor © 2026 Micael Pires (Sharadox).
2
+ Licenciado ao abrigo da Licença Sharadox de Código Aberto, versão 0.1.0.
3
+ https://github.com/Sharadox/sharadox-open-source-license
package/README.md CHANGED
@@ -1,3 +1,66 @@
1
- # Temporary Holding Version
1
+ # @sharadox/privacy-web-library
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
+ GDPR (RGPD) privacy policies for websites, in English and Portuguese. Each policy is written from what the site really collects, so it says exactly that and nothing more.
4
+
5
+ It covers:
6
+
7
+ - who is responsible for the data (name, NIPC, address, contacts)
8
+ - what is collected and why, with the legal basis: the contact form, the host's technical records, what is remembered on the device, and Google Maps when allowed
9
+ - who receives the data, and where, including transfers outside the European Union
10
+ - how long it is kept
11
+ - the visitor's rights, how to use them, and where to complain (Portugal's CNPD by default)
12
+
13
+ ## Install
14
+
15
+ ```sh
16
+ pnpm add @sharadox/privacy-web-library
17
+ ```
18
+
19
+ ## Use
20
+
21
+ ```tsx
22
+ import { privacyPolicy } from "@sharadox/privacy-web-library/privacy-policy";
23
+ import { PrivacyPolicyView } from "@sharadox/privacy-web-library/privacy-policy-view";
24
+
25
+ const policy = privacyPolicy(
26
+ {
27
+ controller: { name: "Example", legalName: "Example, Lda.", taxNumber: "PT500000000", address: "Rua A 1, 8000-000 Faro", email: "hi@example.com", website: "https://example.com" },
28
+ updated: "2026-11-12",
29
+ contactForm: { fields: [{ en: "name", pt: "nome" }, { en: "email", pt: "email" }] },
30
+ remembered: [{ en: "your language", pt: "o seu idioma" }],
31
+ recipients: [{ name: "Vercel", purpose: { en: "hosts the site", pt: "aloja o site" }, location: { en: "United States", pt: "Estados Unidos" } }],
32
+ },
33
+ "pt",
34
+ );
35
+
36
+ <h1>{policy.title}</h1>
37
+ <PrivacyPolicyView policy={policy} className={styles.policy} />
38
+ ```
39
+
40
+ ## API
41
+
42
+ | Import | Export |
43
+ | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
44
+ | `…/privacy-policy` | `privacyPolicy(options, locale)` → `{ title, updated, sections: [{ title, paragraphs, items? }] }`; types in `…/privacy-policy/type` |
45
+ | `…/privacy-policy-view` | `<PrivacyPolicyView policy className? />`: the date, then each part as `section > h2, p, ul`, unstyled |
46
+
47
+ **Options:**
48
+
49
+ - **`controller`:** `name`, `legalName?`, `taxNumber?`, `address`, `email?`, `phone?` (at least one of the two), `website`.
50
+ - **`updated`:** the date the policy last changed.
51
+ - **`contactForm?`:** `{ fields, retentionMonths? = 24 }`.
52
+ - **`remembered?`:** what the site keeps on the device.
53
+ - **`consentRecord?`:** true when a cookie panel records choices.
54
+ - **`maps?`:** true when Google Maps loads with consent.
55
+ - **`recipients`:** `[{ name, purpose, location }]`.
56
+ - **`authority?`:** where to complain; the CNPD by default.
57
+
58
+ The wording is a careful default, not legal advice. Have a lawyer review it for each business.
59
+
60
+ ## Develop
61
+
62
+ `pnpm verify` runs formatting, lint, type-check, tests with 100% coverage and the build. Branches follow `<feature>.development` → `development` → `index`, and releases are `v<version>` tags on `index`.
63
+
64
+ ## License
65
+
66
+ Licença Sharadox de Código Aberto, versão 0.1.0. See [português](LICENCA.md) (the binding text) and the [English translation](LICENSE.md).
@@ -0,0 +1,11 @@
1
+ import type { PrivacyLocale, PrivacyOptions, PrivacyPolicy } from "@sharadox/privacy-web-library/privacy-policy/type";
2
+ /**
3
+ * A GDPR (RGPD) privacy policy in English or Portuguese, written from what the site really collects: who is
4
+ * responsible, what is collected and why (with the legal basis), who receives it and where, how long it is kept, the
5
+ * visitor's rights and where to complain (Portugal's CNPD by default). Render it with `PrivacyPolicyView`.
6
+ *
7
+ * @example
8
+ * const policy = privacyPolicy({ controller, updated: "2026-11-12", recipients: [vercel] }, "pt");
9
+ */
10
+ export declare function privacyPolicy(options: PrivacyOptions, locale: PrivacyLocale): PrivacyPolicy;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/privacy-policy/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,aAAa,EACb,cAAc,EACd,aAAa,EAEd,MAAM,mDAAmD,CAAC;AAW3D;;;;;;;GAOG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,MAAM,EAAE,aAAa,GAAG,aAAa,CAgJ3F"}
@@ -0,0 +1,148 @@
1
+ const CNPD = { name: "Comissão Nacional de Proteção de Dados (CNPD)", url: "https://www.cnpd.pt" };
2
+ const LANGUAGE_TAGS = { en: "en-US", pt: "pt-PT" };
3
+ /** Joins a list as people write it: "a, b and c" / "a, b e c". */
4
+ const list = (items, locale) => items.length < 2
5
+ ? items.join("")
6
+ : `${items.slice(0, -1).join(", ")} ${locale === "en" ? "and" : "e"} ${items.at(-1)}`;
7
+ /**
8
+ * A GDPR (RGPD) privacy policy in English or Portuguese, written from what the site really collects: who is
9
+ * responsible, what is collected and why (with the legal basis), who receives it and where, how long it is kept, the
10
+ * visitor's rights and where to complain (Portugal's CNPD by default). Render it with `PrivacyPolicyView`.
11
+ *
12
+ * @example
13
+ * const policy = privacyPolicy({ controller, updated: "2026-11-12", recipients: [vercel] }, "pt");
14
+ */
15
+ export function privacyPolicy(options, locale) {
16
+ const { controller, contactForm, remembered = [], consentRecord, maps, recipients } = options;
17
+ const authority = options.authority ?? CNPD;
18
+ const say = (words) => words[locale];
19
+ const en = locale === "en";
20
+ const legalName = controller.legalName ?? controller.name;
21
+ const months = contactForm?.retentionMonths ?? 24;
22
+ const date = new Date(`${options.updated}T12:00:00Z`).toLocaleDateString(LANGUAGE_TAGS[locale], {
23
+ day: "numeric",
24
+ month: "long",
25
+ year: "numeric",
26
+ timeZone: "UTC",
27
+ });
28
+ const reach = [controller.email, controller.phone].filter(Boolean);
29
+ const collected = [];
30
+ if (contactForm) {
31
+ const fields = list(contactForm.fields.map(say), locale);
32
+ collected.push(en
33
+ ? `When you send us a message through the form, we receive what you write in it (${fields}) and the address of your internet connection (IP address), which we use only to stop abuse. We use your message to answer you and arrange what you ask for. The legal basis is taking steps at your request before a contract (Article 6(1)(b) GDPR).`
34
+ : `Quando nos envia uma mensagem pelo formulário, recebemos o que escreve (${fields}) e o endereço da sua ligação à internet (endereço IP), que usamos apenas para impedir abusos. Usamos a sua mensagem para lhe responder e tratar do que nos pede. O fundamento é a realização de diligências pré-contratuais a seu pedido (artigo 6.º, n.º 1, alínea b) do RGPD).`);
35
+ }
36
+ collected.push(en
37
+ ? "When you visit, the company that hosts the site records technical data (IP address, browser, pages requested and the time) to keep it secure and working. The legal basis is our legitimate interest in a safe, working site (Article 6(1)(f) GDPR); these records are kept for a short time."
38
+ : "Quando nos visita, a empresa que aloja o site regista dados técnicos (endereço IP, navegador, páginas pedidas e a hora) para o manter seguro e a funcionar. O fundamento é o nosso interesse legítimo num site seguro e funcional (artigo 6.º, n.º 1, alínea f) do RGPD); estes registos são guardados por pouco tempo.");
39
+ const kept = [
40
+ ...remembered.map(say),
41
+ ...(consentRecord ? [en ? "your cookie choices" : "as suas escolhas de cookies"] : []),
42
+ ];
43
+ if (kept.length) {
44
+ collected.push(en
45
+ ? `The site keeps ${list(kept, locale)} on your device, so it remembers them next time. This is strictly necessary to give you what you asked for and needs no consent (Lei 41/2004, Article 5).`
46
+ : `O site guarda ${list(kept, locale)} no seu dispositivo, para os lembrar da próxima vez. Isto é estritamente necessário para lhe dar o que pediu e não precisa de consentimento (Lei 41/2004, artigo 5.º).`);
47
+ }
48
+ if (maps) {
49
+ collected.push(en
50
+ ? "Only if you allow map cookies, the page shows Google Maps: Google then receives your IP address and may set its own cookies. The legal basis is your consent (Article 6(1)(a) GDPR), which you can withdraw at any time in Cookie Preferences."
51
+ : "Só se permitir os cookies de mapas, a página mostra o Google Maps: a Google recebe então o seu endereço IP e pode usar os seus próprios cookies. O fundamento é o seu consentimento (artigo 6.º, n.º 1, alínea a) do RGPD), que pode retirar a qualquer momento nas Preferências de Cookies.");
52
+ }
53
+ collected.push(en
54
+ ? "We do not use analytics or advertising trackers, and we never sell your data."
55
+ : "Não usamos ferramentas de análise nem de publicidade, e nunca vendemos os seus dados.");
56
+ const sections = [
57
+ {
58
+ title: en ? "Who we are" : "Quem somos",
59
+ paragraphs: [
60
+ en
61
+ ? `${legalName}${controller.taxNumber ? ` (NIPC ${controller.taxNumber})` : ""}, ${controller.address}, is responsible for the personal data handled through ${controller.website}. You can reach us at ${list(reach, locale)}.`
62
+ : `${legalName}${controller.taxNumber ? ` (NIPC ${controller.taxNumber})` : ""}, ${controller.address}, é responsável pelos dados pessoais tratados através de ${controller.website}. Pode contactar-nos por ${list(reach, locale)}.`,
63
+ ],
64
+ },
65
+ { title: en ? "What we collect, and why" : "O que recolhemos, e porquê", paragraphs: collected },
66
+ {
67
+ title: en ? "Who receives it" : "Quem os recebe",
68
+ paragraphs: [
69
+ en
70
+ ? "Only the companies that run the services the site needs, bound by contract to use the data solely for that:"
71
+ : "Apenas as empresas que prestam os serviços de que o site precisa, obrigadas por contrato a usar os dados só para isso:",
72
+ ],
73
+ items: recipients.map((recipient) => `${recipient.name}: ${say(recipient.purpose)} (${say(recipient.location)})`),
74
+ },
75
+ {
76
+ title: en ? "Transfers outside the European Union" : "Transferências para fora da União Europeia",
77
+ paragraphs: [
78
+ en
79
+ ? "Some of these companies are based in, or use servers in, the United States. Those transfers rely on the EU–US Data Privacy Framework or on the European Commission's standard contractual clauses."
80
+ : "Algumas destas empresas estão sediadas, ou usam servidores, nos Estados Unidos. Essas transferências baseiam-se no Quadro de Privacidade de Dados UE-EUA ou nas cláusulas contratuais-tipo da Comissão Europeia.",
81
+ ],
82
+ },
83
+ {
84
+ title: en ? "How long we keep it" : "Durante quanto tempo os guardamos",
85
+ paragraphs: [
86
+ ...(contactForm
87
+ ? [
88
+ en
89
+ ? `Messages are kept for ${months} months after our last contact, unless they become part of a contract or the law asks us to keep them longer.`
90
+ : `As mensagens são guardadas durante ${months} meses após o nosso último contacto, salvo se fizerem parte de um contrato ou a lei exigir que as guardemos mais tempo.`,
91
+ ]
92
+ : []),
93
+ en
94
+ ? "What the site keeps on your device stays until you clear it in your browser."
95
+ : "O que o site guarda no seu dispositivo fica até o apagar no seu navegador.",
96
+ ],
97
+ },
98
+ {
99
+ title: en ? "Your rights" : "Os seus direitos",
100
+ paragraphs: [
101
+ en
102
+ ? `You may ask us, at any time and free of charge, to:`
103
+ : `Pode pedir-nos, a qualquer momento e sem custos, para:`,
104
+ ],
105
+ items: en
106
+ ? [
107
+ "see the data we hold about you, and get a copy",
108
+ "correct it",
109
+ "delete it",
110
+ "limit how we use it",
111
+ "receive it in a common format, or have it sent to someone else",
112
+ "object to how we use it",
113
+ "withdraw any consent you gave, without affecting what was done before",
114
+ ]
115
+ : [
116
+ "ver os dados que temos sobre si, e receber uma cópia",
117
+ "corrigi-los",
118
+ "apagá-los",
119
+ "limitar o modo como os usamos",
120
+ "recebê-los num formato comum, ou enviá-los a outra entidade",
121
+ "opor-se ao modo como os usamos",
122
+ "retirar um consentimento que tenha dado, sem afetar o que foi feito antes",
123
+ ],
124
+ },
125
+ {
126
+ title: en ? "How to ask, or complain" : "Como pedir, ou reclamar",
127
+ paragraphs: [
128
+ en
129
+ ? `${controller.email ? `Write to ${controller.email}` : `Call us on ${controller.phone}`}; we answer within one month. If you think we have not handled your data properly, you may complain to the ${authority.name} (${authority.url}).`
130
+ : `${controller.email ? `Escreva para ${controller.email}` : `Ligue-nos para ${controller.phone}`}; respondemos no prazo de um mês. Se considerar que não tratámos bem os seus dados, pode apresentar reclamação à ${authority.name} (${authority.url}).`,
131
+ ],
132
+ },
133
+ {
134
+ title: en ? "Changes" : "Alterações",
135
+ paragraphs: [
136
+ en
137
+ ? "If anything here changes, we update this page; the date at the top shows the current version."
138
+ : "Se algo aqui mudar, atualizamos esta página; a data no topo indica a versão em vigor.",
139
+ ],
140
+ },
141
+ ];
142
+ return {
143
+ title: en ? "Privacy Policy" : "Política de Privacidade",
144
+ updated: en ? `Last updated: ${date}` : `Última atualização: ${date}`,
145
+ sections,
146
+ };
147
+ }
148
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/privacy-policy/index.ts"],"names":[],"mappings":"AAQA,MAAM,IAAI,GAAG,EAAE,IAAI,EAAE,+CAA+C,EAAE,GAAG,EAAE,qBAAqB,EAAE,CAAC;AACnG,MAAM,aAAa,GAAkC,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC;AAElF,kEAAkE;AAClE,MAAM,IAAI,GAAG,CAAC,KAAwB,EAAE,MAAqB,EAAE,EAAE,CAC/D,KAAK,CAAC,MAAM,GAAG,CAAC;IACd,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;IAChB,CAAC,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,MAAM,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AAE1F;;;;;;;GAOG;AACH,MAAM,UAAU,aAAa,CAAC,OAAuB,EAAE,MAAqB;IAC1E,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,UAAU,GAAG,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC;IAC9F,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,IAAI,CAAC;IAC5C,MAAM,GAAG,GAAG,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC5C,MAAM,EAAE,GAAG,MAAM,KAAK,IAAI,CAAC;IAC3B,MAAM,SAAS,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,CAAC,CAAC,yBAAyB,CAAC,CAAC,CAAC,yBAAyB;YACjE,UAAU,EAAE;gBACV,EAAE;oBACA,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,cAAc,UAAU,CAAC,KAAK,EAAE,8GAA8G,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,GAAG,IAAI;oBAC3O,CAAC,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,gBAAgB,UAAU,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,kBAAkB,UAAU,CAAC,KAAK,EAAE,oHAAoH,SAAS,CAAC,IAAI,KAAK,SAAS,CAAC,GAAG,IAAI;aAC5P;SACF;QACD;YACE,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY;YACpC,UAAU,EAAE;gBACV,EAAE;oBACA,CAAC,CAAC,+FAA+F;oBACjG,CAAC,CAAC,uFAAuF;aAC5F;SACF;KACF,CAAC;IACF,OAAO;QACL,KAAK,EAAE,EAAE,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,yBAAyB;QACxD,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,CAAC,uBAAuB,IAAI,EAAE;QACrE,QAAQ;KACT,CAAC;AACJ,CAAC"}
@@ -0,0 +1,66 @@
1
+ /** The languages the policy is written in. */
2
+ export type PrivacyLocale = "en" | "pt";
3
+ /** A text in every language the policy is written in. */
4
+ export type Words = Readonly<Record<PrivacyLocale, string>>;
5
+ /** Who is responsible for the data (the controller). */
6
+ export interface Controller {
7
+ /** The name people know, for example "Luis Pires Decor". */
8
+ name: string;
9
+ /** The registered name, for example "Luis Pires Decor, Unipessoal, Lda."; `name` when left out. */
10
+ legalName?: string;
11
+ /** The company's tax number (NIPC), for example "PT513385207". */
12
+ taxNumber?: string;
13
+ /** The postal address, on one line. */
14
+ address: string;
15
+ /** Where rights requests go; at least one of `email` and `phone`. */
16
+ email?: string;
17
+ phone?: string;
18
+ /** The site's address, for example "https://luispiresdecor.com". */
19
+ website: string;
20
+ }
21
+ /** A company that handles data on the controller's behalf (a processor) or receives it. */
22
+ export interface Recipient {
23
+ name: string;
24
+ /** What it does with the data: "hosts the website". */
25
+ purpose: Words;
26
+ /** Where: "European Union", "United States". */
27
+ location: Words;
28
+ }
29
+ /** What the site really collects, so the policy says exactly that and no more. */
30
+ export interface PrivacyOptions {
31
+ controller: Controller;
32
+ /** When the policy last changed: "2026-11-12". */
33
+ updated: string;
34
+ /** A contact or booking form: the fields it asks for, and how long messages are kept (24 months by default). */
35
+ contactForm?: {
36
+ fields: readonly Words[];
37
+ retentionMonths?: number;
38
+ };
39
+ /** What the site remembers on the visitor's device: "your language", "the style you chose". */
40
+ remembered?: readonly Words[];
41
+ /** True when a cookie panel records the visitor's choices. */
42
+ consentRecord?: boolean;
43
+ /** True when the site shows Google Maps once the visitor allows it. */
44
+ maps?: boolean;
45
+ /** Everyone who handles the data for the controller. */
46
+ recipients: readonly Recipient[];
47
+ /** Where to complain; Portugal's CNPD by default. */
48
+ authority?: {
49
+ name: string;
50
+ url: string;
51
+ };
52
+ }
53
+ /** One part of the policy: a heading, its paragraphs and an optional list. */
54
+ export interface PolicySection {
55
+ title: string;
56
+ paragraphs: readonly string[];
57
+ items?: readonly string[];
58
+ }
59
+ /** The policy in one language, ready to show. */
60
+ export interface PrivacyPolicy {
61
+ title: string;
62
+ /** "Last updated: November 12, 2026". */
63
+ updated: string;
64
+ sections: readonly PolicySection[];
65
+ }
66
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/privacy-policy/type.ts"],"names":[],"mappings":"AAAA,8CAA8C;AAC9C,MAAM,MAAM,aAAa,GAAG,IAAI,GAAG,IAAI,CAAC;AAExC,yDAAyD;AAC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AAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,KAAK,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC3B;AAED,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAC;CACpC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/privacy-policy/type.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ import type { PrivacyPolicyViewProperties } from "@sharadox/privacy-web-library/privacy-policy-view/type";
2
+ /**
3
+ * A privacy policy as plain, semantic HTML: the date it was updated, then a heading, paragraphs and a list for each
4
+ * part. The page supplies the main heading (`policy.title`); the site styles everything through `className`.
5
+ *
6
+ * @example
7
+ * <h1>{policy.title}</h1>
8
+ * <PrivacyPolicyView policy={policy} className={styles.policy} />
9
+ */
10
+ export declare function PrivacyPolicyView({ policy, className }: PrivacyPolicyViewProperties): import("react").JSX.Element;
11
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../source/privacy-policy-view/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wDAAwD,CAAC;AAE1G;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,2BAA2B,+BAuBnF"}
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * A privacy policy as plain, semantic HTML: the date it was updated, then a heading, paragraphs and a list for each
4
+ * part. The page supplies the main heading (`policy.title`); the site styles everything through `className`.
5
+ *
6
+ * @example
7
+ * <h1>{policy.title}</h1>
8
+ * <PrivacyPolicyView policy={policy} className={styles.policy} />
9
+ */
10
+ export function PrivacyPolicyView({ policy, className }) {
11
+ return (_jsxs("div", { className: className, children: [_jsx("p", { children: _jsx("small", { children: policy.updated }) }), policy.sections.map((section) => (_jsxs("section", { children: [_jsx("h2", { children: section.title }), section.paragraphs.map((paragraph) => (_jsx("p", { children: paragraph }, paragraph))), section.items && (_jsx("ul", { children: section.items.map((item) => (_jsx("li", { children: item }, item))) }))] }, section.title)))] }));
12
+ }
13
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../source/privacy-policy-view/index.tsx"],"names":[],"mappings":";AAEA;;;;;;;GAOG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAE,MAAM,EAAE,SAAS,EAA+B;IAClF,OAAO,CACL,eAAK,SAAS,EAAE,SAAS,aACvB,sBACE,0BAAQ,MAAM,CAAC,OAAO,GAAS,GAC7B,EACH,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAChC,8BACE,uBAAK,OAAO,CAAC,KAAK,GAAM,EACvB,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CACrC,sBAAoB,SAAS,IAArB,SAAS,CAAiB,CACnC,CAAC,EACD,OAAO,CAAC,KAAK,IAAI,CAChB,uBACG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAC3B,uBAAgB,IAAI,IAAX,IAAI,CAAa,CAC3B,CAAC,GACC,CACN,KAXW,OAAO,CAAC,KAAK,CAYjB,CACX,CAAC,IACE,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ import type { PrivacyPolicy } from "@sharadox/privacy-web-library/privacy-policy/type";
2
+ export interface PrivacyPolicyViewProperties {
3
+ policy: PrivacyPolicy;
4
+ /** The site styles the policy through this class (its `h2`, `p`, `ul` and `time`). */
5
+ className?: string;
6
+ }
7
+ //# sourceMappingURL=type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../source/privacy-policy-view/type.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mDAAmD,CAAC;AAEvF,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,aAAa,CAAC;IACtB,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"type.js","sourceRoot":"","sources":["../../source/privacy-policy-view/type.ts"],"names":[],"mappings":""}
package/llms.txt ADDED
@@ -0,0 +1,9 @@
1
+ # @sharadox/privacy-web-library
2
+
3
+ > GDPR (RGPD) privacy policies in English and Portuguese, written from what a site really collects.
4
+
5
+ - /privacy-policy privacyPolicy(options, "en" | "pt") → { title, updated ("Last updated: November 12, 2026"), sections [{ title, paragraphs, items? }] }
6
+ - options: controller { name, legalName?, taxNumber?, address, email?, phone? (at least one), website }, updated "YYYY-MM-DD", contactForm? { fields: Words[], retentionMonths? = 24 }, remembered?: Words[], consentRecord?, maps?, recipients [{ name, purpose: Words, location: Words }], authority? (CNPD by default); Words = { en, pt }
7
+ - Sections: who we are; what we collect and why (form: Art. 6(1)(b); host records: 6(1)(f); device storage: Lei 41/2004 art. 5; Google Maps: consent 6(1)(a)); who receives it; transfers outside the EU (DPF or SCCs); retention; rights (7); how to ask or complain; changes
8
+ - /privacy-policy-view <PrivacyPolicyView policy className? /> → div > p small (date) + section > h2, p, ul; unstyled
9
+ - License: Sharadox Open Source License 0.1.0
package/package.json CHANGED
@@ -1,6 +1,99 @@
1
1
  {
2
2
  "name": "@sharadox/privacy-web-library",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "0.1.1",
4
+ "description": "GDPR privacy policies for websites, in English and Portuguese, written from what each site really collects.",
5
+ "private": false,
6
+ "license": "SEE LICENSE IN LICENCA.md",
7
+ "author": "Sharadox <contact@sharadox.com>",
8
+ "type": "module",
9
+ "exports": {
10
+ "./*/type": {
11
+ "sharadox-source": "./source/*/type.ts",
12
+ "types": "./distribution/*/type.d.ts"
13
+ },
14
+ "./*": {
15
+ "sharadox-source": [
16
+ "./source/*/index.ts",
17
+ "./source/*/index.tsx"
18
+ ],
19
+ "types": "./distribution/*/index.d.ts",
20
+ "default": "./distribution/*/index.js"
21
+ }
22
+ },
23
+ "files": [
24
+ "distribution",
25
+ "LICENCA.md",
26
+ "LICENSE.md",
27
+ "NOTICE.md",
28
+ "llms.txt"
29
+ ],
30
+ "sideEffects": [
31
+ "**/*.css"
32
+ ],
33
+ "engines": {
34
+ "node": ">=26"
35
+ },
36
+ "publishConfig": {
37
+ "access": "public"
38
+ },
39
+ "peerDependencies": {
40
+ "react": ">=19"
41
+ },
42
+ "peerDependenciesMeta": {
43
+ "react": {
44
+ "optional": true
45
+ }
46
+ },
47
+ "lint-staged": {
48
+ "*.{ts,tsx,js,mjs,cjs}": [
49
+ "prettier --write",
50
+ "eslint --fix --max-warnings=0"
51
+ ],
52
+ "*.{json,md,yml,yaml,scss}": "prettier --write"
53
+ },
54
+ "dependencies": {
55
+ "@sharadox/web-library": "^0.7.0"
56
+ },
57
+ "devDependencies": {
58
+ "@sharadox/es-lint-configuration-web-library": "^0.1.1",
59
+ "@sharadox/library-build-web-library": "^0.1.1",
60
+ "@sharadox/prettier-configuration-web-library": "^0.1.0",
61
+ "@sharadox/turborepo-configuration-web-library": "^0.1.0",
62
+ "@sharadox/type-script-configuration-web-library": "^0.2.0",
63
+ "@sharadox/vitest-configuration-web-library": "^0.1.3",
64
+ "@testing-library/dom": "^10.4.2",
65
+ "@testing-library/react": "^16.3.3",
66
+ "@types/node": "^24.19.2",
67
+ "@types/react": "^19.3.0",
68
+ "@types/react-dom": "^19.3.0",
69
+ "@vitest/coverage-v8": "^5.1.0",
70
+ "eslint": "9.39.5",
71
+ "happy-dom": "^21.0.4",
72
+ "husky": "^9.1.7",
73
+ "lint-staged": "^17.6.0",
74
+ "prettier": "^3.10.0",
75
+ "react": "^19.3.1",
76
+ "react-dom": "^19.3.1",
77
+ "sass": "^1.108.2",
78
+ "turbo": "^2.11.10",
79
+ "typedoc": "^0.28.20",
80
+ "typescript": "6.0.3",
81
+ "vitest": "^5.1.0"
82
+ },
83
+ "repository": {
84
+ "type": "git",
85
+ "url": "git+https://github.com/Sharadox/privacy-web-library.git"
86
+ },
87
+ "homepage": "https://github.com/Sharadox/privacy-web-library#readme",
88
+ "scripts": {
89
+ "build": "library-build",
90
+ "lint": "eslint --max-warnings=0 .",
91
+ "format": "prettier --write .",
92
+ "format:check": "prettier --check .",
93
+ "type-check": "tsc --noEmit",
94
+ "test:unit": "vitest run --coverage",
95
+ "test:benchmark": "vitest bench --run --passWithNoTests",
96
+ "documentation": "typedoc",
97
+ "verify": "turbo run format:check lint type-check test:unit test:benchmark build"
98
+ }
6
99
  }