intor 2.3.17 → 2.3.19
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PREFIX_PLACEHOLDER, IntorError, IntorErrorCode, deepMerge, resolveLoaderOptions, clearLoggerPool, clearMessagesPool, mergeMessages, isValidMessages, type MessagesReader, type MessagesReaders, } from "../src/core";
|
|
1
|
+
export { PREFIX_PLACEHOLDER, IntorError, IntorErrorCode, deepMerge, type DeepMergeOverrideEvent, resolveLoaderOptions, clearLoggerPool, clearMessagesPool, mergeMessages, isValidMessages, type MessagesReader, type MessagesReaders, } from "../src/core";
|
|
2
2
|
export { defineIntorConfig, type IntorRawConfig, type IntorResolvedConfig, } from "../src/config";
|
|
3
3
|
export { localizePathname } from "../src/routing";
|
|
4
4
|
export { Translator, type TranslatorPlugin, type TranslateContext, type TranslateHook, type TranslateHandlers, type HandlerContext, type FormatHandler, type LoadingHandler, type MissingHandler, type LocaleMessages, type MessageObject, type MessageValue, tokenize, type Token, } from "intor-translator";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { LocaleResolver, IntorValue } from "./types";
|
|
2
2
|
import type { IntorRuntimeOptions } from "../runtime";
|
|
3
3
|
import type { IntorResolvedConfig } from "../../config";
|
|
4
|
-
import
|
|
4
|
+
import type { Locale } from "intor-translator";
|
|
5
|
+
import { type GenConfigKeys } from "../../core";
|
|
5
6
|
/**
|
|
6
7
|
* Initializes Intor for the current execution context.
|
|
7
8
|
*
|
|
8
9
|
* Produces a server-side snapshot for SSR and
|
|
9
10
|
* full-stack rendering environments.
|
|
10
11
|
*/
|
|
11
|
-
export declare function intor<CK extends GenConfigKeys = "__default__">(config: IntorResolvedConfig, localeOrResolver: LocaleResolver
|
|
12
|
+
export declare function intor<CK extends GenConfigKeys = "__default__">(config: IntorResolvedConfig, localeOrResolver: LocaleResolver | Locale, options?: IntorRuntimeOptions): Promise<IntorValue<CK>>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { IntorResolvedConfig } from "../../config";
|
|
2
|
+
import type { Locale } from "intor-translator";
|
|
2
3
|
import { type GenConfigKeys, type GenLocale, type GenMessages } from "../../core";
|
|
3
|
-
export type LocaleResolver
|
|
4
|
+
export type LocaleResolver = (config: IntorResolvedConfig) => Locale | Promise<Locale>;
|
|
4
5
|
export interface IntorValue<CK extends GenConfigKeys = "__default__"> {
|
|
5
6
|
config: IntorResolvedConfig;
|
|
6
7
|
locale: GenLocale<CK>;
|