gt-react 10.6.2-alpha.1 → 10.6.3-alpha.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.
Files changed (35) hide show
  1. package/dist/client.cjs.min.cjs +1 -2
  2. package/dist/client.d.ts +26 -5
  3. package/dist/client.esm.min.mjs +3 -4
  4. package/dist/dictionaries/collectUntranslatedEntries.d.ts +1 -1
  5. package/dist/dictionaries/collectUntranslatedEntries.d.ts.map +1 -1
  6. package/dist/dictionaries/getEntryAndMetadata.d.ts +1 -1
  7. package/dist/dictionaries/getEntryAndMetadata.d.ts.map +1 -1
  8. package/dist/dictionaries/getSubtree.d.ts +0 -6
  9. package/dist/dictionaries/getSubtree.d.ts.map +1 -1
  10. package/dist/dictionaries/injectEntry.d.ts +1 -1
  11. package/dist/dictionaries/injectEntry.d.ts.map +1 -1
  12. package/dist/dictionaries/injectFallbacks.d.ts +1 -1
  13. package/dist/dictionaries/injectFallbacks.d.ts.map +1 -1
  14. package/dist/dictionaries/injectTranslations.d.ts +1 -1
  15. package/dist/dictionaries/injectTranslations.d.ts.map +1 -1
  16. package/dist/dictionaries/mergeDictionaries.d.ts.map +1 -1
  17. package/dist/hooks/useGTClass.d.ts +2 -1
  18. package/dist/hooks/useGTClass.d.ts.map +1 -1
  19. package/dist/hooks/useLocaleSelector.d.ts +23 -1
  20. package/dist/hooks/useLocaleSelector.d.ts.map +1 -1
  21. package/dist/index.cjs.min.cjs +3 -4
  22. package/dist/index.esm.min.mjs +3 -4
  23. package/dist/internal.cjs.min.cjs +2 -3
  24. package/dist/internal.esm.min.mjs +3 -4
  25. package/dist/provider/hooks/translation/useCreateInternalUseTranslationsFunction.d.ts.map +1 -1
  26. package/dist/provider/hooks/translation/useCreateInternalUseTranslationsObjFunction.d.ts.map +1 -1
  27. package/dist/types/types.d.ts +1 -1
  28. package/dist/types/types.d.ts.map +1 -1
  29. package/package.json +25 -20
  30. package/dist/client.cjs.min.cjs.map +0 -1
  31. package/dist/client.esm.min.mjs.map +0 -1
  32. package/dist/index.cjs.min.cjs.map +0 -1
  33. package/dist/index.esm.min.mjs.map +0 -1
  34. package/dist/internal.cjs.min.cjs.map +0 -1
  35. package/dist/internal.esm.min.mjs.map +0 -1
@@ -7,7 +7,7 @@ import { Dictionary } from '../types/types';
7
7
  * @returns An array of untranslated entries
8
8
  */
9
9
  export declare function collectUntranslatedEntries(dictionary: Dictionary, translationsDictionary: Dictionary, id?: string): {
10
- source: string | null;
10
+ source: string;
11
11
  metadata: {
12
12
  $id: string;
13
13
  $context?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"collectUntranslatedEntries.d.ts","sourceRoot":"","sources":["../../src/dictionaries/collectUntranslatedEntries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAK7D;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,UAAU,EAClC,EAAE,GAAE,MAAW,GACd;IACD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D,EAAE,CAmCF"}
1
+ {"version":3,"file":"collectUntranslatedEntries.d.ts","sourceRoot":"","sources":["../../src/dictionaries/collectUntranslatedEntries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAK5C;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,UAAU,EAClC,EAAE,GAAE,MAAW,GACd;IACD,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D,EAAE,CAgCF"}
@@ -1,6 +1,6 @@
1
1
  import { DictionaryEntry, MetaEntry } from '../types/types';
2
2
  export default function getEntryAndMetadata(value: DictionaryEntry): {
3
- entry: string | null;
3
+ entry: string;
4
4
  metadata?: MetaEntry;
5
5
  };
6
6
  //# sourceMappingURL=getEntryAndMetadata.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"getEntryAndMetadata.d.ts","sourceRoot":"","sources":["../../src/dictionaries/getEntryAndMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG;IACnE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAUA"}
1
+ {"version":3,"file":"getEntryAndMetadata.d.ts","sourceRoot":"","sources":["../../src/dictionaries/getEntryAndMetadata.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE5D,MAAM,CAAC,OAAO,UAAU,mBAAmB,CAAC,KAAK,EAAE,eAAe,GAAG;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB,CAUA"}
@@ -1,10 +1,4 @@
1
1
  import { Dictionary, DictionaryEntry } from '../types/types';
2
- /**
3
- * @description A function that gets a subtree from a dictionary
4
- * @param dictionary - dictionary to get the subtree from
5
- * @param id - id of the subtree to get
6
- * @returns
7
- */
8
2
  export declare function getSubtree<T extends Dictionary>({ dictionary, id, }: {
9
3
  dictionary: T;
10
4
  id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"getSubtree.d.ts","sourceRoot":"","sources":["../../src/dictionaries/getSubtree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAG7D;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,EAC/C,UAAU,EACV,EAAE,GACH,EAAE;IACD,UAAU,EAAE,CAAC,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,UAAU,GAAG,eAAe,GAAG,SAAS,CAW3C;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,UAAU,EAAE,EAC3D,UAAU,EACV,EAAE,EACF,gBAAgB,GACjB,EAAE;IACD,UAAU,EAAE,CAAC,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EAAE,CAAC,CAAC;CACrB,GAAG,UAAU,GAAG,eAAe,GAAG,SAAS,CAoB3C"}
1
+ {"version":3,"file":"getSubtree.d.ts","sourceRoot":"","sources":["../../src/dictionaries/getSubtree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAG7D,wBAAgB,UAAU,CAAC,CAAC,SAAS,UAAU,EAAE,EAC/C,UAAU,EACV,EAAE,GACH,EAAE;IACD,UAAU,EAAE,CAAC,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ,GAAG,UAAU,GAAG,eAAe,GAAG,SAAS,CAW3C;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,UAAU,EAAE,EAC3D,UAAU,EACV,EAAE,EACF,gBAAgB,GACjB,EAAE;IACD,UAAU,EAAE,CAAC,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,gBAAgB,EAAE,CAAC,CAAC;CACrB,GAAG,UAAU,GAAG,eAAe,GAAG,SAAS,CAoB3C"}
@@ -6,7 +6,7 @@ import { Dictionary, DictionaryEntry, TranslatedChildren } from '../types/types'
6
6
  * @param hash - The hash of the entry
7
7
  * @param sourceDictionary - The source dictionary to model the new dictionary after
8
8
  */
9
- export declare function injectEntry(dictionaryEntry: DictionaryEntry | null, dictionary: Dictionary | DictionaryEntry, id: string, sourceDictionary: Dictionary | DictionaryEntry): DictionaryEntry | undefined;
9
+ export declare function injectEntry(dictionaryEntry: DictionaryEntry, dictionary: Dictionary | DictionaryEntry, id: string, sourceDictionary: Dictionary | DictionaryEntry): DictionaryEntry | undefined;
10
10
  /**
11
11
  * @description Merge results into a dictionary
12
12
  * @param dictionary - The dictionary to merge the results into
@@ -1 +1 @@
1
- {"version":3,"file":"injectEntry.d.ts","sourceRoot":"","sources":["../../src/dictionaries/injectEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,eAAe,EACf,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAYxB;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,eAAe,EAAE,eAAe,GAAG,IAAI,EACvC,UAAU,EAAE,UAAU,GAAG,eAAe,EACxC,EAAE,EAAE,MAAM,EACV,gBAAgB,EAAE,UAAU,GAAG,eAAe,+BAiC/C;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAAE,EACvC,gBAAgB,EAAE,UAAU,GAC3B,UAAU,CAKZ"}
1
+ {"version":3,"file":"injectEntry.d.ts","sourceRoot":"","sources":["../../src/dictionaries/injectEntry.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,eAAe,EACf,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAYxB;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,eAAe,EAAE,eAAe,EAChC,UAAU,EAAE,UAAU,GAAG,eAAe,EACxC,EAAE,EAAE,MAAM,EACV,gBAAgB,EAAE,UAAU,GAAG,eAAe,+BAiC/C;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,CAAC,MAAM,EAAE,kBAAkB,CAAC,EAAE,EACvC,gBAAgB,EAAE,UAAU,GAC3B,UAAU,CAKZ"}
@@ -7,7 +7,7 @@ import { Dictionary } from '../types/types';
7
7
  * @param id - The id of the dictionary to inject translations into
8
8
  */
9
9
  export declare function injectFallbacks(dictionary: Dictionary, translationsDictionary: Dictionary, missingTranslations: {
10
- source: string | null;
10
+ source: string;
11
11
  metadata: {
12
12
  $id: string;
13
13
  $context?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"injectFallbacks.d.ts","sourceRoot":"","sources":["../../src/dictionaries/injectFallbacks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAM5C;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,UAAU,EAClC,mBAAmB,EAAE;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D,EAAE,EACH,cAAc,GAAE,MAAW,cAuB5B"}
1
+ {"version":3,"file":"injectFallbacks.d.ts","sourceRoot":"","sources":["../../src/dictionaries/injectFallbacks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAM5C;;;;;;GAMG;AACH,wBAAgB,eAAe,CAC7B,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,UAAU,EAClC,mBAAmB,EAAE;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D,EAAE,EACH,cAAc,GAAE,MAAW,cAuB5B"}
@@ -7,7 +7,7 @@ import { Dictionary, Translations } from '../types/types';
7
7
  * @param id - The id of the dictionary to inject translations into
8
8
  */
9
9
  export declare function injectTranslations(dictionary: Dictionary, translationsDictionary: Dictionary, translations: Translations, missingTranslations: {
10
- source: string | null;
10
+ source: string;
11
11
  metadata: {
12
12
  $id: string;
13
13
  $context?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"injectTranslations.d.ts","sourceRoot":"","sources":["../../src/dictionaries/injectTranslations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAM1D;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,UAAU,EAClC,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D,EAAE,EACH,cAAc,GAAE,MAAW,GAC1B;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,gBAAgB,EAAE,OAAO,CAAA;CAAE,CA8BvD"}
1
+ {"version":3,"file":"injectTranslations.d.ts","sourceRoot":"","sources":["../../src/dictionaries/injectTranslations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAM1D;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,UAAU,EACtB,sBAAsB,EAAE,UAAU,EAClC,YAAY,EAAE,YAAY,EAC1B,mBAAmB,EAAE;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CAC9D,EAAE,EACH,cAAc,GAAE,MAAW,GAC1B;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,gBAAgB,EAAE,OAAO,CAAA;CAAE,CA8BvD"}
@@ -1 +1 @@
1
- {"version":3,"file":"mergeDictionaries.d.ts","sourceRoot":"","sources":["../../src/dictionaries/mergeDictionaries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAI7D,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,uBAAuB,EAAE,UAAU,EACnC,gBAAgB,EAAE,UAAU,GAC3B,UAAU,CAiDZ"}
1
+ {"version":3,"file":"mergeDictionaries.d.ts","sourceRoot":"","sources":["../../src/dictionaries/mergeDictionaries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,gBAAgB,CAAC;AAU7D,MAAM,CAAC,OAAO,UAAU,iBAAiB,CACvC,uBAAuB,EAAE,UAAU,EACnC,gBAAgB,EAAE,UAAU,GAC3B,UAAU,CAiDZ"}
@@ -1,3 +1,4 @@
1
+ import { LocaleProperties } from 'generaltranslation/types';
1
2
  /**
2
3
  * Returns the configured GT class instance.
3
4
  *
@@ -18,5 +19,5 @@ export declare function useGTClass(): import("generaltranslation").GT;
18
19
  * const localeProperties = useLocaleProperties('en-US');
19
20
  * console.log(localeProperties);
20
21
  */
21
- export declare function useLocaleProperties(locale: string): import("generaltranslation/dist/locales/getLocaleProperties").LocaleProperties;
22
+ export declare function useLocaleProperties(locale: string): LocaleProperties;
22
23
  //# sourceMappingURL=useGTClass.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useGTClass.d.ts","sourceRoot":"","sources":["../../src/hooks/useGTClass.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,UAAU,oCAIzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,kFAGjD"}
1
+ {"version":3,"file":"useGTClass.d.ts","sourceRoot":"","sources":["../../src/hooks/useGTClass.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAG5D;;;;;;;;GAQG;AACH,wBAAgB,UAAU,oCAIzB;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAGpE"}
@@ -15,6 +15,28 @@ export default function useLocaleSelector(locales?: string[]): {
15
15
  locale: string;
16
16
  locales: string[];
17
17
  setLocale: (locale: string) => void;
18
- getLocaleProperties: (locale: string) => import("generaltranslation/dist/locales/getLocaleProperties").LocaleProperties;
18
+ getLocaleProperties: (locale: string) => {
19
+ code: string;
20
+ name: string;
21
+ nativeName: string;
22
+ languageCode: string;
23
+ languageName: string;
24
+ nativeLanguageName: string;
25
+ nameWithRegionCode: string;
26
+ nativeNameWithRegionCode: string;
27
+ regionCode: string;
28
+ regionName: string;
29
+ nativeRegionName: string;
30
+ scriptCode: string;
31
+ scriptName: string;
32
+ nativeScriptName: string;
33
+ maximizedCode: string;
34
+ maximizedName: string;
35
+ nativeMaximizedName: string;
36
+ minimizedCode: string;
37
+ minimizedName: string;
38
+ nativeMinimizedName: string;
39
+ emoji: string;
40
+ };
19
41
  };
20
42
  //# sourceMappingURL=useLocaleSelector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"useLocaleSelector.d.ts","sourceRoot":"","sources":["../../src/hooks/useLocaleSelector.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE;;;;kCAoB/C,MAAM;EAYlB"}
1
+ {"version":3,"file":"useLocaleSelector.d.ts","sourceRoot":"","sources":["../../src/hooks/useLocaleSelector.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,OAAO,UAAU,iBAAiB,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE;;;;kCAoB/C,MAAM;;;;;;;;;;;;;;;;;;;;;;;EAYlB"}