@intlayer/next-intl 9.7.0 → 9.7.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.
Files changed (112) hide show
  1. package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -2
  2. package/dist/cjs/client/NextIntlClientProvider.cjs +2 -3
  3. package/dist/cjs/client/index.cjs +11 -11
  4. package/dist/cjs/client/useLocale.cjs +1 -2
  5. package/dist/cjs/getDictionary.cjs +2 -3
  6. package/dist/cjs/getDictionaryDynamic.cjs +2 -3
  7. package/dist/cjs/index.cjs +18 -18
  8. package/dist/cjs/middleware.cjs +1 -2
  9. package/dist/cjs/navigation/Link.cjs +4 -5
  10. package/dist/cjs/navigation/createNavigation.cjs +4 -5
  11. package/dist/cjs/navigation/hooks.cjs +3 -4
  12. package/dist/cjs/navigation/index.cjs +3 -3
  13. package/dist/cjs/navigation/localizeHref.cjs +1 -2
  14. package/dist/cjs/plugin/index.cjs +3 -4
  15. package/dist/cjs/routing.cjs +1 -2
  16. package/dist/cjs/server/getLocale.cjs +2 -3
  17. package/dist/cjs/server/getMessages.cjs +1 -2
  18. package/dist/cjs/server/getRequestConfig.cjs +1 -2
  19. package/dist/cjs/server/getTranslations.cjs +2 -3
  20. package/dist/cjs/server/helpers.cjs +2 -3
  21. package/dist/cjs/server/index.cjs +9 -9
  22. package/dist/cjs/server/react/helpers.cjs +2 -3
  23. package/dist/cjs/server/react/index.cjs +14 -14
  24. package/dist/cjs/server/react/resolveLocale.cjs +2 -3
  25. package/dist/cjs/server/react/useDictionary.cjs +2 -3
  26. package/dist/cjs/server/react/useDictionaryDynamic.cjs +2 -3
  27. package/dist/cjs/server/react/useLocale.cjs +2 -3
  28. package/dist/cjs/server/react/useTranslations.cjs +2 -3
  29. package/dist/cjs/server/requestLocaleCache.cjs +1 -2
  30. package/dist/cjs/server/setLocale.cjs +1 -2
  31. package/dist/cjs/server/setRequestLocale.cjs +2 -3
  32. package/dist/esm/client/NextIntlClientProvider.mjs +2 -3
  33. package/dist/esm/client/useLocale.mjs +1 -2
  34. package/dist/esm/getDictionary.mjs +1 -2
  35. package/dist/esm/getDictionaryDynamic.mjs +1 -2
  36. package/dist/esm/index.mjs +1 -1
  37. package/dist/esm/middleware.mjs +1 -2
  38. package/dist/esm/navigation/Link.mjs +2 -3
  39. package/dist/esm/navigation/createNavigation.mjs +3 -4
  40. package/dist/esm/navigation/hooks.mjs +2 -3
  41. package/dist/esm/navigation/index.mjs +2 -2
  42. package/dist/esm/navigation/localizeHref.mjs +1 -2
  43. package/dist/esm/plugin/index.mjs +2 -3
  44. package/dist/esm/routing.mjs +1 -2
  45. package/dist/esm/server/getLocale.mjs +1 -2
  46. package/dist/esm/server/getMessages.mjs +1 -2
  47. package/dist/esm/server/getRequestConfig.mjs +1 -2
  48. package/dist/esm/server/getTranslations.mjs +1 -2
  49. package/dist/esm/server/helpers.mjs +1 -2
  50. package/dist/esm/server/index.mjs +3 -3
  51. package/dist/esm/server/react/helpers.mjs +1 -2
  52. package/dist/esm/server/react/index.mjs +3 -3
  53. package/dist/esm/server/react/resolveLocale.mjs +1 -2
  54. package/dist/esm/server/react/useDictionary.mjs +1 -2
  55. package/dist/esm/server/react/useDictionaryDynamic.mjs +1 -2
  56. package/dist/esm/server/react/useLocale.mjs +1 -2
  57. package/dist/esm/server/react/useTranslations.mjs +1 -2
  58. package/dist/esm/server/requestLocaleCache.mjs +1 -2
  59. package/dist/esm/server/setLocale.mjs +1 -2
  60. package/dist/esm/server/setRequestLocale.mjs +1 -2
  61. package/dist/types/client/NextIntlClientProvider.d.ts +0 -2
  62. package/dist/types/client/NextIntlClientProvider.d.ts.map +1 -1
  63. package/dist/types/client/useLocale.d.ts +0 -2
  64. package/dist/types/client/useLocale.d.ts.map +1 -1
  65. package/dist/types/getDictionary.d.ts +1 -2
  66. package/dist/types/getDictionary.d.ts.map +1 -1
  67. package/dist/types/getDictionaryDynamic.d.ts +1 -2
  68. package/dist/types/getDictionaryDynamic.d.ts.map +1 -1
  69. package/dist/types/middleware.d.ts +0 -2
  70. package/dist/types/middleware.d.ts.map +1 -1
  71. package/dist/types/navigation/Link.d.ts +0 -2
  72. package/dist/types/navigation/Link.d.ts.map +1 -1
  73. package/dist/types/navigation/createNavigation.d.ts +0 -2
  74. package/dist/types/navigation/createNavigation.d.ts.map +1 -1
  75. package/dist/types/navigation/hooks.d.ts +1 -2
  76. package/dist/types/navigation/hooks.d.ts.map +1 -1
  77. package/dist/types/navigation/index.d.ts +2 -2
  78. package/dist/types/navigation/localizeHref.d.ts +0 -2
  79. package/dist/types/navigation/localizeHref.d.ts.map +1 -1
  80. package/dist/types/plugin/index.d.ts +0 -2
  81. package/dist/types/plugin/index.d.ts.map +1 -1
  82. package/dist/types/routing.d.ts +0 -2
  83. package/dist/types/routing.d.ts.map +1 -1
  84. package/dist/types/server/getLocale.d.ts +0 -2
  85. package/dist/types/server/getLocale.d.ts.map +1 -1
  86. package/dist/types/server/getMessages.d.ts +0 -2
  87. package/dist/types/server/getMessages.d.ts.map +1 -1
  88. package/dist/types/server/getRequestConfig.d.ts +0 -2
  89. package/dist/types/server/getRequestConfig.d.ts.map +1 -1
  90. package/dist/types/server/getTranslations.d.ts +1 -2
  91. package/dist/types/server/getTranslations.d.ts.map +1 -1
  92. package/dist/types/server/helpers.d.ts +0 -2
  93. package/dist/types/server/helpers.d.ts.map +1 -1
  94. package/dist/types/server/react/helpers.d.ts +0 -2
  95. package/dist/types/server/react/helpers.d.ts.map +1 -1
  96. package/dist/types/server/react/resolveLocale.d.ts +0 -2
  97. package/dist/types/server/react/resolveLocale.d.ts.map +1 -1
  98. package/dist/types/server/react/useDictionary.d.ts +1 -2
  99. package/dist/types/server/react/useDictionary.d.ts.map +1 -1
  100. package/dist/types/server/react/useDictionaryDynamic.d.ts +1 -2
  101. package/dist/types/server/react/useDictionaryDynamic.d.ts.map +1 -1
  102. package/dist/types/server/react/useLocale.d.ts +0 -2
  103. package/dist/types/server/react/useLocale.d.ts.map +1 -1
  104. package/dist/types/server/react/useTranslations.d.ts +1 -2
  105. package/dist/types/server/react/useTranslations.d.ts.map +1 -1
  106. package/dist/types/server/requestLocaleCache.d.ts +0 -2
  107. package/dist/types/server/requestLocaleCache.d.ts.map +1 -1
  108. package/dist/types/server/setLocale.d.ts +0 -2
  109. package/dist/types/server/setLocale.d.ts.map +1 -1
  110. package/dist/types/server/setRequestLocale.d.ts +0 -2
  111. package/dist/types/server/setRequestLocale.d.ts.map +1 -1
  112. package/package.json +12 -12
@@ -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
- //#region src/server/react/useTranslations.ts
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
- //#region src/server/requestLocaleCache.ts
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
- //#region src/server/setLocale.ts
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
- //#region src/server/setRequestLocale.ts
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":";;;;;;;;;qBAiBa,+BAA+B;;;;YAsDhC,8BAA8B,KACxC,sBAAsB;;;;;EAOtB;;;;EAIA,QAAQ"}
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,8 +1,6 @@
1
1
  import { useLocale as useLocale$1 } from "next-intl";
2
- //#region src/client/useLocale.d.ts
3
2
  /**
4
3
  * Drop-in for next-intl's `useLocale`.
5
4
  */
6
5
  export declare const useLocale: typeof useLocale$1;
7
- //#endregion
8
6
  //# sourceMappingURL=useLocale.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":";;;;;qBAQa,kBAAkB"}
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
- //#endregion
32
+ export {};
34
33
  //# sourceMappingURL=getDictionary.d.ts.map
@@ -1 +1 @@
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
+ {"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
- //#endregion
20
+ export {};
22
21
  //# sourceMappingURL=getDictionaryDynamic.d.ts.map
@@ -1 +1 @@
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"}
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"}
@@ -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":";;;;;;;;;;;;;;;;;qBAmBa,yBAAyB"}
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":";;;;;;;;YAWY,YAAY,KACtB,gCAAgC;EAGhC,MAAM;EACN;;;;;;;qBAQW,sBAAI,0BAAA,KAAA,KAAA,qBAAA,qBAAA,8CAAA,sCAAA;;;EATT,MAAA;EACG;oBAiBV,cAAA"}
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":";;;;;;;;;;;;;;;;qBA6Ba,yBAAyB"}
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
- //#endregion
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":";;;;;;KAaK;EAAoB;IAAoB;;;;;qBAMhC;;;;;;qBAeA;;;;;;EASI,OAAA,MAAA,cAAY,UAAY;EAKrB,UAAA,MAAA,cAAY,UAAY;EAKvB,WAAA,MAAA,cAAY,UAAY"}
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":";;;;;;YAQY;EAGN;EACA,QAAQ;EACR,SAAS;;;;;;;;;;qBAWF,eAAY,MAAU,cAAY"}
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":";;;;;;;qBA0Ia,uBAAoB,wBAAsB,aAC3B,eAAkB,QAAQ"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/plugin/index.ts"],"mappings":";;;;;;qBA0Ia,uBAAoB,wBAAsB,aAC3B,eAAkB,QAAQ"}
@@ -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":";;YAGY;EACV,SAAS;EACT,eAAe;EACf;EACA,YAAY,wBAAwB;;;;;;;;;;;;;;;;;qBAkBzB,gBAAgB,SAAS,QAAQ,aAAa"}
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":";;;;;;;;;;;;;;qBAgBa,kBAAkB"}
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":";;;;;;;;;;;;;;;;;qBAoBa,oBAAoB"}
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":";;;;;;;;;;;;;;qBAiBa,yBAAyB"}
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
- //#endregion
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":";;;;;;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
+ {"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":";;;;;;;qBAaa,qBAAqB;;;;;qBAWrB,eAAe;;;;;qBAOf,oBAAoB"}
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":";;;;;qBAOa,kDAAkD;;qBAIlD,4CAA4C;;;;;qBAO5C,iDAAiD"}
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":";;;;;;;;;;;;;;;qBAsBa,2BAA0B"}
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
- //#endregion
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":";;;;;;;;;KAeK;GACF,UAAU,YACT,YAAY,IACX,kBAAkB,WAAW;GAC/B,UAAU,YAAY,uBACrB,YAAY,GACZ,iBAAiB,SAChB,wBAAwB,WAAW,gBAAgB;;;;;;;;;;qBAW3C,eAQP"}
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
- //#endregion
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":";;;;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
+ {"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":";;;;;;qBAOa,kBAAkB"}
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
- //#endregion
21
+ export {};
23
22
  //# sourceMappingURL=useTranslations.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useTranslations.d.ts","names":[],"sources":["../../../../src/server/react/useTranslations.ts"],"mappings":";;;KAUK;GACF,UAAU,gBAAgB,WAAW,IAAI,kBAAkB;GAC3D,iCACC,WAAW,IACV,8BAA8B;MAC7B;;;;;;;;;;;;;;qBAsBO,iBAmBP"}
1
+ {"version":3,"file":"useTranslations.d.ts","names":[],"sources":["../../../../src/server/react/useTranslations.ts"],"mappings":";;KAUK;GACF,UAAU,gBAAgB,WAAW,IAAI,kBAAkB;GAC3D,iCACC,WAAW,IACV,8BAA8B;MAC7B;;;;;;;;;;;;;;qBAsBO,iBAmBP"}
@@ -1,5 +1,4 @@
1
1
  import { LocalesValues } from "@intlayer/types/module_augmentation";
2
- //#region src/server/requestLocaleCache.d.ts
3
2
  /**
4
3
  * Read the locale stored for the current request, or `undefined` when
5
4
  * `setRequestLocale` has not been called.
@@ -11,5 +10,4 @@ export declare const getCachedRequestLocale: () => LocalesValues | undefined;
11
10
  * @param locale - The locale resolved from the `[locale]` route segment.
12
11
  */
13
12
  export declare const setCachedRequestLocale: (locale: LocalesValues) => void;
14
- //#endregion
15
13
  //# sourceMappingURL=requestLocaleCache.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"requestLocaleCache.d.ts","names":[],"sources":["../../../src/server/requestLocaleCache.ts"],"mappings":";;;;;;qBAuBa,8BAA6B;;;;;;qBAQ7B,yBAAsB,QAAY"}
1
+ {"version":3,"file":"requestLocaleCache.d.ts","names":[],"sources":["../../../src/server/requestLocaleCache.ts"],"mappings":";;;;;qBAuBa,8BAA6B;;;;;;qBAQ7B,yBAAsB,QAAY"}
@@ -1,4 +1,3 @@
1
- //#region src/server/setLocale.d.ts
2
1
  /**
3
2
  * Drop-in replacement for next-intl's `setLocale()` server action.
4
3
  *
@@ -16,5 +15,4 @@
16
15
  * ```
17
16
  */
18
17
  export declare const setLocale: (locale: string) => Promise<void>;
19
- //#endregion
20
18
  //# sourceMappingURL=setLocale.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setLocale.d.ts","names":[],"sources":["../../../src/server/setLocale.ts"],"mappings":";;;;;;;;;;;;;;;;;qBAoBa,YAAS,mBAA2B"}
1
+ {"version":3,"file":"setLocale.d.ts","names":[],"sources":["../../../src/server/setLocale.ts"],"mappings":";;;;;;;;;;;;;;;;qBAoBa,YAAS,mBAA2B"}
@@ -1,5 +1,4 @@
1
1
  import { setRequestLocale as setRequestLocale$1 } from "next-intl/server";
2
- //#region src/server/setRequestLocale.d.ts
3
2
  /**
4
3
  * Drop-in for next-intl's `setRequestLocale`.
5
4
  *
@@ -23,5 +22,4 @@ import { setRequestLocale as setRequestLocale$1 } from "next-intl/server";
23
22
  * ```
24
23
  */
25
24
  export declare const setRequestLocale: typeof setRequestLocale$1;
26
- //#endregion
27
25
  //# sourceMappingURL=setRequestLocale.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"setRequestLocale.d.ts","names":[],"sources":["../../../src/server/setRequestLocale.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;qBA0Ba,yBAAyB"}
1
+ {"version":3,"file":"setRequestLocale.d.ts","names":["_setRequestLocale"],"sources":["../../../src/server/setRequestLocale.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;qBA0Ba,yBAAyBA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intlayer/next-intl",
3
- "version": "9.7.0",
3
+ "version": "9.7.1",
4
4
  "private": false,
5
5
  "description": "next-intl API adapter for intlayer — useTranslations, useLocale, getTranslations, getLocale, NextIntlClientProvider backed by next-intlayer",
6
6
  "keywords": [
@@ -112,14 +112,14 @@
112
112
  "typecheck": "tsc --noEmit --project tsconfig.types.json"
113
113
  },
114
114
  "dependencies": {
115
- "@intlayer/config": "9.6.0",
116
- "@intlayer/core": "9.7.0",
117
- "@intlayer/dictionaries-entry": "9.6.0",
118
- "@intlayer/engine": "9.7.0",
119
- "@intlayer/types": "9.7.0",
120
- "@intlayer/use-intl": "9.7.0",
121
- "next-intlayer": "9.6.0",
122
- "react-intlayer": "9.7.0"
115
+ "@intlayer/config": "9.7.1",
116
+ "@intlayer/core": "9.7.1",
117
+ "@intlayer/dictionaries-entry": "9.7.1",
118
+ "@intlayer/engine": "9.7.1",
119
+ "@intlayer/types": "9.7.1",
120
+ "@intlayer/use-intl": "9.7.1",
121
+ "next-intlayer": "9.7.1",
122
+ "react-intlayer": "9.7.1"
123
123
  },
124
124
  "devDependencies": {
125
125
  "@types/node": "^26",
@@ -127,11 +127,11 @@
127
127
  "@utils/ts-config": "1.0.4",
128
128
  "@utils/ts-config-types": "1.0.4",
129
129
  "@utils/tsdown-config": "1.0.4",
130
- "next-intl": "4.14.5",
130
+ "next-intl": "4.14.9",
131
131
  "rimraf": "6.1.3",
132
- "tsdown": "0.23.0",
132
+ "tsdown": "0.23.4",
133
133
  "typescript": "7.0.2",
134
- "vitest": "5.0.3"
134
+ "vitest": "5.1.0"
135
135
  },
136
136
  "peerDependencies": {
137
137
  "next": ">=14.0.0",