@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.
Files changed (111) hide show
  1. package/AGENTS.md +8 -5
  2. package/dist/component-hooks/use-headless-consent-ui.js +1 -1
  3. package/dist/component-hooks/use-headless-iab-consent-ui.js +1 -1
  4. package/dist/components/iab-panel/atoms/vendor-list.js +1 -1
  5. package/dist/components/iab-panel/hooks/use-gvl-data.js +1 -1
  6. package/dist/components/iab-panel/index.js +1 -1
  7. package/dist/components/panel/index.js +1 -1
  8. package/dist/components/panel-trigger/atoms/toolbar.js +1 -1
  9. package/dist/components/panel-trigger/atoms/trigger-icons.js +1 -1
  10. package/dist/components/panel-trigger/panel-trigger.js +1 -1
  11. package/dist/components/preferences/atoms/accordion.js +1 -1
  12. package/dist/components/preferences/index.js +1 -1
  13. package/dist/components/shared/primitives/button.js +1 -1
  14. package/dist/components/shared/ui/accordion/accordion.js +1 -1
  15. package/dist/components/shared/ui/collapsible/collapsible.js +1 -1
  16. package/dist/components/shared/ui/preference-item/preference-item.js +1 -1
  17. package/dist/components/shared/ui/switch/switch.js +1 -1
  18. package/dist/components/shared/ui/tabs/tabs.js +1 -1
  19. package/dist/devtools-launcher.js +2 -0
  20. package/dist/devtools.js +1 -1
  21. package/dist/draft-context.js +2 -0
  22. package/dist/draft.js +1 -1
  23. package/dist/external-iab-context.js +1 -1
  24. package/dist/gpp.js +2 -0
  25. package/dist/hooks/use-color-scheme.js +1 -1
  26. package/dist/hooks/use-headless-iab-consent-ui.js +1 -1
  27. package/dist/hooks.js +1 -1
  28. package/dist/index-parts/consent-banner.js +1 -0
  29. package/dist/index-parts/consent-dialog-link.js +1 -0
  30. package/dist/index-parts/consent-dialog-trigger.js +1 -0
  31. package/dist/index-parts/consent-dialog.js +1 -0
  32. package/dist/index-parts/consent-gate.js +1 -0
  33. package/dist/index-parts/core.js +1 -0
  34. package/dist/index-parts/draft.js +1 -0
  35. package/dist/index-parts/hooks.js +1 -0
  36. package/dist/index-parts/module-hooks.js +1 -0
  37. package/dist/index-parts/provider.js +1 -0
  38. package/dist/index-parts/theme.js +1 -0
  39. package/dist/index-parts/translations.js +1 -0
  40. package/dist/index.js +1 -1
  41. package/dist/kernel-selector.js +1 -1
  42. package/dist/module-hooks/iframe-blocker.js +1 -1
  43. package/dist/provider.js +1 -1
  44. package/dist/styles.tw3.css +27 -3
  45. package/dist/version.js +1 -1
  46. package/dist-types/component-hooks/use-headless-consent-ui.d.ts +4 -4
  47. package/dist-types/components/iab-panel/index.d.ts +0 -1
  48. package/dist-types/components/panel/index.d.ts +0 -1
  49. package/dist-types/components/panel-trigger/atoms/trigger-icons.d.ts +5 -0
  50. package/dist-types/components/panel-trigger/panel-trigger.d.ts +0 -8
  51. package/dist-types/components/preferences/index.d.ts +0 -1
  52. package/dist-types/components/shared/ui/accordion/accordion.d.ts +0 -1
  53. package/dist-types/components/shared/ui/collapsible/collapsible.d.ts +0 -1
  54. package/dist-types/components/shared/ui/preference-item/preference-item.d.ts +0 -1
  55. package/dist-types/components/shared/ui/switch/switch.d.ts +0 -1
  56. package/dist-types/components/shared/ui/tabs/tabs.d.ts +0 -1
  57. package/dist-types/devtools-launcher.d.ts +29 -0
  58. package/dist-types/draft-context.d.ts +31 -0
  59. package/dist-types/draft.d.ts +13 -36
  60. package/dist-types/gpp.d.ts +27 -0
  61. package/dist-types/hooks/use-iab-manager.d.ts +4 -4
  62. package/dist-types/hooks.d.ts +30 -5
  63. package/dist-types/index-parts/consent-banner.d.ts +7 -0
  64. package/dist-types/index-parts/consent-dialog-link.d.ts +7 -0
  65. package/dist-types/index-parts/consent-dialog-trigger.d.ts +7 -0
  66. package/dist-types/index-parts/consent-dialog.d.ts +7 -0
  67. package/dist-types/index-parts/consent-gate.d.ts +7 -0
  68. package/dist-types/index-parts/core.d.ts +8 -0
  69. package/dist-types/index-parts/draft.d.ts +7 -0
  70. package/dist-types/index-parts/hooks.d.ts +7 -0
  71. package/dist-types/index-parts/module-hooks.d.ts +7 -0
  72. package/dist-types/index-parts/provider.d.ts +7 -0
  73. package/dist-types/index-parts/theme.d.ts +8 -0
  74. package/dist-types/index-parts/translations.d.ts +7 -0
  75. package/dist-types/index.d.ts +15 -16
  76. package/dist-types/kernel-selector.d.ts +0 -8
  77. package/dist-types/module-hooks/iframe-blocker.d.ts +12 -7
  78. package/dist-types/provider.d.ts +47 -13
  79. package/dist-types/version.d.ts +1 -1
  80. package/docs/README.md +8 -5
  81. package/docs/concepts/choose-your-setup.md +22 -5
  82. package/docs/concepts/consent-state.md +60 -5
  83. package/docs/concepts/data-fetching.md +34 -11
  84. package/docs/customization/recipes.md +4 -5
  85. package/docs/customization/slots.md +3 -2
  86. package/docs/customization/stylesheets.md +29 -39
  87. package/docs/customization/tailwind.md +5 -5
  88. package/docs/customization/tokens.md +1 -1
  89. package/docs/customization/translations.md +33 -7
  90. package/docs/frameworks/react/components/consent-dialog-trigger.md +5 -0
  91. package/docs/frameworks/react/components/consent-dialog.md +2 -1
  92. package/docs/frameworks/react/components/consent-provider.md +6 -2
  93. package/docs/frameworks/react/components/dev-tools.md +24 -1
  94. package/docs/frameworks/react/gpp.md +163 -0
  95. package/docs/frameworks/react/headless.md +4 -4
  96. package/docs/frameworks/react/hooks.md +10 -5
  97. package/docs/frameworks/react/iab.md +24 -18
  98. package/docs/frameworks/react/quickstart.md +77 -16
  99. package/docs/frameworks/react/rendering.md +82 -11
  100. package/docs/frameworks/react/scripts.md +8 -3
  101. package/docs/frameworks/react/upgrade-v3.md +596 -0
  102. package/docs/frameworks/react/vendor-consent.md +6 -0
  103. package/docs/guides/banner-experiments.md +26 -5
  104. package/docs/guides/troubleshooting.md +3 -2
  105. package/docs/integrations/overview.md +28 -27
  106. package/docs/integrations/posthog.md +99 -11
  107. package/docs/integrations/sentry.md +416 -0
  108. package/docs/upgrade-v3.md +222 -314
  109. package/package.json +13 -8
  110. package/dist/ui-save.js +0 -1
  111. 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.4",
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.4",
253
- "@c15t/dev-tools": "3.0.0-alpha.4",
254
- "@c15t/iab": "3.0.0-alpha.4",
255
- "@c15t/schema": "3.0.0-alpha.3",
256
- "@c15t/translations": "3.0.0-alpha.4",
257
- "@c15t/ui": "3.0.0-alpha.4",
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.4",
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};
@@ -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>;