@c15t/react 3.0.0-alpha.4 → 3.0.0-alpha.6
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 +8 -5
- 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/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/index.js +1 -1
- package/dist/components/panel/index.js +1 -1
- package/dist/components/panel-trigger/atoms/toolbar.js +1 -1
- package/dist/components/panel-trigger/atoms/trigger-icons.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/index.js +1 -1
- package/dist/components/shared/primitives/button.js +1 -1
- package/dist/components/shared/ui/accordion/accordion.js +1 -1
- package/dist/components/shared/ui/collapsible/collapsible.js +1 -1
- package/dist/components/shared/ui/preference-item/preference-item.js +1 -1
- package/dist/components/shared/ui/switch/switch.js +1 -1
- package/dist/components/shared/ui/tabs/tabs.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/hooks/use-color-scheme.js +1 -1
- package/dist/hooks/use-headless-iab-consent-ui.js +1 -1
- package/dist/hooks.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/hooks.js +1 -0
- package/dist/index-parts/module-hooks.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 -1
- package/dist/module-hooks/iframe-blocker.js +1 -1
- package/dist/provider.js +1 -1
- package/dist/styles.tw3.css +27 -3
- package/dist/version.js +1 -1
- package/dist-types/component-hooks/use-headless-consent-ui.d.ts +4 -4
- package/dist-types/components/iab-panel/index.d.ts +0 -1
- package/dist-types/components/panel/index.d.ts +0 -1
- package/dist-types/components/panel-trigger/atoms/trigger-icons.d.ts +5 -0
- package/dist-types/components/panel-trigger/panel-trigger.d.ts +0 -8
- package/dist-types/components/preferences/index.d.ts +0 -1
- package/dist-types/components/shared/ui/accordion/accordion.d.ts +0 -1
- package/dist-types/components/shared/ui/collapsible/collapsible.d.ts +0 -1
- package/dist-types/components/shared/ui/preference-item/preference-item.d.ts +0 -1
- package/dist-types/components/shared/ui/switch/switch.d.ts +0 -1
- package/dist-types/components/shared/ui/tabs/tabs.d.ts +0 -1
- package/dist-types/devtools-launcher.d.ts +29 -0
- package/dist-types/draft-context.d.ts +31 -0
- package/dist-types/draft.d.ts +13 -36
- package/dist-types/gpp.d.ts +27 -0
- package/dist-types/hooks/use-iab-manager.d.ts +4 -4
- package/dist-types/hooks.d.ts +30 -5
- 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 +8 -0
- package/dist-types/index-parts/draft.d.ts +7 -0
- package/dist-types/index-parts/hooks.d.ts +7 -0
- package/dist-types/index-parts/module-hooks.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 +15 -16
- package/dist-types/kernel-selector.d.ts +0 -8
- package/dist-types/module-hooks/iframe-blocker.d.ts +12 -7
- package/dist-types/provider.d.ts +47 -13
- package/dist-types/version.d.ts +1 -1
- package/docs/README.md +8 -5
- package/docs/concepts/choose-your-setup.md +22 -5
- package/docs/concepts/consent-state.md +60 -5
- package/docs/concepts/data-fetching.md +34 -11
- package/docs/customization/recipes.md +4 -5
- package/docs/customization/slots.md +3 -2
- package/docs/customization/stylesheets.md +29 -39
- package/docs/customization/tailwind.md +5 -5
- package/docs/customization/tokens.md +1 -1
- package/docs/customization/translations.md +33 -7
- package/docs/frameworks/react/components/consent-dialog-trigger.md +5 -0
- package/docs/frameworks/react/components/consent-dialog.md +2 -1
- package/docs/frameworks/react/components/consent-provider.md +6 -2
- package/docs/frameworks/react/components/dev-tools.md +24 -1
- package/docs/frameworks/react/gpp.md +163 -0
- package/docs/frameworks/react/headless.md +4 -4
- package/docs/frameworks/react/hooks.md +10 -5
- package/docs/frameworks/react/iab.md +24 -18
- package/docs/frameworks/react/quickstart.md +77 -16
- package/docs/frameworks/react/rendering.md +82 -11
- package/docs/frameworks/react/scripts.md +8 -3
- package/docs/frameworks/react/upgrade-v3.md +596 -0
- package/docs/frameworks/react/vendor-consent.md +6 -0
- package/docs/guides/banner-experiments.md +26 -5
- package/docs/guides/troubleshooting.md +3 -2
- package/docs/integrations/overview.md +28 -27
- package/docs/integrations/posthog.md +99 -11
- package/docs/integrations/sentry.md +416 -0
- package/docs/upgrade-v3.md +222 -314
- package/package.json +13 -8
- package/dist/ui-save.js +0 -1
- package/dist-types/ui-save.d.ts +0 -25
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c15t/react",
|
|
3
|
-
"version": "3.0.0-alpha.
|
|
3
|
+
"version": "3.0.0-alpha.6",
|
|
4
4
|
"description": "React cookie banner, consent manager, preference center, and headless CMP components with IAB TCF and Consent Mode support.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ccpa",
|
|
@@ -147,6 +147,11 @@
|
|
|
147
147
|
"import": "./dist/iab.js",
|
|
148
148
|
"default": "./dist/iab.js"
|
|
149
149
|
},
|
|
150
|
+
"./gpp": {
|
|
151
|
+
"types": "./dist-types/gpp.d.ts",
|
|
152
|
+
"import": "./dist/gpp.js",
|
|
153
|
+
"default": "./dist/gpp.js"
|
|
154
|
+
},
|
|
150
155
|
"./styles.css": "./dist/styles.css",
|
|
151
156
|
"./styles.tw3.css": "./dist/styles.tw3.css",
|
|
152
157
|
"./iab/styles.css": "./dist/iab/styles.css",
|
|
@@ -249,16 +254,16 @@
|
|
|
249
254
|
"test:watch": "bun prebuild && vitest"
|
|
250
255
|
},
|
|
251
256
|
"dependencies": {
|
|
252
|
-
"@c15t/core": "3.0.0-alpha.
|
|
253
|
-
"@c15t/dev-tools": "3.0.0-alpha.
|
|
254
|
-
"@c15t/iab": "3.0.0-alpha.
|
|
255
|
-
"@c15t/schema": "3.0.0-alpha.
|
|
256
|
-
"@c15t/translations": "3.0.0-alpha.
|
|
257
|
-
"@c15t/ui": "3.0.0-alpha.
|
|
257
|
+
"@c15t/core": "3.0.0-alpha.6",
|
|
258
|
+
"@c15t/dev-tools": "3.0.0-alpha.6",
|
|
259
|
+
"@c15t/iab": "3.0.0-alpha.6",
|
|
260
|
+
"@c15t/schema": "3.0.0-alpha.5",
|
|
261
|
+
"@c15t/translations": "3.0.0-alpha.6",
|
|
262
|
+
"@c15t/ui": "3.0.0-alpha.6",
|
|
258
263
|
"@types/google.maps": "3.65.3"
|
|
259
264
|
},
|
|
260
265
|
"devDependencies": {
|
|
261
|
-
"@c15t/backend": "3.0.0-alpha.
|
|
266
|
+
"@c15t/backend": "3.0.0-alpha.6",
|
|
262
267
|
"@c15t/conformance": "0.0.1",
|
|
263
268
|
"@c15t/typescript-config": "0.0.1",
|
|
264
269
|
"@c15t/vitest-config": "1.0.0",
|
package/dist/ui-save.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
let e=new WeakMap,t=t=>{e.set(t,{})},n=e=>e.policyPending||"failed"===e.resolution.status||"none"===e.promptRequirement.kind?"none":"banner",i=(t,i,a)=>{let o={};e.set(t,o);let s=t.getSnapshot(),c="dialog"===s.activeUI,l=i();if(!c)return l;let r=t.getSnapshot();return r.explicitChoice!==s.explicitChoice||r.vendorChoice!==s.vendorChoice||r.noticeDismissal!==s.noticeDismissal?(e.get(t)===o&&t.set.activeUI(n(r)),l):l.then(i=>(i.ok&&a()&&e.get(t)===o&&"dialog"===t.getSnapshot().activeUI&&t.set.activeUI(n(t.getSnapshot())),i))},a=async(t,n)=>{let i={};e.set(t,i);let a=t.getSnapshot(),o=a.activeUI;"none"!==o&&t.set.activeUI("none");try{await n()}finally{let n=t.getSnapshot();"none"!==o&&n.iab?.authority===a.iab?.authority&&"none"===n.activeUI&&e.get(t)===i&&t.set.activeUI(o)}};export{t as invalidateConsentUIAction,i as saveConsentUI,a as saveIABConsentUI};
|
package/dist-types/ui-save.d.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import type { ConsentKernel, SaveResult } from '@c15t/core';
|
|
2
|
-
/** Explicit navigation supersedes a pending UI action, even to the same dialog. */
|
|
3
|
-
export declare const invalidateConsentUIAction: (kernel: ConsentKernel) => void;
|
|
4
|
-
/**
|
|
5
|
-
* Close the preferences dialog as soon as its choice is recorded locally.
|
|
6
|
-
*
|
|
7
|
-
* The kernel commits the receipt and updates permissions synchronously, so
|
|
8
|
-
* the dialog closes in the task that handled the click. Storage is written
|
|
9
|
-
* one task later, still ahead of the request, and the request runs after:
|
|
10
|
-
* its outcome never reopens the dialog, and a failed request stays queued
|
|
11
|
-
* for replay by the kernel. A save that recorded nothing (an unchanged
|
|
12
|
-
* selection) closes when it resolves successfully, unless explicit
|
|
13
|
-
* navigation or a newer action came first.
|
|
14
|
-
*/
|
|
15
|
-
export declare const saveConsentUI: (kernel: ConsentKernel, save: () => Promise<SaveResult>, canClose: () => boolean) => Promise<SaveResult>;
|
|
16
|
-
/**
|
|
17
|
-
* Close an IAB surface in the task that handled the click.
|
|
18
|
-
*
|
|
19
|
-
* An IAB choice commits once its TC string is encoded, which can wait on the
|
|
20
|
-
* TCF library chunk but never on the backend. The surface closes first and
|
|
21
|
-
* comes back only when that local step recorded nothing (the vendor list
|
|
22
|
-
* failed to load, or the policy changed underneath), so the visitor can try
|
|
23
|
-
* again. A failed backend request never reopens it.
|
|
24
|
-
*/
|
|
25
|
-
export declare const saveIABConsentUI: (kernel: ConsentKernel, save: () => Promise<void> | void) => Promise<void>;
|