@lingui/react 4.8.0 → 4.10.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.
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ const server = require('./server.cjs');
4
+ const TransNoContext = require('./shared/react.6b65948d.cjs');
5
+ const React = require('react');
6
+
7
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
8
+
9
+ const React__default = /*#__PURE__*/_interopDefaultCompat(React);
10
+
11
+ function TransRsc(props) {
12
+ const i18n = server.getI18n();
13
+ if (!i18n) {
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"
16
+ );
17
+ }
18
+ return /* @__PURE__ */ React__default.createElement(TransNoContext.TransNoContext, { ...props, lingui: { i18n } });
19
+ }
20
+
21
+ function useLingui() {
22
+ const i18n = server.getI18n();
23
+ if (!i18n) {
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"
26
+ );
27
+ }
28
+ return {
29
+ i18n,
30
+ _: i18n.t.bind(i18n)
31
+ };
32
+ }
33
+
34
+ exports.Trans = TransRsc;
35
+ exports.useLingui = useLingui;
@@ -0,0 +1,11 @@
1
+ import { T as TransProps } from './shared/react.a673be03.cjs';
2
+ export { b as TransRenderCallbackOrComponent, a as TransRenderProps } from './shared/react.a673be03.cjs';
3
+ import { b as I18nContext } from './shared/react.db09d9c7.cjs';
4
+ import React from 'react';
5
+ import '@lingui/core';
6
+
7
+ declare function TransRsc(props: TransProps): React.ReactElement<any, any> | null;
8
+
9
+ declare function useLingui(): I18nContext;
10
+
11
+ export { TransRsc as Trans, TransProps, useLingui };
@@ -0,0 +1,11 @@
1
+ import { T as TransProps } from './shared/react.a673be03.mjs';
2
+ export { b as TransRenderCallbackOrComponent, a as TransRenderProps } from './shared/react.a673be03.mjs';
3
+ import { b as I18nContext } from './shared/react.145db227.mjs';
4
+ import React from 'react';
5
+ import '@lingui/core';
6
+
7
+ declare function TransRsc(props: TransProps): React.ReactElement<any, any> | null;
8
+
9
+ declare function useLingui(): I18nContext;
10
+
11
+ export { TransRsc as Trans, TransProps, useLingui };
@@ -0,0 +1,11 @@
1
+ import { T as TransProps } from './shared/react.a673be03.js';
2
+ export { b as TransRenderCallbackOrComponent, a as TransRenderProps } from './shared/react.a673be03.js';
3
+ import { b as I18nContext } from './shared/react.80f80298.js';
4
+ import React from 'react';
5
+ import '@lingui/core';
6
+
7
+ declare function TransRsc(props: TransProps): React.ReactElement<any, any> | null;
8
+
9
+ declare function useLingui(): I18nContext;
10
+
11
+ export { TransRsc as Trans, TransProps, useLingui };
@@ -0,0 +1,28 @@
1
+ import { getI18n } from './server.mjs';
2
+ import { T as TransNoContext } from './shared/react.1d406965.mjs';
3
+ import React from 'react';
4
+
5
+ function TransRsc(props) {
6
+ const i18n = getI18n();
7
+ if (!i18n) {
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"
10
+ );
11
+ }
12
+ return /* @__PURE__ */ React.createElement(TransNoContext, { ...props, lingui: { i18n } });
13
+ }
14
+
15
+ function useLingui() {
16
+ const i18n = getI18n();
17
+ if (!i18n) {
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"
20
+ );
21
+ }
22
+ return {
23
+ i18n,
24
+ _: i18n.t.bind(i18n)
25
+ };
26
+ }
27
+
28
+ export { TransRsc as Trans, useLingui };
package/dist/index.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
  'use strict';
3
3
 
4
4
  const React = require('react');
5
- const server = require('./server.cjs');
5
+ const TransNoContext = require('./shared/react.6b65948d.cjs');
6
6
 
7
7
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
8
8
 
@@ -65,7 +65,7 @@ function Trans(props) {
65
65
  Attempted to render message: ${props.message} id: ${props.id}. Make sure this component is rendered inside a I18nProvider.`;
66
66
  }
67
67
  const lingui = useLinguiInternal(errMessage);
68
- return React__default.createElement(server.TransNoContext, { ...props, lingui });
68
+ return React__default.createElement(TransNoContext.TransNoContext, { ...props, lingui });
69
69
  }
70
70
 
71
71
  exports.I18nProvider = I18nProvider;
package/dist/index.d.cts CHANGED
@@ -1,20 +1,9 @@
1
- import React, { ComponentType, FunctionComponent } from 'react';
2
- import { I18n } from '@lingui/core';
3
- import { TransRenderProps, TransProps } from './server.cjs';
4
- export { TransRenderCallbackOrComponent } from './server.cjs';
5
-
6
- type I18nContext = {
7
- i18n: I18n;
8
- _: I18n["_"];
9
- defaultComponent?: ComponentType<TransRenderProps>;
10
- };
11
- type I18nProviderProps = Omit<I18nContext, "_"> & {
12
- children?: React.ReactNode;
13
- };
14
- declare const LinguiContext: React.Context<I18nContext | null>;
15
- declare function useLingui(): I18nContext;
16
- declare const I18nProvider: FunctionComponent<I18nProviderProps>;
1
+ export { b as I18nContext, I as I18nProvider, a as I18nProviderProps, L as LinguiContext, u as useLingui } from './shared/react.db09d9c7.cjs';
2
+ 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
+ import '@lingui/core';
17
6
 
18
7
  declare function Trans(props: TransProps): React.ReactElement<any, any> | null;
19
8
 
20
- export { type I18nContext, I18nProvider, type I18nProviderProps, LinguiContext, Trans, TransProps, TransRenderProps, useLingui };
9
+ export { Trans, TransProps };
package/dist/index.d.mts CHANGED
@@ -1,20 +1,9 @@
1
- import React, { ComponentType, FunctionComponent } from 'react';
2
- import { I18n } from '@lingui/core';
3
- import { TransRenderProps, TransProps } from './server.mjs';
4
- export { TransRenderCallbackOrComponent } from './server.mjs';
5
-
6
- type I18nContext = {
7
- i18n: I18n;
8
- _: I18n["_"];
9
- defaultComponent?: ComponentType<TransRenderProps>;
10
- };
11
- type I18nProviderProps = Omit<I18nContext, "_"> & {
12
- children?: React.ReactNode;
13
- };
14
- declare const LinguiContext: React.Context<I18nContext | null>;
15
- declare function useLingui(): I18nContext;
16
- declare const I18nProvider: FunctionComponent<I18nProviderProps>;
1
+ export { b as I18nContext, I as I18nProvider, a as I18nProviderProps, L as LinguiContext, u as useLingui } from './shared/react.145db227.mjs';
2
+ 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
+ import '@lingui/core';
17
6
 
18
7
  declare function Trans(props: TransProps): React.ReactElement<any, any> | null;
19
8
 
20
- export { type I18nContext, I18nProvider, type I18nProviderProps, LinguiContext, Trans, TransProps, TransRenderProps, useLingui };
9
+ export { Trans, TransProps };
package/dist/index.d.ts CHANGED
@@ -1,20 +1,9 @@
1
- import React, { ComponentType, FunctionComponent } from 'react';
2
- import { I18n } from '@lingui/core';
3
- import { TransRenderProps, TransProps } from './server.js';
4
- export { TransRenderCallbackOrComponent } from './server.js';
5
-
6
- type I18nContext = {
7
- i18n: I18n;
8
- _: I18n["_"];
9
- defaultComponent?: ComponentType<TransRenderProps>;
10
- };
11
- type I18nProviderProps = Omit<I18nContext, "_"> & {
12
- children?: React.ReactNode;
13
- };
14
- declare const LinguiContext: React.Context<I18nContext | null>;
15
- declare function useLingui(): I18nContext;
16
- declare const I18nProvider: FunctionComponent<I18nProviderProps>;
1
+ export { b as I18nContext, I as I18nProvider, a as I18nProviderProps, L as LinguiContext, u as useLingui } from './shared/react.80f80298.js';
2
+ 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
+ import '@lingui/core';
17
6
 
18
7
  declare function Trans(props: TransProps): React.ReactElement<any, any> | null;
19
8
 
20
- export { type I18nContext, I18nProvider, type I18nProviderProps, LinguiContext, Trans, TransProps, TransRenderProps, useLingui };
9
+ export { Trans, TransProps };
package/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import React from 'react';
3
- import { TransNoContext } from './server.mjs';
3
+ import { T as TransNoContext } from './shared/react.1d406965.mjs';
4
4
 
5
5
  const LinguiContext = React.createContext(null);
6
6
  const useLinguiInternal = (devErrorMessage) => {
package/dist/server.cjs CHANGED
@@ -1,139 +1,28 @@
1
1
  'use strict';
2
2
 
3
+ const TransNoContext = require('./shared/react.6b65948d.cjs');
3
4
  const React = require('react');
4
5
 
5
6
  function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
6
7
 
7
8
  const React__default = /*#__PURE__*/_interopDefaultCompat(React);
8
9
 
9
- const tagRe = /<([a-zA-Z0-9]+)>(.*?)<\/\1>|<([a-zA-Z0-9]+)\/>/;
10
- const nlRe = /(?:\r\n|\r|\n)/g;
11
- const voidElementTags = {
12
- area: true,
13
- base: true,
14
- br: true,
15
- col: true,
16
- embed: true,
17
- hr: true,
18
- img: true,
19
- input: true,
20
- keygen: true,
21
- link: true,
22
- meta: true,
23
- param: true,
24
- source: true,
25
- track: true,
26
- wbr: true,
27
- menuitem: true
28
- };
29
- function formatElements(value, elements = {}) {
30
- const uniqueId = makeCounter(0, "$lingui$");
31
- const parts = value.replace(nlRe, "").split(tagRe);
32
- if (parts.length === 1)
33
- return value;
34
- const tree = [];
35
- const before = parts.shift();
36
- if (before)
37
- tree.push(before);
38
- for (const [index, children, after] of getElements(parts)) {
39
- let element = typeof index !== "undefined" ? elements[index] : void 0;
40
- if (!element || voidElementTags[element.type] && children) {
41
- if (!element) {
42
- console.error(
43
- `Can't use element at index '${index}' as it is not declared in the original translation`
44
- );
45
- } else {
46
- console.error(
47
- `${element.type} is a void element tag therefore it must have no children`
48
- );
49
- }
50
- element = React__default.createElement(React__default.Fragment);
51
- }
52
- if (Array.isArray(element)) {
53
- element = React__default.createElement(React__default.Fragment, {}, element);
54
- }
55
- tree.push(
56
- React__default.cloneElement(
57
- element,
58
- { key: uniqueId() },
59
- // format children for pair tags
60
- // unpaired tags might have children if it's a component passed as a variable
61
- children ? formatElements(children, elements) : element.props.children
62
- )
63
- );
64
- if (after)
65
- tree.push(after);
10
+ let cache = null;
11
+ const getLinguiCache = () => {
12
+ if (!cache) {
13
+ cache = React__default.cache(() => ({
14
+ current: null
15
+ }));
66
16
  }
67
- return tree;
17
+ return cache();
18
+ };
19
+ function setI18n(i18n) {
20
+ getLinguiCache().current = i18n;
68
21
  }
69
- function getElements(parts) {
70
- if (!parts.length)
71
- return [];
72
- const [paired, children, unpaired, after] = parts.slice(0, 4);
73
- const triple = [paired || unpaired, children || "", after];
74
- return [triple].concat(getElements(parts.slice(4, parts.length)));
22
+ function getI18n() {
23
+ return getLinguiCache().current;
75
24
  }
76
- const makeCounter = (count = 0, prefix = "") => () => `${prefix}_${count++}`;
77
-
78
- function TransNoContext(props) {
79
- const {
80
- render,
81
- component,
82
- id,
83
- message,
84
- formats,
85
- lingui: { i18n, defaultComponent }
86
- } = props;
87
- const values = { ...props.values };
88
- const components = { ...props.components };
89
- if (values) {
90
- Object.keys(values).forEach((key) => {
91
- const value = values[key];
92
- const valueIsReactEl = React__default.isValidElement(value) || Array.isArray(value) && value.every(React__default.isValidElement);
93
- if (!valueIsReactEl)
94
- return;
95
- const index = Object.keys(components).length;
96
- components[index] = value;
97
- values[key] = `<${index}/>`;
98
- });
99
- }
100
- const _translation = i18n && typeof i18n._ === "function" ? i18n._(id, values, { message, formats }) : id;
101
- const translation = _translation ? formatElements(_translation, components) : null;
102
- if (render === null || component === null) {
103
- return translation;
104
- }
105
- const FallbackComponent = defaultComponent || RenderFragment;
106
- const i18nProps = {
107
- id,
108
- message,
109
- translation,
110
- // TODO vonovak - remove isTranslated prop in v5 release
111
- isTranslated: id !== translation && message !== translation,
112
- children: translation
113
- // for type-compatibility with `component` prop
114
- };
115
- if (render && component) {
116
- console.error(
117
- "You can't use both `component` and `render` prop at the same time. `component` is ignored."
118
- );
119
- } else if (render && typeof render !== "function") {
120
- console.error(
121
- `Invalid value supplied to prop \`render\`. It must be a function, provided ${render}`
122
- );
123
- } else if (component && typeof component !== "function") {
124
- console.error(
125
- `Invalid value supplied to prop \`component\`. It must be a React component, provided ${component}`
126
- );
127
- return React__default.createElement(FallbackComponent, i18nProps, translation);
128
- }
129
- if (typeof render === "function") {
130
- return render(i18nProps);
131
- }
132
- const Component = component || FallbackComponent;
133
- return React__default.createElement(Component, i18nProps, translation);
134
- }
135
- const RenderFragment = ({ children }) => {
136
- return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children);
137
- };
138
25
 
139
- exports.TransNoContext = TransNoContext;
26
+ exports.TransNoContext = TransNoContext.TransNoContext;
27
+ exports.getI18n = getI18n;
28
+ exports.setI18n = setI18n;
package/dist/server.d.cts CHANGED
@@ -1,45 +1,44 @@
1
- import React, { ComponentType } from 'react';
2
- import { MessageOptions, I18n } from '@lingui/core';
1
+ export { c as TransNoContext, T as TransProps, b as TransRenderCallbackOrComponent, a as TransRenderProps } from './shared/react.a673be03.cjs';
2
+ import { I18n } from '@lingui/core';
3
+ import 'react';
3
4
 
4
- type TransRenderProps = {
5
- id: string;
6
- translation: React.ReactNode;
7
- children: React.ReactNode;
8
- message?: string | null;
9
- /**
10
- * @deprecated isTranslated prop is undocumented and buggy. It'll be removed in v5 release.
11
- * */
12
- isTranslated: boolean;
13
- };
14
- type TransRenderCallbackOrComponent = {
15
- component?: undefined;
16
- render?: ((props: TransRenderProps) => React.ReactElement<any, any>) | null;
17
- } | {
18
- component?: React.ComponentType<TransRenderProps> | null;
19
- render?: undefined;
20
- };
21
- type TransProps = {
22
- id: string;
23
- message?: string;
24
- values?: Record<string, unknown>;
25
- components?: {
26
- [key: string]: React.ElementType | any;
27
- };
28
- formats?: MessageOptions["formats"];
29
- comment?: string;
30
- children?: React.ReactNode;
31
- } & TransRenderCallbackOrComponent;
32
5
  /**
33
- * Version of `<Trans>` component without using a Provider/Context React feature.
34
- * Primarily made for support React Server Components (RSC)
6
+ * This is an entry point for React Server Components (RSC)
35
7
  *
36
- * @experimental the api of this component is not stabilized yet.
8
+ * The RSC uses a static analysis to find any non-valid function calls in the import graph.
9
+ * That means this entry point and it's children should not have any Provider/Context calls.
37
10
  */
38
- declare function TransNoContext(props: TransProps & {
39
- lingui: {
40
- i18n: I18n;
41
- defaultComponent?: ComponentType<TransRenderProps>;
42
- };
43
- }): React.ReactElement<any, any> | null;
44
11
 
45
- export { TransNoContext, type TransProps, type TransRenderCallbackOrComponent, type TransRenderProps };
12
+ /**
13
+ * Set Lingui's i18n instance for later use in RSC Components
14
+ *
15
+ * Example:
16
+ *
17
+ * ```js
18
+ * import { setupI18n } from "@lingui/core";
19
+ *
20
+ * const i18n = setupI18n({
21
+ * locale,
22
+ * messages: { [locale]: messages },
23
+ * })
24
+ *
25
+ * setI18n(i18n);
26
+ * ```
27
+ */
28
+ declare function setI18n(i18n: I18n): void;
29
+ /**
30
+ * Get Lingui's i18n instance saved for RSC
31
+ *
32
+ * ```js
33
+ * export function generateMetadata() {
34
+ * const i18n = getI18n()
35
+ *
36
+ * return {
37
+ * title: t(i18n)`Translation Demo`,
38
+ * }
39
+ * }
40
+ * ```
41
+ */
42
+ declare function getI18n(): I18n | null;
43
+
44
+ export { getI18n, setI18n };
package/dist/server.d.mts CHANGED
@@ -1,45 +1,44 @@
1
- import React, { ComponentType } from 'react';
2
- import { MessageOptions, I18n } from '@lingui/core';
1
+ export { c as TransNoContext, T as TransProps, b as TransRenderCallbackOrComponent, a as TransRenderProps } from './shared/react.a673be03.mjs';
2
+ import { I18n } from '@lingui/core';
3
+ import 'react';
3
4
 
4
- type TransRenderProps = {
5
- id: string;
6
- translation: React.ReactNode;
7
- children: React.ReactNode;
8
- message?: string | null;
9
- /**
10
- * @deprecated isTranslated prop is undocumented and buggy. It'll be removed in v5 release.
11
- * */
12
- isTranslated: boolean;
13
- };
14
- type TransRenderCallbackOrComponent = {
15
- component?: undefined;
16
- render?: ((props: TransRenderProps) => React.ReactElement<any, any>) | null;
17
- } | {
18
- component?: React.ComponentType<TransRenderProps> | null;
19
- render?: undefined;
20
- };
21
- type TransProps = {
22
- id: string;
23
- message?: string;
24
- values?: Record<string, unknown>;
25
- components?: {
26
- [key: string]: React.ElementType | any;
27
- };
28
- formats?: MessageOptions["formats"];
29
- comment?: string;
30
- children?: React.ReactNode;
31
- } & TransRenderCallbackOrComponent;
32
5
  /**
33
- * Version of `<Trans>` component without using a Provider/Context React feature.
34
- * Primarily made for support React Server Components (RSC)
6
+ * This is an entry point for React Server Components (RSC)
35
7
  *
36
- * @experimental the api of this component is not stabilized yet.
8
+ * The RSC uses a static analysis to find any non-valid function calls in the import graph.
9
+ * That means this entry point and it's children should not have any Provider/Context calls.
37
10
  */
38
- declare function TransNoContext(props: TransProps & {
39
- lingui: {
40
- i18n: I18n;
41
- defaultComponent?: ComponentType<TransRenderProps>;
42
- };
43
- }): React.ReactElement<any, any> | null;
44
11
 
45
- export { TransNoContext, type TransProps, type TransRenderCallbackOrComponent, type TransRenderProps };
12
+ /**
13
+ * Set Lingui's i18n instance for later use in RSC Components
14
+ *
15
+ * Example:
16
+ *
17
+ * ```js
18
+ * import { setupI18n } from "@lingui/core";
19
+ *
20
+ * const i18n = setupI18n({
21
+ * locale,
22
+ * messages: { [locale]: messages },
23
+ * })
24
+ *
25
+ * setI18n(i18n);
26
+ * ```
27
+ */
28
+ declare function setI18n(i18n: I18n): void;
29
+ /**
30
+ * Get Lingui's i18n instance saved for RSC
31
+ *
32
+ * ```js
33
+ * export function generateMetadata() {
34
+ * const i18n = getI18n()
35
+ *
36
+ * return {
37
+ * title: t(i18n)`Translation Demo`,
38
+ * }
39
+ * }
40
+ * ```
41
+ */
42
+ declare function getI18n(): I18n | null;
43
+
44
+ export { getI18n, setI18n };
package/dist/server.d.ts CHANGED
@@ -1,45 +1,44 @@
1
- import React, { ComponentType } from 'react';
2
- import { MessageOptions, I18n } from '@lingui/core';
1
+ export { c as TransNoContext, T as TransProps, b as TransRenderCallbackOrComponent, a as TransRenderProps } from './shared/react.a673be03.js';
2
+ import { I18n } from '@lingui/core';
3
+ import 'react';
3
4
 
4
- type TransRenderProps = {
5
- id: string;
6
- translation: React.ReactNode;
7
- children: React.ReactNode;
8
- message?: string | null;
9
- /**
10
- * @deprecated isTranslated prop is undocumented and buggy. It'll be removed in v5 release.
11
- * */
12
- isTranslated: boolean;
13
- };
14
- type TransRenderCallbackOrComponent = {
15
- component?: undefined;
16
- render?: ((props: TransRenderProps) => React.ReactElement<any, any>) | null;
17
- } | {
18
- component?: React.ComponentType<TransRenderProps> | null;
19
- render?: undefined;
20
- };
21
- type TransProps = {
22
- id: string;
23
- message?: string;
24
- values?: Record<string, unknown>;
25
- components?: {
26
- [key: string]: React.ElementType | any;
27
- };
28
- formats?: MessageOptions["formats"];
29
- comment?: string;
30
- children?: React.ReactNode;
31
- } & TransRenderCallbackOrComponent;
32
5
  /**
33
- * Version of `<Trans>` component without using a Provider/Context React feature.
34
- * Primarily made for support React Server Components (RSC)
6
+ * This is an entry point for React Server Components (RSC)
35
7
  *
36
- * @experimental the api of this component is not stabilized yet.
8
+ * The RSC uses a static analysis to find any non-valid function calls in the import graph.
9
+ * That means this entry point and it's children should not have any Provider/Context calls.
37
10
  */
38
- declare function TransNoContext(props: TransProps & {
39
- lingui: {
40
- i18n: I18n;
41
- defaultComponent?: ComponentType<TransRenderProps>;
42
- };
43
- }): React.ReactElement<any, any> | null;
44
11
 
45
- export { TransNoContext, type TransProps, type TransRenderCallbackOrComponent, type TransRenderProps };
12
+ /**
13
+ * Set Lingui's i18n instance for later use in RSC Components
14
+ *
15
+ * Example:
16
+ *
17
+ * ```js
18
+ * import { setupI18n } from "@lingui/core";
19
+ *
20
+ * const i18n = setupI18n({
21
+ * locale,
22
+ * messages: { [locale]: messages },
23
+ * })
24
+ *
25
+ * setI18n(i18n);
26
+ * ```
27
+ */
28
+ declare function setI18n(i18n: I18n): void;
29
+ /**
30
+ * Get Lingui's i18n instance saved for RSC
31
+ *
32
+ * ```js
33
+ * export function generateMetadata() {
34
+ * const i18n = getI18n()
35
+ *
36
+ * return {
37
+ * title: t(i18n)`Translation Demo`,
38
+ * }
39
+ * }
40
+ * ```
41
+ */
42
+ declare function getI18n(): I18n | null;
43
+
44
+ export { getI18n, setI18n };
package/dist/server.mjs CHANGED
@@ -1,133 +1,20 @@
1
+ export { T as TransNoContext } from './shared/react.1d406965.mjs';
1
2
  import React from 'react';
2
3
 
3
- const tagRe = /<([a-zA-Z0-9]+)>(.*?)<\/\1>|<([a-zA-Z0-9]+)\/>/;
4
- const nlRe = /(?:\r\n|\r|\n)/g;
5
- const voidElementTags = {
6
- area: true,
7
- base: true,
8
- br: true,
9
- col: true,
10
- embed: true,
11
- hr: true,
12
- img: true,
13
- input: true,
14
- keygen: true,
15
- link: true,
16
- meta: true,
17
- param: true,
18
- source: true,
19
- track: true,
20
- wbr: true,
21
- menuitem: true
22
- };
23
- function formatElements(value, elements = {}) {
24
- const uniqueId = makeCounter(0, "$lingui$");
25
- const parts = value.replace(nlRe, "").split(tagRe);
26
- if (parts.length === 1)
27
- return value;
28
- const tree = [];
29
- const before = parts.shift();
30
- if (before)
31
- tree.push(before);
32
- for (const [index, children, after] of getElements(parts)) {
33
- let element = typeof index !== "undefined" ? elements[index] : void 0;
34
- if (!element || voidElementTags[element.type] && children) {
35
- if (!element) {
36
- console.error(
37
- `Can't use element at index '${index}' as it is not declared in the original translation`
38
- );
39
- } else {
40
- console.error(
41
- `${element.type} is a void element tag therefore it must have no children`
42
- );
43
- }
44
- element = React.createElement(React.Fragment);
45
- }
46
- if (Array.isArray(element)) {
47
- element = React.createElement(React.Fragment, {}, element);
48
- }
49
- tree.push(
50
- React.cloneElement(
51
- element,
52
- { key: uniqueId() },
53
- // format children for pair tags
54
- // unpaired tags might have children if it's a component passed as a variable
55
- children ? formatElements(children, elements) : element.props.children
56
- )
57
- );
58
- if (after)
59
- tree.push(after);
4
+ let cache = null;
5
+ const getLinguiCache = () => {
6
+ if (!cache) {
7
+ cache = React.cache(() => ({
8
+ current: null
9
+ }));
60
10
  }
61
- return tree;
11
+ return cache();
12
+ };
13
+ function setI18n(i18n) {
14
+ getLinguiCache().current = i18n;
62
15
  }
63
- function getElements(parts) {
64
- if (!parts.length)
65
- return [];
66
- const [paired, children, unpaired, after] = parts.slice(0, 4);
67
- const triple = [paired || unpaired, children || "", after];
68
- return [triple].concat(getElements(parts.slice(4, parts.length)));
16
+ function getI18n() {
17
+ return getLinguiCache().current;
69
18
  }
70
- const makeCounter = (count = 0, prefix = "") => () => `${prefix}_${count++}`;
71
-
72
- function TransNoContext(props) {
73
- const {
74
- render,
75
- component,
76
- id,
77
- message,
78
- formats,
79
- lingui: { i18n, defaultComponent }
80
- } = props;
81
- const values = { ...props.values };
82
- const components = { ...props.components };
83
- if (values) {
84
- Object.keys(values).forEach((key) => {
85
- const value = values[key];
86
- const valueIsReactEl = React.isValidElement(value) || Array.isArray(value) && value.every(React.isValidElement);
87
- if (!valueIsReactEl)
88
- return;
89
- const index = Object.keys(components).length;
90
- components[index] = value;
91
- values[key] = `<${index}/>`;
92
- });
93
- }
94
- const _translation = i18n && typeof i18n._ === "function" ? i18n._(id, values, { message, formats }) : id;
95
- const translation = _translation ? formatElements(_translation, components) : null;
96
- if (render === null || component === null) {
97
- return translation;
98
- }
99
- const FallbackComponent = defaultComponent || RenderFragment;
100
- const i18nProps = {
101
- id,
102
- message,
103
- translation,
104
- // TODO vonovak - remove isTranslated prop in v5 release
105
- isTranslated: id !== translation && message !== translation,
106
- children: translation
107
- // for type-compatibility with `component` prop
108
- };
109
- if (render && component) {
110
- console.error(
111
- "You can't use both `component` and `render` prop at the same time. `component` is ignored."
112
- );
113
- } else if (render && typeof render !== "function") {
114
- console.error(
115
- `Invalid value supplied to prop \`render\`. It must be a function, provided ${render}`
116
- );
117
- } else if (component && typeof component !== "function") {
118
- console.error(
119
- `Invalid value supplied to prop \`component\`. It must be a React component, provided ${component}`
120
- );
121
- return React.createElement(FallbackComponent, i18nProps, translation);
122
- }
123
- if (typeof render === "function") {
124
- return render(i18nProps);
125
- }
126
- const Component = component || FallbackComponent;
127
- return React.createElement(Component, i18nProps, translation);
128
- }
129
- const RenderFragment = ({ children }) => {
130
- return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
131
- };
132
19
 
133
- export { TransNoContext };
20
+ export { getI18n, setI18n };
@@ -0,0 +1,17 @@
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 };
@@ -0,0 +1,133 @@
1
+ import React from 'react';
2
+
3
+ const tagRe = /<([a-zA-Z0-9]+)>(.*?)<\/\1>|<([a-zA-Z0-9]+)\/>/;
4
+ const nlRe = /(?:\r\n|\r|\n)/g;
5
+ const voidElementTags = {
6
+ area: true,
7
+ base: true,
8
+ br: true,
9
+ col: true,
10
+ embed: true,
11
+ hr: true,
12
+ img: true,
13
+ input: true,
14
+ keygen: true,
15
+ link: true,
16
+ meta: true,
17
+ param: true,
18
+ source: true,
19
+ track: true,
20
+ wbr: true,
21
+ menuitem: true
22
+ };
23
+ function formatElements(value, elements = {}) {
24
+ const uniqueId = makeCounter(0, "$lingui$");
25
+ const parts = value.replace(nlRe, "").split(tagRe);
26
+ if (parts.length === 1)
27
+ return value;
28
+ const tree = [];
29
+ const before = parts.shift();
30
+ if (before)
31
+ tree.push(before);
32
+ for (const [index, children, after] of getElements(parts)) {
33
+ let element = typeof index !== "undefined" ? elements[index] : void 0;
34
+ if (!element || voidElementTags[element.type] && children) {
35
+ if (!element) {
36
+ console.error(
37
+ `Can't use element at index '${index}' as it is not declared in the original translation`
38
+ );
39
+ } else {
40
+ console.error(
41
+ `${element.type} is a void element tag therefore it must have no children`
42
+ );
43
+ }
44
+ element = React.createElement(React.Fragment);
45
+ }
46
+ if (Array.isArray(element)) {
47
+ element = React.createElement(React.Fragment, {}, element);
48
+ }
49
+ tree.push(
50
+ React.cloneElement(
51
+ element,
52
+ { key: uniqueId() },
53
+ // format children for pair tags
54
+ // unpaired tags might have children if it's a component passed as a variable
55
+ children ? formatElements(children, elements) : element.props.children
56
+ )
57
+ );
58
+ if (after)
59
+ tree.push(after);
60
+ }
61
+ return tree;
62
+ }
63
+ function getElements(parts) {
64
+ if (!parts.length)
65
+ return [];
66
+ const [paired, children, unpaired, after] = parts.slice(0, 4);
67
+ const triple = [paired || unpaired, children || "", after];
68
+ return [triple].concat(getElements(parts.slice(4, parts.length)));
69
+ }
70
+ const makeCounter = (count = 0, prefix = "") => () => `${prefix}_${count++}`;
71
+
72
+ function TransNoContext(props) {
73
+ const {
74
+ render,
75
+ component,
76
+ id,
77
+ message,
78
+ formats,
79
+ lingui: { i18n, defaultComponent }
80
+ } = props;
81
+ const values = { ...props.values };
82
+ const components = { ...props.components };
83
+ if (values) {
84
+ Object.keys(values).forEach((key) => {
85
+ const value = values[key];
86
+ const valueIsReactEl = React.isValidElement(value) || Array.isArray(value) && value.every(React.isValidElement);
87
+ if (!valueIsReactEl)
88
+ return;
89
+ const index = Object.keys(components).length;
90
+ components[index] = value;
91
+ values[key] = `<${index}/>`;
92
+ });
93
+ }
94
+ const _translation = i18n && typeof i18n._ === "function" ? i18n._(id, values, { message, formats }) : id;
95
+ const translation = _translation ? formatElements(_translation, components) : null;
96
+ if (render === null || component === null) {
97
+ return translation;
98
+ }
99
+ const FallbackComponent = defaultComponent || RenderFragment;
100
+ const i18nProps = {
101
+ id,
102
+ message,
103
+ translation,
104
+ // TODO vonovak - remove isTranslated prop in v5 release
105
+ isTranslated: id !== translation && message !== translation,
106
+ children: translation
107
+ // for type-compatibility with `component` prop
108
+ };
109
+ if (render && component) {
110
+ console.error(
111
+ "You can't use both `component` and `render` prop at the same time. `component` is ignored."
112
+ );
113
+ } else if (render && typeof render !== "function") {
114
+ console.error(
115
+ `Invalid value supplied to prop \`render\`. It must be a function, provided ${render}`
116
+ );
117
+ } else if (component && typeof component !== "function") {
118
+ console.error(
119
+ `Invalid value supplied to prop \`component\`. It must be a React component, provided ${component}`
120
+ );
121
+ return React.createElement(FallbackComponent, i18nProps, translation);
122
+ }
123
+ if (typeof render === "function") {
124
+ return render(i18nProps);
125
+ }
126
+ const Component = component || FallbackComponent;
127
+ return React.createElement(Component, i18nProps, translation);
128
+ }
129
+ const RenderFragment = ({ children }) => {
130
+ return /* @__PURE__ */ React.createElement(React.Fragment, null, children);
131
+ };
132
+
133
+ export { TransNoContext as T };
@@ -0,0 +1,139 @@
1
+ 'use strict';
2
+
3
+ const React = require('react');
4
+
5
+ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
6
+
7
+ const React__default = /*#__PURE__*/_interopDefaultCompat(React);
8
+
9
+ const tagRe = /<([a-zA-Z0-9]+)>(.*?)<\/\1>|<([a-zA-Z0-9]+)\/>/;
10
+ const nlRe = /(?:\r\n|\r|\n)/g;
11
+ const voidElementTags = {
12
+ area: true,
13
+ base: true,
14
+ br: true,
15
+ col: true,
16
+ embed: true,
17
+ hr: true,
18
+ img: true,
19
+ input: true,
20
+ keygen: true,
21
+ link: true,
22
+ meta: true,
23
+ param: true,
24
+ source: true,
25
+ track: true,
26
+ wbr: true,
27
+ menuitem: true
28
+ };
29
+ function formatElements(value, elements = {}) {
30
+ const uniqueId = makeCounter(0, "$lingui$");
31
+ const parts = value.replace(nlRe, "").split(tagRe);
32
+ if (parts.length === 1)
33
+ return value;
34
+ const tree = [];
35
+ const before = parts.shift();
36
+ if (before)
37
+ tree.push(before);
38
+ for (const [index, children, after] of getElements(parts)) {
39
+ let element = typeof index !== "undefined" ? elements[index] : void 0;
40
+ if (!element || voidElementTags[element.type] && children) {
41
+ if (!element) {
42
+ console.error(
43
+ `Can't use element at index '${index}' as it is not declared in the original translation`
44
+ );
45
+ } else {
46
+ console.error(
47
+ `${element.type} is a void element tag therefore it must have no children`
48
+ );
49
+ }
50
+ element = React__default.createElement(React__default.Fragment);
51
+ }
52
+ if (Array.isArray(element)) {
53
+ element = React__default.createElement(React__default.Fragment, {}, element);
54
+ }
55
+ tree.push(
56
+ React__default.cloneElement(
57
+ element,
58
+ { key: uniqueId() },
59
+ // format children for pair tags
60
+ // unpaired tags might have children if it's a component passed as a variable
61
+ children ? formatElements(children, elements) : element.props.children
62
+ )
63
+ );
64
+ if (after)
65
+ tree.push(after);
66
+ }
67
+ return tree;
68
+ }
69
+ function getElements(parts) {
70
+ if (!parts.length)
71
+ return [];
72
+ const [paired, children, unpaired, after] = parts.slice(0, 4);
73
+ const triple = [paired || unpaired, children || "", after];
74
+ return [triple].concat(getElements(parts.slice(4, parts.length)));
75
+ }
76
+ const makeCounter = (count = 0, prefix = "") => () => `${prefix}_${count++}`;
77
+
78
+ function TransNoContext(props) {
79
+ const {
80
+ render,
81
+ component,
82
+ id,
83
+ message,
84
+ formats,
85
+ lingui: { i18n, defaultComponent }
86
+ } = props;
87
+ const values = { ...props.values };
88
+ const components = { ...props.components };
89
+ if (values) {
90
+ Object.keys(values).forEach((key) => {
91
+ const value = values[key];
92
+ const valueIsReactEl = React__default.isValidElement(value) || Array.isArray(value) && value.every(React__default.isValidElement);
93
+ if (!valueIsReactEl)
94
+ return;
95
+ const index = Object.keys(components).length;
96
+ components[index] = value;
97
+ values[key] = `<${index}/>`;
98
+ });
99
+ }
100
+ const _translation = i18n && typeof i18n._ === "function" ? i18n._(id, values, { message, formats }) : id;
101
+ const translation = _translation ? formatElements(_translation, components) : null;
102
+ if (render === null || component === null) {
103
+ return translation;
104
+ }
105
+ const FallbackComponent = defaultComponent || RenderFragment;
106
+ const i18nProps = {
107
+ id,
108
+ message,
109
+ translation,
110
+ // TODO vonovak - remove isTranslated prop in v5 release
111
+ isTranslated: id !== translation && message !== translation,
112
+ children: translation
113
+ // for type-compatibility with `component` prop
114
+ };
115
+ if (render && component) {
116
+ console.error(
117
+ "You can't use both `component` and `render` prop at the same time. `component` is ignored."
118
+ );
119
+ } else if (render && typeof render !== "function") {
120
+ console.error(
121
+ `Invalid value supplied to prop \`render\`. It must be a function, provided ${render}`
122
+ );
123
+ } else if (component && typeof component !== "function") {
124
+ console.error(
125
+ `Invalid value supplied to prop \`component\`. It must be a React component, provided ${component}`
126
+ );
127
+ return React__default.createElement(FallbackComponent, i18nProps, translation);
128
+ }
129
+ if (typeof render === "function") {
130
+ return render(i18nProps);
131
+ }
132
+ const Component = component || FallbackComponent;
133
+ return React__default.createElement(Component, i18nProps, translation);
134
+ }
135
+ const RenderFragment = ({ children }) => {
136
+ return /* @__PURE__ */ React__default.createElement(React__default.Fragment, null, children);
137
+ };
138
+
139
+ exports.TransNoContext = TransNoContext;
@@ -0,0 +1,17 @@
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 };
@@ -0,0 +1,45 @@
1
+ import React, { ComponentType } from 'react';
2
+ import { MessageOptions, I18n } from '@lingui/core';
3
+
4
+ type TransRenderProps = {
5
+ id: string;
6
+ translation: React.ReactNode;
7
+ children: React.ReactNode;
8
+ message?: string | null;
9
+ /**
10
+ * @deprecated isTranslated prop is undocumented and buggy. It'll be removed in v5 release.
11
+ * */
12
+ isTranslated: boolean;
13
+ };
14
+ type TransRenderCallbackOrComponent = {
15
+ component?: undefined;
16
+ render?: ((props: TransRenderProps) => React.ReactElement<any, any>) | null;
17
+ } | {
18
+ component?: React.ComponentType<TransRenderProps> | null;
19
+ render?: undefined;
20
+ };
21
+ type TransProps = {
22
+ id: string;
23
+ message?: string;
24
+ values?: Record<string, unknown>;
25
+ components?: {
26
+ [key: string]: React.ElementType | any;
27
+ };
28
+ formats?: MessageOptions["formats"];
29
+ comment?: string;
30
+ children?: React.ReactNode;
31
+ } & TransRenderCallbackOrComponent;
32
+ /**
33
+ * Version of `<Trans>` component without using a Provider/Context React feature.
34
+ * Primarily made for support React Server Components (RSC)
35
+ *
36
+ * @experimental the api of this component is not stabilized yet.
37
+ */
38
+ declare function TransNoContext(props: TransProps & {
39
+ lingui: {
40
+ i18n: I18n;
41
+ defaultComponent?: ComponentType<TransRenderProps>;
42
+ };
43
+ }): React.ReactElement<any, any> | null;
44
+
45
+ export { type TransProps as T, type TransRenderProps as a, type TransRenderCallbackOrComponent as b, TransNoContext as c };
@@ -0,0 +1,45 @@
1
+ import React, { ComponentType } from 'react';
2
+ import { MessageOptions, I18n } from '@lingui/core';
3
+
4
+ type TransRenderProps = {
5
+ id: string;
6
+ translation: React.ReactNode;
7
+ children: React.ReactNode;
8
+ message?: string | null;
9
+ /**
10
+ * @deprecated isTranslated prop is undocumented and buggy. It'll be removed in v5 release.
11
+ * */
12
+ isTranslated: boolean;
13
+ };
14
+ type TransRenderCallbackOrComponent = {
15
+ component?: undefined;
16
+ render?: ((props: TransRenderProps) => React.ReactElement<any, any>) | null;
17
+ } | {
18
+ component?: React.ComponentType<TransRenderProps> | null;
19
+ render?: undefined;
20
+ };
21
+ type TransProps = {
22
+ id: string;
23
+ message?: string;
24
+ values?: Record<string, unknown>;
25
+ components?: {
26
+ [key: string]: React.ElementType | any;
27
+ };
28
+ formats?: MessageOptions["formats"];
29
+ comment?: string;
30
+ children?: React.ReactNode;
31
+ } & TransRenderCallbackOrComponent;
32
+ /**
33
+ * Version of `<Trans>` component without using a Provider/Context React feature.
34
+ * Primarily made for support React Server Components (RSC)
35
+ *
36
+ * @experimental the api of this component is not stabilized yet.
37
+ */
38
+ declare function TransNoContext(props: TransProps & {
39
+ lingui: {
40
+ i18n: I18n;
41
+ defaultComponent?: ComponentType<TransRenderProps>;
42
+ };
43
+ }): React.ReactElement<any, any> | null;
44
+
45
+ export { type TransProps as T, type TransRenderProps as a, type TransRenderCallbackOrComponent as b, TransNoContext as c };
@@ -0,0 +1,45 @@
1
+ import React, { ComponentType } from 'react';
2
+ import { MessageOptions, I18n } from '@lingui/core';
3
+
4
+ type TransRenderProps = {
5
+ id: string;
6
+ translation: React.ReactNode;
7
+ children: React.ReactNode;
8
+ message?: string | null;
9
+ /**
10
+ * @deprecated isTranslated prop is undocumented and buggy. It'll be removed in v5 release.
11
+ * */
12
+ isTranslated: boolean;
13
+ };
14
+ type TransRenderCallbackOrComponent = {
15
+ component?: undefined;
16
+ render?: ((props: TransRenderProps) => React.ReactElement<any, any>) | null;
17
+ } | {
18
+ component?: React.ComponentType<TransRenderProps> | null;
19
+ render?: undefined;
20
+ };
21
+ type TransProps = {
22
+ id: string;
23
+ message?: string;
24
+ values?: Record<string, unknown>;
25
+ components?: {
26
+ [key: string]: React.ElementType | any;
27
+ };
28
+ formats?: MessageOptions["formats"];
29
+ comment?: string;
30
+ children?: React.ReactNode;
31
+ } & TransRenderCallbackOrComponent;
32
+ /**
33
+ * Version of `<Trans>` component without using a Provider/Context React feature.
34
+ * Primarily made for support React Server Components (RSC)
35
+ *
36
+ * @experimental the api of this component is not stabilized yet.
37
+ */
38
+ declare function TransNoContext(props: TransProps & {
39
+ lingui: {
40
+ i18n: I18n;
41
+ defaultComponent?: ComponentType<TransRenderProps>;
42
+ };
43
+ }): React.ReactElement<any, any> | null;
44
+
45
+ export { type TransProps as T, type TransRenderProps as a, type TransRenderCallbackOrComponent as b, TransNoContext as c };
@@ -0,0 +1,17 @@
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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/react",
3
- "version": "4.8.0",
3
+ "version": "4.10.0",
4
4
  "sideEffects": false,
5
5
  "description": "React components for translations",
6
6
  "main": "./dist/index.cjs",
@@ -44,10 +44,12 @@
44
44
  ".": {
45
45
  "require": {
46
46
  "types": "./dist/index.d.cts",
47
+ "react-server": "./dist/index-rsc.cjs",
47
48
  "default": "./dist/index.cjs"
48
49
  },
49
50
  "import": {
50
51
  "types": "./dist/index.d.mts",
52
+ "react-server": "./dist/index-rsc.mjs",
51
53
  "default": "./dist/index.mjs"
52
54
  }
53
55
  },
@@ -73,7 +75,7 @@
73
75
  },
74
76
  "dependencies": {
75
77
  "@babel/runtime": "^7.20.13",
76
- "@lingui/core": "4.8.0"
78
+ "@lingui/core": "4.10.0"
77
79
  },
78
80
  "devDependencies": {
79
81
  "@lingui/jest-mocks": "*",
@@ -85,5 +87,5 @@
85
87
  "react-dom": "^18.2.0",
86
88
  "unbuild": "2.0.0"
87
89
  },
88
- "gitHead": "1b3a1209b06e9a6b6820ce54064da87052c21fa5"
90
+ "gitHead": "5088feb92de2a669659e85067c2849331122e830"
89
91
  }