gt-tanstack-start 11.4.3 → 11.4.4
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/CHANGELOG.md +12 -0
- package/dist/index.client.d.mts +5 -1
- package/dist/index.client.d.mts.map +1 -1
- package/dist/index.client.mjs +15 -1
- package/dist/index.client.mjs.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# gt-tanstack-start
|
|
2
2
|
|
|
3
|
+
## 11.4.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#2330](https://github.com/generaltranslation/gt/pull/2330) [`9ee7dc3`](https://github.com/generaltranslation/gt/commit/9ee7dc3ae792cd81ce7edb5c6e43c963f7055261) Thanks [@eoinest](https://github.com/eoinest)! - Use server-provided locale and condition props as the only rendered state in server-rendered apps. Condition setters write cookies for middleware and request a reload; provider-free SPA apps keep their cookie-backed behavior.
|
|
8
|
+
|
|
9
|
+
- Updated dependencies [[`5d75eb4`](https://github.com/generaltranslation/gt/commit/5d75eb475a9e36a61845f0368566a9d40466251c), [`9ee7dc3`](https://github.com/generaltranslation/gt/commit/9ee7dc3ae792cd81ce7edb5c6e43c963f7055261)]:
|
|
10
|
+
- generaltranslation@9.5.1
|
|
11
|
+
- @generaltranslation/react-core@11.4.4
|
|
12
|
+
- gt-react@11.4.4
|
|
13
|
+
- gt-i18n@1.0.32
|
|
14
|
+
|
|
3
15
|
## 11.4.3
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/index.client.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RequestMiddlewareAfterServer } from "@tanstack/react-start";
|
|
2
|
-
import { Branch, Currency, DateTime, Derive,
|
|
2
|
+
import { Branch, Currency, DateTime, Derive, LocaleSelector, Num, Plural, RelativeTime, SharedGTProviderProps, 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";
|
|
3
|
+
import * as _$react_jsx_runtime0 from "react/jsx-runtime";
|
|
3
4
|
import { GTFunctionType, MFunctionType, Message, TFunctionType } from "gt-i18n/types";
|
|
4
5
|
|
|
5
6
|
//#region src/functions/parseLocale.d.ts
|
|
@@ -150,5 +151,8 @@ declare const getTranslations: (rootId?: string) => Promise<TFunctionType>;
|
|
|
150
151
|
/** Initialize GT and its browser condition store from the locale cookie. */
|
|
151
152
|
declare function initializeGT(config: InitializeGTParams): void;
|
|
152
153
|
//#endregion
|
|
154
|
+
//#region src/provider/GTProvider.client.d.ts
|
|
155
|
+
declare function GTProvider(props: SharedGTProviderProps): _$react_jsx_runtime0.JSX.Element;
|
|
156
|
+
//#endregion
|
|
153
157
|
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 };
|
|
154
158
|
//# sourceMappingURL=index.client.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.d.mts","names":["CustomMapping","LocaleProperties","Partial","Record","code","name","nativeName","languageCode","languageName","nativeLanguageName","nameWithRegionCode","nativeNameWithRegionCode","regionCode","regionName","nativeRegionName","scriptCode","scriptName","nativeScriptName","maximizedCode","maximizedName","nativeMaximizedName","minimizedCode","minimizedName","nativeMinimizedName","emoji","CustomRegionMapping","region","locale","getRegionProperties","defaultLocale","customMapping","CutoffFormatStyle","TerminatorOptions","terminator","separator","CutoffFormatOptions","maxChars","style","VariableType","Variable","k","i","v","HTML_CONTENT_PROPS","pl","ti","alt","arl","arb","ard","HtmlContentPropKeysRecord","HtmlContentPropValuesRecord","GTProp","JsxChildren","b","t","JsxElement","d","c","JsxChild","StringFormat","DataFormat","StringContent","IcuMessage","StringMessage","I18nextMessage","Content","FormatVariables","Date","S","_","a","f","g","h","l","m","n","o","p","r","s","u","x","y","ApiClientConfig","Branch","CreateTagData","CreateTagResponse","DownloadFilesData","FileFormat","GenerateProjectContextResponse","GetBranchInfoResponse","GetFileInfoData","GetFileInfoResponse","GetOrphanedFilesResponse","GetTranslationJobInfoResponse","GetTranslationStatusResponse","JsonObject","JsonValue","ProcessFileMovesData","ProcessFileMovesResponse","PublishFilesData","PublishFilesResponse","RuntimeFileFormat","RuntimeFileFormat$1","TranslateData","Content","CustomMapping","CustomMapping$1","CustomRegionMapping","CustomRegionMapping$1","CutoffFormatOptions","CutoffFormatOptions$1","DataFormat","DataFormat$1","FormatVariables","FormatVariables$1","GTProp","HTML_CONTENT_PROPS","HtmlContentPropKeysRecord","HtmlContentPropValuesRecord","I18nextMessage","I18nextMessage$1","IcuMessage","IcuMessage$1","JsxChild","JsxChildren","JsxChildren$1","JsxElement","LocaleProperties","LocaleProperties$1","StringContent","StringFormat","StringFormat$1","StringMessage","StringMessage$1","Variable","VariableType","ActionType","NonNullable","EntryMetadata","id","hash","context","maxChars","dataFormat","fileFormat","actionType","RuntimeTranslateManyOptions","sourceLocale","modelProvider","key","TranslateOptions","targetLocale","TranslateManyEntry","source","metadata","HashMetadata","requiresReview","GTParsingFlags","autoderive","jsx","strings","includeSourceCodeContext","enableAutoJsxInjection","legacyGtReactImportSource","devHotReload","viteConfigPath","vueCompilerOptions","whitespace","delimiters","GTOutputFileConfig","output","publish","parsingFlags","GTFilesConfig","gt","fileType","GTConfig","defaultLocale","locales","customMapping","enableI18n","localeRouting","projectId","devApiKey","apiKey","_versionId","_branchId","cacheUrl","cacheExpiryTime","runtimeUrl","_disableDevHotReload","_tagIds","files","JsonPrimitive","CheckFileTranslationsOptions","timeout","FileQuery","fileId","branchId","versionId","FileQueryResult","UpdateMetadata","staticId","format","filePaths","sourceCode","contextDeriveExpr","_contextDeriveExpr","Updates","EnqueueFilesResult","jobData","jobId","sourceFileId","force","message","BINARY_FILE_FORMATS","ReadonlySet","isBinaryFileFormat","FormatMetadata","FileToUpload","FileReference","Omit","content","locale","transformFormat","formatMetadata","incomingBranchId","checkedOutBranchId","fileName","FileReferenceIds","DownloadFileBatchRequest","DownloadFileBatchOptions","DownloadedFile","data","DownloadFileBatchResult","count","EnqueueFilesOptions","targetLocales","SetupProjectFileReference","Pick","SetupProjectResult","SetupProjectOptions","timeoutMs","GTJsonFormatMetadata","Record","domain","requestVersion","approved_at","approved_by","FileUpload","UploadFilesOptions","UploadFilesResponse","uploadedFiles","PublishFileEntry","PublishFilesResult","DownloadFileOptions","TranslationResultReference","TypedResult","translation","TranslationError","success","error","code","RequestSuccess","TranslationResult","TranslateManyResult","BranchDataResult","defaultBranch","BranchQuery","branchNames","FileDataQuery","FileDataResult","Partial","MoveMapping","MoveResult","ProcessMovesResponse","results","summary","total","succeeded","failed","ProcessMovesOptions","JobStatus","CheckJobStatusResult","status","AwaitJobsOptions$1","pollingIntervalSeconds","timeoutSeconds","JobResult","AwaitJobsResult","complete","jobs","SubmitUserEditDiff","diff","localContent","SubmitUserEditDiffsPayload","diffs","Transformation","BaseTransformation","InjectionType","TransformationPrefix","VariableTransformationSuffix","CreateTagOptions","CreateTagResult","OrphanedFile","GetOrphanedFilesResult","Metadata","TranslationRequestConfig","baseUrl","TranslateConfig","$","A","At","B","C","Ct","D","Dt","E","Et","F","Ft","G","H","I","It","J","K","L","M","Mt","N","Nt","O","Ot","P","Pt","Q","R","S","St","T","Tt","U","V","W","X","Y","Z","_","_t","a","at","b","bt","c","ct","d","dt","et","f","ft","g","h","ht","i","it","j","jt","k","kt","l","lt","m","mt","n","nt","o","ot","p","pt","q","r","rt","s","st","t","tt","u","ut","v","vt","w","wt","x","xt","y","yt","z"],"sources":["../src/functions/parseLocale.ts","../src/middleware/gtMiddleware.ts","../../format/dist/types-CbRDetV3.d.cts","../../core/dist/types-yByDbKnV.d.cts","../src/types/InitializeGTParams.ts","../src/functions/runtime.ts","../src/setup/initializeGT.client.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.client.d.mts","names":["CustomMapping","LocaleProperties","Partial","Record","code","name","nativeName","languageCode","languageName","nativeLanguageName","nameWithRegionCode","nativeNameWithRegionCode","regionCode","regionName","nativeRegionName","scriptCode","scriptName","nativeScriptName","maximizedCode","maximizedName","nativeMaximizedName","minimizedCode","minimizedName","nativeMinimizedName","emoji","CustomRegionMapping","region","locale","getRegionProperties","defaultLocale","customMapping","CutoffFormatStyle","TerminatorOptions","terminator","separator","CutoffFormatOptions","maxChars","style","VariableType","Variable","k","i","v","HTML_CONTENT_PROPS","pl","ti","alt","arl","arb","ard","HtmlContentPropKeysRecord","HtmlContentPropValuesRecord","GTProp","JsxChildren","b","t","JsxElement","d","c","JsxChild","StringFormat","DataFormat","StringContent","IcuMessage","StringMessage","I18nextMessage","Content","FormatVariables","Date","S","_","a","f","g","h","l","m","n","o","p","r","s","u","x","y","ApiClientConfig","Branch","CreateTagData","CreateTagResponse","DownloadFilesData","FileFormat","GenerateProjectContextResponse","GetBranchInfoResponse","GetFileInfoData","GetFileInfoResponse","GetOrphanedFilesResponse","GetTranslationJobInfoResponse","GetTranslationStatusResponse","JsonObject","JsonValue","ProcessFileMovesData","ProcessFileMovesResponse","PublishFilesData","PublishFilesResponse","RuntimeFileFormat","RuntimeFileFormat$1","TranslateData","Content","CustomMapping","CustomMapping$1","CustomRegionMapping","CustomRegionMapping$1","CutoffFormatOptions","CutoffFormatOptions$1","DataFormat","DataFormat$1","FormatVariables","FormatVariables$1","GTProp","HTML_CONTENT_PROPS","HtmlContentPropKeysRecord","HtmlContentPropValuesRecord","I18nextMessage","I18nextMessage$1","IcuMessage","IcuMessage$1","JsxChild","JsxChildren","JsxChildren$1","JsxElement","LocaleProperties","LocaleProperties$1","StringContent","StringFormat","StringFormat$1","StringMessage","StringMessage$1","Variable","VariableType","ActionType","NonNullable","EntryMetadata","id","hash","context","maxChars","dataFormat","fileFormat","actionType","RuntimeTranslateManyOptions","sourceLocale","modelProvider","key","TranslateOptions","targetLocale","TranslateManyEntry","source","metadata","HashMetadata","requiresReview","GTParsingFlags","autoderive","jsx","strings","includeSourceCodeContext","enableAutoJsxInjection","legacyGtReactImportSource","devHotReload","viteConfigPath","vueCompilerOptions","whitespace","delimiters","GTOutputFileConfig","output","publish","parsingFlags","GTFilesConfig","gt","fileType","GTConfig","defaultLocale","locales","customMapping","enableI18n","localeRouting","projectId","devApiKey","apiKey","_versionId","_branchId","cacheUrl","cacheExpiryTime","runtimeUrl","_disableDevHotReload","_tagIds","files","JsonPrimitive","CheckFileTranslationsOptions","timeout","FileQuery","fileId","branchId","versionId","FileQueryResult","UpdateMetadata","staticId","format","filePaths","sourceCode","contextDeriveExpr","_contextDeriveExpr","Updates","EnqueueFilesResult","jobData","jobId","sourceFileId","force","message","BINARY_FILE_FORMATS","ReadonlySet","isBinaryFileFormat","FormatMetadata","FileToUpload","FileReference","Omit","content","locale","transformFormat","formatMetadata","incomingBranchId","checkedOutBranchId","fileName","FileReferenceIds","DownloadFileBatchRequest","DownloadFileBatchOptions","DownloadedFile","data","DownloadFileBatchResult","count","EnqueueFilesOptions","targetLocales","SetupProjectFileReference","Pick","SetupProjectResult","SetupProjectOptions","timeoutMs","GTJsonFormatMetadata","Record","domain","requestVersion","approved_at","approved_by","FileUpload","UploadFilesOptions","UploadFilesResponse","uploadedFiles","PublishFileEntry","PublishFilesResult","DownloadFileOptions","TranslationResultReference","TypedResult","translation","TranslationError","success","error","code","RequestSuccess","TranslationResult","TranslateManyResult","BranchDataResult","defaultBranch","BranchQuery","branchNames","FileDataQuery","FileDataResult","Partial","MoveMapping","MoveResult","ProcessMovesResponse","results","summary","total","succeeded","failed","ProcessMovesOptions","JobStatus","CheckJobStatusResult","status","AwaitJobsOptions$1","pollingIntervalSeconds","timeoutSeconds","JobResult","AwaitJobsResult","complete","jobs","SubmitUserEditDiff","diff","localContent","SubmitUserEditDiffsPayload","diffs","Transformation","BaseTransformation","InjectionType","TransformationPrefix","VariableTransformationSuffix","CreateTagOptions","CreateTagResult","OrphanedFile","GetOrphanedFilesResult","Metadata","TranslationRequestConfig","baseUrl","TranslateConfig","$","A","At","B","C","Ct","D","Dt","E","Et","F","Ft","G","H","I","It","J","K","L","M","Mt","N","Nt","O","Ot","P","Pt","Q","R","S","St","T","Tt","U","V","W","X","Y","Z","_","_t","a","at","b","bt","c","ct","d","dt","et","f","ft","g","h","ht","i","it","j","jt","k","kt","l","lt","m","mt","n","nt","o","ot","p","pt","q","r","rt","s","st","t","tt","u","ut","v","vt","w","wt","x","xt","y","yt","z"],"sources":["../src/functions/parseLocale.ts","../src/middleware/gtMiddleware.ts","../../format/dist/types-CbRDetV3.d.cts","../../core/dist/types-yByDbKnV.d.cts","../src/types/InitializeGTParams.ts","../src/functions/runtime.ts","../src/setup/initializeGT.client.ts","../src/provider/GTProvider.client.tsx"],"mappings":";;;;;;;;;;;AAuBA;;iBAAgB,WAAA,CAAA;;;;;;;cCbH,YAAA,EAAc,4BAAA;;;;KCTtBA,aAAAA,GAAgBG,MAAAA,kBAAwBD,OAAAA,CAAQD,gBAAAA;AAAAA;AAAAA,KAGhDA,gBAAAA;EACHG,IAAAA;EACAC,IAAAA;EACAC,UAAAA;EACAC,YAAAA;EACAC,YAAAA;EACAC,kBAAAA;EACAC,kBAAAA;EACAC,wBAAAA;EACAC,UAAAA;EACAC,UAAAA;EACAC,gBAAAA;EACAC,UAAAA;EACAC,UAAAA;EACAC,gBAAAA;EACAC,aAAAA;EACAC,aAAAA;EACAC,mBAAAA;EACAC,aAAAA;EACAC,aAA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AAW,KAAA,EAAO,qBAAA,GAAqB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
package/dist/index.client.mjs
CHANGED
|
@@ -2,7 +2,8 @@ import { createIsomorphicFn, createMiddleware } from "@tanstack/react-start";
|
|
|
2
2
|
import { getRequest, setCookie } from "@tanstack/react-start/server";
|
|
3
3
|
import { getI18nConfig, getReadonlyConditionStore } from "@generaltranslation/react-core/pure";
|
|
4
4
|
import { createGlobalSingleton, getCookieValue, getGTInternal, getMessagesInternal, getTranslationsInternal, parseAcceptLanguage } from "gt-i18n/internal";
|
|
5
|
-
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";
|
|
5
|
+
import { Branch, Currency, DateTime, Derive, GTProvider as GTProvider$1, 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";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
7
|
//#region ../core/dist/diagnostics-DKA2SkZB.mjs
|
|
7
8
|
function ensureSentence(text) {
|
|
8
9
|
const trimmed = text.trim();
|
|
@@ -243,6 +244,10 @@ const gtMiddleware = createMiddleware().server(({ request, pathname, next }) =>
|
|
|
243
244
|
});
|
|
244
245
|
//#endregion
|
|
245
246
|
//#region src/setup/initializeGT.client.ts
|
|
247
|
+
let clientReload;
|
|
248
|
+
function getClientReload() {
|
|
249
|
+
return clientReload;
|
|
250
|
+
}
|
|
246
251
|
/** Initialize GT and its browser condition store from the locale cookie. */
|
|
247
252
|
function initializeGT(config) {
|
|
248
253
|
const browserConfig = config.localeRouting && !config._reload ? {
|
|
@@ -259,6 +264,15 @@ function initializeGT(config) {
|
|
|
259
264
|
...browserConfig,
|
|
260
265
|
locale: determineLocaleClient(config)
|
|
261
266
|
});
|
|
267
|
+
clientReload = browserConfig._reload;
|
|
268
|
+
}
|
|
269
|
+
//#endregion
|
|
270
|
+
//#region src/provider/GTProvider.client.tsx
|
|
271
|
+
function GTProvider(props) {
|
|
272
|
+
return /* @__PURE__ */ jsx(GTProvider$1, {
|
|
273
|
+
...props,
|
|
274
|
+
_reload: props._reload ?? getClientReload()
|
|
275
|
+
});
|
|
262
276
|
}
|
|
263
277
|
//#endregion
|
|
264
278
|
export { Branch, Currency, DateTime, Derive, GTProvider, 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 };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.client.mjs","names":[],"sources":["../../core/dist/diagnostics-DKA2SkZB.mjs","../src/condition-store/singleton.ts","../src/functions/localeRouting.ts","../src/functions/requestConditions.ts","../src/functions/runtime.ts","../src/functions/parseLocale.ts","../src/middleware/gtMiddleware.ts","../src/setup/initializeGT.client.ts"],"sourcesContent":["//#region src/logging/diagnostics.ts\nfunction ensureSentence(text) {\n\tconst trimmed = text.trim();\n\tif (!trimmed) return \"\";\n\treturn /[.!?)]$/.test(trimmed) ? trimmed : `${trimmed}.`;\n}\nfunction stripSentence(text) {\n\tconst trimmed = text.trim();\n\tlet end = trimmed.length;\n\twhile (end > 0) {\n\t\tconst char = trimmed[end - 1];\n\t\tif (char !== \".\" && char !== \"!\" && char !== \"?\") break;\n\t\tend -= 1;\n\t}\n\treturn trimmed.slice(0, end);\n}\nfunction formatDetails(details) {\n\tif (!details) return \"\";\n\tconst detailText = Array.isArray(details) ? details.join(\", \") : details;\n\tif (!detailText.trim()) return \"\";\n\treturn ensureSentence(`Details: ${detailText}`);\n}\nfunction formatDiagnosticErrorDetails(error) {\n\tif (error == null) return void 0;\n\treturn String(error);\n}\nfunction createDiagnosticMessage({ source, severity, whatHappened, reassurance, why, fix, wayOut, details, docsUrl }) {\n\tconst prefix = source ? severity ? `${source} ${severity}:` : `${source}:` : severity ? `${severity}:` : \"\";\n\tconst whatAndWhy = why ? `${stripSentence(whatHappened)} because ${stripSentence(why)}` : whatHappened;\n\tconst shouldCombineWayOut = !!fix && !!wayOut && /^[a-z]/.test(stripSentence(wayOut));\n\tconst messageParts = [\n\t\twhatAndWhy,\n\t\treassurance,\n\t\tshouldCombineWayOut ? `${stripSentence(fix)}, or ${stripSentence(wayOut)}` : fix,\n\t\tshouldCombineWayOut ? void 0 : wayOut,\n\t\tformatDetails(details)\n\t].filter((part) => !!part).map(ensureSentence);\n\tif (docsUrl) messageParts.push(`Learn more: ${docsUrl}`);\n\tconst message = messageParts.join(\" \");\n\treturn prefix ? `${prefix} ${message}` : message;\n}\n//#endregion\nexport { formatDiagnosticErrorDetails as n, createDiagnosticMessage as t };\n\n//# sourceMappingURL=diagnostics-DKA2SkZB.mjs.map","import { createDiagnosticMessage } from 'generaltranslation/internal';\nimport { createGlobalSingleton } from 'gt-i18n/internal';\nimport type { AsyncLocalConditionStore } from './AsyncLocalConditionStore';\n\nconst conditionStoreNotInitializedError = createDiagnosticMessage({\n source: 'gt-tanstack-start',\n severity: 'Error',\n whatHappened: 'Cannot read GT server request state before initialization',\n why: 'initializeGT() has not initialized the TanStack Start server condition store',\n fix: \"Call initializeGT() from 'gt-tanstack-start' during application setup before using gtMiddleware or server APIs.\",\n});\n\nconst conditionStoreSingleton = createGlobalSingleton<AsyncLocalConditionStore>(\n {\n namespace: 'tanstackStart',\n key: 'conditionStore',\n source: 'gt-tanstack-start',\n notInitialized: () => conditionStoreNotInitializedError,\n }\n);\n\nexport const getConditionStore = conditionStoreSingleton.get;\nexport const setConditionStore = conditionStoreSingleton.set;\nexport const isConditionStoreInitialized =\n conditionStoreSingleton.isInitialized;\n","import { getI18nConfig } from '@generaltranslation/react-core/pure';\n\n/** Resolve a supported locale from the first pathname segment. */\nexport function getLocaleFromPath(\n pathname: string,\n basepath = getRouterBasepath()\n): string | undefined {\n const { pathname: routePathname } = splitBasepath(pathname, basepath);\n const match = routePathname.match(/^\\/([^/]+)(?:\\/|$)/);\n if (!match) return undefined;\n\n let segment: string;\n try {\n segment = decodeURIComponent(match[1]);\n } catch {\n return undefined;\n }\n\n return getI18nConfig().determineSupportedLocale(segment);\n}\n\n/** Replace the pathname locale, leaving the default locale unprefixed. */\nexport function getPathnameForLocale(\n pathname: string,\n locale: string,\n basepath = getRouterBasepath()\n): string {\n const i18nConfig = getI18nConfig();\n const { basepath: routeBasepath, pathname: routePathname } = splitBasepath(\n pathname,\n basepath\n );\n const pathLocale = getLocaleFromPath(routePathname, '/');\n const unlocalizedPath = pathLocale\n ? routePathname.replace(/^\\/[^/]+/, '') || '/'\n : routePathname;\n const resolvedLocale = i18nConfig.resolveSupportedLocale(locale);\n\n if (resolvedLocale === i18nConfig.getDefaultLocale()) {\n return `${routeBasepath}${unlocalizedPath}`;\n }\n\n return `${routeBasepath}/${encodeURIComponent(resolvedLocale)}${\n unlocalizedPath === '/' ? '' : unlocalizedPath\n }`;\n}\n\nfunction getRouterBasepath(): string {\n return process.env.TSS_ROUTER_BASEPATH || '/';\n}\n\nfunction splitBasepath(\n pathname: string,\n basepath: string\n): { basepath: string; pathname: string } {\n const normalizedBasepath = `/${basepath.replace(/^\\/+|\\/+$/g, '')}`;\n if (normalizedBasepath === '/' || pathname === normalizedBasepath) {\n return {\n basepath: normalizedBasepath === '/' ? '' : normalizedBasepath,\n pathname: pathname === normalizedBasepath ? '/' : pathname,\n };\n }\n if (pathname.startsWith(`${normalizedBasepath}/`)) {\n return {\n basepath: normalizedBasepath,\n pathname: pathname.slice(normalizedBasepath.length),\n };\n }\n return { basepath: '', pathname };\n}\n","import { setCookie } from '@tanstack/react-start/server';\nimport { getI18nConfig } from '@generaltranslation/react-core/pure';\nimport { createDiagnosticMessage } from 'generaltranslation/internal';\nimport { getCookieValue, parseAcceptLanguage } from 'gt-i18n/internal';\nimport type { RequestConditions } from '../condition-store/AsyncLocalConditionStore';\nimport type { InitializeGTParams } from '../types/InitializeGTParams';\nimport { getLocaleFromPath } from './localeRouting';\n\nexport const localeCookieOptions = {\n path: '/',\n sameSite: 'lax' as const,\n maxAge: 60 * 60 * 24 * 365,\n};\n\nconst noLocaleCandidatesWarning = createDiagnosticMessage({\n source: 'gt-tanstack-start',\n severity: 'Warning',\n whatHappened: 'No locale preference was found for the current request',\n reassurance: 'GT will use the configured default locale',\n why: 'neither the locale cookie nor the Accept-Language header supplied a supported locale candidate',\n});\n\nexport function resolveRequestConditions(\n request: Request,\n localeConfig?: InitializeGTParams,\n pathname = new URL(request.url).pathname\n): RequestConditions {\n const i18nConfig = getI18nConfig();\n const cookieHeader = request.headers.get('cookie');\n const localeCandidates: string[] = [];\n if (localeConfig?.localeRouting) {\n const pathLocale = getLocaleFromPath(pathname);\n if (pathLocale) localeCandidates.push(pathLocale);\n }\n const cookieLocale = getCookieValue(\n cookieHeader,\n i18nConfig.getLocaleCookieName()\n );\n if (cookieLocale) localeCandidates.push(cookieLocale);\n localeCandidates.push(\n ...parseAcceptLanguage(request.headers.get('accept-language'))\n );\n\n if (localeCandidates.length === 0) {\n console.warn(noLocaleCandidatesWarning);\n }\n\n const locale = i18nConfig.resolveSupportedLocale(\n localeCandidates,\n localeConfig ?? {\n defaultLocale: i18nConfig.getDefaultLocale(),\n locales: i18nConfig.getLocales(),\n customMapping: i18nConfig.getCustomMapping(),\n }\n );\n\n setCookie(i18nConfig.getLocaleCookieName(), locale, localeCookieOptions);\n\n const enableI18nCookie = getCookieValue(\n cookieHeader,\n i18nConfig.getEnableI18nCookieName()\n );\n\n return {\n locale,\n region:\n getCookieValue(cookieHeader, i18nConfig.getRegionCookieName()) ||\n undefined,\n enableI18n:\n enableI18nCookie === undefined ? true : enableI18nCookie === 'true',\n };\n}\n","import { createIsomorphicFn } from '@tanstack/react-start';\nimport { getReadonlyConditionStore } from '@generaltranslation/react-core/pure';\nimport {\n getGTInternal,\n getMessagesInternal,\n getTranslationsInternal,\n} from 'gt-i18n/internal';\nimport type {\n GTFunctionType,\n MFunctionType,\n Message,\n TFunctionType,\n} from 'gt-i18n/types';\nimport { getConditionStore } from '../condition-store/singleton';\n\n/** Return the locale associated with the current request or browser. */\nexport const getLocale: () => string = createIsomorphicFn()\n .server((): string => getConditionStore().getLocale())\n .client((): string => getReadonlyConditionStore().getLocale());\n\n/** Return whether internationalization is enabled for the current runtime. */\nexport const getEnableI18n: () => boolean = createIsomorphicFn()\n .server((): boolean => getConditionStore().getEnableI18n())\n .client((): boolean => getReadonlyConditionStore().getEnableI18n());\n\n/** Return a string translation function for the current runtime. */\nexport const getGT: (messages?: Message[]) => Promise<GTFunctionType> =\n createIsomorphicFn()\n .server((messages?: Message[]) => {\n const conditionStore = getConditionStore();\n return getGTInternal(\n {\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n },\n messages\n );\n })\n .client((messages?: Message[]) => {\n const conditionStore = getReadonlyConditionStore();\n return getGTInternal(\n {\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n },\n messages\n );\n });\n\n/** Return a registered-message translation function for the current runtime. */\nexport const getMessages: () => Promise<MFunctionType> = createIsomorphicFn()\n .server(() => {\n const conditionStore = getConditionStore();\n return getMessagesInternal({\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n });\n })\n .client(() => {\n const conditionStore = getReadonlyConditionStore();\n return getMessagesInternal({\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n });\n });\n\n/** Return a dictionary translation function for the current runtime. */\nexport const getTranslations: (rootId?: string) => Promise<TFunctionType> =\n createIsomorphicFn()\n .server((rootId?: string) => {\n const conditionStore = getConditionStore();\n return getTranslationsInternal({\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n rootId,\n });\n })\n .client((rootId?: string) => {\n const conditionStore = getReadonlyConditionStore();\n return getTranslationsInternal({\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n rootId,\n });\n });\n","import { createIsomorphicFn } from '@tanstack/react-start';\nimport { getRequest } from '@tanstack/react-start/server';\nimport { getI18nConfig } from '@generaltranslation/react-core/pure';\nimport { getCookieValue } from 'gt-i18n/internal';\nimport type { LocaleResolverConfig } from 'gt-i18n/internal/types';\nimport {\n getConditionStore,\n isConditionStoreInitialized,\n} from '../condition-store/singleton';\nimport { resolveRequestConditions } from './requestConditions';\nimport { getLocale } from './runtime';\n\nexport const determineLocale = createIsomorphicFn()\n .server(determineLocaleServer)\n .client(() => getLocale());\n\n/**\n * Resolve the user's locale for the current TanStack Start request or browser.\n *\n * @deprecated Use `getLocale()` with `gtMiddleware` instead. This function is\n * retained as a fallback for server setups that have not initialized request\n * scope through the middleware.\n */\nexport function parseLocale(): string {\n const i18nConfig = getI18nConfig();\n return determineLocale({\n defaultLocale: i18nConfig.getDefaultLocale(),\n locales: i18nConfig.getLocales(),\n customMapping: i18nConfig.getCustomMapping(),\n });\n}\n\nfunction determineLocaleServer({\n defaultLocale,\n locales,\n customMapping,\n}: LocaleResolverConfig) {\n if (isConditionStoreInitialized()) {\n const conditionStore = getConditionStore();\n if (conditionStore.hasActiveScope()) {\n return conditionStore.getLocale();\n }\n }\n\n return resolveRequestConditions(getRequest(), {\n defaultLocale,\n locales,\n customMapping,\n }).locale;\n}\n\n/** Read the server-synchronized locale cookie during client initialization. */\nexport function determineLocaleClient({\n defaultLocale,\n locales,\n customMapping,\n}: LocaleResolverConfig): string {\n const i18nConfig = getI18nConfig();\n const localeCookieName = i18nConfig.getLocaleCookieName();\n const candidates: string[] = [];\n\n const cookie = getCookieValue(document.cookie, localeCookieName);\n if (cookie) candidates.push(cookie);\n\n if (candidates.length === 0) {\n console.warn(\n 'gt-tanstack-start(client): no locales could be determined for this request'\n );\n }\n\n return i18nConfig.resolveSupportedLocale(candidates, {\n defaultLocale,\n locales,\n customMapping,\n });\n}\n","import {\n createMiddleware,\n type RequestMiddlewareAfterServer,\n} from '@tanstack/react-start';\nimport { getConditionStore } from '../condition-store/singleton';\n\n/**\n * Establish request-scoped GT conditions for SSR, server routes, and server\n * functions.\n */\nexport const gtMiddleware: RequestMiddlewareAfterServer<\n {},\n undefined,\n undefined\n> = createMiddleware().server(({ request, pathname, next }) => {\n return getConditionStore().run(request, () => next(), pathname);\n});\n","import {\n createOrUpdateBrowserConditionStore,\n initializeGT as initializeReactGT,\n} from 'gt-react';\nimport { determineLocaleClient } from '../functions/parseLocale';\nimport { getPathnameForLocale } from '../functions/localeRouting';\nimport type { InitializeGTParams } from '../types/InitializeGTParams';\n\n/** Initialize GT and its browser condition store from the locale cookie. */\nexport function initializeGT(config: InitializeGTParams): void {\n const browserConfig =\n config.localeRouting && !config._reload\n ? {\n ...config,\n _reload: ({ locale }: { locale: string }) => {\n const pathname = getPathnameForLocale(\n window.location.pathname,\n locale\n );\n const destination = new URL(window.location.href);\n destination.pathname = pathname;\n window.location.assign(destination.href);\n },\n }\n : config;\n\n initializeReactGT(config);\n createOrUpdateBrowserConditionStore({\n ...browserConfig,\n locale: determineLocaleClient(config),\n });\n}\n"],"mappings":";;;;;;AACA,SAAS,eAAe,MAAM;CAC7B,MAAM,UAAU,KAAK,MAAM;AAC3B,KAAI,CAAC,QAAS,QAAO;AACrB,QAAO,UAAU,KAAK,QAAQ,GA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AE;EACjC,MAAM,iBAAiB,mBAAmB;AAC1C,MAAI,eAAe,gBAAgB,CACjC,QAAO,eAAe,WAAW;;AAIrC,QAAO,yBAAyB,YAAY,EAAE;EAC5C;EACA;EACA;EACD,CAAC,CAAC;;;AAIL,SAAgB,sBAAsB,EACpC,eACA,SACA,iBAC+B;CAC/B,MAAM,aAAa,eAAe;CAClC,MAAM,mBAAmB,WAAW,qBAAqB;CACzD,MAAM,aAAuB,EAAE;CAE/B,MAAM,SAAS,eAAe,SAAS,QAAQ,iBAAiB;AAChE,KAAI,OAAQ,YAAW,KAAK,OAAO;AAEnC,KAAI,WAAW,WAAW,EACxB,SAAQ,KACN,6EACD;AAGH,QAAO,WAAW,uBAAuB,YAAY;EACnD;EACA;EACA;EACD,CAAC;;;;;;;;AChEJ,MAAa,eAIT,kBAAkB,CAAC,QAAQ,EAAE,SAAS,UAAU,WAAW;AAC7D,QAAO,mBAAmB,CAAC,IAAI,eAAe,MAAM,EAAE,SAAS;EAC/D;;;;ACPF,SAAgB,aAAa,QAAkC;CAC7D,MAAM,gBACJ,OAAO,iBAAiB,CAAC,OAAO,UAC5B;EACE,GAAG;EACH,UAAU,EAAE,aAAiC;GAC3C,MAAM,WAAW,qBACf,OAAO,SAAS,UAChB,OACD;GACD,MAAM,cAAc,IAAI,IAAI,OAAO,SAAS,KAAK;AACjD,eAAY,WAAW;AACvB,UAAO,SAAS,OAAO,YAAY,KAAK;;EAE3C,GACD;AAEN,gBAAkB,OAAO;AACzB,qCAAoC;EAClC,GAAG;EACH,QAAQ,sBAAsB,OAAO;EACtC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.client.mjs","names":["ReactGTProvider"],"sources":["../../core/dist/diagnostics-DKA2SkZB.mjs","../src/condition-store/singleton.ts","../src/functions/localeRouting.ts","../src/functions/requestConditions.ts","../src/functions/runtime.ts","../src/functions/parseLocale.ts","../src/middleware/gtMiddleware.ts","../src/setup/initializeGT.client.ts","../src/provider/GTProvider.client.tsx"],"sourcesContent":["//#region src/logging/diagnostics.ts\nfunction ensureSentence(text) {\n\tconst trimmed = text.trim();\n\tif (!trimmed) return \"\";\n\treturn /[.!?)]$/.test(trimmed) ? trimmed : `${trimmed}.`;\n}\nfunction stripSentence(text) {\n\tconst trimmed = text.trim();\n\tlet end = trimmed.length;\n\twhile (end > 0) {\n\t\tconst char = trimmed[end - 1];\n\t\tif (char !== \".\" && char !== \"!\" && char !== \"?\") break;\n\t\tend -= 1;\n\t}\n\treturn trimmed.slice(0, end);\n}\nfunction formatDetails(details) {\n\tif (!details) return \"\";\n\tconst detailText = Array.isArray(details) ? details.join(\", \") : details;\n\tif (!detailText.trim()) return \"\";\n\treturn ensureSentence(`Details: ${detailText}`);\n}\nfunction formatDiagnosticErrorDetails(error) {\n\tif (error == null) return void 0;\n\treturn String(error);\n}\nfunction createDiagnosticMessage({ source, severity, whatHappened, reassurance, why, fix, wayOut, details, docsUrl }) {\n\tconst prefix = source ? severity ? `${source} ${severity}:` : `${source}:` : severity ? `${severity}:` : \"\";\n\tconst whatAndWhy = why ? `${stripSentence(whatHappened)} because ${stripSentence(why)}` : whatHappened;\n\tconst shouldCombineWayOut = !!fix && !!wayOut && /^[a-z]/.test(stripSentence(wayOut));\n\tconst messageParts = [\n\t\twhatAndWhy,\n\t\treassurance,\n\t\tshouldCombineWayOut ? `${stripSentence(fix)}, or ${stripSentence(wayOut)}` : fix,\n\t\tshouldCombineWayOut ? void 0 : wayOut,\n\t\tformatDetails(details)\n\t].filter((part) => !!part).map(ensureSentence);\n\tif (docsUrl) messageParts.push(`Learn more: ${docsUrl}`);\n\tconst message = messageParts.join(\" \");\n\treturn prefix ? `${prefix} ${message}` : message;\n}\n//#endregion\nexport { formatDiagnosticErrorDetails as n, createDiagnosticMessage as t };\n\n//# sourceMappingURL=diagnostics-DKA2SkZB.mjs.map","import { createDiagnosticMessage } from 'generaltranslation/internal';\nimport { createGlobalSingleton } from 'gt-i18n/internal';\nimport type { AsyncLocalConditionStore } from './AsyncLocalConditionStore';\n\nconst conditionStoreNotInitializedError = createDiagnosticMessage({\n source: 'gt-tanstack-start',\n severity: 'Error',\n whatHappened: 'Cannot read GT server request state before initialization',\n why: 'initializeGT() has not initialized the TanStack Start server condition store',\n fix: \"Call initializeGT() from 'gt-tanstack-start' during application setup before using gtMiddleware or server APIs.\",\n});\n\nconst conditionStoreSingleton = createGlobalSingleton<AsyncLocalConditionStore>(\n {\n namespace: 'tanstackStart',\n key: 'conditionStore',\n source: 'gt-tanstack-start',\n notInitialized: () => conditionStoreNotInitializedError,\n }\n);\n\nexport const getConditionStore = conditionStoreSingleton.get;\nexport const setConditionStore = conditionStoreSingleton.set;\nexport const isConditionStoreInitialized =\n conditionStoreSingleton.isInitialized;\n","import { getI18nConfig } from '@generaltranslation/react-core/pure';\n\n/** Resolve a supported locale from the first pathname segment. */\nexport function getLocaleFromPath(\n pathname: string,\n basepath = getRouterBasepath()\n): string | undefined {\n const { pathname: routePathname } = splitBasepath(pathname, basepath);\n const match = routePathname.match(/^\\/([^/]+)(?:\\/|$)/);\n if (!match) return undefined;\n\n let segment: string;\n try {\n segment = decodeURIComponent(match[1]);\n } catch {\n return undefined;\n }\n\n return getI18nConfig().determineSupportedLocale(segment);\n}\n\n/** Replace the pathname locale, leaving the default locale unprefixed. */\nexport function getPathnameForLocale(\n pathname: string,\n locale: string,\n basepath = getRouterBasepath()\n): string {\n const i18nConfig = getI18nConfig();\n const { basepath: routeBasepath, pathname: routePathname } = splitBasepath(\n pathname,\n basepath\n );\n const pathLocale = getLocaleFromPath(routePathname, '/');\n const unlocalizedPath = pathLocale\n ? routePathname.replace(/^\\/[^/]+/, '') || '/'\n : routePathname;\n const resolvedLocale = i18nConfig.resolveSupportedLocale(locale);\n\n if (resolvedLocale === i18nConfig.getDefaultLocale()) {\n return `${routeBasepath}${unlocalizedPath}`;\n }\n\n return `${routeBasepath}/${encodeURIComponent(resolvedLocale)}${\n unlocalizedPath === '/' ? '' : unlocalizedPath\n }`;\n}\n\nfunction getRouterBasepath(): string {\n return process.env.TSS_ROUTER_BASEPATH || '/';\n}\n\nfunction splitBasepath(\n pathname: string,\n basepath: string\n): { basepath: string; pathname: string } {\n const normalizedBasepath = `/${basepath.replace(/^\\/+|\\/+$/g, '')}`;\n if (normalizedBasepath === '/' || pathname === normalizedBasepath) {\n return {\n basepath: normalizedBasepath === '/' ? '' : normalizedBasepath,\n pathname: pathname === normalizedBasepath ? '/' : pathname,\n };\n }\n if (pathname.startsWith(`${normalizedBasepath}/`)) {\n return {\n basepath: normalizedBasepath,\n pathname: pathname.slice(normalizedBasepath.length),\n };\n }\n return { basepath: '', pathname };\n}\n","import { setCookie } from '@tanstack/react-start/server';\nimport { getI18nConfig } from '@generaltranslation/react-core/pure';\nimport { createDiagnosticMessage } from 'generaltranslation/internal';\nimport { getCookieValue, parseAcceptLanguage } from 'gt-i18n/internal';\nimport type { RequestConditions } from '../condition-store/AsyncLocalConditionStore';\nimport type { InitializeGTParams } from '../types/InitializeGTParams';\nimport { getLocaleFromPath } from './localeRouting';\n\nexport const localeCookieOptions = {\n path: '/',\n sameSite: 'lax' as const,\n maxAge: 60 * 60 * 24 * 365,\n};\n\nconst noLocaleCandidatesWarning = createDiagnosticMessage({\n source: 'gt-tanstack-start',\n severity: 'Warning',\n whatHappened: 'No locale preference was found for the current request',\n reassurance: 'GT will use the configured default locale',\n why: 'neither the locale cookie nor the Accept-Language header supplied a supported locale candidate',\n});\n\nexport function resolveRequestConditions(\n request: Request,\n localeConfig?: InitializeGTParams,\n pathname = new URL(request.url).pathname\n): RequestConditions {\n const i18nConfig = getI18nConfig();\n const cookieHeader = request.headers.get('cookie');\n const localeCandidates: string[] = [];\n if (localeConfig?.localeRouting) {\n const pathLocale = getLocaleFromPath(pathname);\n if (pathLocale) localeCandidates.push(pathLocale);\n }\n const cookieLocale = getCookieValue(\n cookieHeader,\n i18nConfig.getLocaleCookieName()\n );\n if (cookieLocale) localeCandidates.push(cookieLocale);\n localeCandidates.push(\n ...parseAcceptLanguage(request.headers.get('accept-language'))\n );\n\n if (localeCandidates.length === 0) {\n console.warn(noLocaleCandidatesWarning);\n }\n\n const locale = i18nConfig.resolveSupportedLocale(\n localeCandidates,\n localeConfig ?? {\n defaultLocale: i18nConfig.getDefaultLocale(),\n locales: i18nConfig.getLocales(),\n customMapping: i18nConfig.getCustomMapping(),\n }\n );\n\n setCookie(i18nConfig.getLocaleCookieName(), locale, localeCookieOptions);\n\n const enableI18nCookie = getCookieValue(\n cookieHeader,\n i18nConfig.getEnableI18nCookieName()\n );\n\n return {\n locale,\n region:\n getCookieValue(cookieHeader, i18nConfig.getRegionCookieName()) ||\n undefined,\n enableI18n:\n enableI18nCookie === undefined ? true : enableI18nCookie === 'true',\n };\n}\n","import { createIsomorphicFn } from '@tanstack/react-start';\nimport { getReadonlyConditionStore } from '@generaltranslation/react-core/pure';\nimport {\n getGTInternal,\n getMessagesInternal,\n getTranslationsInternal,\n} from 'gt-i18n/internal';\nimport type {\n GTFunctionType,\n MFunctionType,\n Message,\n TFunctionType,\n} from 'gt-i18n/types';\nimport { getConditionStore } from '../condition-store/singleton';\n\n/** Return the locale associated with the current request or browser. */\nexport const getLocale: () => string = createIsomorphicFn()\n .server((): string => getConditionStore().getLocale())\n .client((): string => getReadonlyConditionStore().getLocale());\n\n/** Return whether internationalization is enabled for the current runtime. */\nexport const getEnableI18n: () => boolean = createIsomorphicFn()\n .server((): boolean => getConditionStore().getEnableI18n())\n .client((): boolean => getReadonlyConditionStore().getEnableI18n());\n\n/** Return a string translation function for the current runtime. */\nexport const getGT: (messages?: Message[]) => Promise<GTFunctionType> =\n createIsomorphicFn()\n .server((messages?: Message[]) => {\n const conditionStore = getConditionStore();\n return getGTInternal(\n {\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n },\n messages\n );\n })\n .client((messages?: Message[]) => {\n const conditionStore = getReadonlyConditionStore();\n return getGTInternal(\n {\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n },\n messages\n );\n });\n\n/** Return a registered-message translation function for the current runtime. */\nexport const getMessages: () => Promise<MFunctionType> = createIsomorphicFn()\n .server(() => {\n const conditionStore = getConditionStore();\n return getMessagesInternal({\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n });\n })\n .client(() => {\n const conditionStore = getReadonlyConditionStore();\n return getMessagesInternal({\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n });\n });\n\n/** Return a dictionary translation function for the current runtime. */\nexport const getTranslations: (rootId?: string) => Promise<TFunctionType> =\n createIsomorphicFn()\n .server((rootId?: string) => {\n const conditionStore = getConditionStore();\n return getTranslationsInternal({\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n rootId,\n });\n })\n .client((rootId?: string) => {\n const conditionStore = getReadonlyConditionStore();\n return getTranslationsInternal({\n locale: conditionStore.getLocale(),\n enableI18n: conditionStore.getEnableI18n(),\n rootId,\n });\n });\n","import { createIsomorphicFn } from '@tanstack/react-start';\nimport { getRequest } from '@tanstack/react-start/server';\nimport { getI18nConfig } from '@generaltranslation/react-core/pure';\nimport { getCookieValue } from 'gt-i18n/internal';\nimport type { LocaleResolverConfig } from 'gt-i18n/internal/types';\nimport {\n getConditionStore,\n isConditionStoreInitialized,\n} from '../condition-store/singleton';\nimport { resolveRequestConditions } from './requestConditions';\nimport { getLocale } from './runtime';\n\nexport const determineLocale = createIsomorphicFn()\n .server(determineLocaleServer)\n .client(() => getLocale());\n\n/**\n * Resolve the user's locale for the current TanStack Start request or browser.\n *\n * @deprecated Use `getLocale()` with `gtMiddleware` instead. This function is\n * retained as a fallback for server setups that have not initialized request\n * scope through the middleware.\n */\nexport function parseLocale(): string {\n const i18nConfig = getI18nConfig();\n return determineLocale({\n defaultLocale: i18nConfig.getDefaultLocale(),\n locales: i18nConfig.getLocales(),\n customMapping: i18nConfig.getCustomMapping(),\n });\n}\n\nfunction determineLocaleServer({\n defaultLocale,\n locales,\n customMapping,\n}: LocaleResolverConfig) {\n if (isConditionStoreInitialized()) {\n const conditionStore = getConditionStore();\n if (conditionStore.hasActiveScope()) {\n return conditionStore.getLocale();\n }\n }\n\n return resolveRequestConditions(getRequest(), {\n defaultLocale,\n locales,\n customMapping,\n }).locale;\n}\n\n/** Read the server-synchronized locale cookie during client initialization. */\nexport function determineLocaleClient({\n defaultLocale,\n locales,\n customMapping,\n}: LocaleResolverConfig): string {\n const i18nConfig = getI18nConfig();\n const localeCookieName = i18nConfig.getLocaleCookieName();\n const candidates: string[] = [];\n\n const cookie = getCookieValue(document.cookie, localeCookieName);\n if (cookie) candidates.push(cookie);\n\n if (candidates.length === 0) {\n console.warn(\n 'gt-tanstack-start(client): no locales could be determined for this request'\n );\n }\n\n return i18nConfig.resolveSupportedLocale(candidates, {\n defaultLocale,\n locales,\n customMapping,\n });\n}\n","import {\n createMiddleware,\n type RequestMiddlewareAfterServer,\n} from '@tanstack/react-start';\nimport { getConditionStore } from '../condition-store/singleton';\n\n/**\n * Establish request-scoped GT conditions for SSR, server routes, and server\n * functions.\n */\nexport const gtMiddleware: RequestMiddlewareAfterServer<\n {},\n undefined,\n undefined\n> = createMiddleware().server(({ request, pathname, next }) => {\n return getConditionStore().run(request, () => next(), pathname);\n});\n","import {\n createOrUpdateBrowserConditionStore,\n initializeGT as initializeReactGT,\n} from 'gt-react';\nimport type { SharedGTProviderProps } from 'gt-react';\nimport { determineLocaleClient } from '../functions/parseLocale';\nimport { getPathnameForLocale } from '../functions/localeRouting';\nimport type { InitializeGTParams } from '../types/InitializeGTParams';\n\nlet clientReload: SharedGTProviderProps['_reload'];\n\nexport function getClientReload(): SharedGTProviderProps['_reload'] {\n return clientReload;\n}\n\n/** Initialize GT and its browser condition store from the locale cookie. */\nexport function initializeGT(config: InitializeGTParams): void {\n const browserConfig =\n config.localeRouting && !config._reload\n ? {\n ...config,\n _reload: ({ locale }: { locale: string }) => {\n const pathname = getPathnameForLocale(\n window.location.pathname,\n locale\n );\n const destination = new URL(window.location.href);\n destination.pathname = pathname;\n window.location.assign(destination.href);\n },\n }\n : config;\n\n initializeReactGT(config);\n createOrUpdateBrowserConditionStore({\n ...browserConfig,\n locale: determineLocaleClient(config),\n });\n clientReload = browserConfig._reload;\n}\n","import {\n GTProvider as ReactGTProvider,\n type SharedGTProviderProps,\n} from 'gt-react';\nimport { getClientReload } from '../setup/initializeGT.client';\n\nexport function GTProvider(props: SharedGTProviderProps) {\n return (\n <ReactGTProvider {...props} _reload={props._reload ?? getClientReload()} />\n );\n}\n"],"mappings":";;;;;;;AACA,SAAS,eAAe,MAAM;CAC7B,MAAM,UAAU,KAAK,MAAM;AAC3B,KAAI,CAAC,QAAS,QAAO;AACrB,QAAO,UAAU,KAAK,QAAQ,GAAG,UAAU,GAAG,QAAQ;;AAEvD,SAAS,cAAc,MAAM;CAC5B,MAAM,UAAU,KAAK,MAAM;CAC3B,IAAI,MAAM,QAAQ;AAClB,QAAO,MAAM,GAAG;EACf,MAAM,OAAO,QAAQ,MAAM;AAC3B,MAAI,SAAS,OAAO,SAAS,OAAO,SAAS,IAAK;AAClD,SAAO;;AAER,QAAO,QAAQ,MAAM,GAAG,IAAI;;AAE7B,SAAS,cAAc,SAAS;AAC/B,KAAI,CAAC,QAAS,QAAO;CACrB,MAAM,aAAa,MAAM,QAAQ,QAAQ,GAAG,QAAQ,KAAK,KAAK,GAAG;AACjE,KAAI,CAAC,WAAW,MAAM,CAAE,QAAO;AAC/B,QAAO,eAAe,YAAY,aAAa;;AAMhD,SAAS,wBAAwB,EAAE,QAAQ,UAAU,cAAc,aAAa,KAAK,KAAK,QAAQ,SAAS,WAAW;CACrH,MAAM,SAAS,SAAS,WAAW,GAAG,OAAO,GAAG,SAAS,KAAK,GAAG,OAAO,KAAK,WAAW,GAAG,SAAS,KAAK;CACzG,MAAM,aAAa,MAAM,GAAG,cAAc,aAAa,CAAC,WAAW,cAAc,IAAI,KAAK;CAC1F,MAAM,sBAAsB,CAAC,CAAC,OAAO,CAAC,CA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U,EAAE,aAAiC;GAC3C,MAAM,WAAW,qBACf,OAAO,SAAS,UAChB,OACD;GACD,MAAM,cAAc,IAAI,IAAI,OAAO,SAAS,KAAK;AACjD,eAAY,WAAW;AACvB,UAAO,SAAS,OAAO,YAAY,KAAK;;EAE3C,GACD;AAEN,gBAAkB,OAAO;AACzB,qCAAoC;EAClC,GAAG;EACH,QAAQ,sBAAsB,OAAO;EACtC,CAAC;AACF,gBAAe,cAAc;;;;AChC/B,SAAgB,WAAW,OAA8B;AACvD,QACE,oBAACA,cAAD;EAAiB,GAAI;EAAO,SAAS,MAAM,WAAW,iBAAiB;EAAI,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gt-tanstack-start",
|
|
3
|
-
"version": "11.4.
|
|
3
|
+
"version": "11.4.4",
|
|
4
4
|
"description": "TanStack Start integration for General Translation",
|
|
5
5
|
"main": "./dist/index.server.mjs",
|
|
6
6
|
"module": "./dist/index.server.mjs",
|
|
@@ -16,10 +16,10 @@
|
|
|
16
16
|
"@tanstack/react-start": ">=1.159.0"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"gt-react": "11.4.
|
|
20
|
-
"@generaltranslation/react-core": "11.4.
|
|
21
|
-
"gt-i18n": "1.0.
|
|
22
|
-
"generaltranslation": "9.5.
|
|
19
|
+
"gt-react": "11.4.4",
|
|
20
|
+
"@generaltranslation/react-core": "11.4.4",
|
|
21
|
+
"gt-i18n": "1.0.32",
|
|
22
|
+
"generaltranslation": "9.5.1"
|
|
23
23
|
},
|
|
24
24
|
"repository": {
|
|
25
25
|
"type": "git",
|