@c15t/browser 3.0.0-alpha.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.
Files changed (93) hide show
  1. package/AGENTS.md +64 -0
  2. package/CHANGELOG.md +27 -0
  3. package/README.md +128 -0
  4. package/dist/861.js +1079 -0
  5. package/dist/925.js +649 -0
  6. package/dist/c15t.css +213 -0
  7. package/dist/c15t.devtools.js +1 -0
  8. package/dist/c15t.headless.js +1 -0
  9. package/dist/c15t.iab.css +190 -0
  10. package/dist/c15t.iab.js +221 -0
  11. package/dist/c15t.js +30 -0
  12. package/dist/devtools.js +11 -0
  13. package/dist/headless.js +17 -0
  14. package/dist/iab.js +784 -0
  15. package/dist/index.js +17 -0
  16. package/dist-types/auto-init.d.ts +42 -0
  17. package/dist-types/client.d.ts +51 -0
  18. package/dist-types/deferred.d.ts +13 -0
  19. package/dist-types/devtools.d.ts +32 -0
  20. package/dist-types/entries/cdn-devtools.d.ts +13 -0
  21. package/dist-types/entries/cdn-headless.d.ts +8 -0
  22. package/dist-types/entries/cdn-iab.d.ts +1 -0
  23. package/dist-types/entries/cdn.d.ts +8 -0
  24. package/dist-types/gated-scripts.d.ts +35 -0
  25. package/dist-types/generated/iab-styles.d.ts +144 -0
  26. package/dist-types/generated/styles.d.ts +137 -0
  27. package/dist-types/global.d.ts +112 -0
  28. package/dist-types/headless.d.ts +41 -0
  29. package/dist-types/iab/mount.d.ts +8 -0
  30. package/dist-types/iab/preferences.d.ts +9 -0
  31. package/dist-types/iab/styles.d.ts +2 -0
  32. package/dist-types/iab/surface.d.ts +4 -0
  33. package/dist-types/iab/vendor-disclosures.d.ts +14 -0
  34. package/dist-types/iab.d.ts +20 -0
  35. package/dist-types/index.d.ts +43 -0
  36. package/dist-types/transports/manifest.d.ts +62 -0
  37. package/dist-types/transports/offline.d.ts +18 -0
  38. package/dist-types/types.d.ts +290 -0
  39. package/dist-types/ui/actions.d.ts +29 -0
  40. package/dist-types/ui/banner.d.ts +13 -0
  41. package/dist-types/ui/branding.d.ts +25 -0
  42. package/dist-types/ui/copy.d.ts +28 -0
  43. package/dist-types/ui/dialog.d.ts +14 -0
  44. package/dist-types/ui/dom.d.ts +48 -0
  45. package/dist-types/ui/mount.d.ts +27 -0
  46. package/dist-types/ui/surface.d.ts +43 -0
  47. package/dist-types/ui/trigger.d.ts +14 -0
  48. package/dist-types/ui/widget.d.ts +27 -0
  49. package/dist-types/version.d.ts +1 -0
  50. package/docs/README.md +64 -0
  51. package/docs/frameworks/javascript/script-loader.md +47 -0
  52. package/docs/frameworks/javascript/script-tag.md +375 -0
  53. package/docs/integrations/adobe-analytics.md +294 -0
  54. package/docs/integrations/ahrefs-analytics.md +291 -0
  55. package/docs/integrations/amplitude.md +292 -0
  56. package/docs/integrations/building-integrations.md +47 -0
  57. package/docs/integrations/clearbit.md +291 -0
  58. package/docs/integrations/cloudflare-web-analytics.md +292 -0
  59. package/docs/integrations/crisp.md +294 -0
  60. package/docs/integrations/databuddy.md +311 -0
  61. package/docs/integrations/fathom-analytics.md +293 -0
  62. package/docs/integrations/google-maps.md +384 -0
  63. package/docs/integrations/google-tag-manager.md +306 -0
  64. package/docs/integrations/google-tag.md +305 -0
  65. package/docs/integrations/heap.md +292 -0
  66. package/docs/integrations/hightouch.md +293 -0
  67. package/docs/integrations/hotjar.md +292 -0
  68. package/docs/integrations/intercom.md +285 -0
  69. package/docs/integrations/linkedin-insights.md +291 -0
  70. package/docs/integrations/logrocket.md +293 -0
  71. package/docs/integrations/matomo-analytics.md +316 -0
  72. package/docs/integrations/meta-pixel.md +285 -0
  73. package/docs/integrations/microsoft-clarity.md +292 -0
  74. package/docs/integrations/microsoft-uet.md +291 -0
  75. package/docs/integrations/mixpanel-analytics.md +295 -0
  76. package/docs/integrations/openai-pixel.md +441 -0
  77. package/docs/integrations/overview.md +111 -0
  78. package/docs/integrations/pirsch.md +295 -0
  79. package/docs/integrations/plausible-analytics.md +295 -0
  80. package/docs/integrations/posthog.md +397 -0
  81. package/docs/integrations/promptwatch.md +291 -0
  82. package/docs/integrations/reddit-pixel.md +294 -0
  83. package/docs/integrations/rudderstack.md +328 -0
  84. package/docs/integrations/rybbit-analytics.md +296 -0
  85. package/docs/integrations/segment.md +292 -0
  86. package/docs/integrations/snapchat-pixel.md +293 -0
  87. package/docs/integrations/tiktok-pixel.md +291 -0
  88. package/docs/integrations/umami-analytics.md +295 -0
  89. package/docs/integrations/vercel-analytics.md +293 -0
  90. package/docs/integrations/x-pixel.md +291 -0
  91. package/docs/integrations/youtube.md +405 -0
  92. package/package.json +117 -0
  93. package/readme.json +44 -0
package/package.json ADDED
@@ -0,0 +1,117 @@
1
+ {
2
+ "name": "@c15t/browser",
3
+ "version": "3.0.0-alpha.0",
4
+ "description": "Drop-in consent banner and headless consent runtime for sites without a build step: Framer, Webflow, WordPress, Squarespace, and plain HTML.",
5
+ "keywords": [
6
+ "c15t",
7
+ "cmp",
8
+ "consent",
9
+ "consent-banner",
10
+ "consent-management",
11
+ "cookie-banner",
12
+ "cookie-consent",
13
+ "framer",
14
+ "gdpr",
15
+ "headless",
16
+ "privacy",
17
+ "script-tag",
18
+ "vanilla-js",
19
+ "webflow",
20
+ "wordpress"
21
+ ],
22
+ "homepage": "https://c15t.com/docs/frameworks/javascript/script-tag",
23
+ "bugs": {
24
+ "url": "https://github.com/c15t/c15t/issues"
25
+ },
26
+ "license": "Apache-2.0",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/c15t/c15t.git",
30
+ "directory": "packages/browser"
31
+ },
32
+ "files": [
33
+ "dist",
34
+ "dist-types",
35
+ "AGENTS.md",
36
+ "docs",
37
+ "README.md",
38
+ "CHANGELOG.md"
39
+ ],
40
+ "type": "module",
41
+ "sideEffects": [
42
+ "./dist/c15t.js",
43
+ "./dist/c15t.iab.js",
44
+ "./dist/c15t.headless.js",
45
+ "./dist/c15t.devtools.js",
46
+ "**/*.css"
47
+ ],
48
+ "main": "./dist/index.js",
49
+ "types": "./dist-types/index.d.ts",
50
+ "unpkg": "./dist/c15t.js",
51
+ "jsdelivr": "./dist/c15t.js",
52
+ "exports": {
53
+ ".": {
54
+ "types": "./dist-types/index.d.ts",
55
+ "import": "./dist/index.js",
56
+ "default": "./dist/index.js"
57
+ },
58
+ "./headless": {
59
+ "types": "./dist-types/headless.d.ts",
60
+ "import": "./dist/headless.js",
61
+ "default": "./dist/headless.js"
62
+ },
63
+ "./devtools": {
64
+ "types": "./dist-types/devtools.d.ts",
65
+ "import": "./dist/devtools.js",
66
+ "default": "./dist/devtools.js"
67
+ },
68
+ "./styles.css": "./dist/c15t.css",
69
+ "./c15t.js": "./dist/c15t.js",
70
+ "./c15t.headless.js": "./dist/c15t.headless.js",
71
+ "./c15t.devtools.js": "./dist/c15t.devtools.js",
72
+ "./iab": {
73
+ "types": "./dist-types/iab.d.ts",
74
+ "import": "./dist/iab.js",
75
+ "default": "./dist/iab.js"
76
+ },
77
+ "./c15t.iab.js": "./dist/c15t.iab.js",
78
+ "./iab/styles.css": "./dist/c15t.iab.css"
79
+ },
80
+ "publishConfig": {
81
+ "access": "public"
82
+ },
83
+ "scripts": {
84
+ "build": "bun prebuild && rslib build && bun scripts/copy-styles.ts && bun ../../scripts/normalize-dist-types.mjs",
85
+ "build:docs": "bun ../../scripts/generate-package-docs.ts @c15t/browser",
86
+ "check-types": "bun prebuild && tsc --noEmit",
87
+ "dev": "sh -c 'bun prebuild && rslib build --no-dts --no-clean && rslib build --watch --no-dts --no-clean'",
88
+ "fmt": "bun oxfmt .",
89
+ "lint": "bun oxlint ./src",
90
+ "prebuild": "genversion --esm --semi src/version.ts && bun scripts/build-styles.ts",
91
+ "prepack": "bun run build:docs && bun ../../scripts/verify-package-artifacts.ts",
92
+ "test": "bun prebuild && vitest run",
93
+ "test:watch": "bun prebuild && vitest"
94
+ },
95
+ "dependencies": {
96
+ "@c15t/core": "3.0.0-alpha.0",
97
+ "@c15t/dev-tools": "3.0.0-alpha.0",
98
+ "@c15t/iab": "3.0.0-alpha.0",
99
+ "@c15t/schema": "3.0.0-alpha.0",
100
+ "@c15t/translations": "3.0.0-alpha.0",
101
+ "@c15t/ui": "3.0.0-alpha.0"
102
+ },
103
+ "devDependencies": {
104
+ "@c15t/conformance": "0.0.1",
105
+ "@c15t/typescript-config": "0.0.1",
106
+ "@c15t/vitest-config": "1.0.0",
107
+ "genversion": "3.2.0",
108
+ "jsdom": "^25.0.0",
109
+ "typescript": "7.0.2"
110
+ },
111
+ "browserslist": [
112
+ ">0.5%",
113
+ "last 2 versions",
114
+ "not dead",
115
+ "not op_mini all"
116
+ ]
117
+ }
package/readme.json ADDED
@@ -0,0 +1,44 @@
1
+ {
2
+ "title": "@c15t/browser: Script-Tag Consent Banner",
3
+ "description": "Cookie banner, preference centre, and consent-gated script loading for sites without a build step: Framer, Webflow, WordPress, Squarespace, and plain HTML.",
4
+ "features": [
5
+ "One script tag from a CDN, configured with data attributes or calls queued on window.c15t",
6
+ "Prebuilt banner and preference centre rendered in a shadow root, immune to theme CSS",
7
+ "Headless build with the same runtime and window.c15t API for custom banners",
8
+ "data-c15t-action buttons and #c15t-preferences links wired for you",
9
+ "Hosted, self-hosted, offline, and manifest modes; an inlined manifest renders a location-independent policy with no request at all",
10
+ "DevTools panel as a second tag (c15t.devtools.js) with a Location tab for trying geo-keyed policies",
11
+ "Consent-gated script loading and Google Consent Mode through @c15t/scripts",
12
+ "ES module entry points for bundler projects without a framework"
13
+ ],
14
+ "prerequisites": [
15
+ "A page you can add a <script> tag to",
16
+ "A hosted [c15t instance](https://inth.com) (free sign-up), [self-hosted deployment](https://c15t.com/docs/self-host/quickstart), or offline mode for browser-only storage"
17
+ ],
18
+ "manualInstallation": [
19
+ "",
20
+ "Paste before `</head>`:",
21
+ "",
22
+ "```html\n<script\n src=\"https://cdn.jsdelivr.net/npm/@c15t/browser@0.2.0/dist/c15t.js\"\n data-backend-url=\"https://your-instance.c15t.dev\"\n defer\n></script>\n```",
23
+ "",
24
+ "Drop `data-backend-url` for offline mode. Load `dist/c15t.headless.js` instead for the runtime without any UI.",
25
+ "",
26
+ "For bundler projects:",
27
+ "",
28
+ "```bash\npnpm add @c15t/browser\n```"
29
+ ],
30
+ "usage": [
31
+ "Add the tag and reload; the banner appears on the first visit",
32
+ "Put `data-c15t-action=\"customize\"` on any button to open the preference centre",
33
+ "Read consent from `window.c15t` in your own code",
34
+ "For the full set of attributes and options, see the [script tag docs](https://c15t.com/docs/frameworks/javascript/script-tag)",
35
+ "```js\nc15t.on('consent', () => {\n if (c15t.has('measurement')) {\n startAnalytics();\n }\n});\n\nawait c15t.ready();\nc15t.openDialog();\n```"
36
+ ],
37
+ "docsLink": "https://c15t.com/docs/frameworks/javascript/script-tag",
38
+ "quickStartLink": "https://c15t.com/docs/frameworks/javascript/script-tag",
39
+ "showCLIGeneration": false,
40
+ "customSections": {
41
+ "Deployment Modes": "- **Hosted on inth.com**: Hosted c15t backend for policy storage, audit history, and hosted infrastructure\n- **Self-hosted backend**: Use @c15t/backend when you need full infrastructure control\n- **Manifest mode**: Inline or fetch the backend's cacheable `/manifest` and resolve the policy in the browser\n- **Offline mode**: Browser-only consent storage for portfolios, docs sites, previews, and demos",
42
+ "Optional IAB entry": "Load `c15t.iab.js` instead of `c15t.js`, or import `init` from `@c15t/browser/iab`. Configure `iab` with your registered CMP ID and vendor list. This entry includes the CMP, TC codec, purpose/vendor preferences, and IAB styles. The ordinary and headless entries exclude that implementation. Use `client.saveIAB()` to confirm individual IAB choices. See the [IAB script example](https://c15t.com/docs/frameworks/javascript/script-tag#optional-iab-entry)."
43
+ }
44
+ }