@feelflow/ffid-sdk 6.0.0 → 7.0.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.
@@ -343,31 +343,20 @@ type GetDocumentWire = z.infer<typeof GetDocumentWireSchema>;
343
343
  * call. Spec §5.3 requires non-null warnings to be visible to the user.
344
344
  *
345
345
  * @remarks
346
- * Multi-locale consumers should pattern-match on `code` and resolve their own
347
- * copy. The `message` field defaults to the SDK's built-in Japanese copy
348
- * (`DEFAULT_MERGE_WARNING_MESSAGES`); pass `mergeWarningMessages` on
349
- * `<FFIDAnalyticsProvider>` to inject locale-specific overrides without
350
- * losing the warning event itself.
346
+ * Code-only since v7.0.0 (#3402). Copy lives in the consumer's own i18n layer:
347
+ * pattern-match on `code` and resolve it against a
348
+ * `Record<FFIDConsentMergeWarning, string>` so TypeScript exhaustiveness-checks
349
+ * every literal and the dictionary can never leak `undefined`.
350
+ *
351
+ * Kept as an object rather than collapsed into a bare
352
+ * `FFIDConsentMergeWarning` alias for two reasons: consumers that followed the
353
+ * v5.5 deprecation notice already read `warning.code`, so this shape needs no
354
+ * second migration from them; and it leaves room to widen into a discriminated
355
+ * union (`{ code: 'drift_detected', mergeStrategy: 'db_wins' } | ...`) without
356
+ * another breaking change.
351
357
  */
352
358
  interface FFIDConsentMergeWarningEvent {
353
359
  code: FFIDConsentMergeWarning;
354
- /**
355
- * Human-readable copy. Defaults to the SDK's built-in Japanese copy unless
356
- * `<FFIDAnalyticsProvider mergeWarningMessages={...}>` overrides it.
357
- *
358
- * @deprecated Scheduled for removal in `@feelflow/ffid-sdk` v6.0 so that
359
- * `FFIDConsentMergeWarningEvent` becomes symmetric with
360
- * `FFIDConsentSyncResult.warning` (code-only). Consumers should
361
- * pattern-match on `code` and resolve copy in their own i18n layer.
362
- *
363
- * Migration: replace `event.message` reads with `messages[event.code]`
364
- * where `messages` is typed as
365
- * `Record<FFIDConsentMergeWarning, string>` (not `Partial<...>`) so
366
- * TypeScript exhaustiveness-checks every enum value at compile time
367
- * and the dictionary can never leak `undefined` the way an unchecked
368
- * `event.message` could in pre-v5.5 SDKs.
369
- */
370
- message: string;
371
360
  }
372
361
  /**
373
362
  * Result of a sync call surfaced to consumers — drops the wire envelope and
@@ -779,27 +768,11 @@ interface FFIDAnalyticsProviderProps {
779
768
  * suppressed by a UX dismissal.
780
769
  */
781
770
  dismissalCooldownMinutes?: number;
782
- /**
783
- * Per-locale override map for `FFIDConsentMergeWarningEvent.message`.
784
- *
785
- * The Provider derives `message` for the `onConsentChange(state, warning)`
786
- * callback from this map, falling back to `DEFAULT_MERGE_WARNING_MESSAGES`
787
- * (JP) for any missing key. Pass only the keys you need to translate —
788
- * partial overrides are merged with the defaults.
789
- *
790
- * Note: the underlying `code` (`FFIDConsentMergeWarning`) is the canonical
791
- * identifier — multi-locale consumers should prefer pattern-matching on
792
- * `warning.code` over reading `warning.message` directly. The `message`
793
- * field is `@deprecated` and scheduled for removal in v6.0; this prop is
794
- * the interim escape hatch so non-JP consumers don't have to wait for the
795
- * v6.0 major to surface localized copy.
796
- */
797
- mergeWarningMessages?: Partial<Record<FFIDConsentMergeWarning, string>>;
798
771
  /** Optional fetch override (mainly for tests). */
799
772
  fetchImpl?: typeof fetch;
800
773
  children: ReactNode;
801
774
  }
802
- declare function FFIDAnalyticsProvider({ baseUrl, serviceApiKey, getAccessToken, gaMeasurementId, gaEnabled, sentryReplay, sentry, onConsentChange, onError, autoShowBanner, dismissalCooldownMinutes, mergeWarningMessages, fetchImpl, children, }: FFIDAnalyticsProviderProps): React.JSX.Element;
775
+ declare function FFIDAnalyticsProvider({ baseUrl, serviceApiKey, getAccessToken, gaMeasurementId, gaEnabled, sentryReplay, sentry, onConsentChange, onError, autoShowBanner, dismissalCooldownMinutes, fetchImpl, children, }: FFIDAnalyticsProviderProps): React.JSX.Element;
803
776
 
804
777
  interface FFIDConsentContextValue {
805
778
  /** Current consent state. Always non-null; "not yet decided" is encoded by `hasDecided=false`. */
@@ -850,12 +823,6 @@ interface FFIDConsentContextValue {
850
823
  }
851
824
  declare const FFID_CONSENT_NOT_DECIDED_STATE: FFIDConsentState;
852
825
  declare const FFIDConsentContext: React$1.Context<FFIDConsentContextValue>;
853
- /**
854
- * Warning literal-keyed default copy for `local_state_overridden` /
855
- * `shared_device_detected` / `drift_detected`. Surfaced by the Provider via
856
- * `onConsentChange(state, warning)` per spec §5.3.
857
- */
858
- declare const DEFAULT_MERGE_WARNING_MESSAGES: Record<FFIDConsentMergeWarning, string>;
859
826
 
860
827
  /**
861
828
  * `useFFIDConsent` — primary hook for reading + updating cookie consent.
@@ -1071,4 +1038,4 @@ interface FFIDCookieLinkProps {
1071
1038
  }
1072
1039
  declare function FFIDCookieLink({ children, className, style, id, }: FFIDCookieLinkProps): React.JSX.Element;
1073
1040
 
1074
- export { FFID_CONSENT_NOT_DECIDED_STATE as $, ALL_DENIED_EXCEPT_NECESSARY as A, type FFIDConsentMergeWarning as B, CONSENT_COOKIE_MAX_AGE_SEC as C, DEFAULT_CONSENT_ERROR_MESSAGES as D, type FFIDConsentMergeWarningEvent as E, type FFIDConsentResult as F, type GetConsentMeWire as G, FFIDConsentMergeWarningSchema as H, type FFIDConsentSource as I, FFIDConsentSourceSchema as J, FFIDConsentStateSchema as K, FFIDConsentUpdateSchema as L, FFIDCookieBanner as M, type FFIDCookieBannerClassNames as N, type FFIDCookieBannerProps as O, type PostConsentWire as P, FFIDCookieLink as Q, type FFIDCookieLinkProps as R, FFIDCookiePolicySchema as S, FFIDCookieSettings as T, type FFIDCookieSettingsClassNames as U, type FFIDCookieSettingsProps as V, type FFIDInternalConsentSource as W, FFIDInternalConsentSourceSchema as X, type FFIDPublicConsentSource as Y, FFIDPublicConsentSourceSchema as Z, FFID_CONSENT_ERROR_CODES as _, type FFIDConsentState as a, type GetCategoriesWire as a0, GetCategoriesWireSchema as a1, GetConsentMeWireSchema as a2, type GetDocumentWire as a3, GetDocumentWireSchema as a4, type GtagBridge as a5, type GtagBridgeOptions as a6, type PostConsentRequest as a7, PostConsentRequestSchema as a8, PostConsentWireSchema as a9, type PostSyncRequest as aa, PostSyncRequestSchema as ab, PostSyncWireSchema as ac, PostWithdrawWireSchema as ad, type UseFFIDConsentPreferencesReturn as ae, type UseFFIDConsentReturn as af, clearConsentDismissalTimestamp as ag, clearConsentSessionMirror as ah, createGtagBridge as ai, decodeConsentCookie as aj, deleteConsentCookie as ak, encodeConsentCookie as al, mapCategoriesToGtagParams as am, readConsentCookie as an, readConsentDismissalTimestamp as ao, readConsentSessionMirror as ap, useFFIDConsent as aq, useFFIDConsentPreferences as ar, writeConsentCookie as as, writeConsentDismissalTimestamp as at, writeConsentSessionMirror as au, type FFIDConsentUpdate as b, type FFIDConsentCategories as c, type FFIDConsentSyncResult as d, type FFIDConsentCategoryMetadata as e, type FFIDCookiePolicy as f, type PostSyncWire as g, type PostWithdrawWire as h, CONSENT_COOKIE_NAME as i, CONSENT_DISMISSAL_TIMESTAMP_KEY as j, CONSENT_SESSION_STORAGE_KEY as k, COOKIE_VERSION as l, DEFAULT_MERGE_WARNING_MESSAGES as m, DeviceIdSchema as n, FFIDAnalyticsProvider as o, type FFIDAnalyticsProviderProps as p, FFIDConsentCategoriesSchema as q, type FFIDConsentCategoryCode as r, FFIDConsentCategoryCodeSchema as s, FFIDConsentCategoryMetadataSchema as t, FFIDConsentContext as u, type FFIDConsentContextValue as v, FFIDConsentError as w, type FFIDConsentErrorCode as x, type FFIDConsentMergeStrategy as y, FFIDConsentMergeStrategySchema as z };
1041
+ export { type GetCategoriesWire as $, ALL_DENIED_EXCEPT_NECESSARY as A, type FFIDConsentMergeWarningEvent as B, CONSENT_COOKIE_MAX_AGE_SEC as C, DEFAULT_CONSENT_ERROR_MESSAGES as D, FFIDConsentMergeWarningSchema as E, type FFIDConsentResult as F, type GetConsentMeWire as G, type FFIDConsentSource as H, FFIDConsentSourceSchema as I, FFIDConsentStateSchema as J, FFIDConsentUpdateSchema as K, FFIDCookieBanner as L, type FFIDCookieBannerClassNames as M, type FFIDCookieBannerProps as N, FFIDCookieLink as O, type PostConsentWire as P, type FFIDCookieLinkProps as Q, FFIDCookiePolicySchema as R, FFIDCookieSettings as S, type FFIDCookieSettingsClassNames as T, type FFIDCookieSettingsProps as U, type FFIDInternalConsentSource as V, FFIDInternalConsentSourceSchema as W, type FFIDPublicConsentSource as X, FFIDPublicConsentSourceSchema as Y, FFID_CONSENT_ERROR_CODES as Z, FFID_CONSENT_NOT_DECIDED_STATE as _, type FFIDConsentState as a, GetCategoriesWireSchema as a0, GetConsentMeWireSchema as a1, type GetDocumentWire as a2, GetDocumentWireSchema as a3, type GtagBridge as a4, type GtagBridgeOptions as a5, type PostConsentRequest as a6, PostConsentRequestSchema as a7, PostConsentWireSchema as a8, type PostSyncRequest as a9, PostSyncRequestSchema as aa, PostSyncWireSchema as ab, PostWithdrawWireSchema as ac, type UseFFIDConsentPreferencesReturn as ad, type UseFFIDConsentReturn as ae, clearConsentDismissalTimestamp as af, clearConsentSessionMirror as ag, createGtagBridge as ah, decodeConsentCookie as ai, deleteConsentCookie as aj, encodeConsentCookie as ak, mapCategoriesToGtagParams as al, readConsentCookie as am, readConsentDismissalTimestamp as an, readConsentSessionMirror as ao, useFFIDConsent as ap, useFFIDConsentPreferences as aq, writeConsentCookie as ar, writeConsentDismissalTimestamp as as, writeConsentSessionMirror as at, type FFIDConsentUpdate as b, type FFIDConsentCategories as c, type FFIDConsentSyncResult as d, type FFIDConsentCategoryMetadata as e, type FFIDCookiePolicy as f, type PostSyncWire as g, type PostWithdrawWire as h, CONSENT_COOKIE_NAME as i, CONSENT_DISMISSAL_TIMESTAMP_KEY as j, CONSENT_SESSION_STORAGE_KEY as k, COOKIE_VERSION as l, DeviceIdSchema as m, FFIDAnalyticsProvider as n, type FFIDAnalyticsProviderProps as o, FFIDConsentCategoriesSchema as p, type FFIDConsentCategoryCode as q, FFIDConsentCategoryCodeSchema as r, FFIDConsentCategoryMetadataSchema as s, FFIDConsentContext as t, type FFIDConsentContextValue as u, FFIDConsentError as v, type FFIDConsentErrorCode as w, type FFIDConsentMergeStrategy as x, FFIDConsentMergeStrategySchema as y, type FFIDConsentMergeWarning as z };
@@ -343,31 +343,20 @@ type GetDocumentWire = z.infer<typeof GetDocumentWireSchema>;
343
343
  * call. Spec §5.3 requires non-null warnings to be visible to the user.
344
344
  *
345
345
  * @remarks
346
- * Multi-locale consumers should pattern-match on `code` and resolve their own
347
- * copy. The `message` field defaults to the SDK's built-in Japanese copy
348
- * (`DEFAULT_MERGE_WARNING_MESSAGES`); pass `mergeWarningMessages` on
349
- * `<FFIDAnalyticsProvider>` to inject locale-specific overrides without
350
- * losing the warning event itself.
346
+ * Code-only since v7.0.0 (#3402). Copy lives in the consumer's own i18n layer:
347
+ * pattern-match on `code` and resolve it against a
348
+ * `Record<FFIDConsentMergeWarning, string>` so TypeScript exhaustiveness-checks
349
+ * every literal and the dictionary can never leak `undefined`.
350
+ *
351
+ * Kept as an object rather than collapsed into a bare
352
+ * `FFIDConsentMergeWarning` alias for two reasons: consumers that followed the
353
+ * v5.5 deprecation notice already read `warning.code`, so this shape needs no
354
+ * second migration from them; and it leaves room to widen into a discriminated
355
+ * union (`{ code: 'drift_detected', mergeStrategy: 'db_wins' } | ...`) without
356
+ * another breaking change.
351
357
  */
352
358
  interface FFIDConsentMergeWarningEvent {
353
359
  code: FFIDConsentMergeWarning;
354
- /**
355
- * Human-readable copy. Defaults to the SDK's built-in Japanese copy unless
356
- * `<FFIDAnalyticsProvider mergeWarningMessages={...}>` overrides it.
357
- *
358
- * @deprecated Scheduled for removal in `@feelflow/ffid-sdk` v6.0 so that
359
- * `FFIDConsentMergeWarningEvent` becomes symmetric with
360
- * `FFIDConsentSyncResult.warning` (code-only). Consumers should
361
- * pattern-match on `code` and resolve copy in their own i18n layer.
362
- *
363
- * Migration: replace `event.message` reads with `messages[event.code]`
364
- * where `messages` is typed as
365
- * `Record<FFIDConsentMergeWarning, string>` (not `Partial<...>`) so
366
- * TypeScript exhaustiveness-checks every enum value at compile time
367
- * and the dictionary can never leak `undefined` the way an unchecked
368
- * `event.message` could in pre-v5.5 SDKs.
369
- */
370
- message: string;
371
360
  }
372
361
  /**
373
362
  * Result of a sync call surfaced to consumers — drops the wire envelope and
@@ -779,27 +768,11 @@ interface FFIDAnalyticsProviderProps {
779
768
  * suppressed by a UX dismissal.
780
769
  */
781
770
  dismissalCooldownMinutes?: number;
782
- /**
783
- * Per-locale override map for `FFIDConsentMergeWarningEvent.message`.
784
- *
785
- * The Provider derives `message` for the `onConsentChange(state, warning)`
786
- * callback from this map, falling back to `DEFAULT_MERGE_WARNING_MESSAGES`
787
- * (JP) for any missing key. Pass only the keys you need to translate —
788
- * partial overrides are merged with the defaults.
789
- *
790
- * Note: the underlying `code` (`FFIDConsentMergeWarning`) is the canonical
791
- * identifier — multi-locale consumers should prefer pattern-matching on
792
- * `warning.code` over reading `warning.message` directly. The `message`
793
- * field is `@deprecated` and scheduled for removal in v6.0; this prop is
794
- * the interim escape hatch so non-JP consumers don't have to wait for the
795
- * v6.0 major to surface localized copy.
796
- */
797
- mergeWarningMessages?: Partial<Record<FFIDConsentMergeWarning, string>>;
798
771
  /** Optional fetch override (mainly for tests). */
799
772
  fetchImpl?: typeof fetch;
800
773
  children: ReactNode;
801
774
  }
802
- declare function FFIDAnalyticsProvider({ baseUrl, serviceApiKey, getAccessToken, gaMeasurementId, gaEnabled, sentryReplay, sentry, onConsentChange, onError, autoShowBanner, dismissalCooldownMinutes, mergeWarningMessages, fetchImpl, children, }: FFIDAnalyticsProviderProps): React.JSX.Element;
775
+ declare function FFIDAnalyticsProvider({ baseUrl, serviceApiKey, getAccessToken, gaMeasurementId, gaEnabled, sentryReplay, sentry, onConsentChange, onError, autoShowBanner, dismissalCooldownMinutes, fetchImpl, children, }: FFIDAnalyticsProviderProps): React.JSX.Element;
803
776
 
804
777
  interface FFIDConsentContextValue {
805
778
  /** Current consent state. Always non-null; "not yet decided" is encoded by `hasDecided=false`. */
@@ -850,12 +823,6 @@ interface FFIDConsentContextValue {
850
823
  }
851
824
  declare const FFID_CONSENT_NOT_DECIDED_STATE: FFIDConsentState;
852
825
  declare const FFIDConsentContext: React$1.Context<FFIDConsentContextValue>;
853
- /**
854
- * Warning literal-keyed default copy for `local_state_overridden` /
855
- * `shared_device_detected` / `drift_detected`. Surfaced by the Provider via
856
- * `onConsentChange(state, warning)` per spec §5.3.
857
- */
858
- declare const DEFAULT_MERGE_WARNING_MESSAGES: Record<FFIDConsentMergeWarning, string>;
859
826
 
860
827
  /**
861
828
  * `useFFIDConsent` — primary hook for reading + updating cookie consent.
@@ -1071,4 +1038,4 @@ interface FFIDCookieLinkProps {
1071
1038
  }
1072
1039
  declare function FFIDCookieLink({ children, className, style, id, }: FFIDCookieLinkProps): React.JSX.Element;
1073
1040
 
1074
- export { FFID_CONSENT_NOT_DECIDED_STATE as $, ALL_DENIED_EXCEPT_NECESSARY as A, type FFIDConsentMergeWarning as B, CONSENT_COOKIE_MAX_AGE_SEC as C, DEFAULT_CONSENT_ERROR_MESSAGES as D, type FFIDConsentMergeWarningEvent as E, type FFIDConsentResult as F, type GetConsentMeWire as G, FFIDConsentMergeWarningSchema as H, type FFIDConsentSource as I, FFIDConsentSourceSchema as J, FFIDConsentStateSchema as K, FFIDConsentUpdateSchema as L, FFIDCookieBanner as M, type FFIDCookieBannerClassNames as N, type FFIDCookieBannerProps as O, type PostConsentWire as P, FFIDCookieLink as Q, type FFIDCookieLinkProps as R, FFIDCookiePolicySchema as S, FFIDCookieSettings as T, type FFIDCookieSettingsClassNames as U, type FFIDCookieSettingsProps as V, type FFIDInternalConsentSource as W, FFIDInternalConsentSourceSchema as X, type FFIDPublicConsentSource as Y, FFIDPublicConsentSourceSchema as Z, FFID_CONSENT_ERROR_CODES as _, type FFIDConsentState as a, type GetCategoriesWire as a0, GetCategoriesWireSchema as a1, GetConsentMeWireSchema as a2, type GetDocumentWire as a3, GetDocumentWireSchema as a4, type GtagBridge as a5, type GtagBridgeOptions as a6, type PostConsentRequest as a7, PostConsentRequestSchema as a8, PostConsentWireSchema as a9, type PostSyncRequest as aa, PostSyncRequestSchema as ab, PostSyncWireSchema as ac, PostWithdrawWireSchema as ad, type UseFFIDConsentPreferencesReturn as ae, type UseFFIDConsentReturn as af, clearConsentDismissalTimestamp as ag, clearConsentSessionMirror as ah, createGtagBridge as ai, decodeConsentCookie as aj, deleteConsentCookie as ak, encodeConsentCookie as al, mapCategoriesToGtagParams as am, readConsentCookie as an, readConsentDismissalTimestamp as ao, readConsentSessionMirror as ap, useFFIDConsent as aq, useFFIDConsentPreferences as ar, writeConsentCookie as as, writeConsentDismissalTimestamp as at, writeConsentSessionMirror as au, type FFIDConsentUpdate as b, type FFIDConsentCategories as c, type FFIDConsentSyncResult as d, type FFIDConsentCategoryMetadata as e, type FFIDCookiePolicy as f, type PostSyncWire as g, type PostWithdrawWire as h, CONSENT_COOKIE_NAME as i, CONSENT_DISMISSAL_TIMESTAMP_KEY as j, CONSENT_SESSION_STORAGE_KEY as k, COOKIE_VERSION as l, DEFAULT_MERGE_WARNING_MESSAGES as m, DeviceIdSchema as n, FFIDAnalyticsProvider as o, type FFIDAnalyticsProviderProps as p, FFIDConsentCategoriesSchema as q, type FFIDConsentCategoryCode as r, FFIDConsentCategoryCodeSchema as s, FFIDConsentCategoryMetadataSchema as t, FFIDConsentContext as u, type FFIDConsentContextValue as v, FFIDConsentError as w, type FFIDConsentErrorCode as x, type FFIDConsentMergeStrategy as y, FFIDConsentMergeStrategySchema as z };
1041
+ export { type GetCategoriesWire as $, ALL_DENIED_EXCEPT_NECESSARY as A, type FFIDConsentMergeWarningEvent as B, CONSENT_COOKIE_MAX_AGE_SEC as C, DEFAULT_CONSENT_ERROR_MESSAGES as D, FFIDConsentMergeWarningSchema as E, type FFIDConsentResult as F, type GetConsentMeWire as G, type FFIDConsentSource as H, FFIDConsentSourceSchema as I, FFIDConsentStateSchema as J, FFIDConsentUpdateSchema as K, FFIDCookieBanner as L, type FFIDCookieBannerClassNames as M, type FFIDCookieBannerProps as N, FFIDCookieLink as O, type PostConsentWire as P, type FFIDCookieLinkProps as Q, FFIDCookiePolicySchema as R, FFIDCookieSettings as S, type FFIDCookieSettingsClassNames as T, type FFIDCookieSettingsProps as U, type FFIDInternalConsentSource as V, FFIDInternalConsentSourceSchema as W, type FFIDPublicConsentSource as X, FFIDPublicConsentSourceSchema as Y, FFID_CONSENT_ERROR_CODES as Z, FFID_CONSENT_NOT_DECIDED_STATE as _, type FFIDConsentState as a, GetCategoriesWireSchema as a0, GetConsentMeWireSchema as a1, type GetDocumentWire as a2, GetDocumentWireSchema as a3, type GtagBridge as a4, type GtagBridgeOptions as a5, type PostConsentRequest as a6, PostConsentRequestSchema as a7, PostConsentWireSchema as a8, type PostSyncRequest as a9, PostSyncRequestSchema as aa, PostSyncWireSchema as ab, PostWithdrawWireSchema as ac, type UseFFIDConsentPreferencesReturn as ad, type UseFFIDConsentReturn as ae, clearConsentDismissalTimestamp as af, clearConsentSessionMirror as ag, createGtagBridge as ah, decodeConsentCookie as ai, deleteConsentCookie as aj, encodeConsentCookie as ak, mapCategoriesToGtagParams as al, readConsentCookie as am, readConsentDismissalTimestamp as an, readConsentSessionMirror as ao, useFFIDConsent as ap, useFFIDConsentPreferences as aq, writeConsentCookie as ar, writeConsentDismissalTimestamp as as, writeConsentSessionMirror as at, type FFIDConsentUpdate as b, type FFIDConsentCategories as c, type FFIDConsentSyncResult as d, type FFIDConsentCategoryMetadata as e, type FFIDCookiePolicy as f, type PostSyncWire as g, type PostWithdrawWire as h, CONSENT_COOKIE_NAME as i, CONSENT_DISMISSAL_TIMESTAMP_KEY as j, CONSENT_SESSION_STORAGE_KEY as k, COOKIE_VERSION as l, DeviceIdSchema as m, FFIDAnalyticsProvider as n, type FFIDAnalyticsProviderProps as o, FFIDConsentCategoriesSchema as p, type FFIDConsentCategoryCode as q, FFIDConsentCategoryCodeSchema as r, FFIDConsentCategoryMetadataSchema as s, FFIDConsentContext as t, type FFIDConsentContextValue as u, FFIDConsentError as v, type FFIDConsentErrorCode as w, type FFIDConsentMergeStrategy as x, FFIDConsentMergeStrategySchema as y, type FFIDConsentMergeWarning as z };
@@ -1675,7 +1675,7 @@ function validateTokenResponse(tokenResponse) {
1675
1675
  }
1676
1676
 
1677
1677
  // src/client/version-check.ts
1678
- var SDK_VERSION = "6.0.0";
1678
+ var SDK_VERSION = "7.0.0";
1679
1679
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1680
1680
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1681
1681
  function sdkHeaders() {
@@ -1677,7 +1677,7 @@ function validateTokenResponse(tokenResponse) {
1677
1677
  }
1678
1678
 
1679
1679
  // src/client/version-check.ts
1680
- var SDK_VERSION = "6.0.0";
1680
+ var SDK_VERSION = "7.0.0";
1681
1681
  var SDK_USER_AGENT = `FFID-SDK/${SDK_VERSION} (TypeScript)`;
1682
1682
  var SDK_VERSION_HEADER = "X-FFID-SDK-Version";
1683
1683
  function sdkHeaders() {
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { createContext, useMemo, useCallback, useState, useRef, useEffect, useContext } from 'react';
2
+ import { createContext, useCallback, useState, useRef, useEffect, useMemo, useContext } from 'react';
3
3
  import { jsx, jsxs } from 'react/jsx-runtime';
4
4
 
5
5
  var FFIDConsentCategoryCodeSchema = z.enum([
@@ -1077,11 +1077,6 @@ var FALLBACK_VALUE = {
1077
1077
  syncWithUser: defaultAction
1078
1078
  };
1079
1079
  var FFIDConsentContext = createContext(FALLBACK_VALUE);
1080
- var DEFAULT_MERGE_WARNING_MESSAGES = {
1081
- local_state_overridden: "\u5225\u306E\u7AEF\u672B\u3067\u4FDD\u5B58\u3055\u308C\u305F Cookie \u540C\u610F\u8A2D\u5B9A\u3067\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F",
1082
- shared_device_detected: "\u3053\u306E\u7AEF\u672B\u306F\u5225\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u3082\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002Cookie \u8A2D\u5B9A\u306F\u30A2\u30AB\u30A6\u30F3\u30C8\u3054\u3068\u306B\u4FDD\u5B58\u3055\u308C\u3066\u3044\u307E\u3059",
1083
- drift_detected: "\u4FDD\u5B58\u3055\u308C\u3066\u3044\u305F\u8A2D\u5B9A\u3068\u7570\u306A\u308B\u9805\u76EE\u304C\u3042\u3063\u305F\u305F\u3081\u3001\u65B0\u3057\u304F\u8A18\u9332\u3055\u308C\u307E\u3057\u305F"
1084
- };
1085
1080
  var DEFAULT_DISMISSAL_COOLDOWN_MINUTES = 30;
1086
1081
  var MS_PER_MINUTE = 6e4;
1087
1082
  function applyChanges(base, changes) {
@@ -1104,18 +1099,10 @@ function FFIDAnalyticsProvider({
1104
1099
  onError,
1105
1100
  autoShowBanner = true,
1106
1101
  dismissalCooldownMinutes = DEFAULT_DISMISSAL_COOLDOWN_MINUTES,
1107
- mergeWarningMessages,
1108
1102
  fetchImpl,
1109
1103
  children
1110
1104
  }) {
1111
1105
  const cooldownMs = Number.isFinite(dismissalCooldownMinutes) && dismissalCooldownMinutes > 0 ? dismissalCooldownMinutes * MS_PER_MINUTE : 0;
1112
- const resolvedMergeWarningMessages = useMemo(
1113
- () => ({
1114
- ...DEFAULT_MERGE_WARNING_MESSAGES,
1115
- ...mergeWarningMessages
1116
- }),
1117
- [mergeWarningMessages]
1118
- );
1119
1106
  const isWithinDismissalCooldown = useCallback(() => {
1120
1107
  if (cooldownMs <= 0) return false;
1121
1108
  const dismissedAt = readConsentDismissalTimestamp();
@@ -1385,19 +1372,7 @@ function FFIDAnalyticsProvider({
1385
1372
  setState(result.value.state);
1386
1373
  applyCategoriesSideEffects(result.value.state.categories);
1387
1374
  persistCategories(result.value.state.categories);
1388
- const warning = result.value.warning ? {
1389
- code: result.value.warning,
1390
- // Belt-and-suspenders fallback per spec §5.3: an empty-string
1391
- // override (`mergeWarningMessages={{ code: '' }}`) or a future
1392
- // wire-schema widening that adds a new `FFIDConsentMergeWarning`
1393
- // literal without a default copy would otherwise leak `''` /
1394
- // `undefined` into `warning.message`, silently breaking consumers
1395
- // that render it (`<Toast>{warning.message}</Toast>`,
1396
- // `Sentry.setContext`). Truthy-fallback preserves visibility of
1397
- // the JP default; consumers wanting to suppress display should
1398
- // pattern-match on `code` instead of mutating `message`.
1399
- message: resolvedMergeWarningMessages[result.value.warning] || DEFAULT_MERGE_WARNING_MESSAGES[result.value.warning]
1400
- } : null;
1375
+ const warning = result.value.warning ? { code: result.value.warning } : null;
1401
1376
  onConsentChange?.(result.value.state, warning);
1402
1377
  return result;
1403
1378
  }, [
@@ -1405,8 +1380,7 @@ function FFIDAnalyticsProvider({
1405
1380
  ensurePolicyVersion,
1406
1381
  onConsentChange,
1407
1382
  onError,
1408
- persistCategories,
1409
- resolvedMergeWarningMessages
1383
+ persistCategories
1410
1384
  ]);
1411
1385
  const openBanner = useCallback(() => setIsBannerOpen(true), []);
1412
1386
  const closeBanner = useCallback(() => {
@@ -2003,4 +1977,4 @@ function FFIDCookieLink({
2003
1977
  );
2004
1978
  }
2005
1979
 
2006
- export { ALL_DENIED_EXCEPT_NECESSARY, CONSENT_COOKIE_MAX_AGE_SEC, CONSENT_COOKIE_NAME, CONSENT_DISMISSAL_TIMESTAMP_KEY, CONSENT_SESSION_STORAGE_KEY, COOKIE_VERSION, DEFAULT_CONSENT_ERROR_MESSAGES, DEFAULT_MERGE_WARNING_MESSAGES, DEVICE_ID_LOCAL_STORAGE_KEY, DEVICE_ID_SESSION_STORAGE_KEY, DeviceIdSchema, FFIDAnalyticsProvider, FFIDConsentCategoriesSchema, FFIDConsentCategoryCodeSchema, FFIDConsentCategoryMetadataSchema, FFIDConsentContext, FFIDConsentError, FFIDConsentMergeStrategySchema, FFIDConsentMergeWarningSchema, FFIDConsentSourceSchema, FFIDConsentStateSchema, FFIDConsentUpdateSchema, FFIDCookieBanner, FFIDCookieLink, FFIDCookiePolicySchema, FFIDCookieSettings, FFIDInternalConsentSourceSchema, FFIDPublicConsentSourceSchema, FFID_CONSENT_ERROR_CODES, FFID_CONSENT_NOT_DECIDED_STATE, GetCategoriesWireSchema, GetConsentMeWireSchema, GetDocumentWireSchema, PostConsentRequestSchema, PostConsentWireSchema, PostSyncRequestSchema, PostSyncWireSchema, PostWithdrawWireSchema, clearConsentDismissalTimestamp, clearConsentSessionMirror, clearDeviceId, createConsentClient, createGtagBridge, decodeConsentCookie, deleteConsentCookie, encodeConsentCookie, generateDeviceId, getOrCreateDeviceId, isUuidV7, isValidDeviceId, mapCategoriesToGtagParams, mapConsentWireToState, mapMeWireToState, mapSyncWireToResult, mapWithdrawWireToState, readConsentCookie, readConsentDismissalTimestamp, readConsentSessionMirror, useFFIDConsent, useFFIDConsentPreferences, writeConsentCookie, writeConsentDismissalTimestamp, writeConsentSessionMirror };
1980
+ export { ALL_DENIED_EXCEPT_NECESSARY, CONSENT_COOKIE_MAX_AGE_SEC, CONSENT_COOKIE_NAME, CONSENT_DISMISSAL_TIMESTAMP_KEY, CONSENT_SESSION_STORAGE_KEY, COOKIE_VERSION, DEFAULT_CONSENT_ERROR_MESSAGES, DEVICE_ID_LOCAL_STORAGE_KEY, DEVICE_ID_SESSION_STORAGE_KEY, DeviceIdSchema, FFIDAnalyticsProvider, FFIDConsentCategoriesSchema, FFIDConsentCategoryCodeSchema, FFIDConsentCategoryMetadataSchema, FFIDConsentContext, FFIDConsentError, FFIDConsentMergeStrategySchema, FFIDConsentMergeWarningSchema, FFIDConsentSourceSchema, FFIDConsentStateSchema, FFIDConsentUpdateSchema, FFIDCookieBanner, FFIDCookieLink, FFIDCookiePolicySchema, FFIDCookieSettings, FFIDInternalConsentSourceSchema, FFIDPublicConsentSourceSchema, FFID_CONSENT_ERROR_CODES, FFID_CONSENT_NOT_DECIDED_STATE, GetCategoriesWireSchema, GetConsentMeWireSchema, GetDocumentWireSchema, PostConsentRequestSchema, PostConsentWireSchema, PostSyncRequestSchema, PostSyncWireSchema, PostWithdrawWireSchema, clearConsentDismissalTimestamp, clearConsentSessionMirror, clearDeviceId, createConsentClient, createGtagBridge, decodeConsentCookie, deleteConsentCookie, encodeConsentCookie, generateDeviceId, getOrCreateDeviceId, isUuidV7, isValidDeviceId, mapCategoriesToGtagParams, mapConsentWireToState, mapMeWireToState, mapSyncWireToResult, mapWithdrawWireToState, readConsentCookie, readConsentDismissalTimestamp, readConsentSessionMirror, useFFIDConsent, useFFIDConsentPreferences, writeConsentCookie, writeConsentDismissalTimestamp, writeConsentSessionMirror };
@@ -1079,11 +1079,6 @@ var FALLBACK_VALUE = {
1079
1079
  syncWithUser: defaultAction
1080
1080
  };
1081
1081
  var FFIDConsentContext = react.createContext(FALLBACK_VALUE);
1082
- var DEFAULT_MERGE_WARNING_MESSAGES = {
1083
- local_state_overridden: "\u5225\u306E\u7AEF\u672B\u3067\u4FDD\u5B58\u3055\u308C\u305F Cookie \u540C\u610F\u8A2D\u5B9A\u3067\u66F4\u65B0\u3055\u308C\u307E\u3057\u305F",
1084
- shared_device_detected: "\u3053\u306E\u7AEF\u672B\u306F\u5225\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u3067\u3082\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059\u3002Cookie \u8A2D\u5B9A\u306F\u30A2\u30AB\u30A6\u30F3\u30C8\u3054\u3068\u306B\u4FDD\u5B58\u3055\u308C\u3066\u3044\u307E\u3059",
1085
- drift_detected: "\u4FDD\u5B58\u3055\u308C\u3066\u3044\u305F\u8A2D\u5B9A\u3068\u7570\u306A\u308B\u9805\u76EE\u304C\u3042\u3063\u305F\u305F\u3081\u3001\u65B0\u3057\u304F\u8A18\u9332\u3055\u308C\u307E\u3057\u305F"
1086
- };
1087
1082
  var DEFAULT_DISMISSAL_COOLDOWN_MINUTES = 30;
1088
1083
  var MS_PER_MINUTE = 6e4;
1089
1084
  function applyChanges(base, changes) {
@@ -1106,18 +1101,10 @@ function FFIDAnalyticsProvider({
1106
1101
  onError,
1107
1102
  autoShowBanner = true,
1108
1103
  dismissalCooldownMinutes = DEFAULT_DISMISSAL_COOLDOWN_MINUTES,
1109
- mergeWarningMessages,
1110
1104
  fetchImpl,
1111
1105
  children
1112
1106
  }) {
1113
1107
  const cooldownMs = Number.isFinite(dismissalCooldownMinutes) && dismissalCooldownMinutes > 0 ? dismissalCooldownMinutes * MS_PER_MINUTE : 0;
1114
- const resolvedMergeWarningMessages = react.useMemo(
1115
- () => ({
1116
- ...DEFAULT_MERGE_WARNING_MESSAGES,
1117
- ...mergeWarningMessages
1118
- }),
1119
- [mergeWarningMessages]
1120
- );
1121
1108
  const isWithinDismissalCooldown = react.useCallback(() => {
1122
1109
  if (cooldownMs <= 0) return false;
1123
1110
  const dismissedAt = readConsentDismissalTimestamp();
@@ -1387,19 +1374,7 @@ function FFIDAnalyticsProvider({
1387
1374
  setState(result.value.state);
1388
1375
  applyCategoriesSideEffects(result.value.state.categories);
1389
1376
  persistCategories(result.value.state.categories);
1390
- const warning = result.value.warning ? {
1391
- code: result.value.warning,
1392
- // Belt-and-suspenders fallback per spec §5.3: an empty-string
1393
- // override (`mergeWarningMessages={{ code: '' }}`) or a future
1394
- // wire-schema widening that adds a new `FFIDConsentMergeWarning`
1395
- // literal without a default copy would otherwise leak `''` /
1396
- // `undefined` into `warning.message`, silently breaking consumers
1397
- // that render it (`<Toast>{warning.message}</Toast>`,
1398
- // `Sentry.setContext`). Truthy-fallback preserves visibility of
1399
- // the JP default; consumers wanting to suppress display should
1400
- // pattern-match on `code` instead of mutating `message`.
1401
- message: resolvedMergeWarningMessages[result.value.warning] || DEFAULT_MERGE_WARNING_MESSAGES[result.value.warning]
1402
- } : null;
1377
+ const warning = result.value.warning ? { code: result.value.warning } : null;
1403
1378
  onConsentChange?.(result.value.state, warning);
1404
1379
  return result;
1405
1380
  }, [
@@ -1407,8 +1382,7 @@ function FFIDAnalyticsProvider({
1407
1382
  ensurePolicyVersion,
1408
1383
  onConsentChange,
1409
1384
  onError,
1410
- persistCategories,
1411
- resolvedMergeWarningMessages
1385
+ persistCategories
1412
1386
  ]);
1413
1387
  const openBanner = react.useCallback(() => setIsBannerOpen(true), []);
1414
1388
  const closeBanner = react.useCallback(() => {
@@ -2012,7 +1986,6 @@ exports.CONSENT_DISMISSAL_TIMESTAMP_KEY = CONSENT_DISMISSAL_TIMESTAMP_KEY;
2012
1986
  exports.CONSENT_SESSION_STORAGE_KEY = CONSENT_SESSION_STORAGE_KEY;
2013
1987
  exports.COOKIE_VERSION = COOKIE_VERSION;
2014
1988
  exports.DEFAULT_CONSENT_ERROR_MESSAGES = DEFAULT_CONSENT_ERROR_MESSAGES;
2015
- exports.DEFAULT_MERGE_WARNING_MESSAGES = DEFAULT_MERGE_WARNING_MESSAGES;
2016
1989
  exports.DEVICE_ID_LOCAL_STORAGE_KEY = DEVICE_ID_LOCAL_STORAGE_KEY;
2017
1990
  exports.DEVICE_ID_SESSION_STORAGE_KEY = DEVICE_ID_SESSION_STORAGE_KEY;
2018
1991
  exports.DeviceIdSchema = DeviceIdSchema;
@@ -1,34 +1,34 @@
1
1
  'use strict';
2
2
 
3
- var chunkCI6RBG77_cjs = require('../chunk-CI6RBG77.cjs');
3
+ var chunkBI6UM2EJ_cjs = require('../chunk-BI6UM2EJ.cjs');
4
4
 
5
5
 
6
6
 
7
7
  Object.defineProperty(exports, "FFIDAnnouncementBadge", {
8
8
  enumerable: true,
9
- get: function () { return chunkCI6RBG77_cjs.FFIDAnnouncementBadge; }
9
+ get: function () { return chunkBI6UM2EJ_cjs.FFIDAnnouncementBadge; }
10
10
  });
11
11
  Object.defineProperty(exports, "FFIDAnnouncementList", {
12
12
  enumerable: true,
13
- get: function () { return chunkCI6RBG77_cjs.FFIDAnnouncementList; }
13
+ get: function () { return chunkBI6UM2EJ_cjs.FFIDAnnouncementList; }
14
14
  });
15
15
  Object.defineProperty(exports, "FFIDInquiryForm", {
16
16
  enumerable: true,
17
- get: function () { return chunkCI6RBG77_cjs.FFIDInquiryForm; }
17
+ get: function () { return chunkBI6UM2EJ_cjs.FFIDInquiryForm; }
18
18
  });
19
19
  Object.defineProperty(exports, "FFIDLoginButton", {
20
20
  enumerable: true,
21
- get: function () { return chunkCI6RBG77_cjs.FFIDLoginButton; }
21
+ get: function () { return chunkBI6UM2EJ_cjs.FFIDLoginButton; }
22
22
  });
23
23
  Object.defineProperty(exports, "FFIDOrganizationSwitcher", {
24
24
  enumerable: true,
25
- get: function () { return chunkCI6RBG77_cjs.FFIDOrganizationSwitcher; }
25
+ get: function () { return chunkBI6UM2EJ_cjs.FFIDOrganizationSwitcher; }
26
26
  });
27
27
  Object.defineProperty(exports, "FFIDSubscriptionBadge", {
28
28
  enumerable: true,
29
- get: function () { return chunkCI6RBG77_cjs.FFIDSubscriptionBadge; }
29
+ get: function () { return chunkBI6UM2EJ_cjs.FFIDSubscriptionBadge; }
30
30
  });
31
31
  Object.defineProperty(exports, "FFIDUserMenu", {
32
32
  enumerable: true,
33
- get: function () { return chunkCI6RBG77_cjs.FFIDUserMenu; }
33
+ get: function () { return chunkBI6UM2EJ_cjs.FFIDUserMenu; }
34
34
  });
@@ -1 +1 @@
1
- export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-NBBHMLXO.js';
1
+ export { FFIDAnnouncementBadge, FFIDAnnouncementList, FFIDInquiryForm, FFIDLoginButton, FFIDOrganizationSwitcher, FFIDSubscriptionBadge, FFIDUserMenu } from '../chunk-32VOLLNV.js';