File tree Expand file tree Collapse file tree 7 files changed +23
-10
lines changed Expand file tree Collapse file tree 7 files changed +23
-10
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @scaleway/use-analytics " : patch
3+ ---
4+
5+ remove fields from package.json
Original file line number Diff line number Diff line change 55 "engines" : {
66 "node" : " >=20.x"
77 },
8- "main" : " ./dist/index.cjs" ,
98 "sideEffects" : false ,
109 "type" : " module" ,
11- "module" : " ./dist/index.js" ,
12- "types" : " ./dist/index.d.ts" ,
1310 "exports" : {
1411 "." : {
1512 "types" : " ./dist/analytics/index.d.ts" ,
Original file line number Diff line number Diff line change 11import type { ConsentOptions , LoadOptions } from '@rudderstack/analytics-js'
22
3- export const consentOptions : ConsentOptions = {
3+ export const defaultConsentOptions : ConsentOptions = {
44 trackConsent : true ,
55 discardPreConsentEvents : true ,
66 storage : {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import type { ReactNode } from 'react'
55import { useDeepCompareEffectNoCheck } from 'use-deep-compare-effect'
66import { destSDKBaseURL , pluginsSDKBaseURL } from '../constants'
77import type { CategoryKind } from '../types'
8- import { consentOptions , defaultLoadOptions } from './constants'
8+ import { defaultConsentOptions , defaultLoadOptions } from './constants'
99import { trackLink } from './segments/trackLink'
1010import type { TrackLink } from './segments/trackLink'
1111import { userMigrationsTraits } from './segments/userMigrationsTraits'
@@ -111,7 +111,7 @@ export function AnalyticsProvider<T extends Events>({
111111 userMigrationsTraits ( rudderAnalytics )
112112
113113 rudderAnalytics . consent ( {
114- ...consentOptions ,
114+ ...defaultConsentOptions ,
115115 consentManagement : {
116116 enabled : true ,
117117 allowedConsentIds : allowedConsents ,
Original file line number Diff line number Diff line change 22 CookieConsentProvider ,
33 useCookieConsent ,
44} from './CookieConsentProvider'
5- // export { SegmentConsentMiddleware } from './SegmentConsentMiddleware'
5+ export { CATEGORIES } from '../constants'
6+ export type { AnalyticsIntegration , CategoryKind , Consents } from '../types'
Original file line number Diff line number Diff line change 1+ export { AnalyticsProvider , useAnalytics , useDestinations } from './analytics'
2+ export {
3+ defaultLoadOptions ,
4+ defaultConsentOptions ,
5+ } from './analytics/constants'
6+
17export type {
28 Analytics ,
39 OnEventError ,
410 AnalyticsProviderProps ,
511} from './analytics/useAnalytics'
6-
7- export { AnalyticsProvider , useAnalytics , useDestinations } from './analytics'
12+ export type {
13+ AnalyticsIntegration ,
14+ CategoryKind ,
15+ Consents ,
16+ Consent ,
17+ } from './types'
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export const isCategoryKind = (key: string): key is CategoryKind =>
99type Provider = 'custom'
1010type ResolutionStrategy = 'and' | 'or'
1111
12- type Consents = { consent : CategoryKind } [ ]
12+ export type Consents = { consent : CategoryKind } [ ]
1313
1414type Destination = {
1515 id : string
You can’t perform that action at this time.
0 commit comments