@walkeros/web-source-cmp-cookiebot 4.9.0-next-1793116456867 → 4.9.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @walkeros/web-source-cmp-cookiebot
2
2
 
3
- ## 4.9.0-next-1793116456867
3
+ ## 4.9.0
4
4
 
5
5
  ### Patch Changes
6
6
 
@@ -10,16 +10,24 @@
10
10
  `marketing`. Strictly necessary cookies are reported as `necessary` and grant
11
11
  no consent group. Implied consent is skipped unless `explicitOnly` is `false`,
12
12
  so by default a visitor Cookiebot never asks sends no consent.
13
+ - Updated dependencies [a67546d]
13
14
  - Updated dependencies [5313635]
14
15
  - Updated dependencies [5313635]
15
16
  - Updated dependencies [34fd225]
17
+ - Updated dependencies [1306d8a]
18
+ - Updated dependencies [1306d8a]
16
19
  - Updated dependencies [34fd225]
17
20
  - Updated dependencies [5313635]
21
+ - Updated dependencies [1306d8a]
22
+ - Updated dependencies [fa46337]
18
23
  - Updated dependencies [5313635]
19
24
  - Updated dependencies [5313635]
20
25
  - Updated dependencies [5313635]
21
26
  - Updated dependencies [5313635]
22
27
  - Updated dependencies [34fd225]
28
+ - Updated dependencies [fa46337]
29
+ - Updated dependencies [1306d8a]
30
+ - Updated dependencies [1fb57b0]
23
31
  - Updated dependencies [5313635]
24
- - @walkeros/collector@4.9.0-next-1793116456867
25
- - @walkeros/core@4.9.0-next-1793116456867
32
+ - @walkeros/core@4.9.0
33
+ - @walkeros/collector@4.9.0
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/types/index.ts"],"sourcesContent":["import type { Source, WalkerOS } from '@walkeros/core';\nimport type {\n Types,\n Settings,\n CookiebotConsent,\n CookiebotWindow,\n} from './types';\n\n// Export types for external usage\nexport * as SourceCookiebot from './types';\n\n/**\n * Default category mapping from Cookiebot to walkerOS consent groups.\n *\n * - preferences -> functional\n * - statistics -> analytics\n * - marketing -> marketing\n *\n * `necessary` has no entry and keeps its own name: Cookiebot always grants\n * it, so mapping it to functional would grant functional with every choice.\n */\nexport const DEFAULT_CATEGORY_MAP: Record<string, string> = {\n preferences: 'functional',\n statistics: 'analytics',\n marketing: 'marketing',\n};\n\n/**\n * Cookiebot's window events for a decision. uc.js fires one of them on every\n * page load with a stored choice and again after each new choice or\n * withdrawal. Its `CookieConsentOn*` aliases and `CookiebotOnConsentReady`,\n * which fires before Cookiebot's version check, are left out.\n */\nconst DECISION_EVENTS = ['CookiebotOnAccept', 'CookiebotOnDecline'];\n\n/**\n * Cookiebot consent management source for walkerOS.\n *\n * This source reads Cookiebot's consent and translates it to walkerOS\n * consent commands.\n *\n * Two detection paths:\n * 1. Already loaded: window.Cookiebot with a response\n * 2. Decision: CookiebotOnAccept and CookiebotOnDecline window events\n *\n * @example\n * ```typescript\n * import { sourceCookiebot } from '@walkeros/web-source-cmp-cookiebot';\n *\n * await startFlow({\n * sources: {\n * consent: {\n * code: sourceCookiebot,\n * config: {\n * settings: {\n * categoryMap: {\n * statistics: 'statistics', // Custom mapping\n * },\n * },\n * },\n * },\n * },\n * });\n * ```\n */\nexport const sourceCookiebot: Source.Init<Types> = async (context) => {\n const { config, env } = context;\n const { elb } = env;\n\n // Resolve window with fallback to globalThis\n const actualWindow: CookiebotWindow | undefined =\n env.window ??\n (typeof globalThis.window !== 'undefined' ? globalThis.window : undefined);\n\n // Merge user settings with defaults (user overrides win)\n const mergedCategoryMap = {\n ...DEFAULT_CATEGORY_MAP,\n ...(config?.settings?.categoryMap ?? {}),\n };\n\n // Build normalized (lowercase) lookup map for case-insensitive matching\n const normalizedMap: Record<string, string> = {};\n Object.entries(mergedCategoryMap).forEach(([key, value]) => {\n normalizedMap[key.toLowerCase()] = value;\n });\n\n const settings: Settings = {\n categoryMap: mergedCategoryMap, // Preserves original casing for config\n explicitOnly: config?.settings?.explicitOnly ?? true,\n };\n\n const fullConfig: Source.Config<Types> = { settings };\n\n // Track the listener for cleanup\n let decisionListener: (() => void) | undefined;\n // The last state sent, so a repeated signal for the same choice is dropped\n let lastState: string | undefined;\n\n /**\n * Map Cookiebot categories to walkerOS consent groups. When several\n * categories map to the same group, any deny denies: the group is true only\n * if every one of them is true. Non-boolean fields (method, stamp) are\n * skipped.\n */\n const toState = (consent: CookiebotConsent): WalkerOS.Consent => {\n const state: WalkerOS.Consent = {};\n Object.entries(consent).forEach(([category, value]) => {\n if (typeof value !== 'boolean') return;\n const mapped = normalizedMap[category.toLowerCase()] ?? category;\n // Any deny denies: once false, stays false\n state[mapped] =\n state[mapped] === undefined ? value : state[mapped] && value;\n });\n return state;\n };\n\n /**\n * Read window.Cookiebot.consent and publish it as a walker consent command.\n * A consent without method is no consent. With explicitOnly, only an\n * explicit method is published.\n */\n const handleConsent = () => {\n const consent = actualWindow?.Cookiebot?.consent;\n const method = consent?.method?.toLowerCase();\n if (!consent || !method) return;\n if (settings.explicitOnly && method !== 'explicit') return;\n\n const state = toState(consent);\n if (Object.keys(state).length === 0) return;\n\n // Cookiebot fires a decision event on every page load with a stored\n // choice, so a static read and that event report the same state twice.\n const key = JSON.stringify(Object.entries(state).sort());\n if (key === lastState) return;\n lastState = key;\n\n elb('walker consent', state);\n };\n\n // Attach the listener and perform the static consent read. Deferred to\n // init() (Pass 2 of initSources) so the factory (Pass 1) stays side-effect\n // free: no listener registration and no `elb('walker consent')` emit during\n // construction.\n const init = async (): Promise<void> => {\n if (!actualWindow) return;\n\n // --- Detection path 1: Already loaded ---\n if (actualWindow.Cookiebot?.hasResponse) handleConsent();\n\n // --- Detection path 2: Decision events ---\n const onDecision = () => handleConsent();\n decisionListener = onDecision;\n DECISION_EVENTS.forEach((name) =>\n actualWindow.addEventListener(name, onDecision),\n );\n };\n\n return {\n type: 'cookiebot',\n config: fullConfig,\n push: elb,\n init,\n destroy: async (_context) => {\n const listener = decisionListener;\n if (!actualWindow || !listener) return;\n DECISION_EVENTS.forEach((name) =>\n actualWindow.removeEventListener(name, listener),\n );\n decisionListener = undefined;\n },\n };\n};\n\nexport default sourceCookiebot;\n","import type { Source, Elb } from '@walkeros/core';\n\ndeclare module '@walkeros/core' {\n interface SourceMap {\n cookiebot: { type: 'cookiebot'; platform?: 'web' };\n }\n}\n\n/**\n * Cookiebot consent object (`window.Cookiebot.consent`).\n *\n * The four categories are booleans Cookiebot always sets. `method` is\n * `'explicit'` when the visitor actively decided, `'implied'` when Cookiebot\n * consented on its own (outside a region that requires consent, an implied\n * banner, or an old consent of unknown method) and `null` without consent.\n */\nexport interface CookiebotConsent {\n necessary?: boolean;\n preferences?: boolean;\n statistics?: boolean;\n marketing?: boolean;\n method?: string | null;\n stamp?: string;\n [category: string]: boolean | string | null | undefined;\n}\n\n/**\n * The subset of the Cookiebot SDK (`window.Cookiebot`) the source reads.\n */\nexport interface CookiebotAPI {\n consent: CookiebotConsent;\n /** The visitor accepted at least one category. */\n consented?: boolean;\n /** The visitor declined. */\n declined?: boolean;\n /** The visitor answered the banner, or Cookiebot consented for them. */\n hasResponse?: boolean;\n}\n\n/**\n * Window surface the source touches: the Cookiebot global and event\n * registration. Narrowed instead of the global `Window`, so the package adds\n * no global declarations that could clash with `@types/cookiebot-sdk`, and\n * test mocks satisfy it without a cast.\n */\nexport interface CookiebotWindow {\n Cookiebot?: CookiebotAPI;\n addEventListener(type: string, listener: EventListener): void;\n removeEventListener(type: string, listener: EventListener): void;\n}\n\n/**\n * Settings for the Cookiebot source\n */\nexport interface Settings {\n /**\n * Map Cookiebot categories to walkerOS consent groups.\n * Keys: Cookiebot categories (necessary, preferences, statistics, marketing)\n * Values: walkerOS consent group names\n *\n * Comparison is case-insensitive. Categories without an entry pass through\n * under their own name, `necessary` among them by default.\n *\n * Default:\n * - preferences -> functional\n * - statistics -> analytics\n * - marketing -> marketing\n */\n categoryMap?: Record<string, string>;\n\n /**\n * Only process consent the visitor actively gave (`consent.method` is\n * `'explicit'`). Implied consent, which Cookiebot sets on its own, is\n * skipped.\n *\n * Default: true\n */\n explicitOnly?: boolean;\n}\n\n/**\n * User input settings (all optional)\n */\nexport type InitSettings = Partial<Settings>;\n\n/**\n * No mapping configuration for this source\n */\nexport interface Mapping {}\n\n/**\n * Push function type - uses elb for consent commands\n */\nexport type Push = Elb.Fn;\n\n/**\n * Environment interface for the Cookiebot source\n */\nexport interface Env extends Source.BaseEnv {\n window?: CookiebotWindow;\n}\n\n/**\n * Types bundle for the Cookiebot source\n */\nexport type Types = Source.Types<Settings, Mapping, Push, Env, InitSettings>;\n\n/**\n * Config type alias\n */\nexport type Config = Source.Config<Types>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;;;ADqBO,IAAM,uBAA+C;AAAA,EAC1D,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,WAAW;AACb;AAQA,IAAM,kBAAkB,CAAC,qBAAqB,oBAAoB;AAgC3D,IAAM,kBAAsC,OAAO,YAAY;AAjEtE;AAkEE,QAAM,EAAE,QAAQ,IAAI,IAAI;AACxB,QAAM,EAAE,IAAI,IAAI;AAGhB,QAAM,gBACJ,SAAI,WAAJ,YACC,OAAO,WAAW,WAAW,cAAc,WAAW,SAAS;AAGlE,QAAM,oBAAoB;AAAA,IACxB,GAAG;AAAA,IACH,IAAI,4CAAQ,aAAR,mBAAkB,gBAAlB,YAAiC,CAAC;AAAA,EACxC;AAGA,QAAM,gBAAwC,CAAC;AAC/C,SAAO,QAAQ,iBAAiB,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC1D,kBAAc,IAAI,YAAY,CAAC,IAAI;AAAA,EACrC,CAAC;AAED,QAAM,WAAqB;AAAA,IACzB,aAAa;AAAA;AAAA,IACb,eAAc,4CAAQ,aAAR,mBAAkB,iBAAlB,YAAkC;AAAA,EAClD;AAEA,QAAM,aAAmC,EAAE,SAAS;AAGpD,MAAI;AAEJ,MAAI;AAQJ,QAAM,UAAU,CAAC,Y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AAA,QAAQ,CAAC,SACvB,aAAa,oBAAoB,MAAM,QAAQ;AAAA,MACjD;AACA,yBAAmB;AAAA,IACrB;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;","names":["_a","_b"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/types/index.ts"],"sourcesContent":["import type { Source, WalkerOS } from '@walkeros/core';\nimport type {\n Types,\n Settings,\n CookiebotConsent,\n CookiebotWindow,\n} from './types';\n\n// Export types for external usage\nexport * as SourceCookiebot from './types';\n\n/**\n * Default category mapping from Cookiebot to walkerOS consent groups.\n *\n * - preferences -> functional\n * - statistics -> analytics\n * - marketing -> marketing\n *\n * `necessary` has no entry and keeps its own name: Cookiebot always grants\n * it, so mapping it to functional would grant functional with every choice.\n */\nexport const DEFAULT_CATEGORY_MAP: Record<string, string> = {\n preferences: 'functional',\n statistics: 'analytics',\n marketing: 'marketing',\n};\n\n/**\n * Cookiebot's window events for a decision. Cookiebot fires one of them when\n * the visitor accepts or declines in its dialog, and on every page load with a\n * stored choice. Its `CookieConsentOn*` aliases and `CookiebotOnConsentReady`,\n * which fires before Cookiebot's version check, are left out.\n */\nconst DECISION_EVENTS = ['CookiebotOnAccept', 'CookiebotOnDecline'];\n\n/**\n * Cookiebot consent management source for walkerOS.\n *\n * This source reads Cookiebot's consent and translates it to walkerOS\n * consent commands.\n *\n * Two detection paths:\n * 1. Already loaded: window.Cookiebot with a response\n * 2. Decision: CookiebotOnAccept and CookiebotOnDecline window events\n *\n * @example\n * ```typescript\n * import { sourceCookiebot } from '@walkeros/web-source-cmp-cookiebot';\n *\n * await startFlow({\n * sources: {\n * consent: {\n * code: sourceCookiebot,\n * config: {\n * settings: {\n * categoryMap: {\n * statistics: 'statistics', // Custom mapping\n * },\n * },\n * },\n * },\n * },\n * });\n * ```\n */\nexport const sourceCookiebot: Source.Init<Types> = async (context) => {\n const { config, env } = context;\n const { elb } = env;\n\n // Resolve window with fallback to globalThis\n const actualWindow: CookiebotWindow | undefined =\n env.window ??\n (typeof globalThis.window !== 'undefined' ? globalThis.window : undefined);\n\n // Merge user settings with defaults (user overrides win)\n const mergedCategoryMap = {\n ...DEFAULT_CATEGORY_MAP,\n ...(config?.settings?.categoryMap ?? {}),\n };\n\n // Build normalized (lowercase) lookup map for case-insensitive matching\n const normalizedMap: Record<string, string> = {};\n Object.entries(mergedCategoryMap).forEach(([key, value]) => {\n normalizedMap[key.toLowerCase()] = value;\n });\n\n const settings: Settings = {\n categoryMap: mergedCategoryMap, // Preserves original casing for config\n explicitOnly: config?.settings?.explicitOnly ?? true,\n };\n\n const fullConfig: Source.Config<Types> = { settings };\n\n // Track the listener for cleanup\n let decisionListener: (() => void) | undefined;\n // The last state sent, so a repeated signal for the same choice is dropped\n let lastState: string | undefined;\n\n /**\n * Map Cookiebot categories to walkerOS consent groups. When several\n * categories map to the same group, any deny denies: the group is true only\n * if every one of them is true. Non-boolean fields (method, stamp) are\n * skipped.\n */\n const toState = (consent: CookiebotConsent): WalkerOS.Consent => {\n const state: WalkerOS.Consent = {};\n Object.entries(consent).forEach(([category, value]) => {\n if (typeof value !== 'boolean') return;\n const mapped = normalizedMap[category.toLowerCase()] ?? category;\n // Any deny denies: once false, stays false\n state[mapped] =\n state[mapped] === undefined ? value : state[mapped] && value;\n });\n return state;\n };\n\n /**\n * Read window.Cookiebot.consent and publish it as a walker consent command.\n * A consent without method is no consent. With explicitOnly, only an\n * explicit method is published.\n */\n const handleConsent = () => {\n const consent = actualWindow?.Cookiebot?.consent;\n const method = consent?.method?.toLowerCase();\n if (!consent || !method) return;\n if (settings.explicitOnly && method !== 'explicit') return;\n\n const state = toState(consent);\n if (Object.keys(state).length === 0) return;\n\n // Cookiebot fires a decision event on every page load with a stored\n // choice, so a static read and that event report the same state twice.\n const key = JSON.stringify(Object.entries(state).sort());\n if (key === lastState) return;\n lastState = key;\n\n elb('walker consent', state);\n };\n\n // Attach the listener and perform the static consent read. Deferred to\n // init() (Pass 2 of initSources) so the factory (Pass 1) stays side-effect\n // free: no listener registration and no `elb('walker consent')` emit during\n // construction.\n const init = async (): Promise<void> => {\n if (!actualWindow) return;\n\n // --- Detection path 1: Already loaded ---\n if (actualWindow.Cookiebot?.hasResponse) handleConsent();\n\n // --- Detection path 2: Decision events ---\n const onDecision = () => handleConsent();\n decisionListener = onDecision;\n DECISION_EVENTS.forEach((name) =>\n actualWindow.addEventListener(name, onDecision),\n );\n };\n\n return {\n type: 'cookiebot',\n config: fullConfig,\n push: elb,\n init,\n destroy: async (_context) => {\n const listener = decisionListener;\n if (!actualWindow || !listener) return;\n DECISION_EVENTS.forEach((name) =>\n actualWindow.removeEventListener(name, listener),\n );\n decisionListener = undefined;\n },\n };\n};\n\nexport default sourceCookiebot;\n","import type { Source, Elb } from '@walkeros/core';\n\ndeclare module '@walkeros/core' {\n interface SourceMap {\n cookiebot: { type: 'cookiebot'; platform?: 'web' };\n }\n}\n\n/**\n * Cookiebot consent object (`window.Cookiebot.consent`).\n *\n * The four categories are booleans Cookiebot always sets. `method` is\n * `'explicit'` when the visitor actively decided, `'implied'` when Cookiebot\n * consented on its own (outside a region that requires consent, an implied\n * banner, or an old consent of unknown method) and `null` without consent.\n */\nexport interface CookiebotConsent {\n necessary?: boolean;\n preferences?: boolean;\n statistics?: boolean;\n marketing?: boolean;\n method?: string | null;\n stamp?: string;\n [category: string]: boolean | string | null | undefined;\n}\n\n/**\n * The subset of the Cookiebot SDK (`window.Cookiebot`) the source reads.\n */\nexport interface CookiebotAPI {\n consent: CookiebotConsent;\n /** The visitor accepted at least one category. */\n consented?: boolean;\n /** The visitor declined. */\n declined?: boolean;\n /** The visitor answered the banner, or Cookiebot consented for them. */\n hasResponse?: boolean;\n}\n\n/**\n * Window surface the source touches: the Cookiebot global and event\n * registration. Narrowed instead of the global `Window`, so the package adds\n * no global declarations that could clash with `@types/cookiebot-sdk`, and\n * test mocks satisfy it without a cast.\n */\nexport interface CookiebotWindow {\n Cookiebot?: CookiebotAPI;\n addEventListener(type: string, listener: EventListener): void;\n removeEventListener(type: string, listener: EventListener): void;\n}\n\n/**\n * Settings for the Cookiebot source\n */\nexport interface Settings {\n /**\n * Map Cookiebot categories to walkerOS consent groups.\n * Keys: Cookiebot categories (necessary, preferences, statistics, marketing)\n * Values: walkerOS consent group names\n *\n * Comparison is case-insensitive. Categories without an entry pass through\n * under their own name, `necessary` among them by default.\n *\n * Default:\n * - preferences -> functional\n * - statistics -> analytics\n * - marketing -> marketing\n */\n categoryMap?: Record<string, string>;\n\n /**\n * Only process consent the visitor actively gave (`consent.method` is\n * `'explicit'`). Implied consent, which Cookiebot sets on its own, is\n * skipped.\n *\n * Default: true\n */\n explicitOnly?: boolean;\n}\n\n/**\n * User input settings (all optional)\n */\nexport type InitSettings = Partial<Settings>;\n\n/**\n * No mapping configuration for this source\n */\nexport interface Mapping {}\n\n/**\n * Push function type - uses elb for consent commands\n */\nexport type Push = Elb.Fn;\n\n/**\n * Environment interface for the Cookiebot source\n */\nexport interface Env extends Source.BaseEnv {\n window?: CookiebotWindow;\n}\n\n/**\n * Types bundle for the Cookiebot source\n */\nexport type Types = Source.Types<Settings, Mapping, Push, Env, InitSettings>;\n\n/**\n * Config type alias\n */\nexport type Config = Source.Config<Types>;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA;;;ADqBO,IAAM,uBAA+C;AAAA,EAC1D,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,WAAW;AACb;AAQA,IAAM,kBAAkB,CAAC,qBAAqB,oBAAoB;AAgC3D,IAAM,kBAAsC,OAAO,YAAY;AAjEtE;AAkEE,QAAM,EAAE,QAAQ,IAAI,IAAI;AACxB,QAAM,EAAE,IAAI,IAAI;AAGhB,QAAM,gBACJ,SAAI,WAAJ,YACC,OAAO,WAAW,WAAW,cAAc,WAAW,SAAS;AAGlE,QAAM,oBAAoB;AAAA,IACxB,GAAG;AAAA,IACH,IAAI,4CAAQ,aAAR,mBAAkB,gBAAlB,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c;AAGnB,SAAIA,MAAA,aAAa,cAAb,gBAAAA,IAAwB,YAAa,eAAc;AAGvD,UAAM,aAAa,MAAM,cAAc;AACvC,uBAAmB;AACnB,oBAAgB;AAAA,MAAQ,CAAC,SACvB,aAAa,iBAAiB,MAAM,UAAU;AAAA,IAChD;AAAA,EACF;AAEA,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,IACN;AAAA,IACA,SAAS,OAAO,aAAa;AAC3B,YAAM,WAAW;AACjB,UAAI,CAAC,gBAAgB,CAAC,SAAU;AAChC,sBAAgB;AAAA,QAAQ,CAAC,SACvB,aAAa,oBAAoB,MAAM,QAAQ;AAAA,MACjD;AACA,yBAAmB;AAAA,IACrB;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;","names":["_a","_b"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/types/index.ts","../src/index.ts"],"sourcesContent":["import type { Source, Elb } from '@walkeros/core';\n\ndeclare module '@walkeros/core' {\n interface SourceMap {\n cookiebot: { type: 'cookiebot'; platform?: 'web' };\n }\n}\n\n/**\n * Cookiebot consent object (`window.Cookiebot.consent`).\n *\n * The four categories are booleans Cookiebot always sets. `method` is\n * `'explicit'` when the visitor actively decided, `'implied'` when Cookiebot\n * consented on its own (outside a region that requires consent, an implied\n * banner, or an old consent of unknown method) and `null` without consent.\n */\nexport interface CookiebotConsent {\n necessary?: boolean;\n preferences?: boolean;\n statistics?: boolean;\n marketing?: boolean;\n method?: string | null;\n stamp?: string;\n [category: string]: boolean | string | null | undefined;\n}\n\n/**\n * The subset of the Cookiebot SDK (`window.Cookiebot`) the source reads.\n */\nexport interface CookiebotAPI {\n consent: CookiebotConsent;\n /** The visitor accepted at least one category. */\n consented?: boolean;\n /** The visitor declined. */\n declined?: boolean;\n /** The visitor answered the banner, or Cookiebot consented for them. */\n hasResponse?: boolean;\n}\n\n/**\n * Window surface the source touches: the Cookiebot global and event\n * registration. Narrowed instead of the global `Window`, so the package adds\n * no global declarations that could clash with `@types/cookiebot-sdk`, and\n * test mocks satisfy it without a cast.\n */\nexport interface CookiebotWindow {\n Cookiebot?: CookiebotAPI;\n addEventListener(type: string, listener: EventListener): void;\n removeEventListener(type: string, listener: EventListener): void;\n}\n\n/**\n * Settings for the Cookiebot source\n */\nexport interface Settings {\n /**\n * Map Cookiebot categories to walkerOS consent groups.\n * Keys: Cookiebot categories (necessary, preferences, statistics, marketing)\n * Values: walkerOS consent group names\n *\n * Comparison is case-insensitive. Categories without an entry pass through\n * under their own name, `necessary` among them by default.\n *\n * Default:\n * - preferences -> functional\n * - statistics -> analytics\n * - marketing -> marketing\n */\n categoryMap?: Record<string, string>;\n\n /**\n * Only process consent the visitor actively gave (`consent.method` is\n * `'explicit'`). Implied consent, which Cookiebot sets on its own, is\n * skipped.\n *\n * Default: true\n */\n explicitOnly?: boolean;\n}\n\n/**\n * User input settings (all optional)\n */\nexport type InitSettings = Partial<Settings>;\n\n/**\n * No mapping configuration for this source\n */\nexport interface Mapping {}\n\n/**\n * Push function type - uses elb for consent commands\n */\nexport type Push = Elb.Fn;\n\n/**\n * Environment interface for the Cookiebot source\n */\nexport interface Env extends Source.BaseEnv {\n window?: CookiebotWindow;\n}\n\n/**\n * Types bundle for the Cookiebot source\n */\nexport type Types = Source.Types<Settings, Mapping, Push, Env, InitSettings>;\n\n/**\n * Config type alias\n */\nexport type Config = Source.Config<Types>;\n","import type { Source, WalkerOS } from '@walkeros/core';\nimport type {\n Types,\n Settings,\n CookiebotConsent,\n CookiebotWindow,\n} from './types';\n\n// Export types for external usage\nexport * as SourceCookiebot from './types';\n\n/**\n * Default category mapping from Cookiebot to walkerOS consent groups.\n *\n * - preferences -> functional\n * - statistics -> analytics\n * - marketing -> marketing\n *\n * `necessary` has no entry and keeps its own name: Cookiebot always grants\n * it, so mapping it to functional would grant functional with every choice.\n */\nexport const DEFAULT_CATEGORY_MAP: Record<string, string> = {\n preferences: 'functional',\n statistics: 'analytics',\n marketing: 'marketing',\n};\n\n/**\n * Cookiebot's window events for a decision. uc.js fires one of them on every\n * page load with a stored choice and again after each new choice or\n * withdrawal. Its `CookieConsentOn*` aliases and `CookiebotOnConsentReady`,\n * which fires before Cookiebot's version check, are left out.\n */\nconst DECISION_EVENTS = ['CookiebotOnAccept', 'CookiebotOnDecline'];\n\n/**\n * Cookiebot consent management source for walkerOS.\n *\n * This source reads Cookiebot's consent and translates it to walkerOS\n * consent commands.\n *\n * Two detection paths:\n * 1. Already loaded: window.Cookiebot with a response\n * 2. Decision: CookiebotOnAccept and CookiebotOnDecline window events\n *\n * @example\n * ```typescript\n * import { sourceCookiebot } from '@walkeros/web-source-cmp-cookiebot';\n *\n * await startFlow({\n * sources: {\n * consent: {\n * code: sourceCookiebot,\n * config: {\n * settings: {\n * categoryMap: {\n * statistics: 'statistics', // Custom mapping\n * },\n * },\n * },\n * },\n * },\n * });\n * ```\n */\nexport const sourceCookiebot: Source.Init<Types> = async (context) => {\n const { config, env } = context;\n const { elb } = env;\n\n // Resolve window with fallback to globalThis\n const actualWindow: CookiebotWindow | undefined =\n env.window ??\n (typeof globalThis.window !== 'undefined' ? globalThis.window : undefined);\n\n // Merge user settings with defaults (user overrides win)\n const mergedCategoryMap = {\n ...DEFAULT_CATEGORY_MAP,\n ...(config?.settings?.categoryMap ?? {}),\n };\n\n // Build normalized (lowercase) lookup map for case-insensitive matching\n const normalizedMap: Record<string, string> = {};\n Object.entries(mergedCategoryMap).forEach(([key, value]) => {\n normalizedMap[key.toLowerCase()] = value;\n });\n\n const settings: Settings = {\n categoryMap: mergedCategoryMap, // Preserves original casing for config\n explicitOnly: config?.settings?.explicitOnly ?? true,\n };\n\n const fullConfig: Source.Config<Types> = { settings };\n\n // Track the listener for cleanup\n let decisionListener: (() => void) | undefined;\n // The last state sent, so a repeated signal for the same choice is dropped\n let lastState: string | undefined;\n\n /**\n * Map Cookiebot categories to walkerOS consent groups. When several\n * categories map to the same group, any deny denies: the group is true only\n * if every one of them is true. Non-boolean fields (method, stamp) are\n * skipped.\n */\n const toState = (consent: CookiebotConsent): WalkerOS.Consent => {\n const state: WalkerOS.Consent = {};\n Object.entries(consent).forEach(([category, value]) => {\n if (typeof value !== 'boolean') return;\n const mapped = normalizedMap[category.toLowerCase()] ?? category;\n // Any deny denies: once false, stays false\n state[mapped] =\n state[mapped] === undefined ? value : state[mapped] && value;\n });\n return state;\n };\n\n /**\n * Read window.Cookiebot.consent and publish it as a walker consent command.\n * A consent without method is no consent. With explicitOnly, only an\n * explicit method is published.\n */\n const handleConsent = () => {\n const consent = actualWindow?.Cookiebot?.consent;\n const method = consent?.method?.toLowerCase();\n if (!consent || !method) return;\n if (settings.explicitOnly && method !== 'explicit') return;\n\n const state = toState(consent);\n if (Object.keys(state).length === 0) return;\n\n // Cookiebot fires a decision event on every page load with a stored\n // choice, so a static read and that event report the same state twice.\n const key = JSON.stringify(Object.entries(state).sort());\n if (key === lastState) return;\n lastState = key;\n\n elb('walker consent', state);\n };\n\n // Attach the listener and perform the static consent read. Deferred to\n // init() (Pass 2 of initSources) so the factory (Pass 1) stays side-effect\n // free: no listener registration and no `elb('walker consent')` emit during\n // construction.\n const init = async (): Promise<void> => {\n if (!actualWindow) return;\n\n // --- Detection path 1: Already loaded ---\n if (actualWindow.Cookiebot?.hasResponse) handleConsent();\n\n // --- Detection path 2: Decision events ---\n const onDecision = () => handleConsent();\n decisionListener = onDecision;\n DECISION_EVENTS.forEach((name) =>\n actualWindow.addEventListener(name, onDecision),\n );\n };\n\n return {\n type: 'cookiebot',\n config: fullConfig,\n push: elb,\n init,\n destroy: async (_context) => {\n const listener = decisionListener;\n if (!actualWindow || !listener) return;\n DECISION_EVENTS.forEach((name) =>\n actualWindow.removeEventListener(name, listener),\n );\n decisionListener = undefined;\n },\n };\n};\n\nexport default sourceCookiebot;\n"],"mappings":";AAAA;;;ACqBO,IAAM,uBAA+C;AAAA,EAC1D,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,WAAW;AACb;AAQA,IAAM,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AAW,WAAY;AAEpD,UAAM,QAAQ,QAAQ,OAAO;AAC7B,QAAI,OAAO,KAAK,KAAK,EAAE,WAAW,EAAG;AAIrC,UAAM,MAAM,KAAK,UAAU,OAAO,QAAQ,KAAK,EAAE,KAAK,CAAC;AACvD,QAAI,QAAQ,UAAW;AACvB,gBAAY;AAEZ,QAAI,kBAAkB,KAAK;AAAA,EAC7B;AAMA,QAAM,OAAO,YAA2B;AA/I1C,QAAAD;AAgJI,QAAI,CAAC,aAAc;AAGnB,SAAIA,MAAA,aAAa,cAAb,gBAAAA,IAAwB,YAAa,eAAc;AAGvD,UAAM,aAAa,MAAM,cAAc;AACvC,uBAAmB;AACnB,oBAAgB;AAAA,MAAQ,CAAC,SACvB,aAAa,iBAAiB,MAAM,UAAU;AAAA,IAChD;AAAA,EACF;AAEA,SAAO;AAAA,IACL,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,MAAM;AAAA,IACN;AAAA,IACA,SAAS,OAAO,aAAa;AAC3B,YAAM,WAAW;AACjB,UAAI,CAAC,gBAAgB,CAAC,SAAU;AAChC,sBAAgB;AAAA,QAAQ,CAAC,SACvB,aAAa,oBAAoB,MAAM,QAAQ;AAAA,MACjD;AACA,yBAAmB;AAAA,IACrB;AAAA,EACF;AACF;AAEA,IAAO,gBAAQ;","names":["_a","_b"]}
1
+ {"version":3,"sources":["../src/types/index.ts","../src/index.ts"],"sourcesContent":["import type { Source, Elb } from '@walkeros/core';\n\ndeclare module '@walkeros/core' {\n interface SourceMap {\n cookiebot: { type: 'cookiebot'; platform?: 'web' };\n }\n}\n\n/**\n * Cookiebot consent object (`window.Cookiebot.consent`).\n *\n * The four categories are booleans Cookiebot always sets. `method` is\n * `'explicit'` when the visitor actively decided, `'implied'` when Cookiebot\n * consented on its own (outside a region that requires consent, an implied\n * banner, or an old consent of unknown method) and `null` without consent.\n */\nexport interface CookiebotConsent {\n necessary?: boolean;\n preferences?: boolean;\n statistics?: boolean;\n marketing?: boolean;\n method?: string | null;\n stamp?: string;\n [category: string]: boolean | string | null | undefined;\n}\n\n/**\n * The subset of the Cookiebot SDK (`window.Cookiebot`) the source reads.\n */\nexport interface CookiebotAPI {\n consent: CookiebotConsent;\n /** The visitor accepted at least one category. */\n consented?: boolean;\n /** The visitor declined. */\n declined?: boolean;\n /** The visitor answered the banner, or Cookiebot consented for them. */\n hasResponse?: boolean;\n}\n\n/**\n * Window surface the source touches: the Cookiebot global and event\n * registration. Narrowed instead of the global `Window`, so the package adds\n * no global declarations that could clash with `@types/cookiebot-sdk`, and\n * test mocks satisfy it without a cast.\n */\nexport interface CookiebotWindow {\n Cookiebot?: CookiebotAPI;\n addEventListener(type: string, listener: EventListener): void;\n removeEventListener(type: string, listener: EventListener): void;\n}\n\n/**\n * Settings for the Cookiebot source\n */\nexport interface Settings {\n /**\n * Map Cookiebot categories to walkerOS consent groups.\n * Keys: Cookiebot categories (necessary, preferences, statistics, marketing)\n * Values: walkerOS consent group names\n *\n * Comparison is case-insensitive. Categories without an entry pass through\n * under their own name, `necessary` among them by default.\n *\n * Default:\n * - preferences -> functional\n * - statistics -> analytics\n * - marketing -> marketing\n */\n categoryMap?: Record<string, string>;\n\n /**\n * Only process consent the visitor actively gave (`consent.method` is\n * `'explicit'`). Implied consent, which Cookiebot sets on its own, is\n * skipped.\n *\n * Default: true\n */\n explicitOnly?: boolean;\n}\n\n/**\n * User input settings (all optional)\n */\nexport type InitSettings = Partial<Settings>;\n\n/**\n * No mapping configuration for this source\n */\nexport interface Mapping {}\n\n/**\n * Push function type - uses elb for consent commands\n */\nexport type Push = Elb.Fn;\n\n/**\n * Environment interface for the Cookiebot source\n */\nexport interface Env extends Source.BaseEnv {\n window?: CookiebotWindow;\n}\n\n/**\n * Types bundle for the Cookiebot source\n */\nexport type Types = Source.Types<Settings, Mapping, Push, Env, InitSettings>;\n\n/**\n * Config type alias\n */\nexport type Config = Source.Config<Types>;\n","import type { Source, WalkerOS } from '@walkeros/core';\nimport type {\n Types,\n Settings,\n CookiebotConsent,\n CookiebotWindow,\n} from './types';\n\n// Export types for external usage\nexport * as SourceCookiebot from './types';\n\n/**\n * Default category mapping from Cookiebot to walkerOS consent groups.\n *\n * - preferences -> functional\n * - statistics -> analytics\n * - marketing -> marketing\n *\n * `necessary` has no entry and keeps its own name: Cookiebot always grants\n * it, so mapping it to functional would grant functional with every choice.\n */\nexport const DEFAULT_CATEGORY_MAP: Record<string, string> = {\n preferences: 'functional',\n statistics: 'analytics',\n marketing: 'marketing',\n};\n\n/**\n * Cookiebot's window events for a decision. Cookiebot fires one of them when\n * the visitor accepts or declines in its dialog, and on every page load with a\n * stored choice. Its `CookieConsentOn*` aliases and `CookiebotOnConsentReady`,\n * which fires before Cookiebot's version check, are left out.\n */\nconst DECISION_EVENTS = ['CookiebotOnAccept', 'CookiebotOnDecline'];\n\n/**\n * Cookiebot consent management source for walkerOS.\n *\n * This source reads Cookiebot's consent and translates it to walkerOS\n * consent commands.\n *\n * Two detection paths:\n * 1. Already loaded: window.Cookiebot with a response\n * 2. Decision: CookiebotOnAccept and CookiebotOnDecline window events\n *\n * @example\n * ```typescript\n * import { sourceCookiebot } from '@walkeros/web-source-cmp-cookiebot';\n *\n * await startFlow({\n * sources: {\n * consent: {\n * code: sourceCookiebot,\n * config: {\n * settings: {\n * categoryMap: {\n * statistics: 'statistics', // Custom mapping\n * },\n * },\n * },\n * },\n * },\n * });\n * ```\n */\nexport const sourceCookiebot: Source.Init<Types> = async (context) => {\n const { config, env } = context;\n const { elb } = env;\n\n // Resolve window with fallback to globalThis\n const actualWindow: CookiebotWindow | undefined =\n env.window ??\n (typeof globalThis.window !== 'undefined' ? globalThis.window : undefined);\n\n // Merge user settings with defaults (user overrides win)\n const mergedCategoryMap = {\n ...DEFAULT_CATEGORY_MAP,\n ...(config?.settings?.categoryMap ?? {}),\n };\n\n // Build normalized (lowercase) lookup map for case-insensitive matching\n const normalizedMap: Record<string, string> = {};\n Object.entries(mergedCategoryMap).forEach(([key, value]) => {\n normalizedMap[key.toLowerCase()] = value;\n });\n\n const settings: Settings = {\n categoryMap: mergedCategoryMap, // Preserves original casing for config\n explicitOnly: config?.settings?.explicitOnly ?? true,\n };\n\n const fullConfig: Source.Config<Types> = { settings };\n\n // Track the listener for cleanup\n let decisionListener: (() => void) | undefined;\n // The last state sent, so a repeated signal for the same choice is dropped\n let lastState: string | undefined;\n\n /**\n * Map Cookiebot categories to walkerOS consent groups. When several\n * categories map to the same group, any deny denies: the group is true only\n * if every one of them is true. Non-boolean fields (method, stamp) are\n * skipped.\n */\n const toState = (consent: CookiebotConsent): WalkerOS.Consent => {\n const state: WalkerOS.Consent = {};\n Object.entries(consent).forEach(([category, value]) => {\n if (typeof value !== 'boolean') return;\n const mapped = normalizedMap[category.toLowerCase()] ?? category;\n // Any deny denies: once false, stays false\n state[mapped] =\n state[mapped] === undefined ? value : state[mapped] && value;\n });\n return state;\n };\n\n /**\n * Read window.Cookiebot.consent and publish it as a walker consent command.\n * A consent without method is no consent. With explicitOnly, only an\n * explicit method is published.\n */\n const handleConsent = () => {\n const consent = actualWindow?.Cookiebot?.consent;\n const method = consent?.method?.toLowerCase();\n if (!consent || !method) return;\n if (settings.explicitOnly && method !== 'explicit') return;\n\n const state = toState(consent);\n if (Object.keys(state).length === 0) return;\n\n // Cookiebot fires a decision event on every page load with a stored\n // choice, so a static read and that event report the same state twice.\n const key = JSON.stringify(Object.entries(state).sort());\n if (key === lastState) return;\n lastState = key;\n\n elb('walker consent', state);\n };\n\n // Attach the listener and perform the static consent read. Deferred to\n // init() (Pass 2 of initSources) so the factory (Pass 1) stays side-effect\n // free: no listener registration and no `elb('walker consent')` emit during\n // construction.\n const init = async (): Promise<void> => {\n if (!actualWindow) return;\n\n // --- Detection path 1: Already loaded ---\n if (actualWindow.Cookiebot?.hasResponse) handleConsent();\n\n // --- Detection path 2: Decision events ---\n const onDecision = () => handleConsent();\n decisionListener = onDecision;\n DECISION_EVENTS.forEach((name) =>\n actualWindow.addEventListener(name, onDecision),\n );\n };\n\n return {\n type: 'cookiebot',\n config: fullConfig,\n push: elb,\n init,\n destroy: async (_context) => {\n const listener = decisionListener;\n if (!actualWindow || !listener) return;\n DECISION_EVENTS.forEach((name) =>\n actualWindow.removeEventListener(name, listener),\n );\n decisionListener = undefined;\n },\n };\n};\n\nexport default sourceCookiebot;\n"],"mappings":";AAAA;;;ACqBO,IAAM,uBAA+C;AAAA,EAC1D,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,WAAW;AACb;AAQA,IAAM,kBAAkB,CAAC,qBAAqB,oBAAoB;AAgC3D,IAAM,kBAAsC,OAAO,YAAY;AAjEtE;AAkEE,QAAM,EAAE,QAAQ,IAAI,IAAI;AACxB,QAAM,EAAE,IAAI,IAAI;AAGhB,QAAM,gBACJ,SAAI,WAAJ,YACC,OAAO,WAAW,WAAW,cAAc,WAAW,SAAS;AAGlE,QAAM,oBAAoB;AAAA,IACxB,GAAG;AAAA,IACH,IAAI,4CAAQ,aAAR,mBAAkB,gBAAlB,YAAiC,CAAC;AAAA,EACxC;AAGA,QAAM,gBAAwC,CAAC;AAC/C,SAAO,QAAQ,iBAAiB,EAAE,QAAQ,CAAC,CAAC,KAAK,KAAK,MAAM;AAC1D,kBAAc,IAAI,YAAY,CAAC,IAAI;AAAA,EACrC,CAAC;AAED,QAAM,WAAqB;AAAA,IACzB,aAAa;AAAA;AAAA,IACb,eAAc,4CAAQ,aAAR,mBAAkB,iBAAlB,YAAkC;AAAA,EAClD;AAEA,QAAM,aAAmC,EAAE,SAAS;AAGpD,MAAI;AAEJ,MAAI;AAQJ,QAAM,UAAU,CAAC,YAAgD;AAC/D,UAAM,QAA0B,CAAC;AACjC,WAAO,QAAQ,OAAO,EAAE,QAAQ,CAAC,CAAC,UAAU,KAAK,MAAM;AA1G3D,UAAAA;AA2GM,UAAI,OAAO,UAAU,UAAW;AAChC,YAAM,UAASA,MAAA,cAAc,SAAS,YAAY,CAAC,MAApC,OAAAA,MAAyC;AAExD,YAAM,MAAM,IACV,MAAM,MAAM,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version": "4.9.0",
5
5
  "type": "source",
6
6
  "platform": [
7
7
  "web"
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@walkeros/web-source-cmp-cookiebot",
3
3
  "description": "Cookiebot consent management source for walkerOS",
4
- "version": "4.9.0-next-1793116456867",
4
+ "version": "4.9.0",
5
5
  "license": "MIT",
6
6
  "walkerOS": {
7
7
  "type": "source",
@@ -46,8 +46,8 @@
46
46
  "update": "npx npm-check-updates -u && npm update"
47
47
  },
48
48
  "dependencies": {
49
- "@walkeros/core": "4.9.0-next-1793116456867",
50
- "@walkeros/collector": "4.9.0-next-1793116456867"
49
+ "@walkeros/core": "4.9.0",
50
+ "@walkeros/collector": "4.9.0"
51
51
  },
52
52
  "devDependencies": {},
53
53
  "repository": {