@generaltranslation/react-core 1.5.8 → 1.5.10
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/CHANGELOG.md +18 -0
- package/dist/index.cjs.min.cjs +1 -1
- package/dist/index.cjs.min.cjs.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.min.mjs +1 -1
- package/dist/index.esm.min.mjs.map +1 -1
- package/dist/internal.cjs.min.cjs +1 -1
- package/dist/internal.cjs.min.cjs.map +1 -1
- package/dist/internal.d.ts +3 -3
- package/dist/internal.d.ts.map +1 -1
- package/dist/internal.esm.min.mjs +3 -3
- package/dist/internal.esm.min.mjs.map +1 -1
- package/dist/variables/Derive.d.ts +52 -0
- package/dist/variables/Derive.d.ts.map +1 -0
- package/package.json +4 -4
- package/dist/variables/Static.d.ts +0 -27
- package/dist/variables/Static.d.ts.map +0 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* `<Derive>` is a powerful but dangerous component which marks its children as statically analyzable for the compiler and CLI tool.
|
|
4
|
+
*
|
|
5
|
+
* This component is dangerous because it can cause the compiler and CLI tool to throw an error if children are not statically analyzable.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```jsx
|
|
9
|
+
* function getSubject() {
|
|
10
|
+
* return (Math.random() > 0.5) ? "Alice" : "Brian";
|
|
11
|
+
* }
|
|
12
|
+
* ...
|
|
13
|
+
* <T>
|
|
14
|
+
* <Derive>
|
|
15
|
+
* {getSubject()}
|
|
16
|
+
* </Derive>
|
|
17
|
+
* is going to school today.
|
|
18
|
+
* </T>
|
|
19
|
+
* ```
|
|
20
|
+
*
|
|
21
|
+
* @param {T extends React.ReactNode} children - Derived content to render.
|
|
22
|
+
* @returns {T} The result of the function invocation.
|
|
23
|
+
*/
|
|
24
|
+
export declare function Derive<T extends React.ReactNode>({ children, }: {
|
|
25
|
+
children: T;
|
|
26
|
+
}): T;
|
|
27
|
+
/**
|
|
28
|
+
* @deprecated Use `<Derive>` instead.
|
|
29
|
+
*
|
|
30
|
+
* `<Static>` is a powerful but dangerous component which marks its children as statically analyzable for the compiler and CLI tool.
|
|
31
|
+
*
|
|
32
|
+
* This component is dangerous because it can cause the compiler and CLI tool to throw an error if children are not statically analyzable.
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```jsx
|
|
36
|
+
* function getSubject() {
|
|
37
|
+
* return (Math.random() > 0.5) ? "Alice" : "Brian";
|
|
38
|
+
* }
|
|
39
|
+
* ...
|
|
40
|
+
* <T>
|
|
41
|
+
* <Static>
|
|
42
|
+
* {getSubject()}
|
|
43
|
+
* </Static>
|
|
44
|
+
* is going to school today.
|
|
45
|
+
* </T>
|
|
46
|
+
* ```
|
|
47
|
+
*
|
|
48
|
+
* @param {T extends React.ReactNode} children - Derived content to render.
|
|
49
|
+
* @returns {T} The result of the function invocation.
|
|
50
|
+
*/
|
|
51
|
+
export declare const Static: typeof Derive;
|
|
52
|
+
//# sourceMappingURL=Derive.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Derive.d.ts","sourceRoot":"","sources":["../../src/variables/Derive.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,KAAK,CAAC,SAAS,EAAE,EAChD,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,CAAC;CACb,GAAG,CAAC,CAEJ;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,MAAM,eAAS,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@generaltranslation/react-core",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.10",
|
|
4
4
|
"description": "A pure React library for internationalization",
|
|
5
5
|
"main": "./dist/index.cjs.min.cjs",
|
|
6
6
|
"module": "./dist/index.esm.min.mjs",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"react": ">=16.8.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@generaltranslation/supported-locales": "2.0.
|
|
17
|
-
"generaltranslation": "8.1.
|
|
18
|
-
"gt-i18n": "0.6.
|
|
16
|
+
"@generaltranslation/supported-locales": "2.0.50",
|
|
17
|
+
"generaltranslation": "8.1.17",
|
|
18
|
+
"gt-i18n": "0.6.2"
|
|
19
19
|
},
|
|
20
20
|
"repository": {
|
|
21
21
|
"type": "git",
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* `<Static>` is a powerful but dangerous component which marks its children as statically analyzable for the compiler and CLI tool.
|
|
4
|
-
*
|
|
5
|
-
* This component is dangerous because it can cause the compiler and CLI tool to throw an error if children are not statically analyzable.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* ```jsx
|
|
9
|
-
* function getSubject() {
|
|
10
|
-
* return (Math.random() > 0.5) ? "Alice" : "Brian";
|
|
11
|
-
* }
|
|
12
|
-
* ...
|
|
13
|
-
* <T>
|
|
14
|
-
* <Static>
|
|
15
|
-
* {getSubject()}
|
|
16
|
-
* </Static>
|
|
17
|
-
* is going to school today.
|
|
18
|
-
* </T>
|
|
19
|
-
* ```
|
|
20
|
-
*
|
|
21
|
-
* @param {T extends React.ReactNode} children - Static content to render.
|
|
22
|
-
* @returns {T} The result of the function invocation.
|
|
23
|
-
*/
|
|
24
|
-
export declare function Static<T extends React.ReactNode>({ children, }: {
|
|
25
|
-
children: T;
|
|
26
|
-
}): T;
|
|
27
|
-
//# sourceMappingURL=Static.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Static.d.ts","sourceRoot":"","sources":["../../src/variables/Static.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,MAAM,CAAC,CAAC,SAAS,KAAK,CAAC,SAAS,EAAE,EAChD,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,CAAC;CACb,GAAG,CAAC,CAEJ"}
|