cloudflare-next-intl 0.13.2 → 0.13.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.
Files changed (2) hide show
  1. package/llms.txt +3 -3
  2. package/package.json +1 -1
package/llms.txt CHANGED
@@ -16,7 +16,7 @@ other subpath can be used.
16
16
  - `./setIntlConfig` — identity function for typed `RoutingConfig` authoring; use in your `@intl-config` file.
17
17
  - `./serverProvider` — `IntlProvider` server component (also under `./server`).
18
18
  - `./Link` — server-side locale-aware `<Link>` (also under `./server`).
19
- - `./IntlHelperScript` — inline script for flash-free locale/theme hydration.
19
+ - `./IntlHelperScript` — inline script for flash-free locale/theme hydration; also renders the Google tag (gtag.js) for `cookieConsent.googleTagId` (defaults to `analytics.googleAdsId`; `googleTag: false` or `googleTagId: false` turns it off).
20
20
  - `./LocaleLink` — client-side locale-aware link (counterpart to `./Link`).
21
21
  - `./usePathname` — client hook: pathname with locale prefix stripped.
22
22
  - `./metadata` — Next.js `generateMetadata` helper with locale alternates.
@@ -63,8 +63,8 @@ state then isn't shared. Peer resolution guarantees one shared copy instead.
63
63
  - `./useCookieConsent` — context hook; throws `"useCookieConsent must be used within a CookieConsentProvider"` if called outside one.
64
64
  - `./CookieConsentDialog` — default cookie-consent banner; accepts per-slot `classNames`/`styles` or a `render` prop for fully custom markup. When `link` is omitted, renders a default link to `cookieConsent.privacyPolicyPath` (defaults to `'/privacy-policy'`; label via `privacyPolicyLinkText`, default `"Privacy Policy"`) — pass `link={null}` for no link, or set `privacyPolicyPath: false` to disable it everywhere.
65
65
  - `./PrivacyPolicyUpdateDialog` — "privacy policy updated" banner; auto-enabled only when `cookieConsent.privacyPolicyDate` is set. Same default-link behavior as `CookieConsentDialog` (label default `"Learn more"`).
66
- - `./cookieConsentAnalytics` — `CookieConsentAnalytics`: gates Cloudflare Web Analytics / Google Ads / Google Analytics / AdSense / Microsoft Clarity behind consent; rendered automatically by `IntlProvider` when `cookieConsent.secrets` or `getSecrets` is set (and `autoWireAnalytics !== false`). Never renders in local dev (`NODE_ENV === 'development'`) unless `cookieConsent.enableAnalyticsInDevMode` is `true`.
67
- - Country-based gating (`cookieConsent.countryHeaderNames` / `getCountryCode` / `getCloudflareContext` + `gdprCountries`): resolved server-side by `IntlProvider` into a `requiresConsent` boolean passed to `CookieConsentProvider`. Automatically falls back to request headers (`x-cf-country`, `cf-ipcountry` or custom `countryHeaderNames`) when neither getter is set or when they resolve empty. `getCountryCode` (direct country resolver) takes precedence over `getCloudflareContext` (reads `cf.country`) when both are set. Unresolved country (or a `null` context) always requires consent (fail-safe). `./cookieConsent` also exports `defaultGdprCountries` (EU/EEA + UK + Switzerland).
66
+ - `./cookieConsentAnalytics` — `CookieConsentAnalytics`: gates Cloudflare Web Analytics / Google Ads / Google Analytics / Google tag (`googleTagId`) / AdSense / Microsoft Clarity behind consent; loads gtag when any of `googleAnalyticsId`, `googleAdsId` or `googleTagId` is set; rendered automatically by `IntlProvider` when `cookieConsent.secrets` or `getSecrets` is set (and `autoWireAnalytics !== false`). Never renders in local dev (`NODE_ENV === 'development'`) unless `cookieConsent.enableAnalyticsInDevMode` is `true`.
67
+ - Country-based gating (`cookieConsent.countryHeaderNames` / `getCountryCode` / `getCloudflareContext` + `gdprCountries`): resolved server-side by `IntlProvider` into a `requiresConsent` boolean passed to `CookieConsentProvider`. Automatically falls back to request headers (`x-cf-country`, `cf-ipcountry` or custom `countryHeaderNames`) when neither getter is set or when they resolve empty. `getCountryCode` (direct country resolver) takes precedence over `getCloudflareContext` (reads `cf.country`) when both are set. Unresolved country (or a `null` context) always requires consent (fail-safe). `./cookieConsent` also exports `defaultGdprCountries` (EU/EEA + UK + Switzerland). On edge-cached pages `CookieConsentProvider` re-evaluates from the `__cf_country__` cookie set by `intlMiddleware`; on a first-visit cache hit it sends one cache-busting `HEAD` request to fetch the cookie and keeps the dialog hidden for up to 2 s while waiting.
68
68
 
69
69
  ## `db*` subpaths (require `db` set on your `RoutingConfig`)
70
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudflare-next-intl",
3
- "version": "0.13.2",
3
+ "version": "0.13.3",
4
4
  "description": "Optimized Next Intl Package Special for App Router and Cloudflare",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",