@intlayer/react-intl 9.5.11 → 9.6.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.
@@ -21,7 +21,7 @@ import { colorize, getAppLogger } from "@intlayer/config/logger";
21
21
  */
22
22
  const IntlProvider = ({ locale, children, messages: _messages, formats: _formats, timeZone: _timeZone, defaultRichTextElements: _defaultRichTextElements, onError: _onError, ...rest }) => {
23
23
  const intlObject = useMemo(() => createIntlObject(locale), [locale]);
24
- if (typeof _messages !== "undefined") getAppLogger({ log })(`${colorize("IntlProvider", CYAN)} do not pass the messages prop with intlayer. Messages are loaded automatically under the hood for bundle optimization reasons.`);
24
+ if (process.env.NODE_ENV === "development" && typeof _messages !== "undefined") getAppLogger({ log })(`${colorize("IntlProvider", CYAN)} do not pass the messages prop with intlayer. Messages are loaded automatically under the hood for bundle optimization reasons.`);
25
25
  return /* @__PURE__ */ jsx(IntlContext.Provider, {
26
26
  value: intlObject,
27
27
  children: /* @__PURE__ */ jsx(IntlayerProvider, {
@@ -1 +1 @@
1
- {"version":3,"file":"IntlProvider.mjs","names":[],"sources":["../../src/IntlProvider.tsx"],"sourcesContent":["'use client';\n\nimport { log } from '@intlayer/config/built';\nimport { CYAN } from '@intlayer/config/colors';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\nimport { useMemo } from 'react';\nimport type { IntlProvider as _IntlProvider } from 'react-intl';\nimport { IntlayerProvider } from 'react-intlayer';\nimport { IntlContext } from './context';\nimport { createIntlObject } from './createIntlObject';\n\n/**\n * Drop-in for react-intl's `IntlProvider`.\n *\n * `messages`, `formats`, `timeZone`, `now`, `defaultRichTextElements`,\n * and `onError`/`onWarn` are accepted for API compatibility but have no\n * effect — Intlayer uses its own compiled dictionaries.\n *\n * The `locale` prop is forwarded to `IntlayerClientProvider`.\n */\nexport const IntlProvider: typeof _IntlProvider = ({\n locale,\n children,\n messages: _messages,\n formats: _formats,\n timeZone: _timeZone,\n defaultRichTextElements: _defaultRichTextElements,\n onError: _onError,\n ...rest\n}) => {\n const intlObject = useMemo(\n () => createIntlObject(locale as LocalesValues),\n [locale]\n );\n\n if (\n process.env.NODE_ENV === 'development' &&\n typeof _messages !== 'undefined'\n ) {\n const appLogger = getAppLogger({ log });\n appLogger(\n `${colorize('IntlProvider', CYAN)} do not pass the messages prop with intlayer. Messages are loaded automatically under the hood for bundle optimization reasons.`\n );\n }\n\n return (\n <IntlContext.Provider value={intlObject}>\n <IntlayerProvider locale={locale as LocalesValues} {...(rest as object)}>\n {children}\n </IntlayerProvider>\n </IntlContext.Provider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,gBAAsC,EACjD,QACA,UACA,UAAU,WACV,SAAS,UACT,UAAU,WACV,yBAAyB,0BACzB,SAAS,UACT,GAAG,WACC;CACJ,MAAM,aAAa,cACX,iBAAiB,MAAuB,GAC9C,CAAC,MAAM,CACT;CAEA,IAEE,OAAO,cAAc,aAGrB,AADkB,aAAa,EAAE,IAAI,CAC7B,CAAC,CACP,GAAG,SAAS,gBAAgB,IAAI,EAAE,gIACpC;CAGF,OACE,oBAAC,YAAY,UAAb;EAAsB,OAAO;YAC3B,oBAAC,kBAAD;GAA0B;GAAyB,GAAK;GACrD;EACe;CACE;AAE1B"}
1
+ {"version":3,"file":"IntlProvider.mjs","names":[],"sources":["../../src/IntlProvider.tsx"],"sourcesContent":["'use client';\n\nimport { log } from '@intlayer/config/built';\nimport { CYAN } from '@intlayer/config/colors';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\nimport { useMemo } from 'react';\nimport type { IntlProvider as _IntlProvider } from 'react-intl';\nimport { IntlayerProvider } from 'react-intlayer';\nimport { IntlContext } from './context';\nimport { createIntlObject } from './createIntlObject';\n\n/**\n * Drop-in for react-intl's `IntlProvider`.\n *\n * `messages`, `formats`, `timeZone`, `now`, `defaultRichTextElements`,\n * and `onError`/`onWarn` are accepted for API compatibility but have no\n * effect — Intlayer uses its own compiled dictionaries.\n *\n * The `locale` prop is forwarded to `IntlayerClientProvider`.\n */\nexport const IntlProvider: typeof _IntlProvider = ({\n locale,\n children,\n messages: _messages,\n formats: _formats,\n timeZone: _timeZone,\n defaultRichTextElements: _defaultRichTextElements,\n onError: _onError,\n ...rest\n}) => {\n const intlObject = useMemo(\n () => createIntlObject(locale as LocalesValues),\n [locale]\n );\n\n if (\n process.env.NODE_ENV === 'development' &&\n typeof _messages !== 'undefined'\n ) {\n const appLogger = getAppLogger({ log });\n appLogger(\n `${colorize('IntlProvider', CYAN)} do not pass the messages prop with intlayer. Messages are loaded automatically under the hood for bundle optimization reasons.`\n );\n }\n\n return (\n <IntlContext.Provider value={intlObject}>\n <IntlayerProvider locale={locale as LocalesValues} {...(rest as object)}>\n {children}\n </IntlayerProvider>\n </IntlContext.Provider>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAa,gBAAsC,EACjD,QACA,UACA,UAAU,WACV,SAAS,UACT,UAAU,WACV,yBAAyB,0BACzB,SAAS,UACT,GAAG,WACC;CACJ,MAAM,aAAa,cACX,iBAAiB,MAAuB,GAC9C,CAAC,MAAM,CACT;CAEA,6BAC2B,iBACzB,OAAO,cAAc,aAGrB,AADkB,aAAa,EAAE,IAAI,CAC7B,CAAC,CACP,GAAG,SAAS,gBAAgB,IAAI,EAAE,gIACpC;CAGF,OACE,oBAAC,YAAY,UAAb;EAAsB,OAAO;YAC3B,oBAAC,kBAAD;GAA0B;GAAyB,GAAK;GACrD;EACe;CACE;AAE1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/react-intl",
3
- "version": "9.5.11",
3
+ "version": "9.6.0",
4
4
  "private": false,
5
5
  "description": "react-intl API adapter for intlayer — drop-in compatibility layer",
6
6
  "keywords": [
@@ -75,13 +75,13 @@
75
75
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
76
76
  },
77
77
  "dependencies": {
78
- "@intlayer/config": "9.5.11",
79
- "@intlayer/core": "9.5.11",
80
- "@intlayer/dictionaries-entry": "9.5.11",
81
- "@intlayer/engine": "9.5.11",
82
- "@intlayer/types": "9.5.11",
83
- "react-intlayer": "9.5.11",
84
- "vite-intlayer": "9.5.11"
78
+ "@intlayer/config": "9.6.0",
79
+ "@intlayer/core": "9.6.0",
80
+ "@intlayer/dictionaries-entry": "9.6.0",
81
+ "@intlayer/engine": "9.6.0",
82
+ "@intlayer/types": "9.6.0",
83
+ "react-intlayer": "9.6.0",
84
+ "vite-intlayer": "9.6.0"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@types/node": "^22",
@@ -94,7 +94,7 @@
94
94
  "tsdown": "0.23.0",
95
95
  "typescript": "7.0.2",
96
96
  "vite": "8.3.1",
97
- "vitest": "5.0.2"
97
+ "vitest": "5.0.3"
98
98
  },
99
99
  "peerDependencies": {
100
100
  "react": ">=16.0.0",