preact-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/useCurrency.d.ts +2 -2
- 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/useUnit.d.ts +2 -2
- package/dist/types/client/format/useUnit.d.ts.map +1 -1
- package/dist/types/client/useDictionary.d.ts +2 -2
- package/dist/types/client/useLocale.d.ts +3 -3
- package/dist/types/client/useLocaleBase.d.ts +5 -5
- package/dist/types/client/useLocaleStorage.d.ts +5 -5
- package/dist/types/editor/ConfigurationContext.d.ts +2 -2
- package/dist/types/editor/EditorEnabledContext.d.ts +2 -2
- package/dist/types/editor/useCrossURLPathState.d.ts +3 -3
- package/package.json +9 -16
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as intlayer18 from "intlayer";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useCurrency.d.ts
|
|
4
4
|
|
|
@@ -27,7 +27,7 @@ import * as intlayer12 from "intlayer";
|
|
|
27
27
|
* ```
|
|
28
28
|
*/
|
|
29
29
|
declare const useCurrency: () => (value: string | number, options?: Intl.NumberFormatOptions & {
|
|
30
|
-
locale?:
|
|
30
|
+
locale?: intlayer18.LocalesValues;
|
|
31
31
|
}) => string;
|
|
32
32
|
//#endregion
|
|
33
33
|
export { useCurrency };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as intlayer14 from "intlayer";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useList.d.ts
|
|
4
4
|
|
|
@@ -24,7 +24,7 @@ import * as intlayer16 from "intlayer";
|
|
|
24
24
|
* ```
|
|
25
25
|
*/
|
|
26
26
|
declare const useList: () => (values: (string | number)[], options?: Intl.ListFormatOptions & {
|
|
27
|
-
locale?:
|
|
27
|
+
locale?: intlayer14.LocalesValues;
|
|
28
28
|
}) => string;
|
|
29
29
|
//#endregion
|
|
30
30
|
export { useList };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as intlayer16 from "intlayer";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useNumber.d.ts
|
|
4
4
|
|
|
@@ -25,7 +25,7 @@ import * as intlayer14 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?: intlayer16.LocalesValues;
|
|
29
29
|
}) => string;
|
|
30
30
|
//#endregion
|
|
31
31
|
export { useNumber };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as intlayer0 from "intlayer";
|
|
2
2
|
|
|
3
3
|
//#region src/client/format/useUnit.d.ts
|
|
4
4
|
|
|
@@ -20,7 +20,7 @@ import * as intlayer18 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?: intlayer0.LocalesValues;
|
|
24
24
|
}) => string;
|
|
25
25
|
//#endregion
|
|
26
26
|
export { useUnit };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/client/format/useUnit.ts"],"sourcesContent":[],"mappings":";;;;;;;AAuBA;;;;;;;;;;;;;;cAAa,kDAAO,IAAA,CAAA;WAAA,
|
|
1
|
+
{"version":3,"file":"useUnit.d.ts","names":[],"sources":["../../../../src/client/format/useUnit.ts"],"sourcesContent":[],"mappings":";;;;;;;AAuBA;;;;;;;;;;;;;;cAAa,kDAAO,IAAA,CAAA;WAAA,SAAA,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IInterpreterPluginState as IInterpreterPluginState$1 } from "../plugins.js";
|
|
2
2
|
import * as _intlayer_core0 from "@intlayer/core";
|
|
3
3
|
import { DeclaredLocales, Dictionary, LocalesValues } from "@intlayer/types";
|
|
4
|
-
import * as
|
|
4
|
+
import * as intlayer2 from "intlayer";
|
|
5
5
|
|
|
6
6
|
//#region src/client/useDictionary.d.ts
|
|
7
7
|
/**
|
|
@@ -9,7 +9,7 @@ import * as intlayer0 from "intlayer";
|
|
|
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) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1,
|
|
12
|
+
declare const useDictionary: <T extends Dictionary, L extends LocalesValues = DeclaredLocales>(dictionary: T, locale?: L) => _intlayer_core0.DeepTransformContent<T["content"], IInterpreterPluginState$1, intlayer2.Locale>;
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useDictionary };
|
|
15
15
|
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LocalesValues } from "@intlayer/types";
|
|
2
|
-
import * as
|
|
2
|
+
import * as intlayer3 from "intlayer";
|
|
3
3
|
|
|
4
4
|
//#region src/client/useLocale.d.ts
|
|
5
5
|
type useLocaleProps = {
|
|
@@ -14,8 +14,8 @@ declare const useLocale: ({
|
|
|
14
14
|
onLocaleChange
|
|
15
15
|
}?: useLocaleProps) => {
|
|
16
16
|
locale: LocalesValues;
|
|
17
|
-
defaultLocale:
|
|
18
|
-
availableLocales:
|
|
17
|
+
defaultLocale: intlayer3.Locale;
|
|
18
|
+
availableLocales: intlayer3.Locale[];
|
|
19
19
|
setLocale: (locale: LocalesValues) => void;
|
|
20
20
|
};
|
|
21
21
|
//#endregion
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as intlayer5 from "intlayer";
|
|
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: intlayer5.LocalesValues;
|
|
9
|
+
defaultLocale: intlayer5.Locale;
|
|
10
|
+
availableLocales: intlayer5.Locale[];
|
|
11
|
+
setLocale: (newLocale: intlayer5.LocalesValues) => void;
|
|
12
12
|
};
|
|
13
13
|
//#endregion
|
|
14
14
|
export { useLocaleBase };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { LocalesValues } from "@intlayer/types";
|
|
2
|
-
import * as
|
|
2
|
+
import * as intlayer9 from "intlayer";
|
|
3
3
|
|
|
4
4
|
//#region src/client/useLocaleStorage.d.ts
|
|
5
5
|
/**
|
|
6
6
|
* Get the locale cookie
|
|
7
7
|
*/
|
|
8
|
-
declare const localeInStorage:
|
|
8
|
+
declare const localeInStorage: intlayer9.Locale;
|
|
9
9
|
/**
|
|
10
10
|
* @deprecated Use localeInStorage instead
|
|
11
11
|
*
|
|
12
12
|
* Get the locale cookie
|
|
13
13
|
*/
|
|
14
|
-
declare const localeCookie:
|
|
14
|
+
declare const localeCookie: intlayer9.Locale;
|
|
15
15
|
/**
|
|
16
16
|
* Set the locale cookie
|
|
17
17
|
*/
|
|
@@ -26,7 +26,7 @@ declare const setLocaleCookie: (locale: LocalesValues, isCookieEnabled: boolean)
|
|
|
26
26
|
* Hook that provides the locale storage and a function to set it
|
|
27
27
|
*/
|
|
28
28
|
declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
29
|
-
getLocale: () =>
|
|
29
|
+
getLocale: () => intlayer9.Locale;
|
|
30
30
|
setLocale: (locale: LocalesValues) => void;
|
|
31
31
|
};
|
|
32
32
|
/**
|
|
@@ -37,7 +37,7 @@ declare const useLocaleStorage: (isCookieEnabled?: boolean) => {
|
|
|
37
37
|
* Hook that provides the locale cookie and a function to set it
|
|
38
38
|
*/
|
|
39
39
|
declare const useLocaleCookie: (isCookieEnabled?: boolean) => {
|
|
40
|
-
localeCookie:
|
|
40
|
+
localeCookie: intlayer9.Locale;
|
|
41
41
|
setLocaleCookie: (locale: LocalesValues) => void;
|
|
42
42
|
};
|
|
43
43
|
//#endregion
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { FC, PropsWithChildren } from "preact/compat";
|
|
2
2
|
import { IntlayerConfig } from "@intlayer/types";
|
|
3
|
-
import * as
|
|
3
|
+
import * as preact_hooks0 from "preact/hooks";
|
|
4
4
|
|
|
5
5
|
//#region src/editor/ConfigurationContext.d.ts
|
|
6
|
-
declare const useConfigurationState: () => [IntlayerConfig,
|
|
6
|
+
declare const useConfigurationState: () => [IntlayerConfig, preact_hooks0.Dispatch<preact_hooks0.StateUpdater<IntlayerConfig>>, () => void];
|
|
7
7
|
type ConfigurationProviderProps = {
|
|
8
8
|
configuration?: IntlayerConfig;
|
|
9
9
|
};
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { CrossFrameStateOptions } from "./useCrossFrameState.js";
|
|
2
2
|
import { FC, PropsWithChildren } from "preact/compat";
|
|
3
|
-
import * as
|
|
3
|
+
import * as preact_hooks1 from "preact/hooks";
|
|
4
4
|
|
|
5
5
|
//#region src/editor/EditorEnabledContext.d.ts
|
|
6
6
|
type EditorEnabledStateProps = {
|
|
7
7
|
enabled: boolean;
|
|
8
8
|
};
|
|
9
|
-
declare const useEditorEnabledState: (options?: CrossFrameStateOptions) => [boolean,
|
|
9
|
+
declare const useEditorEnabledState: (options?: CrossFrameStateOptions) => [boolean, preact_hooks1.Dispatch<preact_hooks1.StateUpdater<boolean>>, () => void];
|
|
10
10
|
declare const usePostEditorEnabledState: <S>(onEventTriggered?: (data: S) => void) => (data?: S) => void;
|
|
11
11
|
declare const useGetEditorEnabledState: <S>(onEventTriggered?: (data: S) => void) => (data?: S) => void;
|
|
12
12
|
declare const EditorEnabledProvider: FC<PropsWithChildren>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { CrossFrameStateOptions } from "./useCrossFrameState.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as preact_hooks3 from "preact/hooks";
|
|
3
3
|
|
|
4
4
|
//#region src/editor/useCrossURLPathState.d.ts
|
|
5
|
-
declare const useCrossURLPathState: (initialState?: string, options?: CrossFrameStateOptions) => [string,
|
|
6
|
-
declare const useCrossURLPathSetter: (initialState?: string) => [string,
|
|
5
|
+
declare const useCrossURLPathState: (initialState?: string, options?: CrossFrameStateOptions) => [string, preact_hooks3.Dispatch<preact_hooks3.StateUpdater<string>>, () => void];
|
|
6
|
+
declare const useCrossURLPathSetter: (initialState?: string) => [string, preact_hooks3.Dispatch<preact_hooks3.StateUpdater<string>>, () => void];
|
|
7
7
|
//#endregion
|
|
8
8
|
export { useCrossURLPathSetter, useCrossURLPathState };
|
|
9
9
|
//# sourceMappingURL=useCrossURLPathState.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "preact-intlayer",
|
|
3
|
-
"version": "7.1.
|
|
3
|
+
"version": "7.1.1-canary.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Easily internationalize i18n your Preact applications with type-safe multilingual content management.",
|
|
6
6
|
"keywords": [
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@intlayer/api": "7.1.
|
|
88
|
-
"@intlayer/chokidar": "7.1.
|
|
89
|
-
"@intlayer/config": "7.1.
|
|
90
|
-
"@intlayer/core": "7.1.
|
|
91
|
-
"@intlayer/editor": "7.1.
|
|
92
|
-
"@intlayer/types": "7.1.
|
|
93
|
-
"@intlayer/unmerged-dictionaries-entry": "7.1.
|
|
87
|
+
"@intlayer/api": "7.1.1-canary.1",
|
|
88
|
+
"@intlayer/chokidar": "7.1.1-canary.1",
|
|
89
|
+
"@intlayer/config": "7.1.1-canary.1",
|
|
90
|
+
"@intlayer/core": "7.1.1-canary.1",
|
|
91
|
+
"@intlayer/editor": "7.1.1-canary.1",
|
|
92
|
+
"@intlayer/types": "7.1.1-canary.1",
|
|
93
|
+
"@intlayer/unmerged-dictionaries-entry": "7.1.1-canary.1"
|
|
94
94
|
},
|
|
95
95
|
"devDependencies": {
|
|
96
96
|
"@types/node": "24.10.1",
|
|
@@ -98,18 +98,11 @@
|
|
|
98
98
|
"@utils/ts-config-types": "1.0.4",
|
|
99
99
|
"@utils/tsdown-config": "1.0.4",
|
|
100
100
|
"rimraf": "6.1.0",
|
|
101
|
-
"tsdown": "0.16.
|
|
101
|
+
"tsdown": "0.16.5",
|
|
102
102
|
"typescript": "5.9.3",
|
|
103
103
|
"vitest": "4.0.8"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@intlayer/api": "7.1.0",
|
|
107
|
-
"@intlayer/chokidar": "7.1.0",
|
|
108
|
-
"@intlayer/config": "7.1.0",
|
|
109
|
-
"@intlayer/core": "7.1.0",
|
|
110
|
-
"@intlayer/editor": "7.1.0",
|
|
111
|
-
"@intlayer/types": "7.1.0",
|
|
112
|
-
"@intlayer/unmerged-dictionaries-entry": "7.1.0",
|
|
113
106
|
"preact": ">=8.0.0"
|
|
114
107
|
},
|
|
115
108
|
"engines": {
|