@c15t/react 3.0.0-alpha.0 → 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 (405) hide show
  1. package/AGENTS.md +96 -69
  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 -151
  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 +35 -159
  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 +174 -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 -69
  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 -62
  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 -55
  397. package/docs/frameworks/react/styling/overview.md +0 -207
  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/upgrade-v3.md +0 -334
  402. package/readme.json +0 -48
  403. package/src/iab/styles.css +0 -11
  404. package/src/styles.css +0 -10
  405. /package/dist/components/{frame → consent-gate}/types.js +0 -0
@@ -1,2 +1,2 @@
1
- export * from './button';
2
- export * from './button.types';
1
+ export * from './button.js';
2
+ export * from './button.types.js';
@@ -1 +1 @@
1
- export * from './collapsible';
1
+ export * from './collapsible.js';
@@ -1 +1 @@
1
- export * from './dialog';
1
+ export * from './dialog.js';
@@ -1,6 +1,7 @@
1
1
  import type { ElementType, JSX, SVGProps } from 'react';
2
2
  type LucideIconProps = SVGProps<SVGSVGElement> & {
3
- title: string;
3
+ /** Omit for a decorative icon that must add nothing to an accessible name. */
4
+ title?: string;
4
5
  iconPath: JSX.Element;
5
6
  };
6
7
  export declare const LucideIcon: ({ title, iconPath }: LucideIconProps) => ElementType;
@@ -16,14 +16,4 @@ export declare const InthLogo: (props: SVGProps<SVGSVGElement> & IconProps) => i
16
16
  * INTH icon-only mark for compact placements like floating triggers.
17
17
  */
18
18
  export declare const InthIconOnly: (props: SVGProps<SVGSVGElement> & IconProps) => import("react").JSX.Element;
19
- /**
20
- * Fingerprint icon for privacy/consent contexts.
21
- * A generic icon representing user identity and privacy.
22
- */
23
- export declare const FingerprintIcon: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & IconProps) => import("react").JSX.Element;
24
- /**
25
- * Settings/gear icon for preference contexts.
26
- * A generic icon representing configuration and settings.
27
- */
28
- export declare const SettingsIcon: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & IconProps) => import("react").JSX.Element;
29
19
  export {};
@@ -1 +1 @@
1
- export * from './preference-item';
1
+ export * from './preference-item.js';
@@ -66,6 +66,19 @@ export interface PreferenceItemTitleProps extends HTMLAttributes<HTMLHeadingElem
66
66
  }
67
67
  declare const PreferenceItemTitle: import("react").ForwardRefExoticComponent<PreferenceItemTitleProps & import("react").RefAttributes<HTMLHeadingElement>>;
68
68
  export interface PreferenceItemContentProps extends HTMLAttributes<HTMLDivElement> {
69
+ /**
70
+ * Render the children while the item has never been opened.
71
+ *
72
+ * By default the content element is always rendered, so the trigger's
73
+ * `aria-controls` target exists, but its children mount the first time
74
+ * the item opens and then stay mounted, so the close transition and any
75
+ * state inside them survive. Collapsed content is `inert` and
76
+ * `aria-hidden` either way. Set this when collapsed children must be in
77
+ * the DOM, for example when custom CSS shows them.
78
+ *
79
+ * @defaultValue false
80
+ */
81
+ forceMount?: boolean;
69
82
  innerClassName?: string;
70
83
  innerSlotKey?: ConsentComponentSlotKey;
71
84
  noStyle?: boolean;
@@ -1,2 +1,2 @@
1
- export * from './switch';
2
- export type { SwitchCSSVariables, SwitchRootCSSVariables, SwitchThumbCSSVariables, SwitchTrackCSSVariables, } from './switch.types';
1
+ export * from './switch.js';
2
+ export type { SwitchCSSVariables, SwitchRootCSSVariables, SwitchThumbCSSVariables, SwitchTrackCSSVariables, } from './switch.types.js';
@@ -1,5 +1,5 @@
1
1
  import type { ButtonHTMLAttributes } from 'react';
2
- import type { ThemeValue } from '../../../../types/theme';
2
+ import type { ThemeValue } from '../../../../types/theme/index.js';
3
3
  export type SwitchSize = 'medium' | 'small';
4
4
  export interface SwitchVariantsProps {
5
5
  size?: SwitchSize;
@@ -1 +1 @@
1
- export * from './tabs';
1
+ export * from './tabs.js';
@@ -0,0 +1 @@
1
+ export { ConsentGate, ConsentGateButton, type ConsentGateCompoundComponent, type ConsentGateProps, ConsentGateRoot, ConsentGateTitle, Frame, FrameButton, type FrameCompoundComponent, type FrameProps, FrameRoot, FrameTitle, } from './components/consent-gate/index.js';
@@ -0,0 +1,38 @@
1
+ import type { Theme } from './types/theme/index.js';
2
+ /** Props for {@link ConsentTheme}. */
3
+ export interface ConsentThemeProps {
4
+ /**
5
+ * Theme tokens: colors, dark colors, typography, spacing, radius,
6
+ * shadows and motion. Defaults to the built-in theme, which the package
7
+ * stylesheet already contains, so omit it only to pick a `colorScheme`
8
+ * before hydration.
9
+ */
10
+ theme?: Theme;
11
+ /**
12
+ * Color scheme to apply before hydration. `'dark'` makes the dark
13
+ * tokens the default, and `'system'` follows `prefers-color-scheme`.
14
+ * Omit it to follow the `dark` / `c15t-dark` class on `<html>`. Pass the
15
+ * same value as the provider's `colorScheme` option.
16
+ */
17
+ colorScheme?: 'light' | 'dark' | 'system' | null;
18
+ /** Content Security Policy nonce for the `<style>` element. */
19
+ nonce?: string;
20
+ }
21
+ /**
22
+ * Renders the `--c15t-*` CSS variables for a theme as a `<style>` element.
23
+ *
24
+ * Render it once, next to the consent provider, where your framework renders
25
+ * on the server. The provider does not generate theme CSS itself.
26
+ *
27
+ * @param props - The theme, color scheme and CSP nonce.
28
+ * @returns A `<style id="c15t-theme">` element.
29
+ * @example
30
+ * ```tsx
31
+ * // app/layout.tsx (Server Component)
32
+ * import { ConsentTheme } from '@c15t/nextjs';
33
+ * import { theme } from './consent-theme';
34
+ *
35
+ * <ConsentTheme theme={theme} colorScheme="system" />
36
+ * ```
37
+ */
38
+ export declare const ConsentTheme: ({ theme, colorScheme, nonce, }: ConsentThemeProps) => import("react").JSX.Element;
@@ -1,3 +1,4 @@
1
+ import type { SaveUISource } from '@c15t/core';
1
2
  /**
2
3
  * Value provided by the ConsentTrackingContext.
3
4
  *
@@ -30,3 +31,12 @@ export declare const ConsentTrackingContext: import("react").Context<ConsentTrac
30
31
  * @public
31
32
  */
32
33
  export declare const useConsentTracking: () => ConsentTrackingValue;
34
+ /**
35
+ * Narrow a tracking `uiSource` to a value the kernel records. Custom labels
36
+ * fall back to the kernel's `activeUI` attribution.
37
+ *
38
+ * @param value - The `uiSource` from props or context.
39
+ * @returns A kernel save source, or `undefined` to keep the default.
40
+ * @public
41
+ */
42
+ export declare const toSaveUISource: (value: string | undefined) => SaveUISource | undefined;
@@ -1,3 +1,3 @@
1
- export * from '../context';
2
- export * from './consent-tracking-context';
3
- export * from './theme-context';
1
+ export { HydrationSnapshotContext, KernelContext, type ProviderServices, ProviderServicesContext, StreamedPrefetchContext, } from '../context.js';
2
+ export { ConsentTrackingContext, type ConsentTrackingValue, toSaveUISource, useConsentTracking, } from './consent-tracking-context.js';
3
+ export { GlobalThemeContext, LocalThemeContext, type ThemeContextValue, } from './theme-context.js';
@@ -1,4 +1,4 @@
1
- import type { Theme } from '../types/theme';
1
+ import type { Theme } from '../types/theme/index.js';
2
2
  /**
3
3
  * Configuration value type for the ThemeContext.
4
4
  *
@@ -41,10 +41,10 @@ export interface ThemeContextValue {
41
41
  */
42
42
  trapFocus?: boolean;
43
43
  /**
44
- * Color scheme preference.
44
+ * Color scheme preference. `null` when the provider leaves the class alone.
45
45
  * @default 'system'
46
46
  */
47
- colorScheme?: 'light' | 'dark' | 'system';
47
+ colorScheme?: 'light' | 'dark' | 'system' | null;
48
48
  }
49
49
  /**
50
50
  * Context for providing theme values to components.
@@ -1,4 +1,5 @@
1
- import type { AllConsentNames, ConsentKernel, ConsentPresentation } from '@c15t/core';
1
+ import type { AllConsentNames, ConsentKernel, ConsentPresentation, ConsentSnapshot } from '@c15t/core';
2
+ import type { StreamedPrefetch } from '@c15t/core/runtime';
2
3
  /**
3
4
  * React context carrying the kernel instance.
4
5
  *
@@ -13,5 +14,28 @@ export interface ProviderServices {
13
14
  clearRecords: () => void;
14
15
  getPresentation: () => ConsentPresentation | undefined;
15
16
  getConsentCategories: () => readonly AllConsentNames[];
17
+ /** Whether the runtime has started: records hydrated, prefetch adopted. */
18
+ isStarted: () => boolean;
19
+ /**
20
+ * Store a language override and load its copy: init runs again on the
21
+ * provider's own kernel while it is enabled, and a borrowed runtime
22
+ * reinitializes itself.
23
+ */
24
+ setLanguage: (code: string) => void;
16
25
  }
17
26
  export declare const ProviderServicesContext: import("react").Context<ProviderServices | null>;
27
+ /**
28
+ * The provider runtime's streamed `prefetch`, while `prefetch` is a promise.
29
+ * Consent surfaces render inside a boundary that waits for it.
30
+ *
31
+ * @internal
32
+ */
33
+ export declare const StreamedPrefetchContext: import("react").Context<StreamedPrefetch | undefined>;
34
+ /**
35
+ * The snapshot a streamed consent surface was server-rendered from, which
36
+ * its hydration must read in place of the kernel's own server snapshot.
37
+ * `null` everywhere else.
38
+ *
39
+ * @internal
40
+ */
41
+ export declare const HydrationSnapshotContext: import("react").Context<ConsentSnapshot | null>;
@@ -0,0 +1,29 @@
1
+ import type { DevToolsDock } from '@c15t/ui/utils/devtools-launcher';
2
+ export { publishDevToolsLauncher } from '@c15t/ui/utils/devtools-launcher';
3
+ export type { DevToolsDock } from '@c15t/ui/utils/devtools-launcher';
4
+ /** Controls for the DevTools button a consent trigger renders. */
5
+ export interface DevToolsLauncherControls {
6
+ /** Whether the DevTools panel is open. */
7
+ isOpen: boolean;
8
+ /** Open or close the panel. */
9
+ toggle: () => void;
10
+ /** Anchor the panel to the trigger, or release it with `null`. */
11
+ dock: (dock: DevToolsDock | null) => void;
12
+ }
13
+ /**
14
+ * Whether a `<ConsentDevTools>` is mounted for the nearest provider.
15
+ * @returns `true` while DevTools can hand its launcher to a trigger.
16
+ * @internal
17
+ */
18
+ export declare const useDevToolsLauncherAvailable: () => boolean;
19
+ /**
20
+ * Claim the DevTools launcher for this trigger.
21
+ *
22
+ * Only one trigger renders the launcher at a time; others get `null` until
23
+ * the owner unmounts. Releasing the claim, or DevTools unmounting, brings
24
+ * the floating launcher back.
25
+ *
26
+ * @returns Launcher controls while this trigger owns the launcher.
27
+ * @internal
28
+ */
29
+ export declare const useDevToolsLauncher: () => DevToolsLauncherControls | null;
@@ -15,7 +15,7 @@ export type DevToolsProps = ConsentDevToolsProps;
15
15
  * @param props - Presentation options passed to the DevTools engine.
16
16
  * @returns `null`; the engine mounts its interface into `document.body`.
17
17
  */
18
- export declare const ConsentDevTools: ({ disabled, clearRecords, getPresentation, defaultOpen, defaultTab, getConsentCategories, maxEvents, position, }: ConsentDevToolsProps) => null;
18
+ export declare const ConsentDevTools: ({ disabled, clearRecords, getPresentation, defaultOpen, defaultTab, getConsentCategories, maxEvents, position, shadow, }: ConsentDevToolsProps) => null;
19
19
  /** Compatible short name for {@link ConsentDevTools}. */
20
20
  export declare const DevTools: typeof ConsentDevTools;
21
21
  /** Backward-compatible name for {@link ConsentDevTools}. */
@@ -24,13 +24,24 @@ export declare const C15TDevTools: typeof ConsentDevTools;
24
24
  export interface C15tTanStackDevtoolsPanelProps extends HTMLAttributes<HTMLDivElement>, Pick<DevToolsOptions, 'defaultTab' | 'maxEvents' | 'getConsentCategories' | 'getPresentation' | 'clearRecords'> {
25
25
  /** Prevents the embedded DevTools engine from mounting. @default false */
26
26
  disabled?: boolean;
27
+ /**
28
+ * Color scheme of the surrounding devtools shell. Omit to follow the
29
+ * operating system. {@link c15tDevtools} passes TanStack's theme.
30
+ */
31
+ theme?: TanStackDevtoolsTheme;
32
+ }
33
+ /** Color scheme TanStack Devtools passes to plugin panels. */
34
+ export type TanStackDevtoolsTheme = 'light' | 'dark';
35
+ /** Props React TanStack Devtools passes to a plugin's render function. */
36
+ export interface TanStackDevtoolsPluginProps {
37
+ theme?: TanStackDevtoolsTheme;
27
38
  }
28
39
  /** Plugin configuration accepted by React TanStack Devtools. */
29
40
  export interface TanStackDevtoolsPlugin {
30
41
  id?: string;
31
42
  name: string;
32
43
  defaultOpen?: boolean;
33
- render: ReactElement;
44
+ render: (element: HTMLElement, props?: TanStackDevtoolsPluginProps | TanStackDevtoolsTheme) => ReactElement;
34
45
  }
35
46
  /** Options for {@link c15tDevtools}. */
36
47
  export interface C15tDevtoolsPluginOptions extends C15tTanStackDevtoolsPanelProps {
@@ -0,0 +1,31 @@
1
+ import type { ConsentKernel, SaveInput, SaveResult, SaveUISource } from '@c15t/core';
2
+ import type { PreferenceDraft } from '@c15t/core/preference-draft';
3
+ /**
4
+ * The draft a `ConsentDraftProvider` shares. Here, apart from the draft
5
+ * module, so the banner's buttons can read it without loading the draft:
6
+ * the draft only runs once a preference surface renders.
7
+ */
8
+ export declare const DraftContext: import("react").Context<PreferenceDraft | null>;
9
+ export declare const REFUSED: SaveResult;
10
+ /** The kernel in context; throws outside a provider. */
11
+ export declare const useDraftKernel: () => ConsentKernel;
12
+ /**
13
+ * Whether `owner` is still the kernel this component last committed.
14
+ *
15
+ * A handle or save action kept across a runtime switch, by an async submit
16
+ * or a descendant's layout effect in the switch commit, calls through this,
17
+ * so it records nothing into the previous runtime. The committed kernel is
18
+ * read at call time (see `useCommittedRef`). A component that only unmounts
19
+ * keeps its last kernel, so a submit that outlives its dialog still saves.
20
+ */
21
+ export declare const useKernelGuard: (owner: ConsentKernel) => () => boolean;
22
+ /**
23
+ * Internal UI save path shared by stock controls and headless actions.
24
+ *
25
+ * Inside a `ConsentDraftProvider` an omitted input saves the shared draft.
26
+ * Bulk and explicit inputs go straight to the kernel; a bulk one also
27
+ * discards the draft's staged edits.
28
+ *
29
+ * @internal
30
+ */
31
+ export declare const useConsentSaveAction: () => (input?: SaveInput, uiSource?: SaveUISource) => Promise<SaveResult>;
@@ -1,31 +1,103 @@
1
- import type { AllConsentNames, ConsentState, SaveResult, SaveInput } from '@c15t/core';
1
+ import type { AllConsentNames, ConsentState, SaveResult } from '@c15t/core';
2
+ import type { PreferenceDraft, PreferenceDraftState } from '@c15t/core/preference-draft';
2
3
  import type { ReactNode } from 'react';
3
4
  /** A local, unmasked selection, committed only by an explicit save. */
4
5
  export interface ConsentDraftHandle {
5
6
  values: Readonly<ConsentState>;
6
7
  displayedCategories: readonly AllConsentNames[];
8
+ /**
9
+ * Granted flag per declared vendor. Seeded from the denials the gate
10
+ * honors, so a vendor declared `disabled` reads `true` whatever an older
11
+ * record says; every vendor not denied is `true`. Empty under an `iab`
12
+ * policy.
13
+ */
14
+ vendors: Readonly<Record<string, boolean>>;
7
15
  isDirty: boolean;
8
- /** A material policy change requires reset and review before saving. */
16
+ /** A policy or displayed-category change requires reset and review before saving. */
9
17
  isStale: boolean;
10
18
  set: (category: AllConsentNames, value: boolean) => void;
11
19
  update: (patch: Partial<ConsentState>) => void;
20
+ /**
21
+ * Stage one vendor's grant. Recorded by the next save. Ignored for a
22
+ * vendor that is not declared or is declared `disabled`, since the kernel
23
+ * would drop the grant on save.
24
+ */
25
+ setVendor: (vendorId: string, granted: boolean) => void;
12
26
  acceptAll: () => void;
13
27
  rejectAll: () => void;
14
28
  save: () => Promise<SaveResult>;
15
29
  reset: () => void;
16
30
  }
31
+ type DraftStore = PreferenceDraft;
17
32
  export interface ConsentDraftProviderProps {
18
33
  children: ReactNode;
19
34
  /** Defaults apply only to categories without an explicit receipt. */
20
35
  initial?: Partial<ConsentState>;
21
36
  }
37
+ /**
38
+ * Share one draft with every draft hook and stock control below it. The
39
+ * preference dialog renders one, so its switches, vendor rows and save
40
+ * button stage into and confirm the same draft.
41
+ */
22
42
  export declare const ConsentDraftProvider: ({ children, initial, }: ConsentDraftProviderProps) => import("react").JSX.Element;
23
- /** Internal UI save path shared by stock controls and headless actions. */
24
- export declare const useConsentSaveAction: () => (input?: SaveInput) => Promise<SaveResult>;
25
- /** Keep the compatibility manager selection and its save on the same draft. */
26
- export declare const useConsentManagerDraft: () => {
27
- draft: ConsentDraftHandle;
28
- save: (input?: SaveInput) => Promise<SaveResult>;
29
- };
43
+ /**
44
+ * The nearest consent draft, for the stock preference rows. Pair with
45
+ * {@link useConsentDraftSlice} so a row re-renders only when its own slice
46
+ * changes, not on every staged edit elsewhere in the draft.
47
+ *
48
+ * @returns The shared draft, or a local one outside a provider.
49
+ * @internal
50
+ */
51
+ export declare const useConsentDraftStore: () => DraftStore;
52
+ /**
53
+ * Subscribes to one slice of a consent draft.
54
+ *
55
+ * @param draft - Draft from {@link useConsentDraftStore}.
56
+ * @param selector - Picks the slice. Return a primitive or a reference the
57
+ * draft already holds.
58
+ * @returns The selected slice.
59
+ * @internal
60
+ */
61
+ export declare const useConsentDraftSlice: <SliceType>(draft: DraftStore, selector: (state: PreferenceDraftState) => SliceType) => SliceType;
30
62
  /** Read and edit displayed choices without replacing masked effective permissions. */
31
63
  export declare const useConsentDraft: () => ConsentDraftHandle;
64
+ /** The vendor slice of the consent draft, for a custom vendor control. */
65
+ export interface VendorDraftHandle {
66
+ /** Granted flag per declared vendor. See {@link ConsentDraftHandle.vendors}. */
67
+ vendors: Readonly<Record<string, boolean>>;
68
+ /** Stage one vendor's grant for the next save. See {@link ConsentDraftHandle.setVendor}. */
69
+ setVendor: (vendorId: string, granted: boolean) => void;
70
+ /** Whether any draft value, category or vendor, differs from the record. */
71
+ isDirty: boolean;
72
+ /**
73
+ * Whether the policy or the vendor surface changed under an unsaved edit.
74
+ * `save` refuses a stale draft. See {@link ConsentDraftHandle.isStale}.
75
+ */
76
+ isStale: boolean;
77
+ /** Confirm the draft, categories and vendors together. */
78
+ save: () => Promise<SaveResult>;
79
+ /** Discard staged edits and reseed from the record. See {@link ConsentDraftHandle.reset}. */
80
+ reset: () => void;
81
+ }
82
+ /**
83
+ * Read and stage vendor grants on the same draft the category switches use.
84
+ * A custom vendor toggle needs only this; the categories stay where the
85
+ * stock widget or `useConsentDraft()` left them, and one save confirms both.
86
+ * When the policy or the vendor list changes under a staged edit the draft
87
+ * turns stale and `save` refuses it; `reset` reseeds it from the record.
88
+ *
89
+ * @returns The draft's vendor map, the setter, the dirty and stale flags,
90
+ * the save and the reset.
91
+ * @example
92
+ * ```tsx
93
+ * const { vendors, setVendor, isStale, reset, save } = useVendorDraft();
94
+ * <Switch
95
+ * checked={vendors['meta-pixel'] ?? true}
96
+ * onCheckedChange={(on) => setVendor('meta-pixel', on)}
97
+ * />;
98
+ * {isStale && <button onClick={reset}>Review again</button>}
99
+ * ```
100
+ * @public
101
+ */
102
+ export declare const useVendorDraft: () => VendorDraftHandle;
103
+ export {};
@@ -0,0 +1,27 @@
1
+ import type { RuntimeGPPOptions } from '@c15t/core/runtime';
2
+ /** Props for {@link ConsentGPP}: the GPP options, all optional. */
3
+ export type ConsentGPPProps = RuntimeGPPOptions;
4
+ /**
5
+ * Installs `window.__gpp`, the IAB GPP CMP API, on the surrounding
6
+ * provider's kernel and keeps its GPP string in step with the visitor's
7
+ * choices. Renders nothing. Unmounting removes `__gpp`.
8
+ *
9
+ * Render it inside `ConsentProvider` (or `ConsentRoot` in Next.js and
10
+ * TanStack Start). Every prop is plain data, so a Server Component can
11
+ * render it.
12
+ *
13
+ * @param props - GPP options. See `RuntimeGPPOptions`.
14
+ * @returns `null`.
15
+ * @throws {Error} When rendered outside a consent provider.
16
+ *
17
+ * @example
18
+ * ```tsx
19
+ * import { ConsentGPP } from '@c15t/react/gpp';
20
+ *
21
+ * <ConsentProvider options={{ mode: hosted({ backendURL }) }}>
22
+ * <ConsentGPP usFallback="none" />
23
+ * <App />
24
+ * </ConsentProvider>
25
+ * ```
26
+ */
27
+ export declare const ConsentGPP: ({ cmpId, mspaMode, optOutCategories, tcf, usApproach, usFallback, }: ConsentGPPProps) => null;
@@ -5,10 +5,9 @@
5
5
  * Pair with `ConsentProvider` from `@c15t/react` (or `@c15t/react/provider`).
6
6
  */
7
7
  export { defaultTranslationConfig, detectBrowserLanguage, mergeTranslationConfigs, prepareTranslationConfig, } from '@c15t/core';
8
- export { type ConsentDialogTriggerVisibility, type UseConsentDialogTriggerOptions, type UseConsentDialogTriggerResult, useConsentDialogTrigger, } from './component-hooks/use-panel-trigger';
9
- export { useConsentManager } from './component-hooks/use-manager';
10
- export { type HeadlessConsentBannerAction, type HeadlessConsentBannerState, type HeadlessConsentDialogAction, type HeadlessConsentDialogState, type HeadlessConsentSurface, type HeadlessConsentSurfaceAction, type HeadlessConsentSurfaceState, type HeadlessConsentWriteAction, useHeadlessConsentUI, } from './component-hooks/use-headless-consent-ui';
11
- export { useTranslations } from './component-hooks/use-translations';
12
- export { useColorScheme } from './hooks/use-color-scheme';
13
- export { useFocusTrap } from './hooks/use-focus-trap';
14
- export type { ReactUIOptions } from './types/manager';
8
+ export { type ConsentDialogTriggerVisibility, type UseConsentDialogTriggerOptions, type UseConsentDialogTriggerResult, useConsentDialogTrigger, } from './component-hooks/use-panel-trigger.js';
9
+ export { type HeadlessConsentBannerAction, type HeadlessConsentBannerState, type HeadlessConsentDialogAction, type HeadlessConsentDialogState, type HeadlessConsentSurface, type HeadlessConsentSurfaceAction, type HeadlessConsentSurfaceState, type HeadlessConsentWriteAction, useHeadlessConsentUI, } from './component-hooks/use-headless-consent-ui.js';
10
+ export { useTranslations } from './component-hooks/use-translations.js';
11
+ export { useColorScheme } from './hooks/use-color-scheme.js';
12
+ export { useFocusTrap } from './hooks/use-focus-trap.js';
13
+ export type { ReactUIOptions } from './types/manager.js';
@@ -0,0 +1,24 @@
1
+ /**
2
+ * A ref that holds `value` from the render React most recently committed.
3
+ *
4
+ * Consent guards use it to answer "is this still the kernel, draft or IAB
5
+ * selection this component renders?" when a kept callback runs, including
6
+ * from a descendant's layout effect in the very commit that switched
7
+ * runtimes.
8
+ *
9
+ * Why an insertion effect: React runs insertion effects while it applies a
10
+ * commit, before any layout effect of that commit, and never for a render it
11
+ * discards. Assigning the ref during render would publish values from
12
+ * renders React throws away (an interrupted concurrent render, StrictMode's
13
+ * second render). A layout effect is too late, because descendants' layout
14
+ * effects run before their ancestors'. A passive effect is later still.
15
+ * Assigning the committed value is idempotent, so StrictMode's replayed
16
+ * effects cannot leave a stale value behind.
17
+ *
18
+ * @param value - The value this render uses.
19
+ * @returns A ref whose `current` is the last committed `value`.
20
+ * @internal
21
+ */
22
+ export declare const useCommittedRef: <Value>(value: Value) => {
23
+ readonly current: Value;
24
+ };
@@ -1,3 +1,4 @@
1
+ import type { FocusTrapOptions } from '@c15t/ui/utils/dom';
1
2
  import type { RefObject } from 'react';
2
3
  /**
3
4
  * Hook that manages focus trapping within a container.
@@ -8,7 +9,8 @@ import type { RefObject } from 'react';
8
9
  *
9
10
  * @param shouldTrap - Boolean indicating whether focus should be trapped
10
11
  * @param containerRef - Reference to the container element
12
+ * @param options - Where the trap puts focus when it starts
11
13
  *
12
14
  * @public
13
15
  */
14
- export declare const useFocusTrap: (shouldTrap: boolean, containerRef: RefObject<HTMLElement | null> | null) => void;
16
+ export declare const useFocusTrap: (shouldTrap: boolean, containerRef: RefObject<HTMLElement | null> | null, options?: FocusTrapOptions) => void;
@@ -1,5 +1,5 @@
1
1
  import type { HeadlessIABBannerAction, HeadlessIABDialogAction, HeadlessIABPreferenceTab } from '@c15t/iab/headless';
2
- import { useIABConsentManager } from './use-iab-manager';
2
+ import { useIABConsentManager } from './use-iab-manager.js';
3
3
  export type { HeadlessIABBannerAction, HeadlessIABDialogAction, HeadlessIABPreferenceTab, };
4
4
  export interface HeadlessIABBannerState {
5
5
  isVisible: boolean;
@@ -1,7 +1,7 @@
1
1
  import type { ActiveUI, ConsentPresentation, TranslationConfig } from '@c15t/core';
2
2
  export declare const useIABConsentManager: (overrides?: ConsentPresentation) => {
3
3
  activeUI: ActiveUI;
4
- iab: import("../iab-context").ReactIABState | null;
4
+ iab: import("../iab-context.js").ReactIABState | null;
5
5
  model: import("@c15t/core").KernelModel | null;
6
6
  policyBanner: {
7
7
  allowedActions: import("@c15t/core").PresentationAction[];
@@ -11,8 +11,8 @@ export declare const useIABConsentManager: (overrides?: ConsentPresentation) =>
11
11
  actionGroups: import("@c15t/core").PresentationAction[][];
12
12
  primaryActions: import("@c15t/core").PresentationAction[];
13
13
  diagnostics: import("@c15t/core").PresentationDiagnostic[];
14
- rights: readonly import("@c15t/schema/types").PolicyRight[];
15
- preferenceControls: Exclude<import("@c15t/schema/types").PolicyRight, 'disclosure'>[];
14
+ rights: readonly import("@c15t/schema").PolicyRight[];
15
+ preferenceControls: Exclude<import("@c15t/schema").PolicyRight, 'disclosure'>[];
16
16
  direction: 'row' | 'column';
17
17
  uiProfile: 'balanced' | 'compact' | 'strict';
18
18
  scrollLock: boolean;
@@ -32,8 +32,8 @@ export declare const useIABConsentManager: (overrides?: ConsentPresentation) =>
32
32
  actionGroups: import("@c15t/core").PresentationAction[][];
33
33
  primaryActions: import("@c15t/core").PresentationAction[];
34
34
  diagnostics: import("@c15t/core").PresentationDiagnostic[];
35
- rights: readonly import("@c15t/schema/types").PolicyRight[];
36
- preferenceControls: Exclude<import("@c15t/schema/types").PolicyRight, 'disclosure'>[];
35
+ rights: readonly import("@c15t/schema").PolicyRight[];
36
+ preferenceControls: Exclude<import("@c15t/schema").PolicyRight, 'disclosure'>[];
37
37
  direction: 'row' | 'column';
38
38
  uiProfile: 'balanced' | 'compact' | 'strict';
39
39
  scrollLock: boolean;
@@ -0,0 +1,35 @@
1
+ import { IABUnavailableError } from '@c15t/core';
2
+ /**
3
+ * Record that `IABProvider` is part of the app. `@c15t/react/iab` calls
4
+ * this when it loads.
5
+ *
6
+ * @internal
7
+ */
8
+ export declare const markIABProviderLoaded: () => void;
9
+ /**
10
+ * The error the standard surfaces throw for an `iab` policy without
11
+ * `<IABProvider>`.
12
+ *
13
+ * @returns A fresh {@link IABUnavailableError}.
14
+ * @internal
15
+ */
16
+ export declare const missingIABProviderError: () => IABUnavailableError;
17
+ /**
18
+ * Throw while rendering when the visitor's policy needs a CMP and the app
19
+ * has none.
20
+ *
21
+ * The standard banner and dialog do not answer for the IAB model, so
22
+ * without `<IABProvider>` a visitor under an `iab` policy would see no
23
+ * consent UI at all. Throwing during render reaches error boundaries and
24
+ * framework error overlays, on the server render and in the browser alike,
25
+ * since both read the same snapshot.
26
+ *
27
+ * `<IABProvider>` usually sits beside the standard surfaces rather than
28
+ * around them, so a missing IAB context alone does not prove the app has
29
+ * none. The check also passes once `@c15t/react/iab` has loaded.
30
+ *
31
+ * @throws {IABUnavailableError} When the policy needs IAB and neither an
32
+ * IAB context nor `@c15t/react/iab` is present.
33
+ * @internal
34
+ */
35
+ export declare const useIABPolicyGuard: () => void;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Whether a banner that shows now arrives after the page has painted.
3
+ *
4
+ * Decided once each time `shown` turns on, and held while it stays on, so a
5
+ * re-render never restarts the entry. A banner hydrated from server HTML is
6
+ * part of the first paint: the hook answers `false` while hydrating, which
7
+ * also keeps the markup matching the server's.
8
+ *
9
+ * @param shown - Whether the banner is rendered.
10
+ * @returns Whether to mark the mount `data-entry="late"`.
11
+ *
12
+ * @internal
13
+ */
14
+ export declare const useLateEntry: (shown: boolean) => boolean;
@@ -1,2 +1,2 @@
1
- import type { ThemeContextValue } from '../context/theme-context';
1
+ import type { ThemeContextValue } from '../context/theme-context.js';
2
2
  export declare const useTheme: () => ThemeContextValue;