@uxf/core-react 11.74.1 → 11.78.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/core-react",
3
- "version": "11.74.1",
3
+ "version": "11.78.0",
4
4
  "description": "UXF Core",
5
5
  "author": "UX Fans s.r.o",
6
6
  "license": "MIT",
@@ -12,7 +12,7 @@
12
12
  "typecheck": "tsc --noEmit --skipLibCheck"
13
13
  },
14
14
  "dependencies": {
15
- "@uxf/core": "11.72.3"
15
+ "@uxf/core": "11.78.0"
16
16
  },
17
17
  "peerDependencies": {
18
18
  "react": ">=18.2.0"
@@ -1,2 +1,2 @@
1
1
  import type { TranslationFunction } from "./types";
2
- export declare function createDefaultT(translationObject: Record<string, any>): TranslationFunction;
2
+ export declare function createDefaultT(translationObject: Record<string, any>): TranslationFunction<any>;
@@ -1,2 +1,2 @@
1
1
  import type { SupportedLanguages, TranslationFunction } from "./types";
2
- export declare function createDevT(locale: SupportedLanguages, translationObject: Record<string, any>): TranslationFunction;
2
+ export declare function createDevT(locale: SupportedLanguages, translationObject: Record<string, any>): TranslationFunction<any>;
@@ -1,2 +1,3 @@
1
- export declare const TranslationsProvider: import("react").Provider<import("./types").TranslationFunction>;
2
- export declare function useUxfTranslation(): import("./types").TranslationFunction;
1
+ import type { TranslationsContextValue } from "./types";
2
+ export declare const TranslationsProvider: import("react").Provider<TranslationsContextValue<any>>;
3
+ export declare function useUxfTranslation(): TranslationsContextValue<any>;
@@ -1,4 +1,4 @@
1
1
  export type SupportedLanguages = "cs" | "sk" | "en" | "de";
2
2
  export type SupportedPluralKeywords = "0" | "zero" | "one" | "few" | "many" | "other";
3
- export type TranslationFunction = (key: string, options?: Record<string, any>) => string;
4
- export type TranslationsContextValue = TranslationFunction;
3
+ export type TranslationFunction<Key extends string> = (key: Key, options?: Record<string, any>) => string;
4
+ export type TranslationsContextValue<Keys extends string> = TranslationFunction<Keys>;