@c15t/react 3.0.0-alpha.0 → 3.0.0-alpha.10
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 +96 -69
- 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/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/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 -151
- package/dist/iab-context.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 +35 -159
- 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 +45 -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/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 +36 -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.d.ts +7 -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 +174 -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 +96 -69
- 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 +138 -0
- package/docs/concepts/consent-categories.md +84 -0
- package/docs/concepts/consent-state.md +421 -0
- package/docs/concepts/data-fetching.md +270 -0
- package/docs/concepts/how-consent-works.md +123 -0
- package/docs/concepts/modes.md +278 -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 +140 -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 +143 -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 +259 -0
- package/docs/frameworks/react/network-blocker.md +140 -0
- package/docs/frameworks/react/quickstart.md +220 -102
- package/docs/frameworks/react/rendering.md +263 -0
- package/docs/frameworks/react/scripts.md +114 -0
- package/docs/frameworks/react/translations.md +155 -0
- package/docs/frameworks/react/troubleshooting.md +188 -61
- package/docs/frameworks/react/upgrade-v3.md +651 -0
- package/docs/frameworks/react/vendor-consent.md +188 -0
- package/docs/guides/banner-experiments.md +672 -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 +152 -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/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 -62
- 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 -55
- package/docs/frameworks/react/styling/overview.md +0 -207
- 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/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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{hosted as t}from"@c15t/core";import{backendURL as o}from"@c15t/core/generated";let e=function(o,e){let r=o.backendURL??e;if(void 0===r)throw Error(`c15t: hosted() needs \`backendURL\`.${"production"===process.env.NODE_ENV?"":" Pass it, or add consentManifest() from c15t/build to your Vite config and set VITE_C15T_BACKEND_URL (or VITE_INTH_PROJECT_URL)."}`);return t({...o,backendURL:r})},r=function(t={}){return e(t,o)};export{r as hosted,e as hostedWithBuild};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{backendURL as t,snapshot as e}from"@c15t/core/generated";import{manifest as n,withEarlyInit as s}from"@c15t/core/transports/manifest-browser";let a=function(t,e){let n={...t};return void 0!==e.backendURL&&void 0===n.backendURL&&(n.backendURL=e.backendURL),void 0!==n.manifestURL||e.snapshot&&void 0===n.snapshot&&"runtime"!==n.source&&(n.snapshot=e.snapshot),n},o=function(o={}){return s(n(a(o,{backendURL:t,snapshot:e})))};export{o as manifest,a as withBuildDefaults};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
export{offline}from"@c15t/core";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import{jsx as t}from"react/jsx-runtime";import{Suspense as r,lazy as e,useSyncExternalStore as a}from"react";let o=o=>{let n,l={status:"pending"},u=l,c=!1,s=new Set,i=()=>u,d=()=>l,f=t=>(c||=t,n??=(async()=>{try{let t=await o();return u={module:t,status:"ready"},t}catch(t){throw c?u={error:t,status:"error"}:n=void 0,t}})()),h=!1,m=()=>{h||(h=!0,queueMicrotask(()=>{for(let t of(h=!1,u={...u},s))t()}))},p=t=>(s.add(t),()=>{s.delete(t)});return{component(o){let n=e(()=>{let t=(async()=>({default:o(await f(!0))}))();return t.then(m,m),t});return function(e){let o=a(p,i,d);if("error"===o.status)throw o.error;return t(r,{fallback:null,children:t(n,{...e})})}},async preload(){try{await f(!1)}catch{}}}};export{o as createDeferredModule};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cnExt as e}from"./cn.js";let t=function(e,t){if(!t)return;let[o,r]=t.split(".");return e?.[o]?.[r]},o=function(t,{baseClassName:o,className:r,noStyle:s,style:l,...p}){let
|
|
1
|
+
import{cnExt as e}from"./cn.js";let t=function(e,t){if(!t)return;let[o,r]=t.split(".");return e?.[o]?.[r]},o=function(t,{baseClassName:o,className:r,noStyle:s,style:l,...p}){let{noStyle:n,...i}=t??{},m=i.style||l?{...i.style,...l}:void 0,a=e(s||n?void 0:o,i.className,r);return{...i,...p,className:a||void 0,style:m}};export{t as getSlotProps,o as mergeSlotProps};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defaultTheme as e,generateThemeCSS as t,themeToVars as m}from"@c15t/ui/theme";let a=e,r=function(e,t=!1){return m(e,t)},h=function(e){return t(e)};export{a as defaultTheme,h as generateThemeCSS,r as themeToVars};
|
|
1
|
+
import{defaultTheme as e,generateThemeCSS as t,themeToVars as m}from"@c15t/ui/theme";let a=e,r=function(e,t=!1){return m(e,t)},h=function(e,m){return t(e,m)};export{a as defaultTheme,h as generateThemeCSS,r as themeToVars};
|
package/dist/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let e="3.0.0-alpha.
|
|
1
|
+
let e="3.0.0-alpha.10";export{e as version};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConsentDialogCompoundComponent } from './components/panel';
|
|
2
|
-
import type { ConsentWidgetCompoundComponent } from './components/preferences';
|
|
1
|
+
import type { ConsentDialogCompoundComponent } from './components/panel/index.js';
|
|
2
|
+
import type { ConsentWidgetCompoundComponent } from './components/preferences/index.js';
|
|
3
3
|
export declare const ConsentDialog: ConsentDialogCompoundComponent;
|
|
4
4
|
export declare const ConsentWidget: ConsentWidgetCompoundComponent;
|
|
@@ -1,19 +1,56 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Chunk-warming registry
|
|
2
|
+
* Chunk-warming registry for the deferred `ConsentDialog`.
|
|
3
3
|
*
|
|
4
|
-
* The aggregate `ConsentDialog` is lazy-loaded and
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
4
|
+
* The aggregate `ConsentDialog` is lazy-loaded and deferred until it can
|
|
5
|
+
* render, so the first open would otherwise wait for its chunk. Surfaces
|
|
6
|
+
* register their lazy import here, and two signals start it early:
|
|
7
|
+
*
|
|
8
|
+
* - Intent: pointerenter or focus on any `ConsentButton` that opens the
|
|
9
|
+
* dialog, including the stock banner's Customize button.
|
|
10
|
+
* - Idle: a few seconds after the page's load event, in browser idle time,
|
|
11
|
+
* while the banner is shown or a dialog trigger is mounted. The wait keeps
|
|
12
|
+
* the dialog out of first-load JavaScript; a visitor who opens it sooner
|
|
13
|
+
* hovers, focuses or touches the button first, which warms it at once.
|
|
10
14
|
*
|
|
11
15
|
* Module-level registry keeps banner components decoupled from the
|
|
12
16
|
* aggregate exports (no context change, tree-shakes with the aggregate).
|
|
13
17
|
*/
|
|
14
18
|
type Warmer = () => void;
|
|
19
|
+
/**
|
|
20
|
+
* When the deferred consent dialog starts loading before it opens.
|
|
21
|
+
*
|
|
22
|
+
* - `'idle'`: a few seconds after the page's load event, in browser idle
|
|
23
|
+
* time, while the banner is shown or a button that opens the dialog is
|
|
24
|
+
* mounted. Also on hover or focus of such a button.
|
|
25
|
+
* - `'intent'`: only on hover or focus of a button that opens the dialog.
|
|
26
|
+
*
|
|
27
|
+
* @public
|
|
28
|
+
*/
|
|
29
|
+
export type DialogPreload = 'idle' | 'intent';
|
|
15
30
|
/** Register a lazy chunk's import trigger. Returns an unregister fn. */
|
|
16
31
|
export declare const registerDialogChunkWarmer: (warmer: Warmer) => () => void;
|
|
17
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Fire every registered warmer. Warmers share one in-flight import, so
|
|
34
|
+
* repeated calls are cheap, and a call after a failed import retries it.
|
|
35
|
+
*/
|
|
18
36
|
export declare const warmDialogChunk: () => void;
|
|
37
|
+
/**
|
|
38
|
+
* Hold an idle-warming gate open while `active`: the dialog loads in the next
|
|
39
|
+
* idle period after the page's load event, if a gate is still open then.
|
|
40
|
+
* Consumers opt out with `preloadDialog: 'intent'`.
|
|
41
|
+
*
|
|
42
|
+
* @param active - Whether the dialog can be opened soon from this component,
|
|
43
|
+
* for example because the banner is shown or a trigger is mounted.
|
|
44
|
+
* @internal
|
|
45
|
+
*/
|
|
46
|
+
export declare const useIdleDialogWarming: (active: boolean) => void;
|
|
47
|
+
/**
|
|
48
|
+
* Reset module state between tests. Idle warming waits `idleWarmDelayMs`
|
|
49
|
+
* after load, `0` unless a test passes another delay.
|
|
50
|
+
*
|
|
51
|
+
* @internal
|
|
52
|
+
*/
|
|
53
|
+
export declare const resetDialogChunkWarmingForTests: (options?: {
|
|
54
|
+
idleWarmDelayMs?: number;
|
|
55
|
+
}) => void;
|
|
19
56
|
export {};
|
|
@@ -24,8 +24,8 @@ export declare const useHeadlessConsentUI: (overrides?: ConsentPresentation) =>
|
|
|
24
24
|
actionGroups: PresentationAction[][];
|
|
25
25
|
primaryActions: PresentationAction[];
|
|
26
26
|
diagnostics: import("@c15t/core").PresentationDiagnostic[];
|
|
27
|
-
rights: readonly import("@c15t/schema
|
|
28
|
-
preferenceControls: Exclude<import("@c15t/schema
|
|
27
|
+
rights: readonly import("@c15t/schema").PolicyRight[];
|
|
28
|
+
preferenceControls: Exclude<import("@c15t/schema").PolicyRight, 'disclosure'>[];
|
|
29
29
|
direction: 'row' | 'column';
|
|
30
30
|
uiProfile: 'balanced' | 'compact' | 'strict';
|
|
31
31
|
scrollLock: boolean;
|
|
@@ -46,8 +46,8 @@ export declare const useHeadlessConsentUI: (overrides?: ConsentPresentation) =>
|
|
|
46
46
|
actionGroups: PresentationAction[][];
|
|
47
47
|
primaryActions: PresentationAction[];
|
|
48
48
|
diagnostics: import("@c15t/core").PresentationDiagnostic[];
|
|
49
|
-
rights: readonly import("@c15t/schema
|
|
50
|
-
preferenceControls: Exclude<import("@c15t/schema
|
|
49
|
+
rights: readonly import("@c15t/schema").PolicyRight[];
|
|
50
|
+
preferenceControls: Exclude<import("@c15t/schema").PolicyRight, 'disclosure'>[];
|
|
51
51
|
direction: 'row' | 'column';
|
|
52
52
|
uiProfile: 'balanced' | 'compact' | 'strict';
|
|
53
53
|
scrollLock: boolean;
|
|
@@ -64,5 +64,5 @@ export declare const useHeadlessConsentUI: (overrides?: ConsentPresentation) =>
|
|
|
64
64
|
performAction: (action: PresentationAction) => void | Promise<import("@c15t/core").SaveResult> | Promise<import("@c15t/core").NoticeDismissResult>;
|
|
65
65
|
performBannerAction: (action: PresentationAction) => void | Promise<import("@c15t/core").SaveResult> | Promise<import("@c15t/core").NoticeDismissResult>;
|
|
66
66
|
performDialogAction: (action: PresentationAction) => void | Promise<import("@c15t/core").SaveResult> | Promise<import("@c15t/core").NoticeDismissResult>;
|
|
67
|
-
saveCustomPreferences: (input?: import("@c15t/core").SaveInput) => Promise<import("@c15t/core").SaveResult>;
|
|
67
|
+
saveCustomPreferences: (input?: import("@c15t/core").SaveInput, uiSource?: import("@c15t/core").SaveUISource) => Promise<import("@c15t/core").SaveResult>;
|
|
68
68
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const useHeadlessIABConsentUI: () => {
|
|
2
|
-
activeUI:
|
|
2
|
+
activeUI: "banner" | "dialog" | "none";
|
|
3
3
|
banner: {
|
|
4
4
|
isReady: boolean;
|
|
5
5
|
vendorCount: number;
|
|
@@ -12,7 +12,7 @@ export declare const useHeadlessIABConsentUI: () => {
|
|
|
12
12
|
isReady: boolean;
|
|
13
13
|
scrollLock: boolean | undefined;
|
|
14
14
|
};
|
|
15
|
-
iab: import("../iab-context").ReactIABState | null;
|
|
15
|
+
iab: import("../iab-context.js").ReactIABState | null;
|
|
16
16
|
openDialog: (options?: {
|
|
17
17
|
tab?: 'purposes' | 'vendors';
|
|
18
18
|
}) => void;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { AllConsentNames } from '@c15t/core';
|
|
2
|
+
import type { BoxProps } from '../shared/primitives/box.js';
|
|
3
|
+
import type { ConsentButtonProps } from '../shared/primitives/button.types.js';
|
|
4
|
+
declare const ConsentGateRoot: import("react").ForwardRefExoticComponent<Omit<BoxProps, "slotKey"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const ConsentGateTitle: import("react").ForwardRefExoticComponent<Omit<BoxProps, "slotKey"> & {
|
|
6
|
+
category?: AllConsentNames;
|
|
7
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const ConsentGateButton: import("react").ForwardRefExoticComponent<Omit<ConsentButtonProps, "slotKey"> & {
|
|
9
|
+
category: AllConsentNames;
|
|
10
|
+
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
export { ConsentGateButton, ConsentGateRoot, ConsentGateTitle };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as atoms from './atoms.js';
|
|
2
|
+
import type { ConsentGateCompoundComponent, ConsentGateProps } from './types.js';
|
|
3
|
+
/** @deprecated Renamed to `ConsentGateRoot`. */
|
|
4
|
+
declare const FrameRoot: typeof atoms.ConsentGateRoot;
|
|
5
|
+
/** @deprecated Renamed to `ConsentGateTitle`. */
|
|
6
|
+
declare const FrameTitle: typeof atoms.ConsentGateTitle;
|
|
7
|
+
/** @deprecated Renamed to `ConsentGateButton`. */
|
|
8
|
+
declare const FrameButton: typeof atoms.ConsentGateButton;
|
|
9
|
+
/**
|
|
10
|
+
* @deprecated Renamed to `ConsentGate`. `Frame` will be removed in a
|
|
11
|
+
* future major release.
|
|
12
|
+
*/
|
|
13
|
+
declare const Frame: ConsentGateCompoundComponent;
|
|
14
|
+
/** @deprecated Renamed to `ConsentGateProps`. */
|
|
15
|
+
type FrameProps = ConsentGateProps;
|
|
16
|
+
/** @deprecated Renamed to `ConsentGateCompoundComponent`. */
|
|
17
|
+
type FrameCompoundComponent = ConsentGateCompoundComponent;
|
|
18
|
+
export type { FrameCompoundComponent, FrameProps };
|
|
19
|
+
export { Frame, FrameButton, FrameRoot, FrameTitle };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ConsentGateCompoundComponent } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Renders its children only while a consent category is allowed
|
|
4
|
+
*
|
|
5
|
+
* @remarks
|
|
6
|
+
* Acts as a consent boundary for embedded content (iframes, videos, third-party widgets).
|
|
7
|
+
* Conditionally renders children based on user consent, displaying a placeholder when
|
|
8
|
+
* permission is not granted.
|
|
9
|
+
* Supports custom styling via `theme` or complete style override with `noStyle` as well as a custom placeholder.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* <ConsentGate category="marketing">
|
|
14
|
+
* <iframe src="https://www.youtube.com/embed/MtN1YnoL46Q?si=JYIFKdENwls43H-r" />
|
|
15
|
+
* </ConsentGate>
|
|
16
|
+
* ```
|
|
17
|
+
*
|
|
18
|
+
* @see {@link AllConsentNames} for consent categories
|
|
19
|
+
*/
|
|
20
|
+
declare const ConsentGate: ConsentGateCompoundComponent;
|
|
21
|
+
export { ConsentGateButton, ConsentGateRoot, ConsentGateTitle } from './atoms.js';
|
|
22
|
+
export type { ConsentGateCompoundComponent, ConsentGateProps } from './types.js';
|
|
23
|
+
export { ConsentGate };
|
|
24
|
+
export type { FrameCompoundComponent, FrameProps } from './frame.js';
|
|
25
|
+
export { Frame, FrameButton, FrameRoot, FrameTitle } from './frame.js';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { AllConsentNames } from '@c15t/core';
|
|
2
2
|
import type { ComponentPropsWithRef, FC, ReactNode } from 'react';
|
|
3
|
-
import type { Theme } from '../../types/theme';
|
|
4
|
-
import type * as Atom from './atoms';
|
|
5
|
-
export interface
|
|
3
|
+
import type { Theme } from '../../types/theme/index.js';
|
|
4
|
+
import type * as Atom from './atoms.js';
|
|
5
|
+
export interface ConsentGateProps extends ComponentPropsWithRef<'div'> {
|
|
6
6
|
/**
|
|
7
7
|
* Content rendered when consent is granted. Children are not mounted until
|
|
8
8
|
* consent is given, preventing unnecessary network requests.
|
|
@@ -30,8 +30,8 @@ export interface FrameProps extends ComponentPropsWithRef<'div'> {
|
|
|
30
30
|
*/
|
|
31
31
|
theme?: Theme;
|
|
32
32
|
}
|
|
33
|
-
export interface
|
|
34
|
-
Root: typeof Atom.
|
|
35
|
-
Title: typeof Atom.
|
|
36
|
-
Button: typeof Atom.
|
|
33
|
+
export interface ConsentGateCompoundComponent extends FC<ConsentGateProps> {
|
|
34
|
+
Root: typeof Atom.ConsentGateRoot;
|
|
35
|
+
Title: typeof Atom.ConsentGateTitle;
|
|
36
|
+
Button: typeof Atom.ConsentGateButton;
|
|
37
37
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ConsentButtonProps } from '../shared/primitives/button.types';
|
|
2
|
+
import type { ConsentButtonProps } from '../shared/primitives/button.types.js';
|
|
3
3
|
/**
|
|
4
4
|
* Inline trigger for opening the consent dialog from places like site footers.
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ConsentDialogLink, type ConsentDialogLinkProps, } from './consent-preferences-link';
|
|
1
|
+
export { ConsentDialogLink, type ConsentDialogLinkProps, } from './consent-preferences-link.js';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { FC } from 'react';
|
|
2
|
+
import type { ProcessedFeature } from '../types.js';
|
|
3
|
+
/** Props for {@link FeatureItem}. */
|
|
4
|
+
export interface FeatureItemProps {
|
|
5
|
+
/** The feature, as a display-model row or processed GVL feature. */
|
|
6
|
+
feature: ProcessedFeature;
|
|
7
|
+
/**
|
|
8
|
+
* The row's `data-testid`. Comes from the shared display model, which
|
|
9
|
+
* namespaces it by row kind.
|
|
10
|
+
*/
|
|
11
|
+
testId?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* One informational IAB Feature row.
|
|
15
|
+
*
|
|
16
|
+
* TCF Policies v5.0.b forbid showing Features next to a control that
|
|
17
|
+
* cannot be disabled, so this row has no switch, no lock and no per-vendor
|
|
18
|
+
* toggles. It shows the name, the description, the illustrations and the
|
|
19
|
+
* names of the vendors that use the feature.
|
|
20
|
+
*
|
|
21
|
+
* @param props - The feature and its test id.
|
|
22
|
+
* @returns The collapsible feature row.
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* <FeatureItem feature={row} testId={row.testId} />
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
export declare const FeatureItem: FC<FeatureItemProps>;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
import type { ProcessedPurpose, VendorId } from '../types';
|
|
2
|
+
import type { ProcessedPurpose, VendorId } from '../types.js';
|
|
3
3
|
interface PurposeItemProps {
|
|
4
|
-
purpose
|
|
4
|
+
/** A purpose, or a display-model row carrying `hasConsentBasis`. */
|
|
5
|
+
purpose: ProcessedPurpose & {
|
|
6
|
+
hasConsentBasis?: boolean;
|
|
7
|
+
};
|
|
5
8
|
/**
|
|
6
9
|
* The row's `data-testid`. Comes from the shared display model, which
|
|
7
10
|
* namespaces it by row kind — a purpose, a special purpose and a
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import type { FC } from 'react';
|
|
2
|
-
import type { ProcessedStack, VendorId } from '../types';
|
|
2
|
+
import type { ProcessedStack, VendorId } from '../types.js';
|
|
3
3
|
interface StackItemProps {
|
|
4
|
-
stack
|
|
4
|
+
/** A stack, or a display-model stack row whose purposes carry `hasConsentBasis`. */
|
|
5
|
+
stack: Omit<ProcessedStack, 'purposes'> & {
|
|
6
|
+
purposes: (ProcessedStack['purposes'][number] & {
|
|
7
|
+
hasConsentBasis?: boolean;
|
|
8
|
+
})[];
|
|
9
|
+
};
|
|
5
10
|
consents: Record<number, boolean>;
|
|
6
11
|
onToggle: (purposeId: number, value: boolean) => void;
|
|
7
12
|
vendorConsents: Record<string, boolean>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { GlobalVendorList } from '@c15t/core';
|
|
2
2
|
import type { FC } from 'react';
|
|
3
|
-
import type { ProcessedPurpose, VendorId } from '../types';
|
|
3
|
+
import type { ProcessedPurpose, VendorId } from '../types.js';
|
|
4
4
|
interface CustomVendor {
|
|
5
5
|
id: string | number;
|
|
6
6
|
name: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type * as C15tCoreTypes from '@c15t/core';
|
|
2
2
|
import type { FC } from 'react';
|
|
3
|
-
import type { ConsentDialogTriggerProps } from '../panel-trigger';
|
|
3
|
+
import type { ConsentDialogTriggerProps } from '../panel-trigger/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Props for the IABConsentDialog component.
|
|
6
6
|
* @public
|
|
@@ -64,10 +64,10 @@ export interface IABConsentDialogProps {
|
|
|
64
64
|
uiSource?: string;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
67
|
-
* IAB TCF 2.
|
|
67
|
+
* IAB TCF 2.4 compliant consent dialog dialog.
|
|
68
68
|
*
|
|
69
69
|
* @remarks
|
|
70
|
-
* This component implements the required IAB TCF 2.
|
|
70
|
+
* This component implements the required IAB TCF 2.4 UI elements:
|
|
71
71
|
* - Tabbed interface for Purposes and Vendors
|
|
72
72
|
* - Purpose grouping with stacks
|
|
73
73
|
* - Individual purpose and vendor consent toggles
|
|
@@ -7,17 +7,18 @@
|
|
|
7
7
|
* of the consent dialog's parts.
|
|
8
8
|
*/
|
|
9
9
|
import type { FC } from 'react';
|
|
10
|
-
import { IABConsentDialogCard } from './atoms/card';
|
|
11
|
-
import { IABConsentDialogContent } from './atoms/content';
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import
|
|
10
|
+
import { IABConsentDialogCard } from './atoms/card.js';
|
|
11
|
+
import { IABConsentDialogContent } from './atoms/content.js';
|
|
12
|
+
import { FeatureItem } from './atoms/feature-item.js';
|
|
13
|
+
import { IABConsentDialogFooter } from './atoms/footer.js';
|
|
14
|
+
import { IABConsentDialogHeader } from './atoms/header.js';
|
|
15
|
+
import { IABConsentDialogOverlay } from './atoms/overlay.js';
|
|
16
|
+
import { PurposeItem } from './atoms/purpose-item.js';
|
|
17
|
+
import { IABConsentDialogRoot } from './atoms/root.js';
|
|
18
|
+
import { StackItem } from './atoms/stack-item.js';
|
|
19
|
+
import { IABConsentDialogTabButton, IABConsentDialogTabs } from './atoms/tabs.js';
|
|
20
|
+
import { VendorList } from './atoms/vendor-list.js';
|
|
21
|
+
import type { IABConsentDialogProps } from './iab-panel.js';
|
|
21
22
|
/**
|
|
22
23
|
* This interface extends the base IABConsentDialog component with additional sub-components
|
|
23
24
|
* that can be used to compose the consent dialog's structure.
|
|
@@ -31,19 +32,20 @@ export interface IABConsentDialogCompoundComponent extends FC<IABConsentDialogPr
|
|
|
31
32
|
Content: typeof IABConsentDialogContent;
|
|
32
33
|
Footer: typeof IABConsentDialogFooter;
|
|
33
34
|
Overlay: typeof IABConsentDialogOverlay;
|
|
35
|
+
FeatureItem: typeof FeatureItem;
|
|
34
36
|
PurposeItem: typeof PurposeItem;
|
|
35
37
|
StackItem: typeof StackItem;
|
|
36
38
|
VendorList: typeof VendorList;
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
|
-
* IAB TCF 2.
|
|
41
|
+
* IAB TCF 2.4 compliant consent dialog dialog component.
|
|
40
42
|
*
|
|
41
43
|
* @remarks
|
|
42
44
|
* This component serves as the main entry point for rendering an IAB-compliant consent dialog.
|
|
43
45
|
* It provides a structured layout with required IAB TCF elements.
|
|
44
46
|
*
|
|
45
47
|
* Key features:
|
|
46
|
-
* - IAB TCF 2.
|
|
48
|
+
* - IAB TCF 2.4 compliant
|
|
47
49
|
* - Fully accessible by default
|
|
48
50
|
* - Customizable appearance
|
|
49
51
|
* - Compound component pattern support
|
|
@@ -76,17 +78,18 @@ export interface IABConsentDialogCompoundComponent extends FC<IABConsentDialogPr
|
|
|
76
78
|
*/
|
|
77
79
|
declare const IABConsentDialog: IABConsentDialogCompoundComponent;
|
|
78
80
|
export default IABConsentDialog;
|
|
79
|
-
export { IABConsentDialogCard } from './atoms/card';
|
|
80
|
-
export { IABConsentDialogContent } from './atoms/content';
|
|
81
|
-
export {
|
|
82
|
-
export {
|
|
83
|
-
export {
|
|
84
|
-
export {
|
|
85
|
-
export {
|
|
86
|
-
export {
|
|
87
|
-
export {
|
|
88
|
-
export {
|
|
89
|
-
export {
|
|
90
|
-
export { type
|
|
91
|
-
export
|
|
81
|
+
export { IABConsentDialogCard } from './atoms/card.js';
|
|
82
|
+
export { IABConsentDialogContent } from './atoms/content.js';
|
|
83
|
+
export { FeatureItem, type FeatureItemProps } from './atoms/feature-item.js';
|
|
84
|
+
export { IABConsentDialogFooter } from './atoms/footer.js';
|
|
85
|
+
export { IABConsentDialogHeader } from './atoms/header.js';
|
|
86
|
+
export { IABConsentDialogOverlay } from './atoms/overlay.js';
|
|
87
|
+
export { PurposeItem } from './atoms/purpose-item.js';
|
|
88
|
+
export { IABConsentDialogRoot } from './atoms/root.js';
|
|
89
|
+
export { StackItem } from './atoms/stack-item.js';
|
|
90
|
+
export { IABConsentDialogTabButton, IABConsentDialogTabs } from './atoms/tabs.js';
|
|
91
|
+
export { VendorList } from './atoms/vendor-list.js';
|
|
92
|
+
export { type IABDisplayModel, useIABDisplayModel, } from './hooks/use-display-model.js';
|
|
93
|
+
export { type GVLData, useGVLData } from './hooks/use-gvl-data.js';
|
|
94
|
+
export type { ProcessedPurpose, ProcessedSpecialFeature, ProcessedStack, ProcessedVendor, } from './types.js';
|
|
92
95
|
export { IABConsentDialog, type IABConsentDialogProps };
|
|
@@ -42,10 +42,10 @@ export interface IABConsentBannerProps {
|
|
|
42
42
|
uiSource?: string;
|
|
43
43
|
}
|
|
44
44
|
/**
|
|
45
|
-
* IAB TCF 2.
|
|
45
|
+
* IAB TCF 2.4 compliant cookie consent banner.
|
|
46
46
|
*
|
|
47
47
|
* @remarks
|
|
48
|
-
* This component implements the required IAB TCF 2.
|
|
48
|
+
* This component implements the required IAB TCF 2.4 UI elements:
|
|
49
49
|
* - Partner count disclosure
|
|
50
50
|
* - Purpose summary
|
|
51
51
|
* - Legitimate interest notice
|
|
@@ -57,7 +57,7 @@ export interface IABConsentBannerProps {
|
|
|
57
57
|
* ```tsx
|
|
58
58
|
* <ConsentProvider
|
|
59
59
|
* options={{
|
|
60
|
-
* mode: hosted({
|
|
60
|
+
* mode: hosted({ backendURL: '/api/c15t' }),
|
|
61
61
|
* iab: { cmpId: 123, vendors: [1, 2, 10] },
|
|
62
62
|
* }}
|
|
63
63
|
* >
|
|
@@ -7,15 +7,15 @@
|
|
|
7
7
|
* of the banner's parts.
|
|
8
8
|
*/
|
|
9
9
|
import type { FC } from 'react';
|
|
10
|
-
import { IABConsentBannerButtonGroup, IABConsentBannerFooterSpacer } from './atoms/button-group';
|
|
11
|
-
import { IABConsentBannerCard } from './atoms/card';
|
|
12
|
-
import { IABConsentBannerDescription } from './atoms/description';
|
|
13
|
-
import { IABConsentBannerFooter } from './atoms/footer';
|
|
14
|
-
import { IABConsentBannerHeader } from './atoms/header';
|
|
15
|
-
import { IABConsentBannerOverlay } from './atoms/overlay';
|
|
16
|
-
import { IABConsentBannerRoot } from './atoms/root';
|
|
17
|
-
import { IABConsentBannerTitle } from './atoms/title';
|
|
18
|
-
import type { IABConsentBannerProps } from './iab-prompt';
|
|
10
|
+
import { IABConsentBannerButtonGroup, IABConsentBannerFooterSpacer } from './atoms/button-group.js';
|
|
11
|
+
import { IABConsentBannerCard } from './atoms/card.js';
|
|
12
|
+
import { IABConsentBannerDescription } from './atoms/description.js';
|
|
13
|
+
import { IABConsentBannerFooter } from './atoms/footer.js';
|
|
14
|
+
import { IABConsentBannerHeader } from './atoms/header.js';
|
|
15
|
+
import { IABConsentBannerOverlay } from './atoms/overlay.js';
|
|
16
|
+
import { IABConsentBannerRoot } from './atoms/root.js';
|
|
17
|
+
import { IABConsentBannerTitle } from './atoms/title.js';
|
|
18
|
+
import type { IABConsentBannerProps } from './iab-prompt.js';
|
|
19
19
|
/**
|
|
20
20
|
* This interface extends the base IABConsentBanner component with additional sub-components
|
|
21
21
|
* that can be used to compose the banner's structure.
|
|
@@ -32,14 +32,14 @@ export interface IABConsentBannerCompoundComponent extends FC<IABConsentBannerPr
|
|
|
32
32
|
Overlay: typeof IABConsentBannerOverlay;
|
|
33
33
|
}
|
|
34
34
|
/**
|
|
35
|
-
* IAB TCF 2.
|
|
35
|
+
* IAB TCF 2.4 compliant cookie consent banner component.
|
|
36
36
|
*
|
|
37
37
|
* @remarks
|
|
38
38
|
* This component serves as the main entry point for rendering an IAB-compliant consent banner.
|
|
39
39
|
* It provides a structured layout with required IAB TCF elements.
|
|
40
40
|
*
|
|
41
41
|
* Key features:
|
|
42
|
-
* - IAB TCF 2.
|
|
42
|
+
* - IAB TCF 2.4 compliant
|
|
43
43
|
* - Fully accessible by default
|
|
44
44
|
* - Customizable appearance
|
|
45
45
|
* - Compound component pattern support
|
|
@@ -76,12 +76,12 @@ export interface IABConsentBannerCompoundComponent extends FC<IABConsentBannerPr
|
|
|
76
76
|
*/
|
|
77
77
|
declare const IABConsentBanner: IABConsentBannerCompoundComponent;
|
|
78
78
|
export default IABConsentBanner;
|
|
79
|
-
export { IABConsentBannerButtonGroup, IABConsentBannerFooterSpacer, } from './atoms/button-group';
|
|
80
|
-
export { IABConsentBannerCard } from './atoms/card';
|
|
81
|
-
export { IABConsentBannerDescription } from './atoms/description';
|
|
82
|
-
export { IABConsentBannerFooter } from './atoms/footer';
|
|
83
|
-
export { IABConsentBannerHeader } from './atoms/header';
|
|
84
|
-
export { IABConsentBannerOverlay } from './atoms/overlay';
|
|
85
|
-
export { IABConsentBannerRoot } from './atoms/root';
|
|
86
|
-
export { IABConsentBannerTitle } from './atoms/title';
|
|
79
|
+
export { IABConsentBannerButtonGroup, IABConsentBannerFooterSpacer, } from './atoms/button-group.js';
|
|
80
|
+
export { IABConsentBannerCard } from './atoms/card.js';
|
|
81
|
+
export { IABConsentBannerDescription } from './atoms/description.js';
|
|
82
|
+
export { IABConsentBannerFooter } from './atoms/footer.js';
|
|
83
|
+
export { IABConsentBannerHeader } from './atoms/header.js';
|
|
84
|
+
export { IABConsentBannerOverlay } from './atoms/overlay.js';
|
|
85
|
+
export { IABConsentBannerRoot } from './atoms/root.js';
|
|
86
|
+
export { IABConsentBannerTitle } from './atoms/title.js';
|
|
87
87
|
export { IABConsentBanner, type IABConsentBannerProps };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import type { BoxProps } from '../../shared/primitives/box';
|
|
3
|
-
import type { InlineLegalLinksProps } from '../../shared/primitives/legal-links';
|
|
4
|
-
import type { BrandingSlotContext, BrandingVariant } from '../../shared/ui/branding';
|
|
5
|
-
import type { ClassNameStyle } from '../../../types/theme';
|
|
2
|
+
import type { BoxProps } from '../../shared/primitives/box.js';
|
|
3
|
+
import type { InlineLegalLinksProps } from '../../shared/primitives/legal-links/index.js';
|
|
4
|
+
import type { BrandingSlotContext, BrandingVariant } from '../../shared/ui/branding.js';
|
|
5
|
+
import type { ClassNameStyle } from '../../../types/theme/index.js';
|
|
6
6
|
declare const ConsentDialogCard: import("react").ForwardRefExoticComponent<{
|
|
7
7
|
/** The content to be rendered inside the consent dialog card */
|
|
8
8
|
children?: ReactNode;
|
|
@@ -25,6 +25,7 @@ declare const ConsentDialogHeader: import("react").ForwardRefExoticComponent<Omi
|
|
|
25
25
|
* - Uses proper heading semantics for accessibility
|
|
26
26
|
* - Should be used within ConsentDialogHeader
|
|
27
27
|
* - Supports theme customization
|
|
28
|
+
* - Renders an `h2`; with `asChild` the child element takes its place
|
|
28
29
|
*/
|
|
29
30
|
declare const ConsentDialogHeaderTitle: import("react").ForwardRefExoticComponent<Omit<BoxProps, "slotKey"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
30
31
|
/**
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements accessible modal behavior with animation support.
|
|
5
5
|
*/
|
|
6
6
|
import type { FC, PropsWithChildren } from 'react';
|
|
7
|
-
import type { ThemeValue } from '../../../types/theme';
|
|
7
|
+
import type { ThemeValue } from '../../../types/theme/index.js';
|
|
8
8
|
/**
|
|
9
9
|
* Props for the Overlay component.
|
|
10
10
|
*
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
* of the dialog's parts.
|
|
8
8
|
*/
|
|
9
9
|
import type { FC } from 'react';
|
|
10
|
-
import { Card, ConsentCustomizationCard, ConsentDialogContent, ConsentDialogFooter, ConsentDialogHeader, ConsentDialogHeaderDescription, ConsentDialogHeaderTitle, Content, Footer, Header, HeaderDescription, HeaderTitle } from './atoms/card';
|
|
11
|
-
import { Overlay } from './atoms/overlay';
|
|
12
|
-
import { Root } from './atoms/root';
|
|
13
|
-
import type { ConsentDialogProps } from './panel';
|
|
10
|
+
import { Card, ConsentCustomizationCard, ConsentDialogContent, ConsentDialogFooter, ConsentDialogHeader, ConsentDialogHeaderDescription, ConsentDialogHeaderTitle, Content, Footer, Header, HeaderDescription, HeaderTitle } from './atoms/card.js';
|
|
11
|
+
import { Overlay } from './atoms/overlay.js';
|
|
12
|
+
import { Root } from './atoms/root.js';
|
|
13
|
+
import type { ConsentDialogProps } from './panel.js';
|
|
14
14
|
export type { ConsentDialogProps };
|
|
15
15
|
/**
|
|
16
16
|
* This interface extends the base ConsentDialog component with additional sub-components
|
|
@@ -57,7 +57,7 @@ export interface ConsentDialogCompoundComponent extends FC<ConsentDialogProps> {
|
|
|
57
57
|
* ```tsx
|
|
58
58
|
* <ConsentProvider
|
|
59
59
|
* options={{
|
|
60
|
-
* mode: hosted({
|
|
60
|
+
* mode: hosted({ backendURL: '/api/c15t' }),
|
|
61
61
|
* components: {
|
|
62
62
|
* dialog: {
|
|
63
63
|
* card: { className: 'rounded-3xl shadow-xl' },
|
|
@@ -98,7 +98,7 @@ export interface ConsentDialogCompoundComponent extends FC<ConsentDialogProps> {
|
|
|
98
98
|
*/
|
|
99
99
|
declare const ConsentDialog: ConsentDialogCompoundComponent;
|
|
100
100
|
export default ConsentDialog;
|
|
101
|
-
export { Card, ConsentCustomizationCard, ConsentDialogContent, ConsentDialogFooter, ConsentDialogHeader, ConsentDialogHeaderDescription, ConsentDialogHeaderTitle, Content, Footer, Header, HeaderDescription, HeaderTitle, } from './atoms/card';
|
|
102
|
-
export { ConsentDialogOverlay, Overlay } from './atoms/overlay';
|
|
103
|
-
export { ConsentDialogRoot, Root } from './atoms/root';
|
|
101
|
+
export { Card, ConsentCustomizationCard, ConsentDialogContent, ConsentDialogFooter, ConsentDialogHeader, ConsentDialogHeaderDescription, ConsentDialogHeaderTitle, Content, Footer, Header, HeaderDescription, HeaderTitle, } from './atoms/card.js';
|
|
102
|
+
export { ConsentDialogOverlay, Overlay } from './atoms/overlay.js';
|
|
103
|
+
export { ConsentDialogRoot, Root } from './atoms/root.js';
|
|
104
104
|
export { ConsentDialog };
|
|
@@ -8,8 +8,8 @@ import type * as C15tCoreTypes from '@c15t/core';
|
|
|
8
8
|
* prefer a one-line `<ConsentDialog />` usage still have it.
|
|
9
9
|
*/
|
|
10
10
|
import type { FC } from 'react';
|
|
11
|
-
import type { ConsentDialogTriggerProps } from '../panel-trigger';
|
|
12
|
-
import type { InlineLegalLinksProps } from '../shared/primitives/legal-links';
|
|
11
|
+
import type { ConsentDialogTriggerProps } from '../panel-trigger/index.js';
|
|
12
|
+
import type { InlineLegalLinksProps } from '../shared/primitives/legal-links/index.js';
|
|
13
13
|
/**
|
|
14
14
|
* Props for the `<ConsentDialog />` convenience component.
|
|
15
15
|
*/
|
|
@@ -37,7 +37,7 @@ export interface ConsentDialogProps {
|
|
|
37
37
|
trapFocus?: boolean;
|
|
38
38
|
/**
|
|
39
39
|
* Control the open state. If omitted the dialog follows
|
|
40
|
-
* `
|
|
40
|
+
* `useActiveUI() === 'dialog'`.
|
|
41
41
|
*/
|
|
42
42
|
open?: boolean;
|
|
43
43
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { ConsentDialogLink, type ConsentDialogLinkProps, } from '../consent-preferences-link/consent-preferences-link';
|
|
1
|
+
export { ConsentDialogLink, type ConsentDialogLinkProps, } from '../consent-preferences-link/consent-preferences-link.js';
|