chrome-types 0.1.89 → 0.1.92

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 (3) hide show
  1. package/_all.d.ts +163 -19
  2. package/index.d.ts +43 -14
  3. 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 Fri Feb 18 2022 22:28:05 GMT+0000 (Coordinated Universal Time)
18
- // Built at d8e5cbade765a5019c53f0fd73a6cb010edf80e3
17
+ // Generated on Fri Mar 04 2022 22:28:25 GMT+0000 (Coordinated Universal Time)
18
+ // Built at c6cc7dcbef1fabbd413a688e661edfa570780914
19
19
 
20
20
  // Includes all types, including MV2 + Platform Apps APIs.
21
21
 
@@ -208,7 +208,7 @@ declare namespace chrome {
208
208
  }
209
209
 
210
210
  /**
211
- * @since Pending
211
+ * @since Chrome 99
212
212
  */
213
213
  export interface OpenPopupOptions {
214
214
 
@@ -602,8 +602,9 @@ declare namespace chrome {
602
602
  /**
603
603
  * Opens the extension's popup.
604
604
  *
605
+ * @chrome-returns-extra since Pending
605
606
  * @param options Specifies options for opening the popup.
606
- * @since Pending
607
+ * @since Chrome 99
607
608
  */
608
609
  export function openPopup(
609
610
 
@@ -614,7 +615,7 @@ declare namespace chrome {
614
615
  * Opens the extension's popup.
615
616
  *
616
617
  * @param options Specifies options for opening the popup.
617
- * @since Pending
618
+ * @since Chrome 99
618
619
  */
619
620
  export function openPopup(
620
621
 
@@ -7345,7 +7346,7 @@ declare namespace chrome {
7345
7346
  /**
7346
7347
  * Whether the script should inject into any frames where the URL belongs to a scheme that would never match a specified Match Pattern, including about:, data:, blob:, and filesystem: schemes. In these cases, in order to determine if the script should inject, the origin of the URL is checked. If the origin is `null` (as is the case for data: URLs), then the "initiator" or "creator" origin is used (i.e., the origin of the frame that created or navigated this frame). Note that this may not be the parent frame, if the frame was navigated by another frame in the document hierarchy.
7347
7348
  *
7348
- * @since Pending
7349
+ * @since Chrome 99
7349
7350
  */
7350
7351
  match_origin_as_fallback?: boolean;
7351
7352
 
@@ -12578,7 +12579,7 @@ declare namespace chrome {
12578
12579
 
12579
12580
  /**
12580
12581
  * @param response The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
12581
- * @since Pending
12582
+ * @since Chrome 99
12582
12583
  */
12583
12584
  callback?: (
12584
12585
  response: any,
@@ -12597,7 +12598,7 @@ declare namespace chrome {
12597
12598
 
12598
12599
  /**
12599
12600
  * @param response The JSON response object sent by the handler of the request. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
12600
- * @since Pending
12601
+ * @since Chrome 99
12601
12602
  */
12602
12603
  callback?: (
12603
12604
  response: any,
@@ -20792,6 +20793,17 @@ declare namespace chrome {
20792
20793
  tab: tabs.Tab,
20793
20794
  ) => void>;
20794
20795
 
20796
+ /**
20797
+ * Shows the page action. The page action is shown whenever the tab is selected.
20798
+ *
20799
+ * @chrome-returns-extra since Pending
20800
+ * @param tabId The id of the tab for which you want to modify the page action.
20801
+ */
20802
+ export function show(
20803
+
20804
+ tabId: number,
20805
+ ): Promise<void>;
20806
+
20795
20807
  /**
20796
20808
  * Shows the page action. The page action is shown whenever the tab is selected.
20797
20809
  *
@@ -20807,6 +20819,17 @@ declare namespace chrome {
20807
20819
  callback?: () => void,
20808
20820
  ): void;
20809
20821
 
20822
+ /**
20823
+ * Hides the page action. Hidden page actions still appear in the Chrome toolbar, but are grayed out.
20824
+ *
20825
+ * @chrome-returns-extra since Pending
20826
+ * @param tabId The id of the tab for which you want to modify the page action.
20827
+ */
20828
+ export function hide(
20829
+
20830
+ tabId: number,
20831
+ ): Promise<void>;
20832
+
20810
20833
  /**
20811
20834
  * Hides the page action. Hidden page actions still appear in the Chrome toolbar, but are grayed out.
20812
20835
  *
@@ -20822,6 +20845,27 @@ declare namespace chrome {
20822
20845
  callback?: () => void,
20823
20846
  ): void;
20824
20847
 
20848
+ /**
20849
+ * Sets the title of the page action. This is displayed in a tooltip over the page action.
20850
+ *
20851
+ * @chrome-returns-extra since Pending
20852
+ */
20853
+ export function setTitle(
20854
+
20855
+ details: {
20856
+
20857
+ /**
20858
+ * The id of the tab for which you want to modify the page action.
20859
+ */
20860
+ tabId: number,
20861
+
20862
+ /**
20863
+ * The tooltip string.
20864
+ */
20865
+ title: string,
20866
+ },
20867
+ ): Promise<void>;
20868
+
20825
20869
  /**
20826
20870
  * Sets the title of the page action. This is displayed in a tooltip over the page action.
20827
20871
  */
@@ -20848,16 +20892,57 @@ declare namespace chrome {
20848
20892
 
20849
20893
  /**
20850
20894
  * Gets the title of the page action.
20895
+ *
20896
+ * @chrome-returns-extra since Pending
20851
20897
  */
20852
20898
  export function getTitle(
20853
20899
 
20854
20900
  details: TabDetails,
20901
+ ): Promise<string>;
20855
20902
 
20856
- callback: (
20903
+ /**
20904
+ * Gets the title of the page action.
20905
+ */
20906
+ export function getTitle(
20907
+
20908
+ details: TabDetails,
20909
+
20910
+ callback?: (
20857
20911
  result: string,
20858
20912
  ) => void,
20859
20913
  ): void;
20860
20914
 
20915
+ /**
20916
+ * Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the **path** or the **imageData** property must be specified.
20917
+ *
20918
+ * @chrome-returns-extra since Pending
20919
+ */
20920
+ export function setIcon(
20921
+
20922
+ details: {
20923
+
20924
+ /**
20925
+ * The id of the tab for which you want to modify the page action.
20926
+ */
20927
+ tabId: number,
20928
+
20929
+ /**
20930
+ * Either an ImageData object or a dictionary {size -> ImageData} representing icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals `scale`, then image with size `scale` \* n will be selected, where n is the size of the icon in the UI. At least one image must be specified. Note that 'details.imageData = foo' is equivalent to 'details.imageData = {'16': foo}'
20931
+ */
20932
+ imageData?: ImageDataType | {[name: string]: any},
20933
+
20934
+ /**
20935
+ * Either a relative image path or a dictionary {size -> relative image path} pointing to icon to be set. If the icon is specified as a dictionary, the actual image to be used is chosen depending on screen's pixel density. If the number of image pixels that fit into one screen space unit equals `scale`, then image with size `scale` \* n will be selected, where n is the size of the icon in the UI. At least one image must be specified. Note that 'details.path = foo' is equivalent to 'details.path = {'16': foo}'
20936
+ */
20937
+ path?: string | {[name: string]: any},
20938
+
20939
+ /**
20940
+ * **Deprecated.** This argument is ignored.
20941
+ */
20942
+ iconIndex?: number,
20943
+ },
20944
+ ): Promise<void>;
20945
+
20861
20946
  /**
20862
20947
  * Sets the icon for the page action. The icon can be specified either as the path to an image file or as the pixel data from a canvas element, or as dictionary of either one of those. Either the **path** or the **imageData** property must be specified.
20863
20948
  */
@@ -20889,6 +20974,27 @@ declare namespace chrome {
20889
20974
  callback?: () => void,
20890
20975
  ): void;
20891
20976
 
20977
+ /**
20978
+ * Sets the HTML document to be opened as a popup when the user clicks on the page action's icon.
20979
+ *
20980
+ * @chrome-returns-extra since Pending
20981
+ */
20982
+ export function setPopup(
20983
+
20984
+ details: {
20985
+
20986
+ /**
20987
+ * The id of the tab for which you want to modify the page action.
20988
+ */
20989
+ tabId: number,
20990
+
20991
+ /**
20992
+ * The relative path to the HTML file to show in a popup. If set to the empty string (`''`), no popup is shown.
20993
+ */
20994
+ popup: string,
20995
+ },
20996
+ ): Promise<void>;
20997
+
20892
20998
  /**
20893
20999
  * Sets the HTML document to be opened as a popup when the user clicks on the page action's icon.
20894
21000
  */
@@ -20913,6 +21019,16 @@ declare namespace chrome {
20913
21019
  callback?: () => void,
20914
21020
  ): void;
20915
21021
 
21022
+ /**
21023
+ * Gets the html document set as the popup for this page action.
21024
+ *
21025
+ * @chrome-returns-extra since Pending
21026
+ */
21027
+ export function getPopup(
21028
+
21029
+ details: TabDetails,
21030
+ ): Promise<string>;
21031
+
20916
21032
  /**
20917
21033
  * Gets the html document set as the popup for this page action.
20918
21034
  */
@@ -20920,7 +21036,7 @@ declare namespace chrome {
20920
21036
 
20921
21037
  details: TabDetails,
20922
21038
 
20923
- callback: (
21039
+ callback?: (
20924
21040
  result: string,
20925
21041
  ) => void,
20926
21042
  ): void;
@@ -22878,7 +22994,7 @@ declare namespace chrome {
22878
22994
 
22879
22995
  /**
22880
22996
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
22881
- * @since Pending
22997
+ * @since Chrome 99
22882
22998
  */
22883
22999
  callback?: (
22884
23000
  response: any,
@@ -22904,7 +23020,7 @@ declare namespace chrome {
22904
23020
 
22905
23021
  /**
22906
23022
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
22907
- * @since Pending
23023
+ * @since Chrome 99
22908
23024
  */
22909
23025
  callback?: (
22910
23026
  response: any,
@@ -22941,7 +23057,7 @@ declare namespace chrome {
22941
23057
 
22942
23058
  /**
22943
23059
  * @param response The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
22944
- * @since Pending
23060
+ * @since Chrome 99
22945
23061
  */
22946
23062
  callback?: (
22947
23063
  response: any,
@@ -28260,7 +28376,7 @@ declare namespace chrome {
28260
28376
 
28261
28377
  /**
28262
28378
  * @param response The JSON response object sent by the handler of the request. If an error occurs while connecting to the specified tab, the callback is called with no arguments and {@link runtime.lastError} is set to the error message.
28263
- * @since Pending
28379
+ * @since Chrome 99
28264
28380
  */
28265
28381
  callback?: (
28266
28382
  response: any,
@@ -28309,7 +28425,7 @@ declare namespace chrome {
28309
28425
 
28310
28426
  /**
28311
28427
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback is called with no arguments and {@link runtime.lastError} is set to the error message.
28312
- * @since Pending
28428
+ * @since Chrome 99
28313
28429
  */
28314
28430
  callback?: (
28315
28431
  response: any,
@@ -29929,6 +30045,20 @@ declare namespace chrome {
29929
30045
  eventTypes?: EventType[];
29930
30046
  }
29931
30047
 
30048
+ /**
30049
+ * Speaks text using a text-to-speech engine.
30050
+ *
30051
+ * @chrome-returns-extra since Pending
30052
+ * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
30053
+ * @param options The speech options.
30054
+ */
30055
+ export function speak(
30056
+
30057
+ utterance: string,
30058
+
30059
+ options?: TtsOptions,
30060
+ ): Promise<void>;
30061
+
29932
30062
  /**
29933
30063
  * Speaks text using a text-to-speech engine.
29934
30064
  *
@@ -29960,6 +30090,13 @@ declare namespace chrome {
29960
30090
  */
29961
30091
  export function resume(): void;
29962
30092
 
30093
+ /**
30094
+ * Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome.
30095
+ *
30096
+ * @chrome-returns-extra since Pending
30097
+ */
30098
+ export function isSpeaking(): Promise<boolean>;
30099
+
29963
30100
  /**
29964
30101
  * Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome.
29965
30102
  */
@@ -29973,6 +30110,13 @@ declare namespace chrome {
29973
30110
  ) => void,
29974
30111
  ): void;
29975
30112
 
30113
+ /**
30114
+ * Gets an array of all available voices.
30115
+ *
30116
+ * @chrome-returns-extra since Pending
30117
+ */
30118
+ export function getVoices(): Promise<TtsVoice[]>;
30119
+
29976
30120
  /**
29977
30121
  * Gets an array of all available voices.
29978
30122
  */
@@ -32213,7 +32357,7 @@ declare namespace chrome {
32213
32357
  /**
32214
32358
  * The ID of the tab in which the frame is.
32215
32359
  */
32216
- tabId: number,
32360
+ tabId?: number,
32217
32361
 
32218
32362
  /**
32219
32363
  * The ID of the process that runs the renderer for this tab.
@@ -32226,7 +32370,7 @@ declare namespace chrome {
32226
32370
  /**
32227
32371
  * The ID of the frame in the given tab.
32228
32372
  */
32229
- frameId: number,
32373
+ frameId?: number,
32230
32374
  },
32231
32375
  ): Promise<{
32232
32376
 
@@ -32258,7 +32402,7 @@ declare namespace chrome {
32258
32402
  /**
32259
32403
  * The ID of the tab in which the frame is.
32260
32404
  */
32261
- tabId: number,
32405
+ tabId?: number,
32262
32406
 
32263
32407
  /**
32264
32408
  * The ID of the process that runs the renderer for this tab.
@@ -32271,7 +32415,7 @@ declare namespace chrome {
32271
32415
  /**
32272
32416
  * The ID of the frame in the given tab.
32273
32417
  */
32274
- frameId: number,
32418
+ frameId?: number,
32275
32419
  },
32276
32420
 
32277
32421
  /**
package/index.d.ts CHANGED
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
 
17
- // Generated on Fri Feb 18 2022 22:28:00 GMT+0000 (Coordinated Universal Time)
18
- // Built at d8e5cbade765a5019c53f0fd73a6cb010edf80e3
17
+ // Generated on Fri Mar 04 2022 22:28:21 GMT+0000 (Coordinated Universal Time)
18
+ // Built at c6cc7dcbef1fabbd413a688e661edfa570780914
19
19
 
20
20
  // Includes MV3+ APIs only.
21
21
 
@@ -266,7 +266,7 @@ declare namespace chrome {
266
266
  }
267
267
 
268
268
  /**
269
- * @since Pending
269
+ * @since Chrome 99
270
270
  */
271
271
  export interface OpenPopupOptions {
272
272
 
@@ -660,8 +660,9 @@ declare namespace chrome {
660
660
  /**
661
661
  * Opens the extension's popup.
662
662
  *
663
+ * @chrome-returns-extra since Pending
663
664
  * @param options Specifies options for opening the popup.
664
- * @since Pending
665
+ * @since Chrome 99
665
666
  */
666
667
  export function openPopup(
667
668
 
@@ -672,7 +673,7 @@ declare namespace chrome {
672
673
  * Opens the extension's popup.
673
674
  *
674
675
  * @param options Specifies options for opening the popup.
675
- * @since Pending
676
+ * @since Chrome 99
676
677
  */
677
678
  export function openPopup(
678
679
 
@@ -3907,7 +3908,7 @@ declare namespace chrome {
3907
3908
  /**
3908
3909
  * Whether the script should inject into any frames where the URL belongs to a scheme that would never match a specified Match Pattern, including about:, data:, blob:, and filesystem: schemes. In these cases, in order to determine if the script should inject, the origin of the URL is checked. If the origin is `null` (as is the case for data: URLs), then the "initiator" or "creator" origin is used (i.e., the origin of the frame that created or navigated this frame). Note that this may not be the parent frame, if the frame was navigated by another frame in the document hierarchy.
3909
3910
  *
3910
- * @since Pending
3911
+ * @since Chrome 99
3911
3912
  */
3912
3913
  match_origin_as_fallback?: boolean;
3913
3914
 
@@ -15755,7 +15756,7 @@ declare namespace chrome {
15755
15756
 
15756
15757
  /**
15757
15758
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
15758
- * @since Pending
15759
+ * @since Chrome 99
15759
15760
  */
15760
15761
  callback?: (
15761
15762
  response: any,
@@ -15781,7 +15782,7 @@ declare namespace chrome {
15781
15782
 
15782
15783
  /**
15783
15784
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the extension, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
15784
- * @since Pending
15785
+ * @since Chrome 99
15785
15786
  */
15786
15787
  callback?: (
15787
15788
  response: any,
@@ -15818,7 +15819,7 @@ declare namespace chrome {
15818
15819
 
15819
15820
  /**
15820
15821
  * @param response The response message sent by the native messaging host. If an error occurs while connecting to the native messaging host, the callback will be called with no arguments and {@link runtime.lastError} will be set to the error message.
15821
- * @since Pending
15822
+ * @since Chrome 99
15822
15823
  */
15823
15824
  callback?: (
15824
15825
  response: any,
@@ -18634,7 +18635,7 @@ declare namespace chrome {
18634
18635
 
18635
18636
  /**
18636
18637
  * @param response The JSON response object sent by the handler of the message. If an error occurs while connecting to the specified tab, the callback is called with no arguments and {@link runtime.lastError} is set to the error message.
18637
- * @since Pending
18638
+ * @since Chrome 99
18638
18639
  */
18639
18640
  callback?: (
18640
18641
  response: any,
@@ -19984,6 +19985,20 @@ declare namespace chrome {
19984
19985
  eventTypes?: EventType[];
19985
19986
  }
19986
19987
 
19988
+ /**
19989
+ * Speaks text using a text-to-speech engine.
19990
+ *
19991
+ * @chrome-returns-extra since Pending
19992
+ * @param utterance The text to speak, either plain text or a complete, well-formed SSML document. Speech engines that do not support SSML will strip away the tags and speak the text. The maximum length of the text is 32,768 characters.
19993
+ * @param options The speech options.
19994
+ */
19995
+ export function speak(
19996
+
19997
+ utterance: string,
19998
+
19999
+ options?: TtsOptions,
20000
+ ): Promise<void>;
20001
+
19987
20002
  /**
19988
20003
  * Speaks text using a text-to-speech engine.
19989
20004
  *
@@ -20015,6 +20030,13 @@ declare namespace chrome {
20015
20030
  */
20016
20031
  export function resume(): void;
20017
20032
 
20033
+ /**
20034
+ * Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome.
20035
+ *
20036
+ * @chrome-returns-extra since Pending
20037
+ */
20038
+ export function isSpeaking(): Promise<boolean>;
20039
+
20018
20040
  /**
20019
20041
  * Checks whether the engine is currently speaking. On Mac OS X, the result is true whenever the system speech engine is speaking, even if the speech wasn't initiated by Chrome.
20020
20042
  */
@@ -20028,6 +20050,13 @@ declare namespace chrome {
20028
20050
  ) => void,
20029
20051
  ): void;
20030
20052
 
20053
+ /**
20054
+ * Gets an array of all available voices.
20055
+ *
20056
+ * @chrome-returns-extra since Pending
20057
+ */
20058
+ export function getVoices(): Promise<TtsVoice[]>;
20059
+
20031
20060
  /**
20032
20061
  * Gets an array of all available voices.
20033
20062
  */
@@ -21494,7 +21523,7 @@ declare namespace chrome {
21494
21523
  /**
21495
21524
  * The ID of the tab in which the frame is.
21496
21525
  */
21497
- tabId: number,
21526
+ tabId?: number,
21498
21527
 
21499
21528
  /**
21500
21529
  * The ID of the process that runs the renderer for this tab.
@@ -21507,7 +21536,7 @@ declare namespace chrome {
21507
21536
  /**
21508
21537
  * The ID of the frame in the given tab.
21509
21538
  */
21510
- frameId: number,
21539
+ frameId?: number,
21511
21540
  },
21512
21541
  ): Promise<{
21513
21542
 
@@ -21539,7 +21568,7 @@ declare namespace chrome {
21539
21568
  /**
21540
21569
  * The ID of the tab in which the frame is.
21541
21570
  */
21542
- tabId: number,
21571
+ tabId?: number,
21543
21572
 
21544
21573
  /**
21545
21574
  * The ID of the process that runs the renderer for this tab.
@@ -21552,7 +21581,7 @@ declare namespace chrome {
21552
21581
  /**
21553
21582
  * The ID of the frame in the given tab.
21554
21583
  */
21555
- frameId: number,
21584
+ frameId?: number,
21556
21585
  },
21557
21586
 
21558
21587
  /**
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "module",
6
6
  "name": "chrome-types",
7
7
  "config": {
8
- "build-hash": "0b4f465463d2fbfc"
8
+ "build-hash": "79efa02505957528"
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.89"
19
+ "version": "0.1.92"
20
20
  }