- GPC (gpc.ts): read in the browser before the first paint (consentBannerScript) and in the consent store; pages stay static. 'honour' (default): no banner, analytics and marketing off, no request to Google or a pixel; an explicit choice on the site wins; a grant made without the signal gives way when it appears. 'ask' and false as opt-outs. - equalChoice defaults to true; a development warning when the banner has no 'reject'. - Withdrawal: Meta / TikTok / Clarity told at once, listed localStorage / sessionStorage keys removed. - Clarity gets consentv2 when it loads; ads_data_redaction with the Consent Mode default. - consentLog on by default (consentLog: false turns it off); SiteProviders posts to it by itself; a missing SQL table answers 503 with one log line. - Default banner text: one sentence on changing the choice and browser settings; the GPC line (PL / EN). - Doctor: consent-log-migration, consent-banner rules. - Stats: Sec-GPC over a choice made without it keeps the visitor id out. Co-Authored-By: Claude Opus 5.5 <[email protected]>
31 lines
1.4 KiB
TypeScript
31 lines
1.4 KiB
TypeScript
// Server-safe exports (logic, types, helper). Client components (banner,
|
|
// provider, hook) are exported separately via ./client to keep the RSC/client
|
|
// boundary clean.
|
|
export {
|
|
ACCEPT_ALL_CONSENT,
|
|
CONSENT_CATEGORIES,
|
|
DEFAULT_CONSENT,
|
|
REJECT_ALL_CONSENT,
|
|
} from './categories.js'
|
|
export type { ConsentCategory, ConsentState } from './categories.js'
|
|
export { CONSENT_CATEGORY_LABELS, consentCategoryOptions } from './categoryLabels.js'
|
|
export { buildConsentLogCollection, buildConsentLogEndpoint, CONSENT_LOG_PATH, CONSENT_LOG_SLUG } from './consentLog.js'
|
|
export type { ConsentLogOptions } from './consentLog.js'
|
|
export { consentBannerScript } from './firstPaint.js'
|
|
export type { ConsentBannerScriptOptions } from './firstPaint.js'
|
|
export { CONSENT_FALLBACK, CONSENT_FALLBACK_PL, consentFallback, getConsentTexts, getCookieTable } from './getConsentTexts.js'
|
|
export type { CookieTableRow } from './getConsentTexts.js'
|
|
export { setDefaultConsent, updateConsent } from './googleConsent.js'
|
|
export { GPC_CATEGORIES, GPC_HEADER, gpcFromHeaders, gpcFromNavigator, gpcWellKnown, resolveConsent } from './gpc.js'
|
|
export type { GpcMode, ResolvedConsent } from './gpc.js'
|
|
export {
|
|
CONSENT_COOKIE,
|
|
CONSENT_MAX_AGE,
|
|
CONSENT_VERSION,
|
|
newConsentId,
|
|
parseConsent,
|
|
readConsentRecord,
|
|
serializeConsent,
|
|
} from './storage.js'
|
|
export type { ConsentStorage, ConsentTexts } from './texts.js'
|