@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
@@ -2,18 +2,22 @@
2
2
  title: YouTube
3
3
  description: Gate YouTube embeds with c15t v3 in Next.js, TanStack Start, React,
4
4
  Nuxt, Vue, Astro, Svelte, SvelteKit or JavaScript.
5
+ icon: youtube
5
6
  group: integrations
6
7
  ---
7
8
 
8
9
  ## Configure the video
9
10
 
10
11
  Use the ID of an embeddable video and the category matching its purpose in your
11
- policy. The current v3 adapters use consent-gated iframes rather than the v2
12
+ policy. This page uses `marketing` because the YouTube player can set
13
+ advertising identifiers. The framework quickstarts gate their demo video on
14
+ `measurement` instead; either works if your policy says so. The current v3 adapters use consent-gated iframes rather than the v2
12
15
  `YouTubeEmbed` convenience component.
13
16
 
14
17
  ```ts title="src/embed-config.ts"
15
18
  export const embedCategory = 'marketing' as const;
16
- export const embedURL = 'https://www.youtube-nocookie.com/embed/VIDEO_ID?playsinline=1';
19
+ export const embedURL =
20
+ 'https://www.youtube-nocookie.com/embed/VIDEO_ID?playsinline=1';
17
21
  export const embedTitle = 'Product walkthrough';
18
22
  export const embedAspectRatio = '16 / 9';
19
23
  ```
@@ -23,7 +27,7 @@ Replace `VIDEO_ID` before running the example.
23
27
  ## Add the embed to your framework
24
28
 
25
29
  Create `src/embed-config.ts` using the configuration on this page, then select
26
- your framework. Keep the existing [consent setup](https://c15t.com/docs/frameworks), its policy
30
+ your framework. Keep the existing [consent setup](https://v3.c15t.com/docs/frameworks), its policy
27
31
  and preferences UI. These examples do not create a second consent provider.
28
32
 
29
33
  **Next.js**
@@ -33,12 +37,12 @@ Render this component inside your existing consent boundary or provider.
33
37
  ```tsx title="src/consent-embed.tsx"
34
38
  'use client';
35
39
 
36
- import { Frame } from 'c15t/next';
40
+ import { ConsentGate } from 'c15t/next';
37
41
  import { embedCategory, embedURL, embedTitle, embedAspectRatio } from './embed-config';
38
42
 
39
43
  export function ConsentEmbed() {
40
44
  return (
41
- <Frame category={embedCategory}>
45
+ <ConsentGate category={embedCategory}>
42
46
  <iframe
43
47
  src={embedURL}
44
48
  title={embedTitle}
@@ -46,12 +50,12 @@ export function ConsentEmbed() {
46
50
  allowFullScreen
47
51
  style={{ width: '100%', aspectRatio: embedAspectRatio, minHeight: 200, border: 0 }}
48
52
  />
49
- </Frame>
53
+ </ConsentGate>
50
54
  );
51
55
  }
52
56
  ```
53
57
 
54
- `Frame` keeps the iframe absent while permission is denied and removes it
58
+ `ConsentGate` keeps the iframe absent while permission is denied and removes it
55
59
  on revocation. Keep your existing consent styles and preferences dialog.
56
60
 
57
61
  **TanStack Start**
@@ -59,12 +63,12 @@ on revocation. Keep your existing consent styles and preferences dialog.
59
63
  Render this component inside your existing consent boundary or provider.
60
64
 
61
65
  ```tsx title="src/consent-embed.tsx"
62
- import { Frame } from 'c15t/tanstack-start';
66
+ import { ConsentGate } from 'c15t/tanstack-start';
63
67
  import { embedCategory, embedURL, embedTitle, embedAspectRatio } from './embed-config';
64
68
 
65
69
  export function ConsentEmbed() {
66
70
  return (
67
- <Frame category={embedCategory}>
71
+ <ConsentGate category={embedCategory}>
68
72
  <iframe
69
73
  src={embedURL}
70
74
  title={embedTitle}
@@ -72,12 +76,12 @@ export function ConsentEmbed() {
72
76
  allowFullScreen
73
77
  style={{ width: '100%', aspectRatio: embedAspectRatio, minHeight: 200, border: 0 }}
74
78
  />
75
- </Frame>
79
+ </ConsentGate>
76
80
  );
77
81
  }
78
82
  ```
79
83
 
80
- `Frame` keeps the iframe absent while permission is denied and removes it
84
+ `ConsentGate` keeps the iframe absent while permission is denied and removes it
81
85
  on revocation. Keep your existing consent styles and preferences dialog.
82
86
 
83
87
  **React**
@@ -85,12 +89,12 @@ on revocation. Keep your existing consent styles and preferences dialog.
85
89
  Render this component inside your existing consent boundary or provider.
86
90
 
87
91
  ```tsx title="src/consent-embed.tsx"
88
- import { Frame } from 'c15t/react';
92
+ import { ConsentGate } from 'c15t/react';
89
93
  import { embedCategory, embedURL, embedTitle, embedAspectRatio } from './embed-config';
90
94
 
91
95
  export function ConsentEmbed() {
92
96
  return (
93
- <Frame category={embedCategory}>
97
+ <ConsentGate category={embedCategory}>
94
98
  <iframe
95
99
  src={embedURL}
96
100
  title={embedTitle}
@@ -98,74 +102,75 @@ export function ConsentEmbed() {
98
102
  allowFullScreen
99
103
  style={{ width: '100%', aspectRatio: embedAspectRatio, minHeight: 200, border: 0 }}
100
104
  />
101
- </Frame>
105
+ </ConsentGate>
102
106
  );
103
107
  }
104
108
  ```
105
109
 
106
- `Frame` keeps the iframe absent while permission is denied and removes it
110
+ `ConsentGate` keeps the iframe absent while permission is denied and removes it
107
111
  on revocation. Keep your existing consent styles and preferences dialog.
108
112
 
109
113
  **Nuxt**
110
114
 
111
- Use the reactive snapshot from the existing consent runtime. The Nuxt module auto-imports the consent composables.
115
+ The Nuxt module registers `ConsentGate` and `ConsentDialogLink`, so
116
+ this component imports only the embed configuration.
112
117
 
113
118
  ```vue title="app/components/ConsentEmbed.vue"
114
119
  <script setup lang="ts">
115
120
  import { embedCategory, embedURL, embedTitle, embedAspectRatio } from '../../src/embed-config';
116
-
117
- const snapshot = useConsentSnapshot();
118
- const activeUI = useConsentActiveUI();
119
121
  </script>
120
122
 
121
123
  <template>
122
- <iframe
123
- v-if="snapshot.effectivePermissions[embedCategory]"
124
- :src="embedURL"
125
- :title="embedTitle"
126
- loading="lazy"
127
- allowfullscreen
128
- :style="{ width: '100%', aspectRatio: embedAspectRatio, minHeight: '200px', border: 0 }"
129
- />
130
- <button v-else type="button" @click="activeUI = 'manager'">
131
- Open privacy settings to view this content
132
- </button>
124
+ <ConsentGate :category="embedCategory">
125
+ <iframe
126
+ :src="embedURL"
127
+ :title="embedTitle"
128
+ loading="lazy"
129
+ allowfullscreen
130
+ :style="{ width: '100%', aspectRatio: embedAspectRatio, minHeight: '200px', border: 0 }"
131
+ />
132
+ <template #placeholder>
133
+ <p>Allow {{ embedCategory }} to load this content.</p>
134
+ <ConsentDialogLink>Open privacy settings</ConsentDialogLink>
135
+ </template>
136
+ </ConsentGate>
133
137
  </template>
134
138
  ```
135
139
 
136
- Use `v-if` so a denied iframe is removed from the DOM. Hiding an existing
137
- iframe with `v-show` or CSS does not prevent its requests.
140
+ `ConsentGate` keeps the iframe out of the server HTML and the DOM while
141
+ permission is denied, and removes it on revocation. See
142
+ [Nuxt scripts and embeds](https://v3.c15t.com/docs/frameworks/nuxt/scripts).
138
143
 
139
144
  **Vue**
140
145
 
141
- Use the reactive snapshot from the existing consent runtime. The c15t Vue plugin must already be installed on this app.
146
+ Render this component inside the app that installed the c15t Vue plugin.
142
147
 
143
148
  ```vue title="src/ConsentEmbed.vue"
144
149
  <script setup lang="ts">
145
- import { useConsentSnapshot, useConsentActiveUI } from 'c15t/vue/vue-plugin';
150
+ import { ConsentDialogLink, ConsentGate } from 'c15t/vue/vue-plugin';
146
151
  import { embedCategory, embedURL, embedTitle, embedAspectRatio } from './embed-config';
147
-
148
- const snapshot = useConsentSnapshot();
149
- const activeUI = useConsentActiveUI();
150
152
  </script>
151
153
 
152
154
  <template>
153
- <iframe
154
- v-if="snapshot.effectivePermissions[embedCategory]"
155
- :src="embedURL"
156
- :title="embedTitle"
157
- loading="lazy"
158
- allowfullscreen
159
- :style="{ width: '100%', aspectRatio: embedAspectRatio, minHeight: '200px', border: 0 }"
160
- />
161
- <button v-else type="button" @click="activeUI = 'manager'">
162
- Open privacy settings to view this content
163
- </button>
155
+ <ConsentGate :category="embedCategory">
156
+ <iframe
157
+ :src="embedURL"
158
+ :title="embedTitle"
159
+ loading="lazy"
160
+ allowfullscreen
161
+ :style="{ width: '100%', aspectRatio: embedAspectRatio, minHeight: '200px', border: 0 }"
162
+ />
163
+ <template #placeholder>
164
+ <p>Allow {{ embedCategory }} to load this content.</p>
165
+ <ConsentDialogLink>Open privacy settings</ConsentDialogLink>
166
+ </template>
167
+ </ConsentGate>
164
168
  </template>
165
169
  ```
166
170
 
167
- Use `v-if` so a denied iframe is removed from the DOM. Hiding an existing
168
- iframe with `v-show` or CSS does not prevent its requests.
171
+ `ConsentGate` keeps the iframe out of the DOM while permission is denied,
172
+ and removes it on revocation. See
173
+ [Vue scripts and embeds](https://v3.c15t.com/docs/frameworks/vue/scripts).
169
174
 
170
175
  **Astro**
171
176
 
@@ -176,7 +181,7 @@ Add this component to pages using your consent-enabled base layout:
176
181
  <c15t-consent-embed style="display: block"></c15t-consent-embed>
177
182
 
178
183
  <script>
179
- import { getConsentClient } from '@c15t/astro/client';
184
+ import { getConsentClient } from 'c15t/astro/client';
180
185
  import { mountConsentEmbed } from '../consent-embed';
181
186
 
182
187
  class ConsentEmbed extends HTMLElement {
@@ -218,16 +223,16 @@ runtime for this embed.
218
223
 
219
224
  **Svelte**
220
225
 
221
- Render this component inside the existing `ConsentManagerProvider`.
226
+ Render this component inside the existing `ConsentProvider`.
222
227
  The provider from your quickstart supplies its consent state.
223
228
 
224
229
  ```svelte title="src/ConsentEmbed.svelte"
225
230
  <script lang="ts">
226
- import { Frame } from '@c15t/svelte';
231
+ import { ConsentGate } from '@c15t/svelte';
227
232
  import { embedCategory, embedURL, embedTitle, embedAspectRatio } from './embed-config';
228
233
  </script>
229
234
 
230
- <Frame category={embedCategory}>
235
+ <ConsentGate category={embedCategory}>
231
236
  <iframe
232
237
  src={embedURL}
233
238
  title={embedTitle}
@@ -238,25 +243,25 @@ The provider from your quickstart supplies its consent state.
238
243
  style:min-height="200px"
239
244
  style:border="0"
240
245
  ></iframe>
241
- </Frame>
246
+ </ConsentGate>
242
247
  ```
243
248
 
244
- The Svelte `Frame` waits until the browser is mounted and the category is
249
+ The Svelte `ConsentGate` waits until the browser is mounted and the category is
245
250
  allowed. Its default placeholder opens preferences. Revocation removes the
246
251
  iframe.
247
252
 
248
253
  **SvelteKit**
249
254
 
250
- Render this component inside the existing `ConsentManagerProvider`.
251
- Keep the SvelteKit root provider and its server prefetch unchanged.
255
+ Render this component inside the existing `ConsentRoot`.
256
+ Keep the SvelteKit root and its server-resolved state unchanged.
252
257
 
253
258
  ```svelte title="src/lib/ConsentEmbed.svelte"
254
259
  <script lang="ts">
255
- import { Frame } from '@c15t/svelte';
260
+ import { ConsentGate } from '@c15t/svelte';
256
261
  import { embedCategory, embedURL, embedTitle, embedAspectRatio } from '../embed-config';
257
262
  </script>
258
263
 
259
- <Frame category={embedCategory}>
264
+ <ConsentGate category={embedCategory}>
260
265
  <iframe
261
266
  src={embedURL}
262
267
  title={embedTitle}
@@ -267,23 +272,44 @@ Keep the SvelteKit root provider and its server prefetch unchanged.
267
272
  style:min-height="200px"
268
273
  style:border="0"
269
274
  ></iframe>
270
- </Frame>
275
+ </ConsentGate>
271
276
  ```
272
277
 
273
- The Svelte `Frame` waits until the browser is mounted and the category is
278
+ The Svelte `ConsentGate` waits until the browser is mounted and the category is
274
279
  allowed. Its default placeholder opens preferences. Revocation removes the
275
280
  iframe.
276
281
 
282
+ **HTML**
283
+
284
+ The c15t script tag gates iframes that name a category. Put the embed's URL
285
+ in `data-src` instead of `src`, using the values from the configuration on
286
+ this page:
287
+
288
+ ```html
289
+ <iframe
290
+ data-src="https://www.youtube-nocookie.com/embed/VIDEO_ID?playsinline=1"
291
+ data-category="measurement"
292
+ title="Product video"
293
+ loading="lazy"
294
+ allowfullscreen
295
+ ></iframe>
296
+ ```
297
+
298
+ c15t sets `src` once the category is allowed and removes it on revocation.
299
+ Without `src` the iframe loads nothing, so hide it with CSS and show a link
300
+ to `#c15t-preferences` in its place. See
301
+ [HTML embeds](https://v3.c15t.com/docs/frameworks/html/embeds).
302
+
277
303
  **JavaScript**
278
304
 
279
- Use the shared browser helper below with your existing kernel. Put an
305
+ Use the shared browser helper below with your existing client. Put an
280
306
  empty container where the embed should appear:
281
307
 
282
308
  ```html
283
309
  <div id="consent-embed"></div>
284
310
  ```
285
311
 
286
- In your browser entry point, after creating the kernel:
312
+ In your browser entry point, after `init()`:
287
313
 
288
314
  ```ts
289
315
  import { mountConsentEmbed } from './consent-embed';
@@ -291,13 +317,16 @@ import { mountConsentEmbed } from './consent-embed';
291
317
  const container = document.querySelector<HTMLElement>('#consent-embed');
292
318
  if (!container) throw new Error('Missing consent embed container');
293
319
 
294
- const disposeEmbed = mountConsentEmbed(container, kernel, openPreferences);
320
+ const disposeEmbed = mountConsentEmbed(container, consent.kernel, () =>
321
+ consent.openDialog(),
322
+ );
295
323
  ```
296
324
 
297
- `kernel` is the instance from your quickstart. `openPreferences` is your
298
- application's function for showing its consent preferences UI. Call
299
- `disposeEmbed()` when the page or component is destroyed. The helper observes
300
- both the current snapshot and later changes.
325
+ `consent` is the client from `init()` in your quickstart. With
326
+ `createConsentRuntime`, pass `runtime.kernel` and your own function that
327
+ opens preferences. Call `disposeEmbed()` when the page or component is
328
+ destroyed. Iframe markup with `data-src` and `data-category` also works
329
+ without the helper, because both setups gate iframes by default.
301
330
 
302
331
  ## Browser helper for Astro and JavaScript
303
332
 
@@ -306,51 +335,56 @@ when permission allows it, keeps an existing player mounted across unrelated
306
335
  snapshot updates, and removes it on revocation.
307
336
 
308
337
  ```ts title="src/consent-embed.ts"
309
- import { embedCategory, embedURL, embedTitle, embedAspectRatio } from './embed-config';
338
+ import {
339
+ embedCategory,
340
+ embedURL,
341
+ embedTitle,
342
+ embedAspectRatio,
343
+ } from './embed-config';
310
344
 
311
345
  type EmbedKernel = {
312
- getSnapshot: () => {
313
- effectivePermissions: Record<typeof embedCategory, boolean>;
314
- };
315
- subscribe: (listener: () => void) => () => void;
346
+ getSnapshot: () => {
347
+ effectivePermissions: Record<typeof embedCategory, boolean>;
348
+ };
349
+ subscribe: (listener: () => void) => () => void;
316
350
  };
317
351
 
318
352
  export function mountConsentEmbed(
319
- container: HTMLElement,
320
- kernel: EmbedKernel,
321
- openPreferences: () => void,
353
+ container: HTMLElement,
354
+ kernel: EmbedKernel,
355
+ openPreferences: () => void
322
356
  ) {
323
- const render = () => {
324
- if (kernel.getSnapshot().effectivePermissions[embedCategory]) {
325
- if (container.querySelector('iframe')) return;
326
- const frame = document.createElement('iframe');
327
- frame.src = embedURL;
328
- frame.title = embedTitle;
329
- frame.loading = 'lazy';
330
- frame.allowFullscreen = true;
331
- Object.assign(frame.style, {
332
- width: '100%',
333
- aspectRatio: embedAspectRatio,
334
- minHeight: '200px',
335
- border: '0',
336
- });
337
- container.replaceChildren(frame);
338
- } else {
339
- if (container.querySelector('button')) return;
340
- const button = document.createElement('button');
341
- button.type = 'button';
342
- button.textContent = 'Open privacy settings to view this content';
343
- button.onclick = openPreferences;
344
- container.replaceChildren(button);
345
- }
346
- };
347
-
348
- render();
349
- const unsubscribe = kernel.subscribe(render);
350
- return () => {
351
- unsubscribe();
352
- container.replaceChildren();
353
- };
357
+ const render = () => {
358
+ if (kernel.getSnapshot().effectivePermissions[embedCategory]) {
359
+ if (container.querySelector('iframe')) return;
360
+ const frame = document.createElement('iframe');
361
+ frame.src = embedURL;
362
+ frame.title = embedTitle;
363
+ frame.loading = 'lazy';
364
+ frame.allowFullscreen = true;
365
+ Object.assign(frame.style, {
366
+ width: '100%',
367
+ aspectRatio: embedAspectRatio,
368
+ minHeight: '200px',
369
+ border: '0',
370
+ });
371
+ container.replaceChildren(frame);
372
+ } else {
373
+ if (container.querySelector('button')) return;
374
+ const button = document.createElement('button');
375
+ button.type = 'button';
376
+ button.textContent = 'Open privacy settings to view this content';
377
+ button.onclick = openPreferences;
378
+ container.replaceChildren(button);
379
+ }
380
+ };
381
+
382
+ render();
383
+ const unsubscribe = kernel.subscribe(render);
384
+ return () => {
385
+ unsubscribe();
386
+ container.replaceChildren();
387
+ };
354
388
  }
355
389
  ```
356
390
 
@@ -380,14 +414,19 @@ Set playback options in the iframe URL. For example, append `start=36` to begin
380
414
  [YouTube player parameters](https://developers.google.com/youtube/player_parameters)
381
415
  and reserve at least a 200-by-200-pixel player area.
382
416
 
383
- React and Svelte `Frame` components provide a blocked-state placeholder and
384
- consent action. Their `placeholder` APIs differ: React takes a node, Svelte
385
- takes a snippet. Keep a clear way to reopen preferences when customizing them.
417
+ React and Svelte `ConsentGate` components provide a blocked-state placeholder and
418
+ consent action. Their `placeholder` APIs differ. React takes a node, and
419
+ Svelte takes a snippet. Keep a clear way to reopen preferences when customizing them.
386
420
  The Vue and browser examples show that action explicitly. `loading="lazy"` delays an
387
421
  allowed iframe for performance; it does not implement consent gating.
388
422
 
389
423
  ## Consent behavior
390
424
 
425
+ Add `data-vendor="youtube"` next to `data-category` and declare a `youtube`
426
+ vendor in the runtime's `vendors` option or the backend manifest to let visitors
427
+ turn YouTube off while keeping the rest of the category on. See
428
+ [vendor consent for your framework](./overview.md#vendor-switches-and-cookie-cleanup).
429
+
391
430
  Each example keeps the iframe absent until the category is allowed. After
392
431
  permission, the iframe can load. Revoking permission removes the iframe and its
393
432
  embedded document. Requests already sent cannot be recalled.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@c15t/react",
3
- "version": "3.0.0-alpha.0",
3
+ "version": "3.0.0-alpha.10",
4
4
  "description": "React cookie banner, consent manager, preference center, and headless CMP components with IAB TCF and Consent Mode support.",
5
5
  "keywords": [
6
6
  "ccpa",
@@ -46,6 +46,7 @@
46
46
  "dist",
47
47
  "dist-types",
48
48
  "AGENTS.md",
49
+ "SKILL.md",
49
50
  "docs",
50
51
  "styles.css",
51
52
  "styles.tw3.css",
@@ -66,6 +67,11 @@
66
67
  "import": "./dist/index.js",
67
68
  "default": "./dist/index.js"
68
69
  },
70
+ "./modes": {
71
+ "types": "./dist-types/modes.d.ts",
72
+ "import": "./dist/modes.js",
73
+ "default": "./dist/modes.js"
74
+ },
69
75
  "./provider": {
70
76
  "types": "./dist-types/provider.d.ts",
71
77
  "import": "./dist/provider.js",
@@ -81,6 +87,11 @@
81
87
  "import": "./dist/draft.js",
82
88
  "default": "./dist/draft.js"
83
89
  },
90
+ "./theme": {
91
+ "types": "./dist-types/index-parts/theme.d.ts",
92
+ "import": "./dist/index-parts/theme.js",
93
+ "default": "./dist/index-parts/theme.js"
94
+ },
84
95
  "./module-hooks": {
85
96
  "types": "./dist-types/module-hooks.d.ts",
86
97
  "import": "./dist/module-hooks.js",
@@ -131,20 +142,35 @@
131
142
  "import": "./dist/panel-trigger.js",
132
143
  "default": "./dist/panel-trigger.js"
133
144
  },
145
+ "./consent-gate": {
146
+ "types": "./dist-types/consent-gate.d.ts",
147
+ "import": "./dist/consent-gate.js",
148
+ "default": "./dist/consent-gate.js"
149
+ },
134
150
  "./frame": {
135
- "types": "./dist-types/frame.d.ts",
136
- "import": "./dist/frame.js",
137
- "default": "./dist/frame.js"
151
+ "types": "./dist-types/consent-gate.d.ts",
152
+ "import": "./dist/consent-gate.js",
153
+ "default": "./dist/consent-gate.js"
138
154
  },
139
155
  "./iab": {
140
156
  "types": "./dist-types/iab.d.ts",
141
157
  "import": "./dist/iab.js",
142
158
  "default": "./dist/iab.js"
143
159
  },
160
+ "./gpp": {
161
+ "types": "./dist-types/gpp.d.ts",
162
+ "import": "./dist/gpp.js",
163
+ "default": "./dist/gpp.js"
164
+ },
144
165
  "./styles.css": "./dist/styles.css",
145
166
  "./styles.tw3.css": "./dist/styles.tw3.css",
146
167
  "./iab/styles.css": "./dist/iab/styles.css",
147
168
  "./iab/styles.tw3.css": "./dist/iab/styles.tw3.css",
169
+ "./postcss-tailwind3": {
170
+ "types": "./dist-types/postcss-tailwind3.d.ts",
171
+ "import": "./dist/postcss-tailwind3.js",
172
+ "default": "./dist/postcss-tailwind3.js"
173
+ },
148
174
  "./primitives": {
149
175
  "types": "./dist-types/primitives.d.ts",
150
176
  "import": "./dist/primitives.js",
@@ -190,10 +216,15 @@
190
216
  "import": "./dist/components/preferences/index.js",
191
217
  "default": "./dist/components/preferences/index.js"
192
218
  },
219
+ "./components/consent-gate": {
220
+ "types": "./dist-types/components/consent-gate/index.d.ts",
221
+ "import": "./dist/components/consent-gate/index.js",
222
+ "default": "./dist/components/consent-gate/index.js"
223
+ },
193
224
  "./components/frame": {
194
- "types": "./dist-types/components/frame/index.d.ts",
195
- "import": "./dist/components/frame/index.js",
196
- "default": "./dist/components/frame/index.js"
225
+ "types": "./dist-types/components/consent-gate/index.d.ts",
226
+ "import": "./dist/components/consent-gate/index.js",
227
+ "default": "./dist/components/consent-gate/index.js"
197
228
  },
198
229
  "./context": {
199
230
  "types": "./dist-types/context/index.d.ts",
@@ -233,27 +264,27 @@
233
264
  "test:watch": "bun prebuild && vitest"
234
265
  },
235
266
  "dependencies": {
236
- "@c15t/core": "3.0.0-alpha.0",
237
- "@c15t/dev-tools": "3.0.0-alpha.0",
238
- "@c15t/iab": "3.0.0-alpha.0",
239
- "@c15t/schema": "3.0.0-alpha.0",
240
- "@c15t/translations": "3.0.0-alpha.0",
241
- "@c15t/ui": "3.0.0-alpha.0",
267
+ "@c15t/core": "3.0.0-alpha.10",
268
+ "@c15t/dev-tools": "3.0.0-alpha.10",
269
+ "@c15t/iab": "3.0.0-alpha.10",
270
+ "@c15t/schema": "3.0.0-alpha.8",
271
+ "@c15t/translations": "3.0.0-alpha.6",
272
+ "@c15t/ui": "3.0.0-alpha.10",
242
273
  "@types/google.maps": "3.65.3"
243
274
  },
244
275
  "devDependencies": {
245
- "@c15t/backend": "3.0.0-alpha.0",
276
+ "@c15t/backend": "3.0.0-alpha.10",
246
277
  "@c15t/conformance": "0.0.1",
247
278
  "@c15t/typescript-config": "0.0.1",
248
279
  "@c15t/vitest-config": "1.0.0",
249
- "@iabtechlabtcf/core": "^1.5.20",
280
+ "@iabtechlabtcf/core": "^1.5.22",
250
281
  "genversion": "3.2.0",
251
282
  "msw": "^2.14.6",
252
283
  "typescript": "7.0.2"
253
284
  },
254
285
  "peerDependencies": {
255
- "react": "^19.0.0 || ^19.0.0-rc || ^18.0.0 || ^17.0.0 || ^16.8.0",
256
- "react-dom": "^19.0.0 || ^19.0.0-rc || ^18.0.0 || ^17.0.0 || ^16.8.0"
286
+ "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc",
287
+ "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc"
257
288
  },
258
289
  "peerDependenciesMeta": {
259
290
  "react": {
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{evaluateConsent as e}from"@c15t/core";import{useCallback as t,useContext as a,useMemo as i}from"react";import{ProviderServicesContext as n}from"../context.js";import{useConsentManagerDraft as s}from"../draft.js";import{useActiveUI as r,useBranding as o,useConsents as l,useModel as p,usePolicyCategories as c,usePolicyScopeMode as u,usePreferencesPresentation as m,usePromptPresentation as d,useSetActiveUI as f,useSnapshot as y,useSubscribeToConsentChanges as g,useTranslations as v}from"../hooks.js";import{defaultTranslationConfig as C}from"../utils/default-translation-config.js";let T={},b=[{defaultValue:!0,description:"Required for basic site functionality",disabled:!0,display:!0,gdprType:1,name:"necessary"},{defaultValue:!1,description:"Enables enhanced features",display:!0,gdprType:2,name:"functionality"},{defaultValue:!1,description:"Analytics and performance measurement",display:!0,gdprType:4,name:"measurement"},{defaultValue:!1,description:"Improves your experience",display:!0,gdprType:3,name:"experience"},{defaultValue:!1,description:"Advertising and marketing",display:!0,gdprType:5,name:"marketing"}],x=function(){let x=y(),D=a(n),h=l(),R=r(),S=o(),V=p(),j=d(),k=c(),q=m(),w=u(),{draft:I,save:A}=s(),M=f(),O=g(),P=v(),_=i(()=>P?{...C,defaultLanguage:P.language,translations:{...C.translations,[P.language]:P.translations}}:C,[P]),B=i(()=>["necessary",...k],[k]),E=i(()=>[...D?.getConsentCategories()??B],[D,B]),L=t(()=>{let e=new Set(E);return b.filter(t=>e.has(t.name)).map(e=>({...e,display:!0}))},[E]),U=t(t=>e({category:t},x),[x]),z=t(e=>{M(e)},[M]),F=t(async(e,t)=>{"custom"===e?await A():await A("all"===e?"all":"none")},[A]),G=t((e,t)=>{E.includes(e)&&I.set(e,t)},[I,E]),H=t(e=>{},[]),J=t(e=>O(e),[O]);return{activeUI:R??"none",branding:S??"c15t",consentCategories:E,consentTypes:L(),consents:h,draftIsStale:I.isStale,effectivePermissions:x.effectivePermissions,explicitChoice:x.explicitChoice,getDisplayedConsents:L,has:U,iab:x.iab,manager:null,model:V??"opt-in",noticeDismissal:x.noticeDismissal,optOutDirectives:x.optOutDirectives,policyBanner:j??T,policyCategories:B,policyDialog:q??T,policyRule:x.policyRule,policyScopeMode:w,privacySignals:x.privacySignals,promptRequirement:x.promptRequirement,resetDraft:I.reset,resolution:x.resolution,restrictions:x.restrictions,saveConsents:F,selectedConsentTypes:I.values,selectedConsents:I.values,setActiveUI:z,setSelectedConsent:G,subscribeToConsentChanges:J,translationConfig:_,updateConsentCategories:H}};export{x as useConsentManager};
@@ -1 +0,0 @@
1
- import{jsx as e}from"react/jsx-runtime";import t from"@c15t/ui/styles/components/frame";import{forwardRef as r}from"react";import{useTranslations as a}from"../../component-hooks/use-translations.js";import{Box as o}from"../shared/primitives/box.js";import{ConsentButton as i}from"../shared/primitives/button.js";let m=r(({children:r,...a},i)=>e(o,{ref:i,baseClassName:t.placeholder,"data-testid":"frame-placeholder",...a,children:r})),l=r(({children:r,category:i,...m},l)=>{let{frame:s,consentTypes:n}=a(),p=i&&s?.title?s.title.replace("{category}",n?.[i]?.title??i):void 0;return e(o,{ref:l,baseClassName:t.title,...m,children:r??p})}),s=r(({children:t,category:r,...o},m)=>{let{frame:l,consentTypes:s}=a(),n=s?.[r]?.title??r,p=l?.actionButton?.replace("{category}",n);return e(i,{mode:"stroke",size:"small",variant:"primary",...o,ref:m,action:"open-consent-dialog",category:r,"data-testid":"frame-open-dialog",children:t??p})});m.displayName="FrameRoot",l.displayName="FrameTitle",s.displayName="FrameButton";export{s as FrameButton,m as FrameRoot,l as FrameTitle};
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{jsx as e,jsxs as o}from"react/jsx-runtime";import{forwardRef as r,useEffect as t}from"react";import{useConsentManager as i}from"../../component-hooks/use-manager.js";import{useTranslations as l}from"../../component-hooks/use-translations.js";import{FrameButton as n,FrameRoot as s,FrameTitle as c}from"./atoms.js";let a=({category:r,policyBlocked:t,policyBlockedMessage:i})=>o(s,{children:[e(c,{category:r,children:t?i??"This content is unavailable under your region's consent policy.":void 0}),t?null:e(n,{category:r})]}),m=r(({children:o,category:r,placeholder:n,noStyle:s,className:c,theme:m,...d},p)=>{let{has:y,updateConsentCategories:u,consentCategories:h,policyCategories:g,policyScopeMode:f}=i(),{frame:k}=l(),j=y(r),v=Array.isArray(g)&&g.length>0&&!g.includes("*")&&!g.includes(r);return t(()=>{h.includes(r)||u([...h,r])},[r,h,u]),e("div",{ref:p,className:c,...d,children:j?o:n||e(a,{category:r,policyBlocked:"strict"===f&&v,policyBlockedMessage:k?.policyBlocked})})});m.displayName="Frame";let d=m;export{d as Frame};
@@ -1,2 +0,0 @@
1
- "use client";
2
- import{Frame as t}from"./frame.js";import*as e from"./atoms.js";let r=Object.assign(t,{Button:e.FrameButton,Root:e.FrameRoot,Title:e.FrameTitle});var a=e.FrameButton,m=e.FrameRoot,o=e.FrameTitle;export{a as FrameButton,m as FrameRoot,o as FrameTitle,r as Frame};
package/dist/frame.js DELETED
@@ -1,2 +0,0 @@
1
- "use client";
2
- export*from"./components/frame/index.js";
package/dist/ui-save.js DELETED
@@ -1 +0,0 @@
1
- let e=new WeakMap,t=t=>{e.set(t,{})},n=async(n,a,i)=>{let o={};e.set(n,o);let l="dialog"===n.getSnapshot().activeUI,s=a();l&&e.get(n)===o&&n.set.activeUI("dialog");let g=n.subscribe(a=>{l&&"dialog"!==a.activeUI&&e.get(n)===o&&t(n)});try{let t=await s;if(t.ok&&i()&&l&&e.get(n)===o){let e=n.getSnapshot();n.set.activeUI(e.policyPending||"failed"===e.resolution.status||"none"===e.promptRequirement.kind?"none":"banner")}return t}finally{g()}};export{t as invalidateConsentUIAction,n as saveConsentUI};