@sheet-i18n/react 1.7.0 → 1.7.1
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 +2 -2
- package/dist/index.d.ts +2 -2
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -54,7 +54,7 @@ type UseTranslationReturn<TSupportedLocales extends readonly string[], TLocaleSe
|
|
|
54
54
|
type IntlProviderProps<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TTypeSafe extends boolean = false> = {
|
|
55
55
|
i18nStore: I18nStore<TSupportedLocales, TLocaleSet, TTypeSafe>;
|
|
56
56
|
currentLocale?: TSupportedLocales[number];
|
|
57
|
-
children:
|
|
57
|
+
children: React.ReactNode | ((currentLocale?: TSupportedLocales[number]) => React.ReactNode);
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
declare function useLocaleStorage<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TTypeSafe extends boolean = false>(localeStorageManager: LocaleStorageManager<TSupportedLocales, TLocaleSet, TTypeSafe>): {
|
|
@@ -65,7 +65,7 @@ interface StorageBasedIntlProviderProps<TSupportedLocales extends readonly strin
|
|
|
65
65
|
i18nStore: I18nStore<TSupportedLocales, TLocaleSet, TTypeSafe>;
|
|
66
66
|
storageManager: LocaleStorageManager<TSupportedLocales, TLocaleSet, TTypeSafe>;
|
|
67
67
|
fallbackUI?: React.ReactNode;
|
|
68
|
-
children:
|
|
68
|
+
children: React.ReactNode | ((currentLocale?: TSupportedLocales[number]) => React.ReactNode);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
declare function createI18nContext<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TRules extends Rules, TTypeSafe extends boolean = false>(i18nStore: I18nStore<TSupportedLocales, TLocaleSet, TTypeSafe>, plugins?: Plugins<TRules>): {
|
package/dist/index.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ type UseTranslationReturn<TSupportedLocales extends readonly string[], TLocaleSe
|
|
|
54
54
|
type IntlProviderProps<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TTypeSafe extends boolean = false> = {
|
|
55
55
|
i18nStore: I18nStore<TSupportedLocales, TLocaleSet, TTypeSafe>;
|
|
56
56
|
currentLocale?: TSupportedLocales[number];
|
|
57
|
-
children:
|
|
57
|
+
children: React.ReactNode | ((currentLocale?: TSupportedLocales[number]) => React.ReactNode);
|
|
58
58
|
};
|
|
59
59
|
|
|
60
60
|
declare function useLocaleStorage<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TTypeSafe extends boolean = false>(localeStorageManager: LocaleStorageManager<TSupportedLocales, TLocaleSet, TTypeSafe>): {
|
|
@@ -65,7 +65,7 @@ interface StorageBasedIntlProviderProps<TSupportedLocales extends readonly strin
|
|
|
65
65
|
i18nStore: I18nStore<TSupportedLocales, TLocaleSet, TTypeSafe>;
|
|
66
66
|
storageManager: LocaleStorageManager<TSupportedLocales, TLocaleSet, TTypeSafe>;
|
|
67
67
|
fallbackUI?: React.ReactNode;
|
|
68
|
-
children:
|
|
68
|
+
children: React.ReactNode | ((currentLocale?: TSupportedLocales[number]) => React.ReactNode);
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
declare function createI18nContext<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TRules extends Rules, TTypeSafe extends boolean = false>(i18nStore: I18nStore<TSupportedLocales, TLocaleSet, TTypeSafe>, plugins?: Plugins<TRules>): {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheet-i18n/react",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.1",
|
|
4
4
|
"description": "i18n client logic based on react",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"module": "./dist/index.mjs",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"react-intl": "^7.0.4",
|
|
39
39
|
"@sheet-i18n/core": "1.7.0",
|
|
40
40
|
"@sheet-i18n/shared-service": "0.2.0",
|
|
41
|
-
"@sheet-i18n/
|
|
41
|
+
"@sheet-i18n/errors": "1.8.2",
|
|
42
42
|
"@sheet-i18n/shared-utils": "1.8.3",
|
|
43
|
-
"@sheet-i18n/
|
|
43
|
+
"@sheet-i18n/typescript": "0.4.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"react": "^18 || ^19 || ^20 || ^21",
|