@shop-on/i18n 0.0.0-stage → 0.2.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.
- package/README.md +45 -2
- package/dist/LICENSE.md +39 -0
- package/dist/core/isomorphic.d.ts +10 -0
- package/dist/core/isomorphic.js +48 -0
- package/dist/core/runtime-config.d.ts +7 -0
- package/dist/core/runtime-config.js +16 -0
- package/dist/core/server.d.ts +13 -0
- package/dist/core/server.js +42 -0
- package/dist/core/shared.d.ts +15 -0
- package/dist/core/shared.js +55 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +5 -0
- package/dist/server.d.ts +4 -0
- package/dist/server.js +4 -0
- package/package.json +26 -3
package/README.md
CHANGED
|
@@ -1,3 +1,46 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @shop-on/i18n
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Lightweight i18n for TanStack Start. Handles locale routing, URL rewriting, cookie sync, and translations via `use-intl`.
|
|
4
|
+
|
|
5
|
+
## Strategy
|
|
6
|
+
|
|
7
|
+
- No prefix for default locale (`/about`)
|
|
8
|
+
- Prefix for other locales (`/en/about`)
|
|
9
|
+
- Ignored paths (`/api`, `/rpc`) bypass locale handling
|
|
10
|
+
|
|
11
|
+
## Exports
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
// Isomorphic — factories + React hooks + cookie utils
|
|
15
|
+
import { createI18nClient, IntlProvider, useTranslations } from "@shop-on/i18n";
|
|
16
|
+
import { LOCALE_COOKIE, createCookieHeader, parseLocaleCookie } from "@shop-on/i18n";
|
|
17
|
+
|
|
18
|
+
// Server only — middleware + cookie utils
|
|
19
|
+
import { createI18nServer, createCookieHeader } from "@shop-on/i18n/server";
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The cookie utils on the root entry serve cookie-only consumers (apps/admin reads
|
|
23
|
+
`spn-locale` on both server and client — no URL prefixes; see `apps/admin/src/lib/locale.ts`).
|
|
24
|
+
Path-prefixed surfaces (themes) keep using `createI18nClient` / `createI18nServer`.
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
Themes keep their locale list in a root-level `theme.config.json` so the runtime and the build (postbuild script) share a single source of truth:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
// lib/i18n.ts — theme reads from its own theme.config.json
|
|
32
|
+
import config from "../../theme.config.json";
|
|
33
|
+
|
|
34
|
+
const i18n = createI18nClient({
|
|
35
|
+
defaultLocale: "mn",
|
|
36
|
+
locales: config.locales,
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export const { getCurrentLocale, deLocalizeUrl, localizeUrl, isValidLocale } = i18n;
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Adding a language to a theme
|
|
43
|
+
|
|
44
|
+
1. Add the locale to `themes/<name>/theme.config.json#locales` (the single source of truth — runtime + build both read this file)
|
|
45
|
+
2. Create a translation JSON catalog at `themes/<name>/src/locales/<locale>.default.json`
|
|
46
|
+
3. Run `pnpm build` — postbuild copies `locales` into `.output/theme.json#available_locales`, which the Rails API validates on upload
|
package/dist/LICENSE.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Cody Theme Development License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Cody LLC. All rights reserved except as granted below.
|
|
4
|
+
|
|
5
|
+
"The Software" is this package, its source, and its documentation. "The
|
|
6
|
+
Platform" is Cody, the commerce platform operated by Cody LLC.
|
|
7
|
+
|
|
8
|
+
## 1. Grant
|
|
9
|
+
|
|
10
|
+
You may use, copy and modify the Software, and distribute modified copies, solely
|
|
11
|
+
to develop, test, and distribute themes, apps and other extensions that run on
|
|
12
|
+
the Platform.
|
|
13
|
+
|
|
14
|
+
## 2. Restrictions
|
|
15
|
+
|
|
16
|
+
You may not:
|
|
17
|
+
|
|
18
|
+
1. use the Software, or anything derived from it, with any commerce platform,
|
|
19
|
+
storefront or hosting service other than the Platform;
|
|
20
|
+
2. use the Software to build a product that competes with the Platform;
|
|
21
|
+
3. sublicense the Software, or distribute it other than as part of a theme,
|
|
22
|
+
app or extension for the Platform;
|
|
23
|
+
4. remove or alter this license or any copyright notice in the Software.
|
|
24
|
+
|
|
25
|
+
## 3. Your work
|
|
26
|
+
|
|
27
|
+
Themes, apps and extensions you build with the Software are yours. The parts of
|
|
28
|
+
the Software they include stay under this license.
|
|
29
|
+
|
|
30
|
+
## 4. Termination
|
|
31
|
+
|
|
32
|
+
This license ends automatically if you break any of its terms. You must then
|
|
33
|
+
stop using the Software and delete your copies of it.
|
|
34
|
+
|
|
35
|
+
## 5. No warranty
|
|
36
|
+
|
|
37
|
+
The Software is provided "as is", without warranty of any kind. Cody LLC is not
|
|
38
|
+
liable for any claim, damages or other liability arising from the Software or
|
|
39
|
+
its use.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { I18nConfig, I18nConfigInput } from "./shared.js";
|
|
2
|
+
//#region src/core/isomorphic.d.ts
|
|
3
|
+
export declare function createI18nClient<L extends string>(config: I18nConfigInput<L>): {
|
|
4
|
+
getCurrentLocale: import("@tanstack/react-start").IsomorphicFn<[], L, L>;
|
|
5
|
+
deLocalizeUrl: (url: URL) => URL;
|
|
6
|
+
localizeUrl: (url: URL) => URL;
|
|
7
|
+
isValidLocale: (locale: string | undefined) => locale is L;
|
|
8
|
+
getConfig: () => I18nConfig<L>;
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { extractLocaleFromPath, parseLocaleCookie, resolveConfigInput, shouldIgnorePath } from "./shared.js";
|
|
2
|
+
import { getRequest } from "@tanstack/react-start/server";
|
|
3
|
+
import { createIsomorphicFn } from "@tanstack/react-start";
|
|
4
|
+
//#region src/core/isomorphic.ts
|
|
5
|
+
function createI18nClient(config) {
|
|
6
|
+
const getConfig = resolveConfigInput(config);
|
|
7
|
+
const getCurrentLocale = createIsomorphicFn().server(() => {
|
|
8
|
+
const cfg = getConfig();
|
|
9
|
+
const request = getRequest();
|
|
10
|
+
const url = new URL(request.url);
|
|
11
|
+
if (shouldIgnorePath(url.pathname)) return parseLocaleCookie(request.headers.get("cookie"), cfg.locales) ?? cfg.defaultLocale;
|
|
12
|
+
return extractLocaleFromPath(url.pathname, cfg) ?? cfg.defaultLocale;
|
|
13
|
+
}).client(() => {
|
|
14
|
+
const cfg = getConfig();
|
|
15
|
+
if (shouldIgnorePath(window.location.pathname)) return parseLocaleCookie(document.cookie, cfg.locales) ?? cfg.defaultLocale;
|
|
16
|
+
return extractLocaleFromPath(window.location.pathname, cfg) ?? cfg.defaultLocale;
|
|
17
|
+
});
|
|
18
|
+
function deLocalizeUrl(url) {
|
|
19
|
+
if (shouldIgnorePath(url.pathname)) return url;
|
|
20
|
+
const locale = extractLocaleFromPath(url.pathname, getConfig());
|
|
21
|
+
if (locale) {
|
|
22
|
+
const newUrl = new URL(url);
|
|
23
|
+
newUrl.pathname = url.pathname.replace(`/${locale}`, "") || "/";
|
|
24
|
+
return newUrl;
|
|
25
|
+
}
|
|
26
|
+
return url;
|
|
27
|
+
}
|
|
28
|
+
function localizeUrl(url) {
|
|
29
|
+
if (shouldIgnorePath(url.pathname)) return url;
|
|
30
|
+
const locale = getCurrentLocale();
|
|
31
|
+
if (locale === getConfig().defaultLocale) return url;
|
|
32
|
+
const newUrl = new URL(url);
|
|
33
|
+
newUrl.pathname = `/${locale}${url.pathname === "/" ? "" : url.pathname}`;
|
|
34
|
+
return newUrl;
|
|
35
|
+
}
|
|
36
|
+
function isValidLocale(locale) {
|
|
37
|
+
return getConfig().locales.includes(locale);
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
getCurrentLocale,
|
|
41
|
+
deLocalizeUrl,
|
|
42
|
+
localizeUrl,
|
|
43
|
+
isValidLocale,
|
|
44
|
+
getConfig
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { createI18nClient };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { I18nConfig } from "./shared.js";
|
|
2
|
+
//#region src/core/runtime-config.d.ts
|
|
3
|
+
export declare function setRuntimeI18nConfig<L extends string>(config: I18nConfig<L>): void;
|
|
4
|
+
export declare function getRuntimeI18nConfig<L extends string>(): I18nConfig<L> | undefined;
|
|
5
|
+
export declare function createRuntimeI18nConfigProvider<L extends string>(fallback: I18nConfig<L>): () => I18nConfig<L>;
|
|
6
|
+
export declare function runtimeI18nConfigScript(config: I18nConfig<string>): string;
|
|
7
|
+
//#endregion
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
//#region src/core/runtime-config.ts
|
|
2
|
+
const GLOBAL_KEY = "__SPN_I18N_CONFIG__";
|
|
3
|
+
function setRuntimeI18nConfig(config) {
|
|
4
|
+
globalThis[GLOBAL_KEY] = config;
|
|
5
|
+
}
|
|
6
|
+
function getRuntimeI18nConfig() {
|
|
7
|
+
return globalThis[GLOBAL_KEY];
|
|
8
|
+
}
|
|
9
|
+
function createRuntimeI18nConfigProvider(fallback) {
|
|
10
|
+
return () => getRuntimeI18nConfig() ?? fallback;
|
|
11
|
+
}
|
|
12
|
+
function runtimeI18nConfigScript(config) {
|
|
13
|
+
return `window.${GLOBAL_KEY}=${JSON.stringify(config).replace(/</g, "\\u003c")}`;
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { createRuntimeI18nConfigProvider, getRuntimeI18nConfig, runtimeI18nConfigScript, setRuntimeI18nConfig };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { I18nConfigInput } from "./shared.js";
|
|
2
|
+
//#region src/core/server.d.ts
|
|
3
|
+
export type LocaleMiddlewareResult = {
|
|
4
|
+
redirect?: Response;
|
|
5
|
+
setCookie?: {
|
|
6
|
+
name: string;
|
|
7
|
+
value: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export declare function createI18nServer<L extends string>(config: I18nConfigInput<L>): {
|
|
11
|
+
handleLocaleMiddleware: (request: Request) => LocaleMiddlewareResult;
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LOCALE_COOKIE, extractAnyLocaleFromPath, extractLocaleFromPath, isValidLocale, parseLocaleCookie, resolveConfigInput, shouldIgnorePath } from "./shared.js";
|
|
2
|
+
//#region src/core/server.ts
|
|
3
|
+
function redirectTo(url, status) {
|
|
4
|
+
return new Response(null, {
|
|
5
|
+
status,
|
|
6
|
+
headers: { Location: url.pathname + url.search }
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
function createI18nServer(config) {
|
|
10
|
+
const getConfig = resolveConfigInput(config);
|
|
11
|
+
function handleLocaleMiddleware(request) {
|
|
12
|
+
const cfg = getConfig();
|
|
13
|
+
const url = new URL(request.url);
|
|
14
|
+
const pathname = url.pathname;
|
|
15
|
+
if (shouldIgnorePath(pathname)) return {};
|
|
16
|
+
if (pathname.startsWith(`/${cfg.defaultLocale}/`) || pathname === `/${cfg.defaultLocale}`) {
|
|
17
|
+
url.pathname = pathname.replace(`/${cfg.defaultLocale}`, "") || "/";
|
|
18
|
+
return { redirect: redirectTo(url, 301) };
|
|
19
|
+
}
|
|
20
|
+
const anyLocale = extractAnyLocaleFromPath(pathname);
|
|
21
|
+
if (anyLocale && !isValidLocale(anyLocale, cfg.locales)) {
|
|
22
|
+
url.pathname = pathname.replace(`/${anyLocale}`, "") || "/";
|
|
23
|
+
return { redirect: redirectTo(url, 302) };
|
|
24
|
+
}
|
|
25
|
+
const urlLocale = extractLocaleFromPath(pathname, cfg);
|
|
26
|
+
if (urlLocale) {
|
|
27
|
+
const strippedPath = pathname.replace(`/${urlLocale}`, "") || "/";
|
|
28
|
+
if (shouldIgnorePath(strippedPath)) {
|
|
29
|
+
url.pathname = strippedPath;
|
|
30
|
+
return { redirect: redirectTo(url, 301) };
|
|
31
|
+
}
|
|
32
|
+
if (urlLocale !== parseLocaleCookie(request.headers.get("cookie"), cfg.locales)) return { setCookie: {
|
|
33
|
+
name: LOCALE_COOKIE,
|
|
34
|
+
value: urlLocale
|
|
35
|
+
} };
|
|
36
|
+
}
|
|
37
|
+
return {};
|
|
38
|
+
}
|
|
39
|
+
return { handleLocaleMiddleware };
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
export { createI18nServer };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
//#region src/core/shared.d.ts
|
|
2
|
+
export declare const LOCALE_COOKIE = "spn-locale";
|
|
3
|
+
export declare const PLATFORM_LOCALES: readonly ["mn", "en", "zh", "ru", "ko", "ja", "de", "fr", "es"];
|
|
4
|
+
export type PlatformLocale = (typeof PLATFORM_LOCALES)[number];
|
|
5
|
+
export declare const NATIVE_LOCALE_NAMES: Record<string, string>;
|
|
6
|
+
export declare function localeDisplayName(locale: string): string;
|
|
7
|
+
export type I18nConfig<L extends string> = {
|
|
8
|
+
defaultLocale: L;
|
|
9
|
+
locales: readonly L[];
|
|
10
|
+
};
|
|
11
|
+
export type I18nConfigInput<L extends string> = I18nConfig<L> | (() => I18nConfig<L>);
|
|
12
|
+
export declare function shouldIgnorePath(pathname: string): boolean;
|
|
13
|
+
export declare function parseLocaleCookie<L extends string>(cookie: string | null, locales: readonly L[], cookieName?: string): L | null;
|
|
14
|
+
export declare function createCookieHeader(name: string, value: string): string;
|
|
15
|
+
//#endregion
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
//#region src/core/shared.ts
|
|
2
|
+
const LOCALE_COOKIE = "spn-locale";
|
|
3
|
+
const ignoredPathsRegex = /^\/(?:api|rpc)(?:\/|$)/;
|
|
4
|
+
const PLATFORM_LOCALES = [
|
|
5
|
+
"mn",
|
|
6
|
+
"en",
|
|
7
|
+
"zh",
|
|
8
|
+
"ru",
|
|
9
|
+
"ko",
|
|
10
|
+
"ja",
|
|
11
|
+
"de",
|
|
12
|
+
"fr",
|
|
13
|
+
"es"
|
|
14
|
+
];
|
|
15
|
+
const NATIVE_LOCALE_NAMES = {
|
|
16
|
+
mn: "Монгол",
|
|
17
|
+
en: "English",
|
|
18
|
+
zh: "中文",
|
|
19
|
+
ru: "Русский",
|
|
20
|
+
ko: "한국어",
|
|
21
|
+
ja: "日本語",
|
|
22
|
+
de: "Deutsch",
|
|
23
|
+
fr: "Français",
|
|
24
|
+
es: "Español"
|
|
25
|
+
};
|
|
26
|
+
function localeDisplayName(locale) {
|
|
27
|
+
return NATIVE_LOCALE_NAMES[locale] ?? locale;
|
|
28
|
+
}
|
|
29
|
+
function resolveConfigInput(input) {
|
|
30
|
+
return typeof input === "function" ? input : () => input;
|
|
31
|
+
}
|
|
32
|
+
function shouldIgnorePath(pathname) {
|
|
33
|
+
return ignoredPathsRegex.test(pathname);
|
|
34
|
+
}
|
|
35
|
+
function isValidLocale(locale, locales) {
|
|
36
|
+
return locales.includes(locale);
|
|
37
|
+
}
|
|
38
|
+
function extractLocaleFromPath(pathname, config) {
|
|
39
|
+
const locale = /^\/([a-z]{2})(?:\/|$)/.exec(pathname)?.[1];
|
|
40
|
+
return locale && isValidLocale(locale, config.locales) && locale !== config.defaultLocale ? locale : null;
|
|
41
|
+
}
|
|
42
|
+
function extractAnyLocaleFromPath(pathname) {
|
|
43
|
+
const locale = /^\/([a-z]{2})(?:\/|$)/.exec(pathname)?.[1];
|
|
44
|
+
return locale && isValidLocale(locale, PLATFORM_LOCALES) ? locale : null;
|
|
45
|
+
}
|
|
46
|
+
function parseLocaleCookie(cookie, locales, cookieName = LOCALE_COOKIE) {
|
|
47
|
+
if (!cookie) return null;
|
|
48
|
+
const locale = new RegExp(`(?:^|;\\s*)${cookieName}=([^;]+)`).exec(cookie)?.[1];
|
|
49
|
+
return locale && isValidLocale(locale, locales) ? locale : null;
|
|
50
|
+
}
|
|
51
|
+
function createCookieHeader(name, value) {
|
|
52
|
+
return `${name}=${value}; Path=/; Max-Age=31536000; SameSite=Lax`;
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { LOCALE_COOKIE, NATIVE_LOCALE_NAMES, PLATFORM_LOCALES, createCookieHeader, extractAnyLocaleFromPath, extractLocaleFromPath, isValidLocale, localeDisplayName, parseLocaleCookie, resolveConfigInput, shouldIgnorePath };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { I18nConfig, I18nConfigInput, LOCALE_COOKIE, NATIVE_LOCALE_NAMES, PLATFORM_LOCALES, PlatformLocale, createCookieHeader, localeDisplayName, parseLocaleCookie } from "./core/shared.js";
|
|
2
|
+
import { createI18nClient } from "./core/isomorphic.js";
|
|
3
|
+
import { createRuntimeI18nConfigProvider, getRuntimeI18nConfig, runtimeI18nConfigScript, setRuntimeI18nConfig } from "./core/runtime-config.js";
|
|
4
|
+
import { IntlProvider, createTranslator, useFormatter, useLocale, useTranslations } from "use-intl";
|
|
5
|
+
import { AbstractIntlMessages } from "use-intl/core";
|
|
6
|
+
export { type AbstractIntlMessages, type I18nConfig, type I18nConfigInput, IntlProvider, LOCALE_COOKIE, NATIVE_LOCALE_NAMES, PLATFORM_LOCALES, type PlatformLocale, createCookieHeader, createI18nClient, createRuntimeI18nConfigProvider, createTranslator, getRuntimeI18nConfig, localeDisplayName, parseLocaleCookie, runtimeI18nConfigScript, setRuntimeI18nConfig, useFormatter, useLocale, useTranslations };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { LOCALE_COOKIE, NATIVE_LOCALE_NAMES, PLATFORM_LOCALES, createCookieHeader, localeDisplayName, parseLocaleCookie } from "./core/shared.js";
|
|
2
|
+
import { createI18nClient } from "./core/isomorphic.js";
|
|
3
|
+
import { createRuntimeI18nConfigProvider, getRuntimeI18nConfig, runtimeI18nConfigScript, setRuntimeI18nConfig } from "./core/runtime-config.js";
|
|
4
|
+
import { IntlProvider, createTranslator, useFormatter, useLocale, useTranslations } from "use-intl";
|
|
5
|
+
export { IntlProvider, LOCALE_COOKIE, NATIVE_LOCALE_NAMES, PLATFORM_LOCALES, createCookieHeader, createI18nClient, createRuntimeI18nConfigProvider, createTranslator, getRuntimeI18nConfig, localeDisplayName, parseLocaleCookie, runtimeI18nConfigScript, setRuntimeI18nConfig, useFormatter, useLocale, useTranslations };
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { I18nConfig, I18nConfigInput, LOCALE_COOKIE, PLATFORM_LOCALES, PlatformLocale, createCookieHeader, shouldIgnorePath } from "./core/shared.js";
|
|
2
|
+
import { createRuntimeI18nConfigProvider, getRuntimeI18nConfig, runtimeI18nConfigScript, setRuntimeI18nConfig } from "./core/runtime-config.js";
|
|
3
|
+
import { LocaleMiddlewareResult, createI18nServer } from "./core/server.js";
|
|
4
|
+
export { type I18nConfig, type I18nConfigInput, LOCALE_COOKIE, type LocaleMiddlewareResult, PLATFORM_LOCALES, type PlatformLocale, createCookieHeader, createI18nServer, createRuntimeI18nConfigProvider, getRuntimeI18nConfig, runtimeI18nConfigScript, setRuntimeI18nConfig, shouldIgnorePath };
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { LOCALE_COOKIE, PLATFORM_LOCALES, createCookieHeader, shouldIgnorePath } from "./core/shared.js";
|
|
2
|
+
import { createRuntimeI18nConfigProvider, getRuntimeI18nConfig, runtimeI18nConfigScript, setRuntimeI18nConfig } from "./core/runtime-config.js";
|
|
3
|
+
import { createI18nServer } from "./core/server.js";
|
|
4
|
+
export { LOCALE_COOKIE, PLATFORM_LOCALES, createCookieHeader, createI18nServer, createRuntimeI18nConfigProvider, getRuntimeI18nConfig, runtimeI18nConfigScript, setRuntimeI18nConfig, shouldIgnorePath };
|
package/package.json
CHANGED
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shop-on/i18n",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"license": "SEE LICENSE IN dist/LICENSE.md",
|
|
5
|
+
"files": [
|
|
6
|
+
"dist"
|
|
7
|
+
],
|
|
8
|
+
"type": "module",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": "./dist/index.js",
|
|
11
|
+
"./server": "./dist/server.js",
|
|
12
|
+
"./package.json": "./package.json"
|
|
13
|
+
},
|
|
14
|
+
"dependencies": {
|
|
15
|
+
"use-intl": "4.14.9"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@tanstack/react-start": "1.169.3",
|
|
19
|
+
"typescript": "7.0.2",
|
|
20
|
+
"vitest": "5.0.5"
|
|
21
|
+
},
|
|
22
|
+
"peerDependencies": {
|
|
23
|
+
"@tanstack/react-start": "~1.169.3"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"check-types": "tsc --noEmit",
|
|
27
|
+
"test": "vitest run --maxWorkers=2"
|
|
28
|
+
}
|
|
6
29
|
}
|