next-intl 3.3.0 → 3.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/src/navigation/react-client/clientRedirect.d.ts +2 -2
- package/dist/types/src/navigation/react-client/createLocalizedPathnamesNavigation.d.ts +1 -1
- package/dist/types/src/navigation/react-client/createSharedPathnamesNavigation.d.ts +1 -1
- package/dist/types/src/navigation/react-server/createLocalizedPathnamesNavigation.d.ts +1 -1
- package/dist/types/src/navigation/react-server/createSharedPathnamesNavigation.d.ts +1 -1
- package/dist/types/src/navigation/react-server/serverRedirect.d.ts +2 -2
- package/package.json +5 -5
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LocalePrefix,
|
|
1
|
+
import { LocalePrefix, ParametersExceptFirst } from '../../shared/types';
|
|
2
2
|
import baseRedirect from '../shared/baseRedirect';
|
|
3
3
|
export default function clientRedirect(params: {
|
|
4
4
|
localePrefix?: LocalePrefix;
|
|
5
5
|
pathname: string;
|
|
6
|
-
}, ...args:
|
|
6
|
+
}, ...args: ParametersExceptFirst<typeof baseRedirect>): never;
|
|
@@ -57,7 +57,7 @@ export default function createLocalizedPathnamesNavigation<Locales extends AllLo
|
|
|
57
57
|
} & {
|
|
58
58
|
ref?: ComponentProps<typeof ClientLink>['ref'];
|
|
59
59
|
}) => ReactElement;
|
|
60
|
-
redirect: <Pathname_1 extends keyof PathnamesConfig>(href: HrefOrHrefWithParams<Pathname_1
|
|
60
|
+
redirect: <Pathname_1 extends keyof PathnamesConfig>(href: HrefOrHrefWithParams<Pathname_1>, type?: import("next/navigation").RedirectType | undefined) => never;
|
|
61
61
|
usePathname: () => keyof PathnamesConfig;
|
|
62
62
|
useRouter: () => {
|
|
63
63
|
push<Pathname_2 extends keyof PathnamesConfig>(href: HrefOrHrefWithParams<Pathname_2>, options?: (import("next/dist/shared/lib/app-router-context.shared-runtime").NavigateOptions & {
|
|
@@ -44,7 +44,7 @@ export default function createSharedPathnamesNavigation<Locales extends AllLocal
|
|
|
44
44
|
}, "localePrefix"> & {
|
|
45
45
|
ref?: React.Ref<HTMLAnchorElement> | undefined;
|
|
46
46
|
}) => ReactElement;
|
|
47
|
-
redirect: (pathname: string) => never;
|
|
47
|
+
redirect: (pathname: string, type?: import("next/navigation").RedirectType | undefined) => never;
|
|
48
48
|
usePathname: () => string;
|
|
49
49
|
useRouter: typeof useBaseRouter;
|
|
50
50
|
};
|
|
@@ -52,7 +52,7 @@ export default function createLocalizedPathnamesNavigation<Locales extends AllLo
|
|
|
52
52
|
} & Omit<import("url").UrlObject, "pathname">);
|
|
53
53
|
locale?: Locales[number] | undefined;
|
|
54
54
|
}) => React.JSX.Element;
|
|
55
|
-
redirect: <Pathname_1 extends keyof PathnamesConfig>(href: HrefOrHrefWithParams<Pathname_1
|
|
55
|
+
redirect: <Pathname_1 extends keyof PathnamesConfig>(href: HrefOrHrefWithParams<Pathname_1>, type?: import("next/navigation").RedirectType | undefined) => never;
|
|
56
56
|
getPathname: ({ href, locale }: {
|
|
57
57
|
locale: Locales[number];
|
|
58
58
|
href: HrefOrHrefWithParams<keyof PathnamesConfig>;
|
|
@@ -6,7 +6,7 @@ export default function createSharedPathnamesNavigation<Locales extends AllLocal
|
|
|
6
6
|
localePrefix?: LocalePrefix;
|
|
7
7
|
}): {
|
|
8
8
|
Link: (props: ComponentProps<typeof ServerLink<Locales>>) => React.JSX.Element;
|
|
9
|
-
redirect: (pathname: string) => never;
|
|
9
|
+
redirect: (pathname: string, type?: import("next/navigation").RedirectType | undefined) => never;
|
|
10
10
|
usePathname: () => never;
|
|
11
11
|
useRouter: () => never;
|
|
12
12
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { LocalePrefix,
|
|
1
|
+
import { LocalePrefix, ParametersExceptFirst } from '../../shared/types';
|
|
2
2
|
import baseRedirect from '../shared/baseRedirect';
|
|
3
3
|
export default function serverRedirect(params: {
|
|
4
4
|
pathname: string;
|
|
5
5
|
localePrefix?: LocalePrefix;
|
|
6
|
-
}, ...args:
|
|
6
|
+
}, ...args: ParametersExceptFirst<typeof baseRedirect>): never;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "next-intl",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.2",
|
|
4
4
|
"sideEffects": false,
|
|
5
5
|
"author": "Jan Amann <jan@amann.work>",
|
|
6
6
|
"funding": [
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"dependencies": {
|
|
81
81
|
"@formatjs/intl-localematcher": "^0.2.32",
|
|
82
82
|
"negotiator": "^0.6.3",
|
|
83
|
-
"use-intl": "^3.3.
|
|
83
|
+
"use-intl": "^3.3.2"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"next": "^10.0.0 || ^11.0.0 || ^12.0.0 || ^13.0.0 || ^14.0.0",
|
|
@@ -110,11 +110,11 @@
|
|
|
110
110
|
"size-limit": [
|
|
111
111
|
{
|
|
112
112
|
"path": "dist/production/index.react-client.js",
|
|
113
|
-
"limit": "12.
|
|
113
|
+
"limit": "12.841 KB"
|
|
114
114
|
},
|
|
115
115
|
{
|
|
116
116
|
"path": "dist/production/index.react-server.js",
|
|
117
|
-
"limit": "13.
|
|
117
|
+
"limit": "13.6 KB"
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
"path": "dist/production/navigation.react-client.js",
|
|
@@ -137,5 +137,5 @@
|
|
|
137
137
|
"limit": "5.8 KB"
|
|
138
138
|
}
|
|
139
139
|
],
|
|
140
|
-
"gitHead": "
|
|
140
|
+
"gitHead": "6cb53252eb850f1a2ac332bca922ac5baaf63cc9"
|
|
141
141
|
}
|