@intlayer/svelte-i18n 9.5.10
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 +329 -0
- package/dist/esm/configuration.mjs +98 -0
- package/dist/esm/configuration.mjs.map +1 -0
- package/dist/esm/createMessageFormatter.mjs +49 -0
- package/dist/esm/createMessageFormatter.mjs.map +1 -0
- package/dist/esm/formatters.mjs +53 -0
- package/dist/esm/formatters.mjs.map +1 -0
- package/dist/esm/helpers.mjs +86 -0
- package/dist/esm/helpers.mjs.map +1 -0
- package/dist/esm/index.mjs +9 -0
- package/dist/esm/locale.mjs +35 -0
- package/dist/esm/locale.mjs.map +1 -0
- package/dist/esm/plugin/index.mjs +35 -0
- package/dist/esm/plugin/index.mjs.map +1 -0
- package/dist/esm/registryLookup.mjs +57 -0
- package/dist/esm/registryLookup.mjs.map +1 -0
- package/dist/esm/runtimeMessages.mjs +42 -0
- package/dist/esm/runtimeMessages.mjs.map +1 -0
- package/dist/esm/stores.mjs +36 -0
- package/dist/esm/stores.mjs.map +1 -0
- package/dist/esm/types.mjs +0 -0
- package/dist/esm/useDictionary.mjs +46 -0
- package/dist/esm/useDictionary.mjs.map +1 -0
- package/dist/esm/useDictionaryDynamic.mjs +50 -0
- package/dist/esm/useDictionaryDynamic.mjs.map +1 -0
- package/dist/types/configuration.d.ts +18 -0
- package/dist/types/configuration.d.ts.map +1 -0
- package/dist/types/createMessageFormatter.d.ts +18 -0
- package/dist/types/createMessageFormatter.d.ts.map +1 -0
- package/dist/types/formatters.d.ts +10 -0
- package/dist/types/formatters.d.ts.map +1 -0
- package/dist/types/helpers.d.ts +49 -0
- package/dist/types/helpers.d.ts.map +1 -0
- package/dist/types/index.d.ts +9 -0
- package/dist/types/locale.d.ts +21 -0
- package/dist/types/locale.d.ts.map +1 -0
- package/dist/types/plugin/index.d.ts +11 -0
- package/dist/types/plugin/index.d.ts.map +1 -0
- package/dist/types/registryLookup.d.ts +14 -0
- package/dist/types/registryLookup.d.ts.map +1 -0
- package/dist/types/runtimeMessages.d.ts +18 -0
- package/dist/types/runtimeMessages.d.ts.map +1 -0
- package/dist/types/stores.d.ts +17 -0
- package/dist/types/stores.d.ts.map +1 -0
- package/dist/types/types.d.ts +64 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/types/useDictionary.d.ts +39 -0
- package/dist/types/useDictionary.d.ts.map +1 -0
- package/dist/types/useDictionaryDynamic.d.ts +16 -0
- package/dist/types/useDictionaryDynamic.d.ts.map +1 -0
- package/package.json +108 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Readable } from "svelte/store";
|
|
2
|
+
//#region src/locale.d.ts
|
|
3
|
+
/** A svelte-i18n `locale` store: writable, nullable. */
|
|
4
|
+
export type LocaleStore = Readable<string | null | undefined> & {
|
|
5
|
+
set: (locale: string | null | undefined) => void;
|
|
6
|
+
update: (updater: (locale: string | null | undefined) => string | null | undefined) => void;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* `$locale` — backed by svelte-intlayer's store, so svelte-i18n call sites,
|
|
10
|
+
* `useIntlayer` and `useLocale().setLocale` share one active locale.
|
|
11
|
+
*/
|
|
12
|
+
export declare const locale: LocaleStore;
|
|
13
|
+
/** `$locales` — the locales declared in the intlayer configuration. */
|
|
14
|
+
export declare const locales: Readable<string[]>;
|
|
15
|
+
/**
|
|
16
|
+
* `$isLoading` — always `false`: intlayer dictionaries are part of the bundle
|
|
17
|
+
* (or preloaded per locale), so there is no pending catalog to wait for.
|
|
18
|
+
*/
|
|
19
|
+
export declare const isLoading: import("svelte/store").Writable<boolean>;
|
|
20
|
+
//#endregion
|
|
21
|
+
//# sourceMappingURL=locale.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"locale.d.ts","names":[],"sources":["../../src/locale.ts"],"mappings":";;;YAMY,cAAc;EACxB,MAAM;EACN,SACE,UAAU;;;;;;qBAkBD,QAAQ;;qBAaR,SAAS;;;;;qBAMT,kCAAS"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PluginOption } from "vite";
|
|
2
|
+
import { intlayer } from "vite-intlayer";
|
|
3
|
+
//#region src/plugin/index.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* A Vite plugin for svelte-i18n compat that wraps vite-intlayer
|
|
6
|
+
* and configures resolve aliases for svelte-i18n.
|
|
7
|
+
*/
|
|
8
|
+
export declare const svelteI18nVitePlugin: (options?: Parameters<typeof intlayer>[0]) => PluginOption[];
|
|
9
|
+
//#endregion
|
|
10
|
+
export { svelteI18nVitePlugin as default };
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/plugin/index.ts"],"mappings":";;;;;;;qBAaa,uBAAoB,UACrB,kBAAkB,iBAC3B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
//#region src/registryLookup.d.ts
|
|
2
|
+
/**
|
|
3
|
+
* Looks up a svelte-i18n id across the intlayer dictionaries:
|
|
4
|
+
*
|
|
5
|
+
* 1. `'home.title'` → dictionary `home`, field `title` (one dictionary per
|
|
6
|
+
* top-level group — the layout the build optimizations target);
|
|
7
|
+
* 2. `'home'` → the whole `home` dictionary (`$json('home')`);
|
|
8
|
+
* 3. the full id in every dictionary — a single migrated catalog.
|
|
9
|
+
*
|
|
10
|
+
* @returns The interpreted node (string, object or callable), or `undefined`.
|
|
11
|
+
*/
|
|
12
|
+
export declare const lookupRegistryMessage: (id: string, locale: string) => unknown;
|
|
13
|
+
//#endregion
|
|
14
|
+
//# sourceMappingURL=registryLookup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registryLookup.d.ts","names":[],"sources":["../../src/registryLookup.ts"],"mappings":";;;;;;;;;;;qBA4Ca,wBAAqB,YAAc"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { LocalesDictionary } from "./types.js";
|
|
2
|
+
import { Writable } from "svelte/store";
|
|
3
|
+
//#region src/runtimeMessages.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* `$dictionary` — messages registered at runtime through `addMessages()` /
|
|
6
|
+
* `register()`. Intlayer dictionaries never go through this store.
|
|
7
|
+
*/
|
|
8
|
+
export declare const dictionary: Writable<LocalesDictionary>;
|
|
9
|
+
/** Turns a raw ICU string into an intlayer node tree. */
|
|
10
|
+
type MessageCompiler = (message: string) => unknown;
|
|
11
|
+
export declare const setMessageCompiler: (compiler: MessageCompiler) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Reads a runtime message, compiling raw ICU strings when the compiler is
|
|
14
|
+
* installed. Returns `undefined` when the id is not registered.
|
|
15
|
+
*/
|
|
16
|
+
export declare const lookupRuntimeMessage: (messages: LocalesDictionary, targetLocale: string, id: string) => unknown;
|
|
17
|
+
//#endregion
|
|
18
|
+
//# sourceMappingURL=runtimeMessages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtimeMessages.d.ts","names":[],"sources":["../../src/runtimeMessages.ts"],"mappings":";;;;;;;qBAQa,YAAY,SAAS;;KAG7B,mBAAmB;qBAcX,qBAAkB,UAAc;;;;;qBAQhC,uBAAoB,UACrB,mBAAiB,sBACP"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { DateFormatter, JSONGetter, MessageFormatter, NumberFormatter, TimeFormatter } from "./types.js";
|
|
2
|
+
import { Readable } from "svelte/store";
|
|
3
|
+
//#region src/stores.d.ts
|
|
4
|
+
/** `$format` / `$_` / `$t` — translates a message id. */
|
|
5
|
+
export declare const format: Readable<MessageFormatter>;
|
|
6
|
+
export declare const _: Readable<MessageFormatter>;
|
|
7
|
+
export declare const t: Readable<MessageFormatter>;
|
|
8
|
+
/** `$json` — the raw message or subtree of an id. */
|
|
9
|
+
export declare const json: Readable<JSONGetter>;
|
|
10
|
+
/** `$date` — formats a date with the `date` named formats. */
|
|
11
|
+
export declare const date: Readable<DateFormatter>;
|
|
12
|
+
/** `$time` — formats a time with the `time` named formats. */
|
|
13
|
+
export declare const time: Readable<TimeFormatter>;
|
|
14
|
+
/** `$number` — formats a number with the `number` named formats. */
|
|
15
|
+
export declare const number: Readable<NumberFormatter>;
|
|
16
|
+
//#endregion
|
|
17
|
+
//# sourceMappingURL=stores.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stores.d.ts","names":[],"sources":["../../src/stores.ts"],"mappings":";;;;qBA8Ba,QAAQ,SAAS;qBAQjB,GAAC,SAAA;qBACD,GAAC,SAAA;;qBAGD,MAAM,SAAS;;qBAYf,MAAM,SAAS;;qBASf,MAAM,SAAS;;qBASf,QAAQ,SAAS"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
//#region src/types.d.ts
|
|
2
|
+
/** Rich-text chunk renderer accepted as an interpolation value. */
|
|
3
|
+
export type FormatXMLElementFn<T = unknown> = (chunks: (string | T)[]) => string | T;
|
|
4
|
+
/** Named `Intl` option presets, keyed by format name (`'short'`, `'EUR'`…). */
|
|
5
|
+
export type Formats = {
|
|
6
|
+
number: Record<string, Intl.NumberFormatOptions>;
|
|
7
|
+
date: Record<string, Intl.DateTimeFormatOptions>;
|
|
8
|
+
time: Record<string, Intl.DateTimeFormatOptions>;
|
|
9
|
+
};
|
|
10
|
+
export type InterpolationValues = Record<string, string | number | boolean | Date | FormatXMLElementFn<unknown> | null | undefined> | undefined;
|
|
11
|
+
export type MessageObject = {
|
|
12
|
+
id: string;
|
|
13
|
+
locale?: string;
|
|
14
|
+
format?: string;
|
|
15
|
+
default?: string;
|
|
16
|
+
values?: InterpolationValues;
|
|
17
|
+
};
|
|
18
|
+
/** The `$_` / `$t` / `$format` function. */
|
|
19
|
+
export type MessageFormatter = (id: string | MessageObject, options?: Omit<MessageObject, 'id'>) => string;
|
|
20
|
+
export type IntlFormatterOptions<T> = T & {
|
|
21
|
+
format?: string;
|
|
22
|
+
locale?: string;
|
|
23
|
+
};
|
|
24
|
+
export type TimeFormatter = (date: Date | number, options?: IntlFormatterOptions<Intl.DateTimeFormatOptions>) => string;
|
|
25
|
+
export type DateFormatter = (date: Date | number, options?: IntlFormatterOptions<Intl.DateTimeFormatOptions>) => string;
|
|
26
|
+
export type NumberFormatter = (value: number, options?: IntlFormatterOptions<Intl.NumberFormatOptions>) => string;
|
|
27
|
+
/** The `$json` function: returns the raw message subtree. */
|
|
28
|
+
export type JSONGetter = <T = unknown>(id: string, locale?: string) => T | undefined;
|
|
29
|
+
export type MemoizedIntlFormatterOptional<T, U> = (options?: IntlFormatterOptions<U>) => T;
|
|
30
|
+
export type MessagesLoader = () => Promise<LocaleDictionary | {
|
|
31
|
+
default: LocaleDictionary;
|
|
32
|
+
}>;
|
|
33
|
+
export type MissingKeyHandlerInput = {
|
|
34
|
+
locale: string;
|
|
35
|
+
id: string;
|
|
36
|
+
defaultValue: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
export type MissingKeyHandlerOutput = string | undefined | void;
|
|
39
|
+
export type MissingKeyHandler = (input: MissingKeyHandlerInput) => MissingKeyHandlerOutput;
|
|
40
|
+
export type ConfigureOptions = {
|
|
41
|
+
/** The global fallback locale. */
|
|
42
|
+
fallbackLocale: string;
|
|
43
|
+
/** The app initial locale. */
|
|
44
|
+
initialLocale?: string | null;
|
|
45
|
+
/** Custom time / date / number formats, merged over the defaults. */
|
|
46
|
+
formats?: Partial<Formats>;
|
|
47
|
+
/** Kept for API parity: intlayer dictionaries never load asynchronously. */
|
|
48
|
+
loadingDelay?: number;
|
|
49
|
+
/** @deprecated Use `handleMissingMessage` instead. */
|
|
50
|
+
warnOnMissingMessages?: boolean;
|
|
51
|
+
/** Called whenever a message is missing; may return a fallback string. */
|
|
52
|
+
handleMissingMessage?: MissingKeyHandler;
|
|
53
|
+
/** Kept for API parity: tags are always kept as literal text. */
|
|
54
|
+
ignoreTag?: boolean;
|
|
55
|
+
};
|
|
56
|
+
export type ConfigureOptionsInit = Pick<ConfigureOptions, 'fallbackLocale'> & Partial<Omit<ConfigureOptions, 'fallbackLocale'>>;
|
|
57
|
+
export type LocaleDictionary = {
|
|
58
|
+
[key: string]: LocaleDictionary | string | Array<string | LocaleDictionary> | null;
|
|
59
|
+
};
|
|
60
|
+
export type LocalesDictionary = Record<string, LocaleDictionary>;
|
|
61
|
+
export type MemoizedNumberFormatterFactoryOptional = MemoizedIntlFormatterOptional<Intl.NumberFormat, Intl.NumberFormatOptions>;
|
|
62
|
+
export type MemoizedDateTimeFormatterFactoryOptional = MemoizedIntlFormatterOptional<Intl.DateTimeFormat, Intl.DateTimeFormatOptions>;
|
|
63
|
+
//#endregion
|
|
64
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","names":[],"sources":["../../src/types.ts"],"mappings":";;YACY,mBAAmB,gBAC7B,kBAAkB,kBACN;;YAGF;EACV,QAAQ,eAAe,KAAK;EAC5B,MAAM,eAAe,KAAK;EAC1B,MAAM,eAAe,KAAK;;YAGhB,sBACR,2CAKI,OACA;YAMI;EACV;EACA;EACA;EACA;EACA,SAAS;;;YAIC,oBACV,aAAa,eACb,UAAU,KAAK;YAGL,qBAAqB,KAAK;EACpC;EACA;;YAGU,iBACV,MAAM,eACN,UAAU,qBAAqB,KAAK;YAG1B,iBACV,MAAM,eACN,UAAU,qBAAqB,KAAK;YAG1B,mBACV,eACA,UAAU,qBAAqB,KAAK;;YAI1B,cAAc,aACxB,YACA,oBACG;YAEO,8BAA8B,GAAG,MAC3C,UAAU,qBAAqB,OAC5B;YAEO,uBAAuB,QACjC;EAAqB,SAAS;;YAGpB;EACV;EACA;EACA;;YAGU;YAEA,qBACV,OAAO,2BACJ;YAEO;;EAEV;;EAEA;;EAEA,UAAU,QAAQ;;EAElB;;EAEA;;EAEA,uBAAuB;;EAEvB;;YAGU,uBAAuB,KAAK,sCACtC,QAAQ,KAAK;YAEH;GACT,cACG,4BAEA,eAAe;;YAIT,oBAAoB,eAAe;YAEnC,yCACV,8BAA8B,KAAK,cAAc,KAAK;YAE5C,2CACV,8BACE,KAAK,gBACL,KAAK"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { JSONGetter, MessageFormatter } from "./types.js";
|
|
2
|
+
import { Readable } from "svelte/store";
|
|
3
|
+
import { Dictionary } from "@intlayer/types/dictionary";
|
|
4
|
+
//#region src/useDictionary.d.ts
|
|
5
|
+
/** Message stores bound to one dictionary. */
|
|
6
|
+
export type DictionaryMessageStores = {
|
|
7
|
+
_: Readable<MessageFormatter>;
|
|
8
|
+
t: Readable<MessageFormatter>;
|
|
9
|
+
format: Readable<MessageFormatter>;
|
|
10
|
+
json: Readable<JSONGetter>;
|
|
11
|
+
};
|
|
12
|
+
/** Joins an optional key prefix and a relative id. */
|
|
13
|
+
export declare const toPrefixedId: (id: string, keyPrefix?: string) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Builds the `_` / `t` / `format` / `json` stores over content resolved per
|
|
16
|
+
* locale. Shared by {@link useDictionary} and `useDictionaryDynamic`.
|
|
17
|
+
*/
|
|
18
|
+
export declare const createDictionaryStores: (contentStore: Readable<{
|
|
19
|
+
locale: string | null | undefined;
|
|
20
|
+
readContent: (targetLocale: string) => unknown;
|
|
21
|
+
}>, keyPrefix?: string) => DictionaryMessageStores;
|
|
22
|
+
/**
|
|
23
|
+
* svelte-i18n stores bound to one imported dictionary.
|
|
24
|
+
*
|
|
25
|
+
* Ids are relative to the dictionary (`$t('title')`), optionally under a key
|
|
26
|
+
* prefix. Unlike the global `$_`, only this dictionary reaches the bundle.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```svelte
|
|
30
|
+
* <script>
|
|
31
|
+
* import home from '../.intlayer/dictionary/home.json';
|
|
32
|
+
* const { t } = useDictionary(home);
|
|
33
|
+
* </script>
|
|
34
|
+
* <h1>{$t('title')}</h1>
|
|
35
|
+
* ```
|
|
36
|
+
*/
|
|
37
|
+
export declare const useDictionary: <const T extends Dictionary>(dictionary: T, keyPrefix?: string) => DictionaryMessageStores;
|
|
38
|
+
//#endregion
|
|
39
|
+
//# sourceMappingURL=useDictionary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDictionary.d.ts","names":[],"sources":["../../src/useDictionary.ts"],"mappings":";;;;;YAWY;EACV,GAAG,SAAS;EACZ,GAAG,SAAS;EACZ,QAAQ,SAAS;EACjB,MAAM,SAAS;;;qBAIJ,eAAY,YAAc;;;;;qBAO1B,yBAAsB,cACnB;EACZ;EACA,cAAc;IACd,uBAED;;;;;;;;;;;;;;;;qBAqCU,sBAAuB,UAAU,YAAU,YAC1C,GAAC,uBAEZ"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { DictionaryMessageStores } from "./useDictionary.js";
|
|
2
|
+
import { Dictionary } from "@intlayer/types/dictionary";
|
|
3
|
+
import { DictionaryKeys, StrictModeLocaleMap } from "@intlayer/types/module_augmentation";
|
|
4
|
+
//#region src/useDictionaryDynamic.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Per-locale lazy variant of `useDictionary`: only the active locale's
|
|
7
|
+
* dictionary is fetched. Until it arrives, ids resolve to their `default`
|
|
8
|
+
* message or the id itself.
|
|
9
|
+
*
|
|
10
|
+
* @param dictionaryLoaders - One loader per locale.
|
|
11
|
+
* @param _dictionaryKey - Dictionary key, kept for the optimize-pass shape.
|
|
12
|
+
* @param keyPrefix - Optional prefix applied to every id.
|
|
13
|
+
*/
|
|
14
|
+
export declare const useDictionaryDynamic: <const T extends Dictionary, const K extends DictionaryKeys>(dictionaryLoaders: StrictModeLocaleMap<() => Promise<T>>, _dictionaryKey: K, keyPrefix?: string) => DictionaryMessageStores;
|
|
15
|
+
//#endregion
|
|
16
|
+
//# sourceMappingURL=useDictionaryDynamic.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDictionaryDynamic.d.ts","names":[],"sources":["../../src/useDictionaryDynamic.ts"],"mappings":";;;;;;;;;;;;;qBAwBa,6BACL,UAAU,kBACV,UAAU,gBAAc,mBAEX,0BAA0B,QAAQ,KAAG,gBACxC,GAAC,uBAEhB"}
|
package/package.json
ADDED
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@intlayer/svelte-i18n",
|
|
3
|
+
"version": "9.5.10",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "svelte-i18n API adapter for intlayer — drop-in compatibility layer",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"intlayer",
|
|
8
|
+
"svelte-i18n",
|
|
9
|
+
"svelte",
|
|
10
|
+
"i18n",
|
|
11
|
+
"adapter",
|
|
12
|
+
"compatibility"
|
|
13
|
+
],
|
|
14
|
+
"homepage": "https://intlayer.org",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/aymericzip/intlayer/issues"
|
|
17
|
+
},
|
|
18
|
+
"repository": {
|
|
19
|
+
"type": "git",
|
|
20
|
+
"url": "git+https://github.com/aymericzip/intlayer.git"
|
|
21
|
+
},
|
|
22
|
+
"license": "Apache-2.0",
|
|
23
|
+
"author": {
|
|
24
|
+
"name": "Aymeric PINEAU",
|
|
25
|
+
"url": "https://github.com/aymericzip"
|
|
26
|
+
},
|
|
27
|
+
"contributors": [
|
|
28
|
+
{
|
|
29
|
+
"name": "Aymeric Pineau",
|
|
30
|
+
"email": "ay.pineau@gmail.com",
|
|
31
|
+
"url": "https://github.com/aymericzip"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"sideEffects": false,
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/types/index.d.ts",
|
|
38
|
+
"import": "./dist/esm/index.mjs"
|
|
39
|
+
},
|
|
40
|
+
"./plugin": {
|
|
41
|
+
"types": "./dist/types/plugin/index.d.ts",
|
|
42
|
+
"import": "./dist/esm/plugin/index.mjs"
|
|
43
|
+
},
|
|
44
|
+
"./package.json": "./package.json"
|
|
45
|
+
},
|
|
46
|
+
"main": "dist/esm/index.mjs",
|
|
47
|
+
"module": "dist/esm/index.mjs",
|
|
48
|
+
"types": "dist/types/index.d.ts",
|
|
49
|
+
"files": [
|
|
50
|
+
"./dist",
|
|
51
|
+
"./package.json"
|
|
52
|
+
],
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "bun --bun tsdown --config tsdown.config.ts",
|
|
55
|
+
"build:ci": "bun --bun tsdown --config tsdown.config.ts",
|
|
56
|
+
"clean": "bun --bun rimraf ./dist .turbo",
|
|
57
|
+
"dev": "bun --bun tsdown --config tsdown.config.ts --watch",
|
|
58
|
+
"format": "bun --bun biome format . --check",
|
|
59
|
+
"format:fix": "bun --bun biome format --write .",
|
|
60
|
+
"lint": "bun --bun biome lint .",
|
|
61
|
+
"lint:fix": "bun --bun biome lint --write .",
|
|
62
|
+
"prepublish": "cp -f ../../../README.md ./README.md",
|
|
63
|
+
"publish": "bun publish || true",
|
|
64
|
+
"publish:canary": "bun publish --access public --tag canary || true",
|
|
65
|
+
"publish:latest": "bun publish --access public --tag latest || true",
|
|
66
|
+
"test": "bun --bun vitest run",
|
|
67
|
+
"test:watch": "bun --bun vitest",
|
|
68
|
+
"typecheck": "tsc --noEmit --project tsconfig.types.json"
|
|
69
|
+
},
|
|
70
|
+
"dependencies": {
|
|
71
|
+
"@intlayer/config": "9.5.10",
|
|
72
|
+
"@intlayer/core": "9.5.10",
|
|
73
|
+
"@intlayer/dictionaries-entry": "9.5.10",
|
|
74
|
+
"@intlayer/engine": "9.5.10",
|
|
75
|
+
"@intlayer/types": "9.5.10",
|
|
76
|
+
"svelte-intlayer": "9.5.10",
|
|
77
|
+
"vite-intlayer": "9.5.10"
|
|
78
|
+
},
|
|
79
|
+
"devDependencies": {
|
|
80
|
+
"@types/node": "^22",
|
|
81
|
+
"@utils/ts-config": "1.0.4",
|
|
82
|
+
"@utils/ts-config-types": "1.0.4",
|
|
83
|
+
"@utils/tsdown-config": "1.0.4",
|
|
84
|
+
"rimraf": "6.1.3",
|
|
85
|
+
"svelte": "5.56.8",
|
|
86
|
+
"svelte-i18n": "^4.0.1",
|
|
87
|
+
"tsdown": "0.23.0",
|
|
88
|
+
"typescript": "7.0.2",
|
|
89
|
+
"vite": "8.3.1",
|
|
90
|
+
"vitest": "5.0.2"
|
|
91
|
+
},
|
|
92
|
+
"peerDependencies": {
|
|
93
|
+
"svelte": ">=5.0.0",
|
|
94
|
+
"svelte-i18n": ">=4.0.1",
|
|
95
|
+
"vite": ">=4.0.0"
|
|
96
|
+
},
|
|
97
|
+
"peerDependenciesMeta": {
|
|
98
|
+
"svelte-i18n": {
|
|
99
|
+
"optional": true
|
|
100
|
+
},
|
|
101
|
+
"vite": {
|
|
102
|
+
"optional": true
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"engines": {
|
|
106
|
+
"node": ">=14.18"
|
|
107
|
+
}
|
|
108
|
+
}
|