cookiecraft 1.0.2 → 1.0.3

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/dist/stats.html CHANGED
@@ -4929,7 +4929,7 @@ var drawChart = (function (exports) {
4929
4929
  </script>
4930
4930
  <script>
4931
4931
  /*<!--*/
4932
- const data = {"version":2,"tree":{"name":"root","children":[{"name":"cookiecraft.js","children":[{"name":"src","children":[{"name":"core","children":[{"uid":"4fd2b0d2-1","name":"StorageManager.ts"},{"uid":"4fd2b0d2-3","name":"ConsentManager.ts"},{"uid":"4fd2b0d2-5","name":"EventEmitter.ts"},{"uid":"4fd2b0d2-27","name":"CookieConsent.ts"}]},{"name":"blocking","children":[{"uid":"4fd2b0d2-7","name":"ScriptBlocker.ts"},{"uid":"4fd2b0d2-9","name":"CategoryManager.ts"}]},{"name":"utils","children":[{"uid":"4fd2b0d2-11","name":"sanitize.ts"},{"uid":"4fd2b0d2-13","name":"color.ts"},{"uid":"4fd2b0d2-25","name":"cookies.ts"}]},{"name":"ui","children":[{"uid":"4fd2b0d2-15","name":"Banner.ts"},{"uid":"4fd2b0d2-17","name":"PreferenceCenter.ts"},{"uid":"4fd2b0d2-19","name":"FloatingWidget.ts"}]},{"name":"integrations","children":[{"uid":"4fd2b0d2-21","name":"GTMConsentMode.ts"},{"uid":"4fd2b0d2-23","name":"DataLayerManager.ts"}]},{"uid":"4fd2b0d2-29","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"4fd2b0d2-1":{"renderedLength":3329,"gzipLength":856,"brotliLength":750,"metaUid":"4fd2b0d2-0"},"4fd2b0d2-3":{"renderedLength":2139,"gzipLength":651,"brotliLength":532,"metaUid":"4fd2b0d2-2"},"4fd2b0d2-5":{"renderedLength":1409,"gzipLength":401,"brotliLength":356,"metaUid":"4fd2b0d2-4"},"4fd2b0d2-7":{"renderedLength":6794,"gzipLength":1782,"brotliLength":1519,"metaUid":"4fd2b0d2-6"},"4fd2b0d2-9":{"renderedLength":2378,"gzipLength":716,"brotliLength":597,"metaUid":"4fd2b0d2-8"},"4fd2b0d2-11":{"renderedLength":1508,"gzipLength":559,"brotliLength":480,"metaUid":"4fd2b0d2-10"},"4fd2b0d2-13":{"renderedLength":1077,"gzipLength":462,"brotliLength":375,"metaUid":"4fd2b0d2-12"},"4fd2b0d2-15":{"renderedLength":7912,"gzipLength":1957,"brotliLength":1628,"metaUid":"4fd2b0d2-14"},"4fd2b0d2-17":{"renderedLength":9809,"gzipLength":2473,"brotliLength":2085,"metaUid":"4fd2b0d2-16"},"4fd2b0d2-19":{"renderedLength":5702,"gzipLength":2020,"brotliLength":1656,"metaUid":"4fd2b0d2-18"},"4fd2b0d2-21":{"renderedLength":2939,"gzipLength":860,"brotliLength":719,"metaUid":"4fd2b0d2-20"},"4fd2b0d2-23":{"renderedLength":1237,"gzipLength":483,"brotliLength":391,"metaUid":"4fd2b0d2-22"},"4fd2b0d2-25":{"renderedLength":3548,"gzipLength":1157,"brotliLength":954,"metaUid":"4fd2b0d2-24"},"4fd2b0d2-27":{"renderedLength":8348,"gzipLength":1892,"brotliLength":1591,"metaUid":"4fd2b0d2-26"},"4fd2b0d2-29":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"4fd2b0d2-28"}},"nodeMetas":{"4fd2b0d2-0":{"id":"/src/core/StorageManager.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-1"},"imported":[],"importedBy":[{"uid":"4fd2b0d2-26"},{"uid":"4fd2b0d2-2"}]},"4fd2b0d2-2":{"id":"/src/core/ConsentManager.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-3"},"imported":[{"uid":"4fd2b0d2-0"}],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-4":{"id":"/src/core/EventEmitter.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-5"},"imported":[],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-6":{"id":"/src/blocking/ScriptBlocker.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-7"},"imported":[],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-8":{"id":"/src/blocking/CategoryManager.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-9"},"imported":[],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-10":{"id":"/src/utils/sanitize.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-11"},"imported":[],"importedBy":[{"uid":"4fd2b0d2-14"},{"uid":"4fd2b0d2-16"},{"uid":"4fd2b0d2-18"}]},"4fd2b0d2-12":{"id":"/src/utils/color.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-13"},"imported":[],"importedBy":[{"uid":"4fd2b0d2-14"},{"uid":"4fd2b0d2-16"},{"uid":"4fd2b0d2-18"}]},"4fd2b0d2-14":{"id":"/src/ui/Banner.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-15"},"imported":[{"uid":"4fd2b0d2-10"},{"uid":"4fd2b0d2-12"}],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-16":{"id":"/src/ui/PreferenceCenter.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-17"},"imported":[{"uid":"4fd2b0d2-10"},{"uid":"4fd2b0d2-12"}],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-18":{"id":"/src/ui/FloatingWidget.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-19"},"imported":[{"uid":"4fd2b0d2-10"},{"uid":"4fd2b0d2-12"}],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-20":{"id":"/src/integrations/GTMConsentMode.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-21"},"imported":[],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-22":{"id":"/src/integrations/DataLayerManager.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-23"},"imported":[],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-24":{"id":"/src/utils/cookies.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-25"},"imported":[],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-26":{"id":"/src/core/CookieConsent.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-27"},"imported":[{"uid":"4fd2b0d2-2"},{"uid":"4fd2b0d2-0"},{"uid":"4fd2b0d2-4"},{"uid":"4fd2b0d2-6"},{"uid":"4fd2b0d2-8"},{"uid":"4fd2b0d2-14"},{"uid":"4fd2b0d2-16"},{"uid":"4fd2b0d2-18"},{"uid":"4fd2b0d2-20"},{"uid":"4fd2b0d2-22"},{"uid":"4fd2b0d2-24"},{"uid":"4fd2b0d2-30"},{"uid":"4fd2b0d2-31"},{"uid":"4fd2b0d2-32"},{"uid":"4fd2b0d2-33"}],"importedBy":[{"uid":"4fd2b0d2-28"}]},"4fd2b0d2-28":{"id":"/src/index.ts","moduleParts":{"cookiecraft.js":"4fd2b0d2-29"},"imported":[{"uid":"4fd2b0d2-26"}],"importedBy":[],"isEntry":true},"4fd2b0d2-30":{"id":"/src/styles/banner.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-31":{"id":"/src/styles/animations.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-32":{"id":"/src/styles/preferences.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"4fd2b0d2-26"}]},"4fd2b0d2-33":{"id":"/src/styles/widget.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"4fd2b0d2-26"}]}},"env":{"rollup":"4.55.1"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4932
+ const data = {"version":2,"tree":{"name":"root","children":[{"name":"cookiecraft.js","children":[{"name":"src","children":[{"name":"core","children":[{"uid":"935d560d-1","name":"StorageManager.ts"},{"uid":"935d560d-3","name":"ConsentManager.ts"},{"uid":"935d560d-5","name":"EventEmitter.ts"},{"uid":"935d560d-27","name":"CookieConsent.ts"}]},{"name":"blocking","children":[{"uid":"935d560d-7","name":"ScriptBlocker.ts"},{"uid":"935d560d-9","name":"CategoryManager.ts"}]},{"name":"utils","children":[{"uid":"935d560d-11","name":"sanitize.ts"},{"uid":"935d560d-13","name":"color.ts"},{"uid":"935d560d-25","name":"cookies.ts"}]},{"name":"ui","children":[{"uid":"935d560d-15","name":"Banner.ts"},{"uid":"935d560d-17","name":"PreferenceCenter.ts"},{"uid":"935d560d-19","name":"FloatingWidget.ts"}]},{"name":"integrations","children":[{"uid":"935d560d-21","name":"GTMConsentMode.ts"},{"uid":"935d560d-23","name":"DataLayerManager.ts"}]},{"uid":"935d560d-29","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"935d560d-1":{"renderedLength":3329,"gzipLength":856,"brotliLength":750,"metaUid":"935d560d-0"},"935d560d-3":{"renderedLength":2139,"gzipLength":651,"brotliLength":532,"metaUid":"935d560d-2"},"935d560d-5":{"renderedLength":1409,"gzipLength":401,"brotliLength":356,"metaUid":"935d560d-4"},"935d560d-7":{"renderedLength":6794,"gzipLength":1782,"brotliLength":1519,"metaUid":"935d560d-6"},"935d560d-9":{"renderedLength":2378,"gzipLength":716,"brotliLength":597,"metaUid":"935d560d-8"},"935d560d-11":{"renderedLength":1508,"gzipLength":559,"brotliLength":480,"metaUid":"935d560d-10"},"935d560d-13":{"renderedLength":1077,"gzipLength":462,"brotliLength":375,"metaUid":"935d560d-12"},"935d560d-15":{"renderedLength":7912,"gzipLength":1957,"brotliLength":1628,"metaUid":"935d560d-14"},"935d560d-17":{"renderedLength":9809,"gzipLength":2473,"brotliLength":2085,"metaUid":"935d560d-16"},"935d560d-19":{"renderedLength":5702,"gzipLength":2020,"brotliLength":1656,"metaUid":"935d560d-18"},"935d560d-21":{"renderedLength":2939,"gzipLength":860,"brotliLength":719,"metaUid":"935d560d-20"},"935d560d-23":{"renderedLength":1237,"gzipLength":483,"brotliLength":391,"metaUid":"935d560d-22"},"935d560d-25":{"renderedLength":3548,"gzipLength":1157,"brotliLength":954,"metaUid":"935d560d-24"},"935d560d-27":{"renderedLength":8541,"gzipLength":1976,"brotliLength":1661,"metaUid":"935d560d-26"},"935d560d-29":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"935d560d-28"}},"nodeMetas":{"935d560d-0":{"id":"/src/core/StorageManager.ts","moduleParts":{"cookiecraft.js":"935d560d-1"},"imported":[],"importedBy":[{"uid":"935d560d-26"},{"uid":"935d560d-2"}]},"935d560d-2":{"id":"/src/core/ConsentManager.ts","moduleParts":{"cookiecraft.js":"935d560d-3"},"imported":[{"uid":"935d560d-0"}],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-4":{"id":"/src/core/EventEmitter.ts","moduleParts":{"cookiecraft.js":"935d560d-5"},"imported":[],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-6":{"id":"/src/blocking/ScriptBlocker.ts","moduleParts":{"cookiecraft.js":"935d560d-7"},"imported":[],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-8":{"id":"/src/blocking/CategoryManager.ts","moduleParts":{"cookiecraft.js":"935d560d-9"},"imported":[],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-10":{"id":"/src/utils/sanitize.ts","moduleParts":{"cookiecraft.js":"935d560d-11"},"imported":[],"importedBy":[{"uid":"935d560d-14"},{"uid":"935d560d-16"},{"uid":"935d560d-18"}]},"935d560d-12":{"id":"/src/utils/color.ts","moduleParts":{"cookiecraft.js":"935d560d-13"},"imported":[],"importedBy":[{"uid":"935d560d-14"},{"uid":"935d560d-16"},{"uid":"935d560d-18"}]},"935d560d-14":{"id":"/src/ui/Banner.ts","moduleParts":{"cookiecraft.js":"935d560d-15"},"imported":[{"uid":"935d560d-10"},{"uid":"935d560d-12"}],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-16":{"id":"/src/ui/PreferenceCenter.ts","moduleParts":{"cookiecraft.js":"935d560d-17"},"imported":[{"uid":"935d560d-10"},{"uid":"935d560d-12"}],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-18":{"id":"/src/ui/FloatingWidget.ts","moduleParts":{"cookiecraft.js":"935d560d-19"},"imported":[{"uid":"935d560d-10"},{"uid":"935d560d-12"}],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-20":{"id":"/src/integrations/GTMConsentMode.ts","moduleParts":{"cookiecraft.js":"935d560d-21"},"imported":[],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-22":{"id":"/src/integrations/DataLayerManager.ts","moduleParts":{"cookiecraft.js":"935d560d-23"},"imported":[],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-24":{"id":"/src/utils/cookies.ts","moduleParts":{"cookiecraft.js":"935d560d-25"},"imported":[],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-26":{"id":"/src/core/CookieConsent.ts","moduleParts":{"cookiecraft.js":"935d560d-27"},"imported":[{"uid":"935d560d-2"},{"uid":"935d560d-0"},{"uid":"935d560d-4"},{"uid":"935d560d-6"},{"uid":"935d560d-8"},{"uid":"935d560d-14"},{"uid":"935d560d-16"},{"uid":"935d560d-18"},{"uid":"935d560d-20"},{"uid":"935d560d-22"},{"uid":"935d560d-24"},{"uid":"935d560d-30"},{"uid":"935d560d-31"},{"uid":"935d560d-32"},{"uid":"935d560d-33"}],"importedBy":[{"uid":"935d560d-28"}]},"935d560d-28":{"id":"/src/index.ts","moduleParts":{"cookiecraft.js":"935d560d-29"},"imported":[{"uid":"935d560d-26"}],"importedBy":[],"isEntry":true},"935d560d-30":{"id":"/src/styles/banner.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-31":{"id":"/src/styles/animations.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-32":{"id":"/src/styles/preferences.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"935d560d-26"}]},"935d560d-33":{"id":"/src/styles/widget.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"935d560d-26"}]}},"env":{"rollup":"4.55.1"},"options":{"gzip":true,"brotli":true,"sourcemap":false}};
4933
4933
 
4934
4934
  const run = () => {
4935
4935
  const width = window.innerWidth;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cookiecraft",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "description": "Lightweight GDPR-compliant cookie consent library for any website",
6
6
  "main": "dist/cookiecraft.js",
@@ -10,8 +10,7 @@
10
10
  "unpkg": "dist/cookiecraft.min.js",
11
11
  "files": [
12
12
  "dist",
13
- "README.md",
14
- "WEBFLOW_GUIDE.md"
13
+ "README.md"
15
14
  ],
16
15
  "scripts": {
17
16
  "dev": "rollup -c -w",
package/dist/test.html DELETED
@@ -1,95 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="fr">
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>CookieCraft - Test Webflow</title>
7
- <link rel="stylesheet" href="cookiecraft.css">
8
- <style>
9
- body { font-family: system-ui, sans-serif; margin: 0; padding: 2rem; background: #f5f5f5; }
10
- h1 { color: #083d33; }
11
- .card { background: white; padding: 2rem; border-radius: 12px; margin: 1rem 0; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
12
- button { padding: 0.5rem 1rem; margin: 0.5rem; cursor: pointer; border-radius: 6px; border: 1px solid #ccc; }
13
- #log { background: #1a1a1a; color: #0f0; padding: 1rem; border-radius: 8px; font-family: monospace; font-size: 13px; max-height: 300px; overflow-y: auto; white-space: pre-wrap; }
14
- </style>
15
- </head>
16
- <body>
17
- <h1>CookieCraft Test - Stoneo</h1>
18
-
19
- <div class="card">
20
- <h2>Config Webflow</h2>
21
- <p>Simule exactement la config qui sera sur Webflow.</p>
22
- <p>Couleur: <strong style="color:#083d33">#083d33</strong></p>
23
- </div>
24
-
25
- <div class="card">
26
- <h2>Actions manuelles</h2>
27
- <button onclick="cc.show()">Afficher banniere</button>
28
- <button onclick="cc.showPreferences()">Preferences</button>
29
- <button onclick="cc.reset()">Reset consent</button>
30
- <button onclick="console.log(cc.getConsent())">Voir consent</button>
31
- </div>
32
-
33
- <div class="card">
34
- <h2>Console</h2>
35
- <div id="log"></div>
36
- </div>
37
-
38
- <script src="cookiecraft.min.js"></script>
39
- <script>
40
- // Mirror console.log to page
41
- var logEl = document.getElementById('log');
42
- var origLog = console.log;
43
- console.log = function() {
44
- origLog.apply(console, arguments);
45
- var msg = Array.from(arguments).map(function(a) {
46
- return typeof a === 'object' ? JSON.stringify(a, null, 2) : String(a);
47
- }).join(' ');
48
- logEl.textContent += msg + '\n';
49
- logEl.scrollTop = logEl.scrollHeight;
50
- };
51
-
52
- // Exact same config as Webflow
53
- var o = {};
54
- o.mode = 'opt-in';
55
- o.position = 'bottom';
56
- o.layout = 'bar';
57
- o.theme = 'light';
58
- o.revision = 1;
59
- o.gtmConsentMode = true;
60
- o.primaryColor = '#083d33';
61
- o.categories = {};
62
- o.categories.necessary = {};
63
- o.categories.necessary.label = 'Essentiels';
64
- o.categories.necessary.enabled = true;
65
- o.categories.necessary.description = 'Cookies necessaires';
66
- o.categories.necessary.readOnly = true;
67
- o.categories.analytics = {};
68
- o.categories.analytics.label = 'Statistiques';
69
- o.categories.analytics.enabled = false;
70
- o.categories.analytics.description = 'Comprendre votre utilisation';
71
- o.categories.analytics.readOnly = false;
72
- o.categories.marketing = {};
73
- o.categories.marketing.label = 'Marketing';
74
- o.categories.marketing.enabled = false;
75
- o.categories.marketing.description = 'Contenu personnalise';
76
- o.categories.marketing.readOnly = false;
77
- o.categories.preferences = {};
78
- o.categories.preferences.label = 'Preferences';
79
- o.categories.preferences.enabled = false;
80
- o.categories.preferences.description = 'Memoriser vos choix';
81
- o.categories.preferences.readOnly = false;
82
- o.translations = {};
83
- o.translations.title = 'Nous utilisons des cookies';
84
- o.translations.description = 'Pour ameliorer votre experience.';
85
- o.translations.privacyPolicyUrl = '/politique-de-confidentialite';
86
- o.translations.privacyPolicyLabel = 'Politique de confidentialite';
87
-
88
- console.log('[Test] Creating CookieCraft...');
89
- var cc = new CookieCraft.CookieConsent(o);
90
- console.log('[Test] Calling init()...');
91
- cc.init();
92
- console.log('[Test] Done!');
93
- </script>
94
- </body>
95
- </html>