@sheet-i18n/react-client 1.6.0-canary.8 → 1.6.0-canary.9
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 +7 -8
- package/dist/index.d.ts +7 -8
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { I18nStore } from '@sheet-i18n/react-core';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { I18nStore } from '@sheet-i18n/react-core';
|
|
3
3
|
import { ObserverManager } from '@sheet-i18n/shared-utils';
|
|
4
|
-
import * as react from 'react';
|
|
5
4
|
|
|
6
5
|
type IntlProviderProps<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TTypeSafe extends boolean = false> = {
|
|
7
6
|
i18nStore: I18nStore<TSupportedLocales, TLocaleSet, TTypeSafe>;
|
|
8
7
|
currentLocale?: TSupportedLocales[number];
|
|
9
8
|
children: React.ReactNode;
|
|
10
9
|
};
|
|
11
|
-
declare function IntlProvider<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TTypeSafe extends boolean = false>({ i18nStore, currentLocale, children, }: IntlProviderProps<TSupportedLocales, TLocaleSet, TTypeSafe>): react_jsx_runtime.JSX.Element;
|
|
12
10
|
|
|
13
11
|
interface Message {
|
|
14
12
|
}
|
|
@@ -107,20 +105,21 @@ interface StorageBasedIntlProviderProps<TSupportedLocales extends readonly strin
|
|
|
107
105
|
fallbackUI?: React.ReactNode;
|
|
108
106
|
children: React.ReactNode;
|
|
109
107
|
}
|
|
110
|
-
declare function StorageBasedIntlProvider<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TTypeSafe extends boolean = false>({ i18nStore, storageManager, fallbackUI, children, }: StorageBasedIntlProviderProps<TSupportedLocales, TLocaleSet, TTypeSafe>): string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null;
|
|
111
108
|
|
|
112
109
|
interface Plugins<TRules extends Rules> {
|
|
113
110
|
rules?: TRules;
|
|
114
111
|
}
|
|
115
|
-
|
|
116
|
-
IntlProvider: (
|
|
117
|
-
|
|
112
|
+
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>): {
|
|
113
|
+
IntlProvider: ({ currentLocale, children, }: Omit<IntlProviderProps<TSupportedLocales, TLocaleSet>, "currentLocale" | "i18nStore"> & {
|
|
114
|
+
currentLocale?: string;
|
|
115
|
+
children?: React.ReactNode;
|
|
116
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
117
|
+
StorageBasedIntlProvider: ({ storageManager, children, }: Omit<StorageBasedIntlProviderProps<TSupportedLocales, TLocaleSet, TTypeSafe>, "i18nStore">) => react_jsx_runtime.JSX.Element;
|
|
118
118
|
useTranslation: <TSheetTitle extends SafeSheetTitle<TSupportedLocales, TLocaleSet, TTypeSafe>>(sheetTitle: TSheetTitle) => UseTranslationReturn<TSupportedLocales, TLocaleSet, TTypeSafe, TSheetTitle, TRules>;
|
|
119
119
|
getTranslation: <TSheetTitle extends SafeSheetTitle<TSupportedLocales, TLocaleSet, TTypeSafe>>(sheetTitle: TSheetTitle) => GetTranslationReturn<TSupportedLocales, TLocaleSet, TTypeSafe, TSheetTitle>;
|
|
120
120
|
getLocaleStorageManager: (storageService?: IStorageService<string>) => LocaleStorageManager<TSupportedLocales, TLocaleSet, TTypeSafe>;
|
|
121
121
|
useLocaleStorage: typeof useLocaleStorage;
|
|
122
122
|
};
|
|
123
|
-
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>): CreateI18nContextReturn<TSupportedLocales, TLocaleSet, TRules, TTypeSafe>;
|
|
124
123
|
|
|
125
124
|
declare class RuleService<TSupportedLocales extends SupportedLocales, TLocaleSet extends LocaleSet, TTypeSafe extends TypeSafe, TSheetTitle extends SafeSheetTitle<TSupportedLocales, TLocaleSet, TTypeSafe>, TMessageId extends SafeMessageId<TSupportedLocales, TLocaleSet, TSheetTitle, TTypeSafe>> {
|
|
126
125
|
private readonly i18nStore;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { I18nStore } from '@sheet-i18n/react-core';
|
|
2
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { I18nStore } from '@sheet-i18n/react-core';
|
|
3
3
|
import { ObserverManager } from '@sheet-i18n/shared-utils';
|
|
4
|
-
import * as react from 'react';
|
|
5
4
|
|
|
6
5
|
type IntlProviderProps<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TTypeSafe extends boolean = false> = {
|
|
7
6
|
i18nStore: I18nStore<TSupportedLocales, TLocaleSet, TTypeSafe>;
|
|
8
7
|
currentLocale?: TSupportedLocales[number];
|
|
9
8
|
children: React.ReactNode;
|
|
10
9
|
};
|
|
11
|
-
declare function IntlProvider<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TTypeSafe extends boolean = false>({ i18nStore, currentLocale, children, }: IntlProviderProps<TSupportedLocales, TLocaleSet, TTypeSafe>): react_jsx_runtime.JSX.Element;
|
|
12
10
|
|
|
13
11
|
interface Message {
|
|
14
12
|
}
|
|
@@ -107,20 +105,21 @@ interface StorageBasedIntlProviderProps<TSupportedLocales extends readonly strin
|
|
|
107
105
|
fallbackUI?: React.ReactNode;
|
|
108
106
|
children: React.ReactNode;
|
|
109
107
|
}
|
|
110
|
-
declare function StorageBasedIntlProvider<TSupportedLocales extends readonly string[], TLocaleSet extends Partial<Record<TSupportedLocales[number], Record<string, any>>>, TTypeSafe extends boolean = false>({ i18nStore, storageManager, fallbackUI, children, }: StorageBasedIntlProviderProps<TSupportedLocales, TLocaleSet, TTypeSafe>): string | number | bigint | boolean | Iterable<react.ReactNode> | Promise<string | number | bigint | boolean | react.ReactPortal | react.ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<react.ReactNode> | null | undefined> | react_jsx_runtime.JSX.Element | null;
|
|
111
108
|
|
|
112
109
|
interface Plugins<TRules extends Rules> {
|
|
113
110
|
rules?: TRules;
|
|
114
111
|
}
|
|
115
|
-
|
|
116
|
-
IntlProvider: (
|
|
117
|
-
|
|
112
|
+
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>): {
|
|
113
|
+
IntlProvider: ({ currentLocale, children, }: Omit<IntlProviderProps<TSupportedLocales, TLocaleSet>, "currentLocale" | "i18nStore"> & {
|
|
114
|
+
currentLocale?: string;
|
|
115
|
+
children?: React.ReactNode;
|
|
116
|
+
}) => react_jsx_runtime.JSX.Element;
|
|
117
|
+
StorageBasedIntlProvider: ({ storageManager, children, }: Omit<StorageBasedIntlProviderProps<TSupportedLocales, TLocaleSet, TTypeSafe>, "i18nStore">) => react_jsx_runtime.JSX.Element;
|
|
118
118
|
useTranslation: <TSheetTitle extends SafeSheetTitle<TSupportedLocales, TLocaleSet, TTypeSafe>>(sheetTitle: TSheetTitle) => UseTranslationReturn<TSupportedLocales, TLocaleSet, TTypeSafe, TSheetTitle, TRules>;
|
|
119
119
|
getTranslation: <TSheetTitle extends SafeSheetTitle<TSupportedLocales, TLocaleSet, TTypeSafe>>(sheetTitle: TSheetTitle) => GetTranslationReturn<TSupportedLocales, TLocaleSet, TTypeSafe, TSheetTitle>;
|
|
120
120
|
getLocaleStorageManager: (storageService?: IStorageService<string>) => LocaleStorageManager<TSupportedLocales, TLocaleSet, TTypeSafe>;
|
|
121
121
|
useLocaleStorage: typeof useLocaleStorage;
|
|
122
122
|
};
|
|
123
|
-
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>): CreateI18nContextReturn<TSupportedLocales, TLocaleSet, TRules, TTypeSafe>;
|
|
124
123
|
|
|
125
124
|
declare class RuleService<TSupportedLocales extends SupportedLocales, TLocaleSet extends LocaleSet, TTypeSafe extends TypeSafe, TSheetTitle extends SafeSheetTitle<TSupportedLocales, TLocaleSet, TTypeSafe>, TMessageId extends SafeMessageId<TSupportedLocales, TLocaleSet, TSheetTitle, TTypeSafe>> {
|
|
126
125
|
private readonly i18nStore;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sheet-i18n/react-client",
|
|
3
|
-
"version": "1.6.0-canary.
|
|
3
|
+
"version": "1.6.0-canary.9",
|
|
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",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
},
|
|
26
26
|
"license": "ISC",
|
|
27
27
|
"dependencies": {
|
|
28
|
+
"@sheet-i18n/react-core": "1.6.0-canary.9",
|
|
28
29
|
"@sheet-i18n/errors": "1.8.1",
|
|
29
|
-
"@sheet-i18n/shared-utils": "1.8.2"
|
|
30
|
-
"@sheet-i18n/react-core": "1.6.0-canary.8"
|
|
30
|
+
"@sheet-i18n/shared-utils": "1.8.2"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@types/react": "^19.0.2",
|