@c15t/react 3.0.0-alpha.1 → 3.0.0-alpha.11
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 +97 -70
- package/README.md +21 -17
- package/SKILL.md +34 -0
- package/dist/aggregate-components.js +1 -1
- package/dist/chunk-warming.js +1 -1
- package/dist/component-hooks/use-headless-consent-ui.js +1 -1
- package/dist/component-hooks/use-headless-iab-consent-ui.js +1 -1
- package/dist/component-hooks/use-panel-trigger.js +1 -1
- package/dist/components/consent-gate/atoms.js +1 -0
- package/dist/components/consent-gate/consent-gate.js +2 -0
- package/dist/components/consent-gate/frame.js +2 -0
- package/dist/components/consent-gate/index.js +2 -0
- package/dist/components/consent-preferences-link/consent-preferences-link.js +1 -1
- package/dist/components/iab-panel/atoms/card.js +1 -1
- package/dist/components/iab-panel/atoms/feature-item.js +2 -0
- package/dist/components/iab-panel/atoms/header.js +1 -1
- package/dist/components/iab-panel/atoms/purpose-item.js +1 -1
- package/dist/components/iab-panel/atoms/root.js +1 -1
- package/dist/components/iab-panel/atoms/stack-item.js +1 -1
- package/dist/components/iab-panel/atoms/vendor-list.js +1 -1
- package/dist/components/iab-panel/hooks/use-gvl-data.js +1 -1
- package/dist/components/iab-panel/iab-panel.js +1 -1
- package/dist/components/iab-panel/index.js +1 -1
- package/dist/components/iab-prompt/atoms/overlay.js +1 -1
- package/dist/components/iab-prompt/atoms/root.js +1 -1
- package/dist/components/iab-prompt/iab-prompt.js +1 -1
- package/dist/components/panel/atoms/card.js +1 -1
- package/dist/components/panel/atoms/overlay.js +1 -1
- package/dist/components/panel/atoms/root.js +1 -1
- package/dist/components/panel/panel.js +1 -1
- package/dist/components/panel-trigger/atoms/button.js +1 -1
- package/dist/components/panel-trigger/atoms/icon.js +1 -1
- package/dist/components/panel-trigger/atoms/root.js +1 -1
- package/dist/components/panel-trigger/atoms/toolbar.js +1 -1
- package/dist/components/panel-trigger/atoms/trigger-icons.js +1 -0
- package/dist/components/panel-trigger/panel-trigger-toolbar.js +1 -1
- package/dist/components/panel-trigger/panel-trigger.js +1 -1
- package/dist/components/panel-trigger/toolbar-loader.js +2 -0
- package/dist/components/preferences/atoms/accordion.js +1 -1
- package/dist/components/preferences/atoms/root.js +1 -1
- package/dist/components/preferences/atoms/vendor-list.js +1 -0
- package/dist/components/preferences/index.js +1 -1
- package/dist/components/prompt/atoms/early-tap-script.js +2 -0
- package/dist/components/prompt/atoms/overlay.js +1 -1
- package/dist/components/prompt/atoms/root.js +1 -1
- package/dist/components/prompt/components.js +1 -1
- package/dist/components/prompt/policy-actions.js +1 -1
- package/dist/components/prompt/prompt.js +1 -1
- package/dist/components/shared/dialog-sheets.js +1 -0
- package/dist/components/shared/first-paint-sheets.js +1 -0
- package/dist/components/shared/iab-dialog-sheets.js +1 -0
- package/dist/components/shared/iab-first-paint-sheets.js +1 -0
- package/dist/components/shared/libs/compose-refs.js +1 -0
- package/dist/components/shared/libs/slot.js +1 -1
- package/dist/components/shared/primitives/button.js +1 -1
- package/dist/components/shared/primitives/legal-links/index.js +1 -1
- package/dist/components/shared/streamed-surface.js +2 -0
- package/dist/components/shared/surface-styles.js +2 -0
- package/dist/components/shared/ui/dialog/dialog.js +1 -1
- package/dist/components/shared/ui/icon.js +1 -1
- package/dist/components/shared/ui/logo.js +1 -1
- package/dist/components/shared/ui/preference-item/preference-item.js +1 -1
- package/dist/consent-gate.js +2 -0
- package/dist/consent-theme.js +1 -0
- package/dist/context/consent-tracking-context.js +1 -1
- package/dist/context/index.js +1 -1
- package/dist/context.js +1 -1
- package/dist/devtools-launcher.js +2 -0
- package/dist/devtools.js +1 -1
- package/dist/draft-context.js +2 -0
- package/dist/draft.js +1 -1
- package/dist/external-iab-context.js +1 -1
- package/dist/gpp.js +2 -0
- package/dist/headless.js +1 -1
- package/dist/hooks/use-color-scheme.js +1 -1
- package/dist/hooks/use-committed-ref.js +2 -0
- package/dist/hooks/use-focus-trap.js +1 -1
- package/dist/hooks/use-headless-iab-consent-ui.js +1 -1
- package/dist/hooks/use-iab-policy-guard.js +1 -0
- package/dist/hooks/use-late-entry.js +2 -0
- package/dist/hooks.js +1 -1
- package/dist/iab/styles.tw3.css +5 -45
- package/dist/iab-context.js +1 -1
- package/dist/iab-dialog-deferred.js +2 -0
- package/dist/iab.js +1 -1
- package/dist/index-parts/consent-banner.js +1 -0
- package/dist/index-parts/consent-dialog-link.js +1 -0
- package/dist/index-parts/consent-dialog-trigger.js +1 -0
- package/dist/index-parts/consent-dialog.js +1 -0
- package/dist/index-parts/consent-gate.js +1 -0
- package/dist/index-parts/core.js +1 -0
- package/dist/index-parts/draft.js +1 -0
- package/dist/index-parts/frame.js +1 -0
- package/dist/index-parts/hooks.js +1 -0
- package/dist/index-parts/hosted.js +1 -0
- package/dist/index-parts/module-hooks.js +1 -0
- package/dist/index-parts/offline.js +1 -0
- package/dist/index-parts/presets.js +1 -0
- package/dist/index-parts/provider.js +1 -0
- package/dist/index-parts/theme.js +1 -0
- package/dist/index-parts/translations.js +1 -0
- package/dist/index.js +1 -1
- package/dist/kernel-selector.js +1 -0
- package/dist/modes.js +1 -0
- package/dist/module-hooks/iframe-blocker.js +1 -1
- package/dist/module-hooks/network-blocker.js +1 -1
- package/dist/module-hooks/network-hold.js +2 -0
- package/dist/module-hooks/persistence.js +1 -1
- package/dist/panel-link.js +1 -1
- package/dist/panel-trigger.js +1 -1
- package/dist/panel.js +1 -1
- package/dist/postcss-tailwind3.js +1 -0
- package/dist/preferences.js +1 -2
- package/dist/provider.js +1 -1
- package/dist/server/fetch-ssr-data.js +1 -1
- package/dist/server/headers.js +1 -1
- package/dist/server/normalize-url.js +1 -1
- package/dist/styles.tw3.css +33 -51
- package/dist/transports/hosted.js +1 -0
- package/dist/transports/manifest.js +1 -0
- package/dist/transports/offline.js +1 -1
- package/dist/utils/deferred-module.js +2 -0
- package/dist/utils/merge-slot-props.js +1 -1
- package/dist/utils/theme-utils.js +1 -1
- package/dist/version.js +1 -1
- package/dist-types/aggregate-components.d.ts +2 -2
- package/dist-types/chunk-warming.d.ts +42 -8
- package/dist-types/component-hooks/use-headless-consent-ui.d.ts +5 -5
- package/dist-types/component-hooks/use-headless-iab-consent-ui.d.ts +2 -2
- package/dist-types/components/consent-gate/atoms.d.ts +11 -0
- package/dist-types/components/consent-gate/consent-gate.d.ts +2 -0
- package/dist-types/components/consent-gate/frame.d.ts +19 -0
- package/dist-types/components/consent-gate/index.d.ts +25 -0
- package/dist-types/components/{frame → consent-gate}/types.d.ts +7 -7
- package/dist-types/components/consent-preferences-link/consent-preferences-link.d.ts +1 -1
- package/dist-types/components/consent-preferences-link/index.d.ts +1 -1
- package/dist-types/components/iab-panel/atoms/feature-item.d.ts +28 -0
- package/dist-types/components/iab-panel/atoms/purpose-item.d.ts +5 -2
- package/dist-types/components/iab-panel/atoms/stack-item.d.ts +7 -2
- package/dist-types/components/iab-panel/atoms/vendor-list.d.ts +1 -1
- package/dist-types/components/iab-panel/iab-panel.d.ts +3 -3
- package/dist-types/components/iab-panel/index.d.ts +29 -26
- package/dist-types/components/iab-panel/use-iab-translations.d.ts +4 -0
- package/dist-types/components/iab-prompt/iab-prompt.d.ts +3 -3
- package/dist-types/components/iab-prompt/index.d.ts +19 -19
- package/dist-types/components/panel/atoms/card.d.ts +5 -4
- package/dist-types/components/panel/atoms/overlay.d.ts +1 -1
- package/dist-types/components/panel/index.d.ts +8 -8
- package/dist-types/components/panel/panel.d.ts +3 -3
- package/dist-types/components/panel-link/index.d.ts +1 -1
- package/dist-types/components/panel-trigger/atoms/button.d.ts +1 -1
- package/dist-types/components/panel-trigger/atoms/icon.d.ts +1 -1
- package/dist-types/components/panel-trigger/atoms/root.d.ts +2 -2
- package/dist-types/components/panel-trigger/atoms/toolbar.d.ts +2 -2
- package/dist-types/components/panel-trigger/atoms/trigger-icons.d.ts +25 -0
- package/dist-types/components/panel-trigger/index.d.ts +4 -4
- package/dist-types/components/panel-trigger/panel-trigger-toolbar.d.ts +1 -1
- package/dist-types/components/panel-trigger/panel-trigger.d.ts +9 -17
- package/dist-types/components/panel-trigger/toolbar-loader.d.ts +34 -0
- package/dist-types/components/panel-trigger/types.d.ts +1 -1
- package/dist-types/components/preferences/atoms/accordion.d.ts +6 -4
- package/dist-types/components/preferences/atoms/button.d.ts +1 -1
- package/dist-types/components/preferences/atoms/footer.d.ts +1 -1
- package/dist-types/components/preferences/atoms/root.d.ts +1 -1
- package/dist-types/components/preferences/atoms/vendor-list.d.ts +23 -0
- package/dist-types/components/preferences/index.d.ts +14 -12
- package/dist-types/components/preferences/policy-actions.d.ts +2 -2
- package/dist-types/components/preferences/preferences.d.ts +1 -1
- package/dist-types/components/preferences/types.d.ts +1 -1
- package/dist-types/components/prompt/atoms/early-tap-script.d.ts +17 -0
- package/dist-types/components/prompt/atoms/root.d.ts +4 -0
- package/dist-types/components/prompt/components.d.ts +9 -3
- package/dist-types/components/prompt/index.d.ts +12 -12
- package/dist-types/components/prompt/policy-actions.d.ts +2 -2
- package/dist-types/components/prompt/prompt.d.ts +5 -1
- package/dist-types/components/shared/dialog-sheets.d.ts +9 -0
- package/dist-types/components/shared/first-paint-sheets.d.ts +8 -0
- package/dist-types/components/shared/iab-dialog-sheets.d.ts +3 -0
- package/dist-types/components/shared/iab-first-paint-sheets.d.ts +3 -0
- package/dist-types/components/shared/libs/compose-refs.d.ts +20 -0
- package/dist-types/components/shared/policy-actions.d.ts +2 -2
- package/dist-types/components/shared/primitives/box.d.ts +1 -1
- package/dist-types/components/shared/primitives/button.d.ts +2 -2
- package/dist-types/components/shared/primitives/button.types.d.ts +1 -1
- package/dist-types/components/shared/streamed-surface.d.ts +23 -0
- package/dist-types/components/shared/surface-styles.d.ts +60 -0
- package/dist-types/components/shared/ui/accordion/accordion.d.ts +2 -2
- package/dist-types/components/shared/ui/accordion/index.d.ts +2 -2
- package/dist-types/components/shared/ui/animated-collapse/index.d.ts +2 -2
- package/dist-types/components/shared/ui/branding.d.ts +1 -1
- package/dist-types/components/shared/ui/button/button.d.ts +1 -1
- package/dist-types/components/shared/ui/button/index.d.ts +2 -2
- package/dist-types/components/shared/ui/collapsible/index.d.ts +1 -1
- package/dist-types/components/shared/ui/dialog/index.d.ts +1 -1
- package/dist-types/components/shared/ui/icon.d.ts +2 -1
- package/dist-types/components/shared/ui/logo.d.ts +0 -10
- package/dist-types/components/shared/ui/preference-item/index.d.ts +1 -1
- package/dist-types/components/shared/ui/preference-item/preference-item.d.ts +13 -0
- package/dist-types/components/shared/ui/switch/index.d.ts +2 -2
- package/dist-types/components/shared/ui/switch/switch.d.ts +1 -1
- package/dist-types/components/shared/ui/tabs/index.d.ts +1 -1
- package/dist-types/consent-gate.d.ts +1 -0
- package/dist-types/consent-theme.d.ts +38 -0
- package/dist-types/context/consent-tracking-context.d.ts +10 -0
- package/dist-types/context/index.d.ts +3 -3
- package/dist-types/context/theme-context.d.ts +3 -3
- package/dist-types/context.d.ts +25 -1
- package/dist-types/devtools-launcher.d.ts +29 -0
- package/dist-types/devtools.d.ts +13 -2
- package/dist-types/draft-context.d.ts +31 -0
- package/dist-types/draft.d.ts +81 -9
- package/dist-types/gpp.d.ts +27 -0
- package/dist-types/headless.d.ts +6 -7
- package/dist-types/hooks/use-committed-ref.d.ts +24 -0
- package/dist-types/hooks/use-focus-trap.d.ts +3 -1
- package/dist-types/hooks/use-headless-iab-consent-ui.d.ts +1 -1
- package/dist-types/hooks/use-iab-manager.d.ts +5 -5
- package/dist-types/hooks/use-iab-policy-guard.d.ts +35 -0
- package/dist-types/hooks/use-late-entry.d.ts +14 -0
- package/dist-types/hooks/use-theme.d.ts +1 -1
- package/dist-types/hooks.d.ts +106 -11
- package/dist-types/iab-dialog-deferred.d.ts +36 -0
- package/dist-types/iab.d.ts +8 -7
- package/dist-types/index-parts/consent-banner.d.ts +7 -0
- package/dist-types/index-parts/consent-dialog-link.d.ts +7 -0
- package/dist-types/index-parts/consent-dialog-trigger.d.ts +7 -0
- package/dist-types/index-parts/consent-dialog.d.ts +7 -0
- package/dist-types/index-parts/consent-gate.d.ts +7 -0
- package/dist-types/index-parts/core.d.ts +7 -0
- package/dist-types/index-parts/draft.d.ts +7 -0
- package/dist-types/index-parts/frame.d.ts +7 -0
- package/dist-types/index-parts/hooks.d.ts +7 -0
- package/dist-types/index-parts/hosted.d.ts +7 -0
- package/dist-types/index-parts/module-hooks.d.ts +7 -0
- package/dist-types/index-parts/offline.d.ts +7 -0
- package/dist-types/index-parts/presets.d.ts +7 -0
- package/dist-types/index-parts/provider.d.ts +7 -0
- package/dist-types/index-parts/theme.d.ts +8 -0
- package/dist-types/index-parts/translations.d.ts +7 -0
- package/dist-types/index.d.ts +32 -28
- package/dist-types/kernel-selector.d.ts +68 -0
- package/dist-types/modes.d.ts +26 -0
- package/dist-types/module-hooks/iframe-blocker.d.ts +33 -1
- package/dist-types/module-hooks/network-blocker.d.ts +23 -0
- package/dist-types/module-hooks/network-hold.d.ts +47 -0
- package/dist-types/module-hooks.d.ts +4 -4
- package/dist-types/panel-link.d.ts +1 -1
- package/dist-types/panel-trigger.d.ts +1 -1
- package/dist-types/panel.d.ts +13 -1
- package/dist-types/postcss-tailwind3.d.ts +21 -0
- package/dist-types/preferences.d.ts +12 -1
- package/dist-types/primitives/accordion.d.ts +1 -1
- package/dist-types/primitives/button.d.ts +1 -1
- package/dist-types/primitives/collapsible.d.ts +1 -1
- package/dist-types/primitives/dialog.d.ts +1 -1
- package/dist-types/primitives/preference-item.d.ts +1 -1
- package/dist-types/primitives/switch.d.ts +1 -1
- package/dist-types/primitives/tabs.d.ts +1 -1
- package/dist-types/primitives.d.ts +7 -7
- package/dist-types/prompt.d.ts +1 -1
- package/dist-types/provider.d.ts +169 -28
- package/dist-types/server/fetch-ssr-data.d.ts +1 -1
- package/dist-types/server/headers.d.ts +14 -4
- package/dist-types/server/index.d.ts +5 -5
- package/dist-types/server/normalize-url.d.ts +14 -7
- package/dist-types/server/types.d.ts +12 -1
- package/dist-types/theme-provider.d.ts +2 -2
- package/dist-types/transports/hosted.d.ts +36 -0
- package/dist-types/transports/manifest.d.ts +48 -0
- package/dist-types/transports/offline.d.ts +7 -16
- package/dist-types/types/index.d.ts +3 -3
- package/dist-types/types/manager.d.ts +1 -1
- package/dist-types/types/theme/index.d.ts +1 -1
- package/dist-types/ui-config-context.d.ts +14 -2
- package/dist-types/utils/deferred-module.d.ts +13 -0
- package/dist-types/utils/index.d.ts +4 -4
- package/dist-types/utils/merge-slot-props.d.ts +17 -3
- package/dist-types/utils/merge-styles.d.ts +1 -1
- package/dist-types/utils/theme-utils.d.ts +18 -3
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +97 -70
- package/docs/assets/v3/bottom-bar.png +0 -0
- package/docs/assets/v3/brand-card.png +0 -0
- package/docs/assets/v3/brand-preferences.png +0 -0
- package/docs/assets/v3/choice-wall.png +0 -0
- package/docs/assets/v3/headless-bar-html.png +0 -0
- package/docs/assets/v3/headless-bar-mobile.png +0 -0
- package/docs/assets/v3/headless-bar.png +0 -0
- package/docs/assets/v3/slim-bar.png +0 -0
- package/docs/concepts/choose-your-setup.md +141 -0
- package/docs/concepts/consent-categories.md +84 -0
- package/docs/concepts/consent-state.md +421 -0
- package/docs/concepts/data-fetching.md +284 -0
- package/docs/concepts/how-consent-works.md +123 -0
- package/docs/concepts/modes.md +281 -0
- package/docs/{frameworks/react/concepts/policy-presets.md → concepts/policies.md} +8 -60
- package/docs/customization/class-names.md +202 -0
- package/docs/customization/dark-mode.md +157 -0
- package/docs/customization/motion.md +128 -0
- package/docs/customization/overview.md +68 -33
- package/docs/customization/recipes.md +838 -47
- package/docs/customization/slots.md +217 -35
- package/docs/customization/stylesheets.md +248 -0
- package/docs/customization/tailwind.md +863 -0
- package/docs/customization/tokens.md +167 -36
- package/docs/customization/translations.md +87 -3
- package/docs/frameworks/react/callbacks.md +118 -0
- package/docs/frameworks/react/clear-on-revocation.md +106 -0
- package/docs/frameworks/react/components/consent-banner.md +48 -27
- package/docs/frameworks/react/components/consent-dialog-link.md +13 -11
- package/docs/frameworks/react/components/consent-dialog-trigger.md +86 -76
- package/docs/frameworks/react/components/consent-dialog.md +111 -58
- package/docs/frameworks/react/components/{frame.md → consent-gate.md} +70 -49
- package/docs/frameworks/react/components/consent-provider.md +143 -0
- package/docs/frameworks/react/components/consent-widget.md +69 -24
- package/docs/frameworks/react/components/dev-tools.md +76 -85
- package/docs/frameworks/react/components.md +113 -0
- package/docs/frameworks/react/compose.md +354 -0
- package/docs/frameworks/react/content-security-policy.md +149 -0
- package/docs/frameworks/react/customize.md +258 -0
- package/docs/frameworks/react/embeds.md +89 -0
- package/docs/frameworks/react/gpp.md +163 -0
- package/docs/frameworks/react/headless.md +4 -4
- package/docs/frameworks/react/hooks.md +70 -0
- package/docs/frameworks/react/iab.md +278 -0
- package/docs/frameworks/react/network-blocker.md +140 -0
- package/docs/frameworks/react/quickstart.md +171 -107
- package/docs/frameworks/react/rendering.md +285 -0
- package/docs/frameworks/react/scripts.md +114 -0
- package/docs/frameworks/react/translations.md +155 -0
- package/docs/frameworks/react/troubleshooting.md +189 -61
- package/docs/frameworks/react/upgrade-v3.md +652 -0
- package/docs/frameworks/react/vendor-consent.md +188 -0
- package/docs/guides/banner-experiments.md +688 -0
- package/docs/guides/troubleshooting.md +192 -54
- package/docs/guides/verify-consent.md +96 -49
- package/docs/integrations/adobe-analytics.md +177 -183
- package/docs/integrations/ahrefs-analytics.md +162 -178
- package/docs/integrations/amplitude.md +172 -180
- package/docs/integrations/building-integrations.md +137 -33
- package/docs/integrations/clearbit.md +164 -178
- package/docs/integrations/cloudflare-web-analytics.md +166 -180
- package/docs/integrations/cloudflare-zaraz.md +333 -0
- package/docs/integrations/crisp.md +174 -182
- package/docs/integrations/databuddy.md +167 -197
- package/docs/integrations/fathom-analytics.md +168 -180
- package/docs/integrations/front-chat.md +308 -0
- package/docs/integrations/google-maps.md +142 -108
- package/docs/integrations/google-tag-manager.md +258 -185
- package/docs/integrations/google-tag.md +226 -182
- package/docs/integrations/heap.md +173 -179
- package/docs/integrations/hightouch.md +171 -181
- package/docs/integrations/hotjar.md +169 -179
- package/docs/integrations/intercom.md +193 -177
- package/docs/integrations/klaviyo.md +473 -0
- package/docs/integrations/linkedin-insights.md +184 -174
- package/docs/integrations/logrocket.md +170 -180
- package/docs/integrations/matomo-analytics.md +198 -202
- package/docs/integrations/meta-pixel.md +198 -174
- package/docs/integrations/microsoft-clarity.md +173 -179
- package/docs/integrations/microsoft-uet.md +158 -178
- package/docs/integrations/mixpanel-analytics.md +165 -184
- package/docs/integrations/one-dollar-stats.md +292 -0
- package/docs/integrations/openai-pixel.md +214 -325
- package/docs/integrations/overview.md +153 -83
- package/docs/integrations/pinterest-tag.md +315 -0
- package/docs/integrations/pirsch.md +179 -183
- package/docs/integrations/plausible-analytics.md +182 -182
- package/docs/integrations/posthog.md +323 -264
- package/docs/integrations/promptwatch.md +164 -178
- package/docs/integrations/reddit-pixel.md +195 -181
- package/docs/integrations/rudderstack.md +211 -210
- package/docs/integrations/rybbit-analytics.md +181 -184
- package/docs/integrations/segment.md +192 -178
- package/docs/integrations/sentry.md +402 -0
- package/docs/integrations/snapchat-pixel.md +196 -180
- package/docs/integrations/tiktok-pixel.md +181 -174
- package/docs/integrations/umami-analytics.md +173 -182
- package/docs/integrations/vercel-analytics.md +176 -181
- package/docs/integrations/vercel-speed-insights.md +306 -0
- package/docs/integrations/x-pixel.md +186 -174
- package/docs/integrations/youtube.md +150 -111
- package/package.json +48 -17
- package/dist/component-hooks/use-manager.js +0 -2
- package/dist/components/frame/atoms.js +0 -1
- package/dist/components/frame/frame.js +0 -2
- package/dist/components/frame/index.js +0 -2
- package/dist/frame.js +0 -2
- package/dist/ui-save.js +0 -1
- package/dist-types/component-hooks/use-manager.d.ts +0 -40
- package/dist-types/components/frame/atoms.d.ts +0 -11
- package/dist-types/components/frame/frame.d.ts +0 -2
- package/dist-types/components/frame/index.d.ts +0 -24
- package/dist-types/frame.d.ts +0 -1
- package/dist-types/ui-save.d.ts +0 -5
- package/docs/assets/v3/brand-bar.png +0 -0
- package/docs/assets/v3/mobile-card.png +0 -0
- package/docs/assets/v3/preferences.png +0 -0
- package/docs/frameworks/react/components/consent-manager-provider.md +0 -71
- package/docs/frameworks/react/concepts/consent-categories.md +0 -33
- package/docs/frameworks/react/hooks/use-consent-manager/overview.md +0 -58
- package/docs/frameworks/react/iab/overview.md +0 -53
- package/docs/frameworks/react/script-loader.md +0 -63
- package/docs/frameworks/react/styling/overview.md +0 -217
- package/docs/guides/consent-state.md +0 -60
- package/docs/guides/data-fetching.md +0 -163
- package/docs/guides/deployment-modes.md +0 -63
- package/docs/integrations/clear-on-revocation.md +0 -167
- package/docs/upgrade-v3.md +0 -334
- package/readme.json +0 -48
- package/src/iab/styles.css +0 -11
- package/src/styles.css +0 -10
- /package/dist/components/{frame → consent-gate}/types.js +0 -0
|
@@ -12,9 +12,20 @@ import type { Overrides, SSRInitialData } from '@c15t/core';
|
|
|
12
12
|
export interface FetchSSRDataOptionsBase {
|
|
13
13
|
/**
|
|
14
14
|
* The backend URL to fetch consent data from.
|
|
15
|
-
* Can be absolute (https://...) or relative (/api/consent).
|
|
15
|
+
* Can be absolute (https://...) or relative (/api/consent). A relative
|
|
16
|
+
* URL resolves against the request's `host` header.
|
|
16
17
|
*/
|
|
17
18
|
backendURL: string;
|
|
19
|
+
/**
|
|
20
|
+
* Resolve a relative `backendURL` against the request's `forwarded`,
|
|
21
|
+
* `x-forwarded-host` and `x-forwarded-proto` headers instead of `host`.
|
|
22
|
+
* Any client can send those headers, so set this only behind a proxy
|
|
23
|
+
* that sets them and drops incoming ones. Also forwards those three
|
|
24
|
+
* headers to the backend, which is skipped otherwise.
|
|
25
|
+
*
|
|
26
|
+
* @default false
|
|
27
|
+
*/
|
|
28
|
+
trustForwardedHeaders?: boolean;
|
|
18
29
|
/**
|
|
19
30
|
* Optional overrides for geo-location.
|
|
20
31
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ThemeContextValue } from './context/theme-context';
|
|
3
|
-
import type { V3UIConfigValue } from './ui-config-context';
|
|
2
|
+
import type { ThemeContextValue } from './context/theme-context.js';
|
|
3
|
+
import type { V3UIConfigValue } from './ui-config-context.js';
|
|
4
4
|
interface V3ThemeProviderProps {
|
|
5
5
|
themeConfig: ThemeContextValue;
|
|
6
6
|
uiConfig: V3UIConfigValue;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { HostedModeFactory, HostedModeOptions } from '@c15t/core';
|
|
2
|
+
/** Options for {@link hosted}. `backendURL` defaults to the build's. */
|
|
3
|
+
export type HostedOptions = Omit<HostedModeOptions, 'backendURL'> & {
|
|
4
|
+
/**
|
|
5
|
+
* Backend URL, relative (`/api/c15t`) or absolute. Defaults to the URL
|
|
6
|
+
* `consentManifest()` from `c15t/build` read from
|
|
7
|
+
* `VITE_C15T_BACKEND_URL` or `VITE_INTH_PROJECT_URL`.
|
|
8
|
+
*/
|
|
9
|
+
backendURL?: string;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Build a hosted factory, taking the backend URL from the build when the
|
|
13
|
+
* options name none.
|
|
14
|
+
*
|
|
15
|
+
* @param options - The page's options.
|
|
16
|
+
* @param buildBackendURL - The backend URL the build read, if any.
|
|
17
|
+
* @returns A hosted transport factory.
|
|
18
|
+
* @throws {Error} When neither names a backend URL.
|
|
19
|
+
* @internal
|
|
20
|
+
*/
|
|
21
|
+
export declare const hostedWithBuild: (options: HostedOptions, buildBackendURL: string | undefined) => HostedModeFactory;
|
|
22
|
+
/**
|
|
23
|
+
* Ask the backend's `/init` for every visitor's policy.
|
|
24
|
+
*
|
|
25
|
+
* @param options - Backend URL, init headers and request overrides.
|
|
26
|
+
* @returns A transport factory for the provider's `mode`, carrying its
|
|
27
|
+
* options.
|
|
28
|
+
* @throws {Error} When no backend URL is passed and the build set none.
|
|
29
|
+
* @example
|
|
30
|
+
* ```tsx
|
|
31
|
+
* import { ConsentProvider, hosted } from 'c15t/react';
|
|
32
|
+
*
|
|
33
|
+
* <ConsentProvider options={{ mode: hosted() }}>{children}</ConsentProvider>;
|
|
34
|
+
* ```
|
|
35
|
+
*/
|
|
36
|
+
export declare const hosted: (options?: HostedOptions) => HostedModeFactory;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { BrowserManifestModeFactory, BrowserManifestOptions } from '@c15t/core/transports/manifest-browser';
|
|
2
|
+
/**
|
|
3
|
+
* Manifest mode for the React provider: core's browser resolver, with the
|
|
4
|
+
* policy and backend URL the build integration downloaded as defaults.
|
|
5
|
+
*/
|
|
6
|
+
import type { ConsentManifest } from '@c15t/schema/types';
|
|
7
|
+
/** What a build integration downloaded, as `@c15t/core/generated` exports it. */
|
|
8
|
+
export interface BuildOutput {
|
|
9
|
+
backendURL?: string;
|
|
10
|
+
snapshot?: ConsentManifest;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Fill the options the page left out from the build: the backend URL that
|
|
14
|
+
* saves go to, and the snapshot unless the page passed one, a
|
|
15
|
+
* `manifestURL`, or `source: 'runtime'`.
|
|
16
|
+
*
|
|
17
|
+
* @param options - The page's options.
|
|
18
|
+
* @param build - What the build downloaded.
|
|
19
|
+
* @returns The options `manifest()` resolves with.
|
|
20
|
+
* @internal
|
|
21
|
+
*/
|
|
22
|
+
export declare const withBuildDefaults: (options: BrowserManifestOptions, build: BuildOutput) => BrowserManifestOptions;
|
|
23
|
+
/**
|
|
24
|
+
* Resolve the policy in the browser from the backend's consent manifest.
|
|
25
|
+
*
|
|
26
|
+
* Without options it uses what `consentManifest()` from `c15t/build`
|
|
27
|
+
* downloaded: the snapshot and the backend URL from
|
|
28
|
+
* `VITE_C15T_BACKEND_URL` or `VITE_INTH_PROJECT_URL`, both served as
|
|
29
|
+
* `c15t/generated`. Without a
|
|
30
|
+
* snapshot, such as in dev after a failed fetch, it fetches
|
|
31
|
+
* `${backendURL}/manifest` at runtime. Saves go to the backend either way.
|
|
32
|
+
* With `manifestURL` or `source: 'runtime'`, also pass `source: 'runtime'`
|
|
33
|
+
* to `consentManifest()`, so the build downloads no snapshot.
|
|
34
|
+
*
|
|
35
|
+
* @param options - Overrides: your own `snapshot`, `source: 'runtime'`, a
|
|
36
|
+
* `manifestURL`, a `backendURL`, or the visitor's location as `inputs`.
|
|
37
|
+
* @returns A transport factory for the provider's `mode`, carrying its
|
|
38
|
+
* options.
|
|
39
|
+
* @throws {Error} When no snapshot, manifest URL or backend URL is known.
|
|
40
|
+
* @example
|
|
41
|
+
* ```tsx
|
|
42
|
+
* import { ConsentProvider, manifest } from 'c15t/react';
|
|
43
|
+
*
|
|
44
|
+
* <ConsentProvider options={{ mode: manifest() }}>{children}</ConsentProvider>;
|
|
45
|
+
* ```
|
|
46
|
+
*/
|
|
47
|
+
export declare const manifest: (options?: BrowserManifestOptions) => BrowserManifestModeFactory;
|
|
48
|
+
export type { BrowserManifestModeFactory, BrowserManifestOptions as ManifestModeOptions, } from '@c15t/core/transports/manifest-browser';
|
|
@@ -1,18 +1,9 @@
|
|
|
1
|
-
import type { ProviderTransportFactory } from '@c15t/core';
|
|
2
|
-
import type { PolicyRule } from '@c15t/schema/types';
|
|
3
|
-
/** Policy rules evaluated locally when initialization runs. */
|
|
4
|
-
export interface OfflineModeOptions {
|
|
5
|
-
/**
|
|
6
|
-
* Rules to resolve locally. Omit them to use `recommendedPolicyRules()`:
|
|
7
|
-
* strict opt-in for Europe, the UK, Quebec and unknown locations, opt-out
|
|
8
|
-
* for the US states with a privacy law, and `none` everywhere else.
|
|
9
|
-
* Passing rules replaces that pack entirely.
|
|
10
|
-
*/
|
|
11
|
-
policyRules?: PolicyRule[];
|
|
12
|
-
}
|
|
13
1
|
/**
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
2
|
+
* Offline mode for the React provider: core's `offline()`, which resolves
|
|
3
|
+
* policy rules locally and switches copy when `overrides.language` or
|
|
4
|
+
* `useSetLanguage()` names a language the bundle or `i18n.messages` has.
|
|
5
|
+
* The language a server prefetch detected from `Accept-Language` keeps the
|
|
6
|
+
* startup copy.
|
|
17
7
|
*/
|
|
18
|
-
export
|
|
8
|
+
export { offline } from '@c15t/core';
|
|
9
|
+
export type { OfflineModeOptions } from '@c15t/core';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './manager';
|
|
2
|
-
export * from './slots';
|
|
3
|
-
export * from './theme';
|
|
1
|
+
export * from './manager.js';
|
|
2
|
+
export * from './slots.js';
|
|
3
|
+
export * from './theme/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './style-types';
|
|
1
|
+
export * from './style-types.js';
|
|
@@ -1,9 +1,21 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { ConsentExperiment, ConsentPresentation, LegalLinks } from '@c15t/core';
|
|
2
|
+
import type { DialogPreload } from './chunk-warming.js';
|
|
3
|
+
import type { ReactComponentSlots } from './types/slots.js';
|
|
4
|
+
import type { Theme } from './types/theme/index.js';
|
|
3
5
|
export interface V3UIConfigValue {
|
|
4
6
|
components?: ReactComponentSlots;
|
|
7
|
+
/** The host's base presentation, before any experiment arm is applied. */
|
|
5
8
|
presentation?: ConsentPresentation;
|
|
9
|
+
/** The configured experiment; the assigned arm lives on the snapshot. */
|
|
10
|
+
experiment?: ConsentExperiment;
|
|
11
|
+
/** The host's base theme, before any experiment arm is applied. */
|
|
12
|
+
theme?: Theme;
|
|
6
13
|
legalLinks?: LegalLinks;
|
|
14
|
+
preloadDialog?: DialogPreload;
|
|
15
|
+
/** CSP nonce for the `<style>` elements the surfaces render. */
|
|
16
|
+
nonce?: string;
|
|
17
|
+
/** `false` when the app loads `styles.css` itself. */
|
|
18
|
+
styles?: boolean;
|
|
7
19
|
}
|
|
8
20
|
export declare const V3UIConfigContext: import("react").Context<V3UIConfigValue>;
|
|
9
21
|
export declare const useUIConfig: () => V3UIConfigValue;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Share an on-demand module across exports and preloading. Ready client
|
|
4
|
+
* retries run synchronously; Suspense retains server rendering and hydration.
|
|
5
|
+
* A failed import is cached for rendered exports only, so a failed preload
|
|
6
|
+
* does not stop a later open from retrying.
|
|
7
|
+
*
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export declare const createDeferredModule: <ModuleType>(importModule: () => Promise<ModuleType>) => {
|
|
11
|
+
component<Props extends object>(select: (module: ModuleType) => ComponentType<Props>): ComponentType<Props>;
|
|
12
|
+
preload(): Promise<void>;
|
|
13
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './cn';
|
|
2
|
-
export * from './default-translation-config';
|
|
3
|
-
export * from './merge-styles';
|
|
4
|
-
export * from './theme-utils';
|
|
1
|
+
export * from './cn.js';
|
|
2
|
+
export * from './default-translation-config.js';
|
|
3
|
+
export * from './merge-styles.js';
|
|
4
|
+
export * from './theme-utils.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ConsentComponentSlotKey } from '@c15t/schema/config';
|
|
2
2
|
import type { ClassValue } from '@c15t/ui/utils';
|
|
3
|
-
import type { ReactComponentSlots, ReactSlotProps } from '../types/slots';
|
|
4
|
-
import type { CSSPropertiesWithVars } from '../types/theme';
|
|
3
|
+
import type { ReactComponentSlots, ReactSlotProps } from '../types/slots.js';
|
|
4
|
+
import type { CSSPropertiesWithVars } from '../types/theme/index.js';
|
|
5
5
|
type MergeSlotPropsInput = ReactSlotProps & {
|
|
6
6
|
baseClassName?: ClassValue;
|
|
7
7
|
noStyle?: boolean;
|
|
@@ -10,5 +10,19 @@ export declare const getSlotProps: (components: ReactComponentSlots | undefined,
|
|
|
10
10
|
export type MergedSlotProps = Omit<ReactSlotProps, 'style'> & {
|
|
11
11
|
style?: CSSPropertiesWithVars;
|
|
12
12
|
};
|
|
13
|
-
|
|
13
|
+
/**
|
|
14
|
+
* A `components` part, plus the `noStyle` flag a `theme.slots` entry puts
|
|
15
|
+
* on it through `applyThemeSlots`.
|
|
16
|
+
*/
|
|
17
|
+
type SlotPropsInput = ReactSlotProps & {
|
|
18
|
+
noStyle?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Merge a `components` part with a component's own props.
|
|
22
|
+
*
|
|
23
|
+
* The stock `baseClassName` is dropped when the component's `noStyle` or
|
|
24
|
+
* the part's `noStyle` is set; the part's and the component's classes
|
|
25
|
+
* stay, as `resolveStyles` keeps theme slot classes under `noStyle`.
|
|
26
|
+
*/
|
|
27
|
+
export declare const mergeSlotProps: (slotProps: SlotPropsInput | undefined, { baseClassName, className, noStyle, style, ...ownProps }: MergeSlotPropsInput) => MergedSlotProps;
|
|
14
28
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ClassNameStyle, ThemeValue } from '../types/theme';
|
|
1
|
+
import type { ClassNameStyle, ThemeValue } from '../types/theme/index.js';
|
|
2
2
|
/**
|
|
3
3
|
* Merges two styles objects, handling theme values and style properties.
|
|
4
4
|
* This React version uses React-specific types but uses the core logic from @c15t/ui.
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
* Handles token-to-CSS variable conversion and dark mode overrides.
|
|
4
4
|
*/
|
|
5
5
|
import type { ThemeCSSVariables } from '@c15t/ui/theme';
|
|
6
|
-
import
|
|
6
|
+
import { generateThemeCSS as baseGenerateThemeCSS } from '@c15t/ui/theme';
|
|
7
|
+
import type { Theme } from '../types/theme/style-types.js';
|
|
7
8
|
/**
|
|
8
9
|
* Default design tokens for the v2 theme system.
|
|
9
10
|
*/
|
|
@@ -13,6 +14,20 @@ export declare const defaultTheme: Required<Omit<Theme, 'slots'>>;
|
|
|
13
14
|
*/
|
|
14
15
|
export declare const themeToVars: (theme: Theme, isDark?: boolean) => ThemeCSSVariables;
|
|
15
16
|
/**
|
|
16
|
-
* Generates a CSS string for the theme variables
|
|
17
|
+
* Generates a CSS string for the theme variables, the same CSS as
|
|
18
|
+
* `generateThemeCSS` from `@c15t/ui/theme`.
|
|
19
|
+
*
|
|
20
|
+
* @param theme - Theme tokens to serialize.
|
|
21
|
+
* @param colorScheme - `'dark'` makes the dark tokens the default,
|
|
22
|
+
* `'system'` follows `prefers-color-scheme`, and `'light'` adds the stock
|
|
23
|
+
* dark palette under the dark classes. Omit it, or pass `null`, to write
|
|
24
|
+
* only the theme's own tokens.
|
|
25
|
+
* @returns Theme CSS for a `<style>` element or a stylesheet.
|
|
26
|
+
* @example
|
|
27
|
+
* ```ts
|
|
28
|
+
* import { generateThemeCSS } from '@c15t/react/utils';
|
|
29
|
+
*
|
|
30
|
+
* const css = generateThemeCSS({ dark: { primary: '#7fd1a8' } }, 'system');
|
|
31
|
+
* ```
|
|
17
32
|
*/
|
|
18
|
-
export declare const generateThemeCSS: (theme: Theme) => string;
|
|
33
|
+
export declare const generateThemeCSS: (theme: Theme, colorScheme?: Parameters<typeof baseGenerateThemeCSS>[1]) => string;
|
package/dist-types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "3.0.0-alpha.
|
|
1
|
+
export declare const version = "3.0.0-alpha.11";
|
package/docs/README.md
CHANGED
|
@@ -6,98 +6,125 @@ These docs ship inside the package so coding agents can read them offline. Open
|
|
|
6
6
|
|
|
7
7
|
## Using these docs
|
|
8
8
|
|
|
9
|
-
These docs describe v3.
|
|
9
|
+
These docs describe c15t v3. Find your app's row in Choose your setup, then follow that framework guide from start to finish; it names the files to create and the backend URL to use. Install c15t packages with the @alpha dist-tag, because npm latest is still v2. A visible banner does not prove anything: check that vendor requests wait for consent, that rejection survives a reload, and that preferences can be reopened.
|
|
10
10
|
|
|
11
11
|
## Start here
|
|
12
12
|
|
|
13
13
|
- [React quickstart](./frameworks/react/quickstart.md)
|
|
14
|
-
- [
|
|
15
|
-
- [
|
|
16
|
-
- [
|
|
14
|
+
- [Choose your setup](./concepts/choose-your-setup.md): Pick the c15t setup for your framework, rendering mode and hosting, and decide who runs the consent backend.
|
|
15
|
+
- [How consent works](./concepts/how-consent-works.md): What c15t decides on each page load, the difference between a permission and a recorded choice, and what happens when a visitor saves.
|
|
16
|
+
- [Customize the interface](./customization/overview.md): Change c15t's consent banner and dialog one step at a time, from a prop to your own markup, and find where each step lives in your framework.
|
|
17
|
+
- [Verify consent](./guides/verify-consent.md): Check in a production build that vendor requests wait for consent, rejection survives a reload, preferences reopen and privacy signals apply.
|
|
18
|
+
- [Upgrade a React app from v2](./frameworks/react/upgrade-v3.md): Upgrade a React app from c15t v2 (@c15t/react) to v3. Covers packages, ConsentProvider and transports, the useConsentManager codemod, callbacks, policies, styles, IAB and stored consent.
|
|
17
19
|
|
|
18
20
|
## More documentation
|
|
19
21
|
|
|
20
|
-
[Documentation index](https://c15t.com/docs/llms.txt) · [Full Markdown context](https://c15t.com/llms-full.txt). Prefer the index and individual pages for focused tasks.
|
|
22
|
+
[Documentation index](https://v3.c15t.com/docs/llms.txt) · [Full Markdown context](https://v3.c15t.com/llms-full.txt). Prefer the index and individual pages for focused tasks.
|
|
21
23
|
|
|
22
24
|
## Frameworks
|
|
23
25
|
|
|
24
|
-
- [
|
|
26
|
+
- [Callbacks](./frameworks/react/callbacks.md): Run code in a React app when a visitor records a consent choice, when permissions change, when a request fails and before the revocation reload, with the ConsentProvider callbacks option.
|
|
27
|
+
- [Clear on revocation](./frameworks/react/clear-on-revocation.md): Delete the first-party cookies and Web Storage keys a consent category owns in a React app when that category is denied, with the clearOnRevocation option on ConsentProvider.
|
|
28
|
+
- [Components](./frameworks/react/components.md): Every c15t component a React app imports from c15t/react, what each renders, where each one mounts, and which to start with.
|
|
29
|
+
- [ConsentBanner](./frameworks/react/components/consent-banner.md): Render the c15t consent banner in a React app, choose its variant and position, and compose its parts.
|
|
25
30
|
- [ConsentDialog](./frameworks/react/components/consent-dialog.md): Open the c15t preference center as a modal ConsentDialog in a React app, wire its triggers and control blocking, focus and policy gating.
|
|
26
31
|
- [ConsentDialogLink](./frameworks/react/components/consent-dialog-link.md): Add a ConsentDialogLink to a React footer so visitors reopen the c15t preference center from your own text link, with asChild and rights data.
|
|
27
|
-
- [ConsentDialogTrigger](./frameworks/react/components/consent-dialog-trigger.md):
|
|
28
|
-
- [
|
|
32
|
+
- [ConsentDialogTrigger](./frameworks/react/components/consent-dialog-trigger.md): Add the c15t ConsentDialogTrigger floating button or toolbar inside a React ConsentProvider so visitors can reopen the preference center after the first prompt.
|
|
33
|
+
- [ConsentGate](./frameworks/react/components/consent-gate.md): Gate a YouTube or map iframe behind consent with ConsentGate in React, showing a placeholder that opens the preference center until the category is allowed.
|
|
34
|
+
- [ConsentProvider](./frameworks/react/components/consent-provider.md): Mount ConsentProvider in a React app and configure its backend, scripts, storage, blocking and presentation options.
|
|
29
35
|
- [ConsentWidget](./frameworks/react/components/consent-widget.md): Embed the c15t preference center inline with ConsentWidget on a React privacy page, with draft toggles that record a choice only on Save.
|
|
30
|
-
- [DevTools](./frameworks/react/components/dev-tools.md):
|
|
31
|
-
- [
|
|
32
|
-
- [
|
|
33
|
-
- [
|
|
36
|
+
- [DevTools](./frameworks/react/components/dev-tools.md): Inspect consent state, location, loaded scripts and consent events in a React app during development with the c15t DevTools panel.
|
|
37
|
+
- [Compose your own banner](./frameworks/react/compose.md): Build a React consent banner from the ConsentBanner parts in c15t/react, with your own markup and buttons, while the policy still decides which actions appear.
|
|
38
|
+
- [Content Security Policy](./frameworks/react/content-security-policy.md): Run c15t in a React app under a Content Security Policy, allow the consent backend and vendor hosts, and pass a nonce to ConsentProvider and ConsentTheme.
|
|
39
|
+
- [Customize](./frameworks/react/customize.md): Change the colors, fonts, layout, button styles and copy of the c15t banner and dialog in a React app with theme tokens, provider options and slots, and load the stylesheet yourself when you need to.
|
|
40
|
+
- [Embeds](./frameworks/react/embeds.md): Keep YouTube videos, maps and other iframes out of a React page until their consent category is allowed, with ConsentGate or the iframe blocker in ConsentProvider.
|
|
41
|
+
- [IAB GPP](./frameworks/react/gpp.md): Add the IAB Global Privacy Platform API (__gpp) to a React app with ConsentGPP from @c15t/react/gpp, so ad tech can read US state opt-outs and the TCF EU consent string.
|
|
34
42
|
- [Headless](./frameworks/react/headless.md): Build a custom consent banner in React with the c15t/react/headless hooks inside your ConsentProvider.
|
|
35
|
-
- [Hooks](./frameworks/react/hooks
|
|
36
|
-
- [IAB TCF](./frameworks/react/iab
|
|
37
|
-
- [
|
|
38
|
-
- [
|
|
39
|
-
- [
|
|
40
|
-
- [
|
|
43
|
+
- [Hooks](./frameworks/react/hooks.md): Gate features and save consent choices in React components with the focused hooks exported from c15t/react.
|
|
44
|
+
- [IAB TCF](./frameworks/react/iab.md): Mount the IAB TCF banner and dialog inside a React ConsentProvider and configure the CMP ID, policy and vendor data.
|
|
45
|
+
- [Network blocker](./frameworks/react/network-blocker.md): Hold fetch and XMLHttpRequest calls in a React app until their consent category is allowed, with networkBlocker rules in the ConsentProvider options.
|
|
46
|
+
- [Quickstart](./frameworks/react/quickstart.md): Add a consent banner, preferences dialog and consent-gated scripts to a React single-page app built with Vite, using Inth as the consent backend.
|
|
47
|
+
- [Rendering and deployment](./frameworks/react/rendering.md): How c15t resolves consent in client-rendered React apps, React Router framework mode, Remix and other server-rendered React apps without a c15t adapter.
|
|
48
|
+
- [Scripts](./frameworks/react/scripts.md): Load vendor scripts by consent category in a React app with ConsentProvider, and clear stored data or reload the page when a visitor withdraws consent.
|
|
49
|
+
- [Translations](./frameworks/react/translations.md): Where c15t banner and dialog copy comes from in a React app, how the browser picks the visitor's language, and how to override copy and switch languages with the provider's i18n option and hooks.
|
|
50
|
+
- [Troubleshooting](./frameworks/react/troubleshooting.md): Fix a missing banner, early vendor requests, unstyled components and theme warnings in a React app that uses c15t/react.
|
|
51
|
+
- [Upgrade from v2](./frameworks/react/upgrade-v3.md): Upgrade a React app from c15t v2 (@c15t/react) to v3. Covers packages, ConsentProvider and transports, the useConsentManager codemod, callbacks, policies, styles, IAB and stored consent.
|
|
52
|
+
- [Vendor consent](./frameworks/react/vendor-consent.md): Let visitors allow a category such as marketing in a React app and still turn off one vendor in it, with the vendors option on ConsentProvider and useVendorAllowed.
|
|
53
|
+
|
|
54
|
+
## Concepts
|
|
55
|
+
|
|
56
|
+
- [Choose your setup](./concepts/choose-your-setup.md): Pick the c15t setup for your framework, rendering mode and hosting, and decide who runs the consent backend.
|
|
57
|
+
- [Consent categories](./concepts/consent-categories.md): Assign scripts, embeds and features to c15t consent categories, and understand which categories the preference dialog shows.
|
|
58
|
+
- [Consent state reference](./concepts/consent-state.md): How c15t saves choices, gates IAB vendors, hydrates server records and keeps browser tabs and storage in step.
|
|
59
|
+
- [Data fetching](./concepts/data-fetching.md): Choose the recommended build-time policy snapshot or runtime manifest fetching, backend /init, browser resolution or offline rules, and understand where consent choices are saved.
|
|
60
|
+
- [How consent works](./concepts/how-consent-works.md): What c15t decides on each page load, the difference between a permission and a recorded choice, and what happens when a visitor saves.
|
|
61
|
+
- [Consent modes](./concepts/modes.md): Reference for manifest(), hosted() and offline() in every c15t framework package, where each one resolves the visitor's policy, what it adds to first-load JavaScript, the build-time manifest fetch and its failure policy, and the backend URL variable each framework reads.
|
|
62
|
+
- [Policies](./concepts/policies.md): How policy models, prompts and scope decide what c15t asks visitors, where to change the rules, and why a banner may not appear.
|
|
41
63
|
|
|
42
64
|
## Guides
|
|
43
65
|
|
|
44
|
-
- [
|
|
45
|
-
- [
|
|
46
|
-
- [
|
|
47
|
-
- [Troubleshoot consent](./guides/troubleshooting.md): Diagnose missing banners, early vendor requests, lost choices and hydration differences.
|
|
48
|
-
- [Verify consent before shipping](./guides/verify-consent.md): Test requests, policy resolution, persistence, navigation and preference changes in a production build.
|
|
66
|
+
- [Banner experiments](./guides/banner-experiments.md): Run A/B tests on consent banner presentation with any feature-flag provider or built-in weighted assignment, and attribute every impression and choice to its arm.
|
|
67
|
+
- [Troubleshooting](./guides/troubleshooting.md): Fix a missing banner, analytics that load before consent, choices lost on reload, CORS errors, hydration differences, failed manifest downloads, mode errors and failed static builds in c15t v3.
|
|
68
|
+
- [Verify consent](./guides/verify-consent.md): Check in a production build that vendor requests wait for consent, rejection survives a reload, preferences reopen and privacy signals apply.
|
|
49
69
|
|
|
50
70
|
## Customization
|
|
51
71
|
|
|
52
|
-
- [
|
|
53
|
-
- [
|
|
54
|
-
- [
|
|
55
|
-
- [
|
|
72
|
+
- [Class names and CSS-in-JS](./customization/class-names.md): Style c15t's component parts with CSS Modules, vanilla-extract, StyleX, Emotion or plain class names, and see which approach works in each framework.
|
|
73
|
+
- [Dark mode](./customization/dark-mode.md): Switch c15t's banner and dialog to dark colors with colorScheme, set your own dark tokens, follow your site's theme switch, and paint dark on the first frame in every framework.
|
|
74
|
+
- [Motion and animation](./customization/motion.md): Change how fast c15t's banner and dialog animate with duration and easing tokens, turn animations off per surface with disableAnimation, and check reduced-motion behavior in each framework.
|
|
75
|
+
- [Customize the interface](./customization/overview.md): Change c15t's consent banner and dialog one step at a time, from a prop to your own markup, and find where each step lives in your framework.
|
|
76
|
+
- [Banner designs](./customization/recipes.md): Five consent banner designs built with c15t, from one prop to your own markup, with tested code for React, Vue, Svelte, Astro and plain HTML.
|
|
77
|
+
- [Component parts](./customization/slots.md): Find every part of c15t's banner, dialog, widget, trigger and ConsentGate placeholder, its key in your framework's part API, and the data attributes to select on.
|
|
78
|
+
- [Stylesheets and CSS layers](./customization/stylesheets.md): See how c15t delivers its styles in each framework without a render-blocking stylesheet, when to import styles.css yourself with styles false, which file holds the dialog's rules, and how c15t's cascade layer meets your own.
|
|
79
|
+
- [Tailwind CSS](./customization/tailwind.md): Use c15t's styles with Tailwind CSS 4 or 3 in every framework, put utilities on c15t component parts, and use Tailwind's dark variant with c15t.
|
|
80
|
+
- [Theme tokens](./customization/tokens.md): Change c15t's colors, type, radius, spacing, shadows and motion with theme tokens, and see every --c15t-* variable with its default.
|
|
56
81
|
- [Copy and translations](./customization/translations.md): Change consent wording through i18n and test the complete prompt and preferences flow.
|
|
57
82
|
|
|
58
83
|
## Integrations
|
|
59
84
|
|
|
60
|
-
- [Adobe Analytics](./integrations/adobe-analytics.md):
|
|
61
|
-
- [Ahrefs Analytics](./integrations/ahrefs-analytics.md):
|
|
62
|
-
- [Amplitude](./integrations/amplitude.md):
|
|
63
|
-
- [Custom integrations](./integrations/building-integrations.md):
|
|
64
|
-
- [
|
|
65
|
-
- [
|
|
66
|
-
- [Cloudflare
|
|
67
|
-
- [Crisp](./integrations/crisp.md):
|
|
68
|
-
- [Databuddy](./integrations/databuddy.md):
|
|
69
|
-
- [Fathom Analytics](./integrations/fathom-analytics.md):
|
|
70
|
-
- [
|
|
71
|
-
- [Google
|
|
72
|
-
- [Google Tag
|
|
73
|
-
- [
|
|
74
|
-
- [
|
|
75
|
-
- [
|
|
76
|
-
- [
|
|
77
|
-
- [
|
|
78
|
-
- [
|
|
79
|
-
- [
|
|
80
|
-
- [
|
|
81
|
-
- [
|
|
82
|
-
- [
|
|
83
|
-
- [
|
|
84
|
-
- [
|
|
85
|
-
- [
|
|
86
|
-
- [
|
|
87
|
-
- [
|
|
88
|
-
- [
|
|
89
|
-
- [
|
|
90
|
-
- [
|
|
91
|
-
- [
|
|
92
|
-
- [
|
|
93
|
-
- [
|
|
94
|
-
- [
|
|
95
|
-
- [
|
|
96
|
-
- [
|
|
97
|
-
- [
|
|
98
|
-
- [
|
|
85
|
+
- [Adobe Analytics](./integrations/adobe-analytics.md): Load an Adobe Data Collection Tags property only after measurement consent with the c15t adobeAnalytics helper, and check its extensions in DevTools.
|
|
86
|
+
- [Ahrefs Analytics](./integrations/ahrefs-analytics.md): Load Ahrefs Web Analytics only after measurement consent with the c15t ahrefsAnalytics helper, and check it in DevTools.
|
|
87
|
+
- [Amplitude](./integrations/amplitude.md): Load the Amplitude Browser SDK 2 only after measurement consent with the c15t amplitude helper, which opts the SDK out on revocation and back in on a new grant.
|
|
88
|
+
- [Custom integrations](./integrations/building-integrations.md): Gate a vendor that has no @c15t/integrations helper, or sync consent with an SDK your app already loads, using a c15t script configuration.
|
|
89
|
+
- [Clearbit](./integrations/clearbit.md): Load the Clearbit enrichment tag only after marketing consent with the c15t clearbit helper, and check it in DevTools.
|
|
90
|
+
- [Cloudflare Web Analytics](./integrations/cloudflare-web-analytics.md): Load the Cloudflare Web Analytics beacon only after measurement consent with the c15t cloudflareWebAnalytics helper, and check it in DevTools.
|
|
91
|
+
- [Cloudflare Zaraz](./integrations/cloudflare-zaraz.md): Sync c15t permissions to Cloudflare Zaraz purposes with the c15t cloudflareZaraz bridge, which runs on every page without loading a script, and check the tools it controls.
|
|
92
|
+
- [Crisp](./integrations/crisp.md): Load the Crisp chat widget only after functionality consent with the c15t crisp helper, pass its runtime settings and check it in DevTools.
|
|
93
|
+
- [Databuddy](./integrations/databuddy.md): Load the Databuddy SDK on every page with the c15t databuddy helper, switch its disabled flag and config from measurement consent, and check both in DevTools.
|
|
94
|
+
- [Fathom Analytics](./integrations/fathom-analytics.md): Load Fathom Analytics only after measurement consent with the c15t fathomAnalytics helper, set its SPA mode, and check it in DevTools.
|
|
95
|
+
- [Front Chat](./integrations/front-chat.md): Load the Front Chat widget only after functionality consent with the c15t frontChat helper, forward CSP nonces, clear the session on revocation and check it in DevTools.
|
|
96
|
+
- [Google Maps](./integrations/google-maps.md): Gate a Google Maps iframe embed with c15t v3 so the map loads only after the visitor allows its consent category, in Next.js, TanStack Start, React, Nuxt, Vue, Astro, Svelte, SvelteKit, HTML or JavaScript.
|
|
97
|
+
- [Google Tag](./integrations/google-tag.md): Load gtag.js for Google Analytics or Google Ads before or after consent with c15t Consent Mode v2 signals, and verify the consent commands in DevTools.
|
|
98
|
+
- [Google Tag Manager](./integrations/google-tag-manager.md): Load a Google Tag Manager container before or after consent with c15t Consent Mode v2 signals, configure consent checks inside the container, and verify both in DevTools.
|
|
99
|
+
- [Heap](./integrations/heap.md): Load the Heap config script and heap.js only after measurement consent with the c15t heap helper, and check it in DevTools.
|
|
100
|
+
- [Hightouch](./integrations/hightouch.md): Load the Hightouch Events browser SDK only after measurement consent with the c15t hightouch helper, and check page events in DevTools.
|
|
101
|
+
- [Hotjar](./integrations/hotjar.md): Load Hotjar only after measurement consent with the c15t hotjar helper, and check its loader and recordings in DevTools.
|
|
102
|
+
- [Intercom](./integrations/intercom.md): Load the Intercom messenger only after functionality consent with the c15t intercom helper, set its region and check it in DevTools.
|
|
103
|
+
- [Klaviyo](./integrations/klaviyo.md): Load Klaviyo signup forms and onsite tracking only after marketing and measurement consent with the c15t klaviyo helper, gate your own events, and check it in DevTools.
|
|
104
|
+
- [LinkedIn Insight Tag](./integrations/linkedin-insights.md): Load the LinkedIn Insight Tag only after marketing consent with the c15t linkedinInsights helper, guard lintrk conversion calls, and check it in DevTools.
|
|
105
|
+
- [LogRocket](./integrations/logrocket.md): Load LogRocket session replay only after measurement consent with the c15t logRocket helper, including proxied setups, and check it in DevTools.
|
|
106
|
+
- [Matomo Analytics](./integrations/matomo-analytics.md): Load Matomo after measurement consent with the c15t matomoAnalytics helper, or use Matomo's own consent mode, and check each mode in DevTools.
|
|
107
|
+
- [Meta Pixel](./integrations/meta-pixel.md): Load the Meta Pixel only after marketing consent with the c15t metaPixel helper, guard fbq event calls, and check it in DevTools.
|
|
108
|
+
- [Microsoft Clarity](./integrations/microsoft-clarity.md): Load Microsoft Clarity only after measurement consent with the c15t clarity helper, send Consent V2 storage signals and check them in DevTools.
|
|
109
|
+
- [Microsoft UET](./integrations/microsoft-uet.md): Load Microsoft Advertising UET on every page with the c15t microsoftUet helper, send ad_storage consent defaults and updates, and verify both in DevTools.
|
|
110
|
+
- [Mixpanel](./integrations/mixpanel-analytics.md): Load the Mixpanel SDK on every page with the c15t mixpanelAnalytics helper, which switches Mixpanel tracking on and off with measurement consent, and check it in DevTools.
|
|
111
|
+
- [OneDollarStats](./integrations/one-dollar-stats.md): Load the OneDollarStats tracker only after measurement consent with the c15t oneDollarStats helper, forward its data-attribute settings, and check it in DevTools.
|
|
112
|
+
- [OpenAI Pixel](./integrations/openai-pixel.md): Load the ChatGPT Ads Measurement Pixel only after marketing consent with the c15t openaiPixel helper, guard oaiq conversion calls, and check it in DevTools.
|
|
113
|
+
- [Integrations](./integrations/overview.md): Find all c15t integrations for analytics, tag managers, advertising, email and SMS, chat and embedded content.
|
|
114
|
+
- [Pinterest Tag](./integrations/pinterest-tag.md): Load the Pinterest Tag only after marketing consent with the c15t pinterestTag helper, guard pintrk event calls, and check it in DevTools.
|
|
115
|
+
- [Pirsch](./integrations/pirsch.md): Load Pirsch Analytics only after measurement consent with the c15t pirsch helper, keep custom event bindings working, and check it in DevTools.
|
|
116
|
+
- [Plausible Analytics](./integrations/plausible-analytics.md): Load the Plausible Analytics tracker only after measurement consent with the c15t plausibleAnalytics helper, and check it in DevTools.
|
|
117
|
+
- [PostHog](./integrations/posthog.md): Load PostHog before or after measurement consent with the c15t posthog helper, choose its cookieless behavior, turn off PostHog modules you do not use, and sync consent with an SDK you already initialize.
|
|
118
|
+
- [Promptwatch](./integrations/promptwatch.md): Load the Promptwatch attribution client only after measurement consent with the c15t promptwatch helper, and check it in DevTools.
|
|
119
|
+
- [Reddit Pixel](./integrations/reddit-pixel.md): Load the Reddit Pixel only after marketing consent with the c15t redditPixel helper, guard rdt conversion calls, and check it in DevTools.
|
|
120
|
+
- [RudderStack](./integrations/rudderstack.md): Load the RudderStack JavaScript SDK after measurement consent with the c15t rudderstack helper, or map c15t categories to destination consent IDs, and check each mode.
|
|
121
|
+
- [Rybbit Analytics](./integrations/rybbit-analytics.md): Load Rybbit Analytics only after measurement consent with the c15t rybbitAnalytics helper, map its tracking options to data attributes, and check it in DevTools.
|
|
122
|
+
- [Segment](./integrations/segment.md): Load Segment Analytics.js only after measurement consent with the c15t segment helper, guard your own track and identify calls, and check it in DevTools.
|
|
123
|
+
- [Sentry](./integrations/sentry.md): Configure Sentry's CDN or your own SDK with consent for error monitoring, Session Replay and user data.
|
|
124
|
+
- [Snapchat Pixel](./integrations/snapchat-pixel.md): Load the Snapchat Pixel only after marketing consent with the c15t snapchatPixel helper, guard snaptr event calls, and check it in DevTools.
|
|
125
|
+
- [TikTok Pixel](./integrations/tiktok-pixel.md): Load the TikTok Pixel only after marketing consent with the c15t tiktokPixel helper, guard ttq event calls, and check it in DevTools.
|
|
126
|
+
- [Umami Analytics](./integrations/umami-analytics.md): Load the Umami Analytics tracker only after measurement consent with the c15t umamiAnalytics helper, point it at a self-hosted instance, and check it in DevTools.
|
|
127
|
+
- [Vercel Analytics](./integrations/vercel-analytics.md): Load the Vercel Web Analytics script only after measurement consent with the c15t vercelAnalytics helper, choose the debug script, and check it in DevTools.
|
|
128
|
+
- [Vercel Speed Insights](./integrations/vercel-speed-insights.md): Load the Vercel Speed Insights collector only after measurement consent with the c15t vercelSpeedInsights helper, drop Web Vitals reports on revocation, and check it in DevTools.
|
|
129
|
+
- [X Pixel](./integrations/x-pixel.md): Load the X Pixel only after marketing consent with the c15t xPixel helper, guard twq conversion events, and check it in DevTools.
|
|
99
130
|
- [YouTube](./integrations/youtube.md): Gate YouTube embeds with c15t v3 in Next.js, TanStack Start, React, Nuxt, Vue, Astro, Svelte, SvelteKit or JavaScript.
|
|
100
|
-
|
|
101
|
-
## Reference
|
|
102
|
-
|
|
103
|
-
- [Upgrade to v3 policies](./upgrade-v3.md): Migrate policy configuration, consent records, callbacks, and custom transports to the v3 policy system.
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|