@rdyl/react-i18n-connect 0.2.0 → 0.2.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/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- ## 0.1.3 (2025-09-25)
1
+ ## 0.2.1 (2025-09-25)
2
2
 
3
3
 
4
4
 
package/dist/index.js CHANGED
@@ -52,7 +52,7 @@ var react_1 = __importStar(require("react"));
52
52
  var utils_1 = require("./utils");
53
53
  var I18nCtx = (0, react_1.createContext)({});
54
54
  var I18nConnect = function (_a) {
55
- var children = _a.children, initial = _a.initial, defaultLang = _a.defaultLang, onAfterChange = _a.onAfterChange, onBeforeChange = _a.onBeforeChange, getLocales = _a.getLocales;
55
+ var initial = _a.initial, children = _a.children, defaultLang = _a.defaultLang, onAfterChange = _a.onAfterChange, onBeforeChange = _a.onBeforeChange, getLocales = _a.getLocales;
56
56
  var _b = (0, react_1.useState)(false), ready = _b[0], setReady = _b[1];
57
57
  var _c = (0, react_1.useState)(defaultLang), lang = _c[0], _setLang = _c[1];
58
58
  var _d = (0, react_1.useState)({}), defaultLocales = _d[0], setDefaultLocales = _d[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rdyl/react-i18n-connect",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.js",
6
6
  "types": "types/index.d.ts",
package/types/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { FC, PropsWithChildren } from "react";
2
- import { GenI18nTokenFn, I18nConfig, I18nConnectValue, I18nTokenValue } from "./utils";
2
+ import { GenI18nTokenFn, I18nConnectValue, I18nTokenValue } from "./utils";
3
3
  declare const I18nConnect: FC<PropsWithChildren<I18nConnectProps>>;
4
- export type I18nConnectProps = Partial<I18nConfig> & {
4
+ export type I18nConnectProps = {
5
5
  defaultLang: string;
6
6
  initial?(): Promise<string>;
7
7
  getLocales(lang: string): Record<string, I18nTokenValue> | Promise<Record<string, I18nTokenValue>>;
package/types/utils.d.ts CHANGED
@@ -1,9 +1,5 @@
1
1
  export declare function ParserI18nFn(data: Record<string, I18nTokenValue>): (k: string, named?: Record<string, unknown>) => string;
2
2
  export type I18nTokenValue = string | number | boolean;
3
- export interface I18nConfig {
4
- locales: Record<string, Record<string, I18nTokenValue>>;
5
- initial: string;
6
- }
7
3
  export type GenI18nTokenFn = (k: string, o?: Record<string, unknown>) => string;
8
4
  export interface I18nConnectValue {
9
5
  lang: string;