@c15t/react 2.2.1 → 3.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +88 -141
- package/README.md +2 -2
- package/dist/aggregate-components.js +2 -0
- package/dist/chunk-warming.js +1 -0
- package/dist/component-hooks/use-headless-consent-ui.js +2 -0
- package/dist/component-hooks/use-headless-iab-consent-ui.js +2 -0
- package/dist/component-hooks/use-manager.js +2 -0
- package/dist/component-hooks/use-panel-trigger.js +2 -0
- package/dist/component-hooks/use-translations.js +2 -0
- package/dist/components/consent-preferences-link/consent-preferences-link.js +2 -1
- package/dist/components/consent-preferences-link/index.js +1 -0
- package/dist/components/frame/atoms.js +1 -1
- package/dist/components/frame/frame.js +2 -1
- package/dist/components/frame/index.js +2 -1
- package/dist/components/iab-panel/atoms/card.js +2 -0
- package/dist/components/iab-panel/atoms/content.js +2 -0
- package/dist/components/iab-panel/atoms/footer.js +2 -0
- package/dist/components/iab-panel/atoms/header.js +2 -0
- package/dist/components/iab-panel/atoms/overlay.js +2 -0
- package/dist/components/iab-panel/atoms/purpose-item.js +2 -0
- package/dist/components/iab-panel/atoms/root.js +2 -0
- package/dist/components/iab-panel/atoms/stack-item.js +2 -0
- package/dist/components/iab-panel/atoms/tabs.js +2 -0
- package/dist/components/iab-panel/atoms/vendor-list.js +2 -0
- package/dist/components/iab-panel/hooks/use-display-model.js +2 -0
- package/dist/components/iab-panel/hooks/use-gvl-data.js +2 -0
- package/dist/components/iab-panel/iab-panel.js +2 -0
- package/dist/components/iab-panel/index.js +2 -0
- package/dist/components/iab-panel/use-iab-translations.js +1 -0
- package/dist/components/iab-prompt/atoms/button-group.js +2 -0
- package/dist/components/iab-prompt/atoms/card.js +2 -0
- package/dist/components/iab-prompt/atoms/description.js +2 -0
- package/dist/components/iab-prompt/atoms/footer.js +2 -0
- package/dist/components/iab-prompt/atoms/header.js +2 -0
- package/dist/components/iab-prompt/atoms/overlay.js +2 -0
- package/dist/components/iab-prompt/atoms/root.js +2 -0
- package/dist/components/iab-prompt/atoms/title.js +2 -0
- package/dist/components/iab-prompt/iab-prompt.js +2 -0
- package/dist/components/iab-prompt/index.js +2 -0
- package/dist/components/panel/atoms/card.js +2 -0
- package/dist/components/panel/atoms/overlay.js +1 -0
- package/dist/components/panel/atoms/root.js +2 -0
- package/dist/components/panel/index.js +2 -0
- package/dist/components/panel/panel.js +2 -0
- package/dist/components/{consent-dialog-link → panel-link}/index.js +1 -0
- package/dist/components/panel-trigger/atoms/button.js +2 -0
- package/dist/components/panel-trigger/atoms/icon.js +2 -0
- package/dist/components/panel-trigger/atoms/root.js +2 -0
- package/dist/components/panel-trigger/atoms/text.js +2 -0
- package/dist/components/panel-trigger/atoms/toolbar.js +2 -0
- package/dist/components/panel-trigger/index.js +2 -0
- package/dist/components/panel-trigger/panel-trigger-toolbar.js +2 -0
- package/dist/components/panel-trigger/panel-trigger.js +2 -0
- package/dist/components/panel-trigger/use-draggable.js +2 -0
- package/dist/components/preferences/atoms/accordion.js +1 -0
- package/dist/components/preferences/atoms/button.js +1 -0
- package/dist/components/preferences/atoms/footer.js +1 -0
- package/dist/components/preferences/atoms/root.js +2 -0
- package/dist/components/preferences/index.js +2 -0
- package/dist/components/preferences/policy-actions.js +2 -0
- package/dist/components/preferences/preferences.js +2 -0
- package/dist/components/prompt/atoms/overlay.js +1 -0
- package/dist/components/prompt/atoms/root.js +2 -0
- package/dist/components/prompt/components.js +1 -0
- package/dist/components/prompt/error-boundary.js +2 -0
- package/dist/components/prompt/index.js +2 -0
- package/dist/components/prompt/policy-actions.js +2 -0
- package/dist/components/prompt/prompt.js +2 -0
- package/dist/components/prompt/resolve-banner-primary-actions.js +1 -0
- package/dist/components/prompt/surface-context.js +2 -0
- package/dist/components/prompt/use-banner-copy.js +2 -0
- package/dist/components/shared/libs/recursive-clone-children.js +1 -1
- package/dist/components/shared/libs/slot.js +1 -1
- package/dist/components/shared/libs/use-controllable-state.js +1 -1
- package/dist/components/shared/policy-actions.js +2 -1
- package/dist/components/shared/primitives/box.js +2 -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/ui/accordion/accordion.js +2 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.js +2 -1
- package/dist/components/shared/ui/branding.js +1 -1
- package/dist/components/shared/ui/button/button.js +1 -1
- package/dist/components/shared/ui/collapsible/collapsible.js +2 -1
- package/dist/components/shared/ui/dialog/dialog.js +2 -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 +2 -1
- package/dist/components/shared/ui/switch/switch.js +1 -1
- package/dist/components/shared/ui/tabs/tabs.js +2 -1
- package/dist/context/consent-tracking-context.js +1 -0
- package/dist/context/iab-context-value.js +1 -0
- package/dist/context/index.js +1 -0
- package/dist/context/theme-context.js +2 -1
- package/dist/context.js +1 -0
- package/dist/devtools.js +2 -0
- package/dist/draft.js +2 -0
- package/dist/external-iab-context.js +2 -0
- package/dist/frame.js +2 -0
- package/dist/headless.js +1 -1
- package/dist/hooks/use-color-scheme.js +2 -1
- package/dist/hooks/use-component-config.js +2 -1
- package/dist/hooks/use-focus-trap.js +2 -1
- package/dist/hooks/use-headless-iab-consent-ui.js +2 -1
- package/dist/hooks/use-iab-manager.js +2 -0
- package/dist/hooks/use-is-hydrated.js +2 -0
- package/dist/hooks/use-reduced-motion.js +2 -1
- package/dist/hooks/use-scroll-lock.js +2 -1
- package/dist/hooks/use-text-direction.js +2 -1
- package/dist/hooks/use-theme.js +2 -1
- package/dist/hooks.js +1 -0
- package/dist/iab/styles.css +1 -1
- package/dist/iab/styles.tw3.css +133 -19
- package/dist/iab-context.js +2 -0
- package/dist/iab.js +1 -1
- package/dist/index.js +1 -1
- package/dist/module-hooks/iframe-blocker.js +2 -0
- package/dist/module-hooks/network-blocker.js +2 -0
- package/dist/module-hooks/persistence.js +2 -0
- package/dist/module-hooks/script-loader.js +2 -0
- package/dist/module-hooks/shared.js +2 -0
- package/dist/module-hooks.js +2 -0
- package/dist/panel-link.js +2 -0
- package/dist/panel-trigger.js +2 -0
- package/dist/panel.js +2 -0
- package/dist/preferences.js +2 -0
- package/dist/primitives.js +1 -1
- package/dist/prompt.js +2 -0
- package/dist/provider.js +2 -0
- package/dist/server/fetch-ssr-data.js +1 -1
- package/dist/server/headers.js +1 -1
- package/dist/server/init-cache-key.js +1 -1
- package/dist/server/normalize-url.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.tw3.css +173 -29
- package/dist/theme-provider.js +2 -0
- package/dist/transports/offline.js +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/theme/index.js +1 -1
- package/dist/types/theme/style-types.js +1 -1
- package/dist/ui-config-context.js +2 -0
- package/dist/ui-save.js +1 -0
- package/dist/utils/cn.js +1 -1
- package/dist/utils/default-translation-config.js +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/merge-slot-props.js +1 -0
- package/dist/utils/merge-styles.js +1 -1
- package/dist/utils/theme-utils.js +1 -1
- package/dist/version.js +1 -1
- package/dist-types/aggregate-components.d.ts +4 -0
- package/dist-types/chunk-warming.d.ts +19 -0
- package/dist-types/component-hooks/use-headless-consent-ui.d.ts +68 -0
- package/dist-types/component-hooks/use-headless-iab-consent-ui.d.ts +22 -0
- package/dist-types/component-hooks/use-manager.d.ts +40 -0
- package/dist-types/component-hooks/use-panel-trigger.d.ts +20 -0
- package/dist-types/component-hooks/use-translations.d.ts +2 -0
- package/dist-types/components/consent-preferences-link/consent-preferences-link.d.ts +1 -1
- package/dist-types/components/frame/atoms.d.ts +5 -5
- package/dist-types/components/frame/types.d.ts +3 -2
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/card.d.ts +2 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/content.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/footer.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/header.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/overlay.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/purpose-item.d.ts +7 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/root.d.ts +3 -2
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/stack-item.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/tabs.d.ts +1 -1
- package/dist-types/components/{iab-consent-dialog → iab-panel}/atoms/vendor-list.d.ts +2 -3
- package/dist-types/components/iab-panel/hooks/use-display-model.d.ts +18 -0
- package/dist-types/components/iab-panel/hooks/use-gvl-data.d.ts +17 -0
- package/dist-types/components/{iab-consent-dialog/iab-consent-dialog.d.ts → iab-panel/iab-panel.d.ts} +10 -3
- package/dist-types/components/{iab-consent-dialog → iab-panel}/index.d.ts +3 -2
- package/dist-types/components/iab-panel/types.d.ts +1 -0
- package/dist-types/components/{iab-consent-dialog → iab-panel}/use-iab-translations.d.ts +3 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/button-group.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/card.d.ts +2 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/description.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/footer.d.ts +2 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/header.d.ts +2 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/overlay.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/root.d.ts +3 -2
- package/dist-types/components/{iab-consent-banner → iab-prompt}/atoms/title.d.ts +1 -1
- package/dist-types/components/{iab-consent-banner/iab-consent-banner.d.ts → iab-prompt/iab-prompt.d.ts} +10 -4
- package/dist-types/components/{iab-consent-banner → iab-prompt}/index.d.ts +1 -1
- package/dist-types/components/{consent-dialog → panel}/atoms/card.d.ts +15 -15
- package/dist-types/components/{consent-dialog → panel}/atoms/overlay.d.ts +24 -8
- package/dist-types/components/{consent-dialog → panel}/atoms/root.d.ts +4 -3
- package/dist-types/components/{consent-dialog → panel}/index.d.ts +13 -8
- package/dist-types/components/{consent-dialog/consent-dialog.d.ts → panel/panel.d.ts} +6 -5
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/button.d.ts +2 -1
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/icon.d.ts +1 -16
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/root.d.ts +11 -23
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/text.d.ts +0 -11
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/atoms/toolbar.d.ts +15 -4
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/index.d.ts +2 -2
- package/dist-types/components/{consent-dialog-trigger/consent-dialog-trigger-toolbar.d.ts → panel-trigger/panel-trigger-toolbar.d.ts} +0 -23
- package/dist-types/components/{consent-dialog-trigger/consent-dialog-trigger.d.ts → panel-trigger/panel-trigger.d.ts} +8 -4
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/types.d.ts +16 -7
- package/dist-types/components/{consent-dialog-trigger → panel-trigger}/use-draggable.d.ts +2 -9
- package/dist-types/components/{consent-widget → preferences}/atoms/accordion.d.ts +5 -5
- package/dist-types/components/{consent-widget → preferences}/atoms/footer.d.ts +3 -3
- package/dist-types/components/{consent-widget → preferences}/atoms/root.d.ts +1 -1
- package/dist-types/components/{consent-widget → preferences}/index.d.ts +11 -9
- package/dist-types/components/preferences/policy-actions.d.ts +10 -0
- package/dist-types/components/{consent-banner → prompt}/atoms/overlay.d.ts +1 -1
- package/dist-types/components/prompt/atoms/root.d.ts +78 -0
- package/dist-types/components/{consent-banner → prompt}/components.d.ts +99 -14
- package/dist-types/components/{consent-banner → prompt}/error-boundary.d.ts +3 -1
- package/dist-types/components/{consent-banner → prompt}/index.d.ts +18 -10
- package/dist-types/components/prompt/policy-actions.d.ts +12 -0
- package/dist-types/components/{consent-banner/consent-banner.d.ts → prompt/prompt.d.ts} +36 -10
- package/dist-types/components/prompt/resolve-banner-primary-actions.d.ts +14 -0
- package/dist-types/components/prompt/surface-context.d.ts +45 -0
- package/dist-types/components/prompt/use-banner-copy.d.ts +16 -0
- package/dist-types/components/shared/libs/polymorphic.d.ts +2 -2
- package/dist-types/components/shared/libs/recursive-clone-children.d.ts +2 -2
- package/dist-types/components/shared/libs/slot.d.ts +1 -1
- package/dist-types/components/shared/libs/use-controllable-state.d.ts +1 -1
- package/dist-types/components/shared/policy-actions.d.ts +8 -3
- package/dist-types/components/shared/primitives/box.d.ts +3 -1
- package/dist-types/components/shared/primitives/button.d.ts +4 -37
- package/dist-types/components/shared/primitives/button.types.d.ts +3 -1
- package/dist-types/components/shared/primitives/legal-links/index.d.ts +7 -11
- package/dist-types/components/shared/ui/accordion/accordion.d.ts +45 -12
- package/dist-types/components/shared/ui/accordion/accordion.types.d.ts +1 -1
- package/dist-types/components/shared/ui/animated-collapse/animated-collapse.d.ts +1 -1
- package/dist-types/components/shared/ui/branding.d.ts +12 -12
- package/dist-types/components/shared/ui/button/button.d.ts +19 -25
- package/dist-types/components/shared/ui/button/button.types.d.ts +2 -2
- package/dist-types/components/shared/ui/collapsible/collapsible.d.ts +18 -1
- package/dist-types/components/shared/ui/dialog/dialog.d.ts +6 -6
- package/dist-types/components/shared/ui/icon.d.ts +1 -1
- package/dist-types/components/shared/ui/logo.d.ts +0 -21
- package/dist-types/components/shared/ui/preference-item/preference-item.d.ts +46 -2
- package/dist-types/components/shared/ui/switch/switch.d.ts +19 -8
- package/dist-types/components/shared/ui/tabs/tabs.d.ts +19 -2
- package/dist-types/context/iab-context-value.d.ts +37 -0
- package/dist-types/context/index.d.ts +3 -0
- package/dist-types/context/theme-context.d.ts +2 -2
- package/dist-types/context.d.ts +17 -0
- package/dist-types/devtools.d.ts +54 -0
- package/dist-types/draft.d.ts +31 -0
- package/dist-types/external-iab-context.d.ts +29 -0
- package/dist-types/frame.d.ts +1 -0
- package/dist-types/headless.d.ts +12 -8
- package/dist-types/hooks/use-color-scheme.d.ts +1 -1
- package/dist-types/hooks/use-component-config.d.ts +2 -2
- package/dist-types/hooks/use-focus-trap.d.ts +2 -2
- package/dist-types/hooks/use-headless-iab-consent-ui.d.ts +7 -8
- package/dist-types/hooks/use-iab-manager.d.ts +52 -0
- package/dist-types/hooks/use-is-hydrated.d.ts +8 -0
- package/dist-types/hooks/use-reduced-motion.d.ts +1 -1
- package/dist-types/hooks/use-scroll-lock.d.ts +1 -1
- package/dist-types/hooks/use-text-direction.d.ts +1 -1
- package/dist-types/hooks/use-theme.d.ts +2 -1
- package/dist-types/hooks.d.ts +148 -0
- package/dist-types/iab-context.d.ts +28 -0
- package/dist-types/iab.d.ts +14 -8
- package/dist-types/index.d.ts +61 -22
- package/dist-types/module-hooks/iframe-blocker.d.ts +6 -0
- package/dist-types/module-hooks/network-blocker.d.ts +9 -0
- package/dist-types/module-hooks/persistence.d.ts +4 -0
- package/dist-types/module-hooks/script-loader.d.ts +6 -0
- package/dist-types/module-hooks/shared.d.ts +2 -0
- package/dist-types/module-hooks.d.ts +4 -0
- package/dist-types/panel-link.d.ts +1 -0
- package/dist-types/panel-trigger.d.ts +1 -0
- package/dist-types/panel.d.ts +1 -0
- package/dist-types/preferences.d.ts +1 -0
- package/dist-types/prompt.d.ts +1 -0
- package/dist-types/provider.d.ts +144 -0
- package/dist-types/server/fetch-ssr-data.d.ts +2 -2
- package/dist-types/server/headers.d.ts +3 -3
- package/dist-types/server/init-cache-key.d.ts +3 -3
- package/dist-types/server/normalize-url.d.ts +2 -2
- package/dist-types/server/types.d.ts +1 -1
- package/dist-types/theme-provider.d.ts +10 -0
- package/dist-types/transports/offline.d.ts +18 -0
- package/dist-types/types/index.d.ts +3 -0
- package/dist-types/types/manager.d.ts +15 -0
- package/dist-types/types/slots.d.ts +5 -0
- package/dist-types/types/theme/index.d.ts +0 -1
- package/dist-types/types/theme/style-types.d.ts +3 -9
- package/dist-types/ui-config-context.d.ts +9 -0
- package/dist-types/ui-save.d.ts +5 -0
- package/dist-types/utils/cn.d.ts +1 -1
- package/dist-types/utils/default-translation-config.d.ts +6 -0
- package/dist-types/utils/index.d.ts +4 -0
- package/dist-types/utils/merge-slot-props.d.ts +14 -0
- package/dist-types/utils/merge-styles.d.ts +1 -1
- package/dist-types/utils/theme-utils.d.ts +2 -2
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +88 -141
- package/docs/assets/v3/brand-bar.png +0 -0
- package/docs/assets/v3/brand-card.png +0 -0
- package/docs/assets/v3/choice-wall.png +0 -0
- package/docs/assets/v3/mobile-card.png +0 -0
- package/docs/assets/v3/preferences.png +0 -0
- package/docs/customization/overview.md +45 -0
- package/docs/customization/recipes.md +79 -0
- package/docs/customization/slots.md +55 -0
- package/docs/customization/tokens.md +76 -0
- package/docs/customization/translations.md +49 -0
- package/docs/frameworks/react/components/consent-banner.md +219 -202
- package/docs/frameworks/react/components/consent-dialog-link.md +88 -35
- package/docs/frameworks/react/components/consent-dialog-trigger.md +74 -134
- package/docs/frameworks/react/components/consent-dialog.md +170 -135
- package/docs/frameworks/react/components/consent-manager-provider.md +41 -249
- package/docs/frameworks/react/components/consent-widget.md +154 -118
- package/docs/frameworks/react/components/dev-tools.md +198 -33
- package/docs/frameworks/react/components/frame.md +120 -42
- package/docs/frameworks/react/concepts/consent-categories.md +24 -89
- package/docs/frameworks/react/concepts/policy-presets.md +123 -0
- package/docs/frameworks/react/headless.md +91 -185
- package/docs/frameworks/react/hooks/use-consent-manager/overview.md +39 -153
- package/docs/frameworks/react/iab/overview.md +33 -108
- package/docs/frameworks/react/quickstart.md +116 -112
- package/docs/frameworks/react/script-loader.md +35 -535
- package/docs/frameworks/react/styling/overview.md +160 -255
- package/docs/frameworks/react/troubleshooting.md +47 -119
- package/docs/guides/consent-state.md +60 -0
- package/docs/guides/data-fetching.md +163 -0
- package/docs/guides/deployment-modes.md +63 -0
- package/docs/guides/troubleshooting.md +68 -0
- package/docs/guides/verify-consent.md +62 -0
- package/docs/integrations/adobe-analytics.md +239 -105
- package/docs/integrations/ahrefs-analytics.md +238 -104
- package/docs/integrations/amplitude.md +219 -157
- package/docs/integrations/building-integrations.md +32 -224
- package/docs/integrations/clearbit.md +247 -86
- package/docs/integrations/cloudflare-web-analytics.md +250 -84
- package/docs/integrations/crisp.md +251 -97
- package/docs/integrations/databuddy.md +259 -153
- package/docs/integrations/fathom-analytics.md +239 -96
- package/docs/integrations/google-maps.md +328 -207
- package/docs/integrations/google-tag-manager.md +248 -96
- package/docs/integrations/google-tag.md +261 -90
- package/docs/integrations/heap.md +222 -149
- package/docs/integrations/hightouch.md +225 -131
- package/docs/integrations/hotjar.md +239 -90
- package/docs/integrations/intercom.md +239 -98
- package/docs/integrations/linkedin-insights.md +243 -113
- package/docs/integrations/logrocket.md +241 -123
- package/docs/integrations/matomo-analytics.md +256 -111
- package/docs/integrations/meta-pixel.md +197 -324
- package/docs/integrations/microsoft-clarity.md +233 -114
- package/docs/integrations/microsoft-uet.md +245 -110
- package/docs/integrations/mixpanel-analytics.md +252 -87
- package/docs/integrations/openai-pixel.md +441 -0
- package/docs/integrations/overview.md +95 -133
- package/docs/integrations/pirsch.md +249 -96
- package/docs/integrations/plausible-analytics.md +241 -100
- package/docs/integrations/posthog.md +353 -214
- package/docs/integrations/promptwatch.md +251 -81
- package/docs/integrations/reddit-pixel.md +226 -173
- package/docs/integrations/rudderstack.md +244 -187
- package/docs/integrations/rybbit-analytics.md +244 -91
- package/docs/integrations/segment.md +238 -92
- package/docs/integrations/snapchat-pixel.md +240 -110
- package/docs/integrations/tiktok-pixel.md +249 -81
- package/docs/integrations/umami-analytics.md +242 -95
- package/docs/integrations/vercel-analytics.md +242 -90
- package/docs/integrations/x-pixel.md +238 -104
- package/docs/integrations/youtube.md +354 -142
- package/docs/upgrade-v3.md +334 -0
- package/iab/styles.css +1 -1
- package/iab/styles.tw3.css +1 -1
- package/package.json +187 -102
- package/readme.json +1 -1
- package/src/iab/styles.css +1 -1
- package/src/iab/styles.tw3.css +1 -1
- package/src/styles.css +1 -1
- package/src/styles.tw3.css +1 -1
- package/styles.css +1 -1
- package/styles.tw3.css +1 -1
- package/client/components/consent-banner.js +0 -4
- package/client/components/consent-dialog-link.js +0 -3
- package/client/components/consent-dialog-trigger.js +0 -3
- package/client/components/consent-dialog.js +0 -4
- package/client/components/consent-widget.js +0 -4
- package/client/components/frame.js +0 -3
- package/client/components/integrations.js +0 -3
- package/dist/components/consent-banner/atoms/overlay.cjs +0 -1
- package/dist/components/consent-banner/atoms/overlay.js +0 -1
- package/dist/components/consent-banner/atoms/root.cjs +0 -1
- package/dist/components/consent-banner/atoms/root.js +0 -1
- package/dist/components/consent-banner/components.cjs +0 -1
- package/dist/components/consent-banner/components.js +0 -1
- package/dist/components/consent-banner/consent-banner.cjs +0 -1
- package/dist/components/consent-banner/consent-banner.js +0 -1
- package/dist/components/consent-banner/error-boundary.cjs +0 -1
- package/dist/components/consent-banner/error-boundary.js +0 -1
- package/dist/components/consent-banner/index.cjs +0 -1
- package/dist/components/consent-banner/index.js +0 -1
- package/dist/components/consent-banner/policy-actions.cjs +0 -1
- package/dist/components/consent-banner/policy-actions.js +0 -1
- package/dist/components/consent-dialog/atoms/card.cjs +0 -1
- package/dist/components/consent-dialog/atoms/card.js +0 -1
- package/dist/components/consent-dialog/atoms/overlay.cjs +0 -1
- package/dist/components/consent-dialog/atoms/overlay.js +0 -1
- package/dist/components/consent-dialog/atoms/root.cjs +0 -1
- package/dist/components/consent-dialog/atoms/root.js +0 -1
- package/dist/components/consent-dialog/consent-dialog.cjs +0 -1
- package/dist/components/consent-dialog/consent-dialog.js +0 -1
- package/dist/components/consent-dialog/index.cjs +0 -1
- package/dist/components/consent-dialog/index.js +0 -1
- package/dist/components/consent-dialog-link/index.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/button.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/button.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/icon.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/root.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/root.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/text.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/text.js +0 -1
- package/dist/components/consent-dialog-trigger/atoms/toolbar.cjs +0 -1
- package/dist/components/consent-dialog-trigger/atoms/toolbar.js +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.cjs +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger-toolbar.js +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.cjs +0 -1
- package/dist/components/consent-dialog-trigger/consent-dialog-trigger.js +0 -1
- package/dist/components/consent-dialog-trigger/index.cjs +0 -1
- package/dist/components/consent-dialog-trigger/index.js +0 -1
- package/dist/components/consent-dialog-trigger/types.cjs +0 -1
- package/dist/components/consent-dialog-trigger/use-draggable.cjs +0 -1
- package/dist/components/consent-dialog-trigger/use-draggable.js +0 -1
- package/dist/components/consent-preferences-link/consent-preferences-link.cjs +0 -1
- package/dist/components/consent-preferences-link/index.cjs +0 -1
- package/dist/components/consent-widget/atoms/accordion.cjs +0 -1
- package/dist/components/consent-widget/atoms/accordion.js +0 -1
- package/dist/components/consent-widget/atoms/button.cjs +0 -1
- package/dist/components/consent-widget/atoms/button.js +0 -1
- package/dist/components/consent-widget/atoms/footer.cjs +0 -1
- package/dist/components/consent-widget/atoms/footer.js +0 -1
- package/dist/components/consent-widget/atoms/root.cjs +0 -1
- package/dist/components/consent-widget/atoms/root.js +0 -1
- package/dist/components/consent-widget/consent-widget.cjs +0 -1
- package/dist/components/consent-widget/consent-widget.js +0 -1
- package/dist/components/consent-widget/index.cjs +0 -1
- package/dist/components/consent-widget/index.js +0 -1
- package/dist/components/consent-widget/policy-actions.cjs +0 -1
- package/dist/components/consent-widget/policy-actions.js +0 -1
- package/dist/components/consent-widget/types.cjs +0 -1
- package/dist/components/frame/atoms.cjs +0 -1
- package/dist/components/frame/frame.cjs +0 -1
- package/dist/components/frame/index.cjs +0 -1
- package/dist/components/frame/types.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/button-group.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/button-group.js +0 -1
- package/dist/components/iab-consent-banner/atoms/card.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/card.js +0 -1
- package/dist/components/iab-consent-banner/atoms/description.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/description.js +0 -1
- package/dist/components/iab-consent-banner/atoms/footer.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/footer.js +0 -1
- package/dist/components/iab-consent-banner/atoms/header.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/header.js +0 -1
- package/dist/components/iab-consent-banner/atoms/overlay.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/overlay.js +0 -1
- package/dist/components/iab-consent-banner/atoms/root.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/root.js +0 -1
- package/dist/components/iab-consent-banner/atoms/title.cjs +0 -1
- package/dist/components/iab-consent-banner/atoms/title.js +0 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.cjs +0 -1
- package/dist/components/iab-consent-banner/iab-consent-banner.js +0 -1
- package/dist/components/iab-consent-banner/index.cjs +0 -1
- package/dist/components/iab-consent-banner/index.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/card.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/card.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/content.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/content.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/footer.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/footer.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/header.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/header.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/overlay.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/purpose-item.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/root.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/root.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/stack-item.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/tabs.js +0 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.cjs +0 -1
- package/dist/components/iab-consent-dialog/atoms/vendor-list.js +0 -1
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.cjs +0 -1
- package/dist/components/iab-consent-dialog/hooks/use-gvl-data.js +0 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.cjs +0 -1
- package/dist/components/iab-consent-dialog/iab-consent-dialog.js +0 -1
- package/dist/components/iab-consent-dialog/index.cjs +0 -1
- package/dist/components/iab-consent-dialog/index.js +0 -1
- package/dist/components/iab-consent-dialog/types.cjs +0 -1
- package/dist/components/iab-consent-dialog/use-iab-translations.cjs +0 -1
- package/dist/components/iab-consent-dialog/use-iab-translations.js +0 -1
- package/dist/components/integrations/google-map.cjs +0 -1
- package/dist/components/integrations/google-map.js +0 -1
- package/dist/components/integrations/index.cjs +0 -1
- package/dist/components/integrations/index.js +0 -1
- package/dist/components/integrations/shared.cjs +0 -1
- package/dist/components/integrations/shared.js +0 -1
- package/dist/components/integrations/youtube-embed.cjs +0 -1
- package/dist/components/integrations/youtube-embed.js +0 -1
- package/dist/components/shared/libs/polymorphic.cjs +0 -1
- package/dist/components/shared/libs/recursive-clone-children.cjs +0 -1
- package/dist/components/shared/libs/slot.cjs +0 -1
- package/dist/components/shared/libs/use-controllable-state.cjs +0 -1
- package/dist/components/shared/policy-actions.cjs +0 -1
- package/dist/components/shared/primitives/box.cjs +0 -1
- package/dist/components/shared/primitives/button.cjs +0 -1
- package/dist/components/shared/primitives/button.types.cjs +0 -1
- package/dist/components/shared/primitives/legal-links/index.cjs +0 -1
- package/dist/components/shared/ui/accordion/accordion.cjs +0 -1
- package/dist/components/shared/ui/accordion/accordion.types.cjs +0 -1
- package/dist/components/shared/ui/accordion/index.cjs +0 -1
- package/dist/components/shared/ui/animated-collapse/animated-collapse.cjs +0 -1
- package/dist/components/shared/ui/animated-collapse/index.cjs +0 -1
- package/dist/components/shared/ui/branding.cjs +0 -1
- package/dist/components/shared/ui/button/button.cjs +0 -1
- package/dist/components/shared/ui/button/button.types.cjs +0 -1
- package/dist/components/shared/ui/button/index.cjs +0 -1
- package/dist/components/shared/ui/collapsible/collapsible.cjs +0 -1
- package/dist/components/shared/ui/collapsible/index.cjs +0 -1
- package/dist/components/shared/ui/dialog/dialog.cjs +0 -1
- package/dist/components/shared/ui/dialog/index.cjs +0 -1
- package/dist/components/shared/ui/icon.cjs +0 -1
- package/dist/components/shared/ui/logo.cjs +0 -1
- package/dist/components/shared/ui/preference-item/index.cjs +0 -1
- package/dist/components/shared/ui/preference-item/preference-item.cjs +0 -1
- package/dist/components/shared/ui/switch/index.cjs +0 -1
- package/dist/components/shared/ui/switch/switch.cjs +0 -1
- package/dist/components/shared/ui/switch/switch.types.cjs +0 -1
- package/dist/components/shared/ui/tabs/index.cjs +0 -1
- package/dist/components/shared/ui/tabs/tabs.cjs +0 -1
- package/dist/context/consent-manager-context.cjs +0 -1
- package/dist/context/consent-manager-context.js +0 -1
- package/dist/context/consent-tracking-context.cjs +0 -1
- package/dist/context/theme-context.cjs +0 -1
- package/dist/headless.cjs +0 -1
- package/dist/hooks/index.cjs +0 -1
- package/dist/hooks/index.js +0 -1
- package/dist/hooks/use-color-scheme.cjs +0 -1
- package/dist/hooks/use-component-config.cjs +0 -1
- package/dist/hooks/use-consent-dialog-trigger.cjs +0 -1
- package/dist/hooks/use-consent-dialog-trigger.js +0 -1
- package/dist/hooks/use-consent-manager.cjs +0 -1
- package/dist/hooks/use-consent-manager.js +0 -1
- package/dist/hooks/use-consent-script.cjs +0 -1
- package/dist/hooks/use-consent-script.js +0 -1
- package/dist/hooks/use-focus-trap.cjs +0 -1
- package/dist/hooks/use-headless-consent-ui.cjs +0 -1
- package/dist/hooks/use-headless-consent-ui.js +0 -1
- package/dist/hooks/use-headless-iab-consent-ui.cjs +0 -1
- package/dist/hooks/use-reduced-motion.cjs +0 -1
- package/dist/hooks/use-scroll-lock.cjs +0 -1
- package/dist/hooks/use-ssr-status.cjs +0 -1
- package/dist/hooks/use-ssr-status.js +0 -1
- package/dist/hooks/use-styles.cjs +0 -1
- package/dist/hooks/use-styles.js +0 -1
- package/dist/hooks/use-text-direction.cjs +0 -1
- package/dist/hooks/use-theme.cjs +0 -1
- package/dist/hooks/use-translations.cjs +0 -1
- package/dist/hooks/use-translations.js +0 -1
- package/dist/iab.cjs +0 -1
- package/dist/index.cjs +0 -1
- package/dist/primitives/accordion.cjs +0 -1
- package/dist/primitives/button.cjs +0 -1
- package/dist/primitives/collapsible.cjs +0 -1
- package/dist/primitives/dialog.cjs +0 -1
- package/dist/primitives/preference-item.cjs +0 -1
- package/dist/primitives/switch.cjs +0 -1
- package/dist/primitives/tabs.cjs +0 -1
- package/dist/primitives.cjs +0 -1
- package/dist/providers/consent-manager-provider.cjs +0 -1
- package/dist/providers/consent-manager-provider.js +0 -1
- package/dist/server/fetch-ssr-data.cjs +0 -1
- package/dist/server/headers.cjs +0 -1
- package/dist/server/index.cjs +0 -1
- package/dist/server/init-cache-key.cjs +0 -1
- package/dist/server/normalize-url.cjs +0 -1
- package/dist/server/types.cjs +0 -1
- package/dist/types/consent-manager.cjs +0 -1
- package/dist/types/theme/index.cjs +0 -1
- package/dist/types/theme/style-keys.cjs +0 -1
- package/dist/types/theme/style-types.cjs +0 -1
- package/dist/utils/cn.cjs +0 -1
- package/dist/utils/merge-styles.cjs +0 -1
- package/dist/utils/test-helpers.cjs +0 -1
- package/dist/utils/test-helpers.js +0 -1
- package/dist/utils/theme-utils.cjs +0 -1
- package/dist/version.cjs +0 -1
- package/dist-types/components/consent-banner/atoms/root.d.ts +0 -126
- package/dist-types/components/consent-banner/policy-actions.d.ts +0 -11
- package/dist-types/components/consent-widget/policy-actions.d.ts +0 -11
- package/dist-types/components/iab-consent-dialog/hooks/use-gvl-data.d.ts +0 -27
- package/dist-types/components/iab-consent-dialog/types.d.ts +0 -72
- package/dist-types/components/integrations/google-map.d.ts +0 -82
- package/dist-types/components/integrations/index.d.ts +0 -2
- package/dist-types/components/integrations/shared.d.ts +0 -12
- package/dist-types/components/integrations/youtube-embed.d.ts +0 -95
- package/dist-types/context/consent-manager-context.d.ts +0 -31
- package/dist-types/hooks/index.d.ts +0 -12
- package/dist-types/hooks/use-consent-dialog-trigger.d.ts +0 -10
- package/dist-types/hooks/use-consent-manager.d.ts +0 -27
- package/dist-types/hooks/use-consent-script.d.ts +0 -80
- package/dist-types/hooks/use-headless-consent-ui.d.ts +0 -46
- package/dist-types/hooks/use-ssr-status.d.ts +0 -57
- package/dist-types/hooks/use-styles.d.ts +0 -21
- package/dist-types/hooks/use-translations.d.ts +0 -28
- package/dist-types/providers/consent-manager-provider.d.ts +0 -40
- package/dist-types/types/consent-manager.d.ts +0 -39
- package/dist-types/types/theme/style-keys.d.ts +0 -1
- package/dist-types/utils/test-helpers.d.ts +0 -31
- package/docs/frameworks/react/building-headless-components.md +0 -370
- package/docs/frameworks/react/callbacks.md +0 -186
- package/docs/frameworks/react/concepts/client-modes.md +0 -177
- package/docs/frameworks/react/concepts/consent-models.md +0 -113
- package/docs/frameworks/react/concepts/cookie-management.md +0 -122
- package/docs/frameworks/react/concepts/glossary.md +0 -24
- package/docs/frameworks/react/concepts/initialization-flow.md +0 -149
- package/docs/frameworks/react/concepts/policy-packs.md +0 -228
- package/docs/frameworks/react/hooks/use-color-scheme.md +0 -41
- package/docs/frameworks/react/hooks/use-consent-manager/checking-consent.md +0 -96
- package/docs/frameworks/react/hooks/use-consent-manager/location-info.md +0 -97
- package/docs/frameworks/react/hooks/use-consent-manager/setting-consent.md +0 -94
- package/docs/frameworks/react/hooks/use-draggable.md +0 -59
- package/docs/frameworks/react/hooks/use-focus-trap.md +0 -42
- package/docs/frameworks/react/hooks/use-reduced-motion.md +0 -37
- package/docs/frameworks/react/hooks/use-ssr-status.md +0 -32
- package/docs/frameworks/react/hooks/use-text-direction.md +0 -50
- package/docs/frameworks/react/hooks/use-translations.md +0 -55
- package/docs/frameworks/react/iab/consent-banner.md +0 -91
- package/docs/frameworks/react/iab/consent-dialog.md +0 -129
- package/docs/frameworks/react/iab/use-gvl-data.md +0 -21
- package/docs/frameworks/react/iframe-blocking.md +0 -106
- package/docs/frameworks/react/internationalization.md +0 -207
- package/docs/frameworks/react/network-blocker.md +0 -140
- package/docs/frameworks/react/optimization.md +0 -148
- package/docs/frameworks/react/policy-packs.md +0 -242
- package/docs/frameworks/react/server-side.md +0 -158
- package/docs/frameworks/react/styling/classnames.md +0 -94
- package/docs/frameworks/react/styling/color-scheme.md +0 -84
- package/docs/frameworks/react/styling/css-variables.md +0 -53
- package/docs/frameworks/react/styling/slots.md +0 -94
- package/docs/frameworks/react/styling/tailwind.md +0 -119
- package/docs/frameworks/react/styling/tokens.md +0 -156
- package/docs/shared/concepts/client-modes.md +0 -103
- package/docs/shared/concepts/consent-categories.md +0 -41
- package/docs/shared/concepts/consent-models.md +0 -72
- package/docs/shared/concepts/cookie-management.md +0 -88
- package/docs/shared/concepts/glossary.md +0 -24
- package/docs/shared/concepts/initialization-flow.md +0 -105
- package/docs/shared/concepts/policy-packs.md +0 -225
- package/docs/shared/react/components/consent-banner.md +0 -242
- package/docs/shared/react/components/consent-dialog-link.md +0 -45
- package/docs/shared/react/components/consent-dialog-trigger.md +0 -185
- package/docs/shared/react/components/consent-dialog.md +0 -119
- package/docs/shared/react/components/consent-manager-provider.md +0 -225
- package/docs/shared/react/components/consent-widget.md +0 -121
- package/docs/shared/react/components/dev-tools.md +0 -81
- package/docs/shared/react/components/frame.md +0 -52
- package/docs/shared/react/guides/building-headless-components.md +0 -110
- package/docs/shared/react/guides/callbacks.md +0 -89
- package/docs/shared/react/guides/headless.md +0 -31
- package/docs/shared/react/guides/iframe-blocking.md +0 -65
- package/docs/shared/react/guides/internationalization.md +0 -123
- package/docs/shared/react/guides/network-blocker.md +0 -72
- package/docs/shared/react/guides/optimization.md +0 -44
- package/docs/shared/react/guides/policy-packs.md +0 -173
- package/docs/shared/react/guides/script-loader.md +0 -311
- package/docs/shared/react/hooks/use-color-scheme.md +0 -31
- package/docs/shared/react/hooks/use-consent-manager/checking-consent.md +0 -95
- package/docs/shared/react/hooks/use-consent-manager/location-info.md +0 -96
- package/docs/shared/react/hooks/use-consent-manager/overview.md +0 -74
- package/docs/shared/react/hooks/use-consent-manager/setting-consent.md +0 -93
- package/docs/shared/react/hooks/use-draggable.md +0 -30
- package/docs/shared/react/hooks/use-focus-trap.md +0 -20
- package/docs/shared/react/hooks/use-reduced-motion.md +0 -33
- package/docs/shared/react/hooks/use-ssr-status.md +0 -16
- package/docs/shared/react/hooks/use-text-direction.md +0 -38
- package/docs/shared/react/hooks/use-translations.md +0 -15
- package/docs/shared/react/iab/consent-banner.md +0 -60
- package/docs/shared/react/iab/consent-dialog.md +0 -76
- package/docs/shared/react/iab/overview.md +0 -80
- package/docs/shared/react/iab/use-gvl-data.md +0 -21
- package/docs/shared/react/styling/classnames.md +0 -93
- package/docs/shared/react/styling/color-scheme.md +0 -35
- package/docs/shared/react/styling/css-variables.md +0 -53
- package/docs/shared/react/styling/overview.md +0 -261
- package/docs/shared/react/styling/slots.md +0 -93
- package/docs/shared/react/styling/stylesheet-entrypoint.md +0 -8
- package/docs/shared/react/styling/tailwind.md +0 -88
- package/docs/shared/react/styling/tokens.md +0 -155
- package/docs/shared/troubleshooting.md +0 -82
- /package/dist/components/{consent-dialog-trigger → iab-panel}/types.js +0 -0
- /package/dist/components/{consent-widget → panel-trigger}/types.js +0 -0
- /package/dist/components/{iab-consent-dialog → preferences}/types.js +0 -0
- /package/dist/types/{consent-manager.js → manager.js} +0 -0
- /package/dist/types/{theme/style-keys.js → slots.js} +0 -0
- /package/dist-types/components/{consent-dialog-link → panel-link}/index.d.ts +0 -0
- /package/dist-types/components/{consent-widget → preferences}/atoms/button.d.ts +0 -0
- /package/dist-types/components/{consent-widget/consent-widget.d.ts → preferences/preferences.d.ts} +0 -0
- /package/dist-types/components/{consent-widget → preferences}/types.d.ts +0 -0
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import type { AllConsentNames } from 'c15t';
|
|
2
|
-
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
3
|
-
export type GoogleMapCoordinates = google.maps.LatLngLiteral;
|
|
4
|
-
export type GoogleMapsApi = typeof google;
|
|
5
|
-
export type GoogleMapInstance = google.maps.Map;
|
|
6
|
-
export type GoogleMapOptions = google.maps.MapOptions;
|
|
7
|
-
export type GoogleMapsLibrary = 'addressValidation' | 'airQuality' | 'core' | 'drawing' | 'elevation' | 'geocoding' | 'geometry' | 'journeySharing' | 'maps' | 'maps3d' | 'marker' | 'places' | 'routes' | 'streetView' | 'visualization';
|
|
8
|
-
export interface GoogleMapProps extends Omit<ComponentPropsWithRef<'div'>, 'children' | 'onError'> {
|
|
9
|
-
/** Browser API key for the Google Maps JavaScript API. */
|
|
10
|
-
apiKey: string;
|
|
11
|
-
/** Initial and controlled center of the map. */
|
|
12
|
-
center: GoogleMapCoordinates;
|
|
13
|
-
/**
|
|
14
|
-
* Initial and controlled zoom level.
|
|
15
|
-
*
|
|
16
|
-
* @default 12
|
|
17
|
-
*/
|
|
18
|
-
zoom?: number;
|
|
19
|
-
/**
|
|
20
|
-
* Cloud map id. Changing this value recreates the map because Google treats
|
|
21
|
-
* it as construction-time configuration.
|
|
22
|
-
*/
|
|
23
|
-
mapId?: string;
|
|
24
|
-
/** Additional options passed to the Google Maps constructor. */
|
|
25
|
-
options?: Omit<GoogleMapOptions, 'center' | 'zoom' | 'mapId'>;
|
|
26
|
-
/**
|
|
27
|
-
* Consent category required before the Maps SDK loads.
|
|
28
|
-
*
|
|
29
|
-
* @default 'measurement'
|
|
30
|
-
*/
|
|
31
|
-
consentCategory?: AllConsentNames;
|
|
32
|
-
/** Google Maps libraries to load with the shared page-level SDK. */
|
|
33
|
-
libraries?: GoogleMapsLibrary[];
|
|
34
|
-
/** Language used by Maps controls and service responses. */
|
|
35
|
-
language?: string;
|
|
36
|
-
/** Two-character region code used for Maps localization and biasing. */
|
|
37
|
-
region?: string;
|
|
38
|
-
/** Google Maps JavaScript API version channel. */
|
|
39
|
-
version?: string;
|
|
40
|
-
/** Limits referrer information sent to Google to the current origin. */
|
|
41
|
-
authReferrerPolicy?: 'origin';
|
|
42
|
-
/** Google Maps usage-tracking channel. */
|
|
43
|
-
channel?: string;
|
|
44
|
-
/** Cloud map ids to preload with the Maps SDK. */
|
|
45
|
-
mapIds?: string[];
|
|
46
|
-
/** Google Maps solution-channel identifier. */
|
|
47
|
-
solutionChannel?: string;
|
|
48
|
-
/** CSP nonce applied to the Maps script registration. */
|
|
49
|
-
nonce?: string;
|
|
50
|
-
/**
|
|
51
|
-
* Shared c15t script registration id.
|
|
52
|
-
*
|
|
53
|
-
* Keep this id and all loader options consistent across the page.
|
|
54
|
-
*
|
|
55
|
-
* @default 'c15t-google-maps'
|
|
56
|
-
*/
|
|
57
|
-
scriptId?: string;
|
|
58
|
-
/**
|
|
59
|
-
* Time to wait for the Maps readiness callback before reporting an error.
|
|
60
|
-
*
|
|
61
|
-
* @default 15000
|
|
62
|
-
*/
|
|
63
|
-
timeoutMs?: number;
|
|
64
|
-
/**
|
|
65
|
-
* Change this value to retry a failed loader or map initialization.
|
|
66
|
-
* Successful page-level loader registrations remain shared.
|
|
67
|
-
*
|
|
68
|
-
* @default 0
|
|
69
|
-
*/
|
|
70
|
-
retryKey?: string | number;
|
|
71
|
-
/** Content shown before the configured consent category is allowed. */
|
|
72
|
-
placeholder?: ReactNode;
|
|
73
|
-
/** Content shown while the Maps SDK or map instance is loading. */
|
|
74
|
-
loadingFallback?: ReactNode;
|
|
75
|
-
/** Content shown when configuration, loading, authentication, or setup fails. */
|
|
76
|
-
errorFallback?: ReactNode;
|
|
77
|
-
/** Called when the map instance is ready. */
|
|
78
|
-
onReady?: (map: GoogleMapInstance, api: GoogleMapsApi) => void;
|
|
79
|
-
/** Called when configuration, loading, authentication, or setup fails. */
|
|
80
|
-
onError?: (error: Error) => void;
|
|
81
|
-
}
|
|
82
|
-
export declare const GoogleMap: import("react").ForwardRefExoticComponent<Omit<GoogleMapProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export { GoogleMap, type GoogleMapCoordinates, type GoogleMapInstance, type GoogleMapOptions, type GoogleMapProps, type GoogleMapsApi, type GoogleMapsLibrary, } from './google-map';
|
|
2
|
-
export { YouTubeEmbed, type YouTubeEmbedParams, type YouTubeEmbedProps, type YouTubeSrcSource, type YouTubeVideoIdSource, } from './youtube-embed';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { AllConsentNames } from 'c15t';
|
|
2
|
-
import type { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
3
|
-
import { FrameRoot } from '../frame';
|
|
4
|
-
export declare function IntegrationPlaceholder({ category, children, showButton, ...props }: {
|
|
5
|
-
category: AllConsentNames;
|
|
6
|
-
children?: ReactNode;
|
|
7
|
-
showButton?: boolean;
|
|
8
|
-
} & Omit<ComponentPropsWithoutRef<typeof FrameRoot>, 'children'>): import("react").JSX.Element;
|
|
9
|
-
export declare function IntegrationStatus({ category, status, }: {
|
|
10
|
-
category: AllConsentNames;
|
|
11
|
-
status: 'error' | 'loading';
|
|
12
|
-
}): import("react").JSX.Element;
|
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import type { AllConsentNames } from 'c15t';
|
|
2
|
-
import { type ComponentPropsWithRef, type ReactNode } from 'react';
|
|
3
|
-
import { type FrameProps } from '../frame';
|
|
4
|
-
export type YouTubeEmbedParams = Record<string, string | number | boolean | null | undefined>;
|
|
5
|
-
interface YouTubeEmbedBaseProps extends Omit<ComponentPropsWithRef<'iframe'>, 'children' | 'src' | 'title'> {
|
|
6
|
-
/**
|
|
7
|
-
* Accessible title for the embedded player.
|
|
8
|
-
*/
|
|
9
|
-
title: string;
|
|
10
|
-
/**
|
|
11
|
-
* Consent category required before the iframe mounts.
|
|
12
|
-
*
|
|
13
|
-
* @default 'marketing'
|
|
14
|
-
*/
|
|
15
|
-
consentCategory?: AllConsentNames;
|
|
16
|
-
/**
|
|
17
|
-
* Class name for the iframe element targeted by the forwarded ref.
|
|
18
|
-
*/
|
|
19
|
-
className?: string;
|
|
20
|
-
/**
|
|
21
|
-
* Class name for the consent-gated frame wrapper.
|
|
22
|
-
*/
|
|
23
|
-
wrapperClassName?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Placeholder rendered while consent is missing.
|
|
26
|
-
*/
|
|
27
|
-
placeholder?: ReactNode;
|
|
28
|
-
/**
|
|
29
|
-
* Fallback rendered when the iframe cannot be configured or when the
|
|
30
|
-
* browser reports a native iframe loading error.
|
|
31
|
-
*
|
|
32
|
-
* YouTube player-level errors require the IFrame Player API and are not
|
|
33
|
-
* reported reliably by a standard cross-origin iframe.
|
|
34
|
-
*/
|
|
35
|
-
errorFallback?: ReactNode;
|
|
36
|
-
/**
|
|
37
|
-
* Fallback rendered after consent while the iframe is loading.
|
|
38
|
-
*/
|
|
39
|
-
loadingFallback?: ReactNode;
|
|
40
|
-
/**
|
|
41
|
-
* Additional props passed to the underlying Frame component.
|
|
42
|
-
*/
|
|
43
|
-
frameProps?: Omit<FrameProps, 'children' | 'category' | 'className' | 'placeholder'>;
|
|
44
|
-
}
|
|
45
|
-
export interface YouTubeVideoIdSource {
|
|
46
|
-
/**
|
|
47
|
-
* YouTube video id. Use this for first-party construction of the embed URL.
|
|
48
|
-
*/
|
|
49
|
-
videoId: string;
|
|
50
|
-
src?: never;
|
|
51
|
-
/**
|
|
52
|
-
* Whether to use youtube-nocookie.com.
|
|
53
|
-
*
|
|
54
|
-
* @default true
|
|
55
|
-
*/
|
|
56
|
-
privacyEnhanced?: boolean;
|
|
57
|
-
/**
|
|
58
|
-
* Optional start time in seconds. This takes precedence over `params.start`.
|
|
59
|
-
*/
|
|
60
|
-
start?: number;
|
|
61
|
-
/**
|
|
62
|
-
* Additional query params for the generated embed URL.
|
|
63
|
-
*/
|
|
64
|
-
params?: YouTubeEmbedParams;
|
|
65
|
-
}
|
|
66
|
-
export interface YouTubeSrcSource {
|
|
67
|
-
/**
|
|
68
|
-
* Fully formed YouTube embed URL. Use this when migrating existing embeds.
|
|
69
|
-
*/
|
|
70
|
-
src: string;
|
|
71
|
-
videoId?: never;
|
|
72
|
-
privacyEnhanced?: never;
|
|
73
|
-
start?: never;
|
|
74
|
-
params?: never;
|
|
75
|
-
}
|
|
76
|
-
export type YouTubeEmbedProps = YouTubeEmbedBaseProps & (YouTubeVideoIdSource | YouTubeSrcSource);
|
|
77
|
-
/**
|
|
78
|
-
* Renders a YouTube iframe behind c15t consent gating.
|
|
79
|
-
*
|
|
80
|
-
* Use `videoId` for a privacy-enhanced URL built by c15t, or `src` to migrate
|
|
81
|
-
* an existing complete embed URL. The two source modes are mutually exclusive.
|
|
82
|
-
* The iframe is mounted only after consent and includes responsive 16:9 layout,
|
|
83
|
-
* native lazy loading, and a visible loading state by default.
|
|
84
|
-
*
|
|
85
|
-
* @example
|
|
86
|
-
* ```tsx
|
|
87
|
-
* <YouTubeEmbed
|
|
88
|
-
* consentCategory="marketing"
|
|
89
|
-
* title="Product demo"
|
|
90
|
-
* videoId="dQw4w9WgXcQ"
|
|
91
|
-
* />
|
|
92
|
-
* ```
|
|
93
|
-
*/
|
|
94
|
-
export declare const YouTubeEmbed: import("react").ForwardRefExoticComponent<(Omit<YouTubeEmbedBaseProps & YouTubeSrcSource, "ref"> | Omit<YouTubeEmbedBaseProps & YouTubeVideoIdSource, "ref">) & import("react").RefAttributes<HTMLIFrameElement>>;
|
|
95
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @packageDocumentation
|
|
3
|
-
* Provides the context for sharing consent management state across components.
|
|
4
|
-
*/
|
|
5
|
-
import type { ConsentManagerInterface, ConsentStoreState } from 'c15t';
|
|
6
|
-
/**
|
|
7
|
-
* The context value provided by ConsentManagerProvider.
|
|
8
|
-
*/
|
|
9
|
-
export interface ConsentStateContextValue {
|
|
10
|
-
/**
|
|
11
|
-
* Current consent management state
|
|
12
|
-
*/
|
|
13
|
-
state: ConsentStoreState;
|
|
14
|
-
/**
|
|
15
|
-
* Reference to the consent manager store instance
|
|
16
|
-
* We use object type to avoid circular dependencies
|
|
17
|
-
*/
|
|
18
|
-
store: {
|
|
19
|
-
getState: () => ConsentStoreState;
|
|
20
|
-
subscribe: (listener: (state: ConsentStoreState) => void) => () => void;
|
|
21
|
-
setState: (state: Partial<ConsentStoreState>) => void;
|
|
22
|
-
};
|
|
23
|
-
/**
|
|
24
|
-
* Optional API client instance
|
|
25
|
-
*/
|
|
26
|
-
manager: ConsentManagerInterface | null;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Context for sharing consent management state across components.
|
|
30
|
-
*/
|
|
31
|
-
export declare const ConsentStateContext: import("react").Context<ConsentStateContextValue | undefined>;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export * from './use-component-config';
|
|
2
|
-
export * from './use-consent-dialog-trigger';
|
|
3
|
-
export * from './use-consent-manager';
|
|
4
|
-
export * from './use-consent-script';
|
|
5
|
-
export * from './use-focus-trap';
|
|
6
|
-
export * from './use-headless-consent-ui';
|
|
7
|
-
export * from './use-headless-iab-consent-ui';
|
|
8
|
-
export * from './use-reduced-motion';
|
|
9
|
-
export * from './use-ssr-status';
|
|
10
|
-
export * from './use-text-direction';
|
|
11
|
-
export * from './use-theme';
|
|
12
|
-
export * from './use-translations';
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export type ConsentDialogTriggerVisibility = 'always' | 'after-consent' | 'never';
|
|
2
|
-
export interface UseConsentDialogTriggerOptions {
|
|
3
|
-
showWhen?: ConsentDialogTriggerVisibility;
|
|
4
|
-
onClick?: () => void;
|
|
5
|
-
}
|
|
6
|
-
export interface UseConsentDialogTriggerResult {
|
|
7
|
-
isVisible: boolean;
|
|
8
|
-
openDialog: () => void;
|
|
9
|
-
}
|
|
10
|
-
export declare function useConsentDialogTrigger(options?: UseConsentDialogTriggerOptions): UseConsentDialogTriggerResult;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @packageDocumentation
|
|
3
|
-
* Hook for accessing and managing consent state.
|
|
4
|
-
*/
|
|
5
|
-
import type { ConsentManagerInterface, ConsentStoreState } from 'c15t';
|
|
6
|
-
/**
|
|
7
|
-
* Hook for accessing and managing consent state.
|
|
8
|
-
*
|
|
9
|
-
* @remarks
|
|
10
|
-
* This hook provides access to the complete consent management API, including:
|
|
11
|
-
* - Current consent state (what consents are given/required)
|
|
12
|
-
* - Methods to update consents
|
|
13
|
-
* - Compliance settings and region detection
|
|
14
|
-
* - State persistence and retrieval
|
|
15
|
-
* - The consent manager (if configured)
|
|
16
|
-
*
|
|
17
|
-
* The hook must be used within a ConsentManagerProvider component.
|
|
18
|
-
*
|
|
19
|
-
* @throws {Error}
|
|
20
|
-
* Throws if used outside of a ConsentManagerProvider context.
|
|
21
|
-
*
|
|
22
|
-
* @returns Combined state and methods for consent management
|
|
23
|
-
* @public
|
|
24
|
-
*/
|
|
25
|
-
export declare function useConsentManager(): ConsentStoreState & {
|
|
26
|
-
manager: ConsentManagerInterface | null;
|
|
27
|
-
};
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import type { Script } from 'c15t';
|
|
2
|
-
export type ConsentScriptStatus = 'idle' | 'blocked' | 'loading' | 'ready' | 'error';
|
|
3
|
-
export type ConsentScriptUnmountBehavior = 'keep' | 'remove';
|
|
4
|
-
export declare class ConsentScriptConflictError extends Error {
|
|
5
|
-
readonly scriptId: string;
|
|
6
|
-
constructor(scriptId: string);
|
|
7
|
-
}
|
|
8
|
-
export interface ConsentScriptReadyControls<TReady> {
|
|
9
|
-
resolve: (value: TReady) => void;
|
|
10
|
-
reject: (error: Error) => void;
|
|
11
|
-
}
|
|
12
|
-
export interface UseConsentScriptOptions<TReady = unknown> {
|
|
13
|
-
/**
|
|
14
|
-
* Script configuration registered with c15t's script manager.
|
|
15
|
-
*/
|
|
16
|
-
script: Script;
|
|
17
|
-
/**
|
|
18
|
-
* Whether this hook should register the script.
|
|
19
|
-
*
|
|
20
|
-
* @default true
|
|
21
|
-
*/
|
|
22
|
-
enabled?: boolean;
|
|
23
|
-
/**
|
|
24
|
-
* Returns the SDK object when it is already available.
|
|
25
|
-
*/
|
|
26
|
-
resolveReady?: () => TReady | false | null | undefined;
|
|
27
|
-
/**
|
|
28
|
-
* Registers callback-based SDK readiness, such as `callback=` query params.
|
|
29
|
-
* The returned cleanup function runs after readiness settles or the registry
|
|
30
|
-
* entry is released.
|
|
31
|
-
*/
|
|
32
|
-
registerReadyCallback?: (controls: ConsentScriptReadyControls<TReady>) => undefined | (() => void);
|
|
33
|
-
/**
|
|
34
|
-
* Semantic key for the SDK readiness contract shared by this script id.
|
|
35
|
-
*
|
|
36
|
-
* Consumers of the same script id must use the same key. Set this when the
|
|
37
|
-
* readiness callbacks are configured differently from the script itself.
|
|
38
|
-
*
|
|
39
|
-
* @default script.id
|
|
40
|
-
*/
|
|
41
|
-
readinessKey?: string;
|
|
42
|
-
/**
|
|
43
|
-
* Optional timeout for SDK readiness after the script is registered.
|
|
44
|
-
*/
|
|
45
|
-
timeoutMs?: number;
|
|
46
|
-
/**
|
|
47
|
-
* Changing this value retries a failed registration with the same script id.
|
|
48
|
-
* Successful singleton registrations remain shared.
|
|
49
|
-
*
|
|
50
|
-
* @default 0
|
|
51
|
-
*/
|
|
52
|
-
retryKey?: string | number;
|
|
53
|
-
/**
|
|
54
|
-
* Whether c15t should retain an owned script registration after the final
|
|
55
|
-
* hook consumer unmounts. Use `keep` for page-level singleton SDKs that
|
|
56
|
-
* cannot safely be loaded more than once.
|
|
57
|
-
*
|
|
58
|
-
* @default 'remove'
|
|
59
|
-
*/
|
|
60
|
-
unmountBehavior?: ConsentScriptUnmountBehavior;
|
|
61
|
-
}
|
|
62
|
-
export interface UseConsentScriptResult<TReady = unknown> {
|
|
63
|
-
status: ConsentScriptStatus;
|
|
64
|
-
scriptId: string;
|
|
65
|
-
hasConsent: boolean;
|
|
66
|
-
scriptAppended: boolean;
|
|
67
|
-
readyValue: TReady | null;
|
|
68
|
-
error: Error | null;
|
|
69
|
-
ready: Promise<TReady> | null;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Registers a consent-gated script through c15t and exposes SDK readiness as a promise.
|
|
73
|
-
*
|
|
74
|
-
* @remarks
|
|
75
|
-
* Registrations are shared within one ConsentManagerProvider. The hook adopts
|
|
76
|
-
* compatible scripts already registered with that manager and never removes
|
|
77
|
-
* registrations it does not own. Inline script objects and callbacks are safe:
|
|
78
|
-
* lifecycle callbacks are read from the latest render without re-registering.
|
|
79
|
-
*/
|
|
80
|
-
export declare function useConsentScript<TReady = unknown>(options: UseConsentScriptOptions<TReady>): UseConsentScriptResult<TReady>;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { type PolicyUiAction, type PolicyUiActionDirection, type PolicyUiActionGroup, type PolicyUiProfile } from '@c15t/ui/utils';
|
|
2
|
-
import { useConsentManager } from './use-consent-manager';
|
|
3
|
-
export type HeadlessConsentSurface = 'banner' | 'dialog';
|
|
4
|
-
export type HeadlessConsentSurfaceAction = PolicyUiAction;
|
|
5
|
-
export type HeadlessConsentWriteAction = 'accept' | 'reject';
|
|
6
|
-
export type HeadlessConsentBannerAction = HeadlessConsentSurfaceAction;
|
|
7
|
-
export type HeadlessConsentDialogAction = HeadlessConsentSurfaceAction;
|
|
8
|
-
export interface HeadlessConsentSurfaceState<TAction extends string = HeadlessConsentSurfaceAction> {
|
|
9
|
-
allowedActions: TAction[];
|
|
10
|
-
orderedActions: TAction[];
|
|
11
|
-
actionGroups: TAction[][];
|
|
12
|
-
primaryActions: TAction[];
|
|
13
|
-
layout?: PolicyUiActionGroup[];
|
|
14
|
-
direction: PolicyUiActionDirection;
|
|
15
|
-
uiProfile?: PolicyUiProfile;
|
|
16
|
-
scrollLock?: boolean;
|
|
17
|
-
hasPolicyHints: boolean;
|
|
18
|
-
shouldFillActions: boolean;
|
|
19
|
-
isVisible: boolean;
|
|
20
|
-
}
|
|
21
|
-
export type HeadlessConsentBannerState = HeadlessConsentSurfaceState<HeadlessConsentBannerAction>;
|
|
22
|
-
export type HeadlessConsentDialogState = HeadlessConsentSurfaceState<HeadlessConsentDialogAction>;
|
|
23
|
-
export interface UseHeadlessConsentUIResult {
|
|
24
|
-
activeUI: ReturnType<typeof useConsentManager>['activeUI'];
|
|
25
|
-
banner: HeadlessConsentBannerState;
|
|
26
|
-
dialog: HeadlessConsentDialogState;
|
|
27
|
-
openBanner: (options?: {
|
|
28
|
-
force?: boolean;
|
|
29
|
-
}) => void;
|
|
30
|
-
openDialog: () => void;
|
|
31
|
-
closeUI: () => void;
|
|
32
|
-
performAction: (action: HeadlessConsentWriteAction, options: {
|
|
33
|
-
surface: HeadlessConsentSurface;
|
|
34
|
-
uiSource?: string;
|
|
35
|
-
}) => Promise<void>;
|
|
36
|
-
performBannerAction: (action: HeadlessConsentWriteAction, options?: {
|
|
37
|
-
uiSource?: string;
|
|
38
|
-
}) => Promise<void>;
|
|
39
|
-
performDialogAction: (action: HeadlessConsentWriteAction, options?: {
|
|
40
|
-
uiSource?: string;
|
|
41
|
-
}) => Promise<void>;
|
|
42
|
-
saveCustomPreferences: (options?: {
|
|
43
|
-
uiSource?: string;
|
|
44
|
-
}) => Promise<void>;
|
|
45
|
-
}
|
|
46
|
-
export declare function useHeadlessConsentUI(): UseHeadlessConsentUIResult;
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @packageDocumentation
|
|
3
|
-
* Hook for accessing SSR data usage status.
|
|
4
|
-
*/
|
|
5
|
-
/**
|
|
6
|
-
* Return value of {@link useSSRStatus}.
|
|
7
|
-
*
|
|
8
|
-
* @public
|
|
9
|
-
*/
|
|
10
|
-
export interface SSRStatus {
|
|
11
|
-
/**
|
|
12
|
-
* Whether SSR data was used for initialization.
|
|
13
|
-
*
|
|
14
|
-
* `true` if SSR data was provided and successfully consumed,
|
|
15
|
-
* `false` otherwise.
|
|
16
|
-
*/
|
|
17
|
-
ssrDataUsed: boolean;
|
|
18
|
-
/**
|
|
19
|
-
* Reason SSR data was skipped, or `null` if used successfully.
|
|
20
|
-
*
|
|
21
|
-
* - `'no_data'` — no `ssrData` prop was provided to the provider
|
|
22
|
-
* - `'fetch_failed'` — `ssrData` was provided but the Promise resolved with no data
|
|
23
|
-
* - `'context_mismatch'` — `ssrData` did not match the current runtime request context
|
|
24
|
-
*/
|
|
25
|
-
ssrSkippedReason: 'no_data' | 'fetch_failed' | 'context_mismatch' | null;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Returns information about SSR data usage.
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
* This hook is useful for debugging whether server-side data was used
|
|
32
|
-
* for consent manager initialization. It can help identify issues with
|
|
33
|
-
* SSR data fetching or hydration.
|
|
34
|
-
*
|
|
35
|
-
* The hook must be used within a ConsentManagerProvider component.
|
|
36
|
-
*
|
|
37
|
-
* @throws {Error}
|
|
38
|
-
* Throws if used outside of a ConsentManagerProvider context.
|
|
39
|
-
*
|
|
40
|
-
* @returns Object containing SSR status information
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* ```tsx
|
|
44
|
-
* function DebugInfo() {
|
|
45
|
-
* const { ssrDataUsed, ssrSkippedReason } = useSSRStatus();
|
|
46
|
-
*
|
|
47
|
-
* if (ssrDataUsed) {
|
|
48
|
-
* return <span>SSR data was used</span>;
|
|
49
|
-
* }
|
|
50
|
-
*
|
|
51
|
-
* return <span>SSR skipped: {ssrSkippedReason}</span>;
|
|
52
|
-
* }
|
|
53
|
-
* ```
|
|
54
|
-
*
|
|
55
|
-
* @public
|
|
56
|
-
*/
|
|
57
|
-
export declare function useSSRStatus(): SSRStatus;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { AllThemeKeys, ClassNameStyle, ThemeValue } from '../types/theme';
|
|
2
|
-
/**
|
|
3
|
-
* Hook for retrieving and merging styles from theme context and component props.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* This hook manages the style resolution process by pulling styles from
|
|
7
|
-
* theme slots and merging them with component-level props.
|
|
8
|
-
*
|
|
9
|
-
* Precedence (lowest to highest):
|
|
10
|
-
* 1. Component internal base classes (baseClassName)
|
|
11
|
-
* 2. Theme slot classes (from theme context)
|
|
12
|
-
* 3. Component prop classes (from className prop)
|
|
13
|
-
*
|
|
14
|
-
* @param themeKey - The slot key to lookup styles (e.g. 'bannerCard')
|
|
15
|
-
* @param componentStyle - Optional component-level styles to merge
|
|
16
|
-
* @param themeOverride - Optional theme override
|
|
17
|
-
*
|
|
18
|
-
* @returns An object containing merged className and style properties
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
|
-
export declare function useStyles(themeKey: AllThemeKeys, componentStyle?: ThemeValue, themeOverride?: any): ClassNameStyle;
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import type { Translations } from 'c15t';
|
|
2
|
-
/**
|
|
3
|
-
* Hook for accessing translations in the current language.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* This hook provides access to the translations for the currently selected language.
|
|
7
|
-
* It automatically handles language selection based on the translation configuration.
|
|
8
|
-
* Falls back to English if the selected language is not available.
|
|
9
|
-
*
|
|
10
|
-
* @returns The translations for the current language
|
|
11
|
-
*
|
|
12
|
-
* @example
|
|
13
|
-
* ```tsx
|
|
14
|
-
* function CookieBanner() {
|
|
15
|
-
* const translations = useTranslations();
|
|
16
|
-
*
|
|
17
|
-
* return (
|
|
18
|
-
* <div>
|
|
19
|
-
* <h2>{translations.cookieBanner.title}</h2>
|
|
20
|
-
* <p>{translations.cookieBanner.description}</p>
|
|
21
|
-
* </div>
|
|
22
|
-
* );
|
|
23
|
-
* }
|
|
24
|
-
* ```
|
|
25
|
-
*
|
|
26
|
-
* @public
|
|
27
|
-
*/
|
|
28
|
-
export declare function useTranslations(): Translations;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import type { ConsentManagerProviderProps } from '../types/consent-manager';
|
|
2
|
-
/**
|
|
3
|
-
* Clears all cached consent managers and stores.
|
|
4
|
-
*
|
|
5
|
-
* @remarks
|
|
6
|
-
* This utility function is primarily intended for use in tests to ensure
|
|
7
|
-
* clean state between test cases. The module-level caches persist across
|
|
8
|
-
* component unmounts/remounts, which can cause test interference.
|
|
9
|
-
*
|
|
10
|
-
* @internal
|
|
11
|
-
*/
|
|
12
|
-
export declare function clearConsentRuntimeCache(): void;
|
|
13
|
-
/**
|
|
14
|
-
* Provider component for consent management functionality.
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
* This component initializes and manages the consent management system, including:
|
|
18
|
-
* - Setting up the consent store with initial configuration
|
|
19
|
-
* - Creating a consent manager from the provided options
|
|
20
|
-
* - Detecting user's region for compliance
|
|
21
|
-
* - Managing consent state updates
|
|
22
|
-
* - Providing access to consent management throughout the app
|
|
23
|
-
*
|
|
24
|
-
* @example
|
|
25
|
-
* ```tsx
|
|
26
|
-
* <ConsentManagerProvider
|
|
27
|
-
* options={{
|
|
28
|
-
* mode: 'offline',
|
|
29
|
-
* callbacks: {
|
|
30
|
-
* onConsentSet: (response) => console.log('Consent updated')
|
|
31
|
-
* }
|
|
32
|
-
* }}
|
|
33
|
-
* >
|
|
34
|
-
* {children}
|
|
35
|
-
* </ConsentManagerProvider>
|
|
36
|
-
* ```
|
|
37
|
-
*
|
|
38
|
-
* @public
|
|
39
|
-
*/
|
|
40
|
-
export declare function ConsentManagerProvider({ children, options, }: ConsentManagerProviderProps): import("react").JSX.Element;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import type { BaseConsentManagerOptions, UIOptions } from '@c15t/ui/theme';
|
|
2
|
-
import type { ReactNode } from 'react';
|
|
3
|
-
/**
|
|
4
|
-
* React-specific configuration options
|
|
5
|
-
*/
|
|
6
|
-
export interface ReactUIOptions extends UIOptions {
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
* Extended configuration options for the React consent manager.
|
|
10
|
-
*
|
|
11
|
-
* @remarks
|
|
12
|
-
* This type composes:
|
|
13
|
-
* - Base framework-agnostic options from {@link BaseConsentManagerOptions}
|
|
14
|
-
* - React-specific UI configuration
|
|
15
|
-
*
|
|
16
|
-
* In offline mode this also includes `offlinePolicy` configuration for
|
|
17
|
-
* local policy previews.
|
|
18
|
-
*
|
|
19
|
-
* @see {@link https://c15t.com/docs/frameworks/react/policy-packs}
|
|
20
|
-
*/
|
|
21
|
-
export type ConsentManagerOptions = BaseConsentManagerOptions & ReactUIOptions;
|
|
22
|
-
/**
|
|
23
|
-
* Configuration options for the ConsentManagerProvider.
|
|
24
|
-
*
|
|
25
|
-
* @public
|
|
26
|
-
*/
|
|
27
|
-
export interface ConsentManagerProviderProps {
|
|
28
|
-
/**
|
|
29
|
-
* React children to render within the provider.
|
|
30
|
-
*/
|
|
31
|
-
children: ReactNode;
|
|
32
|
-
/**
|
|
33
|
-
* Configuration options for the consent manager.
|
|
34
|
-
* This includes core, React, store, and translation settings.
|
|
35
|
-
*
|
|
36
|
-
* @see {@link https://c15t.com/docs/frameworks/react/components/consent-manager-provider}
|
|
37
|
-
*/
|
|
38
|
-
options: ConsentManagerOptions;
|
|
39
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type { AllThemeKeys } from '@c15t/ui/theme';
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import type { ThemeValue } from '../types/theme';
|
|
3
|
-
interface ComponentStyles {
|
|
4
|
-
component: ReactNode;
|
|
5
|
-
testCases: {
|
|
6
|
-
testId: string;
|
|
7
|
-
styles: string | ThemeValue;
|
|
8
|
-
}[];
|
|
9
|
-
noStyle?: boolean;
|
|
10
|
-
theme?: any;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* A robust test utility to verify components render correctly with applied styles.
|
|
14
|
-
*
|
|
15
|
-
* This function:
|
|
16
|
-
* - Handles both direct container elements and portal-rendered elements
|
|
17
|
-
* - Performs basic className checks
|
|
18
|
-
* - Is tolerant of browser-specific style differences
|
|
19
|
-
* - Works with string classNames and object style formats
|
|
20
|
-
*
|
|
21
|
-
* @example
|
|
22
|
-
* ```tsx
|
|
23
|
-
* await testComponentStyles({
|
|
24
|
-
* component: <MyComponent />,
|
|
25
|
-
* theme: { slots: { root: 'custom-class' } },
|
|
26
|
-
* testCases: [{ testId: 'my-component-root', styles: 'custom-class' }]
|
|
27
|
-
* });
|
|
28
|
-
* ```
|
|
29
|
-
*/
|
|
30
|
-
export declare function testComponentStyles({ component, testCases, noStyle, theme, }: ComponentStyles): Promise<void>;
|
|
31
|
-
export default testComponentStyles;
|