@lingui/detect-locale 4.4.2 → 4.6.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.
@@ -0,0 +1,25 @@
1
+ declare function detectFromCookie(key: string): LocaleString;
2
+
3
+ declare function detectFromPath(localePathIndex: number, location?: Partial<Location>): LocaleString;
4
+
5
+ declare function detectFromStorage(key: string, options?: {
6
+ useSessionStorage: boolean;
7
+ }): LocaleString;
8
+
9
+ type IE11NavigatorLanguage = {
10
+ userLanguage?: string;
11
+ };
12
+ declare function detectFromNavigator(navigator?: Partial<Navigator & IE11NavigatorLanguage>): LocaleString;
13
+
14
+ declare function detectFromSubdomain(localeSubdomainIndex: number, location?: Partial<Location>): LocaleString;
15
+
16
+ declare function detectHtmlTag(htmlTagIdentifier: string, document?: Partial<Document>): LocaleString;
17
+
18
+ declare function detectFromUrl(parameter: string, location?: Partial<Location>): LocaleString;
19
+
20
+ type LocaleString = string;
21
+ type DetectParamsFunctions = string;
22
+ declare function detect(...args: any[]): LocaleString | null;
23
+ declare function multipleDetect(...args: any[]): LocaleString[];
24
+
25
+ export { type DetectParamsFunctions, type LocaleString, detect, detectFromCookie as fromCookie, detectHtmlTag as fromHtmlTag, detectFromNavigator as fromNavigator, detectFromPath as fromPath, detectFromStorage as fromStorage, detectFromSubdomain as fromSubdomain, detectFromUrl as fromUrl, multipleDetect };
@@ -0,0 +1,25 @@
1
+ declare function detectFromCookie(key: string): LocaleString;
2
+
3
+ declare function detectFromPath(localePathIndex: number, location?: Partial<Location>): LocaleString;
4
+
5
+ declare function detectFromStorage(key: string, options?: {
6
+ useSessionStorage: boolean;
7
+ }): LocaleString;
8
+
9
+ type IE11NavigatorLanguage = {
10
+ userLanguage?: string;
11
+ };
12
+ declare function detectFromNavigator(navigator?: Partial<Navigator & IE11NavigatorLanguage>): LocaleString;
13
+
14
+ declare function detectFromSubdomain(localeSubdomainIndex: number, location?: Partial<Location>): LocaleString;
15
+
16
+ declare function detectHtmlTag(htmlTagIdentifier: string, document?: Partial<Document>): LocaleString;
17
+
18
+ declare function detectFromUrl(parameter: string, location?: Partial<Location>): LocaleString;
19
+
20
+ type LocaleString = string;
21
+ type DetectParamsFunctions = string;
22
+ declare function detect(...args: any[]): LocaleString | null;
23
+ declare function multipleDetect(...args: any[]): LocaleString[];
24
+
25
+ export { type DetectParamsFunctions, type LocaleString, detect, detectFromCookie as fromCookie, detectHtmlTag as fromHtmlTag, detectFromNavigator as fromNavigator, detectFromPath as fromPath, detectFromStorage as fromStorage, detectFromSubdomain as fromSubdomain, detectFromUrl as fromUrl, multipleDetect };
package/dist/index.d.ts CHANGED
@@ -22,4 +22,4 @@ type DetectParamsFunctions = string;
22
22
  declare function detect(...args: any[]): LocaleString | null;
23
23
  declare function multipleDetect(...args: any[]): LocaleString[];
24
24
 
25
- export { DetectParamsFunctions, LocaleString, detect, detectFromCookie as fromCookie, detectHtmlTag as fromHtmlTag, detectFromNavigator as fromNavigator, detectFromPath as fromPath, detectFromStorage as fromStorage, detectFromSubdomain as fromSubdomain, detectFromUrl as fromUrl, multipleDetect };
25
+ export { type DetectParamsFunctions, type LocaleString, detect, detectFromCookie as fromCookie, detectHtmlTag as fromHtmlTag, detectFromNavigator as fromNavigator, detectFromPath as fromPath, detectFromStorage as fromStorage, detectFromSubdomain as fromSubdomain, detectFromUrl as fromUrl, multipleDetect };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lingui/detect-locale",
3
- "version": "4.4.2",
3
+ "version": "4.6.0",
4
4
  "sideEffects": false,
5
5
  "description": "@Lingui package to help you find the correct browser/server locale",
6
6
  "main": "./dist/index.cjs",
@@ -37,11 +37,11 @@
37
37
  "exports": {
38
38
  ".": {
39
39
  "require": {
40
- "types": "./dist/index.d.ts",
40
+ "types": "./dist/index.d.cts",
41
41
  "default": "./dist/index.cjs"
42
42
  },
43
43
  "import": {
44
- "types": "./dist/index.d.ts",
44
+ "types": "./dist/index.d.mts",
45
45
  "default": "./dist/index.mjs"
46
46
  }
47
47
  },
@@ -54,7 +54,7 @@
54
54
  ],
55
55
  "devDependencies": {
56
56
  "jsdom": "^16.4.0",
57
- "unbuild": "^1.1.2"
57
+ "unbuild": "2.0.0"
58
58
  },
59
- "gitHead": "316a004ec82721fcceb8f3c4a5aeb4a48d367927"
59
+ "gitHead": "2afa0efb2d0cd1d47adc76e1eec9f5e57e34ae18"
60
60
  }