react-intlayer 7.2.2 → 7.3.0-canary.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/README.md +2 -0
- package/dist/cjs/index.cjs +4 -0
- package/dist/esm/index.mjs +3 -1
- package/dist/types/client/IntlayerProvider.d.ts.map +1 -1
- package/dist/types/client/format/useCompact.d.ts +2 -2
- package/dist/types/client/format/useCompact.d.ts.map +1 -1
- package/dist/types/client/format/useCurrency.d.ts +2 -2
- package/dist/types/client/format/useCurrency.d.ts.map +1 -1
- package/dist/types/client/format/useList.d.ts +2 -2
- package/dist/types/client/format/useList.d.ts.map +1 -1
- package/dist/types/client/format/useNumber.d.ts +2 -2
- package/dist/types/client/format/usePercentage.d.ts +2 -2
- package/dist/types/client/format/useRelativeTime.d.ts +2 -2
- package/dist/types/client/useDictionary.d.ts +2 -2
- package/dist/types/client/useIntlayer.d.ts +2 -2
- package/dist/types/client/useLocaleBase.d.ts +5 -5
- package/dist/types/client/useLocaleStorage.d.ts +5 -5
- package/dist/types/index.d.ts +3 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/plugins.d.ts.map +1 -1
- package/dist/types/server/useDictionary.d.ts +2 -2
- package/dist/types/server/useDictionaryAsync.d.ts +2 -2
- package/dist/types/server/useDictionaryDynamic.d.ts +2 -2
- package/dist/types/server/useIntlayer.d.ts +3 -3
- package/dist/types/server/useIntlayer.d.ts.map +1 -1
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
<a href="https://github.com/aymericzip/intlayer/blob/main/LICENSE" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/license/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="license"/></a>
|
|
25
25
|
<a href="https://github.com/aymericzip/intlayer/commits/main" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/github/last-commit/aymericzip/intlayer?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="last commit"/>
|
|
26
26
|
</a>
|
|
27
|
+
<a href="https://bountyhub.dev/bounties?repo=intlayer" target="_blank" rel="noopener noreferrer nofollow"><img src="https://img.shields.io/badge/Bounties-on%20BountyHub-yellow?style=for-the-badge&labelColor=000000&color=FFFFFF&logoColor=000000&cacheSeconds=86400" alt="Bounties on BountyHub"/>
|
|
28
|
+
</a>
|
|
27
29
|
</p>
|
|
28
30
|
|
|
29
31
|

|
package/dist/cjs/index.cjs
CHANGED
|
@@ -6,15 +6,19 @@ const require_client_useDictionaryAsync = require('./client/useDictionaryAsync.c
|
|
|
6
6
|
const require_client_useLoadDynamic = require('./client/useLoadDynamic.cjs');
|
|
7
7
|
const require_client_useDictionaryDynamic = require('./client/useDictionaryDynamic.cjs');
|
|
8
8
|
const require_client_useI18n = require('./client/useI18n.cjs');
|
|
9
|
+
const require_getIntlayer = require('./getIntlayer.cjs');
|
|
9
10
|
const require_client_useIntlayer = require('./client/useIntlayer.cjs');
|
|
10
11
|
const require_client_useLocale = require('./client/useLocale.cjs');
|
|
11
12
|
const require_client_useLocaleBase = require('./client/useLocaleBase.cjs');
|
|
12
13
|
const require_markdown_MarkdownProvider = require('./markdown/MarkdownProvider.cjs');
|
|
14
|
+
const require_getDictionary = require('./getDictionary.cjs');
|
|
13
15
|
|
|
14
16
|
exports.IntlayerClientContext = require_client_IntlayerProvider.IntlayerClientContext;
|
|
15
17
|
exports.IntlayerProvider = require_client_IntlayerProvider.IntlayerProvider;
|
|
16
18
|
exports.IntlayerProviderContent = require_client_IntlayerProvider.IntlayerProviderContent;
|
|
17
19
|
exports.MarkdownProvider = require_markdown_MarkdownProvider.MarkdownProvider;
|
|
20
|
+
exports.getDictionary = require_getDictionary.getDictionary;
|
|
21
|
+
exports.getIntlayer = require_getIntlayer.getIntlayer;
|
|
18
22
|
exports.localeCookie = require_client_useLocaleStorage.localeCookie;
|
|
19
23
|
exports.localeInStorage = require_client_useLocaleStorage.localeInStorage;
|
|
20
24
|
exports.setLocaleCookie = require_client_useLocaleStorage.setLocaleCookie;
|
package/dist/esm/index.mjs
CHANGED
|
@@ -6,9 +6,11 @@ import { useDictionaryAsync } from "./client/useDictionaryAsync.mjs";
|
|
|
6
6
|
import { useLoadDynamic } from "./client/useLoadDynamic.mjs";
|
|
7
7
|
import { useDictionaryDynamic } from "./client/useDictionaryDynamic.mjs";
|
|
8
8
|
import { useI18n } from "./client/useI18n.mjs";
|
|
9
|
+
import { getIntlayer } from "./getIntlayer.mjs";
|
|
9
10
|
import { useIntlayer } from "./client/useIntlayer.mjs";
|
|
10
11
|
import { useLocale } from "./client/useLocale.mjs";
|
|
11
12
|
import { useLocaleBase } from "./client/useLocaleBase.mjs";
|
|
12
13
|
import { MarkdownProvider } from "./markdown/MarkdownProvider.mjs";
|
|
14
|
+
import { getDictionary } from "./getDictionary.mjs";
|
|
13
15
|
|
|
14
|
-
export { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, MarkdownProvider, localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, t, useDictionary, useDictionaryAsync, useDictionaryDynamic, useI18n, useIntlayer, useIntlayerContext, useLoadDynamic, useLocale, useLocaleBase, useLocaleCookie, useLocaleStorage };
|
|
16
|
+
export { IntlayerClientContext, IntlayerProvider, IntlayerProviderContent, MarkdownProvider, getDictionary, getIntlayer, localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, t, useDictionary, useDictionaryAsync, useDictionaryDynamic, useI18n, useIntlayer, useIntlayerContext, useLoadDynamic, useLocale, useLocaleBase, useLocaleCookie, useLocaleStorage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerProvider.d.ts","names":[],"sources":["../../../src/client/IntlayerProvider.tsx"],"sourcesContent":[],"mappings":";;;;;KAeK,aAAA;UACK;yBACe;EAFpB,aAAA,CAAA,EAAa,OAAA;EAUL,eAAA,CAAA,EAAA,OAKX;AAKF,CAAA;AAEA;;;AAGuB,cAfV,qBAeU,EAfW,MAAA,CAAA,OAeX,CAfW,aAeX,CAAA;;;AAQvB;AAiDa,cA9DA,kBA8DqB,EAAA,GAAA,GA9DH,
|
|
1
|
+
{"version":3,"file":"IntlayerProvider.d.ts","names":[],"sources":["../../../src/client/IntlayerProvider.tsx"],"sourcesContent":[],"mappings":";;;;;KAeK,aAAA;UACK;yBACe;EAFpB,aAAA,CAAA,EAAa,OAAA;EAUL,eAAA,CAAA,EAAA,OAKX;AAKF,CAAA;AAEA;;;AAGuB,cAfV,qBAeU,EAfW,MAAA,CAAA,OAeX,CAfW,aAeX,CAAA;;;AAQvB;AAiDa,cA9DA,kBA8DqB,EAAA,GAAA,GA9DH,aA8DE;KA5DrB,qBAAA,GAAwB;WACzB;kBACO;uBACK;;;;;;;cAQV,yBAAyB,GAAG;cAiD5B,kBAAkB,GAAG"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types12 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useCompact.d.ts
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ import * as _intlayer_types8 from "@intlayer/types";
|
|
|
13
13
|
* ```
|
|
14
14
|
*/
|
|
15
15
|
declare const useCompact: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
16
|
-
locale?:
|
|
16
|
+
locale?: _intlayer_types12.LocalesValues;
|
|
17
17
|
}) => string;
|
|
18
18
|
//#endregion
|
|
19
19
|
export { useCompact };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../../src/client/format/useCompact.ts"],"sourcesContent":[],"mappings":";;;;;;;AAgBA;;;;;;;cAAa,qDAAU,IAAA,CAAA;WAAA,
|
|
1
|
+
{"version":3,"file":"useCompact.d.ts","names":[],"sources":["../../../../src/client/format/useCompact.ts"],"sourcesContent":[],"mappings":";;;;;;;AAgBA;;;;;;;cAAa,qDAAU,IAAA,CAAA;WAAA,iBAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types11 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useCurrency.d.ts
|
|
4
4
|
|
|
@@ -27,7 +27,7 @@ import * as _intlayer_types9 from "@intlayer/types";
|
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
29
|
declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
30
|
-
locale?:
|
|
30
|
+
locale?: _intlayer_types11.LocalesValues;
|
|
31
31
|
}) => string;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { useCurrency };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/client/format/useCurrency.ts"],"sourcesContent":[],"mappings":";;;;;;;AA8BA;;;;;;;;;;;;;;;;;;;;;cAAa,sDAAW,IAAA,CAAA;WAAA,
|
|
1
|
+
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/client/format/useCurrency.ts"],"sourcesContent":[],"mappings":";;;;;;;AA8BA;;;;;;;;;;;;;;;;;;;;;cAAa,sDAAW,IAAA,CAAA;WAAA,iBAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types8 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useList.d.ts
|
|
4
4
|
|
|
@@ -24,7 +24,7 @@ import * as _intlayer_types10 from "@intlayer/types";
|
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
declare const useList: () => (values: (string | number)[], options?: Intl.ListFormatOptions & {
|
|
27
|
-
locale?:
|
|
27
|
+
locale?: _intlayer_types8.LocalesValues;
|
|
28
28
|
}) => string;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { useList };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/client/format/useList.ts"],"sourcesContent":[],"mappings":";;;;;;;AA2BA;;;;;;;;;;;;;;;;;;cAAa,uDAAO,IAAA,CAAA;WAAA,
|
|
1
|
+
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/client/format/useList.ts"],"sourcesContent":[],"mappings":";;;;;;;AA2BA;;;;;;;;;;;;;;;;;;cAAa,uDAAO,IAAA,CAAA;WAAA,gBAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types10 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useNumber.d.ts
|
|
4
4
|
|
|
@@ -25,7 +25,7 @@ import * as _intlayer_types11 from "@intlayer/types";
|
|
|
25
25
|
* A number formatting function bound to the active locale.
|
|
26
26
|
*/
|
|
27
27
|
declare const useNumber: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
28
|
-
locale?:
|
|
28
|
+
locale?: _intlayer_types10.LocalesValues;
|
|
29
29
|
}) => string;
|
|
30
30
|
//#endregion
|
|
31
31
|
export { useNumber };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types13 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/usePercentage.d.ts
|
|
4
4
|
|
|
@@ -21,7 +21,7 @@ import * as _intlayer_types12 from "@intlayer/types";
|
|
|
21
21
|
* A function that formats numbers or numeric strings into localized percentages.
|
|
22
22
|
*/
|
|
23
23
|
declare const usePercentage: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
24
|
-
locale?:
|
|
24
|
+
locale?: _intlayer_types13.LocalesValues;
|
|
25
25
|
}) => string;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { usePercentage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types15 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useRelativeTime.d.ts
|
|
4
4
|
|
|
@@ -21,7 +21,7 @@ import * as _intlayer_types13 from "@intlayer/types";
|
|
|
21
21
|
* bound to the current client locale.
|
|
22
22
|
*/
|
|
23
23
|
declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
24
|
-
locale?:
|
|
24
|
+
locale?: _intlayer_types15.LocalesValues;
|
|
25
25
|
unit?: Intl.RelativeTimeFormatUnit;
|
|
26
26
|
}) => string;
|
|
27
27
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _intlayer_core1 from "@intlayer/core";
|
|
3
3
|
import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/client/useDictionary.d.ts
|
|
@@ -9,7 +9,7 @@ import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
|
9
9
|
*
|
|
10
10
|
* If the locale is not provided, it will use the locale from the client context
|
|
11
11
|
*/
|
|
12
|
-
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) =>
|
|
12
|
+
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => _intlayer_core1.DeepTransformContent<T["content"], IInterpreterPluginState$1, L>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useDictionary };
|
|
15
15
|
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _intlayer_core0 from "@intlayer/core";
|
|
3
3
|
import * as _intlayer_types0 from "@intlayer/types";
|
|
4
4
|
import { DeclaredLocales, DictionaryKeys, LocalesValues } from "@intlayer/types";
|
|
5
5
|
|
|
@@ -12,7 +12,7 @@ import { DeclaredLocales, DictionaryKeys, LocalesValues } from "@intlayer/types"
|
|
|
12
12
|
*
|
|
13
13
|
* When you need the raw string for attributes like `aria-label`, access the `.value` property of the returned content
|
|
14
14
|
*/
|
|
15
|
-
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues = DeclaredLocales>(key: T, locale?: L) =>
|
|
15
|
+
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues = DeclaredLocales>(key: T, locale?: L) => _intlayer_core0.DeepTransformContent<_intlayer_types0.DictionaryRegistryContent<T>, IInterpreterPluginState$1, L>;
|
|
16
16
|
//#endregion
|
|
17
17
|
export { useIntlayer };
|
|
18
18
|
//# sourceMappingURL=useIntlayer.d.ts.map
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types0 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/useLocaleBase.d.ts
|
|
4
4
|
/**
|
|
5
5
|
* On the client side, hook to get the current locale and all related fields
|
|
6
6
|
*/
|
|
7
7
|
declare const useLocaleBase: () => {
|
|
8
|
-
locale:
|
|
9
|
-
defaultLocale:
|
|
10
|
-
availableLocales:
|
|
11
|
-
setLocale: (newLocale:
|
|
8
|
+
locale: _intlayer_types0.LocalesValues;
|
|
9
|
+
defaultLocale: _intlayer_types0.Locale;
|
|
10
|
+
availableLocales: _intlayer_types0.Locale[];
|
|
11
|
+
setLocale: (newLocale: _intlayer_types0.LocalesValues) => void;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useLocaleBase };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types4 from "@intlayer/types";
|
|
2
2
|
import { LocalesValues } from "@intlayer/types";
|
|
3
3
|
|
|
4
4
|
//#region src/client/useLocaleStorage.d.ts
|
|
@@ -9,13 +9,13 @@ import { LocalesValues } from "@intlayer/types";
|
|
|
9
9
|
/**
|
|
10
10
|
* Get the locale cookie
|
|
11
11
|
*/
|
|
12
|
-
declare const localeInStorage:
|
|
12
|
+
declare const localeInStorage: _intlayer_types4.Locale;
|
|
13
13
|
/**
|
|
14
14
|
* @deprecated Use localeInStorage instead
|
|
15
15
|
*
|
|
16
16
|
* Get the locale cookie
|
|
17
17
|
*/
|
|
18
|
-
declare const localeCookie:
|
|
18
|
+
declare const localeCookie: _intlayer_types4.Locale;
|
|
19
19
|
/**
|
|
20
20
|
* Set the locale cookie
|
|
21
21
|
*/
|
|
@@ -30,7 +30,7 @@ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled?: boolean
|
|
|
30
30
|
* Hook that provides the locale cookie and a function to set it
|
|
31
31
|
*/
|
|
32
32
|
declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
33
|
-
getLocale: () =>
|
|
33
|
+
getLocale: () => _intlayer_types4.Locale;
|
|
34
34
|
setLocale: (locale: LocalesValues) => void;
|
|
35
35
|
};
|
|
36
36
|
/**
|
|
@@ -41,7 +41,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
41
41
|
* Hook that provides the locale cookie and a function to set it
|
|
42
42
|
*/
|
|
43
43
|
declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
44
|
-
localeCookie:
|
|
44
|
+
localeCookie: _intlayer_types4.Locale;
|
|
45
45
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
46
46
|
};
|
|
47
47
|
//#endregion
|
package/dist/types/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ import { useLoadDynamic } from "./client/useLoadDynamic.js";
|
|
|
11
11
|
import { useLocale } from "./client/useLocale.js";
|
|
12
12
|
import { useLocaleBase } from "./client/useLocaleBase.js";
|
|
13
13
|
import { localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, useLocaleCookie, useLocaleStorage } from "./client/useLocaleStorage.js";
|
|
14
|
+
import { getDictionary } from "./getDictionary.js";
|
|
15
|
+
import { getIntlayer } from "./getIntlayer.js";
|
|
14
16
|
import { MarkdownProvider } from "./markdown/MarkdownProvider.js";
|
|
15
17
|
import "./markdown/index.js";
|
|
16
18
|
|
|
@@ -19,5 +21,5 @@ declare module '@intlayer/core' {
|
|
|
19
21
|
interface IInterpreterPlugin<T, S, L> extends IInterpreterPluginReact<T> {}
|
|
20
22
|
}
|
|
21
23
|
//#endregion
|
|
22
|
-
export { IntlayerClientContext, type IntlayerNode, IntlayerProvider, IntlayerProviderContent, type IntlayerProviderProps, MarkdownProvider, localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, t, useDictionary, useDictionaryAsync, useDictionaryDynamic, useI18n, useIntlayer, useIntlayerContext, useLoadDynamic, useLocale, useLocaleBase, useLocaleCookie, useLocaleStorage };
|
|
24
|
+
export { IntlayerClientContext, type IntlayerNode, IntlayerProvider, IntlayerProviderContent, type IntlayerProviderProps, MarkdownProvider, getDictionary, getIntlayer, localeCookie, localeInStorage, setLocaleCookie, setLocaleInStorage, t, useDictionary, useDictionaryAsync, useDictionaryDynamic, useI18n, useIntlayer, useIntlayerContext, useLoadDynamic, useLocale, useLocaleBase, useLocaleCookie, useLocaleStorage };
|
|
23
25
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"sourcesContent":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;;;;;;;;;;gDAIgD,wBAAwB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAoBA;;AACiB,KADL,gBACK,CAAA,CAAA,CAAA,GADiB,CACjB,SAAA,MAAA,GAAA,MAAA,GAAb,YAAa,CAAA,CAAA,CAAA,GAAA,KAAA;;AAAD,cAIH,mBAJG,EAIkB,OAJlB;AAIhB;AA0BA;AAQA;AA6BY,KArCA,aAqCkB,CAAA,CAAA,CAAA,GArCC,CAqCD,SAAA;EAAM,KAAA,EAAA,GAAA;EACC,GAAA,EAAA,GAAA;CAAjC,GAlCA,SAkCA,GAAA,KAAA;;AAIS,cAlCA,gBAyFZ,EAzF8B,
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","names":[],"sources":["../../src/plugins.tsx"],"sourcesContent":[],"mappings":";;;;;;;;AAoBA;;AACiB,KADL,gBACK,CAAA,CAAA,CAAA,GADiB,CACjB,SAAA,MAAA,GAAA,MAAA,GAAb,YAAa,CAAA,CAAA,CAAA,GAAA,KAAA;;AAAD,cAIH,mBAJG,EAIkB,OAJlB;AAIhB;AA0BA;AAQA;AA6BY,KArCA,aAqCkB,CAAA,CAAA,CAAA,GArCC,CAqCD,SAAA;EAAM,KAAA,EAAA,GAAA;EACC,GAAA,EAAA,GAAA;CAAjC,GAlCA,SAkCA,GAAA,KAAA;;AAIS,cAlCA,gBAyFZ,EAzF8B,OAkCI;AAyDnC;;;AAEG,KAhES,kBAgEA,CAAA,CAAA,CAAA,GAhEwB,CAgExB,SAAA,MAAA,GA/DR,YA+DQ,CAAA,MAAA,EAAA;EAG0B,QAAA,EAlED,oBAkEC,CAAA,MAAA,CAAA;CAArB,CAAA,GAAA,KAAA;;AAAqC,cA9DzC,oBA8DyC,EA9DnB,OA8DmB;AAAlD,KALQ,YAKR,CAAA,CAAA,CAAA,GAL0B,CAK1B,SAAA;EAAY,QAAA,EAJJ,QAII,GAAA,MAAA;EAGH,CANV,QAAA,CAAS,QAAA,CA2BX,EAAA,KAAA,EAAA;EAKgB,QAAA,CAAA,EAAA,KAAA,EAAA;CACU,GA9BvB,YA8BuB,CA9BV,oBA8BU,CA9BW,CA8BX,CAAA,EAAA;EAAd,QAAA,EA9ByC,oBA8BzC,CA9B8D,CA8B9D,CAAA;CACoB,CAAA,GAAA,KAAA;AAAjB,cA5BH,cA4BG,EA5Ba,OA4Bb;;;;AASJ,UAXK,uBAWkB,CAAA,CAAG,CAAA,CAAA;EAM1B,SAAA,EAhBC,aAgBmB,CAhBL,CAgBK,CAAA;EAEpB,YAAA,EAjBI,gBAiBJ,CAjBqB,CAiBrB,CAAA;EAAgB,QAAA,EAhBhB,YAgBgB,CAhBH,CAgBG,CAAA;;;;;;;KARhB,uBAAA,GAA0B;;;;;KAM1B,kCAEA,gBAAgB,mBACxB,uBAAyB,GAAG,yBAAyB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _intlayer_core5 from "@intlayer/core";
|
|
3
3
|
import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/server/useDictionary.d.ts
|
|
@@ -9,7 +9,7 @@ import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
|
9
9
|
*
|
|
10
10
|
* If the locale is not provided, it will use the locale from the server context
|
|
11
11
|
*/
|
|
12
|
-
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) =>
|
|
12
|
+
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => _intlayer_core5.DeepTransformContent<T["content"], IInterpreterPluginState$1, L>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useDictionary };
|
|
15
15
|
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _intlayer_core4 from "@intlayer/core";
|
|
3
3
|
import { DeclaredLocales, Dictionary, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/server/useDictionaryAsync.d.ts
|
|
@@ -9,7 +9,7 @@ import { DeclaredLocales, Dictionary, LocalesValues, StrictModeLocaleMap } from
|
|
|
9
9
|
*
|
|
10
10
|
* If the locale is not provided, it will use the locale from the server context
|
|
11
11
|
*/
|
|
12
|
-
declare const useDictionaryAsync: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: L) => Promise<
|
|
12
|
+
declare const useDictionaryAsync: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: L) => Promise<_intlayer_core4.DeepTransformContent<T["content"], IInterpreterPluginState$1, L>>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useDictionaryAsync };
|
|
15
15
|
//# sourceMappingURL=useDictionaryAsync.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _intlayer_core3 from "@intlayer/core";
|
|
3
3
|
import { DeclaredLocales, Dictionary, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/server/useDictionaryDynamic.d.ts
|
|
@@ -9,7 +9,7 @@ import { DeclaredLocales, Dictionary, LocalesValues, StrictModeLocaleMap } from
|
|
|
9
9
|
*
|
|
10
10
|
* If the locale is not provided, it will use the locale from the server context
|
|
11
11
|
*/
|
|
12
|
-
declare const useDictionaryDynamic: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: string, locale?: L) =>
|
|
12
|
+
declare const useDictionaryDynamic: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: string, locale?: L) => _intlayer_core3.DeepTransformContent<T["content"], IInterpreterPluginState$1, L>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useDictionaryDynamic };
|
|
15
15
|
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
2
|
+
import * as _intlayer_core2 from "@intlayer/core";
|
|
3
|
+
import * as _intlayer_types9 from "@intlayer/types";
|
|
4
4
|
import { DictionaryKeys, LocalesValues } from "@intlayer/types";
|
|
5
5
|
|
|
6
6
|
//#region src/server/useIntlayer.d.ts
|
|
@@ -9,7 +9,7 @@ import { DictionaryKeys, LocalesValues } from "@intlayer/types";
|
|
|
9
9
|
*
|
|
10
10
|
* If the locale is not provided, it will use the locale from the server context
|
|
11
11
|
*/
|
|
12
|
-
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues>(key: T, locale?: L) =>
|
|
12
|
+
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues>(key: T, locale?: L) => _intlayer_core2.DeepTransformContent<_intlayer_types9.DictionaryRegistryContent<T>, IInterpreterPluginState$1, L>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useIntlayer };
|
|
15
15
|
//# sourceMappingURL=useIntlayer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/server/useIntlayer.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAUa,cAAA,WAQZ,EAAA,CAAA,UARqC,cAQrC,EAAA,UAR+D,aAQ/D,CAAA,CAAA,GAAA,EAPM,CAON,EAAA,MAAA,CAAA,EANU,CAMV,EAAA,GANW,eAAA,CAAA,oBAMX,CANW,
|
|
1
|
+
{"version":3,"file":"useIntlayer.d.ts","names":[],"sources":["../../../src/server/useIntlayer.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;;AAUa,cAAA,WAQZ,EAAA,CAAA,UARqC,cAQrC,EAAA,UAR+D,aAQ/D,CAAA,CAAA,GAAA,EAPM,CAON,EAAA,MAAA,CAAA,EANU,CAMV,EAAA,GANW,eAAA,CAAA,oBAMX,CANW,gBAAA,CAAA,yBAMX,CANW,CAMX,CAAA,EANW,yBAAA,EAAA,CAMX,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-intlayer",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.3.0-canary.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your React applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -107,14 +107,14 @@
|
|
|
107
107
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
108
108
|
},
|
|
109
109
|
"dependencies": {
|
|
110
|
-
"@intlayer/api": "7.
|
|
111
|
-
"@intlayer/config": "7.
|
|
112
|
-
"@intlayer/core": "7.
|
|
113
|
-
"@intlayer/dictionaries-entry": "7.
|
|
114
|
-
"@intlayer/editor-react": "7.
|
|
115
|
-
"@intlayer/types": "7.
|
|
116
|
-
"@intlayer/unmerged-dictionaries-entry": "7.
|
|
117
|
-
"intlayer": "7.
|
|
110
|
+
"@intlayer/api": "7.3.0-canary.0",
|
|
111
|
+
"@intlayer/config": "7.3.0-canary.0",
|
|
112
|
+
"@intlayer/core": "7.3.0-canary.0",
|
|
113
|
+
"@intlayer/dictionaries-entry": "7.3.0-canary.0",
|
|
114
|
+
"@intlayer/editor-react": "7.3.0-canary.0",
|
|
115
|
+
"@intlayer/types": "7.3.0-canary.0",
|
|
116
|
+
"@intlayer/unmerged-dictionaries-entry": "7.3.0-canary.0",
|
|
117
|
+
"intlayer": "7.3.0-canary.0"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
120
|
"@craco/types": "7.1.0",
|
|
@@ -127,7 +127,7 @@
|
|
|
127
127
|
"rimraf": "6.1.2",
|
|
128
128
|
"tsdown": "0.16.6",
|
|
129
129
|
"typescript": "5.9.3",
|
|
130
|
-
"vitest": "4.0.
|
|
130
|
+
"vitest": "4.0.13"
|
|
131
131
|
},
|
|
132
132
|
"peerDependencies": {
|
|
133
133
|
"react": ">=16.0.0",
|