@ttoss/react-i18n 1.23.1 → 1.23.4

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/dist/index.d.ts CHANGED
@@ -9,6 +9,7 @@ type I18nProviderProps = {
9
9
  locale?: string;
10
10
  loadLocaleData?: LoadLocaleData;
11
11
  children?: React.ReactNode;
12
+ onError?: (err: Error) => void;
12
13
  };
13
14
  /**
14
15
  * `DEFAULT_LOCALE` must be `en` because is the default of the other modules.
@@ -21,6 +22,7 @@ declare const useI18n: () => {
21
22
  locale?: string | undefined;
22
23
  loadLocaleData?: LoadLocaleData | undefined;
23
24
  children?: React.ReactNode;
25
+ onError?: ((err: Error) => void) | undefined;
24
26
  defaultLocale: string;
25
27
  setLocale: (language: string) => void;
26
28
  };
package/package.json CHANGED
@@ -1,12 +1,17 @@
1
1
  {
2
2
  "name": "@ttoss/react-i18n",
3
- "version": "1.23.1",
3
+ "version": "1.23.4",
4
4
  "license": "UNLICENSED",
5
5
  "author": "ttoss",
6
6
  "contributors": [
7
7
  "Pedro Arantes <arantespp@gmail.com> (https://arantespp.com)",
8
8
  "Rayza Oliveira Costa <rayza.ocr@gmail.com> (https://bio.link/rayza)"
9
9
  ],
10
+ "repository": {
11
+ "type": "git",
12
+ "url": "https://github.com/ttoss/ttoss.git",
13
+ "directory": "packages/react-i18n"
14
+ },
10
15
  "main": "dist/index.js",
11
16
  "module": "dist/esm/index.js",
12
17
  "files": [
@@ -23,12 +28,12 @@
23
28
  },
24
29
  "devDependencies": {
25
30
  "@formatjs/cli": "^6.0.4",
26
- "@types/react": "^18.2.8",
31
+ "@types/react": "^18.2.11",
27
32
  "jest": "^29.5.0",
28
33
  "tsup": "^6.7.0",
29
- "@ttoss/config": "^1.30.1",
30
- "@ttoss/i18n-cli": "^0.6.0",
31
- "@ttoss/test-utils": "^1.23.2"
34
+ "@ttoss/config": "^1.30.3",
35
+ "@ttoss/i18n-cli": "^0.6.2",
36
+ "@ttoss/test-utils": "^1.23.4"
32
37
  },
33
38
  "keywords": [
34
39
  "React",
@@ -36,7 +41,8 @@
36
41
  "user interface"
37
42
  ],
38
43
  "publishConfig": {
39
- "access": "public"
44
+ "access": "public",
45
+ "provenance": true
40
46
  },
41
47
  "scripts": {
42
48
  "build": "tsup",
@@ -10,6 +10,7 @@ export type I18nProviderProps = {
10
10
  locale?: string;
11
11
  loadLocaleData?: LoadLocaleData;
12
12
  children?: React.ReactNode;
13
+ onError?: (err: Error) => void;
13
14
  };
14
15
 
15
16
  /**