@c15t/react 2.0.4 → 2.2.0-canary-20260727202135
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/AGENTS.md +155 -0
- package/README.md +29 -14
- package/client/components/integrations.js +3 -0
- package/dist/components/consent-banner/atoms/overlay.cjs +1 -1
- package/dist/components/consent-banner/atoms/root.cjs +1 -1
- package/dist/components/consent-banner/components.cjs +1 -1
- package/dist/components/consent-banner/consent-banner.cjs +1 -1
- package/dist/components/consent-banner/error-boundary.cjs +1 -1
- package/dist/components/consent-banner/index.cjs +1 -1
- package/dist/components/consent-banner/policy-actions.cjs +1 -1
- package/dist/components/consent-dialog/atoms/card.cjs +1 -1
- package/dist/components/consent-dialog/atoms/overlay.cjs +1 -1
- package/dist/components/consent-dialog/atoms/root.cjs +1 -1
- package/dist/components/consent-dialog/consent-dialog.cjs +1 -1
- package/dist/components/consent-dialog/index.cjs +1 -1
- package/dist/components/consent-dialog-link/index.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/button.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/button.js +1 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/root.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/text.cjs +1 -1
- package/dist/components/consent-dialog-trigger/atoms/toolbar.cjs +1 -0
- package/dist/components/consent-dialog-trigger/atoms/toolbar.js +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.cjs +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.js +1 -0
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.cjs +1 -1
- package/dist/components/consent-dialog-trigger/index.cjs +1 -1
- package/dist/components/consent-dialog-trigger/index.js +1 -1
- package/dist/components/consent-dialog-trigger/use-draggable.cjs +1 -1
- package/dist/components/consent-preferences-link/consent-preferences-link.cjs +1 -1
- package/dist/components/consent-preferences-link/index.cjs +1 -1
- package/dist/components/consent-widget/atoms/accordion.cjs +1 -1
- package/dist/components/consent-widget/atoms/button.cjs +1 -1
- package/dist/components/consent-widget/atoms/footer.cjs +1 -1
- package/dist/components/consent-widget/atoms/root.cjs +1 -1
- package/dist/components/consent-widget/consent-widget.cjs +1 -1
- package/dist/components/consent-widget/index.cjs +1 -1
- package/dist/components/consent-widget/policy-actions.cjs +1 -1
- package/dist/components/frame/atoms.cjs +1 -1
- package/dist/components/frame/atoms.js +1 -1
- package/dist/components/frame/frame.cjs +1 -1
- package/dist/components/frame/index.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/button-group.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/card.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/description.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/footer.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/header.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/overlay.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/root.cjs +1 -1
- package/dist/components/iab-consent-banner/atoms/title.cjs +1 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.cjs +1 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.js +1 -1
- package/dist/components/iab-consent-banner/index.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/card.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/content.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/footer.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/header.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/root.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.cjs +1 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.cjs +1 -1
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.cjs +1 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +1 -1
- package/dist/components/iab-consent-dialog/index.cjs +1 -1
- package/dist/components/iab-consent-dialog/use-iab-translations.cjs +1 -1
- package/dist/components/integrations/google-map.cjs +1 -0
- package/dist/components/integrations/google-map.js +1 -0
- package/dist/components/integrations/index.cjs +1 -0
- package/dist/components/integrations/index.js +1 -0
- package/dist/components/integrations/shared.cjs +1 -0
- package/dist/components/integrations/shared.js +1 -0
- package/dist/components/integrations/youtube-embed.cjs +1 -0
- package/dist/components/integrations/youtube-embed.js +1 -0
- package/dist/components/shared/libs/recursive-clone-children.cjs +1 -1
- package/dist/components/shared/libs/slot.cjs +1 -1
- package/dist/components/shared/libs/use-controllable-state.cjs +1 -1
- package/dist/components/shared/policy-actions.cjs +1 -1
- package/dist/components/shared/primitives/box.cjs +1 -1
- package/dist/components/shared/primitives/button.cjs +1 -1
- package/dist/components/shared/primitives/button.js +1 -1
- package/dist/components/shared/primitives/legal-links/index.cjs +1 -1
- package/dist/components/shared/primitives/legal-links/index.js +1 -1
- package/dist/components/shared/ui/accordion/accordion.cjs +1 -1
- package/dist/components/shared/ui/accordion/index.cjs +1 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.cjs +1 -1
- package/dist/components/shared/ui/animated-collapse/index.cjs +1 -1
- package/dist/components/shared/ui/branding.cjs +1 -1
- package/dist/components/shared/ui/button/button.cjs +1 -1
- package/dist/components/shared/ui/button/index.cjs +1 -1
- package/dist/components/shared/ui/collapsible/collapsible.cjs +1 -1
- package/dist/components/shared/ui/collapsible/index.cjs +1 -1
- package/dist/components/shared/ui/dialog/dialog.cjs +1 -1
- package/dist/components/shared/ui/dialog/index.cjs +1 -1
- package/dist/components/shared/ui/icon.cjs +1 -1
- package/dist/components/shared/ui/logo.cjs +1 -1
- package/dist/components/shared/ui/preference-item/index.cjs +1 -1
- package/dist/components/shared/ui/preference-item/preference-item.cjs +1 -1
- package/dist/components/shared/ui/switch/index.cjs +1 -1
- package/dist/components/shared/ui/switch/switch.cjs +1 -1
- package/dist/components/shared/ui/tabs/index.cjs +1 -1
- package/dist/components/shared/ui/tabs/tabs.cjs +1 -1
- package/dist/context/consent-manager-context.cjs +1 -1
- package/dist/context/consent-tracking-context.cjs +1 -1
- package/dist/context/theme-context.cjs +1 -1
- package/dist/headless.cjs +1 -1
- package/dist/headless.js +1 -1
- package/dist/hooks/index.cjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/use-color-scheme.cjs +1 -1
- package/dist/hooks/use-component-config.cjs +1 -1
- package/dist/hooks/use-consent-dialog-trigger.cjs +1 -1
- package/dist/hooks/use-consent-manager.cjs +1 -1
- package/dist/hooks/use-consent-script.cjs +1 -0
- package/dist/hooks/use-consent-script.js +1 -0
- package/dist/hooks/use-focus-trap.cjs +1 -1
- package/dist/hooks/use-headless-consent-ui.cjs +1 -1
- package/dist/hooks/use-headless-iab-consent-ui.cjs +1 -1
- package/dist/hooks/use-reduced-motion.cjs +1 -1
- package/dist/hooks/use-scroll-lock.cjs +1 -1
- package/dist/hooks/use-ssr-status.cjs +1 -1
- package/dist/hooks/use-styles.cjs +1 -1
- package/dist/hooks/use-text-direction.cjs +1 -1
- package/dist/hooks/use-theme.cjs +1 -1
- package/dist/hooks/use-translations.cjs +1 -1
- package/dist/iab.cjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/primitives/accordion.cjs +1 -1
- package/dist/primitives/button.cjs +1 -1
- package/dist/primitives/collapsible.cjs +1 -1
- package/dist/primitives/dialog.cjs +1 -1
- package/dist/primitives/preference-item.cjs +1 -1
- package/dist/primitives/switch.cjs +1 -1
- package/dist/primitives/tabs.cjs +1 -1
- package/dist/primitives.cjs +1 -1
- package/dist/providers/consent-manager-provider.cjs +1 -1
- package/dist/server/fetch-ssr-data.cjs +1 -1
- package/dist/server/fetch-ssr-data.js +1 -1
- package/dist/server/headers.cjs +1 -1
- package/dist/server/headers.js +1 -1
- package/dist/server/index.cjs +1 -1
- package/dist/server/init-cache-key.cjs +1 -1
- package/dist/server/normalize-url.cjs +1 -1
- package/dist/styles.tw3.css +1 -1
- package/dist/types/theme/index.cjs +1 -1
- package/dist/types/theme/style-types.cjs +1 -1
- package/dist/utils/cn.cjs +1 -1
- package/dist/utils/merge-styles.cjs +1 -1
- package/dist/utils/test-helpers.cjs +1 -1
- package/dist/utils/theme-utils.cjs +1 -1
- package/dist/version.cjs +1 -1
- package/dist/version.js +1 -1
- package/dist-types/components/consent-banner/components.d.ts +2 -2
- package/dist-types/components/consent-banner/policy-actions.d.ts +1 -1
- package/dist-types/components/consent-dialog/atoms/card.d.ts +5 -5
- package/dist-types/components/consent-dialog-trigger/atoms/toolbar.d.ts +22 -0
- package/dist-types/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.d.ts +35 -0
- package/dist-types/components/consent-dialog-trigger/index.d.ts +2 -1
- package/dist-types/components/consent-dialog-trigger/types.d.ts +111 -6
- package/dist-types/components/consent-widget/atoms/accordion.d.ts +4 -4
- package/dist-types/components/consent-widget/consent-widget.d.ts +1 -1
- package/dist-types/components/consent-widget/policy-actions.d.ts +1 -1
- package/dist-types/components/integrations/google-map.d.ts +82 -0
- package/dist-types/components/integrations/index.d.ts +2 -0
- package/dist-types/components/integrations/shared.d.ts +12 -0
- package/dist-types/components/integrations/youtube-embed.d.ts +95 -0
- package/dist-types/components/shared/policy-actions.d.ts +1 -1
- package/dist-types/components/shared/primitives/button.d.ts +36 -2
- package/dist-types/components/shared/primitives/legal-links/index.d.ts +1 -1
- package/dist-types/components/shared/ui/accordion/accordion.d.ts +2 -2
- package/dist-types/components/shared/ui/branding.d.ts +3 -3
- package/dist-types/components/shared/ui/button/button.d.ts +1 -1
- package/dist-types/components/shared/ui/dialog/dialog.d.ts +1 -1
- package/dist-types/components/shared/ui/logo.d.ts +8 -8
- package/dist-types/headless.d.ts +1 -0
- package/dist-types/hooks/index.d.ts +1 -0
- package/dist-types/hooks/use-consent-script.d.ts +80 -0
- package/dist-types/index.d.ts +3 -1
- package/dist-types/providers/consent-manager-provider.d.ts +1 -1
- package/dist-types/server/headers.d.ts +1 -1
- package/dist-types/utils/theme-utils.d.ts +1 -1
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +155 -76
- package/docs/{building-headless-components.md → frameworks/react/building-headless-components.md} +3 -1
- package/docs/{callbacks.md → frameworks/react/callbacks.md} +3 -1
- package/docs/{components → frameworks/react/components}/consent-banner.md +10 -21
- package/docs/{components → frameworks/react/components}/consent-dialog-link.md +8 -5
- package/docs/frameworks/react/components/consent-dialog-trigger.md +202 -0
- package/docs/{components → frameworks/react/components}/consent-dialog.md +7 -15
- package/docs/frameworks/react/components/consent-manager-provider.md +228 -0
- package/docs/{components → frameworks/react/components}/consent-widget.md +8 -6
- package/docs/{components → frameworks/react/components}/dev-tools.md +9 -6
- package/docs/{components → frameworks/react/components}/frame.md +8 -9
- package/docs/{concepts → frameworks/react/concepts}/client-modes.md +4 -2
- package/docs/{concepts → frameworks/react/concepts}/consent-categories.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/consent-models.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/cookie-management.md +3 -3
- package/docs/{concepts → frameworks/react/concepts}/glossary.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/initialization-flow.md +1 -0
- package/docs/{concepts → frameworks/react/concepts}/policy-packs.md +1 -0
- package/docs/{headless.md → frameworks/react/headless.md} +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-color-scheme.md +1 -0
- package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/checking-consent.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/location-info.md +3 -1
- package/docs/frameworks/react/hooks/use-consent-manager/overview.md +172 -0
- package/docs/{hooks → frameworks/react/hooks}/use-consent-manager/setting-consent.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-draggable.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-focus-trap.md +1 -0
- package/docs/{hooks → frameworks/react/hooks}/use-reduced-motion.md +3 -1
- package/docs/{hooks → frameworks/react/hooks}/use-ssr-status.md +6 -5
- package/docs/{hooks → frameworks/react/hooks}/use-text-direction.md +1 -0
- package/docs/frameworks/react/hooks/use-translations.md +55 -0
- package/docs/{iab → frameworks/react/iab}/consent-banner.md +9 -12
- package/docs/{iab → frameworks/react/iab}/consent-dialog.md +9 -14
- package/docs/{iab → frameworks/react/iab}/overview.md +4 -2
- package/docs/{iab → frameworks/react/iab}/use-gvl-data.md +3 -2
- package/docs/{iframe-blocking.md → frameworks/react/iframe-blocking.md} +8 -9
- package/docs/{internationalization.md → frameworks/react/internationalization.md} +13 -3
- package/docs/{network-blocker.md → frameworks/react/network-blocker.md} +13 -51
- package/docs/{optimization.md → frameworks/react/optimization.md} +3 -2
- package/docs/{policy-packs.md → frameworks/react/policy-packs.md} +3 -1
- package/docs/{quickstart.md → frameworks/react/quickstart.md} +26 -42
- package/docs/frameworks/react/script-loader.md +553 -0
- package/docs/{server-side.md → frameworks/react/server-side.md} +9 -4
- package/docs/{styling → frameworks/react/styling}/classnames.md +3 -1
- package/docs/{styling → frameworks/react/styling}/color-scheme.md +3 -1
- package/docs/frameworks/react/styling/css-variables.md +53 -0
- package/docs/frameworks/react/styling/overview.md +302 -0
- package/docs/frameworks/react/styling/slots.md +94 -0
- package/docs/{styling → frameworks/react/styling}/tailwind.md +3 -1
- package/docs/frameworks/react/styling/tokens.md +156 -0
- package/docs/{troubleshooting.md → frameworks/react/troubleshooting.md} +3 -1
- package/docs/integrations/adobe-analytics.md +160 -0
- package/docs/integrations/ahrefs-analytics.md +157 -0
- package/docs/integrations/amplitude.md +230 -0
- package/docs/integrations/building-integrations.md +15 -181
- package/docs/integrations/clearbit.md +130 -0
- package/docs/integrations/cloudflare-web-analytics.md +126 -0
- package/docs/integrations/crisp.md +140 -0
- package/docs/integrations/databuddy.md +152 -150
- package/docs/integrations/fathom-analytics.md +150 -0
- package/docs/integrations/google-maps.md +263 -0
- package/docs/integrations/google-tag-manager.md +102 -101
- package/docs/integrations/google-tag.md +104 -92
- package/docs/integrations/heap.md +219 -0
- package/docs/integrations/hightouch.md +199 -0
- package/docs/integrations/hotjar.md +143 -0
- package/docs/integrations/intercom.md +144 -0
- package/docs/integrations/linkedin-insights.md +142 -90
- package/docs/integrations/logrocket.md +175 -0
- package/docs/integrations/matomo-analytics.md +171 -0
- package/docs/integrations/meta-pixel.md +379 -309
- package/docs/integrations/microsoft-clarity.md +173 -0
- package/docs/integrations/microsoft-uet.md +135 -91
- package/docs/integrations/mixpanel-analytics.md +130 -0
- package/docs/integrations/overview.md +119 -75
- package/docs/integrations/pirsch.md +142 -0
- package/docs/integrations/plausible-analytics.md +154 -0
- package/docs/integrations/posthog.md +186 -127
- package/docs/integrations/promptwatch.md +121 -0
- package/docs/integrations/reddit-pixel.md +241 -0
- package/docs/integrations/rudderstack.md +271 -0
- package/docs/integrations/rybbit-analytics.md +143 -0
- package/docs/integrations/segment.md +146 -0
- package/docs/integrations/snapchat-pixel.md +163 -0
- package/docs/integrations/tiktok-pixel.md +101 -91
- package/docs/integrations/umami-analytics.md +148 -0
- package/docs/integrations/vercel-analytics.md +141 -0
- package/docs/integrations/x-pixel.md +123 -109
- package/docs/integrations/youtube.md +193 -0
- package/docs/shared/concepts/client-modes.md +103 -0
- package/docs/shared/concepts/consent-categories.md +41 -0
- package/docs/shared/concepts/consent-models.md +72 -0
- package/docs/shared/concepts/cookie-management.md +88 -0
- package/docs/shared/concepts/glossary.md +24 -0
- package/docs/shared/concepts/initialization-flow.md +105 -0
- package/docs/shared/concepts/policy-packs.md +225 -0
- package/docs/shared/react/components/consent-banner.md +242 -0
- package/docs/shared/react/components/consent-dialog-link.md +45 -0
- package/docs/shared/react/components/consent-dialog-trigger.md +185 -0
- package/docs/shared/react/components/consent-dialog.md +119 -0
- package/docs/shared/react/components/consent-manager-provider.md +183 -0
- package/docs/shared/react/components/consent-widget.md +121 -0
- package/docs/shared/react/components/dev-tools.md +81 -0
- package/docs/shared/react/components/frame.md +52 -0
- package/docs/shared/react/guides/building-headless-components.md +110 -0
- package/docs/shared/react/guides/callbacks.md +89 -0
- package/docs/shared/react/guides/headless.md +31 -0
- package/docs/shared/react/guides/iframe-blocking.md +65 -0
- package/docs/shared/react/guides/internationalization.md +123 -0
- package/docs/shared/react/guides/network-blocker.md +72 -0
- package/docs/shared/react/guides/optimization.md +44 -0
- package/docs/shared/react/guides/policy-packs.md +173 -0
- package/docs/shared/react/guides/script-loader.md +309 -0
- package/docs/shared/react/hooks/use-color-scheme.md +31 -0
- package/docs/shared/react/hooks/use-consent-manager/checking-consent.md +95 -0
- package/docs/shared/react/hooks/use-consent-manager/location-info.md +96 -0
- package/docs/shared/react/hooks/use-consent-manager/overview.md +74 -0
- package/docs/shared/react/hooks/use-consent-manager/setting-consent.md +93 -0
- package/docs/shared/react/hooks/use-draggable.md +30 -0
- package/docs/shared/react/hooks/use-focus-trap.md +20 -0
- package/docs/shared/react/hooks/use-reduced-motion.md +33 -0
- package/docs/shared/react/hooks/use-ssr-status.md +16 -0
- package/docs/shared/react/hooks/use-text-direction.md +38 -0
- package/docs/shared/react/hooks/use-translations.md +15 -0
- package/docs/shared/react/iab/consent-banner.md +60 -0
- package/docs/shared/react/iab/consent-dialog.md +76 -0
- package/docs/shared/react/iab/overview.md +80 -0
- package/docs/shared/react/iab/use-gvl-data.md +21 -0
- package/docs/shared/react/styling/classnames.md +93 -0
- package/docs/shared/react/styling/color-scheme.md +35 -0
- package/docs/shared/react/styling/css-variables.md +53 -0
- package/docs/shared/react/styling/overview.md +261 -0
- package/docs/shared/react/styling/slots.md +93 -0
- package/docs/shared/react/styling/stylesheet-entrypoint.md +8 -0
- package/docs/shared/react/styling/tailwind.md +88 -0
- package/docs/shared/react/styling/tokens.md +155 -0
- package/docs/shared/troubleshooting.md +82 -0
- package/package.json +23 -12
- package/readme.json +12 -7
- package/docs/ai-agents.md +0 -111
- package/docs/components/consent-dialog-trigger.md +0 -103
- package/docs/components/consent-manager-provider.md +0 -425
- package/docs/hooks/use-consent-manager/overview.md +0 -420
- package/docs/hooks/use-translations.md +0 -118
- package/docs/script-loader.md +0 -321
- package/docs/styling/css-variables.md +0 -92
- package/docs/styling/overview.md +0 -460
- package/docs/styling/slots.md +0 -128
- package/docs/styling/tokens.md +0 -216
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/react",
|
|
3
|
-
"version": "2.0
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "2.2.0-canary-20260727202135",
|
|
4
|
+
"description": "React cookie banner, consent manager, preference center, and headless CMP components with IAB TCF and Consent Mode support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
7
7
|
"react-consent",
|
|
@@ -27,7 +27,10 @@
|
|
|
27
27
|
"react-server-components",
|
|
28
28
|
"rsc",
|
|
29
29
|
"use-client",
|
|
30
|
-
"tracking-consent"
|
|
30
|
+
"tracking-consent",
|
|
31
|
+
"google-consent-mode",
|
|
32
|
+
"consent-mode-v2",
|
|
33
|
+
"react-cmp"
|
|
31
34
|
],
|
|
32
35
|
"homepage": "https://c15t.com/docs/frameworks/react/quickstart",
|
|
33
36
|
"bugs": {
|
|
@@ -103,6 +106,11 @@
|
|
|
103
106
|
"import": "./client/components/frame.js",
|
|
104
107
|
"require": "./dist/components/frame/index.cjs"
|
|
105
108
|
},
|
|
109
|
+
"./components/integrations": {
|
|
110
|
+
"types": "./dist-types/components/integrations/index.d.ts",
|
|
111
|
+
"import": "./client/components/integrations.js",
|
|
112
|
+
"require": "./dist/components/integrations/index.cjs"
|
|
113
|
+
},
|
|
106
114
|
"./iab": {
|
|
107
115
|
"types": "./dist-types/iab.d.ts",
|
|
108
116
|
"import": "./dist/iab.js",
|
|
@@ -124,8 +132,9 @@
|
|
|
124
132
|
"types": "./dist-types/index.d.ts",
|
|
125
133
|
"files": [
|
|
126
134
|
"dist",
|
|
127
|
-
"docs",
|
|
128
135
|
"dist-types",
|
|
136
|
+
"AGENTS.md",
|
|
137
|
+
"docs",
|
|
129
138
|
"client",
|
|
130
139
|
"styles.css",
|
|
131
140
|
"styles.tw3.css",
|
|
@@ -136,15 +145,16 @@
|
|
|
136
145
|
],
|
|
137
146
|
"scripts": {
|
|
138
147
|
"prebuild": "genversion --esm --semi src/version.ts",
|
|
139
|
-
"build": "bun prebuild && rslib build && bun ../../scripts/normalize-dist-types.mjs && bun scripts/generate-distribution-css.ts && bun run clean:dist:test-artifacts && bun ../../scripts/
|
|
140
|
-
"build:
|
|
148
|
+
"build": "bun prebuild && rslib build && bun ../../scripts/normalize-dist-types.mjs && bun scripts/generate-distribution-css.ts && bun run clean:dist:test-artifacts && bun ../../scripts/generate-package-docs.ts @c15t/react",
|
|
149
|
+
"build:docs": "bun ../../scripts/generate-package-docs.ts @c15t/react",
|
|
141
150
|
"check-types": "bun prebuild && tsc --noEmit",
|
|
142
151
|
"clean:dist:test-artifacts": "bun --eval \"import { rmSync } from 'node:fs'; rmSync('dist/mockServiceWorker.js', { force: true });\"",
|
|
143
152
|
"dev": "sh -c 'bun prebuild && rslib build --no-dts --no-clean && bun scripts/generate-distribution-css.ts && rslib build --watch --no-dts --no-clean'",
|
|
144
153
|
"fmt": "bun biome format --write . && bun biome check --formatter-enabled=false --linter-enabled=false --write",
|
|
145
154
|
"lint": "bun biome lint ./src",
|
|
146
155
|
"prepack": "bun ../../scripts/verify-package-artifacts.ts",
|
|
147
|
-
"test": "bun prebuild && vitest run",
|
|
156
|
+
"test": "bun prebuild && bun run test:types && vitest run",
|
|
157
|
+
"test:types": "tsc --noEmit --project tsconfig.type-tests.json",
|
|
148
158
|
"test:watch": "bun prebuild && vitest"
|
|
149
159
|
},
|
|
150
160
|
"browserslist": [
|
|
@@ -153,17 +163,18 @@
|
|
|
153
163
|
"not op_mini all"
|
|
154
164
|
],
|
|
155
165
|
"dependencies": {
|
|
156
|
-
"@c15t/ui": "2.0
|
|
157
|
-
"
|
|
166
|
+
"@c15t/ui": "2.2.0-canary-20260727202135",
|
|
167
|
+
"@types/google.maps": "3.65.3",
|
|
168
|
+
"c15t": "2.2.0-canary-20260727202135"
|
|
158
169
|
},
|
|
159
170
|
"devDependencies": {
|
|
160
|
-
"@c15t/backend": "2.0
|
|
161
|
-
"@c15t/iab": "2.0
|
|
171
|
+
"@c15t/backend": "2.2.0-canary-20260727202135",
|
|
172
|
+
"@c15t/iab": "2.2.0-canary-20260727202135",
|
|
162
173
|
"@c15t/typescript-config": "0.0.1",
|
|
163
174
|
"@c15t/vitest-config": "1.0.0",
|
|
164
175
|
"@iabtechlabtcf/core": "^1.5.20",
|
|
165
176
|
"genversion": "3.2.0",
|
|
166
|
-
"msw": "^2.
|
|
177
|
+
"msw": "^2.14.6"
|
|
167
178
|
},
|
|
168
179
|
"peerDependencies": {
|
|
169
180
|
"react": "^19.0.0 || ^19.0.0-rc || ^18.0.0 || ^17.0.0 || ^16.8.0",
|
package/readme.json
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"title": "@c15t/react: React Consent Components",
|
|
3
|
-
"description": "
|
|
3
|
+
"description": "React cookie banner, consent manager, preference center, and headless CMP components for modern React apps.",
|
|
4
4
|
"features": [
|
|
5
5
|
"Works with React 19, 18, 17, and 16.8",
|
|
6
6
|
"Full 'use client' support for React Server Components",
|
|
7
|
-
"
|
|
8
|
-
"
|
|
7
|
+
"Prebuilt and fully customizable cookie banner, consent dialog, and preference center UI",
|
|
8
|
+
"Headless hooks for custom consent flows",
|
|
9
9
|
"Minimal configuration with TypeScript-first design",
|
|
10
10
|
"Comprehensive Consent Management Platform (CMP)",
|
|
11
|
-
"
|
|
11
|
+
"IAB TCF 2.3 UI and hooks through the @c15t/react/iab subpath",
|
|
12
|
+
"Google Tag Manager, Google Consent Mode v2, Meta Pixel, and analytics integrations through @c15t/scripts",
|
|
12
13
|
"Built-in internationalization support",
|
|
13
14
|
"Seamless consent storage and tracking"
|
|
14
15
|
],
|
|
15
16
|
"prerequisites": [
|
|
16
17
|
"React 16.8 or later",
|
|
17
18
|
"Node.js 18.17.0 or later",
|
|
18
|
-
"A hosted [c15t instance](https://inth.com) (free sign-up)
|
|
19
|
+
"A hosted [c15t instance](https://inth.com) (free sign-up), [self-hosted deployment](https://c15t.com/docs/self-host/quickstart), or offline mode for local-only storage"
|
|
19
20
|
],
|
|
20
21
|
"manualInstallation": [
|
|
21
22
|
"",
|
|
@@ -32,12 +33,16 @@
|
|
|
32
33
|
"usage": [
|
|
33
34
|
"Import `ConsentManagerProvider` in your app's root component",
|
|
34
35
|
"Add `ConsentBanner` and `ConsentDialog` components",
|
|
35
|
-
"
|
|
36
|
+
"Customize styling and behavior to fit your app",
|
|
36
37
|
"For full implementation details, see the [React quickstart docs](https://c15t.com/docs/frameworks/react/quickstart)",
|
|
37
38
|
|
|
38
39
|
"```tsx\n// App.tsx\nimport {\n ConsentManagerProvider,\n ConsentBanner,\n ConsentDialog,\n} from '@c15t/react'\n\nfunction App() {\n return (\n <ConsentManagerProvider>\n <YourApp />\n <ConsentBanner />\n <ConsentDialog />\n </ConsentManagerProvider>\n )\n}\n```"
|
|
39
40
|
],
|
|
40
41
|
"docsLink": "https://c15t.com/docs/frameworks/react/quickstart",
|
|
41
42
|
"quickStartLink": "https://c15t.com/docs/frameworks/react/quickstart",
|
|
42
|
-
"showCLIGeneration": true
|
|
43
|
+
"showCLIGeneration": true,
|
|
44
|
+
"customSections": {
|
|
45
|
+
"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- **Offline mode**: Browser-only consent storage for local development, demos, previews, static sites, or fallback scenarios",
|
|
46
|
+
"Popular Integrations": "- Google Tag Manager with Google Consent Mode v2\n- Google Analytics 4 and Google Ads through gtag.js\n- Meta Pixel, TikTok Pixel, LinkedIn Insights, Microsoft UET, X Pixel, Reddit Pixel, and Snapchat Pixel\n- PostHog, Segment, Mixpanel, Microsoft Clarity, Hotjar, Plausible, Fathom, Matomo, Umami, and Vercel Analytics\n- Intercom and Crisp chat widgets"
|
|
47
|
+
}
|
|
43
48
|
}
|
package/docs/ai-agents.md
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: AI Agents
|
|
3
|
-
description: Integrate c15t with AI coding assistants using the docs bundled in each package and c15t agent skills. Give agents version-matched local docs for consent management, banners, script loading, callbacks, and integrations.
|
|
4
|
-
lastModified: 2026-03-24
|
|
5
|
-
---
|
|
6
|
-
## Bundled Docs
|
|
7
|
-
|
|
8
|
-
Every supported c15t package now ships docs inside the installed package itself.
|
|
9
|
-
|
|
10
|
-
### Where to find them
|
|
11
|
-
|
|
12
|
-
* `node_modules/c15t/docs/README.md`
|
|
13
|
-
* `node_modules/@c15t/react/docs/README.md`
|
|
14
|
-
* `node_modules/@c15t/nextjs/docs/README.md`
|
|
15
|
-
* `node_modules/@c15t/backend/docs/README.md`
|
|
16
|
-
|
|
17
|
-
Start with the package `README.md`, then follow its linked pages for the relevant workflow.
|
|
18
|
-
|
|
19
|
-
These docs are version-matched to the exact c15t package version in your project, including generated reference content like prop and type tables.
|
|
20
|
-
|
|
21
|
-
### Why use them
|
|
22
|
-
|
|
23
|
-
If your app uses multiple c15t packages, use the docs from each relevant installed package instead of relying on stale model knowledge.
|
|
24
|
-
|
|
25
|
-
### Agent philosophy
|
|
26
|
-
|
|
27
|
-
When an AI tool is helping with c15t behavior, it should read the installed c15t docs first and use model knowledge second. That keeps consent flows, script gating, banner behavior, and integrations aligned with the exact version you have installed.
|
|
28
|
-
|
|
29
|
-
### Customization ladder for agents
|
|
30
|
-
|
|
31
|
-
When an agent is working on consent UI, it should choose the lowest-power tool that solves the task:
|
|
32
|
-
|
|
33
|
-
1. Start with the pre-built component and its existing props or provider options
|
|
34
|
-
2. Use `theme` tokens for semantic visual changes
|
|
35
|
-
3. Use `theme.slots` for targeted styling of specific parts
|
|
36
|
-
4. Use CSS variables or className-level overrides only when integrating with external styles
|
|
37
|
-
5. Use compound components only when the markup order must change
|
|
38
|
-
6. Use `noStyle` only when c15t structure is still correct but all styling must be replaced
|
|
39
|
-
7. Use headless hooks only when markup and behavior both need to be rebuilt
|
|
40
|
-
|
|
41
|
-
For common tasks:
|
|
42
|
-
|
|
43
|
-
* Banner footer background -> `theme.colors.surfaceHover`
|
|
44
|
-
* Banner card background -> `theme.colors.surface`
|
|
45
|
-
* Banner card/footer/title tweaks -> banner slots
|
|
46
|
-
* Stock action styling -> `theme.consentActions`
|
|
47
|
-
* Copy changes -> `ConsentManagerProvider.options.i18n`
|
|
48
|
-
|
|
49
|
-
If a token appears not to work, the agent should verify the token-to-component mapping before suggesting CSS overrides, `!important`, `noStyle`, or headless mode.
|
|
50
|
-
|
|
51
|
-
***
|
|
52
|
-
|
|
53
|
-
## Agent Skills
|
|
54
|
-
|
|
55
|
-
c15t publishes agent skills that give AI coding assistants deep knowledge of c15t's APIs, components, and configuration. Skills are reusable workflows and tool-specific guidance, not version-matched local docs.
|
|
56
|
-
|
|
57
|
-
### Installation
|
|
58
|
-
|
|
59
|
-
Via the c15t CLI:
|
|
60
|
-
|
|
61
|
-
|Package manager|Command|
|
|
62
|
-
|:--|:--|
|
|
63
|
-
|npm|`npx @c15t/cli install-skills`|
|
|
64
|
-
|pnpm|`pnpm dlx @c15t/cli install-skills`|
|
|
65
|
-
|yarn|`yarn dlx @c15t/cli install-skills`|
|
|
66
|
-
|bun|`bunx @c15t/cli install-skills`|
|
|
67
|
-
|
|
68
|
-
Or directly:
|
|
69
|
-
|
|
70
|
-
|Package manager|Command|
|
|
71
|
-
|:--|:--|
|
|
72
|
-
|npm|`npx skills add c15t/skills`|
|
|
73
|
-
|pnpm|`pnpm dlx skills add c15t/skills`|
|
|
74
|
-
|yarn|`yarn dlx skills add c15t/skills`|
|
|
75
|
-
|bun|`bunx skills add c15t/skills`|
|
|
76
|
-
|
|
77
|
-
### What skills provide
|
|
78
|
-
|
|
79
|
-
* **Styling customization** — strict escalation guidance across props, tokens, slots, CSS variables, compound components, `noStyle`, and headless
|
|
80
|
-
* **Internationalization** — translation setup, locale routing integration
|
|
81
|
-
* **Script management** — configuring third-party scripts with consent categories
|
|
82
|
-
* **Component setup** — ConsentBanner, ConsentDialog, provider configuration
|
|
83
|
-
|
|
84
|
-
### Supported tools
|
|
85
|
-
|
|
86
|
-
* Claude Code
|
|
87
|
-
* Cursor
|
|
88
|
-
* GitHub Copilot (via `.github/skills`)
|
|
89
|
-
* Any agent that supports the skills format
|
|
90
|
-
|
|
91
|
-
***
|
|
92
|
-
|
|
93
|
-
## When to use which
|
|
94
|
-
|
|
95
|
-
Use bundled docs when:
|
|
96
|
-
|
|
97
|
-
* Your agent can read files in the local project
|
|
98
|
-
* You want version-matched docs from the installed c15t packages
|
|
99
|
-
* You want a package-local README that tells the agent which detailed docs to read first
|
|
100
|
-
* You want concrete guidance for consent management, cookie banners, consent dialogs, preference centers, script loading, callbacks, and integrations
|
|
101
|
-
|
|
102
|
-
Use agent skills when:
|
|
103
|
-
|
|
104
|
-
* Your tool supports the skills ecosystem
|
|
105
|
-
* You want reusable workflows and tool-specific guidance that can point back to the installed package README files
|
|
106
|
-
|
|
107
|
-
Use both when:
|
|
108
|
-
|
|
109
|
-
* Your tool supports both local file context and skills
|
|
110
|
-
* You want local package docs plus reusable setup and configuration help
|
|
111
|
-
* You want the bundled package docs as the source of truth plus a reusable decision tree for customization
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
title: ConsentDialogTrigger
|
|
3
|
-
description: A floating, draggable button that lets users re-open the consent dialog at any time.
|
|
4
|
-
---
|
|
5
|
-
`ConsentDialogTrigger` is a floating button that opens the consent dialog when clicked. Users can drag it to any corner of the screen, and the position persists across sessions. Use it to give users a persistent way to manage their privacy settings.
|
|
6
|
-
|
|
7
|
-
## Basic Usage
|
|
8
|
-
|
|
9
|
-
Use standalone or via the `showTrigger` prop on `ConsentDialog`:
|
|
10
|
-
|
|
11
|
-
```tsx
|
|
12
|
-
import { ConsentDialogTrigger } from '@c15t/react';
|
|
13
|
-
|
|
14
|
-
// Standalone
|
|
15
|
-
<ConsentDialogTrigger />
|
|
16
|
-
|
|
17
|
-
// Via ConsentDialog
|
|
18
|
-
<ConsentDialog showTrigger />
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
For inline footer links (instead of a floating button), use [`ConsentDialogLink`](/docs/frameworks/react/components/consent-dialog-link).
|
|
22
|
-
|
|
23
|
-
## Icon Options
|
|
24
|
-
|
|
25
|
-
```tsx
|
|
26
|
-
{/* Built-in icons */}
|
|
27
|
-
<ConsentDialogTrigger icon="branding" /> {/* c15t logo (default) */}
|
|
28
|
-
<ConsentDialogTrigger icon="fingerprint" /> {/* Privacy icon */}
|
|
29
|
-
<ConsentDialogTrigger icon="settings" /> {/* Gear icon */}
|
|
30
|
-
|
|
31
|
-
{/* Custom icon */}
|
|
32
|
-
<ConsentDialogTrigger icon={<MyCustomIcon />} />
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
## Visibility
|
|
36
|
-
|
|
37
|
-
Control when the trigger is visible:
|
|
38
|
-
|
|
39
|
-
```tsx
|
|
40
|
-
{/* Always visible (default) */}
|
|
41
|
-
<ConsentDialogTrigger showWhen="always" />
|
|
42
|
-
|
|
43
|
-
{/* Only after user has made a consent choice */}
|
|
44
|
-
<ConsentDialogTrigger showWhen="after-consent" />
|
|
45
|
-
|
|
46
|
-
{/* Hidden (control visibility programmatically) */}
|
|
47
|
-
<ConsentDialogTrigger showWhen="never" />
|
|
48
|
-
```
|
|
49
|
-
|
|
50
|
-
## Position
|
|
51
|
-
|
|
52
|
-
Set the default corner and control persistence:
|
|
53
|
-
|
|
54
|
-
```tsx
|
|
55
|
-
<ConsentDialogTrigger
|
|
56
|
-
defaultPosition="bottom-left"
|
|
57
|
-
persistPosition={true} // Remembers user's drag position
|
|
58
|
-
onPositionChange={(position) => console.log('Moved to:', position)}
|
|
59
|
-
/>
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
## Size
|
|
63
|
-
|
|
64
|
-
```tsx
|
|
65
|
-
<ConsentDialogTrigger size="sm" /> {/* Small */}
|
|
66
|
-
<ConsentDialogTrigger size="md" /> {/* Medium (default) */}
|
|
67
|
-
<ConsentDialogTrigger size="lg" /> {/* Large */}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Compound Components
|
|
71
|
-
|
|
72
|
-
Build fully custom trigger layouts using sub-components:
|
|
73
|
-
|
|
74
|
-
```tsx
|
|
75
|
-
<ConsentDialogTrigger.Root defaultPosition="bottom-right">
|
|
76
|
-
<ConsentDialogTrigger.Button size="md">
|
|
77
|
-
<ConsentDialogTrigger.Icon icon="settings" />
|
|
78
|
-
<ConsentDialogTrigger.Text>Privacy</ConsentDialogTrigger.Text>
|
|
79
|
-
</ConsentDialogTrigger.Button>
|
|
80
|
-
</ConsentDialogTrigger.Root>
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
* `ConsentDialogTrigger.Root` — Portal wrapper with drag handling and position persistence
|
|
84
|
-
* `ConsentDialogTrigger.Button` — Draggable button element with size variants
|
|
85
|
-
* `ConsentDialogTrigger.Icon` — Icon display (branding, fingerprint, settings, or custom)
|
|
86
|
-
* `ConsentDialogTrigger.Text` — Optional text label
|
|
87
|
-
|
|
88
|
-
## Props
|
|
89
|
-
|
|
90
|
-
### ConsentDialogTriggerProps
|
|
91
|
-
|
|
92
|
-
|Property|Type|Description|Default|Required|
|
|
93
|
-
|:--|:--|:--|:--|:--:|
|
|
94
|
-
|icon|TriggerIcon|Icon to display in the trigger button.|'branding'|Optional|
|
|
95
|
-
|defaultPosition|CornerPosition \|undefined|Default corner position for the trigger. User can drag to any corner and the position will be remembered.|'bottom-right'|Optional|
|
|
96
|
-
|persistPosition|boolean \|undefined|Whether to persist the user's position preference in localStorage.|true|Optional|
|
|
97
|
-
|ariaLabel|string \|undefined|Accessible label for the trigger button.|'Open privacy settings'|Optional|
|
|
98
|
-
|className|string \|undefined|Additional CSS class names.|-|Optional|
|
|
99
|
-
|noStyle|boolean \|undefined|When true, removes default styling.|false|Optional|
|
|
100
|
-
|showWhen|TriggerVisibility \|undefined|Controls when the trigger is visible.|'always'|Optional|
|
|
101
|
-
|size|TriggerSize \|undefined|Size of the trigger button.|'md'|Optional|
|
|
102
|
-
|onClick|(() => void) \|undefined|Callback fired when the trigger is clicked (before opening dialog).|-|Optional|
|
|
103
|
-
|onPositionChange|((position: CornerPosition) => void) \|undefined|Callback fired when the corner position changes.|-|Optional|
|