chrome-types 0.1.78 → 0.1.79
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/_all.d.ts +45 -6
- package/index.d.ts +45 -6
- package/package.json +2 -2
package/_all.d.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
// Generated on
|
|
18
|
-
// Built at
|
|
17
|
+
// Generated on Tue Jan 04 2022 22:28:38 GMT+0000 (Coordinated Universal Time)
|
|
18
|
+
// Built at 2dfa847365e245edbfd5cab95bc74942ca235621
|
|
19
19
|
|
|
20
20
|
// Includes all types, including MV2 + Platform Apps APIs.
|
|
21
21
|
|
|
@@ -8755,6 +8755,7 @@ declare namespace chrome {
|
|
|
8755
8755
|
* Declarative event action that shows the extension's {@link pageAction page action} while the corresponding conditions are met. This action can be used without [host permissions](https://developer.chrome.com/docs/extensions/declare_permissions#host-permissions), but the extension must have a page action. If the extension has the [activeTab](https://developer.chrome.com/docs/extensions/activeTab) permission, clicking the page action grants access to the active tab.
|
|
8756
8756
|
*
|
|
8757
8757
|
* @deprecated Please use {@link declarativeContent.ShowAction}.
|
|
8758
|
+
* @chrome-deprecated-since Chrome 97
|
|
8758
8759
|
*/
|
|
8759
8760
|
export class ShowPageAction {
|
|
8760
8761
|
constructor(arg: ShowPageAction);
|
|
@@ -8763,7 +8764,7 @@ declare namespace chrome {
|
|
|
8763
8764
|
/**
|
|
8764
8765
|
* Declarative event action that shows the extension's toolbar action ({@link pageAction page action} or {@link browserAction browser action}) while the corresponding conditions are met. This action can be used without [host permissions](https://developer.chrome.com/docs/extensions/declare_permissions#host-permissions). If the extension has the [activeTab](https://developer.chrome.com/docs/extensions/activeTab) permission, clicking the page action grants access to the active tab.
|
|
8765
8766
|
*
|
|
8766
|
-
* @since
|
|
8767
|
+
* @since Chrome 97
|
|
8767
8768
|
*/
|
|
8768
8769
|
export class ShowAction {
|
|
8769
8770
|
constructor(arg: ShowAction);
|
|
@@ -12047,7 +12048,7 @@ declare namespace chrome {
|
|
|
12047
12048
|
*
|
|
12048
12049
|
* Keys generated on a specific `Token` cannot be used with any other Tokens, nor can they be used with `window.crypto.subtle`. Equally, `Key` objects created with `window.crypto.subtle` cannot be used with this interface.
|
|
12049
12050
|
*
|
|
12050
|
-
* @since
|
|
12051
|
+
* @since Chrome 97
|
|
12051
12052
|
*/
|
|
12052
12053
|
softwareBackedSubtleCrypto: SubtleCrypto;
|
|
12053
12054
|
}
|
|
@@ -15846,6 +15847,13 @@ declare namespace chrome {
|
|
|
15846
15847
|
*/
|
|
15847
15848
|
export type LanguageCode = string;
|
|
15848
15849
|
|
|
15850
|
+
/**
|
|
15851
|
+
* Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use {@link i18n.getUILanguage}.
|
|
15852
|
+
*
|
|
15853
|
+
* @chrome-returns-extra since Pending
|
|
15854
|
+
*/
|
|
15855
|
+
export function getAcceptLanguages(): Promise<LanguageCode[]>;
|
|
15856
|
+
|
|
15849
15857
|
/**
|
|
15850
15858
|
* Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use {@link i18n.getUILanguage}.
|
|
15851
15859
|
*/
|
|
@@ -15854,7 +15862,7 @@ declare namespace chrome {
|
|
|
15854
15862
|
/**
|
|
15855
15863
|
* @param languages Array of LanguageCode
|
|
15856
15864
|
*/
|
|
15857
|
-
callback
|
|
15865
|
+
callback?: (
|
|
15858
15866
|
languages: LanguageCode[],
|
|
15859
15867
|
) => void,
|
|
15860
15868
|
): void;
|
|
@@ -15892,6 +15900,37 @@ declare namespace chrome {
|
|
|
15892
15900
|
*/
|
|
15893
15901
|
export function getUILanguage(): string;
|
|
15894
15902
|
|
|
15903
|
+
/**
|
|
15904
|
+
* Detects the language of the provided text using CLD.
|
|
15905
|
+
*
|
|
15906
|
+
* @chrome-returns-extra since Pending
|
|
15907
|
+
* @param text User input string to be translated.
|
|
15908
|
+
* @since Chrome 47
|
|
15909
|
+
*/
|
|
15910
|
+
export function detectLanguage(
|
|
15911
|
+
|
|
15912
|
+
text: string,
|
|
15913
|
+
): Promise<{
|
|
15914
|
+
|
|
15915
|
+
/**
|
|
15916
|
+
* CLD detected language reliability
|
|
15917
|
+
*/
|
|
15918
|
+
isReliable: boolean,
|
|
15919
|
+
|
|
15920
|
+
/**
|
|
15921
|
+
* array of detectedLanguage
|
|
15922
|
+
*/
|
|
15923
|
+
languages: {
|
|
15924
|
+
|
|
15925
|
+
language: LanguageCode,
|
|
15926
|
+
|
|
15927
|
+
/**
|
|
15928
|
+
* The percentage of the detected language
|
|
15929
|
+
*/
|
|
15930
|
+
percentage: number,
|
|
15931
|
+
}[],
|
|
15932
|
+
}>;
|
|
15933
|
+
|
|
15895
15934
|
/**
|
|
15896
15935
|
* Detects the language of the provided text using CLD.
|
|
15897
15936
|
*
|
|
@@ -15905,7 +15944,7 @@ declare namespace chrome {
|
|
|
15905
15944
|
/**
|
|
15906
15945
|
* @param result LanguageDetectionResult object that holds detected langugae reliability and array of DetectedLanguage
|
|
15907
15946
|
*/
|
|
15908
|
-
callback
|
|
15947
|
+
callback?: (
|
|
15909
15948
|
result: {
|
|
15910
15949
|
|
|
15911
15950
|
/**
|
package/index.d.ts
CHANGED
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
// Generated on
|
|
18
|
-
// Built at
|
|
17
|
+
// Generated on Tue Jan 04 2022 22:28:32 GMT+0000 (Coordinated Universal Time)
|
|
18
|
+
// Built at 2dfa847365e245edbfd5cab95bc74942ca235621
|
|
19
19
|
|
|
20
20
|
// Includes MV3+ APIs only.
|
|
21
21
|
|
|
@@ -5322,6 +5322,7 @@ declare namespace chrome {
|
|
|
5322
5322
|
* Declarative event action that shows the extension's {@link pageAction page action} while the corresponding conditions are met. This action can be used without [host permissions](https://developer.chrome.com/docs/extensions/declare_permissions#host-permissions), but the extension must have a page action. If the extension has the [activeTab](https://developer.chrome.com/docs/extensions/activeTab) permission, clicking the page action grants access to the active tab.
|
|
5323
5323
|
*
|
|
5324
5324
|
* @deprecated Please use {@link declarativeContent.ShowAction}.
|
|
5325
|
+
* @chrome-deprecated-since Chrome 97
|
|
5325
5326
|
*/
|
|
5326
5327
|
export class ShowPageAction {
|
|
5327
5328
|
constructor(arg: ShowPageAction);
|
|
@@ -5330,7 +5331,7 @@ declare namespace chrome {
|
|
|
5330
5331
|
/**
|
|
5331
5332
|
* Declarative event action that shows the extension's toolbar action ({@link pageAction page action} or {@link browserAction browser action}) while the corresponding conditions are met. This action can be used without [host permissions](https://developer.chrome.com/docs/extensions/declare_permissions#host-permissions). If the extension has the [activeTab](https://developer.chrome.com/docs/extensions/activeTab) permission, clicking the page action grants access to the active tab.
|
|
5332
5333
|
*
|
|
5333
|
-
* @since
|
|
5334
|
+
* @since Chrome 97
|
|
5334
5335
|
*/
|
|
5335
5336
|
export class ShowAction {
|
|
5336
5337
|
constructor(arg: ShowAction);
|
|
@@ -8018,7 +8019,7 @@ declare namespace chrome {
|
|
|
8018
8019
|
*
|
|
8019
8020
|
* Keys generated on a specific `Token` cannot be used with any other Tokens, nor can they be used with `window.crypto.subtle`. Equally, `Key` objects created with `window.crypto.subtle` cannot be used with this interface.
|
|
8020
8021
|
*
|
|
8021
|
-
* @since
|
|
8022
|
+
* @since Chrome 97
|
|
8022
8023
|
*/
|
|
8023
8024
|
softwareBackedSubtleCrypto: SubtleCrypto;
|
|
8024
8025
|
}
|
|
@@ -11147,6 +11148,13 @@ declare namespace chrome {
|
|
|
11147
11148
|
*/
|
|
11148
11149
|
export type LanguageCode = string;
|
|
11149
11150
|
|
|
11151
|
+
/**
|
|
11152
|
+
* Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use {@link i18n.getUILanguage}.
|
|
11153
|
+
*
|
|
11154
|
+
* @chrome-returns-extra since Pending
|
|
11155
|
+
*/
|
|
11156
|
+
export function getAcceptLanguages(): Promise<LanguageCode[]>;
|
|
11157
|
+
|
|
11150
11158
|
/**
|
|
11151
11159
|
* Gets the accept-languages of the browser. This is different from the locale used by the browser; to get the locale, use {@link i18n.getUILanguage}.
|
|
11152
11160
|
*/
|
|
@@ -11155,7 +11163,7 @@ declare namespace chrome {
|
|
|
11155
11163
|
/**
|
|
11156
11164
|
* @param languages Array of LanguageCode
|
|
11157
11165
|
*/
|
|
11158
|
-
callback
|
|
11166
|
+
callback?: (
|
|
11159
11167
|
languages: LanguageCode[],
|
|
11160
11168
|
) => void,
|
|
11161
11169
|
): void;
|
|
@@ -11193,6 +11201,37 @@ declare namespace chrome {
|
|
|
11193
11201
|
*/
|
|
11194
11202
|
export function getUILanguage(): string;
|
|
11195
11203
|
|
|
11204
|
+
/**
|
|
11205
|
+
* Detects the language of the provided text using CLD.
|
|
11206
|
+
*
|
|
11207
|
+
* @chrome-returns-extra since Pending
|
|
11208
|
+
* @param text User input string to be translated.
|
|
11209
|
+
* @since Chrome 47
|
|
11210
|
+
*/
|
|
11211
|
+
export function detectLanguage(
|
|
11212
|
+
|
|
11213
|
+
text: string,
|
|
11214
|
+
): Promise<{
|
|
11215
|
+
|
|
11216
|
+
/**
|
|
11217
|
+
* CLD detected language reliability
|
|
11218
|
+
*/
|
|
11219
|
+
isReliable: boolean,
|
|
11220
|
+
|
|
11221
|
+
/**
|
|
11222
|
+
* array of detectedLanguage
|
|
11223
|
+
*/
|
|
11224
|
+
languages: {
|
|
11225
|
+
|
|
11226
|
+
language: LanguageCode,
|
|
11227
|
+
|
|
11228
|
+
/**
|
|
11229
|
+
* The percentage of the detected language
|
|
11230
|
+
*/
|
|
11231
|
+
percentage: number,
|
|
11232
|
+
}[],
|
|
11233
|
+
}>;
|
|
11234
|
+
|
|
11196
11235
|
/**
|
|
11197
11236
|
* Detects the language of the provided text using CLD.
|
|
11198
11237
|
*
|
|
@@ -11206,7 +11245,7 @@ declare namespace chrome {
|
|
|
11206
11245
|
/**
|
|
11207
11246
|
* @param result LanguageDetectionResult object that holds detected langugae reliability and array of DetectedLanguage
|
|
11208
11247
|
*/
|
|
11209
|
-
callback
|
|
11248
|
+
callback?: (
|
|
11210
11249
|
result: {
|
|
11211
11250
|
|
|
11212
11251
|
/**
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"type": "module",
|
|
6
6
|
"name": "chrome-types",
|
|
7
7
|
"config": {
|
|
8
|
-
"build-hash": "
|
|
8
|
+
"build-hash": "3d95cbd5c2ad6de2"
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -16,5 +16,5 @@
|
|
|
16
16
|
"url": "https://github.com/GoogleChrome/chrome-types/issues"
|
|
17
17
|
},
|
|
18
18
|
"homepage": "https://github.com/GoogleChrome/chrome-types",
|
|
19
|
-
"version": "0.1.
|
|
19
|
+
"version": "0.1.79"
|
|
20
20
|
}
|