gt-react 10.19.15 → 10.19.17
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.cjs +10914 -0
- package/dist/browser.cjs.map +1 -0
- package/dist/browser.d.cts +699 -0
- package/dist/browser.d.cts.map +1 -0
- package/dist/browser.d.mts +701 -0
- package/dist/browser.d.mts.map +1 -0
- package/dist/browser.mjs +10877 -0
- package/dist/browser.mjs.map +1 -0
- package/dist/client.cjs +3451 -0
- package/dist/client.cjs.map +1 -0
- package/dist/client.d.cts +248 -0
- package/dist/client.d.cts.map +1 -0
- package/dist/client.d.mts +249 -0
- package/dist/client.d.mts.map +1 -0
- package/dist/client.mjs +3392 -0
- package/dist/client.mjs.map +1 -0
- package/dist/index.cjs +3691 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +377 -0
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +376 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3636 -0
- package/dist/index.mjs.map +1 -0
- package/dist/internal.cjs +4046 -0
- package/dist/internal.cjs.map +1 -0
- package/dist/internal.d.cts +1118 -0
- package/dist/internal.d.cts.map +1 -0
- package/dist/internal.d.mts +1118 -0
- package/dist/internal.d.mts.map +1 -0
- package/dist/internal.mjs +3985 -0
- package/dist/internal.mjs.map +1 -0
- package/dist/macros.cjs +6206 -0
- package/dist/macros.cjs.map +1 -0
- package/dist/macros.d.cts +25 -0
- package/dist/macros.d.cts.map +1 -0
- package/dist/macros.d.mts +25 -0
- package/dist/macros.d.mts.map +1 -0
- package/dist/macros.mjs +6207 -0
- package/dist/macros.mjs.map +1 -0
- package/package.json +61 -41
- package/dist/browser-types.d.ts +0 -5
- package/dist/browser-types.d.ts.map +0 -1
- package/dist/browser.cjs.min.cjs +0 -2
- package/dist/browser.cjs.min.cjs.map +0 -1
- package/dist/browser.d.ts +0 -4
- package/dist/browser.d.ts.map +0 -1
- package/dist/browser.esm.min.mjs +0 -2
- package/dist/browser.esm.min.mjs.map +0 -1
- package/dist/client.cjs.min.cjs +0 -2
- package/dist/client.cjs.min.cjs.map +0 -1
- package/dist/client.d.ts +0 -6
- package/dist/client.d.ts.map +0 -1
- package/dist/client.esm.min.mjs +0 -2
- package/dist/client.esm.min.mjs.map +0 -1
- package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts +0 -32
- package/dist/i18n-context/browser-i18n-manager/BrowserConditionStore.d.ts.map +0 -1
- package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts +0 -42
- package/dist/i18n-context/browser-i18n-manager/BrowserI18nManager.d.ts.map +0 -1
- package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts +0 -90
- package/dist/i18n-context/browser-i18n-manager/LocalStorageTranslationCache.d.ts.map +0 -1
- package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts +0 -9
- package/dist/i18n-context/browser-i18n-manager/singleton-operations.d.ts.map +0 -1
- package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts +0 -3
- package/dist/i18n-context/browser-i18n-manager/utils/constants.d.ts.map +0 -1
- package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts +0 -19
- package/dist/i18n-context/browser-i18n-manager/utils/cookies.d.ts.map +0 -1
- package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts +0 -15
- package/dist/i18n-context/browser-i18n-manager/utils/determineLocale.d.ts.map +0 -1
- package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts +0 -14
- package/dist/i18n-context/browser-i18n-manager/utils/types.d.ts.map +0 -1
- package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts +0 -29
- package/dist/i18n-context/functions/branching/GtInternalBranch.d.ts.map +0 -1
- package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts +0 -30
- package/dist/i18n-context/functions/branching/GtInternalPlural.d.ts.map +0 -1
- package/dist/i18n-context/functions/branching/index.d.ts +0 -3
- package/dist/i18n-context/functions/branching/index.d.ts.map +0 -1
- package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts +0 -31
- package/dist/i18n-context/functions/derivation/GtInternalDerive.d.ts.map +0 -1
- package/dist/i18n-context/functions/derivation/index.d.ts +0 -2
- package/dist/i18n-context/functions/derivation/index.d.ts.map +0 -1
- package/dist/i18n-context/functions/html-tag-operations.d.ts +0 -19
- package/dist/i18n-context/functions/html-tag-operations.d.ts.map +0 -1
- package/dist/i18n-context/functions/index.d.ts +0 -8
- package/dist/i18n-context/functions/index.d.ts.map +0 -1
- package/dist/i18n-context/functions/locale-operations.d.ts +0 -11
- package/dist/i18n-context/functions/locale-operations.d.ts.map +0 -1
- package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts +0 -11
- package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.d.ts.map +0 -1
- package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts +0 -11
- package/dist/i18n-context/functions/translation/GtInternalRuntimeTranslateString.d.ts.map +0 -1
- package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts +0 -33
- package/dist/i18n-context/functions/translation/GtInternalTranslateJsx.d.ts.map +0 -1
- package/dist/i18n-context/functions/translation/index.d.ts +0 -5
- package/dist/i18n-context/functions/translation/index.d.ts.map +0 -1
- package/dist/i18n-context/functions/translation/t.d.ts +0 -25
- package/dist/i18n-context/functions/translation/t.d.ts.map +0 -1
- package/dist/i18n-context/functions/translation/types.d.ts +0 -21
- package/dist/i18n-context/functions/translation/types.d.ts.map +0 -1
- package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts +0 -28
- package/dist/i18n-context/functions/variables/GtInternalCurrency.d.ts.map +0 -1
- package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts +0 -26
- package/dist/i18n-context/functions/variables/GtInternalDateTime.d.ts.map +0 -1
- package/dist/i18n-context/functions/variables/GtInternalNum.d.ts +0 -26
- package/dist/i18n-context/functions/variables/GtInternalNum.d.ts.map +0 -1
- package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts +0 -35
- package/dist/i18n-context/functions/variables/GtInternalRelativeTime.d.ts.map +0 -1
- package/dist/i18n-context/functions/variables/GtInternalVar.d.ts +0 -23
- package/dist/i18n-context/functions/variables/GtInternalVar.d.ts.map +0 -1
- package/dist/i18n-context/functions/variables/index.d.ts +0 -6
- package/dist/i18n-context/functions/variables/index.d.ts.map +0 -1
- package/dist/i18n-context/functions/variables/utils/computeVar.d.ts +0 -9
- package/dist/i18n-context/functions/variables/utils/computeVar.d.ts.map +0 -1
- package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts +0 -15
- package/dist/i18n-context/functions/variables/utils/renderVariable.d.ts.map +0 -1
- package/dist/i18n-context/setup/bootstrap.d.ts +0 -22
- package/dist/i18n-context/setup/bootstrap.d.ts.map +0 -1
- package/dist/i18n-context/setup/index.d.ts +0 -3
- package/dist/i18n-context/setup/index.d.ts.map +0 -1
- package/dist/i18n-context/setup/initializeGT.d.ts +0 -7
- package/dist/i18n-context/setup/initializeGT.d.ts.map +0 -1
- package/dist/i18n-context/setup/types.d.ts +0 -19
- package/dist/i18n-context/setup/types.d.ts.map +0 -1
- package/dist/i18n-context/ui/LocaleSelector.d.ts +0 -18
- package/dist/i18n-context/ui/LocaleSelector.d.ts.map +0 -1
- package/dist/i18n-context/utils/enforceBrowser.d.ts +0 -7
- package/dist/i18n-context/utils/enforceBrowser.d.ts.map +0 -1
- package/dist/index.cjs.min.cjs +0 -2
- package/dist/index.cjs.min.cjs.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.esm.min.mjs +0 -2
- package/dist/index.esm.min.mjs.map +0 -1
- package/dist/internal.cjs.min.cjs +0 -2
- package/dist/internal.cjs.min.cjs.map +0 -1
- package/dist/internal.d.ts +0 -7
- package/dist/internal.d.ts.map +0 -1
- package/dist/internal.esm.min.mjs +0 -2
- package/dist/internal.esm.min.mjs.map +0 -1
- package/dist/macros.cjs.min.cjs +0 -2
- package/dist/macros.cjs.min.cjs.map +0 -1
- package/dist/macros.d.ts +0 -22
- package/dist/macros.d.ts.map +0 -1
- package/dist/macros.esm.min.mjs +0 -2
- package/dist/macros.esm.min.mjs.map +0 -1
- package/dist/react-context/provider/ClientProvider.d.ts +0 -4
- package/dist/react-context/provider/ClientProvider.d.ts.map +0 -1
- package/dist/react-context/provider/GTProvider.d.ts +0 -29
- package/dist/react-context/provider/GTProvider.d.ts.map +0 -1
- package/dist/react-context/provider/helpers/isSSREnabled.d.ts +0 -2
- package/dist/react-context/provider/helpers/isSSREnabled.d.ts.map +0 -1
- package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts +0 -5
- package/dist/react-context/provider/hooks/locales/useDetermineLocale.d.ts.map +0 -1
- package/dist/react-context/provider/hooks/useEnableI18n.d.ts +0 -10
- package/dist/react-context/provider/hooks/useEnableI18n.d.ts.map +0 -1
- package/dist/react-context/provider/hooks/useRegionState.d.ts +0 -9
- package/dist/react-context/provider/hooks/useRegionState.d.ts.map +0 -1
- package/dist/react-context/types/config.d.ts +0 -67
- package/dist/react-context/types/config.d.ts.map +0 -1
- package/dist/react-context/ui/LocaleSelector.d.ts +0 -18
- package/dist/react-context/ui/LocaleSelector.d.ts.map +0 -1
- package/dist/react-context/ui/RegionSelector.d.ts +0 -38
- package/dist/react-context/ui/RegionSelector.d.ts.map +0 -1
- package/dist/react-context/utils/readAuthFromEnv.d.ts +0 -9
- package/dist/react-context/utils/readAuthFromEnv.d.ts.map +0 -1
- package/dist/shared/InternalLocaleSelector.d.ts +0 -26
- package/dist/shared/InternalLocaleSelector.d.ts.map +0 -1
- package/dist/shared/messages.d.ts +0 -11
- package/dist/shared/messages.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GtInternalBranch.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/branching/GtInternalBranch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;GAMG;AACH,iBAAS,MAAM,CAAC,EACd,QAAQ,EACR,MAAM,EACN,GAAG,QAAQ,EACZ,EAAE;IACD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAC9C,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;CAChC,GAAG,KAAK,CAAC,SAAS,CAWlB;kBAnBQ,MAAM;;;AAqBf;;GAEG;AACH,iBAAS,gBAAgB,CAAC,KAAK,EAAE;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;IAC9C,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;CAChC,GAAG,KAAK,CAAC,SAAS,CAElB;kBANQ,gBAAgB;;;AAYzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* The `<Plural>` component dynamically renders content based on the plural
|
|
4
|
-
* form of the given number (`n`).
|
|
5
|
-
*
|
|
6
|
-
* This is the i18n-context version — uses singleton locale instead of React Context.
|
|
7
|
-
*/
|
|
8
|
-
declare function Plural({ children, n, locales: localesProp, ...branches }: {
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
n: number;
|
|
11
|
-
locales?: string;
|
|
12
|
-
[key: string]: React.ReactNode;
|
|
13
|
-
}): React.ReactNode;
|
|
14
|
-
declare namespace Plural {
|
|
15
|
-
var _gtt: string;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* Equivalent to the `<Plural>` component, but used for auto insertion.
|
|
19
|
-
*/
|
|
20
|
-
declare function GtInternalPlural(props: {
|
|
21
|
-
children?: React.ReactNode;
|
|
22
|
-
n: number;
|
|
23
|
-
locales?: string;
|
|
24
|
-
[key: string]: React.ReactNode;
|
|
25
|
-
}): React.ReactNode;
|
|
26
|
-
declare namespace GtInternalPlural {
|
|
27
|
-
var _gtt: string;
|
|
28
|
-
}
|
|
29
|
-
export { GtInternalPlural, Plural };
|
|
30
|
-
//# sourceMappingURL=GtInternalPlural.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GtInternalPlural.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/branching/GtInternalPlural.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B;;;;;GAKG;AACH,iBAAS,MAAM,CAAC,EACd,QAAQ,EACR,CAAC,EACD,OAAO,EAAE,WAAW,EACpB,GAAG,QAAQ,EACZ,EAAE;IACD,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;CAChC,GAAG,KAAK,CAAC,SAAS,CAUlB;kBApBQ,MAAM;;;AAsBf;;GAEG;AACH,iBAAS,gBAAgB,CAAC,KAAK,EAAE;IAC/B,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,CAAC,EAAE,MAAM,CAAC;IACV,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAC;CAChC,GAAG,KAAK,CAAC,SAAS,CAElB;kBAPQ,gBAAgB;;;AAazB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/branching/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Marks JSX children as derivable by the GT compiler and CLI.
|
|
4
|
-
*
|
|
5
|
-
* Use `<Derive>` inside translated JSX when child content is computed from
|
|
6
|
-
* source code, but should still be discovered during extraction instead of
|
|
7
|
-
* treated as a runtime interpolation variable. It renders its children
|
|
8
|
-
* unchanged at runtime.
|
|
9
|
-
*
|
|
10
|
-
* Run `gt validate` after adding or changing `<Derive>` usage to verify that
|
|
11
|
-
* each derivable expression can be resolved by the CLI.
|
|
12
|
-
*
|
|
13
|
-
* This is the i18n-context version and does not use React Context.
|
|
14
|
-
*/
|
|
15
|
-
declare function Derive<T extends ReactNode>({ children }: {
|
|
16
|
-
children: T;
|
|
17
|
-
}): T;
|
|
18
|
-
declare namespace Derive {
|
|
19
|
-
var _gtt: string;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Equivalent to the `<Derive>` component, but used for auto insertion.
|
|
23
|
-
*/
|
|
24
|
-
declare function GtInternalDerive<T extends ReactNode>({ children, }: {
|
|
25
|
-
children: T;
|
|
26
|
-
}): T;
|
|
27
|
-
declare namespace GtInternalDerive {
|
|
28
|
-
var _gtt: string;
|
|
29
|
-
}
|
|
30
|
-
export { GtInternalDerive, Derive };
|
|
31
|
-
//# sourceMappingURL=GtInternalDerive.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GtInternalDerive.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/derivation/GtInternalDerive.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC;;;;;;;;;;;;GAYG;AACH,iBAAS,MAAM,CAAC,CAAC,SAAS,SAAS,EAAE,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,CAAC,CAAA;CAAE,GAAG,CAAC,CAErE;kBAFQ,MAAM;;;AAIf;;GAEG;AACH,iBAAS,gBAAgB,CAAC,CAAC,SAAS,SAAS,EAAE,EAC7C,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,CAAC;CACb,GAAG,CAAC,CAEJ;kBANQ,gBAAgB;;;AAYzB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/derivation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Update the html tag lang property
|
|
3
|
-
* @param {string} locale - The locale to update the html tag lang property to
|
|
4
|
-
* @returns {void}
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* updateHtmlTagLang('en');
|
|
8
|
-
*/
|
|
9
|
-
export declare function updateHtmlTagLang(locale: string): void;
|
|
10
|
-
/**
|
|
11
|
-
* Update the html tag dir property
|
|
12
|
-
* @param {string} dir - The direction to update the html tag dir property to
|
|
13
|
-
* @returns {void}
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* updateHtmlTagDir('ltr');
|
|
17
|
-
*/
|
|
18
|
-
export declare function updateHtmlTagDir(dir: 'ltr' | 'rtl'): void;
|
|
19
|
-
//# sourceMappingURL=html-tag-operations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"html-tag-operations.d.ts","sourceRoot":"","sources":["../../../src/i18n-context/functions/html-tag-operations.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAOtD;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,KAAK,GAAG,KAAK,GAAG,IAAI,CAOzD"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from './branching';
|
|
2
|
-
export * from './derivation';
|
|
3
|
-
export * from './translation';
|
|
4
|
-
export * from './variables';
|
|
5
|
-
export * from './locale-operations';
|
|
6
|
-
export * from './html-tag-operations';
|
|
7
|
-
export { getVersionId } from 'gt-i18n/internal';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n-context/functions/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AACtC,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Sets the user's current locale.
|
|
3
|
-
*
|
|
4
|
-
* @note This function causes a page reload
|
|
5
|
-
*
|
|
6
|
-
* @example
|
|
7
|
-
* setLocale('es-ES');
|
|
8
|
-
*/
|
|
9
|
-
export declare function setLocale(locale: string): void;
|
|
10
|
-
export { getDefaultLocale, getLocale, getLocales } from 'gt-i18n/internal';
|
|
11
|
-
//# sourceMappingURL=locale-operations.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"locale-operations.d.ts","sourceRoot":"","sources":["../../../src/i18n-context/functions/locale-operations.ts"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,MAAM,EAAE,MAAM,QAcvC;AAED,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { JsxTranslationOptions } from 'gt-i18n/types';
|
|
2
|
-
import type { JsxChildren } from 'generaltranslation/types';
|
|
3
|
-
type RuntimeJsxTranslationOptions = JsxTranslationOptions & {
|
|
4
|
-
$locale?: string;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Internal runtime translate JSX function for dev only
|
|
8
|
-
*/
|
|
9
|
-
declare const GtInternalRuntimeTranslateJsx: (content: JsxChildren, options?: RuntimeJsxTranslationOptions) => Promise<JsxChildren>;
|
|
10
|
-
export { GtInternalRuntimeTranslateJsx };
|
|
11
|
-
//# sourceMappingURL=GtInternalRuntimeTranslateJsx.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GtInternalRuntimeTranslateJsx.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/translation/GtInternalRuntimeTranslateJsx.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAE5D,KAAK,4BAA4B,GAAG,qBAAqB,GAAG;IAC1D,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,6BAA6B,GACjC,SAAS,WAAW,EACpB,UAAS,4BAAiC,yBAQ3C,CAAC;AAEF,OAAO,EAAE,6BAA6B,EAAE,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { RuntimeTranslationOptions } from 'gt-i18n/types';
|
|
2
|
-
import type { StringFormat } from 'generaltranslation/types';
|
|
3
|
-
type RuntimeStringTranslationOptions = Omit<RuntimeTranslationOptions, '$format'> & {
|
|
4
|
-
$format?: StringFormat;
|
|
5
|
-
};
|
|
6
|
-
/**
|
|
7
|
-
* Internal runtime translate string function for dev only
|
|
8
|
-
*/
|
|
9
|
-
declare const GtInternalRuntimeTranslateString: (content: string, options?: RuntimeStringTranslationOptions) => Promise<string>;
|
|
10
|
-
export { GtInternalRuntimeTranslateString };
|
|
11
|
-
//# sourceMappingURL=GtInternalRuntimeTranslateString.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GtInternalRuntimeTranslateString.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/translation/GtInternalRuntimeTranslateString.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,KAAK,+BAA+B,GAAG,IAAI,CACzC,yBAAyB,EACzB,SAAS,CACV,GAAG;IACF,OAAO,CAAC,EAAE,YAAY,CAAC;CACxB,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,gCAAgC,GACpC,SAAS,MAAM,EACf,UAAS,+BAAoC,oBAI9C,CAAC;AAEF,OAAO,EAAE,gCAAgC,EAAE,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import type { JsxTranslationOptions as JsxTranslationOptionsWithSugar } from 'gt-i18n/types';
|
|
3
|
-
/**
|
|
4
|
-
* Equivalent to the `<T>` component, but used for auto insertion
|
|
5
|
-
*/
|
|
6
|
-
declare function GtInternalTranslateJsx(props: {
|
|
7
|
-
children: ReactNode;
|
|
8
|
-
} & JsxTranslationOptions): ReactNode;
|
|
9
|
-
declare namespace GtInternalTranslateJsx {
|
|
10
|
-
var _gtt: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* User facing component for translation.
|
|
14
|
-
*/
|
|
15
|
-
declare function T(props: {
|
|
16
|
-
children: ReactNode;
|
|
17
|
-
} & JsxTranslationOptions): ReactNode;
|
|
18
|
-
declare namespace T {
|
|
19
|
-
var _gtt: string;
|
|
20
|
-
}
|
|
21
|
-
export { GtInternalTranslateJsx, T };
|
|
22
|
-
/**
|
|
23
|
-
* Strips the sugar character $ from option keys (e.g. `$context` → `context`).
|
|
24
|
-
*/
|
|
25
|
-
type StripDollarPrefix<T> = {
|
|
26
|
-
[K in keyof T as K extends `$${infer Rest}` ? Rest : K]: T[K];
|
|
27
|
-
};
|
|
28
|
-
/**
|
|
29
|
-
* Internal type for the JsxTranslationOptions.
|
|
30
|
-
* @internal
|
|
31
|
-
*/
|
|
32
|
-
type JsxTranslationOptions = StripDollarPrefix<JsxTranslationOptionsWithSugar> & JsxTranslationOptionsWithSugar;
|
|
33
|
-
//# sourceMappingURL=GtInternalTranslateJsx.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GtInternalTranslateJsx.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/translation/GtInternalTranslateJsx.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAuC,MAAM,OAAO,CAAC;AAOvE,OAAO,KAAK,EAAE,qBAAqB,IAAI,8BAA8B,EAAE,MAAM,eAAe,CAAC;AAY7F;;GAEG;AACH,iBAAS,sBAAsB,CAC7B,KAAK,EAAE;IACL,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,qBAAqB,GACxB,SAAS,CAEX;kBANQ,sBAAsB;;;AAQ/B;;GAEG;AACH,iBAAS,CAAC,CACR,KAAK,EAAE;IACL,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,qBAAqB,GACxB,SAAS,CAEX;kBANQ,CAAC;;;AAYV,OAAO,EAAE,sBAAsB,EAAE,CAAC,EAAE,CAAC;AAsKrC;;GAEG;AACH,KAAK,iBAAiB,CAAC,CAAC,IAAI;KACzB,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,IAAI,MAAM,IAAI,EAAE,GAAG,IAAI,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC9D,CAAC;AAEF;;;GAGG;AACH,KAAK,qBAAqB,GAAG,iBAAiB,CAAC,8BAA8B,CAAC,GAC5E,8BAA8B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/translation/index.ts"],"names":[],"mappings":"AAAA,cAAc,KAAK,CAAC;AACpB,cAAc,oCAAoC,CAAC;AACnD,cAAc,iCAAiC,CAAC;AAChD,cAAc,0BAA0B,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { StringOrTemplateSyncResolutionFunction } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* NOTE: t() is the only function exported from the 'gt-react' entry point.
|
|
4
|
-
* All other functions in i18n-context are exported from the 'gt-react/browser' entry point.
|
|
5
|
-
*/
|
|
6
|
-
/**
|
|
7
|
-
* Translate a message
|
|
8
|
-
* @param {string} message - The message to translate.
|
|
9
|
-
* @param {InlineTranslationOptions} [options] - The options for the translation.
|
|
10
|
-
* @returns {string} The translated message.
|
|
11
|
-
*
|
|
12
|
-
* This is a BROWSER ONLY function.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* t('Hello, world!'); // Translates 'Hello, world!'
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* t('Hello, {name}!', { name: 'John' }); // Translates 'Hello, John!'
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* t`Hello, ${name}` // Translate via tagged template literal
|
|
22
|
-
*
|
|
23
|
-
*/
|
|
24
|
-
export declare const t: StringOrTemplateSyncResolutionFunction;
|
|
25
|
-
//# sourceMappingURL=t.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"t.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/translation/t.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sCAAsC,EAAE,MAAM,SAAS,CAAC;AAEjE;;;GAGG;AAEH;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,CAAC,EAAE,sCAwBf,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Equivalent to the `<Currency>` component, but used for auto insertion
|
|
3
|
-
*/
|
|
4
|
-
declare function GtInternalCurrency({ children, currency, options, locales: localesProp, }: {
|
|
5
|
-
children: number | string | null | undefined;
|
|
6
|
-
currency?: string;
|
|
7
|
-
options?: Intl.NumberFormatOptions;
|
|
8
|
-
locales?: string[];
|
|
9
|
-
name?: string;
|
|
10
|
-
}): string | null;
|
|
11
|
-
declare namespace GtInternalCurrency {
|
|
12
|
-
var _gtt: string;
|
|
13
|
-
}
|
|
14
|
-
/**
|
|
15
|
-
* User facing component for the `<Currency>` variable
|
|
16
|
-
*/
|
|
17
|
-
declare function Currency(props: {
|
|
18
|
-
children: number | string | null | undefined;
|
|
19
|
-
currency?: string;
|
|
20
|
-
options?: Intl.NumberFormatOptions;
|
|
21
|
-
locales?: string[];
|
|
22
|
-
name?: string;
|
|
23
|
-
}): string | null;
|
|
24
|
-
declare namespace Currency {
|
|
25
|
-
var _gtt: string;
|
|
26
|
-
}
|
|
27
|
-
export { GtInternalCurrency, Currency };
|
|
28
|
-
//# sourceMappingURL=GtInternalCurrency.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GtInternalCurrency.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/variables/GtInternalCurrency.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,iBAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,QAAgB,EAChB,OAAY,EACZ,OAAO,EAAE,WAAgB,GAC1B,EAAE;IACD,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,GAAG,IAAI,CAiBhB;kBA5BQ,kBAAkB;;;AA8B3B;;GAEG;AACH,iBAAS,QAAQ,CAAC,KAAK,EAAE;IACvB,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,GAAG,IAAI,CAEhB;kBARQ,QAAQ;;;AAcjB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Equivalent to the `<DateTime>` component, but used for auto insertion
|
|
3
|
-
*/
|
|
4
|
-
declare function GtInternalDateTime({ children, options, locales: localesProp, }: {
|
|
5
|
-
children: Date | null | undefined;
|
|
6
|
-
locales?: string[];
|
|
7
|
-
options?: Intl.DateTimeFormatOptions;
|
|
8
|
-
name?: string;
|
|
9
|
-
}): string | null;
|
|
10
|
-
declare namespace GtInternalDateTime {
|
|
11
|
-
var _gtt: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* User facing component for the `<DateTime>` variable
|
|
15
|
-
*/
|
|
16
|
-
declare function DateTime(props: {
|
|
17
|
-
children: Date | null | undefined;
|
|
18
|
-
locales?: string[];
|
|
19
|
-
options?: Intl.DateTimeFormatOptions;
|
|
20
|
-
name?: string;
|
|
21
|
-
}): string | null;
|
|
22
|
-
declare namespace DateTime {
|
|
23
|
-
var _gtt: string;
|
|
24
|
-
}
|
|
25
|
-
export { GtInternalDateTime, DateTime };
|
|
26
|
-
//# sourceMappingURL=GtInternalDateTime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GtInternalDateTime.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/variables/GtInternalDateTime.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,iBAAS,kBAAkB,CAAC,EAC1B,QAAQ,EACR,OAAY,EACZ,OAAO,EAAE,WAAgB,GAC1B,EAAE;IACD,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,GAAG,IAAI,CAchB;kBAvBQ,kBAAkB;;;AAyB3B;;GAEG;AACH,iBAAS,QAAQ,CAAC,KAAK,EAAE;IACvB,QAAQ,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,IAAI,CAAC,qBAAqB,CAAC;IACrC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,GAAG,IAAI,CAEhB;kBAPQ,QAAQ;;;AAajB,OAAO,EAAE,kBAAkB,EAAE,QAAQ,EAAE,CAAC"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Equivalent to the `<Num>` component, but used for auto insertion
|
|
3
|
-
*/
|
|
4
|
-
declare function GtInternalNum({ children, options, locales: localesProp, }: {
|
|
5
|
-
children: number | string | null | undefined;
|
|
6
|
-
options?: Intl.NumberFormatOptions;
|
|
7
|
-
locales?: string[];
|
|
8
|
-
name?: string;
|
|
9
|
-
}): string | null;
|
|
10
|
-
declare namespace GtInternalNum {
|
|
11
|
-
var _gtt: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* User facing component for the `<Num>` variable
|
|
15
|
-
*/
|
|
16
|
-
declare function Num(props: {
|
|
17
|
-
children: number | string | null | undefined;
|
|
18
|
-
options?: Intl.NumberFormatOptions;
|
|
19
|
-
locales?: string[];
|
|
20
|
-
name?: string;
|
|
21
|
-
}): string | null;
|
|
22
|
-
declare namespace Num {
|
|
23
|
-
var _gtt: string;
|
|
24
|
-
}
|
|
25
|
-
export { GtInternalNum, Num };
|
|
26
|
-
//# sourceMappingURL=GtInternalNum.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GtInternalNum.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/variables/GtInternalNum.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,iBAAS,aAAa,CAAC,EACrB,QAAQ,EACR,OAAY,EACZ,OAAO,EAAE,WAAgB,GAC1B,EAAE;IACD,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,GAAG,IAAI,CAchB;kBAvBQ,aAAa;;;AAyBtB;;GAEG;AACH,iBAAS,GAAG,CAAC,KAAK,EAAE;IAClB,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,OAAO,CAAC,EAAE,IAAI,CAAC,mBAAmB,CAAC;IACnC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,GAAG,IAAI,CAEhB;kBAPQ,GAAG;;;AAaZ,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Equivalent to the `<RelativeTime>` component, but used for auto insertion
|
|
3
|
-
*/
|
|
4
|
-
declare function GtInternalRelativeTime({ date, children, value, unit, baseDate, locales: localesProp, options, }: {
|
|
5
|
-
date?: Date | null | undefined;
|
|
6
|
-
children?: Date | null | undefined;
|
|
7
|
-
/** Used by the GT CLI for additional context during extraction. */
|
|
8
|
-
name?: string;
|
|
9
|
-
value?: number;
|
|
10
|
-
unit?: Intl.RelativeTimeFormatUnit;
|
|
11
|
-
/** Base date for computing relative time. Defaults to `new Date()` at render time. Required for hydration safety. */
|
|
12
|
-
baseDate?: Date;
|
|
13
|
-
locales?: string[];
|
|
14
|
-
options?: Intl.RelativeTimeFormatOptions;
|
|
15
|
-
}): string | null;
|
|
16
|
-
declare namespace GtInternalRelativeTime {
|
|
17
|
-
var _gtt: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* User facing component for the `<RelativeTime>` variable
|
|
21
|
-
*/
|
|
22
|
-
declare function RelativeTime(props: {
|
|
23
|
-
date?: Date | null | undefined;
|
|
24
|
-
children?: Date | null | undefined;
|
|
25
|
-
value?: number;
|
|
26
|
-
unit?: Intl.RelativeTimeFormatUnit;
|
|
27
|
-
baseDate?: Date;
|
|
28
|
-
locales?: string[];
|
|
29
|
-
options?: Intl.RelativeTimeFormatOptions;
|
|
30
|
-
}): string | null;
|
|
31
|
-
declare namespace RelativeTime {
|
|
32
|
-
var _gtt: string;
|
|
33
|
-
}
|
|
34
|
-
export { GtInternalRelativeTime, RelativeTime };
|
|
35
|
-
//# sourceMappingURL=GtInternalRelativeTime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GtInternalRelativeTime.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/variables/GtInternalRelativeTime.tsx"],"names":[],"mappings":"AAGA;;GAEG;AACH,iBAAS,sBAAsB,CAAC,EAC9B,IAAI,EACJ,QAAQ,EACR,KAAK,EACL,IAAI,EACJ,QAAQ,EACR,OAAO,EAAE,WAAgB,EACzB,OAAY,GACb,EAAE;IACD,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,mEAAmE;IACnE,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC,sBAAsB,CAAC;IACnC,qHAAqH;IACrH,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,IAAI,CAAC,yBAAyB,CAAC;CAC1C,GAAG,MAAM,GAAG,IAAI,CA2ChB;kBA9DQ,sBAAsB;;;AAgE/B;;GAEG;AACH,iBAAS,YAAY,CAAC,KAAK,EAAE;IAC3B,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/B,QAAQ,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,IAAI,CAAC,sBAAsB,CAAC;IACnC,QAAQ,CAAC,EAAE,IAAI,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,OAAO,CAAC,EAAE,IAAI,CAAC,yBAAyB,CAAC;CAC1C,GAAG,MAAM,GAAG,IAAI,CAEhB;kBAVQ,YAAY;;;AAgBrB,OAAO,EAAE,sBAAsB,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Equivalent to the `<Var>` component, but used for auto insertion
|
|
4
|
-
*/
|
|
5
|
-
declare function GtInternalVar<T extends ReactNode>({ children, }: {
|
|
6
|
-
children: T;
|
|
7
|
-
name?: string;
|
|
8
|
-
}): T;
|
|
9
|
-
declare namespace GtInternalVar {
|
|
10
|
-
var _gtt: string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* User facing version of the Var component
|
|
14
|
-
*/
|
|
15
|
-
declare function Var<T extends ReactNode>({ children, }: {
|
|
16
|
-
children: T;
|
|
17
|
-
name?: string;
|
|
18
|
-
}): T;
|
|
19
|
-
declare namespace Var {
|
|
20
|
-
var _gtt: string;
|
|
21
|
-
}
|
|
22
|
-
export { GtInternalVar, Var };
|
|
23
|
-
//# sourceMappingURL=GtInternalVar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GtInternalVar.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/variables/GtInternalVar.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlC;;GAEG;AACH,iBAAS,aAAa,CAAC,CAAC,SAAS,SAAS,EAAE,EAC1C,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,CAAC,CAEJ;kBAPQ,aAAa;;;AAStB;;GAEG;AACH,iBAAS,GAAG,CAAC,CAAC,SAAS,SAAS,EAAE,EAChC,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,CAAC,CAEJ;kBAPQ,GAAG;;;AAaZ,OAAO,EAAE,aAAa,EAAE,GAAG,EAAE,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
export { Var, GtInternalVar } from './GtInternalVar';
|
|
2
|
-
export { Num, GtInternalNum } from './GtInternalNum';
|
|
3
|
-
export { DateTime, GtInternalDateTime } from './GtInternalDateTime';
|
|
4
|
-
export { Currency, GtInternalCurrency } from './GtInternalCurrency';
|
|
5
|
-
export { RelativeTime, GtInternalRelativeTime } from './GtInternalRelativeTime';
|
|
6
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/i18n-context/functions/variables/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
/**
|
|
3
|
-
* Internal implementation of Var component for standardization
|
|
4
|
-
* @internal
|
|
5
|
-
*/
|
|
6
|
-
export declare function computeVar<T extends ReactNode>({ children, }: {
|
|
7
|
-
children: T;
|
|
8
|
-
}): T;
|
|
9
|
-
//# sourceMappingURL=computeVar.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"computeVar.d.ts","sourceRoot":"","sources":["../../../../../src/i18n-context/functions/variables/utils/computeVar.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAElC;;;GAGG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,SAAS,EAAE,EAC9C,QAAQ,GACT,EAAE;IACD,QAAQ,EAAE,CAAC,CAAC;CACb,GAAG,CAAC,CAEJ"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { RenderVariable } from '@generaltranslation/react-core/types';
|
|
2
|
-
/**
|
|
3
|
-
* Custom override for the renderVariable function
|
|
4
|
-
* to use the GtInternal components instead of the regular components
|
|
5
|
-
*
|
|
6
|
-
* We have to remove injected Variable components at runtime because the user would not expect them to be there.
|
|
7
|
-
* For example, we could end up with:
|
|
8
|
-
* const name = "John";
|
|
9
|
-
* <StringOnly>{name}</StringOnly> -> <StringOnly><_Var>John</_Var></StringOnly>
|
|
10
|
-
* This could break logic.
|
|
11
|
-
*
|
|
12
|
-
* TODO: There are other params that these components should take in (name, locales, etc.), double check we aren't missing these
|
|
13
|
-
*/
|
|
14
|
-
export declare const renderVariable: RenderVariable;
|
|
15
|
-
//# sourceMappingURL=renderVariable.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"renderVariable.d.ts","sourceRoot":"","sources":["../../../../../src/i18n-context/functions/variables/utils/renderVariable.tsx"],"names":[],"mappings":"AAWA,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AAEtE;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,cAAc,EAAE,cA2C5B,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { InitializeGTParams } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Initialization function for react-core library invoked to enable synchronous resolution
|
|
4
|
-
* @param {InitializeGTParams} params - The parameters for the initialization
|
|
5
|
-
* @returns {Promise<void>} A promise that resolves when the bootstrap is complete
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* import gtConfig from '../gt.config.json';
|
|
9
|
-
*
|
|
10
|
-
* async function loadTranslations(locale: string) {
|
|
11
|
-
* return (await import(`./_gt/${locale}.json`)).default;
|
|
12
|
-
* }
|
|
13
|
-
*
|
|
14
|
-
* await bootstrap({
|
|
15
|
-
* ...gtConfig,
|
|
16
|
-
* loadTranslations,
|
|
17
|
-
* });
|
|
18
|
-
*
|
|
19
|
-
* await import('./main.tsx')
|
|
20
|
-
*/
|
|
21
|
-
export declare function bootstrap(params: InitializeGTParams): Promise<void>;
|
|
22
|
-
//# sourceMappingURL=bootstrap.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bootstrap.d.ts","sourceRoot":"","sources":["../../../src/i18n-context/setup/bootstrap.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG7C;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,SAAS,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC,CAUzE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/i18n-context/setup/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { InitializeGTParams } from './types';
|
|
2
|
-
/**
|
|
3
|
-
* Configure GT for browser runtime. This must be called to setup GT for browser runtime.
|
|
4
|
-
* @param {InitializeGTParams} config - The configuration for the GT instance
|
|
5
|
-
*/
|
|
6
|
-
export declare function initializeGT(params: InitializeGTParams): void;
|
|
7
|
-
//# sourceMappingURL=initializeGT.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"initializeGT.d.ts","sourceRoot":"","sources":["../../../src/i18n-context/setup/initializeGT.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAKlD;;;GAGG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI,CAW7D"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { GTConfig, TranslationsLoader } from 'gt-i18n/internal/types';
|
|
2
|
-
import { GetLocale, HtmlTagOptions } from '../browser-i18n-manager/utils/types';
|
|
3
|
-
/**
|
|
4
|
-
* Parameters for the initializing GT
|
|
5
|
-
* @param {string} params.defaultLocale - The default locale to use
|
|
6
|
-
* @param {string[]} params.locales - The locales to support
|
|
7
|
-
* @param {TranslationsLoader} params.loadTranslations - The custom translation loader to use
|
|
8
|
-
* @param {GetLocale} [params.getLocale] - The function to get the locale
|
|
9
|
-
* @param {HtmlTagOptions} [params.htmlTagOptions.updateHtmlLangTag] - (true) Whether to update the html lang tag on locale change
|
|
10
|
-
* @param {HtmlTagOptions} [params.htmlTagOptions.updateHtmlDirTag] - (true) Whether to update the html dir tag on locale change
|
|
11
|
-
*/
|
|
12
|
-
export type InitializeGTParams = GTConfig & {
|
|
13
|
-
loadTranslations?: TranslationsLoader;
|
|
14
|
-
getLocale?: GetLocale;
|
|
15
|
-
htmlTagOptions?: HtmlTagOptions;
|
|
16
|
-
};
|
|
17
|
-
export type { GTConfig, TranslationsLoader } from 'gt-i18n/internal/types';
|
|
18
|
-
export type { GetLocale } from '../browser-i18n-manager/utils/types';
|
|
19
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/i18n-context/setup/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAEhF;;;;;;;;GAQG;AACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG;IAC1C,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IACtC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC;CACjC,CAAC;AAGF,YAAY,EAAE,QAAQ,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAC3E,YAAY,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { CustomMapping } from 'generaltranslation/types';
|
|
3
|
-
/**
|
|
4
|
-
* A dropdown component that allows users to select a locale.
|
|
5
|
-
* @param {string[]} [locales] - An optional list of locales to use for the dropdown. If not provided, the list of locales from the `<GTProvider>` context is used.
|
|
6
|
-
* @param {object} [customNames] - (deprecated) An optional object to map locales to custom names. Use `customMapping` instead.
|
|
7
|
-
* @param {CustomMapping} [customMapping] - An optional object to map locales to custom display names, emojis, or other properties.
|
|
8
|
-
* @returns {React.ReactElement | null} The rendered locale dropdown component or null to prevent rendering.
|
|
9
|
-
*/
|
|
10
|
-
export declare function LocaleSelector({ locales, ...props }: {
|
|
11
|
-
locales?: string[];
|
|
12
|
-
customNames?: {
|
|
13
|
-
[key: string]: string;
|
|
14
|
-
};
|
|
15
|
-
customMapping?: CustomMapping;
|
|
16
|
-
[key: string]: any;
|
|
17
|
-
}): React.JSX.Element | null;
|
|
18
|
-
//# sourceMappingURL=LocaleSelector.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"LocaleSelector.d.ts","sourceRoot":"","sources":["../../../src/i18n-context/ui/LocaleSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAQ9D;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,EAC7B,OAAO,EACP,GAAG,KAAK,EACT,EAAE;IACD,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;IACxC,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CA0C3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enforceBrowser.d.ts","sourceRoot":"","sources":["../../../src/i18n-context/utils/enforceBrowser.ts"],"names":[],"mappings":"AAEA;;;;GAIG;AACH,wBAAgB,cAAc,CAC5B,YAAY,GAAE,MAA0C,QAKzD"}
|