next-intlayer 4.1.11 → 5.0.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/README.md CHANGED
@@ -76,7 +76,7 @@ By default, Intlayer scans for files with the extension `.content.{ts,tsx,js,jsx
76
76
  Here’s an example of content declaration:
77
77
 
78
78
  ```tsx filePath="src/ClientComponent/index.content.ts" codeFormat="typescript"
79
- import { type DeclarationContent, t } from "intlayer";
79
+ import { t, type Dictionary } from "intlayer";
80
80
 
81
81
  const clientComponentContent = {
82
82
  key: "client-component",
@@ -95,7 +95,7 @@ const clientComponentContent = {
95
95
  ">19": "Many cars",
96
96
  }),
97
97
  },
98
- } satisfies DeclarationContent;
98
+ } satisfies Dictionary;
99
99
 
100
100
  export default clientComponentContent;
101
101
  ```
@@ -18,31 +18,18 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var client_exports = {};
20
20
  __export(client_exports, {
21
- IntlayerClientContext: () => import_react_intlayer.IntlayerClientContext,
22
21
  IntlayerClientProvider: () => import_IntlayerClientProvider.IntlayerClientProvider,
23
- getTranslation: () => import_react_intlayer.getTranslation,
24
- useIntlayer: () => import_react_intlayer.useIntlayer,
25
- useIntlayerAsync: () => import_react_intlayer.useIntlayerAsync,
26
22
  useLocale: () => import_useLocale.useLocale,
27
- useLocaleCookie: () => import_react_intlayer.useLocaleCookie,
28
- useLocalePageRouter: () => import_useLocalePageRouter.useLocalePageRouter,
29
- useTraduction: () => import_react_intlayer.useTraduction
23
+ useLocalePageRouter: () => import_useLocalePageRouter.useLocalePageRouter
30
24
  });
31
25
  module.exports = __toCommonJS(client_exports);
32
- var import_react_intlayer = require("react-intlayer");
33
26
  var import_useLocale = require('./useLocale.cjs');
34
27
  var import_useLocalePageRouter = require('./useLocalePageRouter.cjs');
35
28
  var import_IntlayerClientProvider = require('./IntlayerClientProvider.cjs');
36
29
  // Annotate the CommonJS export names for ESM import in node:
37
30
  0 && (module.exports = {
38
- IntlayerClientContext,
39
31
  IntlayerClientProvider,
40
- getTranslation,
41
- useIntlayer,
42
- useIntlayerAsync,
43
32
  useLocale,
44
- useLocaleCookie,
45
- useLocalePageRouter,
46
- useTraduction
33
+ useLocalePageRouter
47
34
  });
48
35
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/client/index.ts"],"sourcesContent":["export {\n getTranslation,\n IntlayerClientContext,\n useIntlayer,\n useIntlayerAsync,\n useTraduction,\n useLocaleCookie,\n} from 'react-intlayer';\nexport { useLocale } from './useLocale';\nexport { useLocalePageRouter } from './useLocalePageRouter';\nexport {\n IntlayerClientProvider,\n type IntlayerClientProviderProps,\n} from './IntlayerClientProvider';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAOO;AACP,uBAA0B;AAC1B,iCAAoC;AACpC,oCAGO;","names":[]}
1
+ {"version":3,"sources":["../../../src/client/index.ts"],"sourcesContent":["export { useLocale } from './useLocale';\nexport { useLocalePageRouter } from './useLocalePageRouter';\nexport {\n IntlayerClientProvider,\n type IntlayerClientProviderProps,\n} from './IntlayerClientProvider';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA0B;AAC1B,iCAAoC;AACpC,oCAGO;","names":[]}
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["import { type Locales } from '@intlayer/config/client';\nimport { getLocalizedUrl, getPathWithoutLocale } from '@intlayer/core';\nimport { usePathname, useRouter } from 'next/navigation.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\n\nexport const useLocale = () => {\n const { push, refresh } = useRouter();\n const pathname = usePathname();\n const pathWithoutLocale = useMemo(\n () => getPathWithoutLocale(pathname),\n [pathname]\n );\n\n const redirectionFunction = useCallback(\n (locale: Locales) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n return refresh();\n },\n [refresh, pathWithoutLocale]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAAsD;AACtD,wBAAuC;AACvC,mBAAqC;AACrC,4BAA4C;AAErC,MAAM,YAAY,MAAM;AAC7B,QAAM,EAAE,MAAM,QAAQ,QAAI,6BAAU;AACpC,QAAM,eAAW,+BAAY;AAC7B,QAAM,wBAAoB;AAAA,IACxB,UAAM,kCAAqB,QAAQ;AAAA,IACnC,CAAC,QAAQ;AAAA,EACX;AAEA,QAAM,0BAAsB;AAAA,IAC1B,CAAC,WAAoB;AACnB,YAAM,qBAAiB,6BAAgB,mBAAmB,MAAM;AAEhE,WAAK,cAAc;AAEnB,aAAO,QAAQ;AAAA,IACjB;AAAA,IACA,CAAC,SAAS,iBAAiB;AAAA,EAC7B;AAEA,QAAM,sBAAkB,sBAAAA,WAAe;AAAA,IACrC,gBAAgB;AAAA,EAClB,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":["useLocaleReact"]}
1
+ {"version":3,"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["'use client';\n\nimport { type Locales } from '@intlayer/config/client';\nimport { getLocalizedUrl, getPathWithoutLocale } from '@intlayer/core';\nimport { usePathname, useRouter } from 'next/navigation.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\n\nexport const useLocale = () => {\n const { push, refresh } = useRouter();\n const pathname = usePathname();\n const pathWithoutLocale = useMemo(\n () => getPathWithoutLocale(pathname),\n [pathname]\n );\n\n const redirectionFunction = useCallback(\n (locale: Locales | `${Locales}`) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n return refresh();\n },\n [refresh, pathWithoutLocale]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,kBAAsD;AACtD,wBAAuC;AACvC,mBAAqC;AACrC,4BAA4C;AAErC,MAAM,YAAY,MAAM;AAC7B,QAAM,EAAE,MAAM,QAAQ,QAAI,6BAAU;AACpC,QAAM,eAAW,+BAAY;AAC7B,QAAM,wBAAoB;AAAA,IACxB,UAAM,kCAAqB,QAAQ;AAAA,IACnC,CAAC,QAAQ;AAAA,EACX;AAEA,QAAM,0BAAsB;AAAA,IAC1B,CAAC,WAAmC;AAClC,YAAM,qBAAiB,6BAAgB,mBAAmB,MAAM;AAEhE,WAAK,cAAc;AAEnB,aAAO,QAAQ;AAAA,IACjB;AAAA,IACA,CAAC,SAAS,iBAAiB;AAAA,EAC7B;AAEA,QAAM,sBAAkB,sBAAAA,WAAe;AAAA,IACrC,gBAAgB;AAAA,EAClB,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":["useLocaleReact"]}
@@ -1,4 +1,5 @@
1
1
  "use strict";
2
+ "use client";
2
3
  var __defProp = Object.defineProperty;
3
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/client/useLocalePageRouter.ts"],"sourcesContent":["import { type Locales } from '@intlayer/config/client';\nimport { getLocalizedUrl, getPathWithoutLocale } from 'intlayer';\nimport { useRouter } from 'next/router.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\n\nexport const useLocalePageRouter = () => {\n const { push, pathname, reload } = useRouter();\n const pathWithoutLocale = useMemo(\n () => getPathWithoutLocale(pathname),\n [pathname]\n );\n\n const redirectionFunction = useCallback(\n (locale: Locales) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n return reload();\n },\n [reload, pathWithoutLocale]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,sBAAsD;AACtD,oBAA0B;AAC1B,mBAAqC;AACrC,4BAA4C;AAErC,MAAM,sBAAsB,MAAM;AACvC,QAAM,EAAE,MAAM,UAAU,OAAO,QAAI,yBAAU;AAC7C,QAAM,wBAAoB;AAAA,IACxB,UAAM,sCAAqB,QAAQ;AAAA,IACnC,CAAC,QAAQ;AAAA,EACX;AAEA,QAAM,0BAAsB;AAAA,IAC1B,CAAC,WAAoB;AACnB,YAAM,qBAAiB,iCAAgB,mBAAmB,MAAM;AAEhE,WAAK,cAAc;AAEnB,aAAO,OAAO;AAAA,IAChB;AAAA,IACA,CAAC,QAAQ,iBAAiB;AAAA,EAC5B;AAEA,QAAM,sBAAkB,sBAAAA,WAAe;AAAA,IACrC,gBAAgB;AAAA,EAClB,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":["useLocaleReact"]}
1
+ {"version":3,"sources":["../../../src/client/useLocalePageRouter.ts"],"sourcesContent":["'use client';\n\nimport { type Locales } from '@intlayer/config/client';\nimport { getLocalizedUrl, getPathWithoutLocale } from 'intlayer';\nimport { useRouter } from 'next/router.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\n\nexport const useLocalePageRouter = () => {\n const { push, pathname, reload } = useRouter();\n const pathWithoutLocale = useMemo(\n () => getPathWithoutLocale(pathname),\n [pathname]\n );\n\n const redirectionFunction = useCallback(\n (locale: Locales) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n return reload();\n },\n [reload, pathWithoutLocale]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA,sBAAsD;AACtD,oBAA0B;AAC1B,mBAAqC;AACrC,4BAA4C;AAErC,MAAM,sBAAsB,MAAM;AACvC,QAAM,EAAE,MAAM,UAAU,OAAO,QAAI,yBAAU;AAC7C,QAAM,wBAAoB;AAAA,IACxB,UAAM,sCAAqB,QAAQ;AAAA,IACnC,CAAC,QAAQ;AAAA,EACX;AAEA,QAAM,0BAAsB;AAAA,IAC1B,CAAC,WAAoB;AACnB,YAAM,qBAAiB,iCAAgB,mBAAmB,MAAM;AAEhE,WAAK,cAAc;AAEnB,aAAO,OAAO;AAAA,IAChB;AAAA,IACA,CAAC,QAAQ,iBAAiB;AAAA,EAC5B;AAEA,QAAM,sBAAkB,sBAAAA,WAAe;AAAA,IACrC,gBAAgB;AAAA,EAClB,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":["useLocaleReact"]}
@@ -21,17 +21,13 @@ __export(index_exports, {
21
21
  IntlayerClientContext: () => import_react_intlayer.IntlayerClientContext,
22
22
  IntlayerClientProvider: () => import_client.IntlayerClientProvider,
23
23
  generateStaticParams: () => import_generateStaticParams.generateStaticParams,
24
- getDictionary: () => import_react_intlayer.getDictionary,
25
- getIntlayer: () => import_react_intlayer.getIntlayer,
26
- getTranslation: () => import_react_intlayer.getTranslation,
27
24
  t: () => import_react_intlayer.t,
28
25
  useDictionary: () => import_react_intlayer.useDictionary,
29
26
  useIntlayer: () => import_react_intlayer.useIntlayer,
30
27
  useIntlayerAsync: () => import_react_intlayer.useIntlayerAsync,
31
28
  useLocale: () => import_client.useLocale,
32
29
  useLocaleCookie: () => import_react_intlayer.useLocaleCookie,
33
- useLocalePageRouter: () => import_client.useLocalePageRouter,
34
- useTraduction: () => import_react_intlayer.useTraduction
30
+ useLocalePageRouter: () => import_client.useLocalePageRouter
35
31
  });
36
32
  module.exports = __toCommonJS(index_exports);
37
33
  var import_react_intlayer = require("react-intlayer");
@@ -42,16 +38,12 @@ var import_client = require('./client/index.cjs');
42
38
  IntlayerClientContext,
43
39
  IntlayerClientProvider,
44
40
  generateStaticParams,
45
- getDictionary,
46
- getIntlayer,
47
- getTranslation,
48
41
  t,
49
42
  useDictionary,
50
43
  useIntlayer,
51
44
  useIntlayerAsync,
52
45
  useLocale,
53
46
  useLocaleCookie,
54
- useLocalePageRouter,
55
- useTraduction
47
+ useLocalePageRouter
56
48
  });
57
49
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n getTranslation,\n IntlayerClientContext,\n getIntlayer,\n useIntlayer,\n useIntlayerAsync,\n useTraduction,\n getDictionary,\n useDictionary,\n useLocaleCookie,\n type IntlayerNode,\n t,\n} from 'react-intlayer';\nexport { generateStaticParams } from './generateStaticParams';\nexport type {\n LocalParams,\n LocalPromiseParams,\n Next14PageIntlayer,\n Next15PageIntlayer,\n NextPageIntlayer,\n Next14LayoutIntlayer,\n Next15LayoutIntlayer,\n NextLayoutIntlayer,\n} from './types/index';\nexport {\n useLocale,\n useLocalePageRouter,\n IntlayerClientProvider,\n type IntlayerClientProviderProps,\n} from './client/index';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAYO;AACP,kCAAqC;AAWrC,oBAKO;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n IntlayerClientContext,\n useIntlayer,\n useIntlayerAsync,\n useDictionary,\n useLocaleCookie,\n type IntlayerNode,\n t,\n} from 'react-intlayer';\nexport { generateStaticParams } from './generateStaticParams';\nexport type {\n LocalParams,\n LocalPromiseParams,\n Next14PageIntlayer,\n Next15PageIntlayer,\n NextPageIntlayer,\n Next14LayoutIntlayer,\n Next15LayoutIntlayer,\n NextLayoutIntlayer,\n} from './types/index';\nexport {\n useLocale,\n useLocalePageRouter,\n IntlayerClientProvider,\n type IntlayerClientProviderProps,\n} from './client/index';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAQO;AACP,kCAAqC;AAWrC,oBAKO;","names":[]}
@@ -20,12 +20,10 @@ var server_exports = {};
20
20
  __export(server_exports, {
21
21
  IntlayerServer: () => import_server.IntlayerServer,
22
22
  IntlayerServerProvider: () => import_server.IntlayerServerProvider,
23
- getLocaleContent: () => import_server.getLocaleContent,
24
23
  locale: () => import_server.locale,
25
24
  t: () => import_server.t,
26
25
  useDictionary: () => import_server.useDictionary,
27
26
  useIntlayer: () => import_server.useIntlayer,
28
- useTraduction: () => import_server.useTraduction,
29
27
  withIntlayer: () => import_withIntlayer.withIntlayer
30
28
  });
31
29
  module.exports = __toCommonJS(server_exports);
@@ -35,12 +33,10 @@ var import_withIntlayer = require('./withIntlayer.cjs');
35
33
  0 && (module.exports = {
36
34
  IntlayerServer,
37
35
  IntlayerServerProvider,
38
- getLocaleContent,
39
36
  locale,
40
37
  t,
41
38
  useDictionary,
42
39
  useIntlayer,
43
- useTraduction,
44
40
  withIntlayer
45
41
  });
46
42
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/server/index.ts"],"sourcesContent":["export {\n getLocaleContent,\n useDictionary,\n useTraduction,\n IntlayerServer,\n IntlayerServerProvider,\n locale,\n useIntlayer,\n t,\n} from 'react-intlayer/server';\nexport { withIntlayer } from './withIntlayer';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBASO;AACP,0BAA6B;","names":[]}
1
+ {"version":3,"sources":["../../../src/server/index.ts"],"sourcesContent":["export {\n useDictionary,\n IntlayerServer,\n IntlayerServerProvider,\n locale,\n useIntlayer,\n t,\n} from 'react-intlayer/server';\nexport { withIntlayer } from './withIntlayer';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAOO;AACP,0BAA6B;","names":[]}
@@ -1,25 +1,11 @@
1
- import {
2
- getTranslation,
3
- IntlayerClientContext,
4
- useIntlayer,
5
- useIntlayerAsync,
6
- useTraduction,
7
- useLocaleCookie
8
- } from "react-intlayer";
9
1
  import { useLocale } from "./useLocale.mjs";
10
2
  import { useLocalePageRouter } from "./useLocalePageRouter.mjs";
11
3
  import {
12
4
  IntlayerClientProvider
13
5
  } from "./IntlayerClientProvider.mjs";
14
6
  export {
15
- IntlayerClientContext,
16
7
  IntlayerClientProvider,
17
- getTranslation,
18
- useIntlayer,
19
- useIntlayerAsync,
20
8
  useLocale,
21
- useLocaleCookie,
22
- useLocalePageRouter,
23
- useTraduction
9
+ useLocalePageRouter
24
10
  };
25
11
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/client/index.ts"],"sourcesContent":["export {\n getTranslation,\n IntlayerClientContext,\n useIntlayer,\n useIntlayerAsync,\n useTraduction,\n useLocaleCookie,\n} from 'react-intlayer';\nexport { useLocale } from './useLocale';\nexport { useLocalePageRouter } from './useLocalePageRouter';\nexport {\n IntlayerClientProvider,\n type IntlayerClientProviderProps,\n} from './IntlayerClientProvider';\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,iBAAiB;AAC1B,SAAS,2BAA2B;AACpC;AAAA,EACE;AAAA,OAEK;","names":[]}
1
+ {"version":3,"sources":["../../../src/client/index.ts"],"sourcesContent":["export { useLocale } from './useLocale';\nexport { useLocalePageRouter } from './useLocalePageRouter';\nexport {\n IntlayerClientProvider,\n type IntlayerClientProviderProps,\n} from './IntlayerClientProvider';\n"],"mappings":"AAAA,SAAS,iBAAiB;AAC1B,SAAS,2BAA2B;AACpC;AAAA,EACE;AAAA,OAEK;","names":[]}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { getLocalizedUrl, getPathWithoutLocale } from "@intlayer/core";
2
3
  import { usePathname, useRouter } from "next/navigation.js";
3
4
  import { useCallback, useMemo } from "react";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["import { type Locales } from '@intlayer/config/client';\nimport { getLocalizedUrl, getPathWithoutLocale } from '@intlayer/core';\nimport { usePathname, useRouter } from 'next/navigation.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\n\nexport const useLocale = () => {\n const { push, refresh } = useRouter();\n const pathname = usePathname();\n const pathWithoutLocale = useMemo(\n () => getPathWithoutLocale(pathname),\n [pathname]\n );\n\n const redirectionFunction = useCallback(\n (locale: Locales) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n return refresh();\n },\n [refresh, pathWithoutLocale]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n };\n};\n"],"mappings":"AACA,SAAS,iBAAiB,4BAA4B;AACtD,SAAS,aAAa,iBAAiB;AACvC,SAAS,aAAa,eAAe;AACrC,SAAS,aAAa,sBAAsB;AAErC,MAAM,YAAY,MAAM;AAC7B,QAAM,EAAE,MAAM,QAAQ,IAAI,UAAU;AACpC,QAAM,WAAW,YAAY;AAC7B,QAAM,oBAAoB;AAAA,IACxB,MAAM,qBAAqB,QAAQ;AAAA,IACnC,CAAC,QAAQ;AAAA,EACX;AAEA,QAAM,sBAAsB;AAAA,IAC1B,CAAC,WAAoB;AACnB,YAAM,iBAAiB,gBAAgB,mBAAmB,MAAM;AAEhE,WAAK,cAAc;AAEnB,aAAO,QAAQ;AAAA,IACjB;AAAA,IACA,CAAC,SAAS,iBAAiB;AAAA,EAC7B;AAEA,QAAM,kBAAkB,eAAe;AAAA,IACrC,gBAAgB;AAAA,EAClB,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["'use client';\n\nimport { type Locales } from '@intlayer/config/client';\nimport { getLocalizedUrl, getPathWithoutLocale } from '@intlayer/core';\nimport { usePathname, useRouter } from 'next/navigation.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\n\nexport const useLocale = () => {\n const { push, refresh } = useRouter();\n const pathname = usePathname();\n const pathWithoutLocale = useMemo(\n () => getPathWithoutLocale(pathname),\n [pathname]\n );\n\n const redirectionFunction = useCallback(\n (locale: Locales | `${Locales}`) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n return refresh();\n },\n [refresh, pathWithoutLocale]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n };\n};\n"],"mappings":";AAGA,SAAS,iBAAiB,4BAA4B;AACtD,SAAS,aAAa,iBAAiB;AACvC,SAAS,aAAa,eAAe;AACrC,SAAS,aAAa,sBAAsB;AAErC,MAAM,YAAY,MAAM;AAC7B,QAAM,EAAE,MAAM,QAAQ,IAAI,UAAU;AACpC,QAAM,WAAW,YAAY;AAC7B,QAAM,oBAAoB;AAAA,IACxB,MAAM,qBAAqB,QAAQ;AAAA,IACnC,CAAC,QAAQ;AAAA,EACX;AAEA,QAAM,sBAAsB;AAAA,IAC1B,CAAC,WAAmC;AAClC,YAAM,iBAAiB,gBAAgB,mBAAmB,MAAM;AAEhE,WAAK,cAAc;AAEnB,aAAO,QAAQ;AAAA,IACjB;AAAA,IACA,CAAC,SAAS,iBAAiB;AAAA,EAC7B;AAEA,QAAM,kBAAkB,eAAe;AAAA,IACrC,gBAAgB;AAAA,EAClB,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
@@ -1,3 +1,4 @@
1
+ "use client";
1
2
  import { getLocalizedUrl, getPathWithoutLocale } from "intlayer";
2
3
  import { useRouter } from "next/router.js";
3
4
  import { useCallback, useMemo } from "react";
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/client/useLocalePageRouter.ts"],"sourcesContent":["import { type Locales } from '@intlayer/config/client';\nimport { getLocalizedUrl, getPathWithoutLocale } from 'intlayer';\nimport { useRouter } from 'next/router.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\n\nexport const useLocalePageRouter = () => {\n const { push, pathname, reload } = useRouter();\n const pathWithoutLocale = useMemo(\n () => getPathWithoutLocale(pathname),\n [pathname]\n );\n\n const redirectionFunction = useCallback(\n (locale: Locales) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n return reload();\n },\n [reload, pathWithoutLocale]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n };\n};\n"],"mappings":"AACA,SAAS,iBAAiB,4BAA4B;AACtD,SAAS,iBAAiB;AAC1B,SAAS,aAAa,eAAe;AACrC,SAAS,aAAa,sBAAsB;AAErC,MAAM,sBAAsB,MAAM;AACvC,QAAM,EAAE,MAAM,UAAU,OAAO,IAAI,UAAU;AAC7C,QAAM,oBAAoB;AAAA,IACxB,MAAM,qBAAqB,QAAQ;AAAA,IACnC,CAAC,QAAQ;AAAA,EACX;AAEA,QAAM,sBAAsB;AAAA,IAC1B,CAAC,WAAoB;AACnB,YAAM,iBAAiB,gBAAgB,mBAAmB,MAAM;AAEhE,WAAK,cAAc;AAEnB,aAAO,OAAO;AAAA,IAChB;AAAA,IACA,CAAC,QAAQ,iBAAiB;AAAA,EAC5B;AAEA,QAAM,kBAAkB,eAAe;AAAA,IACrC,gBAAgB;AAAA,EAClB,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
1
+ {"version":3,"sources":["../../../src/client/useLocalePageRouter.ts"],"sourcesContent":["'use client';\n\nimport { type Locales } from '@intlayer/config/client';\nimport { getLocalizedUrl, getPathWithoutLocale } from 'intlayer';\nimport { useRouter } from 'next/router.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\n\nexport const useLocalePageRouter = () => {\n const { push, pathname, reload } = useRouter();\n const pathWithoutLocale = useMemo(\n () => getPathWithoutLocale(pathname),\n [pathname]\n );\n\n const redirectionFunction = useCallback(\n (locale: Locales) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n return reload();\n },\n [reload, pathWithoutLocale]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n };\n};\n"],"mappings":";AAGA,SAAS,iBAAiB,4BAA4B;AACtD,SAAS,iBAAiB;AAC1B,SAAS,aAAa,eAAe;AACrC,SAAS,aAAa,sBAAsB;AAErC,MAAM,sBAAsB,MAAM;AACvC,QAAM,EAAE,MAAM,UAAU,OAAO,IAAI,UAAU;AAC7C,QAAM,oBAAoB;AAAA,IACxB,MAAM,qBAAqB,QAAQ;AAAA,IACnC,CAAC,QAAQ;AAAA,EACX;AAEA,QAAM,sBAAsB;AAAA,IAC1B,CAAC,WAAoB;AACnB,YAAM,iBAAiB,gBAAgB,mBAAmB,MAAM;AAEhE,WAAK,cAAc;AAEnB,aAAO,OAAO;AAAA,IAChB;AAAA,IACA,CAAC,QAAQ,iBAAiB;AAAA,EAC5B;AAEA,QAAM,kBAAkB,eAAe;AAAA,IACrC,gBAAgB;AAAA,EAClB,CAAC;AAED,SAAO;AAAA,IACL,GAAG;AAAA,IACH;AAAA,EACF;AACF;","names":[]}
@@ -1,11 +1,7 @@
1
1
  import {
2
- getTranslation,
3
2
  IntlayerClientContext,
4
- getIntlayer,
5
3
  useIntlayer,
6
4
  useIntlayerAsync,
7
- useTraduction,
8
- getDictionary,
9
5
  useDictionary,
10
6
  useLocaleCookie,
11
7
  t
@@ -20,16 +16,12 @@ export {
20
16
  IntlayerClientContext,
21
17
  IntlayerClientProvider,
22
18
  generateStaticParams,
23
- getDictionary,
24
- getIntlayer,
25
- getTranslation,
26
19
  t,
27
20
  useDictionary,
28
21
  useIntlayer,
29
22
  useIntlayerAsync,
30
23
  useLocale,
31
24
  useLocaleCookie,
32
- useLocalePageRouter,
33
- useTraduction
25
+ useLocalePageRouter
34
26
  };
35
27
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n getTranslation,\n IntlayerClientContext,\n getIntlayer,\n useIntlayer,\n useIntlayerAsync,\n useTraduction,\n getDictionary,\n useDictionary,\n useLocaleCookie,\n type IntlayerNode,\n t,\n} from 'react-intlayer';\nexport { generateStaticParams } from './generateStaticParams';\nexport type {\n LocalParams,\n LocalPromiseParams,\n Next14PageIntlayer,\n Next15PageIntlayer,\n NextPageIntlayer,\n Next14LayoutIntlayer,\n Next15LayoutIntlayer,\n NextLayoutIntlayer,\n} from './types/index';\nexport {\n useLocale,\n useLocalePageRouter,\n IntlayerClientProvider,\n type IntlayerClientProviderProps,\n} from './client/index';\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AACP,SAAS,4BAA4B;AAWrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;","names":[]}
1
+ {"version":3,"sources":["../../src/index.ts"],"sourcesContent":["export {\n IntlayerClientContext,\n useIntlayer,\n useIntlayerAsync,\n useDictionary,\n useLocaleCookie,\n type IntlayerNode,\n t,\n} from 'react-intlayer';\nexport { generateStaticParams } from './generateStaticParams';\nexport type {\n LocalParams,\n LocalPromiseParams,\n Next14PageIntlayer,\n Next15PageIntlayer,\n NextPageIntlayer,\n Next14LayoutIntlayer,\n Next15LayoutIntlayer,\n NextLayoutIntlayer,\n} from './types/index';\nexport {\n useLocale,\n useLocalePageRouter,\n IntlayerClientProvider,\n type IntlayerClientProviderProps,\n} from './client/index';\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EAEA;AAAA,OACK;AACP,SAAS,4BAA4B;AAWrC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;","names":[]}
@@ -1,7 +1,5 @@
1
1
  import {
2
- getLocaleContent,
3
2
  useDictionary,
4
- useTraduction,
5
3
  IntlayerServer,
6
4
  IntlayerServerProvider,
7
5
  locale,
@@ -12,12 +10,10 @@ import { withIntlayer } from "./withIntlayer.mjs";
12
10
  export {
13
11
  IntlayerServer,
14
12
  IntlayerServerProvider,
15
- getLocaleContent,
16
13
  locale,
17
14
  t,
18
15
  useDictionary,
19
16
  useIntlayer,
20
- useTraduction,
21
17
  withIntlayer
22
18
  };
23
19
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/server/index.ts"],"sourcesContent":["export {\n getLocaleContent,\n useDictionary,\n useTraduction,\n IntlayerServer,\n IntlayerServerProvider,\n locale,\n useIntlayer,\n t,\n} from 'react-intlayer/server';\nexport { withIntlayer } from './withIntlayer';\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB;","names":[]}
1
+ {"version":3,"sources":["../../../src/server/index.ts"],"sourcesContent":["export {\n useDictionary,\n IntlayerServer,\n IntlayerServerProvider,\n locale,\n useIntlayer,\n t,\n} from 'react-intlayer/server';\nexport { withIntlayer } from './withIntlayer';\n"],"mappings":"AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,oBAAoB;","names":[]}
@@ -1,4 +1,3 @@
1
- export { getTranslation, IntlayerClientContext, useIntlayer, useIntlayerAsync, useTraduction, useLocaleCookie, } from 'react-intlayer';
2
1
  export { useLocale } from './useLocale';
3
2
  export { useLocalePageRouter } from './useLocalePageRouter';
4
3
  export { IntlayerClientProvider, type IntlayerClientProviderProps, } from './IntlayerClientProvider';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,eAAe,GAChB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,0BAA0B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/client/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EACL,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,0BAA0B,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { type Locales } from '@intlayer/config/client';
2
2
  export declare const useLocale: () => {
3
3
  pathWithoutLocale: string;
4
- locale: Locales;
4
+ locale: "hr" | "th" | "tr" | "id" | "is" | Locales | "af" | "af-ZA" | "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-OM" | "ar-QA" | "ar-SA" | "ar-SY" | "ar-TN" | "ar-YE" | "az" | "az-AZ" | "be" | "be-BY" | "bg" | "bg-BG" | "bs" | "bs-BA" | "ca" | "ca-ES" | "cs" | "cs-CZ" | "cy" | "cy-GB" | "da" | "da-DK" | "de" | "de-AT" | "de-CH" | "de-DE" | "de-LI" | "de-LU" | "dv" | "dv-MV" | "el" | "el-GR" | "en" | "en-AU" | "en-BZ" | "en-CA" | "en-CB" | "en-GB" | "en-IE" | "en-JM" | "en-NZ" | "en-PH" | "en-TT" | "en-US" | "en-ZA" | "en-ZW" | "eo" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-DO" | "es-EC" | "es-ES" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PE" | "es-PR" | "es-PY" | "es-SV" | "es-UY" | "es-VE" | "et" | "et-EE" | "eu" | "eu-ES" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fo" | "fo-FO" | "fr" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "fr-LU" | "fr-MC" | "gl" | "gl-ES" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hr-BA" | "hr-HR" | "hu" | "hu-HU" | "hy" | "hy-AM" | "id-ID" | "is-IS" | "it" | "it-CH" | "it-IT" | "ja" | "ja-JP" | "ka" | "ka-GE" | "kk" | "kk-KZ" | "kn" | "kn-IN" | "ko" | "ko-KR" | "kok" | "kok-IN" | "ky" | "ky-KG" | "lt" | "lt-LT" | "lv" | "lv-LV" | "mi" | "mi-NZ" | "mk" | "mk-MK" | "mn" | "mn-MN" | "mr" | "mr-IN" | "ms" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "nb" | "nb-NO" | "nl" | "nl-BE" | "nl-NL" | "nn-NO" | "ns" | "ns-ZA" | "pa" | "pa-IN" | "pl" | "pl-PL" | "ps" | "ps-AR" | "pt" | "pt-BR" | "pt-PT" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-RO" | "ru" | "ru-RU" | "sa" | "sa-IN" | "se" | "se-FI" | "se-NO" | "se-SE" | "sk" | "sk-SK" | "sl" | "sl-SI" | "sq" | "sq-AL" | "sr" | "sr-BA" | "sr-SP" | "sv" | "sv-FI" | "sv-SE" | "sw" | "sw-KE" | "syr" | "syr-SY" | "ta" | "ta-IN" | "te" | "te-IN" | "th-TH" | "tl" | "tl-PH" | "tn" | "tn-ZA" | "tr-TR" | "tt" | "tt-RU" | "ts" | "uk" | "uk-UA" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "vi" | "vi-VN" | "xh" | "xh-ZA" | "zh" | "zh-Hans" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-SG" | "zh-Hant" | "zu" | "zu-ZA";
5
5
  defaultLocale: Locales;
6
6
  availableLocales: Locales[];
7
7
  localeList: Locales[];
8
- setLocale: (locale: Locales) => void;
8
+ setLocale: (locale: Locales | `${Locales}`) => void;
9
9
  };
10
10
  //# sourceMappingURL=useLocale.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../../src/client/useLocale.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAMvD,eAAO,MAAM,SAAS;;;;;;;CA2BrB,CAAC"}
1
+ {"version":3,"file":"useLocale.d.ts","sourceRoot":"","sources":["../../../src/client/useLocale.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAMvD,eAAO,MAAM,SAAS;;;;;;;CA2BrB,CAAC"}
@@ -1,10 +1,10 @@
1
1
  import { type Locales } from '@intlayer/config/client';
2
2
  export declare const useLocalePageRouter: () => {
3
3
  pathWithoutLocale: string;
4
- locale: Locales;
4
+ locale: "hr" | "th" | "tr" | "id" | "is" | Locales | "af" | "af-ZA" | "ar" | "ar-AE" | "ar-BH" | "ar-DZ" | "ar-EG" | "ar-IQ" | "ar-JO" | "ar-KW" | "ar-LB" | "ar-LY" | "ar-MA" | "ar-OM" | "ar-QA" | "ar-SA" | "ar-SY" | "ar-TN" | "ar-YE" | "az" | "az-AZ" | "be" | "be-BY" | "bg" | "bg-BG" | "bs" | "bs-BA" | "ca" | "ca-ES" | "cs" | "cs-CZ" | "cy" | "cy-GB" | "da" | "da-DK" | "de" | "de-AT" | "de-CH" | "de-DE" | "de-LI" | "de-LU" | "dv" | "dv-MV" | "el" | "el-GR" | "en" | "en-AU" | "en-BZ" | "en-CA" | "en-CB" | "en-GB" | "en-IE" | "en-JM" | "en-NZ" | "en-PH" | "en-TT" | "en-US" | "en-ZA" | "en-ZW" | "eo" | "es" | "es-AR" | "es-BO" | "es-CL" | "es-CO" | "es-CR" | "es-DO" | "es-EC" | "es-ES" | "es-GT" | "es-HN" | "es-MX" | "es-NI" | "es-PA" | "es-PE" | "es-PR" | "es-PY" | "es-SV" | "es-UY" | "es-VE" | "et" | "et-EE" | "eu" | "eu-ES" | "fa" | "fa-IR" | "fi" | "fi-FI" | "fo" | "fo-FO" | "fr" | "fr-BE" | "fr-CA" | "fr-CH" | "fr-FR" | "fr-LU" | "fr-MC" | "gl" | "gl-ES" | "gu" | "gu-IN" | "he" | "he-IL" | "hi" | "hi-IN" | "hr-BA" | "hr-HR" | "hu" | "hu-HU" | "hy" | "hy-AM" | "id-ID" | "is-IS" | "it" | "it-CH" | "it-IT" | "ja" | "ja-JP" | "ka" | "ka-GE" | "kk" | "kk-KZ" | "kn" | "kn-IN" | "ko" | "ko-KR" | "kok" | "kok-IN" | "ky" | "ky-KG" | "lt" | "lt-LT" | "lv" | "lv-LV" | "mi" | "mi-NZ" | "mk" | "mk-MK" | "mn" | "mn-MN" | "mr" | "mr-IN" | "ms" | "ms-BN" | "ms-MY" | "mt" | "mt-MT" | "nb" | "nb-NO" | "nl" | "nl-BE" | "nl-NL" | "nn-NO" | "ns" | "ns-ZA" | "pa" | "pa-IN" | "pl" | "pl-PL" | "ps" | "ps-AR" | "pt" | "pt-BR" | "pt-PT" | "qu" | "qu-BO" | "qu-EC" | "qu-PE" | "ro" | "ro-RO" | "ru" | "ru-RU" | "sa" | "sa-IN" | "se" | "se-FI" | "se-NO" | "se-SE" | "sk" | "sk-SK" | "sl" | "sl-SI" | "sq" | "sq-AL" | "sr" | "sr-BA" | "sr-SP" | "sv" | "sv-FI" | "sv-SE" | "sw" | "sw-KE" | "syr" | "syr-SY" | "ta" | "ta-IN" | "te" | "te-IN" | "th-TH" | "tl" | "tl-PH" | "tn" | "tn-ZA" | "tr-TR" | "tt" | "tt-RU" | "ts" | "uk" | "uk-UA" | "ur" | "ur-PK" | "uz" | "uz-UZ" | "vi" | "vi-VN" | "xh" | "xh-ZA" | "zh" | "zh-Hans" | "zh-CN" | "zh-HK" | "zh-MO" | "zh-SG" | "zh-Hant" | "zu" | "zu-ZA";
5
5
  defaultLocale: Locales;
6
6
  availableLocales: Locales[];
7
7
  localeList: Locales[];
8
- setLocale: (locale: Locales) => void;
8
+ setLocale: (locale: Locales | `${Locales}`) => void;
9
9
  };
10
10
  //# sourceMappingURL=useLocalePageRouter.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocalePageRouter.d.ts","sourceRoot":"","sources":["../../../src/client/useLocalePageRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAMvD,eAAO,MAAM,mBAAmB;;;;;;;CA0B/B,CAAC"}
1
+ {"version":3,"file":"useLocalePageRouter.d.ts","sourceRoot":"","sources":["../../../src/client/useLocalePageRouter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAMvD,eAAO,MAAM,mBAAmB;;;;;;;CA0B/B,CAAC"}
@@ -1,4 +1,4 @@
1
- export { getTranslation, IntlayerClientContext, getIntlayer, useIntlayer, useIntlayerAsync, useTraduction, getDictionary, useDictionary, useLocaleCookie, type IntlayerNode, t, } from 'react-intlayer';
1
+ export { IntlayerClientContext, useIntlayer, useIntlayerAsync, useDictionary, useLocaleCookie, type IntlayerNode, t, } from 'react-intlayer';
2
2
  export { generateStaticParams } from './generateStaticParams';
3
3
  export type { LocalParams, LocalPromiseParams, Next14PageIntlayer, Next15PageIntlayer, NextPageIntlayer, Next14LayoutIntlayer, Next15LayoutIntlayer, NextLayoutIntlayer, } from './types/index';
4
4
  export { useLocale, useLocalePageRouter, IntlayerClientProvider, type IntlayerClientProviderProps, } from './client/index';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,qBAAqB,EACrB,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,aAAa,EACb,eAAe,EACf,KAAK,YAAY,EACjB,CAAC,GACF,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,eAAe,EACf,KAAK,YAAY,EACjB,CAAC,GACF,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,oBAAoB,EACpB,oBAAoB,EACpB,kBAAkB,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,SAAS,EACT,mBAAmB,EACnB,sBAAsB,EACtB,KAAK,2BAA2B,GACjC,MAAM,gBAAgB,CAAC"}
@@ -1,3 +1,3 @@
1
- export { getLocaleContent, useDictionary, useTraduction, IntlayerServer, IntlayerServerProvider, locale, useIntlayer, t, } from 'react-intlayer/server';
1
+ export { useDictionary, IntlayerServer, IntlayerServerProvider, locale, useIntlayer, t, } from 'react-intlayer/server';
2
2
  export { withIntlayer } from './withIntlayer';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,aAAa,EACb,aAAa,EACb,cAAc,EACd,sBAAsB,EACtB,MAAM,EACN,WAAW,EACX,CAAC,GACF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,aAAa,EACb,cAAc,EACd,sBAAsB,EACtB,MAAM,EACN,WAAW,EACX,CAAC,GACF,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-intlayer",
3
- "version": "4.1.11",
3
+ "version": "5.0.1",
4
4
  "private": false,
5
5
  "description": "Simplify internationalization i18n in Next.js with context providers, hooks, locale detection, and multilingual content integration.",
6
6
  "keywords": [
@@ -39,11 +39,6 @@
39
39
  "require": "./dist/cjs/index.cjs",
40
40
  "import": "./dist/esm/index.mjs"
41
41
  },
42
- "./client": {
43
- "types": "./dist/types/client/index.d.ts",
44
- "require": "./dist/cjs/client/index.cjs",
45
- "import": "./dist/esm/client/index.mjs"
46
- },
47
42
  "./middleware": {
48
43
  "types": "./dist/types/middleware/index.d.ts",
49
44
  "require": "./dist/cjs/middleware/index.cjs",
@@ -72,12 +67,12 @@
72
67
  ],
73
68
  "dependencies": {
74
69
  "node-loader": "^2.1.0",
75
- "@intlayer/chokidar": "4.1.11",
76
- "@intlayer/config": "4.1.11",
77
- "@intlayer/core": "4.1.11",
78
- "@intlayer/dictionaries-entry": "4.1.11",
79
- "@intlayer/webpack": "4.1.11",
80
- "react-intlayer": "4.1.11"
70
+ "@intlayer/core": "5.0.1",
71
+ "@intlayer/dictionaries-entry": "5.0.1",
72
+ "@intlayer/webpack": "5.0.1",
73
+ "react-intlayer": "5.0.1",
74
+ "@intlayer/config": "5.0.1",
75
+ "@intlayer/chokidar": "5.0.1"
81
76
  },
82
77
  "devDependencies": {
83
78
  "@types/node": "^22.10.6",
@@ -90,21 +85,21 @@
90
85
  "tsc-alias": "^1.8.10",
91
86
  "tsup": "^8.3.5",
92
87
  "typescript": "^5.7.3",
88
+ "intlayer": "5.0.1",
89
+ "@utils/tsup-config": "1.0.4",
93
90
  "@utils/eslint-config": "1.0.4",
94
91
  "@utils/ts-config": "1.0.4",
95
- "@utils/ts-config-types": "1.0.4",
96
- "@utils/tsup-config": "1.0.4",
97
- "intlayer": "4.1.11"
92
+ "@utils/ts-config-types": "1.0.4"
98
93
  },
99
94
  "peerDependencies": {
100
95
  "next": ">=14.0.0",
101
96
  "react": ">=16.0.0",
102
- "@intlayer/config": "4.1.11",
103
- "@intlayer/core": "4.1.11",
104
- "@intlayer/webpack": "4.1.11",
105
- "intlayer": "4.1.11",
106
- "@intlayer/dictionaries-entry": "4.1.11",
107
- "react-intlayer": "^4.1.11"
97
+ "@intlayer/config": "5.0.1",
98
+ "@intlayer/core": "5.0.1",
99
+ "@intlayer/dictionaries-entry": "5.0.1",
100
+ "react-intlayer": "^5.0.1",
101
+ "intlayer": "5.0.1",
102
+ "@intlayer/webpack": "5.0.1"
108
103
  },
109
104
  "engines": {
110
105
  "node": ">=14.18"