gt-next 6.13.9 → 6.13.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 +13 -0
- package/dist/gt_swc_plugin.wasm +0 -0
- package/dist/index.client.d.ts +2 -2
- package/dist/index.client.d.ts.map +1 -1
- package/dist/index.client.js +3 -1
- package/dist/index.client.js.map +1 -1
- package/dist/index.server.d.ts +2 -2
- package/dist/index.server.d.ts.map +1 -1
- package/dist/index.server.js +3 -1
- package/dist/index.server.js.map +1 -1
- package/dist/index.types.d.ts +30 -3
- package/dist/index.types.d.ts.map +1 -1
- package/dist/index.types.js +31 -2
- package/dist/index.types.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +2 -1
- package/dist/server.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# gt-next
|
|
2
2
|
|
|
3
|
+
## 6.13.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#1062](https://github.com/generaltranslation/gt/pull/1062) [`2274e23`](https://github.com/generaltranslation/gt/commit/2274e23d448c8a96d661d30e5c7fc737814c1fb0) Thanks [@ErnestM1234](https://github.com/ErnestM1234)! - refactor: rename static to derive, and deprecate static
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`2274e23`](https://github.com/generaltranslation/gt/commit/2274e23d448c8a96d661d30e5c7fc737814c1fb0)]:
|
|
10
|
+
- @generaltranslation/compiler@1.1.28
|
|
11
|
+
- gt-react@10.12.1
|
|
12
|
+
- generaltranslation@8.1.17
|
|
13
|
+
- gt-i18n@0.6.1
|
|
14
|
+
- @generaltranslation/supported-locales@2.0.50
|
|
15
|
+
|
|
3
16
|
## 6.13.9
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
package/dist/gt_swc_plugin.wasm
CHANGED
|
Binary file
|
package/dist/index.client.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Var, Num, Currency, DateTime, Static, T, Branch, Plural, LocaleSelector, RegionSelector, useGT, useTranslations, useLocale, useLocales, useDefaultLocale, useGTClass, useLocaleProperties, useLocaleDirection, useMessages, msg, decodeMsg, decodeOptions, declareStatic, declareVar, decodeVars, mFallback, gtFallback } from 'gt-react/client';
|
|
1
|
+
import { Var, Num, Currency, DateTime, Static, Derive, T, Branch, Plural, LocaleSelector, RegionSelector, useGT, useTranslations, useLocale, useLocales, useDefaultLocale, useGTClass, useLocaleProperties, useLocaleDirection, useMessages, msg, decodeMsg, decodeOptions, declareStatic, derive, declareVar, decodeVars, mFallback, gtFallback } from 'gt-react/client';
|
|
2
2
|
import { DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions } from 'gt-react';
|
|
3
3
|
export declare function GTProvider(): void;
|
|
4
4
|
export declare function Tx(): void;
|
|
5
|
-
export { T, Var, Num, Currency, DateTime, Static, Branch, Plural, LocaleSelector, RegionSelector, useGT, useTranslations, useLocale, useLocales, useDefaultLocale, useGTClass, useLocaleProperties, useLocaleDirection, useMessages, DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions, msg, decodeMsg, decodeOptions, declareStatic, declareVar, decodeVars, mFallback, gtFallback, };
|
|
5
|
+
export { T, Var, Num, Currency, DateTime, Static, Derive, Branch, Plural, LocaleSelector, RegionSelector, useGT, useTranslations, useLocale, useLocales, useDefaultLocale, useGTClass, useLocaleProperties, useLocaleDirection, useMessages, DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions, msg, decodeMsg, decodeOptions, declareStatic, derive, declareVar, decodeVars, mFallback, gtFallback, };
|
|
6
6
|
//# sourceMappingURL=index.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../src/index.client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,CAAC,EACD,MAAM,EACN,MAAM,EACN,cAAc,EACd,cAAc,EACd,KAAK,EACL,eAAe,EACf,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,GAAG,EACH,SAAS,EACT,aAAa,EACb,aAAa,EACb,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACX,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAGlB,wBAAgB,UAAU,SAEzB;AAGD,wBAAgB,EAAE,SAEjB;AAED,OAAO,EACL,CAAC,EACD,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,cAAc,EACd,cAAc,EACd,KAAK,EACL,eAAe,EACf,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EACzB,GAAG,EACH,SAAS,EACT,aAAa,EACb,aAAa,EACb,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,GACX,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.client.d.ts","sourceRoot":"","sources":["../src/index.client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,CAAC,EACD,MAAM,EACN,MAAM,EACN,cAAc,EACd,cAAc,EACd,KAAK,EACL,eAAe,EACf,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,GAAG,EACH,SAAS,EACT,aAAa,EACb,aAAa,EACb,MAAM,EACN,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,EACX,MAAM,iBAAiB,CAAC;AAKzB,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,UAAU,CAAC;AAGlB,wBAAgB,UAAU,SAEzB;AAGD,wBAAgB,EAAE,SAEjB;AAED,OAAO,EACL,CAAC,EACD,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,cAAc,EACd,cAAc,EACd,KAAK,EACL,eAAe,EACf,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACX,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EACzB,GAAG,EACH,SAAS,EACT,aAAa,EACb,aAAa,EACb,MAAM,EACN,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,GACX,CAAC"}
|
package/dist/index.client.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
'use client';
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.gtFallback = exports.mFallback = exports.decodeVars = exports.declareVar = exports.declareStatic = exports.decodeOptions = exports.decodeMsg = exports.msg = exports.useMessages = exports.useLocaleDirection = exports.useLocaleProperties = exports.useGTClass = exports.useDefaultLocale = exports.useLocales = exports.useLocale = exports.useTranslations = exports.useGT = exports.RegionSelector = exports.LocaleSelector = exports.Plural = exports.Branch = exports.Static = exports.DateTime = exports.Currency = exports.Num = exports.Var = exports.T = void 0;
|
|
4
|
+
exports.gtFallback = exports.mFallback = exports.decodeVars = exports.declareVar = exports.derive = exports.declareStatic = exports.decodeOptions = exports.decodeMsg = exports.msg = exports.useMessages = exports.useLocaleDirection = exports.useLocaleProperties = exports.useGTClass = exports.useDefaultLocale = exports.useLocales = exports.useLocale = exports.useTranslations = exports.useGT = exports.RegionSelector = exports.LocaleSelector = exports.Plural = exports.Branch = exports.Derive = exports.Static = exports.DateTime = exports.Currency = exports.Num = exports.Var = exports.T = void 0;
|
|
5
5
|
exports.GTProvider = GTProvider;
|
|
6
6
|
exports.Tx = Tx;
|
|
7
7
|
var client_1 = require("gt-react/client");
|
|
@@ -10,6 +10,7 @@ Object.defineProperty(exports, "Num", { enumerable: true, get: function () { ret
|
|
|
10
10
|
Object.defineProperty(exports, "Currency", { enumerable: true, get: function () { return client_1.Currency; } });
|
|
11
11
|
Object.defineProperty(exports, "DateTime", { enumerable: true, get: function () { return client_1.DateTime; } });
|
|
12
12
|
Object.defineProperty(exports, "Static", { enumerable: true, get: function () { return client_1.Static; } });
|
|
13
|
+
Object.defineProperty(exports, "Derive", { enumerable: true, get: function () { return client_1.Derive; } });
|
|
13
14
|
Object.defineProperty(exports, "T", { enumerable: true, get: function () { return client_1.T; } });
|
|
14
15
|
Object.defineProperty(exports, "Branch", { enumerable: true, get: function () { return client_1.Branch; } });
|
|
15
16
|
Object.defineProperty(exports, "Plural", { enumerable: true, get: function () { return client_1.Plural; } });
|
|
@@ -28,6 +29,7 @@ Object.defineProperty(exports, "msg", { enumerable: true, get: function () { ret
|
|
|
28
29
|
Object.defineProperty(exports, "decodeMsg", { enumerable: true, get: function () { return client_1.decodeMsg; } });
|
|
29
30
|
Object.defineProperty(exports, "decodeOptions", { enumerable: true, get: function () { return client_1.decodeOptions; } });
|
|
30
31
|
Object.defineProperty(exports, "declareStatic", { enumerable: true, get: function () { return client_1.declareStatic; } });
|
|
32
|
+
Object.defineProperty(exports, "derive", { enumerable: true, get: function () { return client_1.derive; } });
|
|
31
33
|
Object.defineProperty(exports, "declareVar", { enumerable: true, get: function () { return client_1.declareVar; } });
|
|
32
34
|
Object.defineProperty(exports, "decodeVars", { enumerable: true, get: function () { return client_1.decodeVars; } });
|
|
33
35
|
Object.defineProperty(exports, "mFallback", { enumerable: true, get: function () { return client_1.mFallback; } });
|
package/dist/index.client.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.js","sourceRoot":"","sources":["../src/index.client.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;
|
|
1
|
+
{"version":3,"file":"index.client.js","sourceRoot":"","sources":["../src/index.client.ts"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;AA4Cb,gCAEC;AAGD,gBAEC;AAjDD,0CA8ByB;AAuBvB,oFApDA,YAAG,OAoDA;AACH,oFApDA,YAAG,OAoDA;AACH,yFApDA,iBAAQ,OAoDA;AACR,yFApDA,iBAAQ,OAoDA;AACR,uFApDA,eAAM,OAoDA;AACN,uFApDA,eAAM,OAoDA;AANN,kFA7CA,UAAC,OA6CA;AAOD,uFAnDA,eAAM,OAmDA;AACN,uFAnDA,eAAM,OAmDA;AACN,+FAnDA,uBAAc,OAmDA;AACd,+FAnDA,uBAAc,OAmDA;AACd,sFAnDA,cAAK,OAmDA;AACL,gGAnDA,wBAAe,OAmDA;AACf,0FAnDA,kBAAS,OAmDA;AACT,2FAnDA,mBAAU,OAmDA;AACV,iGAnDA,yBAAgB,OAmDA;AAChB,2FAnDA,mBAAU,OAmDA;AACV,oGAnDA,4BAAmB,OAmDA;AACnB,mGAnDA,2BAAkB,OAmDA;AAClB,4FAnDA,oBAAW,OAmDA;AAIX,oFAtDA,YAAG,OAsDA;AACH,0FAtDA,kBAAS,OAsDA;AACT,8FAtDA,sBAAa,OAsDA;AACb,8FAtDA,sBAAa,OAsDA;AACb,uFAtDA,eAAM,OAsDA;AACN,2FAtDA,mBAAU,OAsDA;AACV,2FAtDA,mBAAU,OAsDA;AACV,0FAtDA,kBAAS,OAsDA;AACT,2FAtDA,mBAAU,OAsDA;AApDZ,sDAG+B;AAO/B,0CAA0C;AAC1C,SAAgB,UAAU;IACxB,MAAM,IAAI,KAAK,CAAC,uCAAwB,CAAC,CAAC;AAC5C,CAAC;AAED,kCAAkC;AAClC,SAAgB,EAAE;IAChB,MAAM,IAAI,KAAK,CAAC,+BAAgB,CAAC,CAAC;AACpC,CAAC"}
|
package/dist/index.server.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ import { Tx } from './server';
|
|
|
11
11
|
import { useTranslations } from './server-dir/buildtime/getTranslations';
|
|
12
12
|
import { useLocale } from './request/getLocale';
|
|
13
13
|
import { useLocaleDirection } from './request/getLocaleDirection';
|
|
14
|
-
import { msg, decodeMsg, decodeOptions, declareVar, decodeVars, declareStatic, Static, mFallback, gtFallback } from 'gt-react/internal';
|
|
14
|
+
import { msg, decodeMsg, decodeOptions, declareVar, decodeVars, declareStatic, derive, Static, Derive, mFallback, gtFallback } from 'gt-react/internal';
|
|
15
15
|
import { DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions } from 'gt-react';
|
|
16
16
|
import { GT } from 'generaltranslation';
|
|
17
17
|
import { useMessages, useGT } from './server-dir/buildtime/getTranslationFunction';
|
|
@@ -25,5 +25,5 @@ export { GTProvider, T,
|
|
|
25
25
|
/**
|
|
26
26
|
* @deprecated import from 'gt-next/server' instead
|
|
27
27
|
*/
|
|
28
|
-
Tx, Var, Num, Currency, DateTime, Static, Branch, Plural, useGT, useTranslations, useMessages, useLocale, useLocaleDirection, DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions, msg, decodeMsg, decodeOptions, declareStatic, declareVar, decodeVars, mFallback, gtFallback, };
|
|
28
|
+
Tx, Var, Num, Currency, DateTime, Static, Derive, Branch, Plural, useGT, useTranslations, useMessages, useLocale, useLocaleDirection, DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions, msg, decodeMsg, decodeOptions, declareStatic, derive, declareVar, decodeVars, mFallback, gtFallback, };
|
|
29
29
|
//# sourceMappingURL=index.server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.d.ts","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,GAAG,MAAM,iBAAiB,CAAC;AAClC,OAAO,GAAG,MAAM,iBAAi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EhE,wBAAgB,UAAU,OAEzB;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAEpE;AAED,wBAAgB,UAAU,aAEzB;AAED,wBAAgB,gBAAgB,WAE/B;AAED,OAAO,EACL,UAAU,EACV,CAAC;AACD;;GAEG;AACH,EAAE,EACF,GAAG,EACH,GAAG,EACH,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,MAAM,EACN,KAAK,EACL,eAAe,EACf,WAAW,EACX,SAAS,EACT,kBAAkB,EAClB,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EACzB,GAAG,EACH,SAAS,EACT,aAAa,EACb,aAAa,EACb,MAAM,EACN,UAAU,EACV,UAAU,EACV,SAAS,EACT,UAAU,GACX,CAAC"}
|
package/dist/index.server.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.gtFallback = exports.mFallback = exports.decodeVars = exports.declareVar = exports.declareStatic = exports.decodeOptions = exports.decodeMsg = exports.msg = exports.useLocaleDirection = exports.useLocale = exports.useMessages = exports.useTranslations = exports.useGT = exports.Plural = exports.Branch = exports.Static = exports.DateTime = exports.Currency = exports.Num = exports.Var = exports.Tx = exports.T = exports.GTProvider = exports.RegionSelector = exports.LocaleSelector = void 0;
|
|
6
|
+
exports.gtFallback = exports.mFallback = exports.decodeVars = exports.declareVar = exports.derive = exports.declareStatic = exports.decodeOptions = exports.decodeMsg = exports.msg = exports.useLocaleDirection = exports.useLocale = exports.useMessages = exports.useTranslations = exports.useGT = exports.Plural = exports.Branch = exports.Derive = exports.Static = exports.DateTime = exports.Currency = exports.Num = exports.Var = exports.Tx = exports.T = exports.GTProvider = exports.RegionSelector = exports.LocaleSelector = void 0;
|
|
7
7
|
exports.useGTClass = useGTClass;
|
|
8
8
|
exports.useLocaleProperties = useLocaleProperties;
|
|
9
9
|
exports.useLocales = useLocales;
|
|
@@ -41,7 +41,9 @@ Object.defineProperty(exports, "decodeOptions", { enumerable: true, get: functio
|
|
|
41
41
|
Object.defineProperty(exports, "declareVar", { enumerable: true, get: function () { return internal_1.declareVar; } });
|
|
42
42
|
Object.defineProperty(exports, "decodeVars", { enumerable: true, get: function () { return internal_1.decodeVars; } });
|
|
43
43
|
Object.defineProperty(exports, "declareStatic", { enumerable: true, get: function () { return internal_1.declareStatic; } });
|
|
44
|
+
Object.defineProperty(exports, "derive", { enumerable: true, get: function () { return internal_1.derive; } });
|
|
44
45
|
Object.defineProperty(exports, "Static", { enumerable: true, get: function () { return internal_1.Static; } });
|
|
46
|
+
Object.defineProperty(exports, "Derive", { enumerable: true, get: function () { return internal_1.Derive; } });
|
|
45
47
|
Object.defineProperty(exports, "mFallback", { enumerable: true, get: function () { return internal_1.mFallback; } });
|
|
46
48
|
Object.defineProperty(exports, "gtFallback", { enumerable: true, get: function () { return internal_1.gtFallback; } });
|
|
47
49
|
var getTranslationFunction_1 = require("./server-dir/buildtime/getTranslationFunction");
|
package/dist/index.server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.server.js","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":";;;;;;
|
|
1
|
+
{"version":3,"file":"index.server.js","sourceRoot":"","sources":["../src/index.server.ts"],"names":[],"mappings":";;;;;;AAyCA,gCAEC;AAED,kDAEC;AAED,gCAEC;AAED,4CAEC;AAvDD,uBAAqB;AAErB,wDAAkC;AA8DhC,cA9DK,aAAG,CA8DL;AA7DL,wDAAkC;AA8DhC,cA9DK,aAAG,CA8DL;AA7DL,kEAA4C;AA8D1C,mBA9DK,kBAAQ,CA8DL;AA7DV,kEAA4C;AA8D1C,mBA9DK,kBAAQ,CA8DL;AA7DV,+DAAyC;AAqDvC,YArDK,WAAC,CAqDL;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 +2,7 @@ import _GTProvider from './provider/GTProvider';
|
|
|
2
2
|
import _T from './server-dir/buildtime/T';
|
|
3
3
|
import { useTranslations as _useTranslations, useLocale as _useLocale, useLocales as _useLocales, useDefaultLocale as _useDefaultLocale, useGTClass as _useGTClass, useLocaleProperties as _useLocaleProperties, Currency as _Currency, DateTime as _DateTime, Num as _Num, Var as _Var, Branch as _Branch, Plural as _Plural, LocaleSelector as _LocaleSelector, RegionSelector as _RegionSelector, useLocaleDirection as _useLocaleDirection } from 'gt-react/client';
|
|
4
4
|
import { DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions } from 'gt-react';
|
|
5
|
-
import { msg, decodeMsg, decodeOptions, declareStatic, declareVar, decodeVars, _Messages, Static as _Static, mFallback, gtFallback } from 'gt-react/internal';
|
|
5
|
+
import { msg, decodeMsg, decodeOptions, declareStatic, derive, declareVar, decodeVars, _Messages, Static as _Static, Derive as _Derive, mFallback, gtFallback } from 'gt-react/internal';
|
|
6
6
|
/**
|
|
7
7
|
* Provides General Translation context to its children, which can then access `useGT`, `useLocale`, and `useDefaultLocale`.
|
|
8
8
|
*
|
|
@@ -111,6 +111,31 @@ export declare const Num: typeof _Num;
|
|
|
111
111
|
*/
|
|
112
112
|
export declare const Var: typeof _Var;
|
|
113
113
|
/**
|
|
114
|
+
* `<Derive>` is a powerful but dangerous component which marks its children as statically analyzable for the compiler and CLI tool.
|
|
115
|
+
*
|
|
116
|
+
* This component is dangerous because it can cause the compiler and CLI tool to throw an error if children are not statically analyzable.
|
|
117
|
+
*
|
|
118
|
+
* @example
|
|
119
|
+
* ```jsx
|
|
120
|
+
* function getSubject() {
|
|
121
|
+
* return (Math.random() > 0.5) ? "Alice" : "Brian";
|
|
122
|
+
* }
|
|
123
|
+
* ...
|
|
124
|
+
* <T>
|
|
125
|
+
* <Derive>
|
|
126
|
+
* {getSubject()}
|
|
127
|
+
* </Derive>
|
|
128
|
+
* is going to school today.
|
|
129
|
+
* </T>
|
|
130
|
+
* ```
|
|
131
|
+
*
|
|
132
|
+
* @param {T extends React.ReactNode} children - Derived content to render.
|
|
133
|
+
* @returns {T} The result of the function invocation.
|
|
134
|
+
*/
|
|
135
|
+
export declare const Derive: typeof _Derive;
|
|
136
|
+
/**
|
|
137
|
+
* @deprecated Use `<Derive>` instead.
|
|
138
|
+
*
|
|
114
139
|
* `<Static>` is a powerful but dangerous component which marks its children as statically analyzable for the compiler and CLI tool.
|
|
115
140
|
*
|
|
116
141
|
* This component is dangerous because it can cause the compiler and CLI tool to throw an error if children are not statically analyzable.
|
|
@@ -129,7 +154,7 @@ export declare const Var: typeof _Var;
|
|
|
129
154
|
* </T>
|
|
130
155
|
* ```
|
|
131
156
|
*
|
|
132
|
-
* @param {T extends React.ReactNode} children -
|
|
157
|
+
* @param {T extends React.ReactNode} children - Derived content to render.
|
|
133
158
|
* @returns {T} The result of the function invocation.
|
|
134
159
|
*/
|
|
135
160
|
export declare const Static: typeof _Static;
|
|
@@ -345,5 +370,7 @@ export declare const RegionSelector: typeof _RegionSelector;
|
|
|
345
370
|
*/
|
|
346
371
|
export declare const useMessages: (_messages?: _Messages) => <T extends string | null | undefined>(encodedMsg: T, options?: Record<string, any>) => T extends string ? string : T;
|
|
347
372
|
export { DictionaryTranslationOptions, InlineTranslationOptions, RuntimeTranslationOptions, };
|
|
348
|
-
export { msg, decodeMsg, decodeOptions, mFallback, gtFallback,
|
|
373
|
+
export { msg, decodeMsg, decodeOptions, mFallback, gtFallback, derive, declareVar, decodeVars, };
|
|
374
|
+
/** @deprecated Use derive() instead. */
|
|
375
|
+
export { declareStatic };
|
|
349
376
|
//# sourceMappingURL=index.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.types.d.ts","sourceRoot":"","sources":["../src/index.types.ts"],"names":[],"mappings":"AACA,OAAO,WAAW,MAAM,uBAAuB,CAAC;AAChD,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAC1C,OAAO,EACL,eAAe,IAAI,gBA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,EAAE,OAAO,oBAExC,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,EAAE,OAAO,mBAEvC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,cAAc,EAAE,OAAO,eAEnC,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,eAAO,MAAM,WAAW,EAAE,CACxB,SAAS,CAAC,EAAE,SAAS,KAClB,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI,GAAG,SAAS,EACvC,UAAU,EAAE,CAAC,EACb,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAC1B,CAAC,SAAS,MAAM,GAAG,MAAM,GAAG,CAEhC,CAAC;AAEF,OAAO,EACL,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,GAC1B,CAAC;AAEF,OAAO,EACL,GAAG,EACH,SAAS,EACT,aAAa,EACb,SAAS,EACT,UAAU,EACV,MAAM,EACN,UAAU,EACV,UAAU,GACX,CAAC;AAEF,wCAAwC;AACxC,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/index.types.js
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeVars = exports.declareVar = exports.
|
|
3
|
+
exports.declareStatic = exports.decodeVars = exports.declareVar = exports.derive = exports.gtFallback = exports.mFallback = exports.decodeOptions = exports.decodeMsg = exports.msg = exports.useMessages = exports.RegionSelector = exports.useLocaleDirection = exports.useLocaleProperties = exports.useGTClass = exports.useDefaultLocale = exports.useLocales = exports.useLocale = exports.useTranslations = exports.useGT = exports.LocaleSelector = exports.Plural = exports.Branch = exports.Static = exports.Derive = exports.Var = exports.Num = exports.DateTime = exports.Currency = exports.T = exports.GTProvider = void 0;
|
|
4
4
|
var createErrors_1 = require("./errors/createErrors");
|
|
5
5
|
var internal_1 = require("gt-react/internal");
|
|
6
6
|
Object.defineProperty(exports, "msg", { enumerable: true, get: function () { return internal_1.msg; } });
|
|
7
7
|
Object.defineProperty(exports, "decodeMsg", { enumerable: true, get: function () { return internal_1.decodeMsg; } });
|
|
8
8
|
Object.defineProperty(exports, "decodeOptions", { enumerable: true, get: function () { return internal_1.decodeOptions; } });
|
|
9
9
|
Object.defineProperty(exports, "declareStatic", { enumerable: true, get: function () { return internal_1.declareStatic; } });
|
|
10
|
+
Object.defineProperty(exports, "derive", { enumerable: true, get: function () { return internal_1.derive; } });
|
|
10
11
|
Object.defineProperty(exports, "declareVar", { enumerable: true, get: function () { return internal_1.declareVar; } });
|
|
11
12
|
Object.defineProperty(exports, "decodeVars", { enumerable: true, get: function () { return internal_1.decodeVars; } });
|
|
12
13
|
Object.defineProperty(exports, "mFallback", { enumerable: true, get: function () { return internal_1.mFallback; } });
|
|
@@ -147,6 +148,34 @@ exports.Var = Var;
|
|
|
147
148
|
/** @internal _gtt - The GT transformation for the component. */
|
|
148
149
|
exports.Var._gtt = 'variable-variable';
|
|
149
150
|
/**
|
|
151
|
+
* `<Derive>` is a powerful but dangerous component which marks its children as statically analyzable for the compiler and CLI tool.
|
|
152
|
+
*
|
|
153
|
+
* This component is dangerous because it can cause the compiler and CLI tool to throw an error if children are not statically analyzable.
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```jsx
|
|
157
|
+
* function getSubject() {
|
|
158
|
+
* return (Math.random() > 0.5) ? "Alice" : "Brian";
|
|
159
|
+
* }
|
|
160
|
+
* ...
|
|
161
|
+
* <T>
|
|
162
|
+
* <Derive>
|
|
163
|
+
* {getSubject()}
|
|
164
|
+
* </Derive>
|
|
165
|
+
* is going to school today.
|
|
166
|
+
* </T>
|
|
167
|
+
* ```
|
|
168
|
+
*
|
|
169
|
+
* @param {T extends React.ReactNode} children - Derived content to render.
|
|
170
|
+
* @returns {T} The result of the function invocation.
|
|
171
|
+
*/
|
|
172
|
+
var Derive = function () {
|
|
173
|
+
throw new Error(createErrors_1.typesFileError);
|
|
174
|
+
};
|
|
175
|
+
exports.Derive = Derive;
|
|
176
|
+
/**
|
|
177
|
+
* @deprecated Use `<Derive>` instead.
|
|
178
|
+
*
|
|
150
179
|
* `<Static>` is a powerful but dangerous component which marks its children as statically analyzable for the compiler and CLI tool.
|
|
151
180
|
*
|
|
152
181
|
* This component is dangerous because it can cause the compiler and CLI tool to throw an error if children are not statically analyzable.
|
|
@@ -165,7 +194,7 @@ exports.Var._gtt = 'variable-variable';
|
|
|
165
194
|
* </T>
|
|
166
195
|
* ```
|
|
167
196
|
*
|
|
168
|
-
* @param {T extends React.ReactNode} children -
|
|
197
|
+
* @param {T extends React.ReactNode} children - Derived content to render.
|
|
169
198
|
* @returns {T} The result of the function invocation.
|
|
170
199
|
*/
|
|
171
200
|
var Static = function () {
|
package/dist/index.types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../src/index.types.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AAyBvD,
|
|
1
|
+
{"version":3,"file":"index.types.js","sourceRoot":"","sources":["../src/index.types.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AAyBvD,8CAa2B;AA2czB,oFAvdA,cAAG,OAudA;AACH,0FAvdA,oBAAS,OAudA;AACT,8FAvdA,wBAAa,OAudA;AASN,8FA/dP,wBAAa,OA+dO;AANpB,uFAxdA,iBAAM,OAwdA;AACN,2FAxdA,qBAAU,OAwdA;AACV,2FAxdA,qBAAU,OAwdA;AAJV,0FAhdA,oBAAS,OAgdA;AACT,2FAhdA,qBAAU,OAgdA;AA7cZ;;;;;;;;GAQG;AACI,IAAM,UAAU,GAAuB;IAC5C,MAAM,IAAI,KAAK,CAAC,6BAAc,CAAC,CAAC;AAClC,CAAC,CAAC;AAFW,QAAA,UAAU,cAErB;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACI,IAAM,CA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BAAgB,GAA6B;IACxD,MAAM,IAAI,KAAK,CAAC,6BAAc,CAAC,CAAC;AAClC,CAAC,CAAC;AAFW,QAAA,gBAAgB,oBAE3B;AAEF;;;;;;;;GAQG;AACI,IAAM,UAAU,GAAuB;IAC5C,MAAM,IAAI,KAAK,CAAC,6BAAc,CAAC,CAAC;AAClC,CAAC,CAAC;AAFW,QAAA,UAAU,cAErB;AAEF;;;;;;;;;GASG;AACI,IAAM,mBAAmB,GAAgC;IAC9D,MAAM,IAAI,KAAK,CAAC,6BAAc,CAAC,CAAC;AAClC,CAAC,CAAC;AAFW,QAAA,mBAAmB,uBAE9B;AAEF;;;;;;;;;;;GAWG;AACI,IAAM,kBAAkB,GAA+B;IAC5D,MAAM,IAAI,KAAK,CAAC,6BAAc,CAAC,CAAC;AAClC,CAAC,CAAC;AAFW,QAAA,kBAAkB,sBAE7B;AAEF;;;;;;;;;;;;;;;;;;;;GAoBG;AACI,IAAM,cAAc,GAA2B;IACpD,MAAM,IAAI,KAAK,CAAC,6BAAc,CAAC,CAAC;AAClC,CAAC,CAAC;AAFW,QAAA,cAAc,kBAEzB;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACI,IAAM,WAAW,GAKa;IACnC,MAAM,IAAI,KAAK,CAAC,6BAAc,CAAC,CAAC;AAClC,CAAC,CAAC;AAPW,QAAA,WAAW,eAOtB"}
|
package/dist/server.d.ts
CHANGED
|
@@ -13,6 +13,6 @@ export declare function getDefaultLocale(): string;
|
|
|
13
13
|
export declare function getGTClass(): import("generaltranslation").GT;
|
|
14
14
|
export declare function getLocaleProperties(locale: string): LocaleProperties;
|
|
15
15
|
export declare function getLocales(): string[];
|
|
16
|
-
export { msg, decodeMsg, decodeOptions, declareStatic, declareVar, decodeVars, } from 'gt-i18n';
|
|
16
|
+
export { msg, decodeMsg, decodeOptions, declareStatic, derive, declareVar, decodeVars, } from 'gt-i18n';
|
|
17
17
|
export { GTProvider, T, getGT, getTranslations, getMessages, tx, Tx, getLocale, getRegion, getLocaleDirection, };
|
|
18
18
|
//# sourceMappingURL=server.d.ts.map
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,CAAC,MAAM,0BAA0B,CAAC;AACzC,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EACL,WAAW,EACX,KAAK,EACN,MAAM,+CAA+C,CAAC;AAEvD,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,UAAU,oCAEzB;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAEpE;AAED,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAErC;AAED,OAAO,EACL,GAAG,EACH,SAAS,EACT,aAAa,EACb,aAAa,EACb,UAAU,EACV,UAAU,GACX,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,UAAU,EACV,CAAC,EACD,KAAK,EACL,eAAe,EACf,WAAW,EACX,EAAE,EACF,EAAE,EACF,SAAS,EACT,SAAS,EACT,kBAAkB,GACnB,CAAC"}
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,CAAC,MAAM,0BAA0B,CAAC;AACzC,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACzC,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAEhD,OAAO,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;AACzE,OAAO,UAAU,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAC1C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,EACL,WAAW,EACX,KAAK,EACN,MAAM,+CAA+C,CAAC;AAEvD,wBAAgB,gBAAgB,IAAI,MAAM,CAEzC;AAED,wBAAgB,UAAU,oCAEzB;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAEpE;AAED,wBAAgB,UAAU,IAAI,MAAM,EAAE,CAErC;AAED,OAAO,EACL,GAAG,EACH,SAAS,EACT,aAAa,EACb,aAAa,EACb,MAAM,EACN,UAAU,EACV,UAAU,GACX,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,UAAU,EACV,CAAC,EACD,KAAK,EACL,eAAe,EACf,WAAW,EACX,EAAE,EACF,EAAE,EACF,SAAS,EACT,SAAS,EACT,kBAAkB,GACnB,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.getLocaleDirection = exports.getRegion = exports.getLocale = exports.Tx = exports.tx = exports.getMessages = exports.getTranslations = exports.getGT = exports.T = exports.GTProvider = exports.decodeVars = exports.declareVar = exports.declareStatic = exports.decodeOptions = exports.decodeMsg = exports.msg = void 0;
|
|
6
|
+
exports.getLocaleDirection = exports.getRegion = exports.getLocale = exports.Tx = exports.tx = exports.getMessages = exports.getTranslations = exports.getGT = exports.T = exports.GTProvider = exports.decodeVars = exports.declareVar = exports.derive = exports.declareStatic = exports.decodeOptions = exports.decodeMsg = exports.msg = void 0;
|
|
7
7
|
exports.getDefaultLocale = getDefaultLocale;
|
|
8
8
|
exports.getGTClass = getGTClass;
|
|
9
9
|
exports.getLocaleProperties = getLocaleProperties;
|
|
@@ -46,6 +46,7 @@ Object.defineProperty(exports, "msg", { enumerable: true, get: function () { ret
|
|
|
46
46
|
Object.defineProperty(exports, "decodeMsg", { enumerable: true, get: function () { return gt_i18n_1.decodeMsg; } });
|
|
47
47
|
Object.defineProperty(exports, "decodeOptions", { enumerable: true, get: function () { return gt_i18n_1.decodeOptions; } });
|
|
48
48
|
Object.defineProperty(exports, "declareStatic", { enumerable: true, get: function () { return gt_i18n_1.declareStatic; } });
|
|
49
|
+
Object.defineProperty(exports, "derive", { enumerable: true, get: function () { return gt_i18n_1.derive; } });
|
|
49
50
|
Object.defineProperty(exports, "declareVar", { enumerable: true, get: function () { return gt_i18n_1.declareVar; } });
|
|
50
51
|
Object.defineProperty(exports, "decodeVars", { enumerable: true, get: function () { return gt_i18n_1.decodeVars; } });
|
|
51
52
|
//# sourceMappingURL=server.js.map
|
package/dist/server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;;;;;AAiBA,4CAEC;AAED,gCAEC;AAED,kDAEC;AAED,gCAEC;AA/BD,uBAAqB;AAErB,+DAAyC;
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";;;;;;AAiBA,4CAEC;AAED,gCAEC;AAED,kDAEC;AAED,gCAEC;AA/BD,uBAAqB;AAErB,+DAAyC;AA2CvC,YA3CK,WAAC,CA2CL;AA1CH,+DAAyC;AA8CvC,aA9CK,YAAE,CA8CL;AA7CJ,iDAAgD;AA+C9C,0FA/CO,qBAAS,OA+CP;AA9CX,iDAAgD;AA+C9C,0FA/CO,qBAAS,OA+CP;AA9CX,6EAAuD;AACvD,0EAAyE;AAwCvE,gGAxCO,iCAAe,OAwCP;AAvCjB,qEAA+C;AAoC7C,qBApCK,oBAAU,CAoCL;AAnCZ,iEAA0C;AAyCxC,aAzCK,aAAE,CAyCL;AAvCJ,mEAAkE;AA0ChE,mGA1CO,uCAAkB,OA0CP;AAzCpB,wFAGuD;AAiCrD,4FAnCA,oCAAW,OAmCA;AAFX,sFAhCA,8BAAK,OAgCA;AA7BP,SAAgB,gBAAgB;IAC9B,OAAO,IAAA,uBAAa,GAAE,CAAC,gBAAgB,EAAE,CAAC;AAC5C,CAAC;AAED,SAAgB,UAAU;IACxB,OAAO,IAAA,uBAAa,GAAE,CAAC,UAAU,EAAE,CAAC;AACtC,CAAC;AAED,SAAgB,mBAAmB,CAAC,MAAc;IAChD,OAAO,UAAU,EAAE,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAClD,CAAC;AAED,SAAgB,UAAU;IACxB,OAAO,IAAA,uBAAa,GAAE,CAAC,UAAU,EAAE,CAAC;AACtC,CAAC;AAED,mCAQiB;AAPf,8FAAA,GAAG,OAAA;AACH,oGAAA,SAAS,OAAA;AACT,wGAAA,aAAa,OAAA;AACb,wGAAA,aAAa,OAAA;AACb,iGAAA,MAAM,OAAA;AACN,qGAAA,UAAU,OAAA;AACV,qGAAA,UAAU,OAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gt-next",
|
|
3
|
-
"version": "6.13.
|
|
3
|
+
"version": "6.13.10",
|
|
4
4
|
"description": "A Next.js library for automatic internationalization.",
|
|
5
5
|
"main": "dist/index.server.js",
|
|
6
6
|
"peerDependencies": {
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"CHANGELOG.md"
|
|
14
14
|
],
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@generaltranslation/supported-locales": "2.0.
|
|
17
|
-
"@generaltranslation/compiler": "1.1.
|
|
16
|
+
"@generaltranslation/supported-locales": "2.0.50",
|
|
17
|
+
"@generaltranslation/compiler": "1.1.28",
|
|
18
18
|
"@generaltranslation/next-internal": "0.1.0",
|
|
19
|
-
"generaltranslation": "8.1.
|
|
20
|
-
"gt-react": "10.12.
|
|
21
|
-
"gt-i18n": "0.6.
|
|
19
|
+
"generaltranslation": "8.1.17",
|
|
20
|
+
"gt-react": "10.12.1",
|
|
21
|
+
"gt-i18n": "0.6.1"
|
|
22
22
|
},
|
|
23
23
|
"repository": {
|
|
24
24
|
"type": "git",
|