intor 2.3.7 → 2.3.8
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/next/src/adapters/next/navigation/link.js +1 -1
- package/dist/next/src/adapters/next/navigation/redirect.js +1 -5
- package/dist/next/src/adapters/next/navigation/use-router.js +4 -1
- package/dist/next/src/adapters/next/proxy/intor-proxy.js +1 -1
- package/dist/next/src/adapters/next/server/get-translator.js +1 -1
- package/package.json +1 -1
|
@@ -3,8 +3,8 @@ import { jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import { formatUrl } from 'next/dist/shared/lib/router/utils/format-url';
|
|
4
4
|
import NextLink from 'next/link';
|
|
5
5
|
import 'react';
|
|
6
|
-
import { usePathname } from './use-pathname.js';
|
|
7
6
|
import { useNavigationTarget, useNavigationStrategy } from 'intor/react';
|
|
7
|
+
import { usePathname } from './use-pathname.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* Locale-aware Link component.
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import { redirect as redirect$1 } from 'next/navigation';
|
|
2
|
-
import { getLocale } from '../server/get-locale.js';
|
|
3
2
|
import '../../../core/error/intor-error.js';
|
|
4
3
|
import { isExternalDestination } from '../../../core/utils/is-external-destination.js';
|
|
5
4
|
import { localizePathname } from '../../../core/utils/pathname/localize-pathname.js';
|
|
6
5
|
import 'logry';
|
|
7
6
|
import 'keyv';
|
|
8
|
-
import '
|
|
9
|
-
import 'p-limit';
|
|
10
|
-
import 'node:fs/promises';
|
|
11
|
-
import 'intor-translator';
|
|
7
|
+
import { getLocale } from '../server/get-locale.js';
|
|
12
8
|
|
|
13
9
|
/**
|
|
14
10
|
* Locale-aware redirect helper (server-only).
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { useRouter as useRouter$1 } from 'next/navigation';
|
|
2
|
-
import { usePathname } from './use-pathname.js';
|
|
3
2
|
import { useNavigationTarget, useNavigationStrategy } from 'intor/react';
|
|
3
|
+
import { usePathname } from './use-pathname.js';
|
|
4
4
|
|
|
5
|
+
// NOTE: Internal context imports.
|
|
6
|
+
// Rewritten to `intor/react` by Rollup alias at build time.
|
|
7
|
+
// Do not change these paths without updating the alias config.
|
|
5
8
|
/**
|
|
6
9
|
* Locale-aware router hook.
|
|
7
10
|
*
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { headers } from 'next/headers';
|
|
2
2
|
import { NextResponse } from 'next/server';
|
|
3
|
-
import { setLocaleCookieEdge } from './utils/set-locale-cookie-edge.js';
|
|
4
3
|
import '../../../core/error/intor-error.js';
|
|
5
4
|
import { getLocaleFromAcceptLanguage } from '../../../core/utils/locale/get-locale-from-accept-language.js';
|
|
6
5
|
import 'logry';
|
|
7
6
|
import 'keyv';
|
|
8
7
|
import { resolveRouting } from '../../../routing/resolve-routing.js';
|
|
8
|
+
import { setLocaleCookieEdge } from './utils/set-locale-cookie-edge.js';
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* Next.js routing adapter for Intor.
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { getLocale } from './get-locale.js';
|
|
2
1
|
import '../../../core/error/intor-error.js';
|
|
3
2
|
import 'logry';
|
|
4
3
|
import 'keyv';
|
|
@@ -6,6 +5,7 @@ import 'node:path';
|
|
|
6
5
|
import 'p-limit';
|
|
7
6
|
import 'node:fs/promises';
|
|
8
7
|
import { getTranslator as getTranslator$1 } from '../../../server/translator/get-translator.js';
|
|
8
|
+
import { getLocale } from './get-locale.js';
|
|
9
9
|
|
|
10
10
|
// Implementation
|
|
11
11
|
async function getTranslator(params) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "intor",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.8",
|
|
4
4
|
"description": "A modular and extensible i18n core designed for TypeScript and JavaScript projects. Intor enables custom translation logic with support for both frontend and backend environments, featuring runtime configuration, caching, adapters, and message loaders.",
|
|
5
5
|
"author": "Yiming Liao",
|
|
6
6
|
"homepage": "https://github.com/yiming-liao/intor#readme",
|