astro-consent 1.0.15 โ 1.0.17
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 +13 -0
- package/dist/index.js +11 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,6 +31,7 @@ Just a **fast, deterministic, developer-controlled consent layer** that respects
|
|
|
31
31
|
- ๐จ Fully themeable via CSS variables
|
|
32
32
|
- ๐ง Frontend-controlled script loading
|
|
33
33
|
- ๐งฉ Native Astro integration
|
|
34
|
+
- ๐งพ Built-in TypeScript declarations
|
|
34
35
|
- ๐ ๏ธ CLI installer & remover
|
|
35
36
|
- ๐ Clean uninstall with no residue
|
|
36
37
|
- ๐ Framework-agnostic frontend API
|
|
@@ -139,6 +140,12 @@ window.cookieConsent.set({ essential: true, analytics: true });
|
|
|
139
140
|
window.cookieConsent.reset();
|
|
140
141
|
```
|
|
141
142
|
|
|
143
|
+
## ๐งพ TypeScript
|
|
144
|
+
|
|
145
|
+
TypeScript declarations are included in the package.
|
|
146
|
+
|
|
147
|
+
No separate `@types` install is required.
|
|
148
|
+
|
|
142
149
|
---
|
|
143
150
|
|
|
144
151
|
## ๐จ Theming
|
|
@@ -176,6 +183,12 @@ This guarantees the banner styles are available on every page.
|
|
|
176
183
|
|
|
177
184
|
---
|
|
178
185
|
|
|
186
|
+
## ๐ Acknowledgements
|
|
187
|
+
|
|
188
|
+
Thanks to [@magicspon](https://github.com/magicspon) for assisting with the PR and issue triage.
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
179
192
|
## ๐ License
|
|
180
193
|
|
|
181
194
|
MIT ยฉ Velohost
|
package/dist/index.js
CHANGED
|
@@ -17,7 +17,17 @@ export default function astroConsent(options = {}) {
|
|
|
17
17
|
/* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
18
18
|
LOAD USER CSS (required)
|
|
19
19
|
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */
|
|
20
|
-
injectScript("head-inline",
|
|
20
|
+
injectScript("head-inline", `
|
|
21
|
+
(() => {
|
|
22
|
+
const id = "astro-consent-css";
|
|
23
|
+
if (document.getElementById(id)) return;
|
|
24
|
+
const link = document.createElement("link");
|
|
25
|
+
link.id = id;
|
|
26
|
+
link.rel = "stylesheet";
|
|
27
|
+
link.href = "/src/cookiebanner.css";
|
|
28
|
+
document.head.appendChild(link);
|
|
29
|
+
})();
|
|
30
|
+
`);
|
|
21
31
|
/* โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
22
32
|
Consent runtime (NO CSS)
|
|
23
33
|
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "astro-consent",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.17",
|
|
4
4
|
"description": "A privacy-first, GDPR-compliant cookie consent banner for Astro with a built-in preferences modal, zero dependencies, and full theme control.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"author": {
|