@intlayer/next-i18next 8.12.5-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.
Files changed (122) hide show
  1. package/README.md +330 -0
  2. package/dist/cjs/_virtual/_rolldown/runtime.cjs +29 -0
  3. package/dist/cjs/appWithTranslation.cjs +31 -0
  4. package/dist/cjs/appWithTranslation.cjs.map +1 -0
  5. package/dist/cjs/index.cjs +69 -0
  6. package/dist/cjs/index.cjs.map +1 -0
  7. package/dist/cjs/packages/@intlayer/editor/dist/esm/compareUrls.cjs +39 -0
  8. package/dist/cjs/packages/@intlayer/editor/dist/esm/compareUrls.cjs.map +1 -0
  9. package/dist/cjs/packages/@intlayer/editor/dist/esm/components/ContentSelector.cjs +161 -0
  10. package/dist/cjs/packages/@intlayer/editor/dist/esm/components/ContentSelector.cjs.map +1 -0
  11. package/dist/cjs/packages/@intlayer/editor/dist/esm/components/ContentSelectorWrapper.cjs +269 -0
  12. package/dist/cjs/packages/@intlayer/editor/dist/esm/components/ContentSelectorWrapper.cjs.map +1 -0
  13. package/dist/cjs/packages/@intlayer/editor/dist/esm/components/EditedContent.cjs +161 -0
  14. package/dist/cjs/packages/@intlayer/editor/dist/esm/components/EditedContent.cjs.map +1 -0
  15. package/dist/cjs/packages/@intlayer/editor/dist/esm/components/IntlayerEditorElement.cjs +88 -0
  16. package/dist/cjs/packages/@intlayer/editor/dist/esm/components/IntlayerEditorElement.cjs.map +1 -0
  17. package/dist/cjs/packages/@intlayer/editor/dist/esm/components/defineIntlayerElements.cjs +27 -0
  18. package/dist/cjs/packages/@intlayer/editor/dist/esm/components/defineIntlayerElements.cjs.map +1 -0
  19. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/CrossFrameMessenger.cjs +80 -0
  20. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/CrossFrameMessenger.cjs.map +1 -0
  21. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/CrossFrameStateManager.cjs +75 -0
  22. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/CrossFrameStateManager.cjs.map +1 -0
  23. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/EditorStateManager.cjs +383 -0
  24. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/EditorStateManager.cjs.map +1 -0
  25. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/IframeClickInterceptor.cjs +45 -0
  26. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/IframeClickInterceptor.cjs.map +1 -0
  27. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/UrlStateManager.cjs +59 -0
  28. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/UrlStateManager.cjs.map +1 -0
  29. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/editedContentBus.cjs +36 -0
  30. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/editedContentBus.cjs.map +1 -0
  31. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/focusedContentBus.cjs +42 -0
  32. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/focusedContentBus.cjs.map +1 -0
  33. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/globalManager.cjs +82 -0
  34. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/globalManager.cjs.map +1 -0
  35. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/initEditorClient.cjs +55 -0
  36. package/dist/cjs/packages/@intlayer/editor/dist/esm/core/initEditorClient.cjs.map +1 -0
  37. package/dist/cjs/packages/@intlayer/editor/dist/esm/index.cjs +19 -0
  38. package/dist/cjs/packages/@intlayer/editor/dist/esm/isEnabled.cjs +9 -0
  39. package/dist/cjs/packages/@intlayer/editor/dist/esm/isEnabled.cjs.map +1 -0
  40. package/dist/cjs/packages/@intlayer/editor/dist/esm/mergeIframeClick.cjs +22 -0
  41. package/dist/cjs/packages/@intlayer/editor/dist/esm/mergeIframeClick.cjs.map +1 -0
  42. package/dist/cjs/packages/@intlayer/unmerged-dictionaries-entry/dist/esm/index.cjs +32 -0
  43. package/dist/cjs/packages/@intlayer/unmerged-dictionaries-entry/dist/esm/index.cjs.map +1 -0
  44. package/dist/cjs/packages/react-intlayer/dist/esm/client/IntlayerContext.cjs +25 -0
  45. package/dist/cjs/packages/react-intlayer/dist/esm/client/IntlayerContext.cjs.map +1 -0
  46. package/dist/cjs/packages/react-intlayer/dist/esm/client/IntlayerProvider.cjs +78 -0
  47. package/dist/cjs/packages/react-intlayer/dist/esm/client/IntlayerProvider.cjs.map +1 -0
  48. package/dist/cjs/packages/react-intlayer/dist/esm/client/useLocaleStorage.cjs +24 -0
  49. package/dist/cjs/packages/react-intlayer/dist/esm/client/useLocaleStorage.cjs.map +1 -0
  50. package/dist/cjs/packages/react-intlayer/dist/esm/editor/EditorProvider.cjs +11 -0
  51. package/dist/cjs/packages/react-intlayer/dist/esm/editor/EditorProvider.cjs.map +1 -0
  52. package/dist/cjs/packages/react-intlayer/dist/esm/editor/useEditor.cjs +39 -0
  53. package/dist/cjs/packages/react-intlayer/dist/esm/editor/useEditor.cjs.map +1 -0
  54. package/dist/cjs/plugin/index.cjs +170 -0
  55. package/dist/cjs/plugin/index.cjs.map +1 -0
  56. package/dist/cjs/serverSideTranslations.cjs +46 -0
  57. package/dist/cjs/serverSideTranslations.cjs.map +1 -0
  58. package/dist/esm/_virtual/_rolldown/runtime.mjs +8 -0
  59. package/dist/esm/appWithTranslation.mjs +29 -0
  60. package/dist/esm/appWithTranslation.mjs.map +1 -0
  61. package/dist/esm/index.mjs +11 -0
  62. package/dist/esm/index.mjs.map +1 -0
  63. package/dist/esm/packages/@intlayer/editor/dist/esm/compareUrls.mjs +38 -0
  64. package/dist/esm/packages/@intlayer/editor/dist/esm/compareUrls.mjs.map +1 -0
  65. package/dist/esm/packages/@intlayer/editor/dist/esm/components/ContentSelector.mjs +160 -0
  66. package/dist/esm/packages/@intlayer/editor/dist/esm/components/ContentSelector.mjs.map +1 -0
  67. package/dist/esm/packages/@intlayer/editor/dist/esm/components/ContentSelectorWrapper.mjs +266 -0
  68. package/dist/esm/packages/@intlayer/editor/dist/esm/components/ContentSelectorWrapper.mjs.map +1 -0
  69. package/dist/esm/packages/@intlayer/editor/dist/esm/components/EditedContent.mjs +159 -0
  70. package/dist/esm/packages/@intlayer/editor/dist/esm/components/EditedContent.mjs.map +1 -0
  71. package/dist/esm/packages/@intlayer/editor/dist/esm/components/IntlayerEditorElement.mjs +88 -0
  72. package/dist/esm/packages/@intlayer/editor/dist/esm/components/IntlayerEditorElement.mjs.map +1 -0
  73. package/dist/esm/packages/@intlayer/editor/dist/esm/components/defineIntlayerElements.mjs +26 -0
  74. package/dist/esm/packages/@intlayer/editor/dist/esm/components/defineIntlayerElements.mjs.map +1 -0
  75. package/dist/esm/packages/@intlayer/editor/dist/esm/core/CrossFrameMessenger.mjs +80 -0
  76. package/dist/esm/packages/@intlayer/editor/dist/esm/core/CrossFrameMessenger.mjs.map +1 -0
  77. package/dist/esm/packages/@intlayer/editor/dist/esm/core/CrossFrameStateManager.mjs +74 -0
  78. package/dist/esm/packages/@intlayer/editor/dist/esm/core/CrossFrameStateManager.mjs.map +1 -0
  79. package/dist/esm/packages/@intlayer/editor/dist/esm/core/EditorStateManager.mjs +381 -0
  80. package/dist/esm/packages/@intlayer/editor/dist/esm/core/EditorStateManager.mjs.map +1 -0
  81. package/dist/esm/packages/@intlayer/editor/dist/esm/core/IframeClickInterceptor.mjs +45 -0
  82. package/dist/esm/packages/@intlayer/editor/dist/esm/core/IframeClickInterceptor.mjs.map +1 -0
  83. package/dist/esm/packages/@intlayer/editor/dist/esm/core/UrlStateManager.mjs +58 -0
  84. package/dist/esm/packages/@intlayer/editor/dist/esm/core/UrlStateManager.mjs.map +1 -0
  85. package/dist/esm/packages/@intlayer/editor/dist/esm/core/editedContentBus.mjs +33 -0
  86. package/dist/esm/packages/@intlayer/editor/dist/esm/core/editedContentBus.mjs.map +1 -0
  87. package/dist/esm/packages/@intlayer/editor/dist/esm/core/focusedContentBus.mjs +39 -0
  88. package/dist/esm/packages/@intlayer/editor/dist/esm/core/focusedContentBus.mjs.map +1 -0
  89. package/dist/esm/packages/@intlayer/editor/dist/esm/core/globalManager.mjs +79 -0
  90. package/dist/esm/packages/@intlayer/editor/dist/esm/core/globalManager.mjs.map +1 -0
  91. package/dist/esm/packages/@intlayer/editor/dist/esm/core/initEditorClient.mjs +52 -0
  92. package/dist/esm/packages/@intlayer/editor/dist/esm/core/initEditorClient.mjs.map +1 -0
  93. package/dist/esm/packages/@intlayer/editor/dist/esm/index.mjs +18 -0
  94. package/dist/esm/packages/@intlayer/editor/dist/esm/isEnabled.mjs +8 -0
  95. package/dist/esm/packages/@intlayer/editor/dist/esm/isEnabled.mjs.map +1 -0
  96. package/dist/esm/packages/@intlayer/editor/dist/esm/mergeIframeClick.mjs +21 -0
  97. package/dist/esm/packages/@intlayer/editor/dist/esm/mergeIframeClick.mjs.map +1 -0
  98. package/dist/esm/packages/@intlayer/unmerged-dictionaries-entry/dist/esm/index.browser.mjs +6 -0
  99. package/dist/esm/packages/@intlayer/unmerged-dictionaries-entry/dist/esm/index.browser.mjs.map +1 -0
  100. package/dist/esm/packages/react-intlayer/dist/esm/client/IntlayerContext.mjs +23 -0
  101. package/dist/esm/packages/react-intlayer/dist/esm/client/IntlayerContext.mjs.map +1 -0
  102. package/dist/esm/packages/react-intlayer/dist/esm/client/IntlayerProvider.mjs +77 -0
  103. package/dist/esm/packages/react-intlayer/dist/esm/client/IntlayerProvider.mjs.map +1 -0
  104. package/dist/esm/packages/react-intlayer/dist/esm/client/useLocaleStorage.mjs +22 -0
  105. package/dist/esm/packages/react-intlayer/dist/esm/client/useLocaleStorage.mjs.map +1 -0
  106. package/dist/esm/packages/react-intlayer/dist/esm/editor/EditorProvider.mjs +11 -0
  107. package/dist/esm/packages/react-intlayer/dist/esm/editor/EditorProvider.mjs.map +1 -0
  108. package/dist/esm/packages/react-intlayer/dist/esm/editor/useEditor.mjs +38 -0
  109. package/dist/esm/packages/react-intlayer/dist/esm/editor/useEditor.mjs.map +1 -0
  110. package/dist/esm/plugin/index.mjs +165 -0
  111. package/dist/esm/plugin/index.mjs.map +1 -0
  112. package/dist/esm/serverSideTranslations.mjs +44 -0
  113. package/dist/esm/serverSideTranslations.mjs.map +1 -0
  114. package/dist/types/appWithTranslation.d.ts +18 -0
  115. package/dist/types/appWithTranslation.d.ts.map +1 -0
  116. package/dist/types/index.d.ts +10 -0
  117. package/dist/types/index.d.ts.map +1 -0
  118. package/dist/types/plugin/index.d.ts +23 -0
  119. package/dist/types/plugin/index.d.ts.map +1 -0
  120. package/dist/types/serverSideTranslations.d.ts +33 -0
  121. package/dist/types/serverSideTranslations.d.ts.map +1 -0
  122. package/package.json +116 -0
@@ -0,0 +1,165 @@
1
+ import * as ANSIColors from "@intlayer/config/colors";
2
+ import { colorize, getAppLogger } from "@intlayer/config/logger";
3
+ import { createRequire } from "node:module";
4
+ import { dirname, join, relative, resolve, sep } from "node:path";
5
+ import { runOnce } from "@intlayer/chokidar/utils";
6
+ import { getConfiguration } from "@intlayer/config/node";
7
+ import { withIntlayer } from "next-intlayer/server";
8
+
9
+ //#region src/plugin/index.ts
10
+ /**
11
+ * `require` that works in both the CJS and ESM builds of this plugin.
12
+ * `import.meta.url` is rewritten to the module path in the CJS output by the
13
+ * bundler, so `createRequire` resolves correctly in either format.
14
+ */
15
+ const compatRequire = createRequire(import.meta.url);
16
+ /**
17
+ * Maps each original import specifier (next-i18next, react-i18next, i18next) to
18
+ * the `@intlayer/*` specifier that should serve it instead.
19
+ */
20
+ const ALIAS_ENTRIES = [
21
+ {
22
+ request: "next-i18next",
23
+ replacement: "@intlayer/next-i18next"
24
+ },
25
+ {
26
+ request: "react-i18next",
27
+ replacement: "@intlayer/react-i18next"
28
+ },
29
+ {
30
+ request: "i18next",
31
+ replacement: "@intlayer/i18next"
32
+ }
33
+ ];
34
+ /**
35
+ * Split a package specifier into its package name and export subpath.
36
+ *
37
+ * @param specifier - e.g. `@intlayer/react-i18next` or `i18next`.
38
+ * @returns `{ packageName, exportKey }` where `exportKey` is the `exports` map
39
+ * key (`.` for the package root).
40
+ */
41
+ const splitSpecifier = (specifier) => {
42
+ const segments = specifier.split("/");
43
+ const packageName = specifier.startsWith("@") ? segments.slice(0, 2).join("/") : segments[0] ?? specifier;
44
+ const subpath = specifier.slice(packageName.length);
45
+ return {
46
+ packageName,
47
+ exportKey: subpath === "" ? "." : `.${subpath}`
48
+ };
49
+ };
50
+ /**
51
+ * Resolve the absolute path of a package export, preferring the ESM (`import`)
52
+ * condition so Turbopack and modern bundlers load the `.mjs` build (which keeps
53
+ * the `"use client"` directives) rather than the CommonJS fallback.
54
+ *
55
+ * Both Turbopack and webpack ignore alias values that are bare package
56
+ * specifiers, so the aliases must point at real files.
57
+ *
58
+ * @param specifier - Package specifier, e.g. `@intlayer/react-i18next`.
59
+ * @returns Absolute path to the resolved module file.
60
+ */
61
+ const resolveEsmPath = (specifier) => {
62
+ const { packageName, exportKey } = splitSpecifier(specifier);
63
+ const packageJson = compatRequire(`${packageName}/package.json`);
64
+ const packageDir = dirname(compatRequire.resolve(`${packageName}/package.json`));
65
+ const exportEntry = packageJson.exports?.[exportKey];
66
+ const relativeFile = typeof exportEntry === "string" ? exportEntry : exportEntry?.import ?? exportEntry?.require ?? exportEntry?.default;
67
+ if (!relativeFile) return compatRequire.resolve(specifier);
68
+ return resolve(packageDir, relativeFile);
69
+ };
70
+ /**
71
+ * Format an absolute path as a project-root-relative specifier (prefixed with
72
+ * `./` and using forward slashes). Turbopack only honours `resolveAlias` values
73
+ * that are project-root-relative paths — bare specifiers are ignored and
74
+ * absolute paths are misread as root-relative. Mirrors `withIntlayer`'s
75
+ * Turbopack alias formatter.
76
+ *
77
+ * @param absolutePath - Absolute path to the target module file.
78
+ * @returns Relative specifier such as `./node_modules/@intlayer/react-i18next/...`.
79
+ */
80
+ const toTurbopackAlias = (absolutePath) => `./${relative(process.cwd(), absolutePath).split(sep).join("/")}`;
81
+ const NEXT_I18NEXT_SWC_CALLERS = [{
82
+ callerName: "useTranslation",
83
+ importSources: [
84
+ "react-i18next",
85
+ "@intlayer/react-i18next",
86
+ "next-i18next"
87
+ ],
88
+ namespaceArgIndex: 0,
89
+ staticReplacement: "useDictionary",
90
+ dynamicReplacement: "useDictionaryDynamic"
91
+ }];
92
+ /**
93
+ * Disables the SWC `replaceDictionaryEntry` optimization on the resolved Next.js
94
+ * config so the runtime dictionary registry stays populated. Mutates the
95
+ * `@intlayer/swc` plugin options in place (both webpack and Turbopack read the
96
+ * same `experimental.swcPlugins` entry).
97
+ *
98
+ * @param config - The Next.js config returned by `withIntlayer`.
99
+ */
100
+ const keepDictionaryRegistry = (config) => {
101
+ const swcPlugins = config.experimental?.swcPlugins;
102
+ if (!Array.isArray(swcPlugins)) return;
103
+ for (const plugin of swcPlugins) {
104
+ if (!Array.isArray(plugin)) continue;
105
+ const [pluginPath, pluginOptions] = plugin;
106
+ if (typeof pluginPath === "string" && pluginPath.includes("@intlayer/swc") && pluginOptions !== null && typeof pluginOptions === "object") pluginOptions.replaceDictionaryEntry = false;
107
+ }
108
+ };
109
+ /**
110
+ * A Next.js plugin for next-i18next compat that wraps next-intlayer's plugin
111
+ * and configures resolve aliases so `next-i18next` imports are served by
112
+ * `@intlayer/next-i18next`.
113
+ */
114
+ const createNextI18nPlugin = (_i18nPath) => {
115
+ return async (nextConfig = {}) => {
116
+ const intlayerConfig = getConfiguration();
117
+ const appLogger = getAppLogger(intlayerConfig);
118
+ runOnce(join(intlayerConfig.system.baseDir, ".intlayer", "cache", "intlayer-issues-invitation.lock"), () => {
119
+ appLogger([colorize("Please report any issues you met on GitHub:", ANSIColors.GREY), colorize("https://github.com/aymericzip/intlayer/issues", ANSIColors.GREY_LIGHT)]);
120
+ }, { cacheTimeoutMs: 1e3 * 60 * 60 });
121
+ const customWebpack = nextConfig.webpack;
122
+ const resolvedTargets = ALIAS_ENTRIES.map(({ request, replacement }) => ({
123
+ request,
124
+ absolutePath: resolveEsmPath(replacement)
125
+ }));
126
+ const webpackAlias = Object.fromEntries(resolvedTargets.map(({ request, absolutePath }) => [request, absolutePath]));
127
+ const turboAlias = Object.fromEntries(resolvedTargets.map(({ request, absolutePath }) => [request, toTurbopackAlias(absolutePath)]));
128
+ const aliasConfig = { webpack: (config, options) => {
129
+ config.resolve.alias = {
130
+ ...config.resolve.alias,
131
+ ...webpackAlias
132
+ };
133
+ if (typeof customWebpack === "function") return customWebpack(config, options);
134
+ return config;
135
+ } };
136
+ const finalConfig = await withIntlayer({
137
+ ...nextConfig,
138
+ ...aliasConfig,
139
+ turbopack: {
140
+ ...nextConfig.turbopack ?? {},
141
+ resolveAlias: {
142
+ ...nextConfig.turbopack?.resolveAlias ?? {},
143
+ ...turboAlias
144
+ }
145
+ }
146
+ }, { swcExtraCallers: NEXT_I18NEXT_SWC_CALLERS });
147
+ keepDictionaryRegistry(finalConfig);
148
+ return finalConfig;
149
+ };
150
+ };
151
+ /**
152
+ * A pre-instantiated Next.js plugin for next-i18next compat.
153
+ * Wraps a NextConfig directly without requiring the factory call pattern.
154
+ *
155
+ * Usage:
156
+ * ```ts
157
+ * import { withI18next } from '@intlayer/next-i18next/plugin';
158
+ * export default withI18next(nextConfig);
159
+ * ```
160
+ */
161
+ const withI18next = createNextI18nPlugin();
162
+
163
+ //#endregion
164
+ export { createNextI18nPlugin, createNextI18nPlugin as default, withI18next };
165
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../../src/plugin/index.ts"],"sourcesContent":["import { createRequire } from 'node:module';\nimport { dirname, join, relative, resolve, sep } from 'node:path';\nimport { runOnce } from '@intlayer/chokidar/utils';\nimport * as ANSIColors from '@intlayer/config/colors';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\nimport { getConfiguration } from '@intlayer/config/node';\nimport type { NextConfig } from 'next';\nimport { withIntlayer } from 'next-intlayer/server';\n\n/**\n * `require` that works in both the CJS and ESM builds of this plugin.\n * `import.meta.url` is rewritten to the module path in the CJS output by the\n * bundler, so `createRequire` resolves correctly in either format.\n */\nconst compatRequire = createRequire(import.meta.url);\n\n/**\n * Maps each original import specifier (next-i18next, react-i18next, i18next) to\n * the `@intlayer/*` specifier that should serve it instead.\n */\nconst ALIAS_ENTRIES: { request: string; replacement: string }[] = [\n { request: 'next-i18next', replacement: '@intlayer/next-i18next' },\n { request: 'react-i18next', replacement: '@intlayer/react-i18next' },\n { request: 'i18next', replacement: '@intlayer/i18next' },\n];\n\n/**\n * Split a package specifier into its package name and export subpath.\n *\n * @param specifier - e.g. `@intlayer/react-i18next` or `i18next`.\n * @returns `{ packageName, exportKey }` where `exportKey` is the `exports` map\n * key (`.` for the package root).\n */\nconst splitSpecifier = (\n specifier: string\n): { packageName: string; exportKey: string } => {\n const segments = specifier.split('/');\n const packageName = specifier.startsWith('@')\n ? segments.slice(0, 2).join('/')\n : (segments[0] ?? specifier);\n const subpath = specifier.slice(packageName.length);\n return { packageName, exportKey: subpath === '' ? '.' : `.${subpath}` };\n};\n\n/**\n * Resolve the absolute path of a package export, preferring the ESM (`import`)\n * condition so Turbopack and modern bundlers load the `.mjs` build (which keeps\n * the `\"use client\"` directives) rather than the CommonJS fallback.\n *\n * Both Turbopack and webpack ignore alias values that are bare package\n * specifiers, so the aliases must point at real files.\n *\n * @param specifier - Package specifier, e.g. `@intlayer/react-i18next`.\n * @returns Absolute path to the resolved module file.\n */\nconst resolveEsmPath = (specifier: string): string => {\n const { packageName, exportKey } = splitSpecifier(specifier);\n const packageJson = compatRequire(`${packageName}/package.json`) as {\n exports?: Record<\n string,\n string | { import?: string; require?: string; default?: string }\n >;\n };\n const packageDir = dirname(\n compatRequire.resolve(`${packageName}/package.json`)\n );\n\n const exportEntry = packageJson.exports?.[exportKey];\n const relativeFile =\n typeof exportEntry === 'string'\n ? exportEntry\n : (exportEntry?.import ?? exportEntry?.require ?? exportEntry?.default);\n\n // Fall back to Node resolution if the exports map is unexpected.\n if (!relativeFile) return compatRequire.resolve(specifier);\n\n return resolve(packageDir, relativeFile);\n};\n\n/**\n * Format an absolute path as a project-root-relative specifier (prefixed with\n * `./` and using forward slashes). Turbopack only honours `resolveAlias` values\n * that are project-root-relative paths — bare specifiers are ignored and\n * absolute paths are misread as root-relative. Mirrors `withIntlayer`'s\n * Turbopack alias formatter.\n *\n * @param absolutePath - Absolute path to the target module file.\n * @returns Relative specifier such as `./node_modules/@intlayer/react-i18next/...`.\n */\nconst toTurbopackAlias = (absolutePath: string): string =>\n `./${relative(process.cwd(), absolutePath).split(sep).join('/')}`;\n\nconst NEXT_I18NEXT_SWC_CALLERS = [\n {\n callerName: 'useTranslation',\n importSources: ['react-i18next', '@intlayer/react-i18next', 'next-i18next'],\n namespaceArgIndex: 0,\n staticReplacement: 'useDictionary',\n dynamicReplacement: 'useDictionaryDynamic',\n },\n];\n\n/**\n * Disables the SWC `replaceDictionaryEntry` optimization on the resolved Next.js\n * config so the runtime dictionary registry stays populated. Mutates the\n * `@intlayer/swc` plugin options in place (both webpack and Turbopack read the\n * same `experimental.swcPlugins` entry).\n *\n * @param config - The Next.js config returned by `withIntlayer`.\n */\nconst keepDictionaryRegistry = (config: NextConfig): void => {\n const swcPlugins = (\n config.experimental as { swcPlugins?: unknown[] } | undefined\n )?.swcPlugins;\n if (!Array.isArray(swcPlugins)) return;\n\n for (const plugin of swcPlugins) {\n if (!Array.isArray(plugin)) continue;\n const [pluginPath, pluginOptions] = plugin as [unknown, unknown];\n if (\n typeof pluginPath === 'string' &&\n pluginPath.includes('@intlayer/swc') &&\n pluginOptions !== null &&\n typeof pluginOptions === 'object'\n ) {\n (pluginOptions as Record<string, unknown>).replaceDictionaryEntry = false;\n }\n }\n};\n\n/**\n * A Next.js plugin for next-i18next compat that wraps next-intlayer's plugin\n * and configures resolve aliases so `next-i18next` imports are served by\n * `@intlayer/next-i18next`.\n */\nexport const createNextI18nPlugin = (_i18nPath?: string) => {\n return async (nextConfig: NextConfig = {}): Promise<NextConfig> => {\n const intlayerConfig = getConfiguration();\n const appLogger = getAppLogger(intlayerConfig);\n\n runOnce(\n join(\n intlayerConfig.system.baseDir,\n '.intlayer',\n 'cache',\n 'intlayer-issues-invitation.lock'\n ),\n () => {\n appLogger([\n colorize(\n 'Please report any issues you met on GitHub:',\n ANSIColors.GREY\n ),\n colorize(\n 'https://github.com/aymericzip/intlayer/issues',\n ANSIColors.GREY_LIGHT\n ),\n ]);\n },\n {\n cacheTimeoutMs: 1000 * 60 * 60, // 1 hour\n }\n );\n\n const customWebpack = nextConfig.webpack;\n\n const resolvedTargets = ALIAS_ENTRIES.map(({ request, replacement }) => ({\n request,\n absolutePath: resolveEsmPath(replacement),\n }));\n\n // Webpack resolves aliases from absolute paths.\n const webpackAlias = Object.fromEntries(\n resolvedTargets.map(({ request, absolutePath }) => [\n request,\n absolutePath,\n ])\n );\n\n // Turbopack only honours project-root-relative `./` paths.\n const turboAlias = Object.fromEntries(\n resolvedTargets.map(({ request, absolutePath }) => [\n request,\n toTurbopackAlias(absolutePath),\n ])\n );\n\n const aliasConfig = {\n webpack: (config: any, options: any) => {\n config.resolve.alias = {\n ...config.resolve.alias,\n ...webpackAlias,\n };\n\n if (typeof customWebpack === 'function') {\n return customWebpack(config, options);\n }\n return config;\n },\n };\n\n const mergedConfig: NextConfig = {\n ...nextConfig,\n ...aliasConfig,\n turbopack: {\n ...(nextConfig.turbopack ?? {}),\n resolveAlias: {\n ...(nextConfig.turbopack?.resolveAlias ?? {}),\n ...turboAlias,\n },\n },\n };\n\n const finalConfig = await withIntlayer(mergedConfig, {\n swcExtraCallers: NEXT_I18NEXT_SWC_CALLERS,\n });\n\n // i18next exposes runtime namespace APIs (`i18n.getFixedT(locale, ns)`,\n // `t('ns:key')`) that resolve dictionaries at runtime through `getIntlayer`.\n // Unlike `useTranslation('ns')`, these are not statically analyzable, so the\n // SWC cannot rewrite them to direct dictionary imports. The build optimization\n // normally empties the runtime dictionary registry (`replaceDictionaryEntry`),\n // which would make those APIs fall back to raw keys on the server. Keeping the\n // registry populated restores them; statically analyzable call sites are still\n // rewritten to direct imports, so client bundles stay tree-shaken.\n keepDictionaryRegistry(finalConfig);\n\n return finalConfig;\n };\n};\n\nexport default createNextI18nPlugin;\n\n/**\n * A pre-instantiated Next.js plugin for next-i18next compat.\n * Wraps a NextConfig directly without requiring the factory call pattern.\n *\n * Usage:\n * ```ts\n * import { withI18next } from '@intlayer/next-i18next/plugin';\n * export default withI18next(nextConfig);\n * ```\n */\nexport const withI18next = createNextI18nPlugin();\n"],"mappings":"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"}
@@ -0,0 +1,44 @@
1
+ import { log } from "@intlayer/config/built";
2
+ import { CYAN } from "@intlayer/config/colors";
3
+ import { colorize, getAppLogger } from "@intlayer/config/logger";
4
+
5
+ //#region src/serverSideTranslations.ts
6
+ /**
7
+ * Drop-in replacement for next-i18next's `serverSideTranslations`.
8
+ *
9
+ * In next-i18next this function loads translation JSON files and injects
10
+ * them as `_nextI18Next` props so `useTranslation` can hydrate on the client.
11
+ *
12
+ * With Intlayer all dictionaries are compiled at build time so no runtime
13
+ * loading is needed. This function returns the minimal shape expected by
14
+ * `appWithTranslation` / `useTranslation` for drop-in compatibility.
15
+ *
16
+ * @deprecated serverSideTranslations has no use case with intlayer.
17
+ * Dictionaries are compiled at build time and loaded automatically.
18
+ *
19
+ * @param locale - The active locale (e.g. from `getStaticProps` context).
20
+ * @param namespacesRequired - Namespace list; recorded but not loaded.
21
+ * @param configOverride - Config override; recorded but not applied.
22
+ *
23
+ * @example
24
+ * ```ts
25
+ * export const getStaticProps = async ({ locale }) => ({
26
+ * props: {
27
+ * ...(await serverSideTranslations(locale, ['common'])),
28
+ * },
29
+ * });
30
+ * ```
31
+ */
32
+ const serverSideTranslations = async (locale, namespacesRequired, configOverride) => {
33
+ getAppLogger({ log })(`${colorize("serverSideTranslations", CYAN)} has no use case with intlayer. Dictionaries are compiled at build time and loaded automatically under the hood.`);
34
+ return { _nextI18Next: {
35
+ initialLocale: locale,
36
+ initialI18nStore: {},
37
+ ns: namespacesRequired ?? ["common"],
38
+ userConfig: configOverride ?? null
39
+ } };
40
+ };
41
+
42
+ //#endregion
43
+ export { serverSideTranslations };
44
+ //# sourceMappingURL=serverSideTranslations.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverSideTranslations.mjs","names":[],"sources":["../../src/serverSideTranslations.ts"],"sourcesContent":["import { log } from '@intlayer/config/built';\nimport { CYAN } from '@intlayer/config/colors';\nimport { colorize, getAppLogger } from '@intlayer/config/logger';\n\n/**\n * Drop-in replacement for next-i18next's `serverSideTranslations`.\n *\n * In next-i18next this function loads translation JSON files and injects\n * them as `_nextI18Next` props so `useTranslation` can hydrate on the client.\n *\n * With Intlayer all dictionaries are compiled at build time so no runtime\n * loading is needed. This function returns the minimal shape expected by\n * `appWithTranslation` / `useTranslation` for drop-in compatibility.\n *\n * @deprecated serverSideTranslations has no use case with intlayer.\n * Dictionaries are compiled at build time and loaded automatically.\n *\n * @param locale - The active locale (e.g. from `getStaticProps` context).\n * @param namespacesRequired - Namespace list; recorded but not loaded.\n * @param configOverride - Config override; recorded but not applied.\n *\n * @example\n * ```ts\n * export const getStaticProps = async ({ locale }) => ({\n * props: {\n * ...(await serverSideTranslations(locale, ['common'])),\n * },\n * });\n * ```\n */\nexport const serverSideTranslations = async (\n locale: string,\n namespacesRequired?: string[],\n configOverride?: Record<string, unknown>\n): Promise<{ _nextI18Next: Record<string, unknown> }> => {\n if (process.env.NODE_ENV === 'development') {\n const appLogger = getAppLogger({ log });\n appLogger(\n `${colorize('serverSideTranslations', CYAN)} has no use case with intlayer. Dictionaries are compiled at build time and loaded automatically under the hood.`\n );\n }\n\n return {\n _nextI18Next: {\n initialLocale: locale,\n initialI18nStore: {},\n ns: namespacesRequired ?? ['common'],\n userConfig: configOverride ?? null,\n },\n };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,MAAa,yBAAyB,OACpC,QACA,oBACA,mBACuD;AAGrD,CADkB,aAAa,EAAE,KAAK,CAC7B,CACP,GAAG,SAAS,0BAA0B,KAAK,CAAC,kHAC7C;AAGH,QAAO,EACL,cAAc;EACZ,eAAe;EACf,kBAAkB,EAAE;EACpB,IAAI,sBAAsB,CAAC,SAAS;EACpC,YAAY,kBAAkB;EAC/B,EACF"}
@@ -0,0 +1,18 @@
1
+ import { appWithTranslation as appWithTranslation$1 } from "next-i18next/pages";
2
+
3
+ //#region src/appWithTranslation.d.ts
4
+ /**
5
+ * Drop-in replacement for next-i18next's `appWithTranslation` HOC.
6
+ *
7
+ * Wraps the Next.js `App` component in `IntlayerProvider` and passes the
8
+ * active locale from `_nextI18Next.initialLocale` or the Next.js router.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * export default appWithTranslation(MyApp);
13
+ * ```
14
+ */
15
+ declare const appWithTranslation: typeof appWithTranslation$1;
16
+ //#endregion
17
+ export { appWithTranslation };
18
+ //# sourceMappingURL=appWithTranslation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"appWithTranslation.d.ts","names":[],"sources":["../../src/appWithTranslation.tsx"],"mappings":";;;;;AAgBA;;;;;;;;;cAAa,kBAAA,SAA2B,oBAAA"}
@@ -0,0 +1,10 @@
1
+ import { appWithTranslation } from "./appWithTranslation.js";
2
+ import { serverSideTranslations } from "./serverSideTranslations.js";
3
+ import { i18n as i18n$1 } from "@intlayer/i18next";
4
+ import { I18nContext, I18nextProvider, Trans, Translation, initReactI18next, useDictionary, useDictionaryDynamic, useTranslation, withTranslation } from "@intlayer/react-i18next";
5
+
6
+ //#region src/index.d.ts
7
+ declare const i18n: i18n$1;
8
+ //#endregion
9
+ export { I18nContext, I18nextProvider, Trans, Translation, appWithTranslation, i18n, initReactI18next, serverSideTranslations, useDictionary, useDictionaryDynamic, useTranslation, withTranslation };
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../src/index.ts"],"mappings":";;;;;;cAEa,IAAA,EAA6B,MAAA"}
@@ -0,0 +1,23 @@
1
+ import { NextConfig } from "next";
2
+
3
+ //#region src/plugin/index.d.ts
4
+ /**
5
+ * A Next.js plugin for next-i18next compat that wraps next-intlayer's plugin
6
+ * and configures resolve aliases so `next-i18next` imports are served by
7
+ * `@intlayer/next-i18next`.
8
+ */
9
+ declare const createNextI18nPlugin: (_i18nPath?: string) => (nextConfig?: NextConfig) => Promise<NextConfig>;
10
+ /**
11
+ * A pre-instantiated Next.js plugin for next-i18next compat.
12
+ * Wraps a NextConfig directly without requiring the factory call pattern.
13
+ *
14
+ * Usage:
15
+ * ```ts
16
+ * import { withI18next } from '@intlayer/next-i18next/plugin';
17
+ * export default withI18next(nextConfig);
18
+ * ```
19
+ */
20
+ declare const withI18next: (nextConfig?: NextConfig) => Promise<NextConfig>;
21
+ //#endregion
22
+ export { createNextI18nPlugin, createNextI18nPlugin as default, withI18next };
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/plugin/index.ts"],"mappings":";;;;;AAuIA;;;cAAa,oBAAA,GAAwB,SAAA,eACrB,UAAA,GAAY,UAAA,KAAkB,OAAA,CAAQ,UAAA;;;;;;;;;;;cA2GzC,WAAA,GAAW,UAAA,GA3GI,UAAA,KAAkB,OAAA,CAAQ,UAAA"}
@@ -0,0 +1,33 @@
1
+ //#region src/serverSideTranslations.d.ts
2
+ /**
3
+ * Drop-in replacement for next-i18next's `serverSideTranslations`.
4
+ *
5
+ * In next-i18next this function loads translation JSON files and injects
6
+ * them as `_nextI18Next` props so `useTranslation` can hydrate on the client.
7
+ *
8
+ * With Intlayer all dictionaries are compiled at build time so no runtime
9
+ * loading is needed. This function returns the minimal shape expected by
10
+ * `appWithTranslation` / `useTranslation` for drop-in compatibility.
11
+ *
12
+ * @deprecated serverSideTranslations has no use case with intlayer.
13
+ * Dictionaries are compiled at build time and loaded automatically.
14
+ *
15
+ * @param locale - The active locale (e.g. from `getStaticProps` context).
16
+ * @param namespacesRequired - Namespace list; recorded but not loaded.
17
+ * @param configOverride - Config override; recorded but not applied.
18
+ *
19
+ * @example
20
+ * ```ts
21
+ * export const getStaticProps = async ({ locale }) => ({
22
+ * props: {
23
+ * ...(await serverSideTranslations(locale, ['common'])),
24
+ * },
25
+ * });
26
+ * ```
27
+ */
28
+ declare const serverSideTranslations: (locale: string, namespacesRequired?: string[], configOverride?: Record<string, unknown>) => Promise<{
29
+ _nextI18Next: Record<string, unknown>;
30
+ }>;
31
+ //#endregion
32
+ export { serverSideTranslations };
33
+ //# sourceMappingURL=serverSideTranslations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serverSideTranslations.d.ts","names":[],"sources":["../../src/serverSideTranslations.ts"],"mappings":";;AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;cAAa,sBAAA,GACX,MAAA,UACA,kBAAA,aACA,cAAA,GAAiB,MAAA,sBAChB,OAAA;EAAU,YAAA,EAAc,MAAA;AAAA"}
package/package.json ADDED
@@ -0,0 +1,116 @@
1
+ {
2
+ "name": "@intlayer/next-i18next",
3
+ "version": "8.12.5-canary.0",
4
+ "private": false,
5
+ "description": "next-i18next API adapter for intlayer — serverSideTranslations, appWithTranslation, useTranslation backed by next-intlayer",
6
+ "keywords": [
7
+ "intlayer",
8
+ "next-i18next",
9
+ "i18next",
10
+ "next.js",
11
+ "react",
12
+ "i18n",
13
+ "adapter",
14
+ "compatibility"
15
+ ],
16
+ "homepage": "https://intlayer.org",
17
+ "bugs": {
18
+ "url": "https://github.com/aymericzip/intlayer/issues"
19
+ },
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/aymericzip/intlayer.git"
23
+ },
24
+ "license": "Apache-2.0",
25
+ "author": {
26
+ "name": "Aymeric PINEAU",
27
+ "url": "https://github.com/aymericzip"
28
+ },
29
+ "contributors": [
30
+ {
31
+ "name": "Aymeric Pineau",
32
+ "email": "ay.pineau@gmail.com",
33
+ "url": "https://github.com/aymericzip"
34
+ }
35
+ ],
36
+ "sideEffects": false,
37
+ "exports": {
38
+ ".": {
39
+ "types": "./dist/types/index.d.ts",
40
+ "require": "./dist/cjs/index.cjs",
41
+ "import": "./dist/esm/index.mjs"
42
+ },
43
+ "./plugin": {
44
+ "types": "./dist/types/plugin/index.d.ts",
45
+ "require": "./dist/cjs/plugin/index.cjs",
46
+ "import": "./dist/esm/plugin/index.mjs"
47
+ },
48
+ "./package.json": "./package.json"
49
+ },
50
+ "main": "dist/cjs/index.cjs",
51
+ "module": "dist/esm/index.mjs",
52
+ "types": "dist/types/index.d.ts",
53
+ "typesVersions": {
54
+ "*": {
55
+ "plugin": [
56
+ "./dist/types/plugin/index.d.ts"
57
+ ]
58
+ }
59
+ },
60
+ "files": [
61
+ "./dist",
62
+ "./package.json"
63
+ ],
64
+ "scripts": {
65
+ "build": "bun --bun tsdown --config tsdown.config.ts",
66
+ "build:ci": "bun --bun tsdown --config tsdown.config.ts",
67
+ "clean": "bun --bun rimraf ./dist .turbo",
68
+ "dev": "bun --bun tsdown --config tsdown.config.ts --watch",
69
+ "format": "bun --bun biome format . --check",
70
+ "format:fix": "bun --bun biome format --write .",
71
+ "lint": "bun --bun biome lint .",
72
+ "lint:fix": "bun --bun biome lint --write .",
73
+ "prepublish": "cp -f ../../README.md ./README.md",
74
+ "publish": "bun publish || true",
75
+ "publish:canary": "bun publish --access public --tag canary || true",
76
+ "publish:latest": "bun publish --access public --tag latest || true",
77
+ "test": "bun --bun vitest run",
78
+ "test:watch": "bun --bun vitest",
79
+ "typecheck": "tsc --noEmit --project tsconfig.types.json"
80
+ },
81
+ "dependencies": {
82
+ "@intlayer/chokidar": "9.0.0-canary.1",
83
+ "@intlayer/config": "9.0.0-canary.1",
84
+ "@intlayer/core": "9.0.0-canary.1",
85
+ "@intlayer/i18next": "8.12.5-canary.0",
86
+ "@intlayer/react-i18next": "8.12.5-canary.0",
87
+ "@intlayer/types": "9.0.0-canary.1",
88
+ "next-intlayer": "9.0.0-canary.1",
89
+ "react-intlayer": "9.0.0-canary.1"
90
+ },
91
+ "devDependencies": {
92
+ "@types/node": "25.9.3",
93
+ "@types/react": "19.2.17",
94
+ "@utils/ts-config": "1.0.4",
95
+ "@utils/ts-config-types": "1.0.4",
96
+ "@utils/tsdown-config": "1.0.4",
97
+ "i18next": "26.3.1",
98
+ "next-i18next": "16.0.7",
99
+ "react-i18next": "17.0.8",
100
+ "rimraf": "6.1.3",
101
+ "tsdown": "0.21.10",
102
+ "typescript": "6.0.3",
103
+ "vitest": "4.1.9"
104
+ },
105
+ "peerDependencies": {
106
+ "i18next": ">=20.0.0",
107
+ "next": ">=14.0.0",
108
+ "next-i18next": ">=10.0.0",
109
+ "react": ">=16.0.0",
110
+ "react-dom": ">=16.0.0",
111
+ "react-i18next": ">=11.0.0"
112
+ },
113
+ "engines": {
114
+ "node": ">=14.18"
115
+ }
116
+ }