import { RequestMiddlewareAfterServer } from "@tanstack/react-start"; import { Branch, Currency, DateTime, Derive, GTProvider, LocaleSelector, Num, Plural, RelativeTime, T, Var, createOrUpdateBrowserConditionStore, declareVar, decodeMsg, decodeOptions, decodeVars, derive, getTranslationsSnapshot, gtFallback, initializeGT as initializeGT$1, mFallback, msg, t, useCustomMapping, useDefaultLocale, useEnableI18n, useFormatLocales, useGT, useLocale, useLocaleSelector, useLocales, useMessages, useSetEnableI18n, useSetLocale, useTranslations } from "gt-react"; import { GTFunctionType, MFunctionType, Message, TFunctionType } from "gt-i18n/types"; //#region src/functions/parseLocale.d.ts /** * Resolve the user's locale for the current TanStack Start request or browser. * * @deprecated Use `getLocale()` with `gtMiddleware` instead. This function is * retained as a fallback for server setups that have not initialized request * scope through the middleware. */ declare function parseLocale(): string; //#endregion //#region src/middleware/gtMiddleware.d.ts /** * Establish request-scoped GT conditions for SSR, server routes, and server * functions. */ declare const gtMiddleware: RequestMiddlewareAfterServer<{}, undefined, undefined>; //#endregion //#region ../format/dist/types-CbRDetV3.d.cts //#region src/locales/customLocaleMapping.d.ts type CustomMapping = Record>; //#endregion //#region src/locales/getLocaleProperties.d.ts type LocaleProperties = { code: string; name: string; nativeName: string; languageCode: string; languageName: string; nativeLanguageName: string; nameWithRegionCode: string; nativeNameWithRegionCode: string; regionCode: string; regionName: string; nativeRegionName: string; scriptCode: string; scriptName: string; nativeScriptName: string; maximizedCode: string; maximizedName: string; nativeMaximizedName: string; minimizedCode: string; minimizedName: string; nativeMinimizedName: string; emoji: string; }; //#endregion //#region src/locales/getRegionProperties.d.ts //#endregion //#region ../core/dist/types-bCr8pV1Z.d.cts //#endregion //#region src/types-dir/config.d.ts /** * Options shared by the CLI, compiler, and runtimes under * `files.gt.parsingFlags` in gt.config.json. */ type GTParsingFlags = { autoderive?: boolean | { jsx?: boolean; strings?: boolean; }; includeSourceCodeContext?: boolean; enableAutoJsxInjection?: boolean; legacyGtReactImportSource?: boolean; devHotReload?: boolean | { strings?: boolean; jsx?: boolean; }; /** Vite config used to resolve hash-affecting Vue compiler behavior. */ viteConfigPath?: string; /** Hash-affecting Vue template compiler options. */ vueCompilerOptions?: { whitespace?: 'condense' | 'preserve'; delimiters?: [string, string]; }; }; /** Configuration for generated GT translation files. */ type GTOutputFileConfig = { output?: string; publish?: boolean; parsingFlags?: GTParsingFlags; /** @deprecated Use `parsingFlags.includeSourceCodeContext` instead. */ includeSourceCodeContext?: boolean; }; /** * File configuration is primarily consumed by the CLI. Other packages only * inspect `files.gt`, but must still accept the complete gt.config.json shape. */ type GTFilesConfig = { gt?: GTOutputFileConfig; [fileType: string]: unknown; }; /** * The configuration stored in gt.config.json. * * All settings are optional. Runtimes default `defaultLocale` to * `libraryDefaultLocale` and `locales` to an empty list before resolving the * effective locale set. */ type GTConfig = { defaultLocale?: string; locales?: string[]; customMapping?: CustomMapping; enableI18n?: boolean; /** Enable framework-provided locale path routing when supported. */ localeRouting?: boolean; projectId?: string; devApiKey?: string; apiKey?: string; _versionId?: string; _branchId?: string; cacheUrl?: string | null; cacheExpiryTime?: number; runtimeUrl?: string | null; modelProvider?: string; _disableDevHotReload?: boolean; /** * Opt-in id-tagging — **off by default**. When true, each ``'s translation * hash is exposed on the DOM as a `data-_gt-hash` attribute so tooling * (localized replay, in-context QA) can map a rendered node back to its * published translation. No effect on `gt()` string translations; DOM-only * (skipped on React Native). * * ⚠️ Read before enabling — this injects markup. To carry the attribute, GT * puts it directly on the element a `` renders when there is one, but a `` * that renders bare text or a fragment has no element to hold it, so its output * is wrapped in a layout-neutral `display:contents` ``. Enabling this * therefore adds ``s around text/fragment ``s — which is why it is not * on by default. It is never enabled implicitly. */ _tagIds?: boolean; files?: GTFilesConfig; }; //#endregion //#region src/types-dir/api/json.d.ts //#endregion //#region src/types/InitializeGTParams.d.ts type BrowserConditionStoreParams = Parameters[0]; type InitializeGTParams = Parameters[0] & Pick & Pick; //#endregion //#region src/functions/runtime.d.ts /** Return the locale associated with the current request or browser. */ declare const getLocale: () => string; /** Return whether internationalization is enabled for the current runtime. */ declare const getEnableI18n: () => boolean; /** Return a string translation function for the current runtime. */ declare const getGT: (messages?: Message[]) => Promise; /** Return a registered-message translation function for the current runtime. */ declare const getMessages: () => Promise; /** Return a dictionary translation function for the current runtime. */ declare const getTranslations: (rootId?: string) => Promise; //#endregion //#region src/setup/initializeGT.server.d.ts /** Initialize GT and its server request condition store. */ declare function initializeGT(config: InitializeGTParams): void; //#endregion export { Branch, Currency, DateTime, Derive, GTProvider, type InitializeGTParams, LocaleSelector, Num, Plural, RelativeTime, T, Var, declareVar, decodeMsg, decodeOptions, decodeVars, derive, getEnableI18n, getGT, getLocale, getMessages, getTranslations, getTranslationsSnapshot, gtFallback, gtMiddleware, initializeGT, mFallback, msg, parseLocale, t, useCustomMapping, useDefaultLocale, useEnableI18n, useFormatLocales, useGT, useLocale, useLocaleSelector, useLocales, useMessages, useSetEnableI18n, useSetLocale, useTranslations }; //# sourceMappingURL=index.server.d.mts.map