@intlayer/next-i18next 9.6.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.
- package/dist/cjs/_virtual/_rolldown/runtime.cjs +1 -2
- package/dist/cjs/appWithTranslation.cjs +1 -2
- package/dist/cjs/index.cjs +12 -13
- package/dist/cjs/plugin/index.cjs +2 -3
- package/dist/cjs/serverSideTranslations.cjs +1 -2
- package/dist/esm/appWithTranslation.mjs +1 -2
- package/dist/esm/index.mjs +1 -2
- package/dist/esm/plugin/index.mjs +1 -2
- package/dist/esm/serverSideTranslations.mjs +1 -2
- package/dist/types/appWithTranslation.d.ts +0 -2
- package/dist/types/appWithTranslation.d.ts.map +1 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/plugin/index.d.ts +0 -2
- package/dist/types/plugin/index.d.ts.map +1 -1
- package/dist/types/serverSideTranslations.d.ts +0 -2
- package/dist/types/serverSideTranslations.d.ts.map +1 -1
- package/package.json +15 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// \0rolldown/runtime.js
|
|
2
2
|
var __create = Object.create;
|
|
3
3
|
var __defProp = Object.defineProperty;
|
|
4
4
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
@@ -24,5 +24,4 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
24
24
|
enumerable: true
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
|
|
27
|
-
//#endregion
|
|
28
27
|
exports.__toESM = __toESM;
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
2
2
|
let next_intlayer = require("next-intlayer");
|
|
3
3
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/appWithTranslation.tsx
|
|
6
6
|
/**
|
|
7
7
|
* Drop-in replacement for next-i18next's `appWithTranslation` HOC.
|
|
8
8
|
*
|
|
@@ -26,6 +26,5 @@ const appWithTranslation = (WrappedApp, _configOverride) => {
|
|
|
26
26
|
return AppWithTranslation;
|
|
27
27
|
};
|
|
28
28
|
|
|
29
|
-
//#endregion
|
|
30
29
|
exports.appWithTranslation = appWithTranslation;
|
|
31
30
|
//# sourceMappingURL=appWithTranslation.cjs.map
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,32 +1,31 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
2
|
-
const require_appWithTranslation = require(
|
|
3
|
-
const require_serverSideTranslations = require(
|
|
2
|
+
const require_appWithTranslation = require("./appWithTranslation.cjs");
|
|
3
|
+
const require_serverSideTranslations = require("./serverSideTranslations.cjs");
|
|
4
4
|
let _intlayer_i18next = require("@intlayer/i18next");
|
|
5
5
|
let _intlayer_react_i18next = require("@intlayer/react-i18next");
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
// src/index.ts
|
|
8
8
|
const i18n = _intlayer_i18next.i18next;
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
Object.defineProperty(exports, 'I18nContext', {
|
|
10
|
+
Object.defineProperty(exports, "I18nContext", {
|
|
12
11
|
enumerable: true,
|
|
13
12
|
get: function () {
|
|
14
13
|
return _intlayer_react_i18next.I18nContext;
|
|
15
14
|
}
|
|
16
15
|
});
|
|
17
|
-
Object.defineProperty(exports,
|
|
16
|
+
Object.defineProperty(exports, "I18nextProvider", {
|
|
18
17
|
enumerable: true,
|
|
19
18
|
get: function () {
|
|
20
19
|
return _intlayer_react_i18next.I18nextProvider;
|
|
21
20
|
}
|
|
22
21
|
});
|
|
23
|
-
Object.defineProperty(exports,
|
|
22
|
+
Object.defineProperty(exports, "Trans", {
|
|
24
23
|
enumerable: true,
|
|
25
24
|
get: function () {
|
|
26
25
|
return _intlayer_react_i18next.Trans;
|
|
27
26
|
}
|
|
28
27
|
});
|
|
29
|
-
Object.defineProperty(exports,
|
|
28
|
+
Object.defineProperty(exports, "Translation", {
|
|
30
29
|
enumerable: true,
|
|
31
30
|
get: function () {
|
|
32
31
|
return _intlayer_react_i18next.Translation;
|
|
@@ -34,32 +33,32 @@ Object.defineProperty(exports, 'Translation', {
|
|
|
34
33
|
});
|
|
35
34
|
exports.appWithTranslation = require_appWithTranslation.appWithTranslation;
|
|
36
35
|
exports.i18n = i18n;
|
|
37
|
-
Object.defineProperty(exports,
|
|
36
|
+
Object.defineProperty(exports, "initReactI18next", {
|
|
38
37
|
enumerable: true,
|
|
39
38
|
get: function () {
|
|
40
39
|
return _intlayer_react_i18next.initReactI18next;
|
|
41
40
|
}
|
|
42
41
|
});
|
|
43
42
|
exports.serverSideTranslations = require_serverSideTranslations.serverSideTranslations;
|
|
44
|
-
Object.defineProperty(exports,
|
|
43
|
+
Object.defineProperty(exports, "useDictionary", {
|
|
45
44
|
enumerable: true,
|
|
46
45
|
get: function () {
|
|
47
46
|
return _intlayer_react_i18next.useDictionary;
|
|
48
47
|
}
|
|
49
48
|
});
|
|
50
|
-
Object.defineProperty(exports,
|
|
49
|
+
Object.defineProperty(exports, "useDictionaryDynamic", {
|
|
51
50
|
enumerable: true,
|
|
52
51
|
get: function () {
|
|
53
52
|
return _intlayer_react_i18next.useDictionaryDynamic;
|
|
54
53
|
}
|
|
55
54
|
});
|
|
56
|
-
Object.defineProperty(exports,
|
|
55
|
+
Object.defineProperty(exports, "useTranslation", {
|
|
57
56
|
enumerable: true,
|
|
58
57
|
get: function () {
|
|
59
58
|
return _intlayer_react_i18next.useTranslation;
|
|
60
59
|
}
|
|
61
60
|
});
|
|
62
|
-
Object.defineProperty(exports,
|
|
61
|
+
Object.defineProperty(exports, "withTranslation", {
|
|
63
62
|
enumerable: true,
|
|
64
63
|
get: function () {
|
|
65
64
|
return _intlayer_react_i18next.withTranslation;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
const require_runtime = require(
|
|
2
|
+
const require_runtime = require("../_virtual/_rolldown/runtime.cjs");
|
|
3
3
|
let _intlayer_config_colors = require("@intlayer/config/colors");
|
|
4
4
|
_intlayer_config_colors = require_runtime.__toESM(_intlayer_config_colors);
|
|
5
5
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
@@ -10,7 +10,7 @@ let _intlayer_config_node = require("@intlayer/config/node");
|
|
|
10
10
|
let _intlayer_engine_utils = require("@intlayer/engine/utils");
|
|
11
11
|
let next_intlayer_server = require("next-intlayer/server");
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
// src/plugin/index.ts
|
|
14
14
|
/**
|
|
15
15
|
* `require` that works in both the CJS and ESM builds of this plugin.
|
|
16
16
|
* `import.meta.url` is rewritten to the module path in the CJS output by the
|
|
@@ -135,7 +135,6 @@ const createNextI18nPlugin = (_i18nPath) => {
|
|
|
135
135
|
*/
|
|
136
136
|
const withI18next = createNextI18nPlugin();
|
|
137
137
|
|
|
138
|
-
//#endregion
|
|
139
138
|
exports.createNextI18nPlugin = createNextI18nPlugin;
|
|
140
139
|
exports.default = createNextI18nPlugin;
|
|
141
140
|
exports.withI18next = withI18next;
|
|
@@ -3,7 +3,7 @@ let _intlayer_config_built = require("@intlayer/config/built");
|
|
|
3
3
|
let _intlayer_config_colors = require("@intlayer/config/colors");
|
|
4
4
|
let _intlayer_config_logger = require("@intlayer/config/logger");
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/serverSideTranslations.ts
|
|
7
7
|
/**
|
|
8
8
|
* Drop-in replacement for next-i18next's `serverSideTranslations`.
|
|
9
9
|
*
|
|
@@ -40,6 +40,5 @@ const serverSideTranslations = async (locale, namespacesRequired, configOverride
|
|
|
40
40
|
} };
|
|
41
41
|
};
|
|
42
42
|
|
|
43
|
-
//#endregion
|
|
44
43
|
exports.serverSideTranslations = serverSideTranslations;
|
|
45
44
|
//# sourceMappingURL=serverSideTranslations.cjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IntlayerProvider } from "next-intlayer";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
// src/appWithTranslation.tsx
|
|
5
5
|
/**
|
|
6
6
|
* Drop-in replacement for next-i18next's `appWithTranslation` HOC.
|
|
7
7
|
*
|
|
@@ -25,6 +25,5 @@ const appWithTranslation = (WrappedApp, _configOverride) => {
|
|
|
25
25
|
return AppWithTranslation;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
//#endregion
|
|
29
28
|
export { appWithTranslation };
|
|
30
29
|
//# sourceMappingURL=appWithTranslation.mjs.map
|
package/dist/esm/index.mjs
CHANGED
|
@@ -3,9 +3,8 @@ import { serverSideTranslations } from "./serverSideTranslations.mjs";
|
|
|
3
3
|
import { i18next } from "@intlayer/i18next";
|
|
4
4
|
import { I18nContext, I18nextProvider, Trans, Translation, initReactI18next, useDictionary, useDictionaryDynamic, useTranslation, withTranslation } from "@intlayer/react-i18next";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// src/index.ts
|
|
7
7
|
const i18n = i18next;
|
|
8
8
|
|
|
9
|
-
//#endregion
|
|
10
9
|
export { I18nContext, I18nextProvider, Trans, Translation, appWithTranslation, i18n, initReactI18next, serverSideTranslations, useDictionary, useDictionaryDynamic, useTranslation, withTranslation };
|
|
11
10
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -7,7 +7,7 @@ import { getConfiguration } from "@intlayer/config/node";
|
|
|
7
7
|
import { runOnce } from "@intlayer/engine/utils";
|
|
8
8
|
import { withIntlayer } from "next-intlayer/server";
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
// src/plugin/index.ts
|
|
11
11
|
/**
|
|
12
12
|
* `require` that works in both the CJS and ESM builds of this plugin.
|
|
13
13
|
* `import.meta.url` is rewritten to the module path in the CJS output by the
|
|
@@ -132,6 +132,5 @@ const createNextI18nPlugin = (_i18nPath) => {
|
|
|
132
132
|
*/
|
|
133
133
|
const withI18next = createNextI18nPlugin();
|
|
134
134
|
|
|
135
|
-
//#endregion
|
|
136
135
|
export { createNextI18nPlugin, createNextI18nPlugin as default, withI18next };
|
|
137
136
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -2,7 +2,7 @@ import { log } from "@intlayer/config/built";
|
|
|
2
2
|
import { CYAN } from "@intlayer/config/colors";
|
|
3
3
|
import { colorize, getAppLogger } from "@intlayer/config/logger";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// src/serverSideTranslations.ts
|
|
6
6
|
/**
|
|
7
7
|
* Drop-in replacement for next-i18next's `serverSideTranslations`.
|
|
8
8
|
*
|
|
@@ -39,6 +39,5 @@ const serverSideTranslations = async (locale, namespacesRequired, configOverride
|
|
|
39
39
|
} };
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
-
//#endregion
|
|
43
42
|
export { serverSideTranslations };
|
|
44
43
|
//# sourceMappingURL=serverSideTranslations.mjs.map
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { appWithTranslation as appWithTranslation$1 } from "next-i18next/pages";
|
|
2
|
-
//#region src/appWithTranslation.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* Drop-in replacement for next-i18next's `appWithTranslation` HOC.
|
|
5
4
|
*
|
|
@@ -12,5 +11,4 @@ import { appWithTranslation as appWithTranslation$1 } from "next-i18next/pages";
|
|
|
12
11
|
* ```
|
|
13
12
|
*/
|
|
14
13
|
export declare const appWithTranslation: typeof appWithTranslation$1;
|
|
15
|
-
//#endregion
|
|
16
14
|
//# sourceMappingURL=appWithTranslation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appWithTranslation.d.ts","names":[],"sources":["../../src/appWithTranslation.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"appWithTranslation.d.ts","names":["_appWithTranslation"],"sources":["../../src/appWithTranslation.tsx"],"mappings":";;;;;;;;;;;;qBAgBa,2BAA2BA"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -2,8 +2,6 @@ import { appWithTranslation } from "./appWithTranslation.js";
|
|
|
2
2
|
import { serverSideTranslations } from "./serverSideTranslations.js";
|
|
3
3
|
import { i18n as i18n$1 } from "@intlayer/i18next";
|
|
4
4
|
import { I18nContext, I18nextProvider, Trans, Translation, initReactI18next, useDictionary, useDictionaryDynamic, useTranslation, withTranslation } from "@intlayer/react-i18next";
|
|
5
|
-
//#region src/index.d.ts
|
|
6
5
|
export declare const i18n: i18n$1;
|
|
7
|
-
//#endregion
|
|
8
6
|
export { I18nContext, I18nextProvider, Trans, Translation, appWithTranslation, initReactI18next, serverSideTranslations, useDictionary, useDictionaryDynamic, useTranslation, withTranslation };
|
|
9
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":["I18nType"],"sources":["../../src/index.ts"],"mappings":";;;;qBAEa,MAA6BA"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { NextConfig } from "next";
|
|
2
|
-
//#region src/plugin/index.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* A Next.js plugin for next-i18next compat that wraps next-intlayer's plugin
|
|
5
4
|
* and configures resolve aliases so `next-i18next` imports are served by
|
|
@@ -17,6 +16,5 @@ export declare const createNextI18nPlugin: (_i18nPath?: string) => (nextConfig?:
|
|
|
17
16
|
* ```
|
|
18
17
|
*/
|
|
19
18
|
export declare const withI18next: (nextConfig?: NextConfig) => Promise<NextConfig>;
|
|
20
|
-
//#endregion
|
|
21
19
|
export { createNextI18nPlugin as default };
|
|
22
20
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/plugin/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/plugin/index.ts"],"mappings":";;;;;;qBAkGa,uBAAoB,wBAAsB,aAC3B,eAAkB,QAAQ;;;;;;;;;;;qBA+FzC,cAAW,aA/FI,eAAkB,QAAQ"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/serverSideTranslations.d.ts
|
|
2
1
|
/**
|
|
3
2
|
* Drop-in replacement for next-i18next's `serverSideTranslations`.
|
|
4
3
|
*
|
|
@@ -28,5 +27,4 @@
|
|
|
28
27
|
export declare const serverSideTranslations: (locale: string, namespacesRequired?: string[], configOverride?: Record<string, unknown>) => Promise<{
|
|
29
28
|
_nextI18Next: Record<string, unknown>;
|
|
30
29
|
}>;
|
|
31
|
-
//#endregion
|
|
32
30
|
//# sourceMappingURL=serverSideTranslations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"serverSideTranslations.d.ts","names":[],"sources":["../../src/serverSideTranslations.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"serverSideTranslations.d.ts","names":[],"sources":["../../src/serverSideTranslations.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;qBA8Ba,yBAAsB,gBACnB,+BACe,iBACZ,4BAChB;EAAU,cAAc"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intlayer/next-i18next",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.7.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "next-i18next API adapter for intlayer — serverSideTranslations, appWithTranslation, useTranslation backed by next-intlayer",
|
|
6
6
|
"keywords": [
|
|
@@ -80,28 +80,28 @@
|
|
|
80
80
|
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"@intlayer/config": "9.
|
|
84
|
-
"@intlayer/core": "9.
|
|
85
|
-
"@intlayer/engine": "9.
|
|
86
|
-
"@intlayer/i18next": "9.
|
|
87
|
-
"@intlayer/react-i18next": "9.
|
|
88
|
-
"@intlayer/types": "9.
|
|
89
|
-
"next-intlayer": "9.
|
|
90
|
-
"react-intlayer": "9.
|
|
83
|
+
"@intlayer/config": "9.7.1",
|
|
84
|
+
"@intlayer/core": "9.7.1",
|
|
85
|
+
"@intlayer/engine": "9.7.1",
|
|
86
|
+
"@intlayer/i18next": "9.7.1",
|
|
87
|
+
"@intlayer/react-i18next": "9.7.1",
|
|
88
|
+
"@intlayer/types": "9.7.1",
|
|
89
|
+
"next-intlayer": "9.7.1",
|
|
90
|
+
"react-intlayer": "9.7.1"
|
|
91
91
|
},
|
|
92
92
|
"devDependencies": {
|
|
93
|
-
"@types/node": "^
|
|
93
|
+
"@types/node": "^26",
|
|
94
94
|
"@types/react": "19.3.0",
|
|
95
95
|
"@utils/ts-config": "1.0.4",
|
|
96
96
|
"@utils/ts-config-types": "1.0.4",
|
|
97
97
|
"@utils/tsdown-config": "1.0.4",
|
|
98
|
-
"i18next": "26.
|
|
99
|
-
"next-i18next": "16.
|
|
100
|
-
"react-i18next": "17.
|
|
98
|
+
"i18next": "26.7.1",
|
|
99
|
+
"next-i18next": "16.4.6",
|
|
100
|
+
"react-i18next": "17.1.11",
|
|
101
101
|
"rimraf": "6.1.3",
|
|
102
|
-
"tsdown": "0.23.
|
|
102
|
+
"tsdown": "0.23.4",
|
|
103
103
|
"typescript": "7.0.2",
|
|
104
|
-
"vitest": "5.0
|
|
104
|
+
"vitest": "5.1.0"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"i18next": ">=20.0.0",
|