@lingui/react 4.10.0 → 4.10.1
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-rsc.cjs +8 -11
- package/dist/index-rsc.d.cts +2 -3
- package/dist/index-rsc.d.mts +2 -3
- package/dist/index-rsc.d.ts +2 -3
- package/dist/index-rsc.mjs +8 -11
- package/dist/index.d.cts +2 -3
- package/dist/index.d.mts +2 -3
- package/dist/index.d.ts +2 -3
- package/dist/server.cjs +12 -6
- package/dist/server.d.cts +6 -5
- package/dist/server.d.mts +6 -5
- package/dist/server.d.ts +6 -5
- package/dist/server.mjs +12 -6
- package/dist/shared/{react.a673be03.d.ts → react.e5f95de8.d.cts} +14 -2
- package/dist/shared/{react.a673be03.d.cts → react.e5f95de8.d.mts} +14 -2
- package/dist/shared/{react.a673be03.d.mts → react.e5f95de8.d.ts} +14 -2
- package/package.json +3 -3
- package/dist/shared/react.145db227.d.mts +0 -17
- package/dist/shared/react.80f80298.d.ts +0 -17
- package/dist/shared/react.db09d9c7.d.cts +0 -17
package/dist/index-rsc.cjs
CHANGED
|
@@ -9,26 +9,23 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
9
9
|
const React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
10
10
|
|
|
11
11
|
function TransRsc(props) {
|
|
12
|
-
const
|
|
13
|
-
if (!
|
|
12
|
+
const ctx = server.getI18n();
|
|
13
|
+
if (!ctx) {
|
|
14
14
|
throw new Error(
|
|
15
|
-
"You tried to use `Trans` in Server Component, but i18n instance for RSC hasn't been setup.\nMake sure to call `setI18n` in root of your page"
|
|
15
|
+
"You tried to use `Trans` in Server Component, but i18n instance for RSC hasn't been setup.\nMake sure to call `setI18n` in the root of your page."
|
|
16
16
|
);
|
|
17
17
|
}
|
|
18
|
-
return /* @__PURE__ */ React__default.createElement(TransNoContext.TransNoContext, { ...props, lingui:
|
|
18
|
+
return /* @__PURE__ */ React__default.createElement(TransNoContext.TransNoContext, { ...props, lingui: ctx });
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function useLingui() {
|
|
22
|
-
const
|
|
23
|
-
if (!
|
|
22
|
+
const ctx = server.getI18n();
|
|
23
|
+
if (!ctx) {
|
|
24
24
|
throw new Error(
|
|
25
|
-
"You tried to use `useLingui` in Server Component, but i18n instance for RSC hasn't been setup.\nMake sure to call `setI18n` in root of your page"
|
|
25
|
+
"You tried to use `useLingui` in a Server Component, but i18n instance for RSC hasn't been setup.\nMake sure to call `setI18n` in the root of your page."
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
|
-
return
|
|
29
|
-
i18n,
|
|
30
|
-
_: i18n.t.bind(i18n)
|
|
31
|
-
};
|
|
28
|
+
return ctx;
|
|
32
29
|
}
|
|
33
30
|
|
|
34
31
|
exports.Trans = TransRsc;
|
package/dist/index-rsc.d.cts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { T as TransProps } from './shared/react.
|
|
2
|
-
export {
|
|
3
|
-
import { b as I18nContext } from './shared/react.db09d9c7.cjs';
|
|
1
|
+
import { T as TransProps, b as I18nContext } from './shared/react.e5f95de8.cjs';
|
|
2
|
+
export { d as TransRenderCallbackOrComponent, c as TransRenderProps } from './shared/react.e5f95de8.cjs';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import '@lingui/core';
|
|
6
5
|
|
package/dist/index-rsc.d.mts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { T as TransProps } from './shared/react.
|
|
2
|
-
export {
|
|
3
|
-
import { b as I18nContext } from './shared/react.145db227.mjs';
|
|
1
|
+
import { T as TransProps, b as I18nContext } from './shared/react.e5f95de8.mjs';
|
|
2
|
+
export { d as TransRenderCallbackOrComponent, c as TransRenderProps } from './shared/react.e5f95de8.mjs';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import '@lingui/core';
|
|
6
5
|
|
package/dist/index-rsc.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { T as TransProps } from './shared/react.
|
|
2
|
-
export {
|
|
3
|
-
import { b as I18nContext } from './shared/react.80f80298.js';
|
|
1
|
+
import { T as TransProps, b as I18nContext } from './shared/react.e5f95de8.js';
|
|
2
|
+
export { d as TransRenderCallbackOrComponent, c as TransRenderProps } from './shared/react.e5f95de8.js';
|
|
4
3
|
import React from 'react';
|
|
5
4
|
import '@lingui/core';
|
|
6
5
|
|
package/dist/index-rsc.mjs
CHANGED
|
@@ -3,26 +3,23 @@ import { T as TransNoContext } from './shared/react.1d406965.mjs';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
|
|
5
5
|
function TransRsc(props) {
|
|
6
|
-
const
|
|
7
|
-
if (!
|
|
6
|
+
const ctx = getI18n();
|
|
7
|
+
if (!ctx) {
|
|
8
8
|
throw new Error(
|
|
9
|
-
"You tried to use `Trans` in Server Component, but i18n instance for RSC hasn't been setup.\nMake sure to call `setI18n` in root of your page"
|
|
9
|
+
"You tried to use `Trans` in Server Component, but i18n instance for RSC hasn't been setup.\nMake sure to call `setI18n` in the root of your page."
|
|
10
10
|
);
|
|
11
11
|
}
|
|
12
|
-
return /* @__PURE__ */ React.createElement(TransNoContext, { ...props, lingui:
|
|
12
|
+
return /* @__PURE__ */ React.createElement(TransNoContext, { ...props, lingui: ctx });
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
function useLingui() {
|
|
16
|
-
const
|
|
17
|
-
if (!
|
|
16
|
+
const ctx = getI18n();
|
|
17
|
+
if (!ctx) {
|
|
18
18
|
throw new Error(
|
|
19
|
-
"You tried to use `useLingui` in Server Component, but i18n instance for RSC hasn't been setup.\nMake sure to call `setI18n` in root of your page"
|
|
19
|
+
"You tried to use `useLingui` in a Server Component, but i18n instance for RSC hasn't been setup.\nMake sure to call `setI18n` in the root of your page."
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
|
-
return
|
|
23
|
-
i18n,
|
|
24
|
-
_: i18n.t.bind(i18n)
|
|
25
|
-
};
|
|
22
|
+
return ctx;
|
|
26
23
|
}
|
|
27
24
|
|
|
28
25
|
export { TransRsc as Trans, useLingui };
|
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { T as TransProps } from './shared/react.e5f95de8.cjs';
|
|
2
|
+
export { b as I18nContext, I as I18nProvider, a as I18nProviderProps, L as LinguiContext, d as TransRenderCallbackOrComponent, c as TransRenderProps, u as useLingui } from './shared/react.e5f95de8.cjs';
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import { T as TransProps } from './shared/react.a673be03.cjs';
|
|
4
|
-
export { b as TransRenderCallbackOrComponent, a as TransRenderProps } from './shared/react.a673be03.cjs';
|
|
5
4
|
import '@lingui/core';
|
|
6
5
|
|
|
7
6
|
declare function Trans(props: TransProps): React.ReactElement<any, any> | null;
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { T as TransProps } from './shared/react.e5f95de8.mjs';
|
|
2
|
+
export { b as I18nContext, I as I18nProvider, a as I18nProviderProps, L as LinguiContext, d as TransRenderCallbackOrComponent, c as TransRenderProps, u as useLingui } from './shared/react.e5f95de8.mjs';
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import { T as TransProps } from './shared/react.a673be03.mjs';
|
|
4
|
-
export { b as TransRenderCallbackOrComponent, a as TransRenderProps } from './shared/react.a673be03.mjs';
|
|
5
4
|
import '@lingui/core';
|
|
6
5
|
|
|
7
6
|
declare function Trans(props: TransProps): React.ReactElement<any, any> | null;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import { T as TransProps } from './shared/react.e5f95de8.js';
|
|
2
|
+
export { b as I18nContext, I as I18nProvider, a as I18nProviderProps, L as LinguiContext, d as TransRenderCallbackOrComponent, c as TransRenderProps, u as useLingui } from './shared/react.e5f95de8.js';
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import { T as TransProps } from './shared/react.a673be03.js';
|
|
4
|
-
export { b as TransRenderCallbackOrComponent, a as TransRenderProps } from './shared/react.a673be03.js';
|
|
5
4
|
import '@lingui/core';
|
|
6
5
|
|
|
7
6
|
declare function Trans(props: TransProps): React.ReactElement<any, any> | null;
|
package/dist/server.cjs
CHANGED
|
@@ -10,17 +10,23 @@ const React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
10
10
|
let cache = null;
|
|
11
11
|
const getLinguiCache = () => {
|
|
12
12
|
if (!cache) {
|
|
13
|
-
cache = React__default.cache(
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
cache = React__default.cache(
|
|
14
|
+
() => ({
|
|
15
|
+
current: null
|
|
16
|
+
})
|
|
17
|
+
);
|
|
16
18
|
}
|
|
17
19
|
return cache();
|
|
18
20
|
};
|
|
19
|
-
function setI18n(i18n) {
|
|
20
|
-
getLinguiCache().current =
|
|
21
|
+
function setI18n(i18n, defaultComponent) {
|
|
22
|
+
getLinguiCache().current = {
|
|
23
|
+
i18n,
|
|
24
|
+
_: i18n._.bind(i18n),
|
|
25
|
+
defaultComponent
|
|
26
|
+
};
|
|
21
27
|
}
|
|
22
28
|
function getI18n() {
|
|
23
|
-
return getLinguiCache()
|
|
29
|
+
return getLinguiCache()?.current;
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
exports.TransNoContext = TransNoContext.TransNoContext;
|
package/dist/server.d.cts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { b as I18nContext } from './shared/react.e5f95de8.cjs';
|
|
2
|
+
export { e as TransNoContext, T as TransProps, d as TransRenderCallbackOrComponent, c as TransRenderProps } from './shared/react.e5f95de8.cjs';
|
|
2
3
|
import { I18n } from '@lingui/core';
|
|
3
4
|
import 'react';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* This is an entry point for React Server Components (RSC)
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
* That means this entry point and
|
|
9
|
+
* RSC uses static analysis to find any non-valid function calls in the import graph.
|
|
10
|
+
* That means this entry point and its children must not have any Provider/Context calls.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -25,7 +26,7 @@ import 'react';
|
|
|
25
26
|
* setI18n(i18n);
|
|
26
27
|
* ```
|
|
27
28
|
*/
|
|
28
|
-
declare function setI18n(i18n: I18n): void;
|
|
29
|
+
declare function setI18n(i18n: I18n, defaultComponent?: I18nContext["defaultComponent"]): void;
|
|
29
30
|
/**
|
|
30
31
|
* Get Lingui's i18n instance saved for RSC
|
|
31
32
|
*
|
|
@@ -39,6 +40,6 @@ declare function setI18n(i18n: I18n): void;
|
|
|
39
40
|
* }
|
|
40
41
|
* ```
|
|
41
42
|
*/
|
|
42
|
-
declare function getI18n():
|
|
43
|
+
declare function getI18n(): I18nContext | null;
|
|
43
44
|
|
|
44
45
|
export { getI18n, setI18n };
|
package/dist/server.d.mts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { b as I18nContext } from './shared/react.e5f95de8.mjs';
|
|
2
|
+
export { e as TransNoContext, T as TransProps, d as TransRenderCallbackOrComponent, c as TransRenderProps } from './shared/react.e5f95de8.mjs';
|
|
2
3
|
import { I18n } from '@lingui/core';
|
|
3
4
|
import 'react';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* This is an entry point for React Server Components (RSC)
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
* That means this entry point and
|
|
9
|
+
* RSC uses static analysis to find any non-valid function calls in the import graph.
|
|
10
|
+
* That means this entry point and its children must not have any Provider/Context calls.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -25,7 +26,7 @@ import 'react';
|
|
|
25
26
|
* setI18n(i18n);
|
|
26
27
|
* ```
|
|
27
28
|
*/
|
|
28
|
-
declare function setI18n(i18n: I18n): void;
|
|
29
|
+
declare function setI18n(i18n: I18n, defaultComponent?: I18nContext["defaultComponent"]): void;
|
|
29
30
|
/**
|
|
30
31
|
* Get Lingui's i18n instance saved for RSC
|
|
31
32
|
*
|
|
@@ -39,6 +40,6 @@ declare function setI18n(i18n: I18n): void;
|
|
|
39
40
|
* }
|
|
40
41
|
* ```
|
|
41
42
|
*/
|
|
42
|
-
declare function getI18n():
|
|
43
|
+
declare function getI18n(): I18nContext | null;
|
|
43
44
|
|
|
44
45
|
export { getI18n, setI18n };
|
package/dist/server.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
import { b as I18nContext } from './shared/react.e5f95de8.js';
|
|
2
|
+
export { e as TransNoContext, T as TransProps, d as TransRenderCallbackOrComponent, c as TransRenderProps } from './shared/react.e5f95de8.js';
|
|
2
3
|
import { I18n } from '@lingui/core';
|
|
3
4
|
import 'react';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* This is an entry point for React Server Components (RSC)
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
* That means this entry point and
|
|
9
|
+
* RSC uses static analysis to find any non-valid function calls in the import graph.
|
|
10
|
+
* That means this entry point and its children must not have any Provider/Context calls.
|
|
10
11
|
*/
|
|
11
12
|
|
|
12
13
|
/**
|
|
@@ -25,7 +26,7 @@ import 'react';
|
|
|
25
26
|
* setI18n(i18n);
|
|
26
27
|
* ```
|
|
27
28
|
*/
|
|
28
|
-
declare function setI18n(i18n: I18n): void;
|
|
29
|
+
declare function setI18n(i18n: I18n, defaultComponent?: I18nContext["defaultComponent"]): void;
|
|
29
30
|
/**
|
|
30
31
|
* Get Lingui's i18n instance saved for RSC
|
|
31
32
|
*
|
|
@@ -39,6 +40,6 @@ declare function setI18n(i18n: I18n): void;
|
|
|
39
40
|
* }
|
|
40
41
|
* ```
|
|
41
42
|
*/
|
|
42
|
-
declare function getI18n():
|
|
43
|
+
declare function getI18n(): I18nContext | null;
|
|
43
44
|
|
|
44
45
|
export { getI18n, setI18n };
|
package/dist/server.mjs
CHANGED
|
@@ -4,17 +4,23 @@ import React from 'react';
|
|
|
4
4
|
let cache = null;
|
|
5
5
|
const getLinguiCache = () => {
|
|
6
6
|
if (!cache) {
|
|
7
|
-
cache = React.cache(
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
cache = React.cache(
|
|
8
|
+
() => ({
|
|
9
|
+
current: null
|
|
10
|
+
})
|
|
11
|
+
);
|
|
10
12
|
}
|
|
11
13
|
return cache();
|
|
12
14
|
};
|
|
13
|
-
function setI18n(i18n) {
|
|
14
|
-
getLinguiCache().current =
|
|
15
|
+
function setI18n(i18n, defaultComponent) {
|
|
16
|
+
getLinguiCache().current = {
|
|
17
|
+
i18n,
|
|
18
|
+
_: i18n._.bind(i18n),
|
|
19
|
+
defaultComponent
|
|
20
|
+
};
|
|
15
21
|
}
|
|
16
22
|
function getI18n() {
|
|
17
|
-
return getLinguiCache()
|
|
23
|
+
return getLinguiCache()?.current;
|
|
18
24
|
}
|
|
19
25
|
|
|
20
26
|
export { getI18n, setI18n };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ComponentType } from 'react';
|
|
1
|
+
import React, { ComponentType, FunctionComponent } from 'react';
|
|
2
2
|
import { MessageOptions, I18n } from '@lingui/core';
|
|
3
3
|
|
|
4
4
|
type TransRenderProps = {
|
|
@@ -42,4 +42,16 @@ declare function TransNoContext(props: TransProps & {
|
|
|
42
42
|
};
|
|
43
43
|
}): React.ReactElement<any, any> | null;
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
type I18nContext = {
|
|
46
|
+
i18n: I18n;
|
|
47
|
+
_: I18n["_"];
|
|
48
|
+
defaultComponent?: ComponentType<TransRenderProps>;
|
|
49
|
+
};
|
|
50
|
+
type I18nProviderProps = Omit<I18nContext, "_"> & {
|
|
51
|
+
children?: React.ReactNode;
|
|
52
|
+
};
|
|
53
|
+
declare const LinguiContext: React.Context<I18nContext | null>;
|
|
54
|
+
declare function useLingui(): I18nContext;
|
|
55
|
+
declare const I18nProvider: FunctionComponent<I18nProviderProps>;
|
|
56
|
+
|
|
57
|
+
export { I18nProvider as I, LinguiContext as L, type TransProps as T, type I18nProviderProps as a, type I18nContext as b, type TransRenderProps as c, type TransRenderCallbackOrComponent as d, TransNoContext as e, useLingui as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ComponentType } from 'react';
|
|
1
|
+
import React, { ComponentType, FunctionComponent } from 'react';
|
|
2
2
|
import { MessageOptions, I18n } from '@lingui/core';
|
|
3
3
|
|
|
4
4
|
type TransRenderProps = {
|
|
@@ -42,4 +42,16 @@ declare function TransNoContext(props: TransProps & {
|
|
|
42
42
|
};
|
|
43
43
|
}): React.ReactElement<any, any> | null;
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
type I18nContext = {
|
|
46
|
+
i18n: I18n;
|
|
47
|
+
_: I18n["_"];
|
|
48
|
+
defaultComponent?: ComponentType<TransRenderProps>;
|
|
49
|
+
};
|
|
50
|
+
type I18nProviderProps = Omit<I18nContext, "_"> & {
|
|
51
|
+
children?: React.ReactNode;
|
|
52
|
+
};
|
|
53
|
+
declare const LinguiContext: React.Context<I18nContext | null>;
|
|
54
|
+
declare function useLingui(): I18nContext;
|
|
55
|
+
declare const I18nProvider: FunctionComponent<I18nProviderProps>;
|
|
56
|
+
|
|
57
|
+
export { I18nProvider as I, LinguiContext as L, type TransProps as T, type I18nProviderProps as a, type I18nContext as b, type TransRenderProps as c, type TransRenderCallbackOrComponent as d, TransNoContext as e, useLingui as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { ComponentType } from 'react';
|
|
1
|
+
import React, { ComponentType, FunctionComponent } from 'react';
|
|
2
2
|
import { MessageOptions, I18n } from '@lingui/core';
|
|
3
3
|
|
|
4
4
|
type TransRenderProps = {
|
|
@@ -42,4 +42,16 @@ declare function TransNoContext(props: TransProps & {
|
|
|
42
42
|
};
|
|
43
43
|
}): React.ReactElement<any, any> | null;
|
|
44
44
|
|
|
45
|
-
|
|
45
|
+
type I18nContext = {
|
|
46
|
+
i18n: I18n;
|
|
47
|
+
_: I18n["_"];
|
|
48
|
+
defaultComponent?: ComponentType<TransRenderProps>;
|
|
49
|
+
};
|
|
50
|
+
type I18nProviderProps = Omit<I18nContext, "_"> & {
|
|
51
|
+
children?: React.ReactNode;
|
|
52
|
+
};
|
|
53
|
+
declare const LinguiContext: React.Context<I18nContext | null>;
|
|
54
|
+
declare function useLingui(): I18nContext;
|
|
55
|
+
declare const I18nProvider: FunctionComponent<I18nProviderProps>;
|
|
56
|
+
|
|
57
|
+
export { I18nProvider as I, LinguiContext as L, type TransProps as T, type I18nProviderProps as a, type I18nContext as b, type TransRenderProps as c, type TransRenderCallbackOrComponent as d, TransNoContext as e, useLingui as u };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lingui/react",
|
|
3
|
-
"version": "4.10.
|
|
3
|
+
"version": "4.10.1",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"description": "React components for translations",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@babel/runtime": "^7.20.13",
|
|
78
|
-
"@lingui/core": "4.10.
|
|
78
|
+
"@lingui/core": "4.10.1"
|
|
79
79
|
},
|
|
80
80
|
"devDependencies": {
|
|
81
81
|
"@lingui/jest-mocks": "*",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"react-dom": "^18.2.0",
|
|
88
88
|
"unbuild": "2.0.0"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "fbea0ab14b43a5ef7d31931cb76c263fd78f0481"
|
|
91
91
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { ComponentType, FunctionComponent } from 'react';
|
|
2
|
-
import { I18n } from '@lingui/core';
|
|
3
|
-
import { a as TransRenderProps } from './react.a673be03.mjs';
|
|
4
|
-
|
|
5
|
-
type I18nContext = {
|
|
6
|
-
i18n: I18n;
|
|
7
|
-
_: I18n["_"];
|
|
8
|
-
defaultComponent?: ComponentType<TransRenderProps>;
|
|
9
|
-
};
|
|
10
|
-
type I18nProviderProps = Omit<I18nContext, "_"> & {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
};
|
|
13
|
-
declare const LinguiContext: React.Context<I18nContext | null>;
|
|
14
|
-
declare function useLingui(): I18nContext;
|
|
15
|
-
declare const I18nProvider: FunctionComponent<I18nProviderProps>;
|
|
16
|
-
|
|
17
|
-
export { I18nProvider as I, LinguiContext as L, type I18nProviderProps as a, type I18nContext as b, useLingui as u };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { ComponentType, FunctionComponent } from 'react';
|
|
2
|
-
import { I18n } from '@lingui/core';
|
|
3
|
-
import { a as TransRenderProps } from './react.a673be03.js';
|
|
4
|
-
|
|
5
|
-
type I18nContext = {
|
|
6
|
-
i18n: I18n;
|
|
7
|
-
_: I18n["_"];
|
|
8
|
-
defaultComponent?: ComponentType<TransRenderProps>;
|
|
9
|
-
};
|
|
10
|
-
type I18nProviderProps = Omit<I18nContext, "_"> & {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
};
|
|
13
|
-
declare const LinguiContext: React.Context<I18nContext | null>;
|
|
14
|
-
declare function useLingui(): I18nContext;
|
|
15
|
-
declare const I18nProvider: FunctionComponent<I18nProviderProps>;
|
|
16
|
-
|
|
17
|
-
export { I18nProvider as I, LinguiContext as L, type I18nProviderProps as a, type I18nContext as b, useLingui as u };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import React, { ComponentType, FunctionComponent } from 'react';
|
|
2
|
-
import { I18n } from '@lingui/core';
|
|
3
|
-
import { a as TransRenderProps } from './react.a673be03.cjs';
|
|
4
|
-
|
|
5
|
-
type I18nContext = {
|
|
6
|
-
i18n: I18n;
|
|
7
|
-
_: I18n["_"];
|
|
8
|
-
defaultComponent?: ComponentType<TransRenderProps>;
|
|
9
|
-
};
|
|
10
|
-
type I18nProviderProps = Omit<I18nContext, "_"> & {
|
|
11
|
-
children?: React.ReactNode;
|
|
12
|
-
};
|
|
13
|
-
declare const LinguiContext: React.Context<I18nContext | null>;
|
|
14
|
-
declare function useLingui(): I18nContext;
|
|
15
|
-
declare const I18nProvider: FunctionComponent<I18nProviderProps>;
|
|
16
|
-
|
|
17
|
-
export { I18nProvider as I, LinguiContext as L, type I18nProviderProps as a, type I18nContext as b, useLingui as u };
|