react-intlayer 8.0.2-canary.0 → 8.0.2
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/dist/types/client/IntlayerProvider.d.ts +2 -2
- 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/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/format/useUnit.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/markdown/MarkdownRenderer.d.ts +2 -2
- 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 +2 -2
- package/package.json +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react0 from "react";
|
|
2
2
|
import { FC, PropsWithChildren } from "react";
|
|
3
3
|
import { LocalesValues } from "@intlayer/types";
|
|
4
4
|
|
|
@@ -12,7 +12,7 @@ type IntlayerValue = {
|
|
|
12
12
|
/**
|
|
13
13
|
* Context that stores the current locale on the client side.
|
|
14
14
|
*/
|
|
15
|
-
declare const IntlayerClientContext:
|
|
15
|
+
declare const IntlayerClientContext: react0.Context<IntlayerValue>;
|
|
16
16
|
/**
|
|
17
17
|
* Hook that provides the current Intlayer client context.
|
|
18
18
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IntlayerProvider.d.ts","names":[],"sources":["../../../src/client/IntlayerProvider.tsx"],"mappings":";;;;;KAgBK,aAAA;EACH,MAAA,EAAQ,aAAA;EACR,SAAA,GAAY,SAAA,EAAW,aAAA;EACvB,aAAA;EACA,eAAA;AAAA;;;;cAMW,qBAAA,EAAqB,
|
|
1
|
+
{"version":3,"file":"IntlayerProvider.d.ts","names":[],"sources":["../../../src/client/IntlayerProvider.tsx"],"mappings":";;;;;KAgBK,aAAA;EACH,MAAA,EAAQ,aAAA;EACR,SAAA,GAAY,SAAA,EAAW,aAAA;EACvB,aAAA;EACA,eAAA;AAAA;;;;cAMW,qBAAA,EAAqB,MAAA,CAAA,OAAA,CAAA,aAAA;;;;;;cAYrB,kBAAA,QAAkB,aAAA;AAZ/B;;;AAAA,KAiBY,qBAAA,GAAwB,iBAAA;EAjBF;AAYlC;;EASE,MAAA,GAAS,aAAA;EAToB;;AAK/B;EAQE,aAAA,GAAgB,aAAA;;;;EAIhB,SAAA,IAAa,MAAA,EAAQ,aAAA;EAZa;;;EAgBlC,aAAA;EAZA;;;EAgBA,eAAA;AAAA;;;;;;;AAWF;;cAAa,uBAAA,EAAyB,EAAA,CAAG,qBAAA;;;AA6EzC;;;;;;;;;;;;;;;;;;cAAa,gBAAA,EAAkB,EAAA,CAAG,qBAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types13 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useCompact.d.ts
|
|
4
4
|
/**
|
|
@@ -12,7 +12,7 @@ import * as _intlayer_types11 from "@intlayer/types";
|
|
|
12
12
|
* ```
|
|
13
13
|
*/
|
|
14
14
|
declare const useCompact: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
15
|
-
locale?:
|
|
15
|
+
locale?: _intlayer_types13.LocalesValues;
|
|
16
16
|
}) => string;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { useCompact };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types10 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useCurrency.d.ts
|
|
4
4
|
/**
|
|
@@ -26,7 +26,7 @@ import * as _intlayer_types9 from "@intlayer/types";
|
|
|
26
26
|
* ```
|
|
27
27
|
*/
|
|
28
28
|
declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
29
|
-
locale?:
|
|
29
|
+
locale?: _intlayer_types10.LocalesValues;
|
|
30
30
|
}) => string;
|
|
31
31
|
//#endregion
|
|
32
32
|
export { useCurrency };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/client/format/useCurrency.ts"],"mappings":";;;;;;AA8BA;;;;;;;;;;;;;;;;;;;;;cAAa,WAAA,SAAW,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,
|
|
1
|
+
{"version":3,"file":"useCurrency.d.ts","names":[],"sources":["../../../../src/client/format/useCurrency.ts"],"mappings":";;;;;;AA8BA;;;;;;;;;;;;;;;;;;;;;cAAa,WAAA,SAAW,KAAA,mBAAA,OAAA,GAAA,IAAA,CAAA,mBAAA;WAAA,iBAAA,CAAA,aAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types9 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useList.d.ts
|
|
4
4
|
/**
|
|
@@ -23,7 +23,7 @@ import * as _intlayer_types12 from "@intlayer/types";
|
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
25
|
declare const useList: () => (values: (string | number)[], options?: Intl.ListFormatOptions & {
|
|
26
|
-
locale?:
|
|
26
|
+
locale?: _intlayer_types9.LocalesValues;
|
|
27
27
|
}) => string;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { useList };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/client/format/useList.ts"],"mappings":";;;;;;AA2BA;;;;;;;;;;;;;;;;;;cAAa,OAAA,SAAO,MAAA,uBAAA,OAAA,GAAA,IAAA,CAAA,iBAAA;WAAA,
|
|
1
|
+
{"version":3,"file":"useList.d.ts","names":[],"sources":["../../../../src/client/format/useList.ts"],"mappings":";;;;;;AA2BA;;;;;;;;;;;;;;;;;;cAAa,OAAA,SAAO,MAAA,uBAAA,OAAA,GAAA,IAAA,CAAA,iBAAA;WAAA,gBAAA,CAAA,aAAA;AAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types15 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useNumber.d.ts
|
|
4
4
|
/**
|
|
@@ -24,7 +24,7 @@ import * as _intlayer_types10 from "@intlayer/types";
|
|
|
24
24
|
* A number formatting function bound to the active locale.
|
|
25
25
|
*/
|
|
26
26
|
declare const useNumber: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
27
|
-
locale?:
|
|
27
|
+
locale?: _intlayer_types15.LocalesValues;
|
|
28
28
|
}) => string;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { useNumber };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types11 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/usePercentage.d.ts
|
|
4
4
|
/**
|
|
@@ -20,7 +20,7 @@ import * as _intlayer_types13 from "@intlayer/types";
|
|
|
20
20
|
* A function that formats numbers or numeric strings into localized percentages.
|
|
21
21
|
*/
|
|
22
22
|
declare const usePercentage: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
23
|
-
locale?:
|
|
23
|
+
locale?: _intlayer_types11.LocalesValues;
|
|
24
24
|
}) => string;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { usePercentage };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types14 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useRelativeTime.d.ts
|
|
4
4
|
/**
|
|
@@ -20,7 +20,7 @@ import * as _intlayer_types15 from "@intlayer/types";
|
|
|
20
20
|
* bound to the current client locale.
|
|
21
21
|
*/
|
|
22
22
|
declare const useRelativeTime: () => (from: string | number | Date, to?: string | number | Date, options?: Intl.RelativeTimeFormatOptions & {
|
|
23
|
-
locale?:
|
|
23
|
+
locale?: _intlayer_types14.LocalesValues;
|
|
24
24
|
unit?: Intl.RelativeTimeFormatUnit;
|
|
25
25
|
}) => string;
|
|
26
26
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as _intlayer_types12 from "@intlayer/types";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useUnit.d.ts
|
|
4
4
|
/**
|
|
@@ -19,7 +19,7 @@ import * as _intlayer_types14 from "@intlayer/types";
|
|
|
19
19
|
* @returns {Function} A unit formatting function that accepts a value and optional formatting options.
|
|
20
20
|
*/
|
|
21
21
|
declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
22
|
-
locale?:
|
|
22
|
+
locale?: _intlayer_types12.LocalesValues;
|
|
23
23
|
}) => string;
|
|
24
24
|
//#endregion
|
|
25
25
|
export { useUnit };
|
|
@@ -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 { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/client/useDictionary.d.ts
|
|
@@ -8,7 +8,7 @@ import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
|
8
8
|
*
|
|
9
9
|
* If the locale is not provided, it will use the locale from the client context
|
|
10
10
|
*/
|
|
11
|
-
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) =>
|
|
11
|
+
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, L>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { useDictionary };
|
|
14
14
|
//# 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_core1 from "@intlayer/core";
|
|
3
3
|
import * as _intlayer_types0 from "@intlayer/types";
|
|
4
4
|
import { DeclaredLocales, DictionaryKeys, LocalesValues } from "@intlayer/types";
|
|
5
5
|
|
|
@@ -24,7 +24,7 @@ import { DeclaredLocales, DictionaryKeys, LocalesValues } from "@intlayer/types"
|
|
|
24
24
|
* };
|
|
25
25
|
* ```
|
|
26
26
|
*/
|
|
27
|
-
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues = DeclaredLocales>(key: T, locale?: L) =>
|
|
27
|
+
declare const useIntlayer: <T extends DictionaryKeys, L extends LocalesValues = DeclaredLocales>(key: T, locale?: L) => _intlayer_core1.DeepTransformContent<_intlayer_types0.DictionaryRegistryContent<T>, IInterpreterPluginState$1, L>;
|
|
28
28
|
//#endregion
|
|
29
29
|
export { useIntlayer };
|
|
30
30
|
//# sourceMappingURL=useIntlayer.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLComponents } from "../html/HTMLComponentTypes.js";
|
|
2
2
|
import { MarkdownProviderOptions } from "./MarkdownProvider.js";
|
|
3
|
-
import * as
|
|
3
|
+
import * as react199 from "react";
|
|
4
4
|
import { FC, HTMLAttributes, JSX, ReactNode } from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/markdown/MarkdownRenderer.d.ts
|
|
@@ -134,7 +134,7 @@ declare const useMarkdownRenderer: ({
|
|
|
134
134
|
forceInline,
|
|
135
135
|
preserveFrontmatter,
|
|
136
136
|
tagfilter
|
|
137
|
-
}?: RenderMarkdownProps) => (content: string) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean |
|
|
137
|
+
}?: RenderMarkdownProps) => (content: string) => string | number | bigint | boolean | Iterable<ReactNode> | Promise<string | number | bigint | boolean | react199.ReactPortal | react199.ReactElement<unknown, string | react199.JSXElementConstructor<any>> | Iterable<ReactNode>> | JSX.Element;
|
|
138
138
|
/**
|
|
139
139
|
* Props for the MarkdownRenderer component.
|
|
140
140
|
*
|
|
@@ -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 } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/server/useDictionary.d.ts
|
|
@@ -8,7 +8,7 @@ import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
|
8
8
|
*
|
|
9
9
|
* If the locale is not provided, it will use the locale from the server context
|
|
10
10
|
*/
|
|
11
|
-
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) =>
|
|
11
|
+
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => _intlayer_core4.DeepTransformContent<T["content"], IInterpreterPluginState$1, L>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { useDictionary };
|
|
14
14
|
//# 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_core3 from "@intlayer/core";
|
|
3
3
|
import { DeclaredLocales, Dictionary, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/server/useDictionaryAsync.d.ts
|
|
@@ -8,7 +8,7 @@ import { DeclaredLocales, Dictionary, LocalesValues, StrictModeLocaleMap } from
|
|
|
8
8
|
*
|
|
9
9
|
* If the locale is not provided, it will use the locale from the server context
|
|
10
10
|
*/
|
|
11
|
-
declare const useDictionaryAsync: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: L) => Promise<
|
|
11
|
+
declare const useDictionaryAsync: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, locale?: L) => Promise<_intlayer_core3.DeepTransformContent<T["content"], IInterpreterPluginState$1, L>>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { useDictionaryAsync };
|
|
14
14
|
//# 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_core5 from "@intlayer/core";
|
|
3
3
|
import { DeclaredLocales, Dictionary, LocalesValues, StrictModeLocaleMap } from "@intlayer/types";
|
|
4
4
|
|
|
5
5
|
//#region src/server/useDictionaryDynamic.d.ts
|
|
@@ -8,7 +8,7 @@ import { DeclaredLocales, Dictionary, LocalesValues, StrictModeLocaleMap } from
|
|
|
8
8
|
*
|
|
9
9
|
* If the locale is not provided, it will use the locale from the server context
|
|
10
10
|
*/
|
|
11
|
-
declare const useDictionaryDynamic: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: string, locale?: L) =>
|
|
11
|
+
declare const useDictionaryDynamic: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionaryPromise: StrictModeLocaleMap<() => Promise<T>>, key: string, locale?: L) => _intlayer_core5.DeepTransformContent<T["content"], IInterpreterPluginState$1, L>;
|
|
12
12
|
//#endregion
|
|
13
13
|
export { useDictionaryDynamic };
|
|
14
14
|
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as _intlayer_core2 from "@intlayer/core";
|
|
3
3
|
import * as _intlayer_types8 from "@intlayer/types";
|
|
4
4
|
import { DictionaryKeys, LocalesValues } from "@intlayer/types";
|
|
5
5
|
|
|
@@ -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_types8.DictionaryRegistryContent<T>, IInterpreterPluginState$1, L>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useIntlayer };
|
|
15
15
|
//# sourceMappingURL=useIntlayer.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-intlayer",
|
|
3
|
-
"version": "8.0.2
|
|
3
|
+
"version": "8.0.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your React applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -116,14 +116,14 @@
|
|
|
116
116
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
117
117
|
},
|
|
118
118
|
"dependencies": {
|
|
119
|
-
"@intlayer/api": "8.0.2
|
|
120
|
-
"@intlayer/config": "8.0.2
|
|
121
|
-
"@intlayer/core": "8.0.2
|
|
122
|
-
"@intlayer/dictionaries-entry": "8.0.2
|
|
123
|
-
"@intlayer/editor-react": "8.0.2
|
|
124
|
-
"@intlayer/types": "8.0.2
|
|
125
|
-
"@intlayer/unmerged-dictionaries-entry": "8.0.2
|
|
126
|
-
"intlayer": "8.0.2
|
|
119
|
+
"@intlayer/api": "8.0.2",
|
|
120
|
+
"@intlayer/config": "8.0.2",
|
|
121
|
+
"@intlayer/core": "8.0.2",
|
|
122
|
+
"@intlayer/dictionaries-entry": "8.0.2",
|
|
123
|
+
"@intlayer/editor-react": "8.0.2",
|
|
124
|
+
"@intlayer/types": "8.0.2",
|
|
125
|
+
"@intlayer/unmerged-dictionaries-entry": "8.0.2",
|
|
126
|
+
"intlayer": "8.0.2"
|
|
127
127
|
},
|
|
128
128
|
"devDependencies": {
|
|
129
129
|
"@craco/types": "7.1.0",
|