gt-react 10.12.1 → 10.14.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 +26 -0
- package/dist/browser-types.d.ts +5 -62
- package/dist/browser-types.d.ts.map +1 -1
- package/dist/browser.cjs.min.cjs +2 -2
- package/dist/browser.cjs.min.cjs.map +1 -1
- package/dist/browser.d.ts +6 -126
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.esm.min.mjs +5 -5
- package/dist/browser.esm.min.mjs.map +1 -1
- package/dist/client.cjs.min.cjs +1 -1
- package/dist/client.cjs.min.cjs.map +1 -1
- package/dist/client.d.ts +2 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.esm.min.mjs +2 -2
- package/dist/client.esm.min.mjs.map +1 -1
- package/dist/i18n-context/functions/translation/t.d.ts +5 -2
- package/dist/i18n-context/functions/translation/t.d.ts.map +1 -1
- package/dist/i18n-context/functions/translation/types.d.ts +21 -0
- package/dist/i18n-context/functions/translation/types.d.ts.map +1 -0
- package/dist/i18n-context/functions/versionId.d.ts +10 -0
- package/dist/i18n-context/functions/versionId.d.ts.map +1 -0
- package/dist/index.cjs.min.cjs +5 -5
- package/dist/index.cjs.min.cjs.map +1 -1
- package/dist/index.d.ts +2 -2
- 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.esm.min.mjs +1 -1
- package/dist/internal.esm.min.mjs.map +1 -1
- package/dist/macros.cjs.min.cjs +19 -0
- package/dist/macros.cjs.min.cjs.map +1 -0
- package/dist/macros.d.ts +22 -0
- package/dist/macros.d.ts.map +1 -0
- package/dist/macros.esm.min.mjs +19 -0
- package/dist/macros.esm.min.mjs.map +1 -0
- package/dist/react-context/provider/ClientProvider.d.ts.map +1 -1
- package/dist/shared/messages.d.ts +1 -1
- package/dist/shared/messages.d.ts.map +1 -1
- package/package.json +16 -5
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { InlineTranslationOptions } from 'gt-i18n/types';
|
|
2
|
+
/**
|
|
3
|
+
* Overloaded type for the `t` function.
|
|
4
|
+
* - Tagged template: t`Hello, ${name}` (transformed by the compiler plugin at build time)
|
|
5
|
+
* - Function call: t("Hello, {name}", { name: "John" })
|
|
6
|
+
*
|
|
7
|
+
* {@link TemplateSyncResolutionFunction}
|
|
8
|
+
* {@link SyncResolutionFunction}
|
|
9
|
+
*/
|
|
10
|
+
export interface StringOrTemplateSyncResolutionFunction {
|
|
11
|
+
(strings: TemplateStringsArray, ...values: unknown[]): string;
|
|
12
|
+
(message: string, options?: InlineTranslationOptions): string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Type for the `t` function when used as a tagged template literal.
|
|
16
|
+
* @param strings - The template strings.
|
|
17
|
+
* @param values - The values to interpolate.
|
|
18
|
+
* @returns The translated message.
|
|
19
|
+
*/
|
|
20
|
+
export type TemplateSyncResolutionFunction = (strings: TemplateStringsArray, ...values: unknown[]) => string;
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/translation/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AAEzD;;;;;;;GAOG;AACH,MAAM,WAAW,sCAAsC;IACrD,CAAC,OAAO,EAAE,oBAAoB,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,MAAM,CAAC;IAC9D,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,wBAAwB,GAAG,MAAM,CAAC;CAC/D;AAED;;;;;GAKG;AACH,MAAM,MAAM,8BAA8B,GAAG,CAC3C,OAAO,EAAE,oBAAoB,EAC7B,GAAG,MAAM,EAAE,OAAO,EAAE,KACjB,MAAM,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Returns the version ID for the current source.
|
|
3
|
+
* @returns {string | undefined} The version ID, if set.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* const versionId = getVersionId();
|
|
7
|
+
* console.log(versionId); // 'abc123'
|
|
8
|
+
*/
|
|
9
|
+
export declare function getVersionId(): string | undefined;
|
|
10
|
+
//# sourceMappingURL=versionId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"versionId.d.ts","sourceRoot":"","sources":["../../../src/i18n-context/functions/versionId.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,YAAY,uBAG3B"}
|