react-intlayer 7.1.0 → 7.1.1-canary.1
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/format/useList.d.ts +2 -2
- package/dist/types/client/format/useNumber.d.ts +2 -2
- package/dist/types/client/format/useNumber.d.ts.map +1 -1
- package/dist/types/client/format/usePercentage.d.ts +2 -2
- package/dist/types/client/format/usePercentage.d.ts.map +1 -1
- 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/reactElement/renderReactElement.d.ts +2 -2
- package/dist/types/server/IntlayerServerProvider.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/useIntlayer.d.ts +2 -2
- package/package.json +10 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as intlayer8 from "intlayer";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useList.d.ts
|
|
4
4
|
|
|
@@ -24,7 +24,7 @@ import * as intlayer9 from "intlayer";
|
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
declare const useList: () => (values: (string | number)[], options?: Intl.ListFormatOptions & {
|
|
27
|
-
locale?:
|
|
27
|
+
locale?: intlayer8.LocalesValues;
|
|
28
28
|
}) => string;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { useList };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as intlayer11 from "intlayer";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useNumber.d.ts
|
|
4
4
|
|
|
@@ -25,7 +25,7 @@ import * as intlayer8 from "intlayer";
|
|
|
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?: intlayer11.LocalesValues;
|
|
29
29
|
}) => string;
|
|
30
30
|
//#endregion
|
|
31
31
|
export { useNumber };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/client/format/useNumber.ts"],"sourcesContent":[],"mappings":";;;;;;;AA4BA;;;;;;;;;;;;;;;;;;;cAAa,oDAAS,IAAA,CAAA;WAAA,
|
|
1
|
+
{"version":3,"file":"useNumber.d.ts","names":[],"sources":["../../../../src/client/format/useNumber.ts"],"sourcesContent":[],"mappings":";;;;;;;AA4BA;;;;;;;;;;;;;;;;;;;cAAa,oDAAS,IAAA,CAAA;WAAA,UAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as intlayer9 from "intlayer";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/usePercentage.d.ts
|
|
4
4
|
|
|
@@ -21,7 +21,7 @@ import * as intlayer11 from "intlayer";
|
|
|
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?: intlayer9.LocalesValues;
|
|
25
25
|
}) => string;
|
|
26
26
|
//#endregion
|
|
27
27
|
export { usePercentage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/client/format/usePercentage.ts"],"sourcesContent":[],"mappings":";;;;;;;AAwBA;;;;;;;;;;;;;;;cAAa,wDAAa,IAAA,CAAA;WAAA,
|
|
1
|
+
{"version":3,"file":"usePercentage.d.ts","names":[],"sources":["../../../../src/client/format/usePercentage.ts"],"sourcesContent":[],"mappings":";;;;;;;AAwBA;;;;;;;;;;;;;;;cAAa,wDAAa,IAAA,CAAA;WAAA,SAAA,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as intlayer12 from "intlayer";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useRelativeTime.d.ts
|
|
4
4
|
|
|
@@ -21,7 +21,7 @@ import * as intlayer10 from "intlayer";
|
|
|
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?: intlayer12.LocalesValues;
|
|
25
25
|
unit?: Intl.RelativeTimeFormatUnit;
|
|
26
26
|
}) => string;
|
|
27
27
|
//#endregion
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as intlayer10 from "intlayer";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useUnit.d.ts
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ import * as intlayer12 from "intlayer";
|
|
|
20
20
|
* @returns {Function} A unit formatting function that accepts a value and optional formatting options.
|
|
21
21
|
*/
|
|
22
22
|
declare const useUnit: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
23
|
-
locale?:
|
|
23
|
+
locale?: intlayer10.LocalesValues;
|
|
24
24
|
}) => string;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { useUnit };
|
|
@@ -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,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react0 from "react";
|
|
2
2
|
import { ReactElement } from "react";
|
|
3
3
|
|
|
4
4
|
//#region src/reactElement/renderReactElement.d.ts
|
|
5
|
-
declare const renderReactElement: (element: ReactElement<any>) => ReactElement<any, string |
|
|
5
|
+
declare const renderReactElement: (element: ReactElement<any>) => ReactElement<any, string | react0.JSXElementConstructor<any>>;
|
|
6
6
|
//#endregion
|
|
7
7
|
export { renderReactElement };
|
|
8
8
|
//# sourceMappingURL=renderReactElement.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react1 from "react";
|
|
2
2
|
import { FC, PropsWithChildren } from "react";
|
|
3
3
|
import { LocalesValues } from "@intlayer/types";
|
|
4
4
|
|
|
@@ -13,7 +13,7 @@ declare const IntlayerServerContext: FC<PropsWithChildren<{
|
|
|
13
13
|
value?: LocalesValues;
|
|
14
14
|
}>>;
|
|
15
15
|
Consumer: FC<PropsWithChildren<{
|
|
16
|
-
children: (context: LocalesValues) =>
|
|
16
|
+
children: (context: LocalesValues) => react1.ReactNode;
|
|
17
17
|
}>>;
|
|
18
18
|
_storage: () => {
|
|
19
19
|
value: LocalesValues;
|
|
@@ -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_core2 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_core2.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 * as _intlayer_types0 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_core3.DeepTransformContent<_intlayer_types0.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": "7.1.
|
|
3
|
+
"version": "7.1.1-canary.1",
|
|
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.1.
|
|
111
|
-
"@intlayer/config": "7.1.
|
|
112
|
-
"@intlayer/core": "7.1.
|
|
113
|
-
"@intlayer/dictionaries-entry": "7.1.
|
|
114
|
-
"@intlayer/editor-react": "7.1.
|
|
115
|
-
"@intlayer/types": "7.1.
|
|
116
|
-
"@intlayer/unmerged-dictionaries-entry": "7.1.
|
|
117
|
-
"intlayer": "7.1.
|
|
110
|
+
"@intlayer/api": "7.1.1-canary.1",
|
|
111
|
+
"@intlayer/config": "7.1.1-canary.1",
|
|
112
|
+
"@intlayer/core": "7.1.1-canary.1",
|
|
113
|
+
"@intlayer/dictionaries-entry": "7.1.1-canary.1",
|
|
114
|
+
"@intlayer/editor-react": "7.1.1-canary.1",
|
|
115
|
+
"@intlayer/types": "7.1.1-canary.1",
|
|
116
|
+
"@intlayer/unmerged-dictionaries-entry": "7.1.1-canary.1",
|
|
117
|
+
"intlayer": "7.1.1-canary.1"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
120
|
"@craco/types": "7.1.0",
|
|
@@ -125,17 +125,11 @@
|
|
|
125
125
|
"@utils/ts-config-types": "1.0.4",
|
|
126
126
|
"@utils/tsdown-config": "1.0.4",
|
|
127
127
|
"rimraf": "6.1.0",
|
|
128
|
-
"tsdown": "0.16.
|
|
128
|
+
"tsdown": "0.16.5",
|
|
129
129
|
"typescript": "5.9.3",
|
|
130
130
|
"vitest": "4.0.8"
|
|
131
131
|
},
|
|
132
132
|
"peerDependencies": {
|
|
133
|
-
"@intlayer/api": "7.1.0",
|
|
134
|
-
"@intlayer/config": "7.1.0",
|
|
135
|
-
"@intlayer/core": "7.1.0",
|
|
136
|
-
"@intlayer/editor-react": "7.1.0",
|
|
137
|
-
"@intlayer/types": "7.1.0",
|
|
138
|
-
"@intlayer/unmerged-dictionaries-entry": "7.1.0",
|
|
139
133
|
"react": ">=16.0.0",
|
|
140
134
|
"react-dom": ">=16.0.0"
|
|
141
135
|
},
|