next-intlayer 8.9.3 → 8.9.4-canary.0
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/client/useLocale.cjs +28 -23
- package/dist/cjs/client/useLocale.cjs.map +1 -1
- package/dist/cjs/client/useLocalePageRouter.cjs +13 -5
- package/dist/cjs/client/useLocalePageRouter.cjs.map +1 -1
- package/dist/esm/client/useLocale.mjs +28 -23
- package/dist/esm/client/useLocale.mjs.map +1 -1
- package/dist/esm/client/useLocalePageRouter.mjs +13 -5
- package/dist/esm/client/useLocalePageRouter.mjs.map +1 -1
- package/dist/types/client/useLocale.d.ts +12 -10
- package/dist/types/client/useLocale.d.ts.map +1 -1
- package/dist/types/client/useLocalePageRouter.d.ts +5 -8
- package/dist/types/client/useLocalePageRouter.d.ts.map +1 -1
- package/dist/types/index.d.ts +4 -4
- package/package.json +9 -9
|
@@ -42,32 +42,37 @@ const usePathWithoutLocale = () => {
|
|
|
42
42
|
* };
|
|
43
43
|
* ```
|
|
44
44
|
*/
|
|
45
|
-
const useLocale = ({ onChange = "replace" } = {}) => {
|
|
45
|
+
const useLocale = ({ onChange = "replace", onLocaleChange, isCookieEnabled } = {}) => {
|
|
46
46
|
const { replace, push } = (0, next_navigation_js.useRouter)();
|
|
47
47
|
const pathWithoutLocale = usePathWithoutLocale();
|
|
48
48
|
return {
|
|
49
|
-
...(0, react_intlayer.useLocale)({
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
onChange
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
49
|
+
...(0, react_intlayer.useLocale)({
|
|
50
|
+
onLocaleChange: (0, react.useCallback)((locale) => {
|
|
51
|
+
if (!onChange) return;
|
|
52
|
+
const pathWithLocale = (0, _intlayer_core_localization.getLocalizedUrl)(pathWithoutLocale, locale, { currentDomain: process.env["INTLAYER_ROUTING_DOMAINS"] !== "false" && typeof window !== "undefined" ? window.location.hostname : void 0 });
|
|
53
|
+
if (typeof onChange === "function") {
|
|
54
|
+
onChange({
|
|
55
|
+
locale,
|
|
56
|
+
path: pathWithLocale
|
|
57
|
+
});
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
if (process.env["INTLAYER_ROUTING_DOMAINS"] !== "false" && (0, _intlayer_core_utils.checkIsURLAbsolute)(pathWithLocale)) {
|
|
61
|
+
window.location.href = pathWithLocale;
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (onChange === "replace") replace(pathWithLocale);
|
|
65
|
+
if (onChange === "push") push(pathWithLocale);
|
|
66
|
+
onLocaleChange?.(locale);
|
|
67
|
+
}, [
|
|
68
|
+
replace,
|
|
69
|
+
push,
|
|
70
|
+
pathWithoutLocale,
|
|
71
|
+
onChange,
|
|
72
|
+
onLocaleChange
|
|
73
|
+
]),
|
|
74
|
+
isCookieEnabled
|
|
75
|
+
}),
|
|
71
76
|
pathWithoutLocale
|
|
72
77
|
};
|
|
73
78
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.cjs","names":[],"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["'use client';\n\nimport {\n getLocalizedUrl,\n getPathWithoutLocale,\n} from '@intlayer/core/localization';\nimport { checkIsURLAbsolute } from '@intlayer/core/utils';\nimport type {
|
|
1
|
+
{"version":3,"file":"useLocale.cjs","names":[],"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["'use client';\n\nimport {\n getLocalizedUrl,\n getPathWithoutLocale,\n} from '@intlayer/core/localization';\nimport { checkIsURLAbsolute } from '@intlayer/core/utils';\nimport type {\n DeclaredLocales,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { usePathname, useRouter } from 'next/navigation.js';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n type UseLocaleResult as UseLocaleResultReact,\n useLocale as useLocaleReact,\n} from 'react-intlayer';\n\nexport type UseLocaleProps = {\n isCookieEnabled?: boolean;\n onLocaleChange?: (locale: DeclaredLocales) => void;\n onChange?:\n | 'replace'\n | 'push'\n | 'none'\n | ((params: { locale: LocalesValues; path: string }) => void);\n};\n\nexport type UseLocaleResult = UseLocaleResultReact & {\n pathWithoutLocale: string;\n};\n\nconst usePathWithoutLocale = () => {\n const pathname = usePathname(); // updates on client navigations\n const [fullPath, setFullPath] = useState(pathname);\n\n useEffect(() => {\n // Runs only on client; avoids suspense.\n const search = typeof window !== 'undefined' ? window.location.search : '';\n setFullPath(search ? `${pathname}${search}` : pathname);\n }, [pathname]);\n\n // Your own helper\n return useMemo(() => getPathWithoutLocale(fullPath), [fullPath]);\n};\n\n/**\n * Hook to manage the current locale in Next.js App Router.\n *\n * This hook extends the base `useLocale` from `react-intlayer` by adding\n * Next.js-specific navigation logic for locale changes.\n *\n * @param props - Optional properties to configure locale change behavior.\n * @returns An object containing the current locale, path without locale, and functions to update the locale.\n *\n * @example\n * ```tsx\n * 'use client';\n *\n * import { useLocale } from 'next-intlayer';\n *\n * const LocaleSwitcher = () => {\n * const { setLocale } = useLocale({ onChange: 'push' });\n *\n * return (\n * <button onClick={() => setLocale('fr')}>Switch to French</button>\n * );\n * };\n * ```\n */\nexport const useLocale = ({\n onChange = 'replace',\n onLocaleChange,\n isCookieEnabled,\n}: UseLocaleProps = {}): UseLocaleResult => {\n const { replace, push } = useRouter();\n const pathWithoutLocale = usePathWithoutLocale();\n\n const redirectionFunction = useCallback(\n (locale: LocalesValues) => {\n if (!onChange) return;\n\n const currentDomain =\n process.env['INTLAYER_ROUTING_DOMAINS'] !== 'false' &&\n typeof window !== 'undefined'\n ? window.location.hostname\n : undefined;\n\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale, {\n currentDomain,\n });\n\n if (typeof onChange === 'function') {\n onChange({ locale, path: pathWithLocale });\n return;\n }\n\n // Cross-domain navigation: the Next.js router cannot navigate to a\n // different origin, so fall back to a full page load.\n if (\n process.env['INTLAYER_ROUTING_DOMAINS'] !== 'false' &&\n checkIsURLAbsolute(pathWithLocale)\n ) {\n window.location.href = pathWithLocale;\n return;\n }\n\n if (onChange === 'replace') {\n replace(pathWithLocale);\n }\n if (onChange === 'push') {\n push(pathWithLocale);\n }\n\n onLocaleChange?.(locale as DeclaredLocales);\n },\n [replace, push, pathWithoutLocale, onChange, onLocaleChange]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n isCookieEnabled,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n } as UseLocaleResult;\n};\n"],"mappings":";;;;;;;;;;;AAgCA,MAAM,6BAA6B;CACjC,MAAM,gDAAwB;CAC9B,MAAM,CAAC,UAAU,mCAAwB,SAAS;CAElD,2BAAgB;EAEd,MAAM,SAAS,OAAO,WAAW,cAAc,OAAO,SAAS,SAAS;EACxE,YAAY,SAAS,GAAG,WAAW,WAAW,SAAS;IACtD,CAAC,SAAS,CAAC;CAGd,sFAA0C,SAAS,EAAE,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BlE,MAAa,aAAa,EACxB,WAAW,WACX,gBACA,oBACkB,EAAE,KAAsB;CAC1C,MAAM,EAAE,SAAS,4CAAoB;CACrC,MAAM,oBAAoB,sBAAsB;CAgDhD,OAAO;EACL,iCANqC;GACrC,wCAzCC,WAA0B;IACzB,IAAI,CAAC,UAAU;IAQf,MAAM,kEAAiC,mBAAmB,QAAQ,EAChE,eANA,QAAQ,IAAI,gCAAgC,WAC5C,OAAO,WAAW,cACd,OAAO,SAAS,WAChB,QAIL,CAAC;IAEF,IAAI,OAAO,aAAa,YAAY;KAClC,SAAS;MAAE;MAAQ,MAAM;MAAgB,CAAC;KAC1C;;IAKF,IACE,QAAQ,IAAI,gCAAgC,wDACzB,eAAe,EAClC;KACA,OAAO,SAAS,OAAO;KACvB;;IAGF,IAAI,aAAa,WACf,QAAQ,eAAe;IAEzB,IAAI,aAAa,QACf,KAAK,eAAe;IAGtB,iBAAiB,OAA0B;MAE7C;IAAC;IAAS;IAAM;IAAmB;IAAU;IAAe,CAIzB;GACnC;GACD,CAGmB;EAClB;EACD"}
|
|
@@ -29,14 +29,22 @@ let next_router_js = require("next/router.js");
|
|
|
29
29
|
* };
|
|
30
30
|
* ```
|
|
31
31
|
*/
|
|
32
|
-
const useLocalePageRouter = () => {
|
|
32
|
+
const useLocalePageRouter = ({ onLocaleChange, isCookieEnabled } = {}) => {
|
|
33
33
|
const { push, pathname, reload } = (0, next_router_js.useRouter)();
|
|
34
34
|
const pathWithoutLocale = (0, react.useMemo)(() => (0, _intlayer_core_localization.getPathWithoutLocale)(pathname), [pathname]);
|
|
35
35
|
return {
|
|
36
|
-
...(0, react_intlayer.useLocale)({
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
...(0, react_intlayer.useLocale)({
|
|
37
|
+
onLocaleChange: (0, react.useCallback)((locale) => {
|
|
38
|
+
push((0, _intlayer_core_localization.getLocalizedUrl)(pathWithoutLocale, locale));
|
|
39
|
+
onLocaleChange?.(locale);
|
|
40
|
+
return reload();
|
|
41
|
+
}, [
|
|
42
|
+
pathWithoutLocale,
|
|
43
|
+
onLocaleChange,
|
|
44
|
+
reload
|
|
45
|
+
]),
|
|
46
|
+
isCookieEnabled
|
|
47
|
+
}),
|
|
40
48
|
pathWithoutLocale
|
|
41
49
|
};
|
|
42
50
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocalePageRouter.cjs","names":[],"sources":["../../../src/client/useLocalePageRouter.ts"],"sourcesContent":["'use client';\n\nimport {\n getLocalizedUrl,\n getPathWithoutLocale,\n} from '@intlayer/core/localization';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\nimport { useRouter } from 'next/router.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\n\n/**\n * Hook to manage the current locale in Next.js Page Router.\n *\n * This hook provides locale management functionality tailored for the Next.js Page Router,\n * handling redirections and page reloads upon locale changes.\n *\n * @returns An object containing the current locale, path without locale, and functions to update the locale.\n *\n * @example\n * ```tsx\n * import { useLocalePageRouter } from 'next-intlayer';\n *\n * const MyComponent = () => {\n * const { setLocale } = useLocalePageRouter();\n *\n * return (\n * <button onClick={() => setLocale('fr')}>Switch to French</button>\n * );\n * };\n * ```\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: LocalesValues) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n return reload();\n },\n [pathWithoutLocale]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useLocalePageRouter.cjs","names":[],"sources":["../../../src/client/useLocalePageRouter.ts"],"sourcesContent":["'use client';\n\nimport {\n getLocalizedUrl,\n getPathWithoutLocale,\n} from '@intlayer/core/localization';\nimport type { Locale } from '@intlayer/types/allLocales';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\nimport { useRouter } from 'next/router.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\nimport type { UseLocaleProps, UseLocaleResult } from './useLocale';\n\n/**\n * Hook to manage the current locale in Next.js Page Router.\n *\n * This hook provides locale management functionality tailored for the Next.js Page Router,\n * handling redirections and page reloads upon locale changes.\n *\n * @returns An object containing the current locale, path without locale, and functions to update the locale.\n *\n * @example\n * ```tsx\n * import { useLocalePageRouter } from 'next-intlayer';\n *\n * const MyComponent = () => {\n * const { setLocale } = useLocalePageRouter();\n *\n * return (\n * <button onClick={() => setLocale('fr')}>Switch to French</button>\n * );\n * };\n * ```\n */\nexport const useLocalePageRouter = ({\n onLocaleChange,\n isCookieEnabled,\n}: UseLocaleProps = {}): UseLocaleResult => {\n const { push, pathname, reload } = useRouter();\n const pathWithoutLocale = useMemo(\n () => getPathWithoutLocale(pathname),\n [pathname]\n );\n\n const redirectionFunction = useCallback(\n (locale: LocalesValues) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n onLocaleChange?.(locale as Locale);\n\n return reload();\n },\n [pathWithoutLocale, onLocaleChange, reload]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n isCookieEnabled,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n } as UseLocaleResult;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,uBAAuB,EAClC,gBACA,oBACkB,EAAE,KAAsB;CAC1C,MAAM,EAAE,MAAM,UAAU,0CAAsB;CAC9C,MAAM,mGACuB,SAAS,EACpC,CAAC,SAAS,CACX;CAoBD,OAAO;EACL,iCANqC;GACrC,wCAbC,WAA0B;IAGzB,sDAFuC,mBAAmB,OAEvC,CAAC;IAEpB,iBAAiB,OAAiB;IAElC,OAAO,QAAQ;MAEjB;IAAC;IAAmB;IAAgB;IAAO,CAIR;GACnC;GACD,CAGmB;EAClB;EACD"}
|
|
@@ -40,32 +40,37 @@ const usePathWithoutLocale = () => {
|
|
|
40
40
|
* };
|
|
41
41
|
* ```
|
|
42
42
|
*/
|
|
43
|
-
const useLocale = ({ onChange = "replace" } = {}) => {
|
|
43
|
+
const useLocale = ({ onChange = "replace", onLocaleChange, isCookieEnabled } = {}) => {
|
|
44
44
|
const { replace, push } = useRouter();
|
|
45
45
|
const pathWithoutLocale = usePathWithoutLocale();
|
|
46
46
|
return {
|
|
47
|
-
...useLocale$1({
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
onChange
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
47
|
+
...useLocale$1({
|
|
48
|
+
onLocaleChange: useCallback((locale) => {
|
|
49
|
+
if (!onChange) return;
|
|
50
|
+
const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale, { currentDomain: process.env["INTLAYER_ROUTING_DOMAINS"] !== "false" && typeof window !== "undefined" ? window.location.hostname : void 0 });
|
|
51
|
+
if (typeof onChange === "function") {
|
|
52
|
+
onChange({
|
|
53
|
+
locale,
|
|
54
|
+
path: pathWithLocale
|
|
55
|
+
});
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
if (process.env["INTLAYER_ROUTING_DOMAINS"] !== "false" && checkIsURLAbsolute(pathWithLocale)) {
|
|
59
|
+
window.location.href = pathWithLocale;
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
if (onChange === "replace") replace(pathWithLocale);
|
|
63
|
+
if (onChange === "push") push(pathWithLocale);
|
|
64
|
+
onLocaleChange?.(locale);
|
|
65
|
+
}, [
|
|
66
|
+
replace,
|
|
67
|
+
push,
|
|
68
|
+
pathWithoutLocale,
|
|
69
|
+
onChange,
|
|
70
|
+
onLocaleChange
|
|
71
|
+
]),
|
|
72
|
+
isCookieEnabled
|
|
73
|
+
}),
|
|
69
74
|
pathWithoutLocale
|
|
70
75
|
};
|
|
71
76
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.mjs","names":["useLocaleReact"],"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["'use client';\n\nimport {\n getLocalizedUrl,\n getPathWithoutLocale,\n} from '@intlayer/core/localization';\nimport { checkIsURLAbsolute } from '@intlayer/core/utils';\nimport type {
|
|
1
|
+
{"version":3,"file":"useLocale.mjs","names":["useLocaleReact"],"sources":["../../../src/client/useLocale.ts"],"sourcesContent":["'use client';\n\nimport {\n getLocalizedUrl,\n getPathWithoutLocale,\n} from '@intlayer/core/localization';\nimport { checkIsURLAbsolute } from '@intlayer/core/utils';\nimport type {\n DeclaredLocales,\n LocalesValues,\n} from '@intlayer/types/module_augmentation';\nimport { usePathname, useRouter } from 'next/navigation.js';\nimport { useCallback, useEffect, useMemo, useState } from 'react';\nimport {\n type UseLocaleResult as UseLocaleResultReact,\n useLocale as useLocaleReact,\n} from 'react-intlayer';\n\nexport type UseLocaleProps = {\n isCookieEnabled?: boolean;\n onLocaleChange?: (locale: DeclaredLocales) => void;\n onChange?:\n | 'replace'\n | 'push'\n | 'none'\n | ((params: { locale: LocalesValues; path: string }) => void);\n};\n\nexport type UseLocaleResult = UseLocaleResultReact & {\n pathWithoutLocale: string;\n};\n\nconst usePathWithoutLocale = () => {\n const pathname = usePathname(); // updates on client navigations\n const [fullPath, setFullPath] = useState(pathname);\n\n useEffect(() => {\n // Runs only on client; avoids suspense.\n const search = typeof window !== 'undefined' ? window.location.search : '';\n setFullPath(search ? `${pathname}${search}` : pathname);\n }, [pathname]);\n\n // Your own helper\n return useMemo(() => getPathWithoutLocale(fullPath), [fullPath]);\n};\n\n/**\n * Hook to manage the current locale in Next.js App Router.\n *\n * This hook extends the base `useLocale` from `react-intlayer` by adding\n * Next.js-specific navigation logic for locale changes.\n *\n * @param props - Optional properties to configure locale change behavior.\n * @returns An object containing the current locale, path without locale, and functions to update the locale.\n *\n * @example\n * ```tsx\n * 'use client';\n *\n * import { useLocale } from 'next-intlayer';\n *\n * const LocaleSwitcher = () => {\n * const { setLocale } = useLocale({ onChange: 'push' });\n *\n * return (\n * <button onClick={() => setLocale('fr')}>Switch to French</button>\n * );\n * };\n * ```\n */\nexport const useLocale = ({\n onChange = 'replace',\n onLocaleChange,\n isCookieEnabled,\n}: UseLocaleProps = {}): UseLocaleResult => {\n const { replace, push } = useRouter();\n const pathWithoutLocale = usePathWithoutLocale();\n\n const redirectionFunction = useCallback(\n (locale: LocalesValues) => {\n if (!onChange) return;\n\n const currentDomain =\n process.env['INTLAYER_ROUTING_DOMAINS'] !== 'false' &&\n typeof window !== 'undefined'\n ? window.location.hostname\n : undefined;\n\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale, {\n currentDomain,\n });\n\n if (typeof onChange === 'function') {\n onChange({ locale, path: pathWithLocale });\n return;\n }\n\n // Cross-domain navigation: the Next.js router cannot navigate to a\n // different origin, so fall back to a full page load.\n if (\n process.env['INTLAYER_ROUTING_DOMAINS'] !== 'false' &&\n checkIsURLAbsolute(pathWithLocale)\n ) {\n window.location.href = pathWithLocale;\n return;\n }\n\n if (onChange === 'replace') {\n replace(pathWithLocale);\n }\n if (onChange === 'push') {\n push(pathWithLocale);\n }\n\n onLocaleChange?.(locale as DeclaredLocales);\n },\n [replace, push, pathWithoutLocale, onChange, onLocaleChange]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n isCookieEnabled,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n } as UseLocaleResult;\n};\n"],"mappings":";;;;;;;;;AAgCA,MAAM,6BAA6B;CACjC,MAAM,WAAW,aAAa;CAC9B,MAAM,CAAC,UAAU,eAAe,SAAS,SAAS;CAElD,gBAAgB;EAEd,MAAM,SAAS,OAAO,WAAW,cAAc,OAAO,SAAS,SAAS;EACxE,YAAY,SAAS,GAAG,WAAW,WAAW,SAAS;IACtD,CAAC,SAAS,CAAC;CAGd,OAAO,cAAc,qBAAqB,SAAS,EAAE,CAAC,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BlE,MAAa,aAAa,EACxB,WAAW,WACX,gBACA,oBACkB,EAAE,KAAsB;CAC1C,MAAM,EAAE,SAAS,SAAS,WAAW;CACrC,MAAM,oBAAoB,sBAAsB;CAgDhD,OAAO;EACL,GANsBA,YAAe;GACrC,gBA1C0B,aACzB,WAA0B;IACzB,IAAI,CAAC,UAAU;IAQf,MAAM,iBAAiB,gBAAgB,mBAAmB,QAAQ,EAChE,eANA,QAAQ,IAAI,gCAAgC,WAC5C,OAAO,WAAW,cACd,OAAO,SAAS,WAChB,QAIL,CAAC;IAEF,IAAI,OAAO,aAAa,YAAY;KAClC,SAAS;MAAE;MAAQ,MAAM;MAAgB,CAAC;KAC1C;;IAKF,IACE,QAAQ,IAAI,gCAAgC,WAC5C,mBAAmB,eAAe,EAClC;KACA,OAAO,SAAS,OAAO;KACvB;;IAGF,IAAI,aAAa,WACf,QAAQ,eAAe;IAEzB,IAAI,aAAa,QACf,KAAK,eAAe;IAGtB,iBAAiB,OAA0B;MAE7C;IAAC;IAAS;IAAM;IAAmB;IAAU;IAAe,CAIzB;GACnC;GACD,CAGmB;EAClB;EACD"}
|
|
@@ -27,14 +27,22 @@ import { useRouter } from "next/router.js";
|
|
|
27
27
|
* };
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
const useLocalePageRouter = () => {
|
|
30
|
+
const useLocalePageRouter = ({ onLocaleChange, isCookieEnabled } = {}) => {
|
|
31
31
|
const { push, pathname, reload } = useRouter();
|
|
32
32
|
const pathWithoutLocale = useMemo(() => getPathWithoutLocale(pathname), [pathname]);
|
|
33
33
|
return {
|
|
34
|
-
...useLocale({
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
...useLocale({
|
|
35
|
+
onLocaleChange: useCallback((locale) => {
|
|
36
|
+
push(getLocalizedUrl(pathWithoutLocale, locale));
|
|
37
|
+
onLocaleChange?.(locale);
|
|
38
|
+
return reload();
|
|
39
|
+
}, [
|
|
40
|
+
pathWithoutLocale,
|
|
41
|
+
onLocaleChange,
|
|
42
|
+
reload
|
|
43
|
+
]),
|
|
44
|
+
isCookieEnabled
|
|
45
|
+
}),
|
|
38
46
|
pathWithoutLocale
|
|
39
47
|
};
|
|
40
48
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocalePageRouter.mjs","names":["useLocaleReact"],"sources":["../../../src/client/useLocalePageRouter.ts"],"sourcesContent":["'use client';\n\nimport {\n getLocalizedUrl,\n getPathWithoutLocale,\n} from '@intlayer/core/localization';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\nimport { useRouter } from 'next/router.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\n\n/**\n * Hook to manage the current locale in Next.js Page Router.\n *\n * This hook provides locale management functionality tailored for the Next.js Page Router,\n * handling redirections and page reloads upon locale changes.\n *\n * @returns An object containing the current locale, path without locale, and functions to update the locale.\n *\n * @example\n * ```tsx\n * import { useLocalePageRouter } from 'next-intlayer';\n *\n * const MyComponent = () => {\n * const { setLocale } = useLocalePageRouter();\n *\n * return (\n * <button onClick={() => setLocale('fr')}>Switch to French</button>\n * );\n * };\n * ```\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: LocalesValues) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n return reload();\n },\n [pathWithoutLocale]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useLocalePageRouter.mjs","names":["useLocaleReact"],"sources":["../../../src/client/useLocalePageRouter.ts"],"sourcesContent":["'use client';\n\nimport {\n getLocalizedUrl,\n getPathWithoutLocale,\n} from '@intlayer/core/localization';\nimport type { Locale } from '@intlayer/types/allLocales';\nimport type { LocalesValues } from '@intlayer/types/module_augmentation';\nimport { useRouter } from 'next/router.js';\nimport { useCallback, useMemo } from 'react';\nimport { useLocale as useLocaleReact } from 'react-intlayer';\nimport type { UseLocaleProps, UseLocaleResult } from './useLocale';\n\n/**\n * Hook to manage the current locale in Next.js Page Router.\n *\n * This hook provides locale management functionality tailored for the Next.js Page Router,\n * handling redirections and page reloads upon locale changes.\n *\n * @returns An object containing the current locale, path without locale, and functions to update the locale.\n *\n * @example\n * ```tsx\n * import { useLocalePageRouter } from 'next-intlayer';\n *\n * const MyComponent = () => {\n * const { setLocale } = useLocalePageRouter();\n *\n * return (\n * <button onClick={() => setLocale('fr')}>Switch to French</button>\n * );\n * };\n * ```\n */\nexport const useLocalePageRouter = ({\n onLocaleChange,\n isCookieEnabled,\n}: UseLocaleProps = {}): UseLocaleResult => {\n const { push, pathname, reload } = useRouter();\n const pathWithoutLocale = useMemo(\n () => getPathWithoutLocale(pathname),\n [pathname]\n );\n\n const redirectionFunction = useCallback(\n (locale: LocalesValues) => {\n const pathWithLocale = getLocalizedUrl(pathWithoutLocale, locale);\n\n push(pathWithLocale);\n\n onLocaleChange?.(locale as Locale);\n\n return reload();\n },\n [pathWithoutLocale, onLocaleChange, reload]\n );\n\n const reactLocaleHook = useLocaleReact({\n onLocaleChange: redirectionFunction,\n isCookieEnabled,\n });\n\n return {\n ...reactLocaleHook,\n pathWithoutLocale,\n } as UseLocaleResult;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,MAAa,uBAAuB,EAClC,gBACA,oBACkB,EAAE,KAAsB;CAC1C,MAAM,EAAE,MAAM,UAAU,WAAW,WAAW;CAC9C,MAAM,oBAAoB,cAClB,qBAAqB,SAAS,EACpC,CAAC,SAAS,CACX;CAoBD,OAAO;EACL,GANsBA,UAAe;GACrC,gBAd0B,aACzB,WAA0B;IAGzB,KAFuB,gBAAgB,mBAAmB,OAEvC,CAAC;IAEpB,iBAAiB,OAAiB;IAElC,OAAO,QAAQ;MAEjB;IAAC;IAAmB;IAAgB;IAAO,CAIR;GACnC;GACD,CAGmB;EAClB;EACD"}
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UseLocaleResult as UseLocaleResult$1 } from "react-intlayer";
|
|
2
|
+
import { DeclaredLocales, LocalesValues } from "@intlayer/types/module_augmentation";
|
|
2
3
|
|
|
3
4
|
//#region src/client/useLocale.d.ts
|
|
4
5
|
type UseLocaleProps = {
|
|
6
|
+
isCookieEnabled?: boolean;
|
|
7
|
+
onLocaleChange?: (locale: DeclaredLocales) => void;
|
|
5
8
|
onChange?: 'replace' | 'push' | 'none' | ((params: {
|
|
6
9
|
locale: LocalesValues;
|
|
7
10
|
path: string;
|
|
8
11
|
}) => void);
|
|
9
12
|
};
|
|
13
|
+
type UseLocaleResult = UseLocaleResult$1 & {
|
|
14
|
+
pathWithoutLocale: string;
|
|
15
|
+
};
|
|
10
16
|
/**
|
|
11
17
|
* Hook to manage the current locale in Next.js App Router.
|
|
12
18
|
*
|
|
@@ -32,14 +38,10 @@ type UseLocaleProps = {
|
|
|
32
38
|
* ```
|
|
33
39
|
*/
|
|
34
40
|
declare const useLocale: ({
|
|
35
|
-
onChange
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
defaultLocale: LocalesValues;
|
|
40
|
-
availableLocales: LocalesValues[];
|
|
41
|
-
setLocale: (locale: LocalesValues) => void;
|
|
42
|
-
};
|
|
41
|
+
onChange,
|
|
42
|
+
onLocaleChange,
|
|
43
|
+
isCookieEnabled
|
|
44
|
+
}?: UseLocaleProps) => UseLocaleResult;
|
|
43
45
|
//#endregion
|
|
44
|
-
export { useLocale };
|
|
46
|
+
export { UseLocaleProps, UseLocaleResult, useLocale };
|
|
45
47
|
//# sourceMappingURL=useLocale.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"useLocale.d.ts","names":[],"sources":["../../../src/client/useLocale.ts"],"mappings":";;;;KAkBY,cAAA;EACV,eAAA;EACA,cAAA,IAAkB,MAAA,EAAQ,eAAA;EAC1B,QAAA,mCAIM,MAAA;IAAU,MAAA,EAAQ,aAAA;IAAe,IAAA;EAAA;AAAA;AAAA,KAG7B,eAAA,GAAkB,iBAAA;EAC5B,iBAAA;AAAA;;;;;;;AADF;;;;;AA0CA;;;;;;;;;;;;;cAAa,SAAA;EAAa,QAAA;EAAA,cAAA;EAAA;AAAA,IAIvB,cAAA,KAAsB,eAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UseLocaleProps, UseLocaleResult } from "./useLocale.js";
|
|
2
2
|
|
|
3
3
|
//#region src/client/useLocalePageRouter.d.ts
|
|
4
4
|
/**
|
|
@@ -22,13 +22,10 @@ import { LocalesValues } from "@intlayer/types/module_augmentation";
|
|
|
22
22
|
* };
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
declare const useLocalePageRouter: (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
availableLocales: LocalesValues[];
|
|
30
|
-
setLocale: (locale: LocalesValues) => void;
|
|
31
|
-
};
|
|
25
|
+
declare const useLocalePageRouter: ({
|
|
26
|
+
onLocaleChange,
|
|
27
|
+
isCookieEnabled
|
|
28
|
+
}?: UseLocaleProps) => UseLocaleResult;
|
|
32
29
|
//#endregion
|
|
33
30
|
export { useLocalePageRouter };
|
|
34
31
|
//# sourceMappingURL=useLocalePageRouter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLocalePageRouter.d.ts","names":[],"sources":["../../../src/client/useLocalePageRouter.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"useLocalePageRouter.d.ts","names":[],"sources":["../../../src/client/useLocalePageRouter.ts"],"mappings":";;;;;AAkCA;;;;;;;;;;;;;;;;;;;cAAa,mBAAA;EAAuB,cAAA;EAAA;AAAA,IAGjC,cAAA,KAAsB,eAAA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -18,7 +18,6 @@ declare const MarkdownProvider: _$react.FC<index_d_exports.MarkdownProviderOptio
|
|
|
18
18
|
hr?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLHRElement>, HTMLHRElement>>;
|
|
19
19
|
th?: _$react.FC<_$react.DetailedHTMLProps<_$react.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>>;
|
|
20
20
|
tr?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>>;
|
|
21
|
-
output?: _$react.FC<_$react.DetailedHTMLProps<_$react.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>>;
|
|
22
21
|
html?: _$react.FC<_$react.DetailedHTMLProps<_$react.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>>;
|
|
23
22
|
head?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>>;
|
|
24
23
|
body?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>>;
|
|
@@ -87,6 +86,7 @@ declare const MarkdownProvider: _$react.FC<index_d_exports.MarkdownProviderOptio
|
|
|
87
86
|
fieldset?: _$react.FC<_$react.DetailedHTMLProps<_$react.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>>;
|
|
88
87
|
legend?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>>;
|
|
89
88
|
datalist?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>>;
|
|
89
|
+
output?: _$react.FC<_$react.DetailedHTMLProps<_$react.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>>;
|
|
90
90
|
progress?: _$react.FC<_$react.DetailedHTMLProps<_$react.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>>;
|
|
91
91
|
meter?: _$react.FC<_$react.DetailedHTMLProps<_$react.MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>>;
|
|
92
92
|
img?: _$react.FC<_$react.DetailedHTMLProps<_$react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>>;
|
|
@@ -123,7 +123,6 @@ declare const MarkdownProvider: _$react.FC<index_d_exports.MarkdownProviderOptio
|
|
|
123
123
|
hr?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLHRElement>, HTMLHRElement>>;
|
|
124
124
|
th?: _$react.FC<_$react.DetailedHTMLProps<_$react.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>>;
|
|
125
125
|
tr?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>>;
|
|
126
|
-
output?: _$react.FC<_$react.DetailedHTMLProps<_$react.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>>;
|
|
127
126
|
html?: _$react.FC<_$react.DetailedHTMLProps<_$react.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>>;
|
|
128
127
|
head?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>>;
|
|
129
128
|
body?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>>;
|
|
@@ -192,6 +191,7 @@ declare const MarkdownProvider: _$react.FC<index_d_exports.MarkdownProviderOptio
|
|
|
192
191
|
fieldset?: _$react.FC<_$react.DetailedHTMLProps<_$react.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>>;
|
|
193
192
|
legend?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>>;
|
|
194
193
|
datalist?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>>;
|
|
194
|
+
output?: _$react.FC<_$react.DetailedHTMLProps<_$react.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>>;
|
|
195
195
|
progress?: _$react.FC<_$react.DetailedHTMLProps<_$react.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>>;
|
|
196
196
|
meter?: _$react.FC<_$react.DetailedHTMLProps<_$react.MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>>;
|
|
197
197
|
img?: _$react.FC<_$react.DetailedHTMLProps<_$react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>>;
|
|
@@ -234,7 +234,6 @@ declare const useMarkdownContext: () => {
|
|
|
234
234
|
hr?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLHRElement>, HTMLHRElement>>;
|
|
235
235
|
th?: _$react.FC<_$react.DetailedHTMLProps<_$react.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>>;
|
|
236
236
|
tr?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>>;
|
|
237
|
-
output?: _$react.FC<_$react.DetailedHTMLProps<_$react.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>>;
|
|
238
237
|
html?: _$react.FC<_$react.DetailedHTMLProps<_$react.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>>;
|
|
239
238
|
head?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>>;
|
|
240
239
|
body?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>>;
|
|
@@ -303,6 +302,7 @@ declare const useMarkdownContext: () => {
|
|
|
303
302
|
fieldset?: _$react.FC<_$react.DetailedHTMLProps<_$react.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>>;
|
|
304
303
|
legend?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>>;
|
|
305
304
|
datalist?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>>;
|
|
305
|
+
output?: _$react.FC<_$react.DetailedHTMLProps<_$react.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>>;
|
|
306
306
|
progress?: _$react.FC<_$react.DetailedHTMLProps<_$react.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>>;
|
|
307
307
|
meter?: _$react.FC<_$react.DetailedHTMLProps<_$react.MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>>;
|
|
308
308
|
img?: _$react.FC<_$react.DetailedHTMLProps<_$react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>>;
|
|
@@ -338,7 +338,6 @@ declare const useMarkdownContext: () => {
|
|
|
338
338
|
hr?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLHRElement>, HTMLHRElement>>;
|
|
339
339
|
th?: _$react.FC<_$react.DetailedHTMLProps<_$react.ThHTMLAttributes<HTMLTableHeaderCellElement>, HTMLTableHeaderCellElement>>;
|
|
340
340
|
tr?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>>;
|
|
341
|
-
output?: _$react.FC<_$react.DetailedHTMLProps<_$react.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>>;
|
|
342
341
|
html?: _$react.FC<_$react.DetailedHTMLProps<_$react.HtmlHTMLAttributes<HTMLHtmlElement>, HTMLHtmlElement>>;
|
|
343
342
|
head?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLHeadElement>, HTMLHeadElement>>;
|
|
344
343
|
body?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLBodyElement>, HTMLBodyElement>>;
|
|
@@ -407,6 +406,7 @@ declare const useMarkdownContext: () => {
|
|
|
407
406
|
fieldset?: _$react.FC<_$react.DetailedHTMLProps<_$react.FieldsetHTMLAttributes<HTMLFieldSetElement>, HTMLFieldSetElement>>;
|
|
408
407
|
legend?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLLegendElement>, HTMLLegendElement>>;
|
|
409
408
|
datalist?: _$react.FC<_$react.DetailedHTMLProps<_$react.HTMLAttributes<HTMLDataListElement>, HTMLDataListElement>>;
|
|
409
|
+
output?: _$react.FC<_$react.DetailedHTMLProps<_$react.OutputHTMLAttributes<HTMLOutputElement>, HTMLOutputElement>>;
|
|
410
410
|
progress?: _$react.FC<_$react.DetailedHTMLProps<_$react.ProgressHTMLAttributes<HTMLProgressElement>, HTMLProgressElement>>;
|
|
411
411
|
meter?: _$react.FC<_$react.DetailedHTMLProps<_$react.MeterHTMLAttributes<HTMLMeterElement>, HTMLMeterElement>>;
|
|
412
412
|
img?: _$react.FC<_$react.DetailedHTMLProps<_$react.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-intlayer",
|
|
3
|
-
"version": "8.9.
|
|
3
|
+
"version": "8.9.4-canary.0",
|
|
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": [
|
|
@@ -128,18 +128,18 @@
|
|
|
128
128
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
129
129
|
},
|
|
130
130
|
"dependencies": {
|
|
131
|
-
"@intlayer/chokidar": "8.9.
|
|
132
|
-
"@intlayer/config": "8.9.
|
|
133
|
-
"@intlayer/core": "8.9.
|
|
134
|
-
"@intlayer/dictionaries-entry": "8.9.
|
|
135
|
-
"@intlayer/types": "8.9.
|
|
136
|
-
"@intlayer/webpack": "8.9.
|
|
131
|
+
"@intlayer/chokidar": "8.9.4-canary.0",
|
|
132
|
+
"@intlayer/config": "8.9.4-canary.0",
|
|
133
|
+
"@intlayer/core": "8.9.4-canary.0",
|
|
134
|
+
"@intlayer/dictionaries-entry": "8.9.4-canary.0",
|
|
135
|
+
"@intlayer/types": "8.9.4-canary.0",
|
|
136
|
+
"@intlayer/webpack": "8.9.4-canary.0",
|
|
137
137
|
"defu": "6.1.7",
|
|
138
138
|
"node-loader": "2.1.0",
|
|
139
|
-
"react-intlayer": "8.9.
|
|
139
|
+
"react-intlayer": "8.9.4-canary.0"
|
|
140
140
|
},
|
|
141
141
|
"devDependencies": {
|
|
142
|
-
"@types/node": "25.6.
|
|
142
|
+
"@types/node": "25.6.2",
|
|
143
143
|
"@types/react": ">=16.0.0",
|
|
144
144
|
"@types/react-dom": ">=16.0.0",
|
|
145
145
|
"@utils/ts-config": "1.0.4",
|