@sheet-i18n/react-client 0.2.0 → 0.2.2
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/dist/index.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -10,14 +10,13 @@ type IntlProviderProps<TSupportedLocales extends readonly string[], TLocaleSet e
|
|
|
10
10
|
|
|
11
11
|
type UseIntlParams<D = MessageDescriptor> = Parameters<IntlShape['$t']> extends [D, ...infer R] ? [...R, Omit<D, 'id'>] : never;
|
|
12
12
|
type $TParams = Partial<UseIntlParams>;
|
|
13
|
-
type BigIntExcludedValues = $TParams[0] extends Record<string, infer V> ? Record<string, Exclude<V, bigint>> : never;
|
|
14
13
|
type BigIntExcludedReactNode = Exclude<React.ReactNode, bigint>;
|
|
15
14
|
interface UseTranslationParams<TSupportedLocales extends readonly string[], TLocaleSet extends Record<TSupportedLocales[number], Record<string, any>>, TSheetTitle = keyof TLocaleSet[TSupportedLocales[number]]> {
|
|
16
15
|
sheetTitle: TSheetTitle;
|
|
17
16
|
i18nStore: I18nStore<TSupportedLocales, TLocaleSet>;
|
|
18
17
|
}
|
|
19
18
|
declare function useTranslation<TSupportedLocales extends readonly string[], TLocaleSet extends Record<TSupportedLocales[number], Record<string, any>>, TSheetTitle extends keyof TLocaleSet[TSupportedLocales[number]], TMessageId extends keyof TLocaleSet[TSupportedLocales[number]][TSheetTitle]>({ sheetTitle, }: UseTranslationParams<TSupportedLocales, TLocaleSet, TSheetTitle>): {
|
|
20
|
-
t: <TValues extends
|
|
19
|
+
t: <TValues extends $TParams[0], TOpts extends $TParams[1], TDescriptor extends $TParams[2]>(id: TMessageId, values?: TValues, opts?: TOpts, _descriptor?: TDescriptor) => BigIntExcludedReactNode | BigIntExcludedReactNode[];
|
|
21
20
|
};
|
|
22
21
|
|
|
23
22
|
declare function createI18nContext<TSupportedLocales extends readonly string[], TLocaleSet extends Record<TSupportedLocales[number], Record<string, any>>>(i18nStore: I18nStore<TSupportedLocales, TLocaleSet>): {
|
package/dist/index.d.ts
CHANGED
|
@@ -10,14 +10,13 @@ type IntlProviderProps<TSupportedLocales extends readonly string[], TLocaleSet e
|
|
|
10
10
|
|
|
11
11
|
type UseIntlParams<D = MessageDescriptor> = Parameters<IntlShape['$t']> extends [D, ...infer R] ? [...R, Omit<D, 'id'>] : never;
|
|
12
12
|
type $TParams = Partial<UseIntlParams>;
|
|
13
|
-
type BigIntExcludedValues = $TParams[0] extends Record<string, infer V> ? Record<string, Exclude<V, bigint>> : never;
|
|
14
13
|
type BigIntExcludedReactNode = Exclude<React.ReactNode, bigint>;
|
|
15
14
|
interface UseTranslationParams<TSupportedLocales extends readonly string[], TLocaleSet extends Record<TSupportedLocales[number], Record<string, any>>, TSheetTitle = keyof TLocaleSet[TSupportedLocales[number]]> {
|
|
16
15
|
sheetTitle: TSheetTitle;
|
|
17
16
|
i18nStore: I18nStore<TSupportedLocales, TLocaleSet>;
|
|
18
17
|
}
|
|
19
18
|
declare function useTranslation<TSupportedLocales extends readonly string[], TLocaleSet extends Record<TSupportedLocales[number], Record<string, any>>, TSheetTitle extends keyof TLocaleSet[TSupportedLocales[number]], TMessageId extends keyof TLocaleSet[TSupportedLocales[number]][TSheetTitle]>({ sheetTitle, }: UseTranslationParams<TSupportedLocales, TLocaleSet, TSheetTitle>): {
|
|
20
|
-
t: <TValues extends
|
|
19
|
+
t: <TValues extends $TParams[0], TOpts extends $TParams[1], TDescriptor extends $TParams[2]>(id: TMessageId, values?: TValues, opts?: TOpts, _descriptor?: TDescriptor) => BigIntExcludedReactNode | BigIntExcludedReactNode[];
|
|
21
20
|
};
|
|
22
21
|
|
|
23
22
|
declare function createI18nContext<TSupportedLocales extends readonly string[], TLocaleSet extends Record<TSupportedLocales[number], Record<string, any>>>(i18nStore: I18nStore<TSupportedLocales, TLocaleSet>): {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheet-i18n/react-client",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "a client package for react modules used by sheet-i18n",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
"dependencies": {
|
|
28
28
|
"react": "^19.0.0",
|
|
29
29
|
"react-intl": "^7.0.4",
|
|
30
|
-
"@sheet-i18n/
|
|
31
|
-
"@sheet-i18n/
|
|
32
|
-
"@sheet-i18n/errors": "1.1.
|
|
30
|
+
"@sheet-i18n/react-core": "0.2.1",
|
|
31
|
+
"@sheet-i18n/shared-utils": "1.1.1",
|
|
32
|
+
"@sheet-i18n/errors": "1.1.1"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/react": "^19.0.2",
|
|
36
36
|
"@types/react-dom": "^19.0.2",
|
|
37
|
-
"@sheet-i18n/typescript-config": "1.1.
|
|
37
|
+
"@sheet-i18n/typescript-config": "1.1.1"
|
|
38
38
|
},
|
|
39
39
|
"scripts": {
|
|
40
40
|
"build": "tsup",
|