c15t 2.0.0-rc.5 → 2.0.0-rc.8

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 (73) hide show
  1. package/CHANGELOG.md +77 -0
  2. package/dist/index.cjs +3740 -3611
  3. package/dist/index.js +1239 -1174
  4. package/dist-types/client/client-interface.d.ts +27 -8
  5. package/dist-types/client/hosted/types.d.ts +6 -0
  6. package/dist-types/client/hosted/utils.d.ts +6 -0
  7. package/dist-types/client/offline/init.d.ts +1 -1
  8. package/dist-types/client/shared/init-fallback.d.ts +1 -1
  9. package/dist-types/index.d.ts +12 -11
  10. package/dist-types/libs/iab-tcf/types.d.ts +30 -0
  11. package/dist-types/libs/init-consent-manager/types.d.ts +6 -2
  12. package/dist-types/libs/jurisdiction.d.ts +1 -1
  13. package/dist-types/libs/policy-actions.d.ts +35 -0
  14. package/dist-types/libs/policy.d.ts +1 -1
  15. package/dist-types/libs/prefetch/index.d.ts +2 -2
  16. package/dist-types/libs/prefetch/prefetch.d.ts +6 -22
  17. package/dist-types/libs/request-context.d.ts +24 -0
  18. package/dist-types/libs/save-consents.d.ts +3 -2
  19. package/dist-types/libs/script-loader/debug.d.ts +3 -0
  20. package/dist-types/libs/script-loader/index.d.ts +2 -1
  21. package/dist-types/libs/script-loader/types.d.ts +21 -0
  22. package/dist-types/runtime/index.d.ts +1 -1
  23. package/dist-types/store/type.d.ts +56 -8
  24. package/dist-types/translations/index.d.ts +1 -1
  25. package/dist-types/types/callbacks.d.ts +24 -2
  26. package/dist-types/types/compliance.d.ts +1 -1
  27. package/dist-types/types/iab-tcf.d.ts +2 -2
  28. package/dist-types/types/index.d.ts +2 -2
  29. package/dist-types/types/legal-links.d.ts +1 -1
  30. package/dist-types/version.d.ts +1 -1
  31. package/docs/api/overview.md +26 -4
  32. package/docs/api/setting-consent.md +5 -1
  33. package/docs/building-ui.md +23 -7
  34. package/docs/callbacks.md +71 -11
  35. package/docs/concepts/client-modes.md +16 -4
  36. package/docs/concepts/initialization-flow.md +9 -2
  37. package/docs/concepts/policy-packs.md +3 -3
  38. package/docs/iab/overview.md +2 -0
  39. package/docs/integrations/building-integrations.md +405 -0
  40. package/docs/integrations/databuddy.md +22 -5
  41. package/docs/integrations/google-tag-manager.md +2 -2
  42. package/docs/integrations/google-tag.md +2 -29
  43. package/docs/integrations/linkedin-insights.md +1 -1
  44. package/docs/integrations/meta-pixel.md +1 -1
  45. package/docs/integrations/microsoft-uet.md +1 -1
  46. package/docs/integrations/overview.md +18 -2
  47. package/docs/integrations/posthog.md +39 -17
  48. package/docs/integrations/tiktok-pixel.md +1 -1
  49. package/docs/integrations/x-pixel.md +1 -1
  50. package/docs/optimization.md +2 -6
  51. package/docs/policy-packs.md +3 -3
  52. package/docs/quickstart.md +14 -1
  53. package/docs/script-loader.md +22 -1
  54. package/package.json +6 -7
  55. package/dist/0~299.js +0 -56
  56. package/dist/0~417.js +0 -277
  57. package/dist/0~798.js +0 -277
  58. package/dist/0~859.js +0 -431
  59. package/dist/1~299.cjs +0 -56
  60. package/dist/1~417.cjs +0 -277
  61. package/dist/1~622.cjs +0 -431
  62. package/dist/1~798.cjs +0 -277
  63. package/dist-types/libs/iab-tcf/cmp-api.d.ts +0 -36
  64. package/dist-types/libs/iab-tcf/cmp-defaults.d.ts +0 -13
  65. package/dist-types/libs/iab-tcf/fetch-gvl.d.ts +0 -70
  66. package/dist-types/libs/iab-tcf/index.d.ts +0 -18
  67. package/dist-types/libs/iab-tcf/lazy-load.d.ts +0 -54
  68. package/dist-types/libs/iab-tcf/purpose-mapping.d.ts +0 -152
  69. package/dist-types/libs/iab-tcf/stacks.d.ts +0 -138
  70. package/dist-types/libs/iab-tcf/store.d.ts +0 -40
  71. package/dist-types/libs/iab-tcf/stub.d.ts +0 -70
  72. package/dist-types/libs/iab-tcf/tc-string.d.ts +0 -133
  73. package/dist-types/libs/init-consent-manager/iab-initializer.d.ts +0 -25
package/CHANGELOG.md CHANGED
@@ -1,5 +1,82 @@
1
1
  # c15t
2
2
 
3
+ ## 2.0.0-rc.8
4
+
5
+ ### Minor Changes
6
+
7
+ - 3d4c107: feat(consent): add change-only consent callbacks
8
+
9
+ - add `onConsentChanged` as a dedicated callback for explicit consent saves that change an existing persisted consent state
10
+ - include both previous and current consent categories in the callback payload so analytics and integrations can diff grant/revoke transitions directly
11
+ - keep `onConsentSet` focused on broad consent-state updates, including initialization and auto-grant flows
12
+ - update the React provider to keep callback registrations in sync when callback props change after mount
13
+
14
+ - c944e35: feat(core): move policy action resolution from @c15t/react to c15t core
15
+
16
+ Policy-driven action resolution utilities (`resolvePolicyAllowedActions`, `resolvePolicyActionGroups`, `resolvePolicyPrimaryActions`, etc.) are now exported from `c15t` core for shared consent surface runtimes.
17
+
18
+ feat(scripts): move bundled integrations to declarative, schema-versioned `VendorManifest` definitions compiled through `resolveManifest()`. The manifest runtime now supports structured startup and consent phases, complex consent conditions, compile caching, and Google Consent Mode v2 signaling without helper-authored lifecycle overrides.
19
+
20
+ feat(dev-tools): add script lifecycle and manifest runtime telemetry to the events and scripts panels, including grouped activity traces for `onBeforeLoad`, `onLoad`, and `onConsentChange`.
21
+
22
+ ### Patch Changes
23
+
24
+ - 43f1b68: - fix `identifyUser()` to consistently use the consent `subjectId` for `PATCH /subjects/:id`, keep the legacy `id` alias backward compatible, and tighten request typing plus retry handling for malformed pending identify submissions.
25
+ - 5956531: Simplify the 2.0 static prefetch flow so static routes only need to start `/init` early and matching prefetched data is consumed automatically during first store initialization.
26
+
27
+ - `c15t`: add canonical request-context metadata for SSR and browser-prefetch payloads, auto-consume matching prefetched data on first runtime/store initialization, and replace blanket SSR skip-on-overrides behavior with exact request-context matching.
28
+ - `@c15t/react`: preserve the dynamic SSR `fetchInitialData()` flow while exposing the new `context_mismatch` SSR status behavior for matching overrides, backend URLs, credentials, and ambient GPC.
29
+ - `@c15t/nextjs`: remove the RC-era public static-prefetch consumer APIs from the package surface and document `C15tPrefetch` as the only static-route setup step.
30
+ - `@c15t/cli`: update generated static-route templates to rely on automatic prefetch consumption instead of wiring manual prefetch lookups.
31
+
32
+ - Updated dependencies [3d5b0fd]
33
+ - Updated dependencies [fee82fd]
34
+ - @c15t/schema@2.0.0-rc.5
35
+ - @c15t/translations@2.0.0-rc.8
36
+
37
+ ## 2.0.0-rc.6
38
+
39
+ ### Minor Changes
40
+
41
+ - e08e52c: feat: Extract IAB TCF to `@c15t/iab` addon package
42
+
43
+ IAB TCF 2.3 support is now an opt-in addon. Non-IAB users no longer pay for IAB code in their bundle.
44
+
45
+ **Breaking changes:**
46
+
47
+ - `IABConsentBanner`, `IABConsentDialog`, and `useHeadlessIABConsentUI` are no longer exported from `@c15t/react`. Import from `@c15t/react/iab` instead.
48
+ - IAB config now requires the `iab()` wrapper from `@c15t/iab` instead of a plain `{ enabled: true, ... }` object.
49
+
50
+ **Migration:**
51
+
52
+ ```tsx
53
+ // Before
54
+ import { IABConsentBanner, IABConsentDialog } from '@c15t/react';
55
+ <ConsentManagerProvider options={{ iab: { enabled: true, cmpId: 28 } }}>
56
+
57
+ // After
58
+ import { iab } from '@c15t/iab';
59
+ import { IABConsentBanner, IABConsentDialog } from '@c15t/react/iab';
60
+ <ConsentManagerProvider options={{ iab: iab({ cmpId: 28 }) }}>
61
+ ```
62
+
63
+ **Bundle impact for non-IAB users:**
64
+
65
+ - Core bundle: -3.0 KB gzip (-9.2%)
66
+ - Lazy chunks eliminated: -9.9 KB gzip
67
+ - Total: -12.9 KB gzip (-30%)
68
+ - `@iabtechlabtcf/core` removed from core dependencies
69
+
70
+ ### Patch Changes
71
+
72
+ - bb3ab0f: chore: update dependencies, including zustand and typescript
73
+ - 1a724fc: fix(policy-packs): support multiple primary actions while keeping customize as the default primary action
74
+
75
+ Expose `primaryActions` consistently across schema, backend, core, React, and dev-tools. Built-in preset and offline default policies keep `customize` as the default primary action, while custom policies can now mark multiple actions as primary.
76
+
77
+ - Updated dependencies [1a724fc]
78
+ - @c15t/schema@2.0.0-rc.4
79
+
3
80
  ## 2.0.0-rc.5
4
81
 
5
82
  ### Minor Changes