@intlayer/next-intl 9.7.0 → 9.7.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/cjs/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/cjs/client/NextIntlClientProvider.cjs +2 -3
- package/dist/cjs/client/NextIntlClientProvider.cjs.map +1 -1
- package/dist/cjs/client/index.cjs +11 -11
- package/dist/cjs/client/useLocale.cjs +1 -2
- package/dist/cjs/getDictionary.cjs +2 -3
- package/dist/cjs/getDictionaryDynamic.cjs +2 -3
- package/dist/cjs/index.cjs +18 -18
- package/dist/cjs/middleware.cjs +1 -2
- package/dist/cjs/middleware.cjs.map +1 -1
- package/dist/cjs/navigation/Link.cjs +4 -5
- package/dist/cjs/navigation/Link.cjs.map +1 -1
- package/dist/cjs/navigation/createNavigation.cjs +4 -5
- package/dist/cjs/navigation/createNavigation.cjs.map +1 -1
- package/dist/cjs/navigation/hooks.cjs +2 -3
- package/dist/cjs/navigation/hooks.cjs.map +1 -1
- package/dist/cjs/navigation/index.cjs +3 -3
- package/dist/cjs/navigation/localizeHref.cjs +1 -2
- package/dist/cjs/plugin/index.cjs +3 -4
- package/dist/cjs/routing.cjs +1 -2
- package/dist/cjs/server/getLocale.cjs +2 -3
- package/dist/cjs/server/getMessages.cjs +1 -2
- package/dist/cjs/server/getRequestConfig.cjs +1 -2
- package/dist/cjs/server/getTranslations.cjs +2 -3
- package/dist/cjs/server/helpers.cjs +2 -3
- package/dist/cjs/server/index.cjs +9 -9
- package/dist/cjs/server/react/helpers.cjs +2 -3
- package/dist/cjs/server/react/index.cjs +14 -14
- package/dist/cjs/server/react/resolveLocale.cjs +2 -3
- package/dist/cjs/server/react/useDictionary.cjs +2 -3
- package/dist/cjs/server/react/useDictionaryDynamic.cjs +2 -3
- package/dist/cjs/server/react/useLocale.cjs +2 -3
- package/dist/cjs/server/react/useTranslations.cjs +2 -3
- package/dist/cjs/server/requestLocaleCache.cjs +1 -2
- package/dist/cjs/server/setLocale.cjs +1 -2
- package/dist/cjs/server/setRequestLocale.cjs +2 -3
- package/dist/esm/client/NextIntlClientProvider.mjs +2 -3
- package/dist/esm/client/NextIntlClientProvider.mjs.map +1 -1
- package/dist/esm/client/useLocale.mjs +1 -2
- package/dist/esm/getDictionary.mjs +1 -2
- package/dist/esm/getDictionaryDynamic.mjs +1 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/middleware.mjs +1 -2
- package/dist/esm/middleware.mjs.map +1 -1
- package/dist/esm/navigation/Link.mjs +2 -3
- package/dist/esm/navigation/Link.mjs.map +1 -1
- package/dist/esm/navigation/createNavigation.mjs +3 -4
- package/dist/esm/navigation/createNavigation.mjs.map +1 -1
- package/dist/esm/navigation/hooks.mjs +1 -2
- package/dist/esm/navigation/hooks.mjs.map +1 -1
- package/dist/esm/navigation/index.mjs +2 -2
- package/dist/esm/navigation/localizeHref.mjs +1 -2
- package/dist/esm/plugin/index.mjs +2 -3
- package/dist/esm/routing.mjs +1 -2
- package/dist/esm/server/getLocale.mjs +1 -2
- package/dist/esm/server/getMessages.mjs +1 -2
- package/dist/esm/server/getRequestConfig.mjs +1 -2
- package/dist/esm/server/getTranslations.mjs +1 -2
- package/dist/esm/server/helpers.mjs +1 -2
- package/dist/esm/server/index.mjs +3 -3
- package/dist/esm/server/react/helpers.mjs +1 -2
- package/dist/esm/server/react/index.mjs +3 -3
- package/dist/esm/server/react/resolveLocale.mjs +1 -2
- package/dist/esm/server/react/useDictionary.mjs +1 -2
- package/dist/esm/server/react/useDictionaryDynamic.mjs +1 -2
- package/dist/esm/server/react/useLocale.mjs +1 -2
- package/dist/esm/server/react/useTranslations.mjs +1 -2
- package/dist/esm/server/requestLocaleCache.mjs +1 -2
- package/dist/esm/server/setLocale.mjs +1 -2
- package/dist/esm/server/setRequestLocale.mjs +1 -2
- package/dist/types/client/NextIntlClientProvider.d.ts +0 -2
- package/dist/types/client/NextIntlClientProvider.d.ts.map +1 -1
- package/dist/types/client/useLocale.d.ts +0 -2
- package/dist/types/client/useLocale.d.ts.map +1 -1
- package/dist/types/getDictionary.d.ts +1 -2
- package/dist/types/getDictionary.d.ts.map +1 -1
- package/dist/types/getDictionaryDynamic.d.ts +1 -2
- package/dist/types/getDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/middleware.d.ts +0 -2
- package/dist/types/middleware.d.ts.map +1 -1
- package/dist/types/navigation/Link.d.ts +0 -2
- package/dist/types/navigation/Link.d.ts.map +1 -1
- package/dist/types/navigation/createNavigation.d.ts +0 -2
- package/dist/types/navigation/createNavigation.d.ts.map +1 -1
- package/dist/types/navigation/hooks.d.ts +1 -2
- package/dist/types/navigation/hooks.d.ts.map +1 -1
- package/dist/types/navigation/index.d.ts +2 -2
- package/dist/types/navigation/localizeHref.d.ts +0 -2
- package/dist/types/navigation/localizeHref.d.ts.map +1 -1
- package/dist/types/plugin/index.d.ts +0 -2
- package/dist/types/plugin/index.d.ts.map +1 -1
- package/dist/types/routing.d.ts +0 -2
- package/dist/types/routing.d.ts.map +1 -1
- package/dist/types/server/getLocale.d.ts +0 -2
- package/dist/types/server/getLocale.d.ts.map +1 -1
- package/dist/types/server/getMessages.d.ts +0 -2
- package/dist/types/server/getMessages.d.ts.map +1 -1
- package/dist/types/server/getRequestConfig.d.ts +0 -2
- package/dist/types/server/getRequestConfig.d.ts.map +1 -1
- package/dist/types/server/getTranslations.d.ts +1 -2
- package/dist/types/server/getTranslations.d.ts.map +1 -1
- package/dist/types/server/helpers.d.ts +0 -2
- package/dist/types/server/helpers.d.ts.map +1 -1
- package/dist/types/server/react/helpers.d.ts +0 -2
- package/dist/types/server/react/helpers.d.ts.map +1 -1
- package/dist/types/server/react/resolveLocale.d.ts +0 -2
- package/dist/types/server/react/resolveLocale.d.ts.map +1 -1
- package/dist/types/server/react/useDictionary.d.ts +1 -2
- package/dist/types/server/react/useDictionary.d.ts.map +1 -1
- package/dist/types/server/react/useDictionaryDynamic.d.ts +1 -2
- package/dist/types/server/react/useDictionaryDynamic.d.ts.map +1 -1
- package/dist/types/server/react/useLocale.d.ts +0 -2
- package/dist/types/server/react/useLocale.d.ts.map +1 -1
- package/dist/types/server/react/useTranslations.d.ts +1 -2
- package/dist/types/server/react/useTranslations.d.ts.map +1 -1
- package/dist/types/server/requestLocaleCache.d.ts +0 -2
- package/dist/types/server/requestLocaleCache.d.ts.map +1 -1
- package/dist/types/server/setLocale.d.ts +0 -2
- package/dist/types/server/setLocale.d.ts.map +1 -1
- package/dist/types/server/setRequestLocale.d.ts +0 -2
- package/dist/types/server/setRequestLocale.d.ts.map +1 -1
- package/package.json +51 -51
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getLocale } from "./getLocale.mjs";
|
|
2
2
|
import { createFormatter } from "@intlayer/use-intl";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/server/helpers.ts
|
|
5
5
|
/**
|
|
6
6
|
* Drop-in for next-intl's server `getFormatter()`.
|
|
7
7
|
* Returns locale-aware formatters backed by the native `Intl.*` APIs,
|
|
@@ -22,6 +22,5 @@ const getNow = (async () => /* @__PURE__ */ new Date());
|
|
|
22
22
|
*/
|
|
23
23
|
const getTimeZone = (async () => Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
24
24
|
|
|
25
|
-
//#endregion
|
|
26
25
|
export { getFormatter, getNow, getTimeZone };
|
|
27
26
|
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { getLocale } from "./getLocale.mjs";
|
|
2
1
|
import { getDictionary } from "../getDictionary.mjs";
|
|
3
2
|
import { getDictionaryDynamic } from "../getDictionaryDynamic.mjs";
|
|
4
|
-
import {
|
|
5
|
-
import { getTranslations } from "./getTranslations.mjs";
|
|
3
|
+
import { getLocale } from "./getLocale.mjs";
|
|
6
4
|
import { getMessages } from "./getMessages.mjs";
|
|
7
5
|
import getRequestConfig from "./getRequestConfig.mjs";
|
|
6
|
+
import { getTranslations } from "./getTranslations.mjs";
|
|
7
|
+
import { getFormatter, getNow, getTimeZone } from "./helpers.mjs";
|
|
8
8
|
import { setLocale } from "./setLocale.mjs";
|
|
9
9
|
import { setRequestLocale } from "./setRequestLocale.mjs";
|
|
10
10
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useLocale } from "./useLocale.mjs";
|
|
2
2
|
import { createFormatter } from "@intlayer/use-intl";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/server/react/helpers.ts
|
|
5
5
|
/**
|
|
6
6
|
* Server counterparts of use-intl's ambient hooks. They mirror the client
|
|
7
7
|
* versions' signatures so the same component code type-checks on both sides.
|
|
@@ -15,6 +15,5 @@ const useNow = (() => /* @__PURE__ */ new Date());
|
|
|
15
15
|
*/
|
|
16
16
|
const useTimeZone = (() => Intl.DateTimeFormat().resolvedOptions().timeZone);
|
|
17
17
|
|
|
18
|
-
//#endregion
|
|
19
18
|
export { useFormatter, useNow, useTimeZone };
|
|
20
19
|
//# sourceMappingURL=helpers.mjs.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineRouting } from "../../routing.mjs";
|
|
2
1
|
import { NextIntlClientProvider } from "../../client/NextIntlClientProvider.mjs";
|
|
3
|
-
import {
|
|
2
|
+
import { defineRouting } from "../../routing.mjs";
|
|
4
3
|
import { useFormatter, useNow, useTimeZone } from "./helpers.mjs";
|
|
5
|
-
import { useDictionaryDynamic } from "./useDictionaryDynamic.mjs";
|
|
6
4
|
import { useDictionary } from "./useDictionary.mjs";
|
|
5
|
+
import { useDictionaryDynamic } from "./useDictionaryDynamic.mjs";
|
|
6
|
+
import { useLocale } from "./useLocale.mjs";
|
|
7
7
|
import { useTranslations } from "./useTranslations.mjs";
|
|
8
8
|
import { IntlError, IntlErrorCode, createFormatter, createTranslator, hasLocale, initializeConfig, useMessages } from "@intlayer/use-intl";
|
|
9
9
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { getCachedRequestLocale } from "../requestLocaleCache.mjs";
|
|
2
2
|
import { useLocale } from "next-intlayer/server";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/server/react/resolveLocale.ts
|
|
5
5
|
/**
|
|
6
6
|
* Locale for the synchronous server hooks, resolved the way `getLocale()`
|
|
7
7
|
* resolves it — so server-rendered output and the client provider never
|
|
@@ -21,6 +21,5 @@ const resolveServerLocale = () => {
|
|
|
21
21
|
return useLocale().locale;
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
//#endregion
|
|
25
24
|
export { resolveServerLocale };
|
|
26
25
|
//# sourceMappingURL=resolveLocale.mjs.map
|
|
@@ -2,7 +2,7 @@ import { resolveServerLocale } from "./resolveLocale.mjs";
|
|
|
2
2
|
import { createDictionaryTranslator } from "@intlayer/use-intl";
|
|
3
3
|
import { useDictionary as useDictionary$1 } from "next-intlayer/server";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/server/react/useDictionary.ts
|
|
6
6
|
/**
|
|
7
7
|
* Server counterpart of `@intlayer/use-intl`'s `useDictionary`.
|
|
8
8
|
*
|
|
@@ -17,6 +17,5 @@ const useDictionary = ((dictionary, namespacePrefix) => {
|
|
|
17
17
|
return createDictionaryTranslator(locale, content, namespacePrefix);
|
|
18
18
|
});
|
|
19
19
|
|
|
20
|
-
//#endregion
|
|
21
20
|
export { useDictionary };
|
|
22
21
|
//# sourceMappingURL=useDictionary.mjs.map
|
|
@@ -2,7 +2,7 @@ import { resolveServerLocale } from "./resolveLocale.mjs";
|
|
|
2
2
|
import { createDictionaryTranslator } from "@intlayer/use-intl";
|
|
3
3
|
import { useDictionaryDynamic as useDictionaryDynamic$1 } from "next-intlayer/server";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/server/react/useDictionaryDynamic.ts
|
|
6
6
|
/**
|
|
7
7
|
* Server counterpart of `useDictionaryDynamic`, emitted by the optimize pass
|
|
8
8
|
* for dictionaries on the per-locale loader.
|
|
@@ -13,6 +13,5 @@ const useDictionaryDynamic = ((dictionaryPromise, key, namespacePrefix) => {
|
|
|
13
13
|
return createDictionaryTranslator(locale, content, namespacePrefix);
|
|
14
14
|
});
|
|
15
15
|
|
|
16
|
-
//#endregion
|
|
17
16
|
export { useDictionaryDynamic };
|
|
18
17
|
//# sourceMappingURL=useDictionaryDynamic.mjs.map
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { resolveServerLocale } from "./resolveLocale.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/server/react/useLocale.ts
|
|
4
4
|
/**
|
|
5
5
|
* Server counterpart of `useLocale`, resolved from the `[locale]` route segment
|
|
6
6
|
* forwarded through `setRequestLocale` when the app provides one.
|
|
7
7
|
*/
|
|
8
8
|
const useLocale = () => resolveServerLocale();
|
|
9
9
|
|
|
10
|
-
//#endregion
|
|
11
10
|
export { useLocale };
|
|
12
11
|
//# sourceMappingURL=useLocale.mjs.map
|
|
@@ -2,7 +2,7 @@ import { resolveServerLocale } from "./resolveLocale.mjs";
|
|
|
2
2
|
import { createDictionaryTranslator } from "@intlayer/use-intl";
|
|
3
3
|
import { getIntlayer } from "@intlayer/core/interpreter";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/server/react/useTranslations.ts
|
|
6
6
|
/** Splits `'about.counter'` into the dictionary key and its key prefix. */
|
|
7
7
|
const splitNamespace = (namespace) => {
|
|
8
8
|
const dotPosition = namespace.indexOf(".");
|
|
@@ -36,6 +36,5 @@ const useTranslations = ((namespace) => {
|
|
|
36
36
|
return createDictionaryTranslator(locale, content, keyPrefix);
|
|
37
37
|
});
|
|
38
38
|
|
|
39
|
-
//#endregion
|
|
40
39
|
export { useTranslations };
|
|
41
40
|
//# sourceMappingURL=useTranslations.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { cache } from "react";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/server/requestLocaleCache.ts
|
|
4
4
|
/**
|
|
5
5
|
* Request-scoped holder for the locale provided through {@link setRequestLocale}.
|
|
6
6
|
*
|
|
@@ -28,6 +28,5 @@ const setCachedRequestLocale = (locale) => {
|
|
|
28
28
|
getRequestLocaleHolder().locale = locale;
|
|
29
29
|
};
|
|
30
30
|
|
|
31
|
-
//#endregion
|
|
32
31
|
export { getCachedRequestLocale, setCachedRequestLocale };
|
|
33
32
|
//# sourceMappingURL=requestLocaleCache.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { setLocaleInStorageServer } from "@intlayer/core/utils";
|
|
2
2
|
import { cookies } from "next/headers.js";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/server/setLocale.ts
|
|
5
5
|
/**
|
|
6
6
|
* Drop-in replacement for next-intl's `setLocale()` server action.
|
|
7
7
|
*
|
|
@@ -31,6 +31,5 @@ const setLocale = async (locale) => {
|
|
|
31
31
|
} });
|
|
32
32
|
};
|
|
33
33
|
|
|
34
|
-
//#endregion
|
|
35
34
|
export { setLocale };
|
|
36
35
|
//# sourceMappingURL=setLocale.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { setCachedRequestLocale } from "./requestLocaleCache.mjs";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
// src/server/setRequestLocale.ts
|
|
4
4
|
/**
|
|
5
5
|
* Drop-in for next-intl's `setRequestLocale`.
|
|
6
6
|
*
|
|
@@ -27,6 +27,5 @@ const setRequestLocale = (locale) => {
|
|
|
27
27
|
setCachedRequestLocale(locale);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
//#endregion
|
|
31
30
|
export { setRequestLocale };
|
|
32
31
|
//# sourceMappingURL=setRequestLocale.mjs.map
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
2
|
import { NextIntlClientProvider as NextIntlClientProvider$1 } from "next-intl";
|
|
3
3
|
import { ComponentProps } from "react";
|
|
4
|
-
//#region src/client/NextIntlClientProvider.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Drop-in for next-intl's `NextIntlClientProvider`.
|
|
7
6
|
* `messages`, `timeZone`, and `now` are accepted for API compatibility
|
|
@@ -22,5 +21,4 @@ export type NextIntlClientProviderProps = Omit<ComponentProps<typeof NextIntlCli
|
|
|
22
21
|
*/
|
|
23
22
|
locale: LocalesValues;
|
|
24
23
|
};
|
|
25
|
-
//#endregion
|
|
26
24
|
//# sourceMappingURL=NextIntlClientProvider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NextIntlClientProvider.d.ts","names":[],"sources":["../../../src/client/NextIntlClientProvider.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"NextIntlClientProvider.d.ts","names":["_NextIntlClientProvider"],"sources":["../../../src/client/NextIntlClientProvider.tsx"],"mappings":";;;;;;;;qBAiBa,+BAA+BA;;;;YAsDhC,8BAA8B,KACxC,sBAAsBA;;;;;EAOtB;;;;EAIA,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":["_useLocale"],"sources":["../../../src/client/useLocale.ts"],"mappings":";;;;qBAQa,kBAAkBA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DictionaryKeys, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
2
|
import { ScopedTranslateFunction, TranslateFunction } from "@intlayer/use-intl";
|
|
3
3
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
|
-
//#region src/getDictionary.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Overload set for {@link getDictionary}: a string rest argument is the
|
|
7
6
|
* key-prefix remainder of a nested namespace (relative dot-paths under the
|
|
@@ -30,5 +29,5 @@ type GetDictionary = {
|
|
|
30
29
|
* replacement.
|
|
31
30
|
*/
|
|
32
31
|
export declare const getDictionary: GetDictionary;
|
|
33
|
-
|
|
32
|
+
export {};
|
|
34
33
|
//# sourceMappingURL=getDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../src/getDictionary.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getDictionary.d.ts","names":[],"sources":["../../src/getDictionary.ts"],"mappings":";;;;;;;;;KAkCK;GACF,UAAU,YAAY,uBACrB,YAAY,GACZ,iBAAiB,SAChB,QAAQ,wBAAwB,WAAW,gBAAgB;GAC7D,UAAU,YACT,YAAY,GACZ;IAAY,SAAS;MACpB,QAAQ,kBAAkB,WAAW;;;;;;;;;;;;;;;;;qBAkB7B,eASP"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DictionaryKeys, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
2
2
|
import { ScopedTranslateFunction, TranslateFunction } from "@intlayer/use-intl";
|
|
3
3
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
|
-
//#region src/getDictionaryDynamic.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Overload set for {@link getDictionaryDynamic}: without a prefix the
|
|
7
6
|
* translator is typed against the dictionary's dot-paths; with a prefix the
|
|
@@ -18,5 +17,5 @@ type GetDictionaryDynamic = {
|
|
|
18
17
|
* locale. Used internally by the build-time optimization.
|
|
19
18
|
*/
|
|
20
19
|
export declare const getDictionaryDynamic: GetDictionaryDynamic;
|
|
21
|
-
|
|
20
|
+
export {};
|
|
22
21
|
//# sourceMappingURL=getDictionaryDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getDictionaryDynamic.d.ts","names":[],"sources":["../../src/getDictionaryDynamic.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getDictionaryDynamic.d.ts","names":[],"sources":["../../src/getDictionaryDynamic.ts"],"mappings":";;;;;;;;KAmBK;GACF,UAAU,YAAY,UAAU,gBAC/B,mBAAmB,0BAA0B,QAAQ,KACrD,KAAK,IACJ,QAAQ,kBAAkB;GAC5B,UAAU,YAAY,UAAU,gBAAgB,uBAC/C,mBAAmB,0BAA0B,QAAQ,KACrD,KAAK,GACL,iBAAiB,SAChB,QAAQ,wBAAwB,GAAG;;;;;;;;qBAS3B,sBAYP"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { IntlProvider, useDictionary, useDictionaryDynamic, useExtracted, useFormatter, useMessages, useNow, useTimeZone, useTranslations } from "./client/index.js";
|
|
1
2
|
import { NextIntlClientProvider, NextIntlClientProviderProps } from "./client/NextIntlClientProvider.js";
|
|
2
3
|
import { useLocale } from "./client/useLocale.js";
|
|
3
|
-
import { IntlProvider, useDictionary, useDictionaryDynamic, useExtracted, useFormatter, useMessages, useNow, useTimeZone, useTranslations } from "./client/index.js";
|
|
4
4
|
import { Routing, defineRouting } from "./routing.js";
|
|
5
5
|
import { IntlError, IntlErrorCode, createFormatter, createTranslator, hasLocale, initializeConfig } from "@intlayer/use-intl";
|
|
6
6
|
export { IntlError, IntlErrorCode, IntlProvider, NextIntlClientProvider, type NextIntlClientProviderProps, type Routing, createFormatter, createTranslator, defineRouting, hasLocale, initializeConfig, useDictionary, useDictionaryDynamic, useExtracted, useFormatter, useLocale, useMessages, useNow, useTimeZone, useTranslations };
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import _createMiddleware from "next-intl/middleware";
|
|
2
|
-
//#region src/middleware.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Drop-in replacement for next-intl's `createMiddleware`.
|
|
5
4
|
*
|
|
@@ -16,6 +15,5 @@ import _createMiddleware from "next-intl/middleware";
|
|
|
16
15
|
* ```
|
|
17
16
|
*/
|
|
18
17
|
export declare const createMiddleware: typeof _createMiddleware;
|
|
19
|
-
//#endregion
|
|
20
18
|
export { createMiddleware as default };
|
|
21
19
|
//# sourceMappingURL=middleware.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"middleware.d.ts","names":[],"sources":["../../src/middleware.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"middleware.d.ts","names":[],"sources":["../../src/middleware.ts"],"mappings":";;;;;;;;;;;;;;;;qBAmBa,yBAAyB"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { NextIntlHref } from "./localizeHref.js";
|
|
2
2
|
import { ComponentPropsWithoutRef } from "react";
|
|
3
3
|
import NextLink from "next/link";
|
|
4
|
-
//#region src/navigation/Link.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Props for the compat `Link`: identical to `next/link` except `href` accepts a
|
|
7
6
|
* `next-intl` href and an optional `locale` overrides the current one.
|
|
@@ -21,5 +20,4 @@ export declare const Link: import("react").ForwardRefExoticComponent<Omit<Omit<O
|
|
|
21
20
|
href: NextIntlHref;
|
|
22
21
|
locale?: string;
|
|
23
22
|
} & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
24
|
-
//#endregion
|
|
25
23
|
//# sourceMappingURL=Link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.d.ts","names":[],"sources":["../../../src/navigation/Link.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Link.d.ts","names":[],"sources":["../../../src/navigation/Link.tsx"],"mappings":";;;;;;;YAWY,YAAY,KACtB,gCAAgC;EAGhC,MAAM;EACN;;;;;;;qBAQW,sBAAI,0BAAA,KAAA,KAAA,qBAAA,qBAAA,8CAAA,sCAAA;;;EATT,MAAA;EACG;oBAiBV,cAAA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createNavigation as createNavigation$1 } from "next-intl/navigation";
|
|
2
|
-
//#region src/navigation/createNavigation.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Drop-in replacement for next-intl's `createNavigation`.
|
|
5
4
|
*
|
|
@@ -15,6 +14,5 @@ import { createNavigation as createNavigation$1 } from "next-intl/navigation";
|
|
|
15
14
|
* ```
|
|
16
15
|
*/
|
|
17
16
|
export declare const createNavigation: typeof createNavigation$1;
|
|
18
|
-
//#endregion
|
|
19
17
|
export { createNavigation as default };
|
|
20
18
|
//# sourceMappingURL=createNavigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createNavigation.d.ts","names":[],"sources":["../../../src/navigation/createNavigation.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"createNavigation.d.ts","names":["_createNavigation"],"sources":["../../../src/navigation/createNavigation.ts"],"mappings":";;;;;;;;;;;;;;;qBA6Ba,yBAAyBA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NextIntlHref } from "./localizeHref.js";
|
|
2
|
-
//#region src/navigation/hooks.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Options accepted by the locale-aware router methods: the standard Next.js
|
|
5
4
|
* navigate options plus an optional target `locale`.
|
|
@@ -27,5 +26,5 @@ export declare const useRouter: () => {
|
|
|
27
26
|
replace: (href: NextIntlHref, options?: NavigateOptions) => void;
|
|
28
27
|
prefetch: (href: NextIntlHref, options?: NavigateOptions) => void;
|
|
29
28
|
};
|
|
30
|
-
|
|
29
|
+
export {};
|
|
31
30
|
//# sourceMappingURL=hooks.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.d.ts","names":[],"sources":["../../../src/navigation/hooks.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.d.ts","names":[],"sources":["../../../src/navigation/hooks.ts"],"mappings":";;;;;KAaK;EAAoB;IAAoB;;;;;qBAMhC;;;;;;qBAeA;;;;;;EASI,OAAA,MAAA,cAAY,UAAY;EAKrB,UAAA,MAAA,cAAY,UAAY;EAKvB,WAAA,MAAA,cAAY,UAAY"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NextIntlHref } from "./localizeHref.js";
|
|
2
|
-
import { Link, LinkProps } from "./Link.js";
|
|
3
1
|
import { createNavigation } from "./createNavigation.js";
|
|
4
2
|
import { usePathname, useRouter } from "./hooks.js";
|
|
3
|
+
import { Link, LinkProps } from "./Link.js";
|
|
4
|
+
import { NextIntlHref } from "./localizeHref.js";
|
|
5
5
|
export { Link, type LinkProps, type NextIntlHref, createNavigation, createNavigation as default, usePathname, useRouter };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/navigation/localizeHref.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* A `next-intl` navigation href: either a pathname string or an object with a
|
|
4
3
|
* `pathname` and optional `query`. The `pathnames` (typed routes) feature is
|
|
@@ -18,5 +17,4 @@ export type NextIntlHref = string | {
|
|
|
18
17
|
* @returns The localized URL string.
|
|
19
18
|
*/
|
|
20
19
|
export declare const localizeHref: (href: NextIntlHref, locale: string) => string;
|
|
21
|
-
//#endregion
|
|
22
20
|
//# sourceMappingURL=localizeHref.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"localizeHref.d.ts","names":[],"sources":["../../../src/navigation/localizeHref.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"localizeHref.d.ts","names":[],"sources":["../../../src/navigation/localizeHref.ts"],"mappings":";;;;;YAQY;EAGN;EACA,QAAQ;EACR,SAAS;;;;;;;;;;qBAWF,eAAY,MAAU,cAAY"}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { NextConfig } from "next";
|
|
2
|
-
//#region src/plugin/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* A Next.js plugin for next-intl compat that wraps next-intlayer's plugin
|
|
5
4
|
* and configures resolve aliases so `next-intl` imports are served by
|
|
6
5
|
* `@intlayer/next-intl`.
|
|
7
6
|
*/
|
|
8
7
|
export declare const createNextIntlPlugin: (_i18nPath?: string) => (nextConfig?: NextConfig) => Promise<NextConfig>;
|
|
9
|
-
//#endregion
|
|
10
8
|
export { createNextIntlPlugin as default };
|
|
11
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/plugin/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/plugin/index.ts"],"mappings":";;;;;;qBA0Ia,uBAAoB,wBAAsB,aAC3B,eAAkB,QAAQ"}
|
package/dist/types/routing.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
-
//#region src/routing.d.ts
|
|
3
2
|
export type Routing = {
|
|
4
3
|
locales: LocalesValues[];
|
|
5
4
|
defaultLocale: LocalesValues;
|
|
@@ -22,5 +21,4 @@ export type Routing = {
|
|
|
22
21
|
* ```
|
|
23
22
|
*/
|
|
24
23
|
export declare const defineRouting: (config?: Partial<Routing>) => Routing;
|
|
25
|
-
//#endregion
|
|
26
24
|
//# sourceMappingURL=routing.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.d.ts","names":[],"sources":["../../src/routing.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"routing.d.ts","names":[],"sources":["../../src/routing.ts"],"mappings":";YAGY;EACV,SAAS;EACT,eAAe;EACf;EACA,YAAY,wBAAwB;;;;;;;;;;;;;;;;;qBAkBzB,gBAAgB,SAAS,QAAQ,aAAa"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getLocale as getLocale$1 } from "next-intl/server";
|
|
2
|
-
//#region src/server/getLocale.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Drop-in for next-intl's `getLocale()` server function.
|
|
5
4
|
*
|
|
@@ -13,5 +12,4 @@ import { getLocale as getLocale$1 } from "next-intl/server";
|
|
|
13
12
|
* for apps that drive the locale from storage rather than the route.
|
|
14
13
|
*/
|
|
15
14
|
export declare const getLocale: typeof getLocale$1;
|
|
16
|
-
//#endregion
|
|
17
15
|
//# sourceMappingURL=getLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getLocale.d.ts","names":[],"sources":["../../../src/server/getLocale.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getLocale.d.ts","names":["_getLocale"],"sources":["../../../src/server/getLocale.ts"],"mappings":";;;;;;;;;;;;;qBAgBa,kBAAkBA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getMessages as getMessages$1 } from "next-intl/server";
|
|
2
|
-
//#region src/server/getMessages.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Drop-in replacement for next-intl's `getMessages()` server function.
|
|
5
4
|
*
|
|
@@ -16,5 +15,4 @@ import { getMessages as getMessages$1 } from "next-intl/server";
|
|
|
16
15
|
* Messages are loaded automatically under the hood
|
|
17
16
|
*/
|
|
18
17
|
export declare const getMessages: typeof getMessages$1;
|
|
19
|
-
//#endregion
|
|
20
18
|
//# sourceMappingURL=getMessages.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getMessages.d.ts","names":[],"sources":["../../../src/server/getMessages.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getMessages.d.ts","names":["_getMessages"],"sources":["../../../src/server/getMessages.ts"],"mappings":";;;;;;;;;;;;;;;;qBAoBa,oBAAoBA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getRequestConfig as getRequestConfig$1 } from "next-intl/server";
|
|
2
|
-
//#region src/server/getRequestConfig.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Drop-in for next-intl's `getRequestConfig`.
|
|
5
4
|
*
|
|
@@ -13,6 +12,5 @@ import { getRequestConfig as getRequestConfig$1 } from "next-intl/server";
|
|
|
13
12
|
* messages are resolved automatically; the file can be removed.
|
|
14
13
|
*/
|
|
15
14
|
export declare const getRequestConfig: typeof getRequestConfig$1;
|
|
16
|
-
//#endregion
|
|
17
15
|
export { getRequestConfig as default };
|
|
18
16
|
//# sourceMappingURL=getRequestConfig.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getRequestConfig.d.ts","names":[],"sources":["../../../src/server/getRequestConfig.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getRequestConfig.d.ts","names":["_getRequestConfig"],"sources":["../../../src/server/getRequestConfig.ts"],"mappings":";;;;;;;;;;;;;qBAiBa,yBAAyBA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DictionaryKeys, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
2
|
import { LooseTranslateFunction, TranslateFunction, TranslateFunctionForNamespace } from "@intlayer/use-intl";
|
|
3
|
-
//#region src/server/getTranslations.d.ts
|
|
4
3
|
/**
|
|
5
4
|
* Options accepted by the options-object overload of {@link getTranslations}.
|
|
6
5
|
*/
|
|
@@ -60,5 +59,5 @@ type GetTranslations = {
|
|
|
60
59
|
* ```
|
|
61
60
|
*/
|
|
62
61
|
export declare const getTranslations: GetTranslations;
|
|
63
|
-
|
|
62
|
+
export {};
|
|
64
63
|
//# sourceMappingURL=getTranslations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getTranslations.d.ts","names":[],"sources":["../../../src/server/getTranslations.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"getTranslations.d.ts","names":[],"sources":["../../../src/server/getTranslations.ts"],"mappings":";;;;;KAeK,uBAAuB,UAAU;;EAEpC,YAAY;;EAEZ,SAAS;;;;;;;;;;;;;;;;;KAkBN;GACF,UAAU,gBAAgB,WAAW,IAAI,QAAQ,kBAAkB;GACnE,UAAU,gBACT,SAAS,uBAAuB,KAC/B,QAAQ,kBAAkB;GAC5B,iCACC,WAAW,IACV,QAAQ,8BAA8B;MACrC,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qBA+BD,iBAAiB"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { getFormatter as getFormatter$1, getNow as getNow$1, getTimeZone as getTimeZone$1 } from "next-intl/server";
|
|
2
|
-
//#region src/server/helpers.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Drop-in for next-intl's server `getFormatter()`.
|
|
5
4
|
* Returns locale-aware formatters backed by the native `Intl.*` APIs,
|
|
@@ -16,5 +15,4 @@ export declare const getNow: typeof getNow$1;
|
|
|
16
15
|
* Returns the system time zone resolved from `Intl.DateTimeFormat`.
|
|
17
16
|
*/
|
|
18
17
|
export declare const getTimeZone: typeof getTimeZone$1;
|
|
19
|
-
//#endregion
|
|
20
18
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","names":[],"sources":["../../../src/server/helpers.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","names":["_getFormatter","_getNow","_getTimeZone"],"sources":["../../../src/server/helpers.ts"],"mappings":";;;;;;qBAaa,qBAAqBA;;;;;qBAWrB,eAAeC;;;;;qBAOf,oBAAoBC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/server/react/helpers.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Server counterparts of use-intl's ambient hooks. They mirror the client
|
|
4
3
|
* versions' signatures so the same component code type-checks on both sides.
|
|
@@ -11,5 +10,4 @@ export declare const useNow: typeof import('@intlayer/use-intl').useNow;
|
|
|
11
10
|
* `getTimeZone()` reports, so both server surfaces agree.
|
|
12
11
|
*/
|
|
13
12
|
export declare const useTimeZone: typeof import('@intlayer/use-intl').useTimeZone;
|
|
14
|
-
//#endregion
|
|
15
13
|
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","names":[],"sources":["../../../../src/server/react/helpers.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","names":[],"sources":["../../../../src/server/react/helpers.ts"],"mappings":";;;;qBAOa,kDAAkD;;qBAIlD,4CAA4C;;;;;qBAO5C,iDAAiD"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
|
-
//#region src/server/react/resolveLocale.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Locale for the synchronous server hooks, resolved the way `getLocale()`
|
|
5
4
|
* resolves it — so server-rendered output and the client provider never
|
|
@@ -14,5 +13,4 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
|
14
13
|
* package's own benchmark app from 14 prerendered pages to 0.
|
|
15
14
|
*/
|
|
16
15
|
export declare const resolveServerLocale: () => LocalesValues;
|
|
17
|
-
//#endregion
|
|
18
16
|
//# sourceMappingURL=resolveLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveLocale.d.ts","names":[],"sources":["../../../../src/server/react/resolveLocale.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"resolveLocale.d.ts","names":[],"sources":["../../../../src/server/react/resolveLocale.ts"],"mappings":";;;;;;;;;;;;;;qBAsBa,2BAA0B"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DictionaryKeys } from "@intlayer/types/module_augmentation";
|
|
2
2
|
import { ScopedTranslateFunction, TranslateFunction } from "@intlayer/use-intl";
|
|
3
3
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
|
-
//#region src/server/react/useDictionary.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* Overload set mirroring the client `useDictionary` exactly, so the optimize
|
|
7
6
|
* pass can emit the same call shape whichever side of the boundary the
|
|
@@ -20,5 +19,5 @@ type UseDictionary = {
|
|
|
20
19
|
* server renders the text and only the rendered output crosses the boundary.
|
|
21
20
|
*/
|
|
22
21
|
export declare const useDictionary: UseDictionary;
|
|
23
|
-
|
|
22
|
+
export {};
|
|
24
23
|
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../../src/server/react/useDictionary.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../../../src/server/react/useDictionary.ts"],"mappings":";;;;;;;;KAeK;GACF,UAAU,YACT,YAAY,IACX,kBAAkB,WAAW;GAC/B,UAAU,YAAY,uBACrB,YAAY,GACZ,iBAAiB,SAChB,wBAAwB,WAAW,gBAAgB;;;;;;;;;;qBAW3C,eAQP"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { DictionaryKeys } from "@intlayer/types/module_augmentation";
|
|
2
2
|
import { ScopedTranslateFunction, TranslateFunction } from "@intlayer/use-intl";
|
|
3
3
|
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
|
-
//#region src/server/react/useDictionaryDynamic.d.ts
|
|
5
4
|
type UseDictionaryDynamic = {
|
|
6
5
|
<T extends Dictionary, K extends DictionaryKeys>(dictionaryPromise: Record<string, () => Promise<T>>, key: K): TranslateFunction<K>;
|
|
7
6
|
<T extends Dictionary, K extends DictionaryKeys, Prefix extends string>(dictionaryPromise: Record<string, () => Promise<T>>, key: K, namespacePrefix: Prefix): ScopedTranslateFunction<K, Prefix>;
|
|
@@ -11,5 +10,5 @@ type UseDictionaryDynamic = {
|
|
|
11
10
|
* for dictionaries on the per-locale loader.
|
|
12
11
|
*/
|
|
13
12
|
export declare const useDictionaryDynamic: UseDictionaryDynamic;
|
|
14
|
-
|
|
13
|
+
export {};
|
|
15
14
|
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../../src/server/react/useDictionaryDynamic.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../../../src/server/react/useDictionaryDynamic.ts"],"mappings":";;;KAUK;GACF,UAAU,YAAY,UAAU,gBAC/B,mBAAmB,qBAAqB,QAAQ,KAChD,KAAK,IACJ,kBAAkB;GACpB,UAAU,YAAY,UAAU,gBAAgB,uBAC/C,mBAAmB,qBAAqB,QAAQ,KAChD,KAAK,GACL,iBAAiB,SAChB,wBAAwB,GAAG;;;;;;qBAOnB,sBAaP"}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { useLocale as useLocale$1 } from "next-intl";
|
|
2
|
-
//#region src/server/react/useLocale.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Server counterpart of `useLocale`, resolved from the `[locale]` route segment
|
|
5
4
|
* forwarded through `setRequestLocale` when the app provides one.
|
|
6
5
|
*/
|
|
7
6
|
export declare const useLocale: typeof useLocale$1;
|
|
8
|
-
//#endregion
|
|
9
7
|
//# sourceMappingURL=useLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../../src/server/react/useLocale.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":["_useLocale"],"sources":["../../../../src/server/react/useLocale.ts"],"mappings":";;;;;qBAOa,kBAAkBA"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DictionaryKeys } from "@intlayer/types/module_augmentation";
|
|
2
2
|
import { LooseTranslateFunction, TranslateFunction, TranslateFunctionForNamespace } from "@intlayer/use-intl";
|
|
3
|
-
//#region src/server/react/useTranslations.d.ts
|
|
4
3
|
type UseTranslations = {
|
|
5
4
|
<N extends DictionaryKeys>(namespace: N): TranslateFunction<N>;
|
|
6
5
|
<N extends `${string}.${string}`>(namespace: N): TranslateFunctionForNamespace<N>;
|
|
@@ -19,5 +18,5 @@ type UseTranslations = {
|
|
|
19
18
|
* statically (a dynamic namespace, or an unoptimized build).
|
|
20
19
|
*/
|
|
21
20
|
export declare const useTranslations: UseTranslations;
|
|
22
|
-
|
|
21
|
+
export {};
|
|
23
22
|
//# sourceMappingURL=useTranslations.d.ts.map
|