cookiecraft 1.0.2 → 1.0.4
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/cookiecraft.esm.js +12 -8
- package/dist/cookiecraft.esm.js.map +1 -1
- package/dist/cookiecraft.js +12 -8
- package/dist/cookiecraft.js.map +1 -1
- package/dist/cookiecraft.min.js +1 -1
- package/dist/cookiecraft.min.js.map +1 -1
- package/dist/stats.html +1 -1
- package/package.json +2 -3
- package/dist/test.html +0 -95
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":"
|
|
4932
|
+
const data = {"version":2,"tree":{"name":"root","children":[{"name":"cookiecraft.js","children":[{"name":"src","children":[{"name":"core","children":[{"uid":"11328c63-1","name":"StorageManager.ts"},{"uid":"11328c63-3","name":"ConsentManager.ts"},{"uid":"11328c63-5","name":"EventEmitter.ts"},{"uid":"11328c63-27","name":"CookieConsent.ts"}]},{"name":"blocking","children":[{"uid":"11328c63-7","name":"ScriptBlocker.ts"},{"uid":"11328c63-9","name":"CategoryManager.ts"}]},{"name":"utils","children":[{"uid":"11328c63-11","name":"sanitize.ts"},{"uid":"11328c63-13","name":"color.ts"},{"uid":"11328c63-25","name":"cookies.ts"}]},{"name":"ui","children":[{"uid":"11328c63-15","name":"Banner.ts"},{"uid":"11328c63-17","name":"PreferenceCenter.ts"},{"uid":"11328c63-19","name":"FloatingWidget.ts"}]},{"name":"integrations","children":[{"uid":"11328c63-21","name":"GTMConsentMode.ts"},{"uid":"11328c63-23","name":"DataLayerManager.ts"}]},{"uid":"11328c63-29","name":"index.ts"}]}]}],"isRoot":true},"nodeParts":{"11328c63-1":{"renderedLength":3329,"gzipLength":856,"brotliLength":750,"metaUid":"11328c63-0"},"11328c63-3":{"renderedLength":2139,"gzipLength":651,"brotliLength":532,"metaUid":"11328c63-2"},"11328c63-5":{"renderedLength":1409,"gzipLength":401,"brotliLength":356,"metaUid":"11328c63-4"},"11328c63-7":{"renderedLength":6794,"gzipLength":1782,"brotliLength":1519,"metaUid":"11328c63-6"},"11328c63-9":{"renderedLength":2378,"gzipLength":716,"brotliLength":597,"metaUid":"11328c63-8"},"11328c63-11":{"renderedLength":1508,"gzipLength":559,"brotliLength":480,"metaUid":"11328c63-10"},"11328c63-13":{"renderedLength":1077,"gzipLength":462,"brotliLength":375,"metaUid":"11328c63-12"},"11328c63-15":{"renderedLength":8014,"gzipLength":1974,"brotliLength":1641,"metaUid":"11328c63-14"},"11328c63-17":{"renderedLength":9876,"gzipLength":2480,"brotliLength":2094,"metaUid":"11328c63-16"},"11328c63-19":{"renderedLength":5702,"gzipLength":2020,"brotliLength":1656,"metaUid":"11328c63-18"},"11328c63-21":{"renderedLength":2939,"gzipLength":860,"brotliLength":719,"metaUid":"11328c63-20"},"11328c63-23":{"renderedLength":1237,"gzipLength":483,"brotliLength":391,"metaUid":"11328c63-22"},"11328c63-25":{"renderedLength":3548,"gzipLength":1157,"brotliLength":954,"metaUid":"11328c63-24"},"11328c63-27":{"renderedLength":8578,"gzipLength":1985,"brotliLength":1664,"metaUid":"11328c63-26"},"11328c63-29":{"renderedLength":0,"gzipLength":0,"brotliLength":0,"metaUid":"11328c63-28"}},"nodeMetas":{"11328c63-0":{"id":"/src/core/StorageManager.ts","moduleParts":{"cookiecraft.js":"11328c63-1"},"imported":[],"importedBy":[{"uid":"11328c63-26"},{"uid":"11328c63-2"}]},"11328c63-2":{"id":"/src/core/ConsentManager.ts","moduleParts":{"cookiecraft.js":"11328c63-3"},"imported":[{"uid":"11328c63-0"}],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-4":{"id":"/src/core/EventEmitter.ts","moduleParts":{"cookiecraft.js":"11328c63-5"},"imported":[],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-6":{"id":"/src/blocking/ScriptBlocker.ts","moduleParts":{"cookiecraft.js":"11328c63-7"},"imported":[],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-8":{"id":"/src/blocking/CategoryManager.ts","moduleParts":{"cookiecraft.js":"11328c63-9"},"imported":[],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-10":{"id":"/src/utils/sanitize.ts","moduleParts":{"cookiecraft.js":"11328c63-11"},"imported":[],"importedBy":[{"uid":"11328c63-14"},{"uid":"11328c63-16"},{"uid":"11328c63-18"}]},"11328c63-12":{"id":"/src/utils/color.ts","moduleParts":{"cookiecraft.js":"11328c63-13"},"imported":[],"importedBy":[{"uid":"11328c63-14"},{"uid":"11328c63-16"},{"uid":"11328c63-18"}]},"11328c63-14":{"id":"/src/ui/Banner.ts","moduleParts":{"cookiecraft.js":"11328c63-15"},"imported":[{"uid":"11328c63-10"},{"uid":"11328c63-12"}],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-16":{"id":"/src/ui/PreferenceCenter.ts","moduleParts":{"cookiecraft.js":"11328c63-17"},"imported":[{"uid":"11328c63-10"},{"uid":"11328c63-12"}],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-18":{"id":"/src/ui/FloatingWidget.ts","moduleParts":{"cookiecraft.js":"11328c63-19"},"imported":[{"uid":"11328c63-10"},{"uid":"11328c63-12"}],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-20":{"id":"/src/integrations/GTMConsentMode.ts","moduleParts":{"cookiecraft.js":"11328c63-21"},"imported":[],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-22":{"id":"/src/integrations/DataLayerManager.ts","moduleParts":{"cookiecraft.js":"11328c63-23"},"imported":[],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-24":{"id":"/src/utils/cookies.ts","moduleParts":{"cookiecraft.js":"11328c63-25"},"imported":[],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-26":{"id":"/src/core/CookieConsent.ts","moduleParts":{"cookiecraft.js":"11328c63-27"},"imported":[{"uid":"11328c63-2"},{"uid":"11328c63-0"},{"uid":"11328c63-4"},{"uid":"11328c63-6"},{"uid":"11328c63-8"},{"uid":"11328c63-14"},{"uid":"11328c63-16"},{"uid":"11328c63-18"},{"uid":"11328c63-20"},{"uid":"11328c63-22"},{"uid":"11328c63-24"},{"uid":"11328c63-30"},{"uid":"11328c63-31"},{"uid":"11328c63-32"},{"uid":"11328c63-33"}],"importedBy":[{"uid":"11328c63-28"}]},"11328c63-28":{"id":"/src/index.ts","moduleParts":{"cookiecraft.js":"11328c63-29"},"imported":[{"uid":"11328c63-26"}],"importedBy":[],"isEntry":true},"11328c63-30":{"id":"/src/styles/banner.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-31":{"id":"/src/styles/animations.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-32":{"id":"/src/styles/preferences.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"11328c63-26"}]},"11328c63-33":{"id":"/src/styles/widget.css","moduleParts":{},"imported":[],"importedBy":[{"uid":"11328c63-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.
|
|
3
|
+
"version": "1.0.4",
|
|
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>
|