@c15t/react 3.0.0-alpha.1 → 3.0.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/AGENTS.md +96 -70
  2. package/README.md +21 -17
  3. package/SKILL.md +34 -0
  4. package/dist/aggregate-components.js +1 -1
  5. package/dist/chunk-warming.js +1 -1
  6. package/dist/component-hooks/use-headless-consent-ui.js +1 -1
  7. package/dist/component-hooks/use-headless-iab-consent-ui.js +1 -1
  8. package/dist/component-hooks/use-panel-trigger.js +1 -1
  9. package/dist/components/consent-gate/atoms.js +1 -0
  10. package/dist/components/consent-gate/consent-gate.js +2 -0
  11. package/dist/components/consent-gate/frame.js +2 -0
  12. package/dist/components/consent-gate/index.js +2 -0
  13. package/dist/components/consent-preferences-link/consent-preferences-link.js +1 -1
  14. package/dist/components/iab-panel/atoms/card.js +1 -1
  15. package/dist/components/iab-panel/atoms/feature-item.js +2 -0
  16. package/dist/components/iab-panel/atoms/header.js +1 -1
  17. package/dist/components/iab-panel/atoms/purpose-item.js +1 -1
  18. package/dist/components/iab-panel/atoms/root.js +1 -1
  19. package/dist/components/iab-panel/atoms/stack-item.js +1 -1
  20. package/dist/components/iab-panel/atoms/vendor-list.js +1 -1
  21. package/dist/components/iab-panel/hooks/use-gvl-data.js +1 -1
  22. package/dist/components/iab-panel/iab-panel.js +1 -1
  23. package/dist/components/iab-panel/index.js +1 -1
  24. package/dist/components/iab-prompt/atoms/overlay.js +1 -1
  25. package/dist/components/iab-prompt/atoms/root.js +1 -1
  26. package/dist/components/panel/atoms/card.js +1 -1
  27. package/dist/components/panel/atoms/overlay.js +1 -1
  28. package/dist/components/panel/atoms/root.js +1 -1
  29. package/dist/components/panel/panel.js +1 -1
  30. package/dist/components/panel-trigger/atoms/button.js +1 -1
  31. package/dist/components/panel-trigger/atoms/icon.js +1 -1
  32. package/dist/components/panel-trigger/atoms/root.js +1 -1
  33. package/dist/components/panel-trigger/atoms/toolbar.js +1 -1
  34. package/dist/components/panel-trigger/atoms/trigger-icons.js +1 -0
  35. package/dist/components/panel-trigger/panel-trigger-toolbar.js +1 -1
  36. package/dist/components/panel-trigger/panel-trigger.js +1 -1
  37. package/dist/components/preferences/atoms/accordion.js +1 -1
  38. package/dist/components/preferences/atoms/root.js +1 -1
  39. package/dist/components/preferences/atoms/vendor-list.js +1 -0
  40. package/dist/components/preferences/index.js +1 -1
  41. package/dist/components/prompt/atoms/early-tap-script.js +2 -0
  42. package/dist/components/prompt/atoms/overlay.js +1 -1
  43. package/dist/components/prompt/atoms/root.js +1 -1
  44. package/dist/components/prompt/components.js +1 -1
  45. package/dist/components/prompt/policy-actions.js +1 -1
  46. package/dist/components/prompt/prompt.js +1 -1
  47. package/dist/components/shared/dialog-sheets.js +1 -0
  48. package/dist/components/shared/first-paint-sheets.js +1 -0
  49. package/dist/components/shared/iab-dialog-sheets.js +1 -0
  50. package/dist/components/shared/iab-first-paint-sheets.js +1 -0
  51. package/dist/components/shared/libs/compose-refs.js +1 -0
  52. package/dist/components/shared/libs/slot.js +1 -1
  53. package/dist/components/shared/primitives/button.js +1 -1
  54. package/dist/components/shared/primitives/legal-links/index.js +1 -1
  55. package/dist/components/shared/streamed-surface.js +2 -0
  56. package/dist/components/shared/surface-styles.js +2 -0
  57. package/dist/components/shared/ui/dialog/dialog.js +1 -1
  58. package/dist/components/shared/ui/icon.js +1 -1
  59. package/dist/components/shared/ui/logo.js +1 -1
  60. package/dist/components/shared/ui/preference-item/preference-item.js +1 -1
  61. package/dist/consent-gate.js +2 -0
  62. package/dist/consent-theme.js +1 -0
  63. package/dist/context/consent-tracking-context.js +1 -1
  64. package/dist/context/index.js +1 -1
  65. package/dist/context.js +1 -1
  66. package/dist/devtools-launcher.js +2 -0
  67. package/dist/devtools.js +1 -1
  68. package/dist/draft-context.js +2 -0
  69. package/dist/draft.js +1 -1
  70. package/dist/external-iab-context.js +1 -1
  71. package/dist/gpp.js +2 -0
  72. package/dist/headless.js +1 -1
  73. package/dist/hooks/use-color-scheme.js +1 -1
  74. package/dist/hooks/use-committed-ref.js +2 -0
  75. package/dist/hooks/use-focus-trap.js +1 -1
  76. package/dist/hooks/use-headless-iab-consent-ui.js +1 -1
  77. package/dist/hooks/use-iab-policy-guard.js +1 -0
  78. package/dist/hooks/use-late-entry.js +2 -0
  79. package/dist/hooks.js +1 -1
  80. package/dist/iab/styles.tw3.css +5 -45
  81. package/dist/iab-context.js +1 -1
  82. package/dist/index-parts/consent-banner.js +1 -0
  83. package/dist/index-parts/consent-dialog-link.js +1 -0
  84. package/dist/index-parts/consent-dialog-trigger.js +1 -0
  85. package/dist/index-parts/consent-dialog.js +1 -0
  86. package/dist/index-parts/consent-gate.js +1 -0
  87. package/dist/index-parts/core.js +1 -0
  88. package/dist/index-parts/draft.js +1 -0
  89. package/dist/index-parts/frame.js +1 -0
  90. package/dist/index-parts/hooks.js +1 -0
  91. package/dist/index-parts/hosted.js +1 -0
  92. package/dist/index-parts/module-hooks.js +1 -0
  93. package/dist/index-parts/offline.js +1 -0
  94. package/dist/index-parts/presets.js +1 -0
  95. package/dist/index-parts/provider.js +1 -0
  96. package/dist/index-parts/theme.js +1 -0
  97. package/dist/index-parts/translations.js +1 -0
  98. package/dist/index.js +1 -1
  99. package/dist/kernel-selector.js +1 -0
  100. package/dist/modes.js +1 -0
  101. package/dist/module-hooks/iframe-blocker.js +1 -1
  102. package/dist/module-hooks/network-blocker.js +1 -1
  103. package/dist/module-hooks/network-hold.js +2 -0
  104. package/dist/module-hooks/persistence.js +1 -1
  105. package/dist/panel-link.js +1 -1
  106. package/dist/panel-trigger.js +1 -1
  107. package/dist/panel.js +1 -1
  108. package/dist/postcss-tailwind3.js +1 -0
  109. package/dist/preferences.js +1 -2
  110. package/dist/provider.js +1 -1
  111. package/dist/server/fetch-ssr-data.js +1 -1
  112. package/dist/server/headers.js +1 -1
  113. package/dist/server/normalize-url.js +1 -1
  114. package/dist/styles.tw3.css +33 -51
  115. package/dist/transports/hosted.js +1 -0
  116. package/dist/transports/manifest.js +1 -0
  117. package/dist/transports/offline.js +1 -1
  118. package/dist/utils/deferred-module.js +2 -0
  119. package/dist/utils/merge-slot-props.js +1 -1
  120. package/dist/utils/theme-utils.js +1 -1
  121. package/dist/version.js +1 -1
  122. package/dist-types/aggregate-components.d.ts +2 -2
  123. package/dist-types/chunk-warming.d.ts +45 -8
  124. package/dist-types/component-hooks/use-headless-consent-ui.d.ts +5 -5
  125. package/dist-types/component-hooks/use-headless-iab-consent-ui.d.ts +2 -2
  126. package/dist-types/components/consent-gate/atoms.d.ts +11 -0
  127. package/dist-types/components/consent-gate/consent-gate.d.ts +2 -0
  128. package/dist-types/components/consent-gate/frame.d.ts +19 -0
  129. package/dist-types/components/consent-gate/index.d.ts +25 -0
  130. package/dist-types/components/{frame → consent-gate}/types.d.ts +7 -7
  131. package/dist-types/components/consent-preferences-link/consent-preferences-link.d.ts +1 -1
  132. package/dist-types/components/consent-preferences-link/index.d.ts +1 -1
  133. package/dist-types/components/iab-panel/atoms/feature-item.d.ts +28 -0
  134. package/dist-types/components/iab-panel/atoms/purpose-item.d.ts +5 -2
  135. package/dist-types/components/iab-panel/atoms/stack-item.d.ts +7 -2
  136. package/dist-types/components/iab-panel/atoms/vendor-list.d.ts +1 -1
  137. package/dist-types/components/iab-panel/iab-panel.d.ts +3 -3
  138. package/dist-types/components/iab-panel/index.d.ts +29 -26
  139. package/dist-types/components/iab-panel/use-iab-translations.d.ts +4 -0
  140. package/dist-types/components/iab-prompt/iab-prompt.d.ts +3 -3
  141. package/dist-types/components/iab-prompt/index.d.ts +19 -19
  142. package/dist-types/components/panel/atoms/card.d.ts +5 -4
  143. package/dist-types/components/panel/atoms/overlay.d.ts +1 -1
  144. package/dist-types/components/panel/index.d.ts +8 -8
  145. package/dist-types/components/panel/panel.d.ts +3 -3
  146. package/dist-types/components/panel-link/index.d.ts +1 -1
  147. package/dist-types/components/panel-trigger/atoms/button.d.ts +1 -1
  148. package/dist-types/components/panel-trigger/atoms/icon.d.ts +1 -1
  149. package/dist-types/components/panel-trigger/atoms/root.d.ts +2 -2
  150. package/dist-types/components/panel-trigger/atoms/toolbar.d.ts +2 -2
  151. package/dist-types/components/panel-trigger/atoms/trigger-icons.d.ts +25 -0
  152. package/dist-types/components/panel-trigger/index.d.ts +4 -4
  153. package/dist-types/components/panel-trigger/panel-trigger-toolbar.d.ts +1 -1
  154. package/dist-types/components/panel-trigger/panel-trigger.d.ts +9 -17
  155. package/dist-types/components/panel-trigger/types.d.ts +1 -1
  156. package/dist-types/components/preferences/atoms/accordion.d.ts +6 -4
  157. package/dist-types/components/preferences/atoms/button.d.ts +1 -1
  158. package/dist-types/components/preferences/atoms/footer.d.ts +1 -1
  159. package/dist-types/components/preferences/atoms/root.d.ts +1 -1
  160. package/dist-types/components/preferences/atoms/vendor-list.d.ts +23 -0
  161. package/dist-types/components/preferences/index.d.ts +14 -12
  162. package/dist-types/components/preferences/policy-actions.d.ts +2 -2
  163. package/dist-types/components/preferences/preferences.d.ts +1 -1
  164. package/dist-types/components/preferences/types.d.ts +1 -1
  165. package/dist-types/components/prompt/atoms/early-tap-script.d.ts +17 -0
  166. package/dist-types/components/prompt/atoms/root.d.ts +4 -0
  167. package/dist-types/components/prompt/components.d.ts +9 -3
  168. package/dist-types/components/prompt/index.d.ts +12 -12
  169. package/dist-types/components/prompt/policy-actions.d.ts +2 -2
  170. package/dist-types/components/prompt/prompt.d.ts +5 -1
  171. package/dist-types/components/shared/dialog-sheets.d.ts +9 -0
  172. package/dist-types/components/shared/first-paint-sheets.d.ts +8 -0
  173. package/dist-types/components/shared/iab-dialog-sheets.d.ts +3 -0
  174. package/dist-types/components/shared/iab-first-paint-sheets.d.ts +3 -0
  175. package/dist-types/components/shared/libs/compose-refs.d.ts +20 -0
  176. package/dist-types/components/shared/policy-actions.d.ts +2 -2
  177. package/dist-types/components/shared/primitives/box.d.ts +1 -1
  178. package/dist-types/components/shared/primitives/button.d.ts +2 -2
  179. package/dist-types/components/shared/primitives/button.types.d.ts +1 -1
  180. package/dist-types/components/shared/streamed-surface.d.ts +23 -0
  181. package/dist-types/components/shared/surface-styles.d.ts +36 -0
  182. package/dist-types/components/shared/ui/accordion/accordion.d.ts +2 -2
  183. package/dist-types/components/shared/ui/accordion/index.d.ts +2 -2
  184. package/dist-types/components/shared/ui/animated-collapse/index.d.ts +2 -2
  185. package/dist-types/components/shared/ui/branding.d.ts +1 -1
  186. package/dist-types/components/shared/ui/button/button.d.ts +1 -1
  187. package/dist-types/components/shared/ui/button/index.d.ts +2 -2
  188. package/dist-types/components/shared/ui/collapsible/index.d.ts +1 -1
  189. package/dist-types/components/shared/ui/dialog/index.d.ts +1 -1
  190. package/dist-types/components/shared/ui/icon.d.ts +2 -1
  191. package/dist-types/components/shared/ui/logo.d.ts +0 -10
  192. package/dist-types/components/shared/ui/preference-item/index.d.ts +1 -1
  193. package/dist-types/components/shared/ui/preference-item/preference-item.d.ts +13 -0
  194. package/dist-types/components/shared/ui/switch/index.d.ts +2 -2
  195. package/dist-types/components/shared/ui/switch/switch.d.ts +1 -1
  196. package/dist-types/components/shared/ui/tabs/index.d.ts +1 -1
  197. package/dist-types/consent-gate.d.ts +1 -0
  198. package/dist-types/consent-theme.d.ts +38 -0
  199. package/dist-types/context/consent-tracking-context.d.ts +10 -0
  200. package/dist-types/context/index.d.ts +3 -3
  201. package/dist-types/context/theme-context.d.ts +3 -3
  202. package/dist-types/context.d.ts +25 -1
  203. package/dist-types/devtools-launcher.d.ts +29 -0
  204. package/dist-types/devtools.d.ts +13 -2
  205. package/dist-types/draft-context.d.ts +31 -0
  206. package/dist-types/draft.d.ts +81 -9
  207. package/dist-types/gpp.d.ts +27 -0
  208. package/dist-types/headless.d.ts +6 -7
  209. package/dist-types/hooks/use-committed-ref.d.ts +24 -0
  210. package/dist-types/hooks/use-focus-trap.d.ts +3 -1
  211. package/dist-types/hooks/use-headless-iab-consent-ui.d.ts +1 -1
  212. package/dist-types/hooks/use-iab-manager.d.ts +5 -5
  213. package/dist-types/hooks/use-iab-policy-guard.d.ts +35 -0
  214. package/dist-types/hooks/use-late-entry.d.ts +14 -0
  215. package/dist-types/hooks/use-theme.d.ts +1 -1
  216. package/dist-types/hooks.d.ts +106 -11
  217. package/dist-types/iab.d.ts +7 -7
  218. package/dist-types/index-parts/consent-banner.d.ts +7 -0
  219. package/dist-types/index-parts/consent-dialog-link.d.ts +7 -0
  220. package/dist-types/index-parts/consent-dialog-trigger.d.ts +7 -0
  221. package/dist-types/index-parts/consent-dialog.d.ts +7 -0
  222. package/dist-types/index-parts/consent-gate.d.ts +7 -0
  223. package/dist-types/index-parts/core.d.ts +7 -0
  224. package/dist-types/index-parts/draft.d.ts +7 -0
  225. package/dist-types/index-parts/frame.d.ts +7 -0
  226. package/dist-types/index-parts/hooks.d.ts +7 -0
  227. package/dist-types/index-parts/hosted.d.ts +7 -0
  228. package/dist-types/index-parts/module-hooks.d.ts +7 -0
  229. package/dist-types/index-parts/offline.d.ts +7 -0
  230. package/dist-types/index-parts/presets.d.ts +7 -0
  231. package/dist-types/index-parts/provider.d.ts +7 -0
  232. package/dist-types/index-parts/theme.d.ts +8 -0
  233. package/dist-types/index-parts/translations.d.ts +7 -0
  234. package/dist-types/index.d.ts +32 -28
  235. package/dist-types/kernel-selector.d.ts +68 -0
  236. package/dist-types/modes.d.ts +26 -0
  237. package/dist-types/module-hooks/iframe-blocker.d.ts +33 -1
  238. package/dist-types/module-hooks/network-blocker.d.ts +23 -0
  239. package/dist-types/module-hooks/network-hold.d.ts +47 -0
  240. package/dist-types/module-hooks.d.ts +4 -4
  241. package/dist-types/panel-link.d.ts +1 -1
  242. package/dist-types/panel-trigger.d.ts +1 -1
  243. package/dist-types/panel.d.ts +13 -1
  244. package/dist-types/postcss-tailwind3.d.ts +21 -0
  245. package/dist-types/preferences.d.ts +12 -1
  246. package/dist-types/primitives/accordion.d.ts +1 -1
  247. package/dist-types/primitives/button.d.ts +1 -1
  248. package/dist-types/primitives/collapsible.d.ts +1 -1
  249. package/dist-types/primitives/dialog.d.ts +1 -1
  250. package/dist-types/primitives/preference-item.d.ts +1 -1
  251. package/dist-types/primitives/switch.d.ts +1 -1
  252. package/dist-types/primitives/tabs.d.ts +1 -1
  253. package/dist-types/primitives.d.ts +7 -7
  254. package/dist-types/prompt.d.ts +1 -1
  255. package/dist-types/provider.d.ts +169 -28
  256. package/dist-types/server/fetch-ssr-data.d.ts +1 -1
  257. package/dist-types/server/headers.d.ts +14 -4
  258. package/dist-types/server/index.d.ts +5 -5
  259. package/dist-types/server/normalize-url.d.ts +14 -7
  260. package/dist-types/server/types.d.ts +12 -1
  261. package/dist-types/theme-provider.d.ts +2 -2
  262. package/dist-types/transports/hosted.d.ts +36 -0
  263. package/dist-types/transports/manifest.d.ts +48 -0
  264. package/dist-types/transports/offline.d.ts +7 -16
  265. package/dist-types/types/index.d.ts +3 -3
  266. package/dist-types/types/manager.d.ts +1 -1
  267. package/dist-types/types/theme/index.d.ts +1 -1
  268. package/dist-types/ui-config-context.d.ts +14 -2
  269. package/dist-types/utils/deferred-module.d.ts +13 -0
  270. package/dist-types/utils/index.d.ts +4 -4
  271. package/dist-types/utils/merge-slot-props.d.ts +17 -3
  272. package/dist-types/utils/merge-styles.d.ts +1 -1
  273. package/dist-types/utils/theme-utils.d.ts +18 -3
  274. package/dist-types/version.d.ts +1 -1
  275. package/docs/README.md +96 -70
  276. package/docs/assets/v3/bottom-bar.png +0 -0
  277. package/docs/assets/v3/brand-card.png +0 -0
  278. package/docs/assets/v3/brand-preferences.png +0 -0
  279. package/docs/assets/v3/choice-wall.png +0 -0
  280. package/docs/assets/v3/headless-bar-html.png +0 -0
  281. package/docs/assets/v3/headless-bar-mobile.png +0 -0
  282. package/docs/assets/v3/headless-bar.png +0 -0
  283. package/docs/assets/v3/slim-bar.png +0 -0
  284. package/docs/concepts/choose-your-setup.md +138 -0
  285. package/docs/concepts/consent-categories.md +84 -0
  286. package/docs/concepts/consent-state.md +421 -0
  287. package/docs/concepts/data-fetching.md +270 -0
  288. package/docs/concepts/how-consent-works.md +123 -0
  289. package/docs/concepts/modes.md +278 -0
  290. package/docs/{frameworks/react/concepts/policy-presets.md → concepts/policies.md} +8 -60
  291. package/docs/customization/class-names.md +202 -0
  292. package/docs/customization/dark-mode.md +157 -0
  293. package/docs/customization/motion.md +128 -0
  294. package/docs/customization/overview.md +68 -33
  295. package/docs/customization/recipes.md +838 -47
  296. package/docs/customization/slots.md +217 -35
  297. package/docs/customization/stylesheets.md +248 -0
  298. package/docs/customization/tailwind.md +863 -0
  299. package/docs/customization/tokens.md +167 -36
  300. package/docs/customization/translations.md +87 -3
  301. package/docs/frameworks/react/callbacks.md +118 -0
  302. package/docs/frameworks/react/clear-on-revocation.md +106 -0
  303. package/docs/frameworks/react/components/consent-banner.md +48 -27
  304. package/docs/frameworks/react/components/consent-dialog-link.md +13 -11
  305. package/docs/frameworks/react/components/consent-dialog-trigger.md +86 -76
  306. package/docs/frameworks/react/components/consent-dialog.md +111 -58
  307. package/docs/frameworks/react/components/{frame.md → consent-gate.md} +70 -49
  308. package/docs/frameworks/react/components/consent-provider.md +140 -0
  309. package/docs/frameworks/react/components/consent-widget.md +69 -24
  310. package/docs/frameworks/react/components/dev-tools.md +76 -85
  311. package/docs/frameworks/react/components.md +113 -0
  312. package/docs/frameworks/react/compose.md +354 -0
  313. package/docs/frameworks/react/content-security-policy.md +143 -0
  314. package/docs/frameworks/react/customize.md +258 -0
  315. package/docs/frameworks/react/embeds.md +89 -0
  316. package/docs/frameworks/react/gpp.md +163 -0
  317. package/docs/frameworks/react/headless.md +4 -4
  318. package/docs/frameworks/react/hooks.md +70 -0
  319. package/docs/frameworks/react/iab.md +259 -0
  320. package/docs/frameworks/react/network-blocker.md +140 -0
  321. package/docs/frameworks/react/quickstart.md +220 -102
  322. package/docs/frameworks/react/rendering.md +263 -0
  323. package/docs/frameworks/react/scripts.md +114 -0
  324. package/docs/frameworks/react/translations.md +155 -0
  325. package/docs/frameworks/react/troubleshooting.md +188 -61
  326. package/docs/frameworks/react/upgrade-v3.md +651 -0
  327. package/docs/frameworks/react/vendor-consent.md +188 -0
  328. package/docs/guides/banner-experiments.md +672 -0
  329. package/docs/guides/troubleshooting.md +192 -54
  330. package/docs/guides/verify-consent.md +96 -49
  331. package/docs/integrations/adobe-analytics.md +177 -183
  332. package/docs/integrations/ahrefs-analytics.md +162 -178
  333. package/docs/integrations/amplitude.md +172 -180
  334. package/docs/integrations/building-integrations.md +137 -33
  335. package/docs/integrations/clearbit.md +164 -178
  336. package/docs/integrations/cloudflare-web-analytics.md +166 -180
  337. package/docs/integrations/cloudflare-zaraz.md +333 -0
  338. package/docs/integrations/crisp.md +174 -182
  339. package/docs/integrations/databuddy.md +167 -197
  340. package/docs/integrations/fathom-analytics.md +168 -180
  341. package/docs/integrations/front-chat.md +308 -0
  342. package/docs/integrations/google-maps.md +142 -108
  343. package/docs/integrations/google-tag-manager.md +258 -185
  344. package/docs/integrations/google-tag.md +226 -182
  345. package/docs/integrations/heap.md +173 -179
  346. package/docs/integrations/hightouch.md +171 -181
  347. package/docs/integrations/hotjar.md +169 -179
  348. package/docs/integrations/intercom.md +193 -177
  349. package/docs/integrations/klaviyo.md +473 -0
  350. package/docs/integrations/linkedin-insights.md +184 -174
  351. package/docs/integrations/logrocket.md +170 -180
  352. package/docs/integrations/matomo-analytics.md +198 -202
  353. package/docs/integrations/meta-pixel.md +198 -174
  354. package/docs/integrations/microsoft-clarity.md +173 -179
  355. package/docs/integrations/microsoft-uet.md +158 -178
  356. package/docs/integrations/mixpanel-analytics.md +165 -184
  357. package/docs/integrations/one-dollar-stats.md +292 -0
  358. package/docs/integrations/openai-pixel.md +214 -325
  359. package/docs/integrations/overview.md +152 -83
  360. package/docs/integrations/pinterest-tag.md +315 -0
  361. package/docs/integrations/pirsch.md +179 -183
  362. package/docs/integrations/plausible-analytics.md +182 -182
  363. package/docs/integrations/posthog.md +323 -264
  364. package/docs/integrations/promptwatch.md +164 -178
  365. package/docs/integrations/reddit-pixel.md +195 -181
  366. package/docs/integrations/rudderstack.md +211 -210
  367. package/docs/integrations/rybbit-analytics.md +181 -184
  368. package/docs/integrations/segment.md +192 -178
  369. package/docs/integrations/sentry.md +402 -0
  370. package/docs/integrations/snapchat-pixel.md +196 -180
  371. package/docs/integrations/tiktok-pixel.md +181 -174
  372. package/docs/integrations/umami-analytics.md +173 -182
  373. package/docs/integrations/vercel-analytics.md +176 -181
  374. package/docs/integrations/x-pixel.md +186 -174
  375. package/docs/integrations/youtube.md +150 -111
  376. package/package.json +48 -17
  377. package/dist/component-hooks/use-manager.js +0 -2
  378. package/dist/components/frame/atoms.js +0 -1
  379. package/dist/components/frame/frame.js +0 -2
  380. package/dist/components/frame/index.js +0 -2
  381. package/dist/frame.js +0 -2
  382. package/dist/ui-save.js +0 -1
  383. package/dist-types/component-hooks/use-manager.d.ts +0 -40
  384. package/dist-types/components/frame/atoms.d.ts +0 -11
  385. package/dist-types/components/frame/frame.d.ts +0 -2
  386. package/dist-types/components/frame/index.d.ts +0 -24
  387. package/dist-types/frame.d.ts +0 -1
  388. package/dist-types/ui-save.d.ts +0 -5
  389. package/docs/assets/v3/brand-bar.png +0 -0
  390. package/docs/assets/v3/mobile-card.png +0 -0
  391. package/docs/assets/v3/preferences.png +0 -0
  392. package/docs/frameworks/react/components/consent-manager-provider.md +0 -71
  393. package/docs/frameworks/react/concepts/consent-categories.md +0 -33
  394. package/docs/frameworks/react/hooks/use-consent-manager/overview.md +0 -58
  395. package/docs/frameworks/react/iab/overview.md +0 -53
  396. package/docs/frameworks/react/script-loader.md +0 -63
  397. package/docs/frameworks/react/styling/overview.md +0 -217
  398. package/docs/guides/consent-state.md +0 -60
  399. package/docs/guides/data-fetching.md +0 -163
  400. package/docs/guides/deployment-modes.md +0 -63
  401. package/docs/integrations/clear-on-revocation.md +0 -167
  402. package/docs/upgrade-v3.md +0 -334
  403. package/readme.json +0 -48
  404. package/src/iab/styles.css +0 -11
  405. package/src/styles.css +0 -10
  406. /package/dist/components/{frame → consent-gate}/types.js +0 -0
@@ -1,163 +0,0 @@
1
- ---
2
- title: Data fetching and transports
3
- description: Choose cached manifests, backend init or offline policy resolution,
4
- and understand where consent records are saved.
5
- group: guides
6
- ---
7
-
8
- ## Start with Inth and a cached manifest
9
-
10
- Use Inth for managed policy and consent records. For a Next.js application with
11
- a server, use a cached manifest to resolve policy in your application. Route
12
- browser consent traffic directly to Inth, or optionally use a Next.js rewrite
13
- to keep those requests on your app's origin. Follow the
14
- [Next.js manifest setup](https://c15t.com/docs/frameworks/next/data-fetching).
15
-
16
- Backend ownership and data fetching are separate decisions. Inth manages the
17
- backend for you. A [self-hosted backend](https://c15t.com/docs/self-host/quickstart) uses the same
18
- protocol while you operate its database, policies and availability. A static
19
- site can still call Inth. Only `offline()` deliberately removes consent backend
20
- requests and stores choices locally.
21
-
22
- | Fetching path | Where policy resolves | Where choices are submitted | Choose it when |
23
- | ------------------------------ | ------------------------------------------------------------------------------------- | --------------------------- | ------------------------------------------------------------------------------------------------------ |
24
- | Cached manifest on your server | Your application resolves public policy data with each request's location and signals | Inth or your c15t backend | Your host has a runtime server and you want to reuse policy data across requests |
25
- | Regular backend `/init` | The consent backend | The same backend | You want the fewest moving parts, need backend-owned request resolution, or have no application server |
26
- | Manifest in the browser | The browser, using supplied or unknown location | Inth or your c15t backend | You deliberately want client resolution and have planned geography, bundle size and policy refresh |
27
- | Offline | The browser or local runtime, using bundled rules | No backend submission | Local development and tests. Not recommended for production environments. |
28
- | Custom transport | Your implementation | Your implementation | An existing service cannot use the c15t backend protocol |
29
-
30
- ## What is a consent manifest?
31
-
32
- A manifest is a versioned policy document served by `GET /manifest`. It contains
33
- policy rules, translation configuration and related consent configuration. It
34
- is public configuration, not a visitor's saved choices. A resolver combines the
35
- manifest with country, region, language and privacy signals to produce an init
36
- result for one visitor.
37
-
38
- Reusing the public document avoids asking the consent backend to resolve policy
39
- for every application request. Cache misses and revalidation still fetch the
40
- manifest, and consent writes still need the backend. Measure the deployed
41
- request path before promising a latency improvement.
42
-
43
- Do not put secrets, visitor identifiers or consent records into a manifest.
44
- Keep personalized init responses out of shared caches. Changing a policy also
45
- requires a refresh strategy for cached or build-time manifests.
46
-
47
- ## What does regular `/init` do?
48
-
49
- `hosted({ url })` uses `${url}/init` for initialization and `${url}/subjects` for
50
- consent submissions. The name `hosted` describes the transport protocol; the URL
51
- can belong to Inth or your own c15t backend.
52
-
53
- ```ts title="src/consent-mode.ts"
54
- import { hosted } from 'c15t';
55
-
56
- export function createConsentMode(backendURL: string) {
57
- return hosted({ url: backendURL });
58
- }
59
- ```
60
-
61
- Pass the factory to your adapter's `mode` option. For request rendering, use the
62
- adapter's server helper and forward its prepared result to the browser. For
63
- static output, initialize in the browser with a reachable external URL.
64
-
65
- A regular backend `/init` request lets the backend resolve the visitor context.
66
- A same-origin URL named `/api/c15t/init` can instead resolve from a cached
67
- manifest in your application. The URL name alone does not tell you which path
68
- runs.
69
-
70
- ## How do transports and proxies differ?
71
-
72
- A transport implements initialization, saving and optional record operations.
73
- A proxy changes where HTTP requests travel. It does not change the policy
74
- resolver or make personalized responses safe to cache.
75
-
76
- For a same-origin init route that resolves a manifest, the hosted transport can
77
- separate policy reads and record writes. With a backend rewrite mounted at
78
- `/api/c15t`, a client mode can use:
79
-
80
- ```ts title="src/consent-mode.ts"
81
- import { hosted } from 'c15t';
82
-
83
- export const mode = hosted({
84
- url: '/api/c15t',
85
- initURL: '/api/c15t/init',
86
- assertDecisionInputs: true,
87
- });
88
- ```
89
-
90
- The route must return the c15t init response contract. `assertDecisionInputs`
91
- binds saves to the resolved policy when init did not return a signed policy
92
- snapshot token. The backend can then reject a stale policy decision. Next.js
93
- sets this option for you when `ConsentRoot` receives a `config` with
94
- `initURL`.
95
-
96
- The init route resolves policy; the backend rewrite forwards `/api/c15t/subjects`
97
- and other record endpoints. Configure both if you choose this optional proxy
98
- variant. The
99
- [Next.js rewrite recipe](https://c15t.com/docs/frameworks/next/optimization#keep-browser-consent-requests-on-your-origin)
100
- shows the configuration. A direct absolute backend URL works
101
- without a rewrite.
102
-
103
- This optional optimization keeps c15t requests on the app's origin and avoids a separate browser DNS lookup
104
- and TLS connection to the consent backend. The app server still connects to
105
- the upstream backend for manifest refreshes and consent writes. Vendor scripts
106
- and vendor requests keep their own origins.
107
-
108
- Set the absolute upstream endpoint through `C15T_BACKEND_URL` in Next.js server
109
- configuration. The endpoint URL is public connection information, not a secret.
110
- The browser uses `/api/c15t` without needing the upstream URL. A static export
111
- cannot serve a Next.js route or rewrite at runtime; use the absolute Inth URL or
112
- a proxy provided by the static host instead.
113
-
114
- ## When should I use offline mode?
115
-
116
- Not recommended for production environments. Use Inth or a self-hosted backend
117
- for production policy and consent records.
118
-
119
- `offline()` resolves bundled policy rules without an init request and acknowledges
120
- saves locally. The runtime's persistence module stores the choice in browser
121
- storage. There is no backend audit history, cross-device record service or IP
122
- geolocation supplied by this transport.
123
-
124
- Use your adapter's offline factory so its translations and provider context are
125
- included. This React and Next.js example replaces the hosted mode in an existing
126
- client provider:
127
-
128
- ```ts title="src/consent-mode.ts"
129
- import { offline } from 'c15t/react';
130
-
131
- export const mode = offline();
132
- ```
133
-
134
- With no `policyRules`, the current offline transport uses the recommended rule
135
- pack. Supplying `policyRules` replaces that pack. Unknown country and region are
136
- real resolution inputs; offline mode does not discover a visitor's location.
137
- Use [policy rules](https://c15t.com/docs/frameworks/next/concepts/policy-presets) to understand
138
- matching and defaults, and test the missing-location case.
139
-
140
- Offline mode is an explicit architecture choice, not an automatic fallback for
141
- a failed Inth request. If hosted initialization fails before a policy resolves,
142
- optional permissions remain denied and the stock prompt stays hidden. Observe
143
- initialization failures instead of silently changing policy sources.
144
-
145
- ## Can I provide my own transport?
146
-
147
- `custom(transport)` accepts a `KernelTransport` with the v3 `init` and `save`
148
- contract. It does not accept v2 endpoint handlers such as `setConsent`. Keep
149
- policy resolution, record acknowledgments and failure behavior consistent with
150
- the kernel contract. Prefer a built-in transport when your backend supports it.
151
-
152
- ## Verify the selected path
153
-
154
- Inspect browser and server requests separately. A server manifest fetch will
155
- not appear in the browser's Network panel. On a warm manifest path, check that
156
- page requests do not call the backend `/init`, a visitor's choice still reaches
157
- the backend's `/subjects`, and policy changes become visible after the configured
158
- refresh. In the recommended Next.js setup, the browser should call only
159
- `/api/c15t` paths for consent HTTP traffic; inspect server logs to verify their
160
- upstream destinations.
161
-
162
- Test different locations, missing location headers, GPC, returning choices and
163
- backend failure. See [verification](./verify-consent.md).
@@ -1,63 +0,0 @@
1
- ---
2
- title: Choose a deployment mode
3
- description: Choose who runs your consent backend, then select manifest, init or
4
- offline resolution for your deployment.
5
- group: guides
6
- ---
7
-
8
- ## Use Inth for managed policy and records
9
-
10
- Start with [Inth](https://inth.com) unless you need to operate the consent
11
- service yourself or deliberately need only local browser records. Configure
12
- policy rules and trusted origins in the project, then use its exact backend
13
- endpoint in your framework setup.
14
-
15
- | Backend ownership | Policy source | Record storage | Use when |
16
- | ------------------------- | ------------------------------------------------------ | ---------------------------------------- | ------------------------------------------------------------------------- |
17
- | Inth hosted service | Centrally managed policy through a manifest or `/init` | Browser records plus backend submissions | You want managed policy and consent records |
18
- | Self-hosted c15t | Your backend's manifest or `/init` | Browser records plus your database | You need to operate the service and its infrastructure |
19
- | Browser-only offline mode | Bundled `policyRules` | Browser persistence | Local development and tests. Not recommended for production environments. |
20
-
21
- Hosted and self-hosted c15t use the same transport protocol. Switching who runs
22
- the backend does not require switching from manifests to `/init`.
23
-
24
- ## Choose data fetching separately
25
-
26
- For Next.js deployments with a runtime server, use the
27
- [manifest setup](https://c15t.com/docs/frameworks/next/data-fetching). It reuses public policy data
28
- in your application while consent writes still go to Inth. Regular backend
29
- `/init` is available when you want backend-owned request resolution or a simpler
30
- browser setup. See [data fetching and transports](./data-fetching.md) for
31
- the comparison, including custom transports and offline mode.
32
-
33
- ## Match initialization to your application output
34
-
35
- | Application output | Initial state | Required setup |
36
- | ------------------ | ------------------------- | ----------------------------------------------------------- |
37
- | Request SSR | Prepared for this visitor | Adapter request helper and matching client configuration |
38
- | Static HTML or SPA | Resolved in the browser | Reachable external URLs or deliberately bundled local rules |
39
-
40
- Request SSR can include the visitor's prompt in the initial HTML. Pass the
41
- prepared records and policy resolution through to hydration. Do not convert
42
- effective permissions into new stored choices.
43
-
44
- Static HTML is shared across visitors. It cannot contain a choice resolved from
45
- each visitor's cookies or geography at build time. A static site can still use
46
- Inth through browser requests. A same-origin `/api/c15t` URL only works if a
47
- service actually serves it; a Next.js static export does not run API routes.
48
-
49
- A manifest contains reusable public policy data. A resolved init response and
50
- personalized consent HTML belong to a request. Do not give them the same shared
51
- cache treatment.
52
-
53
- ## Handle initialization and storage failures
54
-
55
- While no policy resolves, optional permissions stay denied and the stock
56
- consent UI stays hidden. No banner can mean pending or failed initialization.
57
- It does not mean permission to load analytics. Observe errors before changing
58
- presentation, and do not silently switch to offline policy after a hosted
59
- request fails.
60
-
61
- Browser storage can also be unavailable. A working in-memory interaction does
62
- not prove the choice survives reload. Use
63
- [verification](./verify-consent.md) to test the actual deployment.
@@ -1,167 +0,0 @@
1
- ---
2
- title: Clear on revocation
3
- description: Remove configured first-party cookies and Web Storage keys when
4
- their consent category is denied.
5
- group: integrations
6
- ---
7
-
8
- ## Configure cleanup
9
-
10
- Add `clearOnRevocation` to your provider or runtime options. Declare only the
11
- data owned by each optional category:
12
-
13
- ```ts
14
- import { hosted, type ClearOnRevocationConfig } from 'c15t';
15
- import { createConsentRuntime } from 'c15t/runtime';
16
-
17
- const clearOnRevocation = {
18
- measurement: {
19
- cookies: ['_ga', '_ga_*'],
20
- localStorage: ['analytics:*'],
21
- },
22
- marketing: {
23
- cookies: ['_fbp'],
24
- sessionStorage: ['campaign-id'],
25
- },
26
- } satisfies ClearOnRevocationConfig;
27
-
28
- const runtime = createConsentRuntime({
29
- mode: hosted({ url: '/api/c15t' }),
30
- clearOnRevocation,
31
- });
32
-
33
- // Start in the browser after mount. The endpoint must serve your c15t backend.
34
- runtime.start();
35
-
36
- // Call runtime.dispose() when the app no longer needs consent management.
37
- ```
38
-
39
- For React, pass the same configuration through `ConsentProvider.options`:
40
-
41
- ```tsx
42
- import type { ReactNode } from 'react';
43
- import { ConsentProvider, hosted } from 'c15t/react';
44
-
45
- const mode = hosted({ url: '/api/c15t' });
46
-
47
- export function Consent({ children }: { children: ReactNode }) {
48
- return (
49
- <ConsentProvider
50
- options={{
51
- mode,
52
- clearOnRevocation: {
53
- measurement: { cookies: ['_ga', '_ga_*'] },
54
- },
55
- }}
56
- >
57
- {children}
58
- </ConsentProvider>
59
- );
60
- }
61
- ```
62
-
63
- The same option is available in Next.js and TanStack Start `ConsentRoot` props, Vue and
64
- Nuxt configuration, Svelte providers, and Astro integration options. Solid and
65
- other headless integrations can use `createConsentRuntime` as shown above.
66
- Every adapter uses the same cleanup module.
67
-
68
- Omitting `clearOnRevocation` leaves cleanup disabled. The provider option is
69
- initial-only. Remount the provider to replace its cleanup configuration. For
70
- a shared runtime, configure the runtime owner rather than a borrowing provider.
71
-
72
- ## Matching names and cookie scopes
73
-
74
- Use an exact string or a nonempty prefix followed by `*`. `_ga_*` matches
75
- `_ga_ABC123`; it does not match `_ga`. Regular expressions, wildcards in other
76
- positions, and a bare `*` are unsupported. Web Storage keys may contain spaces,
77
- Unicode, and punctuation. Cookie names use their raw spelling, without URL
78
- decoding.
79
-
80
- Cookies can share a name while having different domains or paths. Cleanup
81
- tries the current host and its parent domains, and the current path and its
82
- ancestors. To target a specific scope, use an object:
83
-
84
- ```ts
85
- const clearOnRevocation = {
86
- measurement: {
87
- cookies: [
88
- { name: 'analytics-id', domain: 'example.com', path: '/' },
89
- { name: 'checkout-metrics', domain: '', path: '/checkout' },
90
- { name: 'partitioned-metrics', partitioned: true },
91
- ],
92
- },
93
- };
94
- ```
95
-
96
- An empty `domain` means host-only. Explicit domains and paths replace the
97
- automatic attempts for that field. Exact names can be deleted at a configured
98
- path even when the current page cannot read that cookie. Prefix matching can
99
- only discover cookie names visible to the current page, so use an exact name
100
- for a cookie on another path.
101
-
102
- Partitioned cookies require `partitioned: true`; ordinary targets remove
103
- unpartitioned cookies. Cookie deletion preserves the browser's `__Secure-`
104
- and `__Host-` prefix requirements. c15t protects its own consent, notice,
105
- privacy, pending-save, and IAB consent records in cookies and localStorage,
106
- including configured custom storage keys, even if your patterns match them.
107
- c15t does not store consent in sessionStorage, so targeted entries there are
108
- removed even when their names match consent storage keys.
109
-
110
- ## When cleanup runs
111
-
112
- The runtime attaches cleanup after persistence and the script loader. Cleanup
113
- waits while the policy is pending. On the first settled snapshot, it removes
114
- configured data for every denied category. This includes a new opt-in visitor
115
- who has not made a choice and a returning visitor whose permission expired.
116
-
117
- After that first pass, cleanup runs when a category changes from allowed to
118
- denied. Saving a refusal, expiry, a policy change, Global Privacy Control,
119
- or synchronized records can cause that transition. Under an opt-out policy,
120
- an expired grant that remains effectively allowed does not trigger deletion.
121
- The `necessary` category cannot be configured for cleanup.
122
-
123
- Cleanup keeps waiting if a failed initial request leaves the policy pending.
124
- If a previously settled policy falls back to denial after an initialization
125
- failure, cleanup removes its configured data. A later successful retry cannot
126
- restore deleted data.
127
-
128
- Runtime construction, server rendering, draft checkbox edits, opening the
129
- dialog, and disposal do not clear data. Cleanup does not poll storage or repeat
130
- on unrelated UI updates.
131
-
132
- ## Use an existing kernel
133
-
134
- For a manually assembled integration, attach the module in the browser after
135
- persistence hydration and script-loader setup:
136
-
137
- ```ts
138
- import { createClearOnRevocation } from 'c15t/modules/clear-on-revocation';
139
-
140
- const cleanup = createClearOnRevocation({
141
- kernel,
142
- config: { measurement: { cookies: ['_ga', '_ga_*'] } },
143
- storageConfig,
144
- });
145
-
146
- // Stop observing consent when this integration is torn down.
147
- cleanup.dispose();
148
- ```
149
-
150
- Here `kernel` is your existing consent kernel. Pass the same `storageConfig`
151
- used by persistence so cleanup protects custom record keys. Attaching the
152
- module can immediately clear denied categories if the policy is already
153
- settled. Do not also attach it when your provider or runtime owns cleanup.
154
-
155
- ## Browser limits
156
-
157
- Cleanup can remove JavaScript-accessible first-party cookies and keys in the
158
- current origin's `localStorage` and `sessionStorage`. It cannot remove
159
- `HttpOnly` cookies or another origin's data. Keep `HttpOnly` protections and
160
- use your server to expire cookies that require server access. Cookie deletion
161
- must match the cookie's scope. See the
162
- [browser cookie documentation](https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/Cookies).
163
-
164
- Browser restrictions can prevent reads or deletions. Cleanup failures do not
165
- block consent updates. A running SDK may write data again after a sweep, so
166
- keep script gating and the integration's consent-change or teardown behavior
167
- configured. Deleting a script element cannot undo JavaScript it already ran.