next-tongue 0.9.0 → 0.9.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/LICENSE +21 -0
- package/README.md +86 -0
- package/dist/cli/check-types.d.ts +0 -1
- package/dist/cli/check-types.js +0 -1
- package/dist/cli/check.d.ts +0 -1
- package/dist/cli/check.js +0 -1
- package/dist/cli/export-import.d.ts +0 -1
- package/dist/cli/export-import.js +0 -1
- package/dist/cli/extract.d.ts +0 -1
- package/dist/cli/extract.js +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +0 -1
- package/dist/cli/init.d.ts +0 -1
- package/dist/cli/init.js +0 -1
- package/dist/cli/migrate.d.ts +0 -1
- package/dist/cli/migrate.js +0 -1
- package/dist/cli/report.d.ts +0 -1
- package/dist/cli/report.js +0 -1
- package/dist/cli/reporters.d.ts +0 -1
- package/dist/cli/reporters.js +0 -1
- package/dist/cli/safe-path.d.ts +0 -1
- package/dist/cli/safe-path.js +0 -1
- package/dist/cli/translate.d.ts +0 -1
- package/dist/cli/translate.js +0 -1
- package/dist/client/dev-overlay-gate.d.ts +0 -1
- package/dist/client/dev-overlay-gate.js +0 -1
- package/dist/client/dev-overlay.d.ts +0 -1
- package/dist/client/dev-overlay.js +0 -1
- package/dist/client/dev-registry.d.ts +0 -1
- package/dist/client/dev-registry.js +0 -1
- package/dist/client/editor-url.d.ts +0 -1
- package/dist/client/editor-url.js +0 -1
- package/dist/client/index.d.ts +0 -1
- package/dist/client/index.js +0 -1
- package/dist/compiler/ast.d.ts +0 -1
- package/dist/compiler/ast.js +0 -1
- package/dist/compiler/build.d.ts +0 -1
- package/dist/compiler/build.js +0 -1
- package/dist/compiler/codegen/emit-js.d.ts +0 -1
- package/dist/compiler/codegen/emit-js.js +0 -1
- package/dist/compiler/codegen/emit-types.d.ts +0 -1
- package/dist/compiler/codegen/emit-types.js +0 -1
- package/dist/compiler/fallback.d.ts +0 -1
- package/dist/compiler/fallback.js +0 -1
- package/dist/compiler/index.d.ts +0 -1
- package/dist/compiler/index.js +0 -1
- package/dist/compiler/json-locations.d.ts +0 -1
- package/dist/compiler/json-locations.js +0 -1
- package/dist/compiler/load-messages.d.ts +0 -1
- package/dist/compiler/load-messages.js +0 -1
- package/dist/compiler/parse/icu-parser.d.ts +0 -1
- package/dist/compiler/parse/icu-parser.js +0 -1
- package/dist/compiler/pseudo.d.ts +0 -1
- package/dist/compiler/pseudo.js +0 -1
- package/dist/compiler/scan-keys.d.ts +0 -1
- package/dist/compiler/scan-keys.js +0 -1
- package/dist/compiler/scan-routes.d.ts +0 -1
- package/dist/compiler/scan-routes.js +0 -1
- package/dist/compiler/sources.d.ts +0 -1
- package/dist/compiler/sources.js +0 -1
- package/dist/compiler/validate/a11y.d.ts +0 -1
- package/dist/compiler/validate/a11y.js +0 -1
- package/dist/compiler/validate/bidi.d.ts +0 -1
- package/dist/compiler/validate/bidi.js +0 -1
- package/dist/compiler/validate/catalog.d.ts +0 -1
- package/dist/compiler/validate/catalog.js +0 -1
- package/dist/compiler/validate/length.d.ts +0 -1
- package/dist/compiler/validate/length.js +0 -1
- package/dist/compiler/validate/plurals.d.ts +0 -1
- package/dist/compiler/validate/plurals.js +0 -1
- package/dist/compiler/validate/usage.d.ts +0 -1
- package/dist/compiler/validate/usage.js +0 -1
- package/dist/config/define-config.d.ts +0 -1
- package/dist/config/define-config.js +0 -1
- package/dist/config/index.d.ts +0 -1
- package/dist/config/index.js +0 -1
- package/dist/config/load-config.d.ts +0 -1
- package/dist/config/load-config.js +0 -1
- package/dist/config/types.d.ts +0 -1
- package/dist/config/types.js +0 -1
- package/dist/config/validate.d.ts +0 -1
- package/dist/config/validate.js +0 -1
- package/dist/errors.d.ts +0 -1
- package/dist/errors.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/navigation/index.d.ts +0 -1
- package/dist/navigation/index.js +0 -1
- package/dist/navigation/locale-switcher.d.ts +0 -1
- package/dist/navigation/locale-switcher.js +0 -1
- package/dist/navigation/pathname.d.ts +0 -1
- package/dist/navigation/pathname.js +0 -1
- package/dist/next/index.d.ts +0 -1
- package/dist/next/index.js +0 -1
- package/dist/next/loader.d.ts +0 -1
- package/dist/next/loader.js +0 -1
- package/dist/next/watcher.d.ts +0 -1
- package/dist/next/watcher.js +0 -1
- package/dist/next/with-tongue.d.ts +0 -1
- package/dist/next/with-tongue.js +0 -1
- package/dist/proxy/index.d.ts +0 -1
- package/dist/proxy/index.js +0 -1
- package/dist/proxy/locale-matcher.d.ts +0 -1
- package/dist/proxy/locale-matcher.js +0 -1
- package/dist/runtime/create-t.d.ts +0 -1
- package/dist/runtime/create-t.js +0 -1
- package/dist/runtime/format-message.d.ts +0 -1
- package/dist/runtime/format-message.js +0 -1
- package/dist/runtime/format.d.ts +0 -1
- package/dist/runtime/format.js +0 -1
- package/dist/runtime/locale-preference.d.ts +0 -1
- package/dist/runtime/locale-preference.js +0 -1
- package/dist/runtime/locale.d.ts +0 -1
- package/dist/runtime/locale.js +0 -1
- package/dist/runtime/lru.d.ts +0 -1
- package/dist/runtime/lru.js +0 -1
- package/dist/runtime/rich.d.ts +0 -1
- package/dist/runtime/rich.js +0 -1
- package/dist/runtime/sanctioned-units.d.ts +0 -1
- package/dist/runtime/sanctioned-units.js +0 -1
- package/dist/runtime/translate-issues.d.ts +0 -1
- package/dist/runtime/translate-issues.js +0 -1
- package/dist/server/alternates.d.ts +0 -1
- package/dist/server/alternates.js +0 -1
- package/dist/server/index.d.ts +0 -1
- package/dist/server/index.js +9 -2
- package/dist/server/locale-preference.d.ts +0 -1
- package/dist/server/locale-preference.js +0 -1
- package/dist/testing/index.d.ts +0 -1
- package/dist/testing/index.js +0 -1
- package/package.json +34 -5
- package/dist/cli/check-types.d.ts.map +0 -1
- package/dist/cli/check-types.js.map +0 -1
- package/dist/cli/check.d.ts.map +0 -1
- package/dist/cli/check.js.map +0 -1
- package/dist/cli/export-import.d.ts.map +0 -1
- package/dist/cli/export-import.js.map +0 -1
- package/dist/cli/extract.d.ts.map +0 -1
- package/dist/cli/extract.js.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/init.d.ts.map +0 -1
- package/dist/cli/init.js.map +0 -1
- package/dist/cli/migrate.d.ts.map +0 -1
- package/dist/cli/migrate.js.map +0 -1
- package/dist/cli/report.d.ts.map +0 -1
- package/dist/cli/report.js.map +0 -1
- package/dist/cli/reporters.d.ts.map +0 -1
- package/dist/cli/reporters.js.map +0 -1
- package/dist/cli/safe-path.d.ts.map +0 -1
- package/dist/cli/safe-path.js.map +0 -1
- package/dist/cli/translate.d.ts.map +0 -1
- package/dist/cli/translate.js.map +0 -1
- package/dist/client/dev-overlay-gate.d.ts.map +0 -1
- package/dist/client/dev-overlay-gate.js.map +0 -1
- package/dist/client/dev-overlay.d.ts.map +0 -1
- package/dist/client/dev-overlay.js.map +0 -1
- package/dist/client/dev-registry.d.ts.map +0 -1
- package/dist/client/dev-registry.js.map +0 -1
- package/dist/client/editor-url.d.ts.map +0 -1
- package/dist/client/editor-url.js.map +0 -1
- package/dist/client/index.d.ts.map +0 -1
- package/dist/client/index.js.map +0 -1
- package/dist/compiler/ast.d.ts.map +0 -1
- package/dist/compiler/ast.js.map +0 -1
- package/dist/compiler/build.d.ts.map +0 -1
- package/dist/compiler/build.js.map +0 -1
- package/dist/compiler/codegen/emit-js.d.ts.map +0 -1
- package/dist/compiler/codegen/emit-js.js.map +0 -1
- package/dist/compiler/codegen/emit-types.d.ts.map +0 -1
- package/dist/compiler/codegen/emit-types.js.map +0 -1
- package/dist/compiler/fallback.d.ts.map +0 -1
- package/dist/compiler/fallback.js.map +0 -1
- package/dist/compiler/index.d.ts.map +0 -1
- package/dist/compiler/index.js.map +0 -1
- package/dist/compiler/json-locations.d.ts.map +0 -1
- package/dist/compiler/json-locations.js.map +0 -1
- package/dist/compiler/load-messages.d.ts.map +0 -1
- package/dist/compiler/load-messages.js.map +0 -1
- package/dist/compiler/parse/icu-parser.d.ts.map +0 -1
- package/dist/compiler/parse/icu-parser.js.map +0 -1
- package/dist/compiler/pseudo.d.ts.map +0 -1
- package/dist/compiler/pseudo.js.map +0 -1
- package/dist/compiler/scan-keys.d.ts.map +0 -1
- package/dist/compiler/scan-keys.js.map +0 -1
- package/dist/compiler/scan-routes.d.ts.map +0 -1
- package/dist/compiler/scan-routes.js.map +0 -1
- package/dist/compiler/sources.d.ts.map +0 -1
- package/dist/compiler/sources.js.map +0 -1
- package/dist/compiler/validate/a11y.d.ts.map +0 -1
- package/dist/compiler/validate/a11y.js.map +0 -1
- package/dist/compiler/validate/bidi.d.ts.map +0 -1
- package/dist/compiler/validate/bidi.js.map +0 -1
- package/dist/compiler/validate/catalog.d.ts.map +0 -1
- package/dist/compiler/validate/catalog.js.map +0 -1
- package/dist/compiler/validate/length.d.ts.map +0 -1
- package/dist/compiler/validate/length.js.map +0 -1
- package/dist/compiler/validate/plurals.d.ts.map +0 -1
- package/dist/compiler/validate/plurals.js.map +0 -1
- package/dist/compiler/validate/usage.d.ts.map +0 -1
- package/dist/compiler/validate/usage.js.map +0 -1
- package/dist/config/define-config.d.ts.map +0 -1
- package/dist/config/define-config.js.map +0 -1
- package/dist/config/index.d.ts.map +0 -1
- package/dist/config/index.js.map +0 -1
- package/dist/config/load-config.d.ts.map +0 -1
- package/dist/config/load-config.js.map +0 -1
- package/dist/config/types.d.ts.map +0 -1
- package/dist/config/types.js.map +0 -1
- package/dist/config/validate.d.ts.map +0 -1
- package/dist/config/validate.js.map +0 -1
- package/dist/errors.d.ts.map +0 -1
- package/dist/errors.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/navigation/index.d.ts.map +0 -1
- package/dist/navigation/index.js.map +0 -1
- package/dist/navigation/locale-switcher.d.ts.map +0 -1
- package/dist/navigation/locale-switcher.js.map +0 -1
- package/dist/navigation/pathname.d.ts.map +0 -1
- package/dist/navigation/pathname.js.map +0 -1
- package/dist/next/index.d.ts.map +0 -1
- package/dist/next/index.js.map +0 -1
- package/dist/next/loader.d.ts.map +0 -1
- package/dist/next/loader.js.map +0 -1
- package/dist/next/watcher.d.ts.map +0 -1
- package/dist/next/watcher.js.map +0 -1
- package/dist/next/with-tongue.d.ts.map +0 -1
- package/dist/next/with-tongue.js.map +0 -1
- package/dist/proxy/index.d.ts.map +0 -1
- package/dist/proxy/index.js.map +0 -1
- package/dist/proxy/locale-matcher.d.ts.map +0 -1
- package/dist/proxy/locale-matcher.js.map +0 -1
- package/dist/runtime/create-t.d.ts.map +0 -1
- package/dist/runtime/create-t.js.map +0 -1
- package/dist/runtime/create-t.rich.test.d.ts +0 -2
- package/dist/runtime/create-t.rich.test.d.ts.map +0 -1
- package/dist/runtime/create-t.rich.test.js +0 -90
- package/dist/runtime/create-t.rich.test.js.map +0 -1
- package/dist/runtime/format-message.d.ts.map +0 -1
- package/dist/runtime/format-message.js.map +0 -1
- package/dist/runtime/format.d.ts.map +0 -1
- package/dist/runtime/format.js.map +0 -1
- package/dist/runtime/locale-preference.d.ts.map +0 -1
- package/dist/runtime/locale-preference.js.map +0 -1
- package/dist/runtime/locale.d.ts.map +0 -1
- package/dist/runtime/locale.js.map +0 -1
- package/dist/runtime/lru.d.ts.map +0 -1
- package/dist/runtime/lru.js.map +0 -1
- package/dist/runtime/rich.d.ts.map +0 -1
- package/dist/runtime/rich.js.map +0 -1
- package/dist/runtime/rich.test.d.ts +0 -2
- package/dist/runtime/rich.test.d.ts.map +0 -1
- package/dist/runtime/rich.test.js +0 -22
- package/dist/runtime/rich.test.js.map +0 -1
- package/dist/runtime/sanctioned-units.d.ts.map +0 -1
- package/dist/runtime/sanctioned-units.js.map +0 -1
- package/dist/runtime/translate-issues.d.ts.map +0 -1
- package/dist/runtime/translate-issues.js.map +0 -1
- package/dist/server/alternates.d.ts.map +0 -1
- package/dist/server/alternates.js.map +0 -1
- package/dist/server/index.d.ts.map +0 -1
- package/dist/server/index.js.map +0 -1
- package/dist/server/locale-preference.d.ts.map +0 -1
- package/dist/server/locale-preference.js.map +0 -1
- package/dist/testing/index.d.ts.map +0 -1
- package/dist/testing/index.js.map +0 -1
- package/dist/tsconfig.type-tests.tsbuildinfo +0 -1
- package/dist/types/type-safety.test-d.d.ts +0 -28
- package/dist/types/type-safety.test-d.d.ts.map +0 -1
- package/dist/types/type-safety.test-d.js +0 -31
- package/dist/types/type-safety.test-d.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Louis Wright
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# next-tongue
|
|
2
|
+
|
|
3
|
+
**Compiler-first, type-safe i18n for the Next.js 16 App Router.** Works with Turbopack, keeps the locale in route params, zero dependencies beyond `next` and `react`.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/next-tongue)
|
|
6
|
+
[](./LICENSE)
|
|
7
|
+
|
|
8
|
+
> **Beta 0.9** — public API is frozen. See [API freeze](https://github.com/MrLouisWright/next-tongue/blob/main/docs/api-freeze.md).
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install next-tongue
|
|
14
|
+
npx tongue init
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Requires **Next.js ≥ 16** (App Router) and **React ≥ 19**.
|
|
18
|
+
|
|
19
|
+
## Quick start
|
|
20
|
+
|
|
21
|
+
```ts
|
|
22
|
+
// tongue.config.ts
|
|
23
|
+
import { defineConfig } from 'next-tongue/config';
|
|
24
|
+
|
|
25
|
+
export default defineConfig({
|
|
26
|
+
locales: ['en', 'de'],
|
|
27
|
+
defaultLocale: 'en',
|
|
28
|
+
messages: './messages/{locale}.json',
|
|
29
|
+
});
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
// next.config.ts
|
|
34
|
+
import { withTongue } from 'next-tongue/next';
|
|
35
|
+
|
|
36
|
+
export default withTongue({ cacheComponents: true });
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
```ts
|
|
40
|
+
// proxy.ts
|
|
41
|
+
import { createProxy } from 'next-tongue/proxy';
|
|
42
|
+
|
|
43
|
+
export const proxy = createProxy();
|
|
44
|
+
export const config = { matcher: ['/((?!api|_next|.*\\..*).*)'] };
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
// app/[locale]/page.tsx
|
|
49
|
+
import { getT } from 'next-tongue/server';
|
|
50
|
+
|
|
51
|
+
export default async function Page({
|
|
52
|
+
params,
|
|
53
|
+
}: {
|
|
54
|
+
params: Promise<{ locale: string }>;
|
|
55
|
+
}) {
|
|
56
|
+
const { locale } = await params;
|
|
57
|
+
const t = await getT(locale, 'home');
|
|
58
|
+
return <h1>{t('title')}</h1>;
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Package exports
|
|
63
|
+
|
|
64
|
+
| Import | Use |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `next-tongue/config` | `defineConfig` |
|
|
67
|
+
| `next-tongue/next` | `withTongue` |
|
|
68
|
+
| `next-tongue/server` | `getT`, `getFormat`, `localeParams`, … |
|
|
69
|
+
| `next-tongue/client` | `TongueProvider`, `useT`, … |
|
|
70
|
+
| `next-tongue/proxy` | `createProxy` |
|
|
71
|
+
| `next-tongue/navigation` | `createNavigation` |
|
|
72
|
+
| `next-tongue/testing` | test helpers |
|
|
73
|
+
|
|
74
|
+
CLI: `tongue build | check | extract | init | export | import | report | translate | migrate`
|
|
75
|
+
|
|
76
|
+
## Docs
|
|
77
|
+
|
|
78
|
+
- [Getting started](https://github.com/MrLouisWright/next-tongue/blob/main/docs/getting-started.md)
|
|
79
|
+
- [Configuration](https://github.com/MrLouisWright/next-tongue/blob/main/docs/configuration.md)
|
|
80
|
+
- [CLI](https://github.com/MrLouisWright/next-tongue/blob/main/docs/cli.md)
|
|
81
|
+
- [Migration from next-intl](https://github.com/MrLouisWright/next-tongue/blob/main/docs/migration/next-intl.md)
|
|
82
|
+
- [Roadmap](https://github.com/MrLouisWright/next-tongue/blob/main/ROADMAP.md)
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
MIT © Louis Wright
|
package/dist/cli/check-types.js
CHANGED
package/dist/cli/check.d.ts
CHANGED
package/dist/cli/check.js
CHANGED
|
@@ -29,4 +29,3 @@ export declare function csvToUnits(raw: string): Unit[];
|
|
|
29
29
|
export declare function unitsToXliff(units: Unit[], srcLang: string, trgLang: string): string;
|
|
30
30
|
export declare function xliffToUnits(raw: string): Unit[];
|
|
31
31
|
export {};
|
|
32
|
-
//# sourceMappingURL=export-import.d.ts.map
|
package/dist/cli/extract.d.ts
CHANGED
package/dist/cli/extract.js
CHANGED
package/dist/cli/index.d.ts
CHANGED
package/dist/cli/index.js
CHANGED
package/dist/cli/init.d.ts
CHANGED
package/dist/cli/init.js
CHANGED
package/dist/cli/migrate.d.ts
CHANGED
|
@@ -33,4 +33,3 @@ export declare function transformNextIntl(source: string, _file: string): {
|
|
|
33
33
|
};
|
|
34
34
|
/** Heuristic: `locale` is a binding from params, props, or a nearby const. */
|
|
35
35
|
export declare function hasLocaleInScope(source: string): boolean;
|
|
36
|
-
//# sourceMappingURL=migrate.d.ts.map
|
package/dist/cli/migrate.js
CHANGED
package/dist/cli/report.d.ts
CHANGED
package/dist/cli/report.js
CHANGED
package/dist/cli/reporters.d.ts
CHANGED
|
@@ -4,4 +4,3 @@ export declare function reportPretty(result: CheckResult): void;
|
|
|
4
4
|
export declare function reportJson(result: CheckResult): void;
|
|
5
5
|
/** GitHub Actions workflow commands. */
|
|
6
6
|
export declare function reportGithub(result: CheckResult): void;
|
|
7
|
-
//# sourceMappingURL=reporters.d.ts.map
|
package/dist/cli/reporters.js
CHANGED
package/dist/cli/safe-path.d.ts
CHANGED
package/dist/cli/safe-path.js
CHANGED
package/dist/cli/translate.d.ts
CHANGED
|
@@ -23,4 +23,3 @@ export declare function maskIcu(source: string): {
|
|
|
23
23
|
export declare function estimateTokens(text: string): number;
|
|
24
24
|
export declare function cmdTranslate(opts: TranslateCliOptions): Promise<void>;
|
|
25
25
|
export declare function validateParity(source: string, target: string, locale: string): void;
|
|
26
|
-
//# sourceMappingURL=translate.d.ts.map
|
package/dist/cli/translate.js
CHANGED
package/dist/client/index.d.ts
CHANGED
|
@@ -41,4 +41,3 @@ export type { SanctionedUnit, SimpleUnit, DisplayNameType, } from '../runtime/fo
|
|
|
41
41
|
export { isSanctionedUnit, SIMPLE_UNITS } from '../runtime/format.js';
|
|
42
42
|
export { translateIssues, defaultFormatPath, } from '../runtime/translate-issues.js';
|
|
43
43
|
export type { TranslateIssue, TranslateIssuesOptions, IssuePathSegment, } from '../runtime/translate-issues.js';
|
|
44
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/client/index.js
CHANGED
package/dist/compiler/ast.d.ts
CHANGED
package/dist/compiler/ast.js
CHANGED
package/dist/compiler/build.d.ts
CHANGED
|
@@ -16,4 +16,3 @@ export declare function buildMessages(options: BuildOptions): Promise<BuildResul
|
|
|
16
16
|
/** Locales written into message modules / types (includes pseudo when enabled). */
|
|
17
17
|
export declare function localesForEmit(config: ResolvedTongueConfig): readonly string[];
|
|
18
18
|
export declare function ensureDir(path: string): Promise<void>;
|
|
19
|
-
//# sourceMappingURL=build.d.ts.map
|
package/dist/compiler/build.js
CHANGED
|
@@ -28,4 +28,3 @@ export declare function emitRichMessageFunction(exportName: string, ast: Message
|
|
|
28
28
|
export declare function hasTags(ast: MessageAst): boolean;
|
|
29
29
|
/** Safe JS identifier from a message key. */
|
|
30
30
|
export declare function safeIdent(key: string): string;
|
|
31
|
-
//# sourceMappingURL=emit-js.d.ts.map
|
package/dist/compiler/index.d.ts
CHANGED
|
@@ -8,4 +8,3 @@ export { resolveFallbackChain, cldrParents } from './fallback.js';
|
|
|
8
8
|
export { pluralCategoriesFor, checkPluralCategories } from './validate/plurals.js';
|
|
9
9
|
export { emitMessageFunction, safeIdent } from './codegen/emit-js.js';
|
|
10
10
|
export { emitTypesFile } from './codegen/emit-types.js';
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/compiler/index.js
CHANGED
|
@@ -6,4 +6,3 @@ export { resolveFallbackChain, cldrParents } from './fallback.js';
|
|
|
6
6
|
export { pluralCategoriesFor, checkPluralCategories } from './validate/plurals.js';
|
|
7
7
|
export { emitMessageFunction, safeIdent } from './codegen/emit-js.js';
|
|
8
8
|
export { emitTypesFile } from './codegen/emit-types.js';
|
|
9
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -13,4 +13,3 @@ export declare function groupByNamespace(flat: FlatMessages): Record<string, Fla
|
|
|
13
13
|
export declare function loadLocaleMessages(config: ResolvedTongueConfig, cwd: string): Promise<LocaleCatalogs>;
|
|
14
14
|
export declare function resolveMessagePath(cwd: string, pattern: string, locale: string): string;
|
|
15
15
|
export { dirname, join };
|
|
16
|
-
//# sourceMappingURL=load-messages.d.ts.map
|
|
@@ -11,4 +11,3 @@ export type PseudoOptions = {
|
|
|
11
11
|
export declare function pseudoLocalizeString(input: string, options?: PseudoOptions): string;
|
|
12
12
|
/** Deep-clone AST, transforming only `literal` nodes. */
|
|
13
13
|
export declare function pseudoLocalizeAst(ast: MessageAst, options?: PseudoOptions): MessageAst;
|
|
14
|
-
//# sourceMappingURL=pseudo.d.ts.map
|
package/dist/compiler/pseudo.js
CHANGED
|
@@ -11,4 +11,3 @@ export type ReferencedKey = {
|
|
|
11
11
|
*/
|
|
12
12
|
export declare function scanReferencedKeys(cwd: string, roots?: string[]): Promise<ReferencedKey[]>;
|
|
13
13
|
export declare function extractFromSource(source: string, file: string): ReferencedKey[];
|
|
14
|
-
//# sourceMappingURL=scan-keys.d.ts.map
|
|
@@ -19,4 +19,3 @@ export declare function writeSourcesCache(cwd: string, outDir: string, payloads:
|
|
|
19
19
|
/** Keys that appear in more than one origin (file + source, or multiple sources). */
|
|
20
20
|
export declare function duplicateSourceKeys(origins: SourceOrigin[]): string[];
|
|
21
21
|
export declare function sourcesCachePath(cwd: string, outDir: string): string;
|
|
22
|
-
//# sourceMappingURL=sources.d.ts.map
|
package/dist/compiler/sources.js
CHANGED
|
@@ -2,4 +2,3 @@ import type { ResolvedTongueConfig } from '../../config/types.js';
|
|
|
2
2
|
import type { CheckIssue } from '../../cli/check-types.js';
|
|
3
3
|
/** unused + undefined checks against scanned source references. */
|
|
4
4
|
export declare function validateUsage(config: ResolvedTongueConfig, cwd: string): Promise<CheckIssue[]>;
|
|
5
|
-
//# sourceMappingURL=usage.d.ts.map
|
package/dist/config/index.d.ts
CHANGED
|
@@ -2,4 +2,3 @@ export { defineConfig } from './define-config.js';
|
|
|
2
2
|
export { loadConfig, loadConfigFromObject } from './load-config.js';
|
|
3
3
|
export { resolveConfig, isValidBcp47 } from './validate.js';
|
|
4
4
|
export type { TongueConfig, ResolvedTongueConfig, StrictLevel, LocaleCookieConfig, DomainConfig, PseudoConfig, DevOverlayOption, ResolvedDevOverlay, } from './types.js';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/config/index.js
CHANGED
|
@@ -15,4 +15,3 @@ export declare function loadConfig(options?: LoadConfigOptions): Promise<{
|
|
|
15
15
|
/** Sync-ish helper for tests: validate an in-memory config object. */
|
|
16
16
|
export declare function loadConfigFromObject(input: TongueConfig): ResolvedTongueConfig;
|
|
17
17
|
export declare function readJsonFile(path: string): Promise<unknown>;
|
|
18
|
-
//# sourceMappingURL=load-config.d.ts.map
|
package/dist/config/types.d.ts
CHANGED
package/dist/config/types.js
CHANGED
|
@@ -3,4 +3,3 @@ export declare function isValidBcp47(tag: string): boolean;
|
|
|
3
3
|
/** IANA time zone id — validated via `Intl.DateTimeFormat`. */
|
|
4
4
|
export declare function isValidTimeZone(timeZone: string): boolean;
|
|
5
5
|
export declare function resolveConfig(input: TongueConfig): ResolvedTongueConfig;
|
|
6
|
-
//# sourceMappingURL=validate.d.ts.map
|
package/dist/config/validate.js
CHANGED
package/dist/errors.d.ts
CHANGED
package/dist/errors.js
CHANGED