@generaltranslation/react-core 1.0.9 → 1.1.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.
- package/CHANGELOG.md +14 -0
- package/dist/index.cjs.min.cjs +1 -1
- package/dist/index.cjs.min.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- 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/translation/inline/T.d.ts.map +1 -1
- package/dist/variables/Static.d.ts +29 -0
- package/dist/variables/Static.d.ts.map +1 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"T.d.ts","sourceRoot":"","sources":["../../../src/translation/inline/T.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,iBAAS,CAAC,CAAC,EACT,QAAQ,EACR,EAAE,EACF,OAAO,EACP,KAAK,EACL,GAAG,OAAO,EACX,EAAE;IACD,QAAQ,EAAE,GAAG,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"T.d.ts","sourceRoot":"","sources":["../../../src/translation/inline/T.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAanD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,iBAAS,CAAC,CAAC,EACT,QAAQ,EACR,EAAE,EACF,OAAO,EACP,KAAK,EACL,GAAG,OAAO,EACX,EAAE;IACD,QAAQ,EAAE,GAAG,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,SAAS,CAgKhC;kBA5KQ,CAAC;;;AAgLV,eAAe,CAAC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* The `<Static>` component allows you to render the output of a function invocation. Such a function MUST return
|
|
4
|
+
* only static content. If the function returns non-static content, the CLI tool will throw an error.
|
|
5
|
+
*
|
|
6
|
+
* Currently, this feature does not yet support <Suspense>.
|
|
7
|
+
*
|
|
8
|
+
* @example
|
|
9
|
+
* ```jsx
|
|
10
|
+
* function getSubject() {
|
|
11
|
+
* return 'John';
|
|
12
|
+
* }
|
|
13
|
+
* ...
|
|
14
|
+
* <T>
|
|
15
|
+
* <Static>
|
|
16
|
+
* {getSubject()}
|
|
17
|
+
* </Static>
|
|
18
|
+
* is going to school today.
|
|
19
|
+
* </T>
|
|
20
|
+
* ```
|
|
21
|
+
*
|
|
22
|
+
* @param {T extends React.ReactNode} children - Static content to render.
|
|
23
|
+
* @returns {T} The static content.
|
|
24
|
+
*/
|
|
25
|
+
declare function Static<T extends React.ReactNode>({ children }: {
|
|
26
|
+
children: T;
|
|
27
|
+
}): T;
|
|
28
|
+
export default Static;
|
|
29
|
+
//# sourceMappingURL=Static.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Static.d.ts","sourceRoot":"","sources":["../../src/variables/Static.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,MAAM,CAAC,CAAC,SAAS,KAAK,CAAC,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,CAAC,CAAA;CAAE,GAAG,CAAC,CAE3E;AAED,eAAe,MAAM,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@generaltranslation/react-core",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
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,8 +13,8 @@
|
|
|
13
13
|
"react": ">=16.8.0"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@generaltranslation/supported-locales": "2.0.
|
|
17
|
-
"generaltranslation": "
|
|
16
|
+
"@generaltranslation/supported-locales": "2.0.23",
|
|
17
|
+
"generaltranslation": "8.0.0"
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|