@codefast/tracking 0.7.1 → 0.7.3
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.
- package/CHANGELOG.md +49 -0
- package/LICENSE +1 -1
- package/README.md +235 -105
- package/dist/adapters/tanstack-start.d.ts +5 -6
- package/dist/adapters/tanstack-start.js +5 -6
- package/dist/client/ad-framework-consent.d.ts +2 -3
- package/dist/client/ad-framework-consent.js +1 -2
- package/dist/client/browser-cookie.d.ts +1 -2
- package/dist/client/browser-cookie.js +1 -2
- package/dist/client/consent-runtime.d.ts +4 -5
- package/dist/client/consent-runtime.js +5 -6
- package/dist/client/consent-storage.d.ts +2 -3
- package/dist/client/consent-storage.js +2 -3
- package/dist/client/consent-withdrawal.d.ts +2 -3
- package/dist/client/consent-withdrawal.js +1 -2
- package/dist/client/cookie-anonymous-id.d.ts +1 -2
- package/dist/client/cookie-anonymous-id.js +3 -4
- package/dist/client/create-client-tracker.d.ts +4 -5
- package/dist/client/create-client-tracker.js +3 -4
- package/dist/client/gpc.d.ts +1 -2
- package/dist/client/gpc.js +1 -2
- package/dist/client/initial-consent-store.d.ts +2 -3
- package/dist/client/initial-consent-store.js +2 -3
- package/dist/client/is-analytics-allowed.d.ts +3 -4
- package/dist/client/is-analytics-allowed.js +2 -3
- package/dist/client/server-persisted-anonymous-id.d.ts +2 -3
- package/dist/client/server-persisted-anonymous-id.js +3 -4
- package/dist/core/consent-config.d.ts +2 -3
- package/dist/core/consent-config.js +1 -2
- package/dist/core/consent-receipt.d.ts +2 -3
- package/dist/core/consent-receipt.js +2 -3
- package/dist/core/consent.d.ts +1 -2
- package/dist/core/consent.js +1 -2
- package/dist/core/cookie.d.ts +1 -2
- package/dist/core/cookie.js +1 -2
- package/dist/core/destination.d.ts +2 -3
- package/dist/core/destination.js +1 -2
- package/dist/core/event-catalog.d.ts +1 -2
- package/dist/core/event-catalog.js +1 -2
- package/dist/core/event-id.d.ts +1 -2
- package/dist/core/event-id.js +1 -2
- package/dist/core/tracked-event.d.ts +1 -2
- package/dist/core/tracked-event.js +1 -2
- package/dist/destinations/ad-consent.d.ts +2 -3
- package/dist/destinations/ad-consent.js +1 -2
- package/dist/destinations/google-analytics.d.ts +6 -7
- package/dist/destinations/google-analytics.js +3 -4
- package/dist/destinations/google-consent.d.ts +2 -3
- package/dist/destinations/google-consent.js +2 -3
- package/dist/destinations/meta.d.ts +4 -5
- package/dist/destinations/meta.js +3 -4
- package/dist/destinations/microsoft-uet.d.ts +4 -5
- package/dist/destinations/microsoft-uet.js +3 -4
- package/dist/destinations/shared.d.ts +1 -2
- package/dist/destinations/shared.js +1 -2
- package/dist/destinations/tiktok.d.ts +4 -5
- package/dist/destinations/tiktok.js +3 -4
- package/dist/destinations/vercel-analytics.d.ts +2 -3
- package/dist/destinations/vercel-analytics.js +2 -3
- package/dist/index.d.ts +49 -50
- package/dist/index.js +26 -27
- package/dist/react/consent-banner.d.ts +3 -4
- package/dist/react/consent-banner.js +1 -2
- package/dist/react/gtag-consent-bootstrap.d.ts +2 -3
- package/dist/react/gtag-consent-bootstrap.js +2 -3
- package/dist/react/use-consent.d.ts +3 -4
- package/dist/react/use-consent.js +2 -3
- package/dist/react/use-google-consent-sync.d.ts +2 -3
- package/dist/react/use-google-consent-sync.js +2 -3
- package/dist/react/use-initial-consent.d.ts +2 -3
- package/dist/react/use-initial-consent.js +1 -2
- package/dist/server/anonymous-id-cookie.d.ts +1 -2
- package/dist/server/anonymous-id-cookie.js +2 -3
- package/dist/server/consent-receipt-store.d.ts +2 -3
- package/dist/server/consent-receipt-store.js +1 -2
- package/dist/server/consent-receipt.d.ts +2 -3
- package/dist/server/consent-receipt.js +1 -2
- package/dist/server/initial-consent.d.ts +2 -3
- package/dist/server/initial-consent.js +3 -4
- package/dist/server/measurement-protocol.d.ts +2 -3
- package/dist/server/measurement-protocol.js +1 -2
- package/dist/server/region.d.ts +2 -3
- package/dist/server/region.js +1 -2
- package/dist/server/user-deletion.d.ts +1 -2
- package/dist/server/user-deletion.js +1 -2
- package/dist/tooling/import-protection.d.ts +2 -3
- package/dist/tooling/import-protection.js +2 -3
- package/package.json +5 -94
- package/dist/adapters/tanstack-start.d.ts.map +0 -1
- package/dist/adapters/tanstack-start.js.map +0 -1
- package/dist/client/ad-framework-consent.d.ts.map +0 -1
- package/dist/client/ad-framework-consent.js.map +0 -1
- package/dist/client/browser-cookie.d.ts.map +0 -1
- package/dist/client/browser-cookie.js.map +0 -1
- package/dist/client/consent-runtime.d.ts.map +0 -1
- package/dist/client/consent-runtime.js.map +0 -1
- package/dist/client/consent-storage.d.ts.map +0 -1
- package/dist/client/consent-storage.js.map +0 -1
- package/dist/client/consent-withdrawal.d.ts.map +0 -1
- package/dist/client/consent-withdrawal.js.map +0 -1
- package/dist/client/cookie-anonymous-id.d.ts.map +0 -1
- package/dist/client/cookie-anonymous-id.js.map +0 -1
- package/dist/client/create-client-tracker.d.ts.map +0 -1
- package/dist/client/create-client-tracker.js.map +0 -1
- package/dist/client/gpc.d.ts.map +0 -1
- package/dist/client/gpc.js.map +0 -1
- package/dist/client/initial-consent-store.d.ts.map +0 -1
- package/dist/client/initial-consent-store.js.map +0 -1
- package/dist/client/is-analytics-allowed.d.ts.map +0 -1
- package/dist/client/is-analytics-allowed.js.map +0 -1
- package/dist/client/server-persisted-anonymous-id.d.ts.map +0 -1
- package/dist/client/server-persisted-anonymous-id.js.map +0 -1
- package/dist/core/consent-config.d.ts.map +0 -1
- package/dist/core/consent-config.js.map +0 -1
- package/dist/core/consent-receipt.d.ts.map +0 -1
- package/dist/core/consent-receipt.js.map +0 -1
- package/dist/core/consent.d.ts.map +0 -1
- package/dist/core/consent.js.map +0 -1
- package/dist/core/cookie.d.ts.map +0 -1
- package/dist/core/cookie.js.map +0 -1
- package/dist/core/destination.d.ts.map +0 -1
- package/dist/core/destination.js.map +0 -1
- package/dist/core/event-catalog.d.ts.map +0 -1
- package/dist/core/event-catalog.js.map +0 -1
- package/dist/core/event-id.d.ts.map +0 -1
- package/dist/core/event-id.js.map +0 -1
- package/dist/core/tracked-event.d.ts.map +0 -1
- package/dist/core/tracked-event.js.map +0 -1
- package/dist/destinations/ad-consent.d.ts.map +0 -1
- package/dist/destinations/ad-consent.js.map +0 -1
- package/dist/destinations/google-analytics.d.ts.map +0 -1
- package/dist/destinations/google-analytics.js.map +0 -1
- package/dist/destinations/google-consent.d.ts.map +0 -1
- package/dist/destinations/google-consent.js.map +0 -1
- package/dist/destinations/meta.d.ts.map +0 -1
- package/dist/destinations/meta.js.map +0 -1
- package/dist/destinations/microsoft-uet.d.ts.map +0 -1
- package/dist/destinations/microsoft-uet.js.map +0 -1
- package/dist/destinations/shared.d.ts.map +0 -1
- package/dist/destinations/shared.js.map +0 -1
- package/dist/destinations/tiktok.d.ts.map +0 -1
- package/dist/destinations/tiktok.js.map +0 -1
- package/dist/destinations/vercel-analytics.d.ts.map +0 -1
- package/dist/destinations/vercel-analytics.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/react/consent-banner.d.ts.map +0 -1
- package/dist/react/consent-banner.js.map +0 -1
- package/dist/react/gtag-consent-bootstrap.d.ts.map +0 -1
- package/dist/react/gtag-consent-bootstrap.js.map +0 -1
- package/dist/react/use-consent.d.ts.map +0 -1
- package/dist/react/use-consent.js.map +0 -1
- package/dist/react/use-google-consent-sync.d.ts.map +0 -1
- package/dist/react/use-google-consent-sync.js.map +0 -1
- package/dist/react/use-initial-consent.d.ts.map +0 -1
- package/dist/react/use-initial-consent.js.map +0 -1
- package/dist/server/anonymous-id-cookie.d.ts.map +0 -1
- package/dist/server/anonymous-id-cookie.js.map +0 -1
- package/dist/server/consent-receipt-store.d.ts.map +0 -1
- package/dist/server/consent-receipt-store.js.map +0 -1
- package/dist/server/consent-receipt.d.ts.map +0 -1
- package/dist/server/consent-receipt.js.map +0 -1
- package/dist/server/initial-consent.d.ts.map +0 -1
- package/dist/server/initial-consent.js.map +0 -1
- package/dist/server/measurement-protocol.d.ts.map +0 -1
- package/dist/server/measurement-protocol.js.map +0 -1
- package/dist/server/region.d.ts.map +0 -1
- package/dist/server/region.js.map +0 -1
- package/dist/server/user-deletion.d.ts.map +0 -1
- package/dist/server/user-deletion.js.map +0 -1
- package/dist/tooling/import-protection.d.ts.map +0 -1
- package/dist/tooling/import-protection.js.map +0 -1
- package/src/adapters/tanstack-start.ts +0 -139
- package/src/client/ad-framework-consent.ts +0 -88
- package/src/client/browser-cookie.ts +0 -16
- package/src/client/consent-runtime.ts +0 -82
- package/src/client/consent-storage.ts +0 -125
- package/src/client/consent-withdrawal.ts +0 -34
- package/src/client/cookie-anonymous-id.ts +0 -116
- package/src/client/create-client-tracker.ts +0 -174
- package/src/client/gpc.ts +0 -15
- package/src/client/initial-consent-store.ts +0 -220
- package/src/client/is-analytics-allowed.ts +0 -45
- package/src/client/server-persisted-anonymous-id.ts +0 -104
- package/src/core/consent-config.ts +0 -27
- package/src/core/consent-receipt.ts +0 -115
- package/src/core/consent.ts +0 -298
- package/src/core/cookie.ts +0 -29
- package/src/core/destination.ts +0 -29
- package/src/core/event-catalog.ts +0 -54
- package/src/core/event-id.ts +0 -8
- package/src/core/tracked-event.ts +0 -14
- package/src/destinations/ad-consent.ts +0 -29
- package/src/destinations/google-analytics.ts +0 -304
- package/src/destinations/google-consent.ts +0 -166
- package/src/destinations/meta.ts +0 -98
- package/src/destinations/microsoft-uet.ts +0 -88
- package/src/destinations/shared.ts +0 -51
- package/src/destinations/tiktok.ts +0 -87
- package/src/destinations/vercel-analytics.ts +0 -41
- package/src/index.ts +0 -171
- package/src/react/consent-banner.tsx +0 -386
- package/src/react/gtag-consent-bootstrap.tsx +0 -50
- package/src/react/use-consent.ts +0 -123
- package/src/react/use-google-consent-sync.ts +0 -40
- package/src/react/use-initial-consent.ts +0 -22
- package/src/server/anonymous-id-cookie.ts +0 -105
- package/src/server/consent-receipt-store.ts +0 -79
- package/src/server/consent-receipt.ts +0 -89
- package/src/server/initial-consent.ts +0 -48
- package/src/server/measurement-protocol.ts +0 -116
- package/src/server/region.ts +0 -77
- package/src/server/user-deletion.ts +0 -97
- package/src/tooling/import-protection.ts +0 -22
package/dist/index.d.ts
CHANGED
|
@@ -13,53 +13,52 @@
|
|
|
13
13
|
* `@codefast/tracking/destinations/vercel-analytics` so its `@vercel/analytics` peer is only
|
|
14
14
|
* pulled in when used.
|
|
15
15
|
*/
|
|
16
|
-
export type { ConsentCategory, ConsentDecision, ConsentMode, ConsentRecord, ConsentRegion, ConsentStorage, InitialConsent, ResolveDefaultConsentOptions, ResolveEffectiveConsentOptions, } from "
|
|
17
|
-
export { CONSENT_CATEGORIES, CONSENT_REGIONS, createConsentDecision, isConsentDecision, isConsentRecord, isConsentRegion, isInitialConsent, normalizeConsentDecision, readStoredDecision, resolveConsentMode, resolveDefaultConsent, resolveEffectiveConsent, STRICTEST_INITIAL_CONSENT, } from "
|
|
18
|
-
export type { ConsentConfig } from "
|
|
19
|
-
export { defineConsentConfig } from "
|
|
20
|
-
export type { ConsentReceipt, ConsentReceiptEventType, ConsentReceiptInput, ConsentReceiptMethod, ConsentReceiptSubjectIdType, } from "
|
|
21
|
-
export { isConsentReceiptInput } from "
|
|
22
|
-
export { readCookieValue } from "
|
|
23
|
-
export type { Destination } from "
|
|
24
|
-
export type { EventCatalog, EventDefinition } from "
|
|
25
|
-
export { assertValidEventProperties, defineEventCatalog } from "
|
|
26
|
-
export { generateEventId } from "
|
|
27
|
-
export type { TrackedEvent } from "
|
|
28
|
-
export type { CmpConsentSignal, CmpStatus, ReconcileAdFrameworkConsentOptions } from "
|
|
29
|
-
export { hasGppApi, hasTcfApi, reconcileAdFrameworkConsent } from "
|
|
30
|
-
export type { ConsentRuntime, ConsentRuntimeOptions } from "
|
|
31
|
-
export { createConsentRuntime } from "
|
|
32
|
-
export { createLocalStorageConsentStorage } from "
|
|
33
|
-
export type { ConsentWithdrawalHandlerOptions } from "
|
|
34
|
-
export { createConsentWithdrawalHandler } from "
|
|
35
|
-
export type { CookieAnonymousId, CookieAnonymousIdOptions } from "
|
|
36
|
-
export { createCookieAnonymousId } from "
|
|
37
|
-
export type { ClientTracker, ClientTrackerOptions, DeliveryErrorContext } from "
|
|
38
|
-
export { createClientTracker } from "
|
|
39
|
-
export { hasGlobalPrivacyControlSignal } from "
|
|
40
|
-
export type { InitialConsentSnapshot, InitialConsentStore, InitialConsentStoreOptions, } from "
|
|
41
|
-
export { createInitialConsentStore } from "
|
|
42
|
-
export type { IsAnalyticsAllowedOptions } from "
|
|
43
|
-
export { createIsAnalyticsAllowed } from "
|
|
44
|
-
export type { ServerPersistedAnonymousIdOptions } from "
|
|
45
|
-
export { createServerPersistedAnonymousId } from "
|
|
46
|
-
export type { ConsentBannerAcceptProps, ConsentBannerActionsProps, ConsentBannerCategoryProps, ConsentBannerCustomizeProps, ConsentBannerDescriptionProps, ConsentBannerPreferencesProps, ConsentBannerProps, ConsentBannerRejectProps, ConsentBannerSaveProps, ConsentBannerTitleProps, ConsentToggleProps, } from "
|
|
47
|
-
export { ConsentBanner, ConsentBannerAccept, ConsentBannerActions, ConsentBannerCategory, ConsentBannerCustomize, ConsentBannerDescription, ConsentBannerPreferences, ConsentBannerReject, ConsentBannerSave, ConsentBannerTitle, ConsentToggle, } from "
|
|
48
|
-
export type { GtagConsentBootstrapProps } from "
|
|
49
|
-
export { GtagConsentBootstrap } from "
|
|
50
|
-
export type { UseConsentOptions, UseConsentResult } from "
|
|
51
|
-
export { useConsent } from "
|
|
52
|
-
export type { UseGoogleConsentSyncOptions } from "
|
|
53
|
-
export { useGoogleConsentSync } from "
|
|
54
|
-
export { useInitialConsent } from "
|
|
55
|
-
export type { AdConsentState } from "
|
|
56
|
-
export { toAdConsentState } from "
|
|
57
|
-
export type { EnsureGtagOptions, GoogleAnalyticsDestinationOptions, GtagConsentBootstrapOptions, GtagFunction, LoadGtagScriptOptions, } from "
|
|
58
|
-
export { buildGtagConsentBootstrapScript, clearGoogleAnalyticsCookies, createGoogleAnalyticsDestination, ensureGtag, loadGtagScript, updateGoogleConsent, } from "
|
|
59
|
-
export type { MetaDataProcessingOptions, MetaDestinationOptions, MetaEventPayload } from "
|
|
60
|
-
export { createMetaDestination, toMetaDataProcessingOptions } from "
|
|
61
|
-
export type { MicrosoftUetConsent, MicrosoftUetDestinationOptions, MicrosoftUetEventPayload, } from "
|
|
62
|
-
export { createMicrosoftUetDestination, toMicrosoftUetConsent } from "
|
|
63
|
-
export type { TiktokConsent, TiktokDestinationOptions, TiktokEventPayload } from "
|
|
64
|
-
export { createTiktokDestination, toTiktokConsent } from "
|
|
65
|
-
//# sourceMappingURL=index.d.ts.map
|
|
16
|
+
export type { ConsentCategory, ConsentDecision, ConsentMode, ConsentRecord, ConsentRegion, ConsentStorage, InitialConsent, ResolveDefaultConsentOptions, ResolveEffectiveConsentOptions, } from "#core/consent";
|
|
17
|
+
export { CONSENT_CATEGORIES, CONSENT_REGIONS, createConsentDecision, isConsentDecision, isConsentRecord, isConsentRegion, isInitialConsent, normalizeConsentDecision, readStoredDecision, resolveConsentMode, resolveDefaultConsent, resolveEffectiveConsent, STRICTEST_INITIAL_CONSENT, } from "#core/consent";
|
|
18
|
+
export type { ConsentConfig } from "#core/consent-config";
|
|
19
|
+
export { defineConsentConfig } from "#core/consent-config";
|
|
20
|
+
export type { ConsentReceipt, ConsentReceiptEventType, ConsentReceiptInput, ConsentReceiptMethod, ConsentReceiptSubjectIdType, } from "#core/consent-receipt";
|
|
21
|
+
export { isConsentReceiptInput } from "#core/consent-receipt";
|
|
22
|
+
export { readCookieValue } from "#core/cookie";
|
|
23
|
+
export type { Destination } from "#core/destination";
|
|
24
|
+
export type { EventCatalog, EventDefinition } from "#core/event-catalog";
|
|
25
|
+
export { assertValidEventProperties, defineEventCatalog } from "#core/event-catalog";
|
|
26
|
+
export { generateEventId } from "#core/event-id";
|
|
27
|
+
export type { TrackedEvent } from "#core/tracked-event";
|
|
28
|
+
export type { CmpConsentSignal, CmpStatus, ReconcileAdFrameworkConsentOptions } from "#client/ad-framework-consent";
|
|
29
|
+
export { hasGppApi, hasTcfApi, reconcileAdFrameworkConsent } from "#client/ad-framework-consent";
|
|
30
|
+
export type { ConsentRuntime, ConsentRuntimeOptions } from "#client/consent-runtime";
|
|
31
|
+
export { createConsentRuntime } from "#client/consent-runtime";
|
|
32
|
+
export { createLocalStorageConsentStorage } from "#client/consent-storage";
|
|
33
|
+
export type { ConsentWithdrawalHandlerOptions } from "#client/consent-withdrawal";
|
|
34
|
+
export { createConsentWithdrawalHandler } from "#client/consent-withdrawal";
|
|
35
|
+
export type { CookieAnonymousId, CookieAnonymousIdOptions } from "#client/cookie-anonymous-id";
|
|
36
|
+
export { createCookieAnonymousId } from "#client/cookie-anonymous-id";
|
|
37
|
+
export type { ClientTracker, ClientTrackerOptions, DeliveryErrorContext } from "#client/create-client-tracker";
|
|
38
|
+
export { createClientTracker } from "#client/create-client-tracker";
|
|
39
|
+
export { hasGlobalPrivacyControlSignal } from "#client/gpc";
|
|
40
|
+
export type { InitialConsentSnapshot, InitialConsentStore, InitialConsentStoreOptions, } from "#client/initial-consent-store";
|
|
41
|
+
export { createInitialConsentStore } from "#client/initial-consent-store";
|
|
42
|
+
export type { IsAnalyticsAllowedOptions } from "#client/is-analytics-allowed";
|
|
43
|
+
export { createIsAnalyticsAllowed } from "#client/is-analytics-allowed";
|
|
44
|
+
export type { ServerPersistedAnonymousIdOptions } from "#client/server-persisted-anonymous-id";
|
|
45
|
+
export { createServerPersistedAnonymousId } from "#client/server-persisted-anonymous-id";
|
|
46
|
+
export type { ConsentBannerAcceptProps, ConsentBannerActionsProps, ConsentBannerCategoryProps, ConsentBannerCustomizeProps, ConsentBannerDescriptionProps, ConsentBannerPreferencesProps, ConsentBannerProps, ConsentBannerRejectProps, ConsentBannerSaveProps, ConsentBannerTitleProps, ConsentToggleProps, } from "#react/consent-banner";
|
|
47
|
+
export { ConsentBanner, ConsentBannerAccept, ConsentBannerActions, ConsentBannerCategory, ConsentBannerCustomize, ConsentBannerDescription, ConsentBannerPreferences, ConsentBannerReject, ConsentBannerSave, ConsentBannerTitle, ConsentToggle, } from "#react/consent-banner";
|
|
48
|
+
export type { GtagConsentBootstrapProps } from "#react/gtag-consent-bootstrap";
|
|
49
|
+
export { GtagConsentBootstrap } from "#react/gtag-consent-bootstrap";
|
|
50
|
+
export type { UseConsentOptions, UseConsentResult } from "#react/use-consent";
|
|
51
|
+
export { useConsent } from "#react/use-consent";
|
|
52
|
+
export type { UseGoogleConsentSyncOptions } from "#react/use-google-consent-sync";
|
|
53
|
+
export { useGoogleConsentSync } from "#react/use-google-consent-sync";
|
|
54
|
+
export { useInitialConsent } from "#react/use-initial-consent";
|
|
55
|
+
export type { AdConsentState } from "#destinations/ad-consent";
|
|
56
|
+
export { toAdConsentState } from "#destinations/ad-consent";
|
|
57
|
+
export type { EnsureGtagOptions, GoogleAnalyticsDestinationOptions, GtagConsentBootstrapOptions, GtagFunction, LoadGtagScriptOptions, } from "#destinations/google-analytics";
|
|
58
|
+
export { buildGtagConsentBootstrapScript, clearGoogleAnalyticsCookies, createGoogleAnalyticsDestination, ensureGtag, loadGtagScript, updateGoogleConsent, } from "#destinations/google-analytics";
|
|
59
|
+
export type { MetaDataProcessingOptions, MetaDestinationOptions, MetaEventPayload } from "#destinations/meta";
|
|
60
|
+
export { createMetaDestination, toMetaDataProcessingOptions } from "#destinations/meta";
|
|
61
|
+
export type { MicrosoftUetConsent, MicrosoftUetDestinationOptions, MicrosoftUetEventPayload, } from "#destinations/microsoft-uet";
|
|
62
|
+
export { createMicrosoftUetDestination, toMicrosoftUetConsent } from "#destinations/microsoft-uet";
|
|
63
|
+
export type { TiktokConsent, TiktokDestinationOptions, TiktokEventPayload } from "#destinations/tiktok";
|
|
64
|
+
export { createTiktokDestination, toTiktokConsent } from "#destinations/tiktok";
|
package/dist/index.js
CHANGED
|
@@ -13,30 +13,29 @@
|
|
|
13
13
|
* `@codefast/tracking/destinations/vercel-analytics` so its `@vercel/analytics` peer is only
|
|
14
14
|
* pulled in when used.
|
|
15
15
|
*/
|
|
16
|
-
export { CONSENT_CATEGORIES, CONSENT_REGIONS, createConsentDecision, isConsentDecision, isConsentRecord, isConsentRegion, isInitialConsent, normalizeConsentDecision, readStoredDecision, resolveConsentMode, resolveDefaultConsent, resolveEffectiveConsent, STRICTEST_INITIAL_CONSENT, } from "
|
|
17
|
-
export { defineConsentConfig } from "
|
|
18
|
-
export { isConsentReceiptInput } from "
|
|
19
|
-
export { readCookieValue } from "
|
|
20
|
-
export { assertValidEventProperties, defineEventCatalog } from "
|
|
21
|
-
export { generateEventId } from "
|
|
22
|
-
export { hasGppApi, hasTcfApi, reconcileAdFrameworkConsent } from "
|
|
23
|
-
export { createConsentRuntime } from "
|
|
24
|
-
export { createLocalStorageConsentStorage } from "
|
|
25
|
-
export { createConsentWithdrawalHandler } from "
|
|
26
|
-
export { createCookieAnonymousId } from "
|
|
27
|
-
export { createClientTracker } from "
|
|
28
|
-
export { hasGlobalPrivacyControlSignal } from "
|
|
29
|
-
export { createInitialConsentStore } from "
|
|
30
|
-
export { createIsAnalyticsAllowed } from "
|
|
31
|
-
export { createServerPersistedAnonymousId } from "
|
|
32
|
-
export { ConsentBanner, ConsentBannerAccept, ConsentBannerActions, ConsentBannerCategory, ConsentBannerCustomize, ConsentBannerDescription, ConsentBannerPreferences, ConsentBannerReject, ConsentBannerSave, ConsentBannerTitle, ConsentToggle, } from "
|
|
33
|
-
export { GtagConsentBootstrap } from "
|
|
34
|
-
export { useConsent } from "
|
|
35
|
-
export { useGoogleConsentSync } from "
|
|
36
|
-
export { useInitialConsent } from "
|
|
37
|
-
export { toAdConsentState } from "
|
|
38
|
-
export { buildGtagConsentBootstrapScript, clearGoogleAnalyticsCookies, createGoogleAnalyticsDestination, ensureGtag, loadGtagScript, updateGoogleConsent, } from "
|
|
39
|
-
export { createMetaDestination, toMetaDataProcessingOptions } from "
|
|
40
|
-
export { createMicrosoftUetDestination, toMicrosoftUetConsent } from "
|
|
41
|
-
export { createTiktokDestination, toTiktokConsent } from "
|
|
42
|
-
//# sourceMappingURL=index.js.map
|
|
16
|
+
export { CONSENT_CATEGORIES, CONSENT_REGIONS, createConsentDecision, isConsentDecision, isConsentRecord, isConsentRegion, isInitialConsent, normalizeConsentDecision, readStoredDecision, resolveConsentMode, resolveDefaultConsent, resolveEffectiveConsent, STRICTEST_INITIAL_CONSENT, } from "#core/consent";
|
|
17
|
+
export { defineConsentConfig } from "#core/consent-config";
|
|
18
|
+
export { isConsentReceiptInput } from "#core/consent-receipt";
|
|
19
|
+
export { readCookieValue } from "#core/cookie";
|
|
20
|
+
export { assertValidEventProperties, defineEventCatalog } from "#core/event-catalog";
|
|
21
|
+
export { generateEventId } from "#core/event-id";
|
|
22
|
+
export { hasGppApi, hasTcfApi, reconcileAdFrameworkConsent } from "#client/ad-framework-consent";
|
|
23
|
+
export { createConsentRuntime } from "#client/consent-runtime";
|
|
24
|
+
export { createLocalStorageConsentStorage } from "#client/consent-storage";
|
|
25
|
+
export { createConsentWithdrawalHandler } from "#client/consent-withdrawal";
|
|
26
|
+
export { createCookieAnonymousId } from "#client/cookie-anonymous-id";
|
|
27
|
+
export { createClientTracker } from "#client/create-client-tracker";
|
|
28
|
+
export { hasGlobalPrivacyControlSignal } from "#client/gpc";
|
|
29
|
+
export { createInitialConsentStore } from "#client/initial-consent-store";
|
|
30
|
+
export { createIsAnalyticsAllowed } from "#client/is-analytics-allowed";
|
|
31
|
+
export { createServerPersistedAnonymousId } from "#client/server-persisted-anonymous-id";
|
|
32
|
+
export { ConsentBanner, ConsentBannerAccept, ConsentBannerActions, ConsentBannerCategory, ConsentBannerCustomize, ConsentBannerDescription, ConsentBannerPreferences, ConsentBannerReject, ConsentBannerSave, ConsentBannerTitle, ConsentToggle, } from "#react/consent-banner";
|
|
33
|
+
export { GtagConsentBootstrap } from "#react/gtag-consent-bootstrap";
|
|
34
|
+
export { useConsent } from "#react/use-consent";
|
|
35
|
+
export { useGoogleConsentSync } from "#react/use-google-consent-sync";
|
|
36
|
+
export { useInitialConsent } from "#react/use-initial-consent";
|
|
37
|
+
export { toAdConsentState } from "#destinations/ad-consent";
|
|
38
|
+
export { buildGtagConsentBootstrapScript, clearGoogleAnalyticsCookies, createGoogleAnalyticsDestination, ensureGtag, loadGtagScript, updateGoogleConsent, } from "#destinations/google-analytics";
|
|
39
|
+
export { createMetaDestination, toMetaDataProcessingOptions } from "#destinations/meta";
|
|
40
|
+
export { createMicrosoftUetDestination, toMicrosoftUetConsent } from "#destinations/microsoft-uet";
|
|
41
|
+
export { createTiktokDestination, toTiktokConsent } from "#destinations/tiktok";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
-
import type { ConsentCategory } from "
|
|
3
|
-
import type { UseConsentResult } from "
|
|
2
|
+
import type { ConsentCategory } from "#core/consent";
|
|
3
|
+
import type { UseConsentResult } from "#react/use-consent";
|
|
4
4
|
/**
|
|
5
5
|
* Props for {@link ConsentBanner}.
|
|
6
6
|
*
|
|
@@ -179,5 +179,4 @@ export interface ConsentToggleProps extends Omit<ComponentProps<"button">, "chil
|
|
|
179
179
|
*
|
|
180
180
|
* @since 0.5.0-canary.4
|
|
181
181
|
*/
|
|
182
|
-
export declare function ConsentToggle({ allowLabel, consent, denyLabel, toggledCategories, ...props }: ConsentToggleProps): ReactNode;
|
|
183
|
-
//# sourceMappingURL=consent-banner.d.ts.map
|
|
182
|
+
export declare function ConsentToggle({ allowLabel, consent, denyLabel, toggledCategories, ...props }: ConsentToggleProps): ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ComponentProps, ReactNode } from "react";
|
|
2
|
-
import type { GtagConsentBootstrapOptions } from "
|
|
2
|
+
import type { GtagConsentBootstrapOptions } from "#destinations/google-analytics";
|
|
3
3
|
/**
|
|
4
4
|
* Props for {@link GtagConsentBootstrap}.
|
|
5
5
|
*
|
|
@@ -15,5 +15,4 @@ export interface GtagConsentBootstrapProps extends Omit<ComponentProps<"script">
|
|
|
15
15
|
*
|
|
16
16
|
* @since 0.5.0-canary.6
|
|
17
17
|
*/
|
|
18
|
-
export declare function GtagConsentBootstrap({ config, dataLayerName, defaultConsent, debugMode, gaMeasurementId, nonce, ...props }: GtagConsentBootstrapProps): ReactNode;
|
|
19
|
-
//# sourceMappingURL=gtag-consent-bootstrap.d.ts.map
|
|
18
|
+
export declare function GtagConsentBootstrap({ config, dataLayerName, defaultConsent, debugMode, gaMeasurementId, nonce, ...props }: GtagConsentBootstrapProps): ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { buildGtagConsentBootstrapScript } from "
|
|
2
|
+
import { buildGtagConsentBootstrapScript } from "#destinations/google-analytics";
|
|
3
3
|
/**
|
|
4
4
|
* Framework-agnostic inline `<script>` that runs `buildGtagConsentBootstrapScript` before
|
|
5
5
|
* hydration. Pass the same `nonce` here and in `loadGtagScript` for CSP; this component
|
|
@@ -18,5 +18,4 @@ export function GtagConsentBootstrap({ config, dataLayerName, defaultConsent, de
|
|
|
18
18
|
...(nonce === undefined ? {} : { nonce }),
|
|
19
19
|
};
|
|
20
20
|
return (_jsx("script", { ...props, dangerouslySetInnerHTML: { __html: buildGtagConsentBootstrapScript(bootstrapOptions) }, ...(nonce === undefined ? {} : { nonce }), suppressHydrationWarning: true }));
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=gtag-consent-bootstrap.js.map
|
|
21
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ConsentDecision, ConsentMode, ConsentStorage } from "
|
|
2
|
-
import type { ConsentConfig } from "
|
|
1
|
+
import type { ConsentDecision, ConsentMode, ConsentStorage } from "#core/consent";
|
|
2
|
+
import type { ConsentConfig } from "#core/consent-config";
|
|
3
3
|
/**
|
|
4
4
|
* Options for `useConsent`.
|
|
5
5
|
*
|
|
@@ -42,5 +42,4 @@ export interface UseConsentResult {
|
|
|
42
42
|
*
|
|
43
43
|
* @since 0.5.0-canary.4
|
|
44
44
|
*/
|
|
45
|
-
export declare function useConsent(options: UseConsentOptions): UseConsentResult;
|
|
46
|
-
//# sourceMappingURL=use-consent.d.ts.map
|
|
45
|
+
export declare function useConsent(options: UseConsentOptions): UseConsentResult;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback, useMemo, useRef, useSyncExternalStore } from "react";
|
|
3
|
-
import { CONSENT_CATEGORIES, createConsentDecision, readStoredDecision, resolveDefaultConsent } from "
|
|
3
|
+
import { CONSENT_CATEGORIES, createConsentDecision, readStoredDecision, resolveDefaultConsent } from "#core/consent";
|
|
4
4
|
/**
|
|
5
5
|
* Bridges `resolveConsentMode`/`resolveDefaultConsent` (core, region-aware) to React via
|
|
6
6
|
* `useSyncExternalStore`: the stored record is the single source of truth, hydration is
|
|
@@ -56,5 +56,4 @@ export function useConsent(options) {
|
|
|
56
56
|
isPromptNeeded: mode === "opt-in" && decision === undefined,
|
|
57
57
|
saveDecision,
|
|
58
58
|
}), [decision, denyAll, effectiveConsent, grantAll, mode, saveDecision]);
|
|
59
|
-
}
|
|
60
|
-
//# sourceMappingURL=use-consent.js.map
|
|
59
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { UseConsentResult } from "
|
|
1
|
+
import type { UseConsentResult } from "#react/use-consent";
|
|
2
2
|
/**
|
|
3
3
|
* Options for `useGoogleConsentSync`.
|
|
4
4
|
*
|
|
@@ -18,5 +18,4 @@ export interface UseGoogleConsentSyncOptions {
|
|
|
18
18
|
*
|
|
19
19
|
* @since 0.5.0-canary.6
|
|
20
20
|
*/
|
|
21
|
-
export declare function useGoogleConsentSync(consent: UseConsentResult, options?: UseGoogleConsentSyncOptions): void;
|
|
22
|
-
//# sourceMappingURL=use-google-consent-sync.d.ts.map
|
|
21
|
+
export declare function useGoogleConsentSync(consent: UseConsentResult, options?: UseGoogleConsentSyncOptions): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useEffect } from "react";
|
|
3
|
-
import { updateGoogleConsent } from "
|
|
3
|
+
import { updateGoogleConsent } from "#destinations/google-analytics";
|
|
4
4
|
/**
|
|
5
5
|
* Keeps Google Consent Mode v2 in sync with `useConsent`: emits `update` when a stored
|
|
6
6
|
* decision exists (including cross-tab / privacy-page saves), and optionally loads gtag
|
|
@@ -18,5 +18,4 @@ export function useGoogleConsentSync(consent, options = {}) {
|
|
|
18
18
|
loadGtagScript?.();
|
|
19
19
|
}
|
|
20
20
|
}, [consent.decision, consent.effectiveConsent.analytics, loadGtagScript]);
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=use-google-consent-sync.js.map
|
|
21
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { InitialConsentSnapshot, InitialConsentStore } from "
|
|
1
|
+
import type { InitialConsentSnapshot, InitialConsentStore } from "#client/initial-consent-store";
|
|
2
2
|
/**
|
|
3
3
|
* Reactive view of a `createInitialConsentStore` — kicks off resolution on mount (a no-op
|
|
4
4
|
* when the app already did so at router creation) and re-renders once the server lane
|
|
@@ -7,5 +7,4 @@ import type { InitialConsentSnapshot, InitialConsentStore } from "#/client/initi
|
|
|
7
7
|
*
|
|
8
8
|
* @since 0.5.0-canary.6
|
|
9
9
|
*/
|
|
10
|
-
export declare function useInitialConsent(store: InitialConsentStore): InitialConsentSnapshot;
|
|
11
|
-
//# sourceMappingURL=use-initial-consent.d.ts.map
|
|
10
|
+
export declare function useInitialConsent(store: InitialConsentStore): InitialConsentSnapshot;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ONE_YEAR_IN_SECONDS } from "
|
|
1
|
+
import { ONE_YEAR_IN_SECONDS } from "#core/cookie";
|
|
2
2
|
// The only shape the client ever mints (crypto.randomUUID) — anything else is rejected.
|
|
3
3
|
const UUID_PATTERN = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
|
|
4
4
|
// Conservative subset of the RFC 6265 cookie-name token.
|
|
@@ -67,5 +67,4 @@ export function resolveAnonymousIdCookie(options) {
|
|
|
67
67
|
export function resolveClearAnonymousIdCookie(cookieName) {
|
|
68
68
|
assertValidAnonymousIdCookieName(cookieName);
|
|
69
69
|
return { name: cookieName, path: "/", sameSite: "lax", secure: true };
|
|
70
|
-
}
|
|
71
|
-
//# sourceMappingURL=anonymous-id-cookie.js.map
|
|
70
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConsentReceipt } from "
|
|
1
|
+
import type { ConsentReceipt } from "#core/consent-receipt";
|
|
2
2
|
/**
|
|
3
3
|
* Persistence backend for consent receipts — the durable store is the consumer's to supply
|
|
4
4
|
* (a database, an append-only log). The store is **append-only**: `append` never overwrites,
|
|
@@ -52,5 +52,4 @@ export interface ReceiptStoreBackend {
|
|
|
52
52
|
*/
|
|
53
53
|
export declare function createDurableReceiptStore(options: {
|
|
54
54
|
backend: ReceiptStoreBackend;
|
|
55
|
-
}): ReceiptStore;
|
|
56
|
-
//# sourceMappingURL=consent-receipt-store.d.ts.map
|
|
55
|
+
}): ReceiptStore;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConsentReceipt, ConsentReceiptInput } from "
|
|
1
|
+
import type { ConsentReceipt, ConsentReceiptInput } from "#core/consent-receipt";
|
|
2
2
|
/**
|
|
3
3
|
* The receipt information-structure version this builder emits (ISO/IEC TS 27560-shaped).
|
|
4
4
|
* Bump when the receipt field set changes; stored receipts carry it so a reader can migrate.
|
|
@@ -37,5 +37,4 @@ export interface BuildConsentReceiptOptions {
|
|
|
37
37
|
*
|
|
38
38
|
* @since 0.5.0-canary.6
|
|
39
39
|
*/
|
|
40
|
-
export declare function buildConsentReceipt(options: BuildConsentReceiptOptions): ConsentReceipt;
|
|
41
|
-
//# sourceMappingURL=consent-receipt.d.ts.map
|
|
40
|
+
export declare function buildConsentReceipt(options: BuildConsentReceiptOptions): ConsentReceipt;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConsentCategory, InitialConsent } from "
|
|
1
|
+
import type { ConsentCategory, InitialConsent } from "#core/consent";
|
|
2
2
|
/**
|
|
3
3
|
* Options for `resolveInitialConsent`.
|
|
4
4
|
*
|
|
@@ -24,5 +24,4 @@ export interface InitialConsentOptions {
|
|
|
24
24
|
*
|
|
25
25
|
* @since 0.5.0-canary.6
|
|
26
26
|
*/
|
|
27
|
-
export declare function resolveInitialConsent(options: InitialConsentOptions): InitialConsent;
|
|
28
|
-
//# sourceMappingURL=initial-consent.d.ts.map
|
|
27
|
+
export declare function resolveInitialConsent(options: InitialConsentOptions): InitialConsent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { resolveConsentMode, resolveDefaultConsent, STRICTEST_INITIAL_CONSENT } from "
|
|
2
|
-
import { resolveRegionFromCountryCode } from "
|
|
1
|
+
import { resolveConsentMode, resolveDefaultConsent, STRICTEST_INITIAL_CONSENT } from "#core/consent";
|
|
2
|
+
import { resolveRegionFromCountryCode } from "#server/region";
|
|
3
3
|
/**
|
|
4
4
|
* Pure region → mode → default-consent resolution for server functions (or a fail-closed
|
|
5
5
|
* bake when country is unknown). Named with the `resolve*` family it composes.
|
|
@@ -27,5 +27,4 @@ export function resolveInitialConsent(options) {
|
|
|
27
27
|
mode,
|
|
28
28
|
region,
|
|
29
29
|
};
|
|
30
|
-
}
|
|
31
|
-
//# sourceMappingURL=initial-consent.js.map
|
|
30
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConsentDecision } from "
|
|
1
|
+
import type { ConsentDecision } from "#core/consent";
|
|
2
2
|
/**
|
|
3
3
|
* A GA4 event for the Measurement Protocol. `params` are flat scalars — GA4 rejects nested values and booleans.
|
|
4
4
|
*
|
|
@@ -67,5 +67,4 @@ export interface SendMeasurementProtocolEventsOptions {
|
|
|
67
67
|
*
|
|
68
68
|
* @since 0.5.0-canary.6
|
|
69
69
|
*/
|
|
70
|
-
export declare function sendMeasurementProtocolEvents(options: SendMeasurementProtocolEventsOptions): Promise<void>;
|
|
71
|
-
//# sourceMappingURL=measurement-protocol.d.ts.map
|
|
70
|
+
export declare function sendMeasurementProtocolEvents(options: SendMeasurementProtocolEventsOptions): Promise<void>;
|
package/dist/server/region.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConsentRegion } from "
|
|
1
|
+
import type { ConsentRegion } from "#core/consent";
|
|
2
2
|
/**
|
|
3
3
|
* EU member states — GDPR opt-in via `resolveConsentMode("eu")`.
|
|
4
4
|
*
|
|
@@ -23,5 +23,4 @@ export declare const OPT_IN_EQUIVALENT_COUNTRY_CODES: ReadonlySet<string>;
|
|
|
23
23
|
*
|
|
24
24
|
* @since 0.5.0-canary.4
|
|
25
25
|
*/
|
|
26
|
-
export declare function resolveRegionFromCountryCode(countryCode: string | undefined): ConsentRegion;
|
|
27
|
-
//# sourceMappingURL=region.d.ts.map
|
|
26
|
+
export declare function resolveRegionFromCountryCode(countryCode: string | undefined): ConsentRegion;
|
package/dist/server/region.js
CHANGED
|
@@ -64,5 +64,4 @@ export interface SubmitGa4UserDeletionOptions {
|
|
|
64
64
|
*
|
|
65
65
|
* @since 0.5.0-canary.6
|
|
66
66
|
*/
|
|
67
|
-
export declare function submitGa4UserDeletion(options: SubmitGa4UserDeletionOptions): Promise<void>;
|
|
68
|
-
//# sourceMappingURL=user-deletion.d.ts.map
|
|
67
|
+
export declare function submitGa4UserDeletion(options: SubmitGa4UserDeletionOptions): Promise<void>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* framework-neutral data each build tool maps to its own guard: TanStack Start's
|
|
4
4
|
* `importProtection.client.specifiers`, Next's `server-only`, Remix's `.server` convention.
|
|
5
5
|
* Ships and versions with the package instead of going stale in each consumer's config.
|
|
6
|
-
* Nothing in this package imports it — its consumers are app build configs (see apps/
|
|
6
|
+
* Nothing in this package imports it — its consumers are app build configs (see apps/web
|
|
7
7
|
* vite.config.ts).
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -15,5 +15,4 @@
|
|
|
15
15
|
*
|
|
16
16
|
* @since 0.5.0-canary.6
|
|
17
17
|
*/
|
|
18
|
-
export declare const SERVER_ONLY_SUBPATHS: ReadonlyArray<string>;
|
|
19
|
-
//# sourceMappingURL=import-protection.d.ts.map
|
|
18
|
+
export declare const SERVER_ONLY_SUBPATHS: ReadonlyArray<string>;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* framework-neutral data each build tool maps to its own guard: TanStack Start's
|
|
4
4
|
* `importProtection.client.specifiers`, Next's `server-only`, Remix's `.server` convention.
|
|
5
5
|
* Ships and versions with the package instead of going stale in each consumer's config.
|
|
6
|
-
* Nothing in this package imports it — its consumers are app build configs (see apps/
|
|
6
|
+
* Nothing in this package imports it — its consumers are app build configs (see apps/web
|
|
7
7
|
* vite.config.ts).
|
|
8
8
|
*
|
|
9
9
|
* @example
|
|
@@ -19,5 +19,4 @@ export const SERVER_ONLY_SUBPATHS = [
|
|
|
19
19
|
"@codefast/tracking/server",
|
|
20
20
|
"@codefast/tracking/server/**",
|
|
21
21
|
"@codefast/tracking/adapters/**",
|
|
22
|
-
];
|
|
23
|
-
//# sourceMappingURL=import-protection.js.map
|
|
22
|
+
];
|