@wxt-dev/browser 0.0.317 → 0.0.319
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 +4 -4
- package/src/gen/index.d.ts +70 -83
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wxt-dev/browser",
|
|
3
3
|
"description": "Provides a cross-browser API for using extension APIs and types based on @types/chrome",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.319",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.mjs",
|
|
7
7
|
"types": "src/index.d.ts",
|
|
@@ -19,12 +19,12 @@
|
|
|
19
19
|
"src"
|
|
20
20
|
],
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@types/chrome": "0.0.
|
|
22
|
+
"@types/chrome": "0.0.319",
|
|
23
23
|
"fs-extra": "^11.3.0",
|
|
24
24
|
"nano-spawn": "^0.2.0",
|
|
25
|
-
"tsx": "4.19.
|
|
25
|
+
"tsx": "4.19.4",
|
|
26
26
|
"typescript": "^5.8.3",
|
|
27
|
-
"vitest": "^3.1.
|
|
27
|
+
"vitest": "^3.1.2"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@types/filesystem": "*",
|
package/src/gen/index.d.ts
CHANGED
|
@@ -7480,7 +7480,7 @@ export namespace Browser {
|
|
|
7480
7480
|
*/
|
|
7481
7481
|
export namespace permissions {
|
|
7482
7482
|
export interface Permissions {
|
|
7483
|
-
/** The list of host permissions, including those specified in the `optional_permissions` or `permissions` keys in the manifest, and those associated with [Content Scripts](https://developer.
|
|
7483
|
+
/** The list of host permissions, including those specified in the `optional_permissions` or `permissions` keys in the manifest, and those associated with [Content Scripts](https://developer.chrome.com/docs/extensions/develop/concepts/content-scripts). */
|
|
7484
7484
|
origins?: string[];
|
|
7485
7485
|
/** List of named permissions (does not include hosts or origins). */
|
|
7486
7486
|
permissions?: Browser.runtime.ManifestPermissions[];
|
|
@@ -7883,6 +7883,13 @@ export namespace Browser {
|
|
|
7883
7883
|
export function cancelJob(jobId: string): Promise<void>;
|
|
7884
7884
|
export function cancelJob(jobId: string, callback: () => void): void;
|
|
7885
7885
|
|
|
7886
|
+
/**
|
|
7887
|
+
* Returns the status of the print job. This call will fail with a runtime error if the print job with the given `jobId` doesn't exist. `jobId`: The id of the print job to return the status of. This should be the same id received in a {@link SubmitJobResponse}.
|
|
7888
|
+
* @since Chrome 135
|
|
7889
|
+
*/
|
|
7890
|
+
export function getJobStatus(jobId: string): Promise<`${JobStatus}`>;
|
|
7891
|
+
export function getJobStatus(jobId: string, callback: (status: `${JobStatus}`) => void): void;
|
|
7892
|
+
|
|
7886
7893
|
/**
|
|
7887
7894
|
* Returns the status and capabilities of the printer in CDD format. This call will fail with a runtime error if no printers with given id are installed.
|
|
7888
7895
|
* Can return its result via Promise in Manifest V3 or later since Chrome 100.
|
|
@@ -7907,7 +7914,7 @@ export namespace Browser {
|
|
|
7907
7914
|
/**
|
|
7908
7915
|
* Event fired when the status of the job is changed. This is only fired for the jobs created by this extension.
|
|
7909
7916
|
*/
|
|
7910
|
-
export const onJobStatusChanged: Browser.events.Event<(jobId: string, status: JobStatus) => void>;
|
|
7917
|
+
export const onJobStatusChanged: Browser.events.Event<(jobId: string, status: `${JobStatus}`) => void>;
|
|
7911
7918
|
}
|
|
7912
7919
|
|
|
7913
7920
|
////////////////////
|
|
@@ -8498,7 +8505,7 @@ export namespace Browser {
|
|
|
8498
8505
|
}
|
|
8499
8506
|
|
|
8500
8507
|
export interface ConnectionOptions {
|
|
8501
|
-
/** Optional. Flag indicating whether or not the connection should be left open when the application is suspended (see Manage App Lifecycle: https://developer.
|
|
8508
|
+
/** Optional. Flag indicating whether or not the connection should be left open when the application is suspended (see Manage App Lifecycle: https://developer.chrome.com/apps/app_lifecycle).
|
|
8502
8509
|
* The default value is "false." When the application is loaded, any serial connections previously opened with persistent=true can be fetched with getConnections. */
|
|
8503
8510
|
persistent?: boolean | undefined;
|
|
8504
8511
|
/** Optional. An application-defined string to associate with the connection. */
|
|
@@ -8716,13 +8723,13 @@ export namespace Browser {
|
|
|
8716
8723
|
/** The ID of the extension/app. */
|
|
8717
8724
|
export var id: string;
|
|
8718
8725
|
|
|
8719
|
-
/** https://developer.
|
|
8726
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-PlatformOs */
|
|
8720
8727
|
export type PlatformOs = "mac" | "win" | "android" | "cros" | "linux" | "openbsd" | "fuchsia";
|
|
8721
|
-
/** https://developer.
|
|
8728
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-PlatformArch */
|
|
8722
8729
|
export type PlatformArch = "arm" | "arm64" | "x86-32" | "x86-64" | "mips" | "mips64";
|
|
8723
|
-
/** https://developer.
|
|
8730
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-PlatformNaclArch */
|
|
8724
8731
|
export type PlatformNaclArch = "arm" | "x86-32" | "x86-64" | "mips" | "mips64";
|
|
8725
|
-
/** https://developer.
|
|
8732
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-ContextType */
|
|
8726
8733
|
export enum ContextType {
|
|
8727
8734
|
TAB = "TAB",
|
|
8728
8735
|
POPUP = "POPUP",
|
|
@@ -8731,7 +8738,7 @@ export namespace Browser {
|
|
|
8731
8738
|
SIDE_PANEL = "SIDE_PANEL",
|
|
8732
8739
|
DEVELOPER_TOOLS = "DEVELOPER_TOOLS",
|
|
8733
8740
|
}
|
|
8734
|
-
/** https://developer.
|
|
8741
|
+
/** https://developer.chrome.com/docs/extensions/reference/api/runtime#type-OnInstalledReason */
|
|
8735
8742
|
export enum OnInstalledReason {
|
|
8736
8743
|
INSTALL = "install",
|
|
8737
8744
|
UPDATE = "update",
|
|
@@ -8958,7 +8965,7 @@ export namespace Browser {
|
|
|
8958
8965
|
default_popup?: string | undefined;
|
|
8959
8966
|
}
|
|
8960
8967
|
|
|
8961
|
-
/** Source: https://developer.
|
|
8968
|
+
/** Source: https://developer.chrome.com/docs/extensions/reference/permissions-list */
|
|
8962
8969
|
export type ManifestPermissions =
|
|
8963
8970
|
| "accessibilityFeatures.modify"
|
|
8964
8971
|
| "accessibilityFeatures.read"
|
|
@@ -9042,7 +9049,7 @@ export namespace Browser {
|
|
|
9042
9049
|
| "webRequestBlocking"
|
|
9043
9050
|
| "webRequestAuthProvider";
|
|
9044
9051
|
|
|
9045
|
-
/** Source : https://developer.
|
|
9052
|
+
/** Source : https://developer.chrome.com/docs/extensions/reference/api/permissions */
|
|
9046
9053
|
export type ManifestOptionalPermissions = Exclude<
|
|
9047
9054
|
ManifestPermissions,
|
|
9048
9055
|
| "debugger"
|
|
@@ -12228,131 +12235,111 @@ export namespace Browser {
|
|
|
12228
12235
|
*/
|
|
12229
12236
|
export namespace tabGroups {
|
|
12230
12237
|
/** An ID that represents the absence of a group. */
|
|
12231
|
-
export
|
|
12238
|
+
export const TAB_GROUP_ID_NONE: -1;
|
|
12232
12239
|
|
|
12233
|
-
|
|
12240
|
+
/** The group's color. */
|
|
12241
|
+
export enum Color {
|
|
12242
|
+
BLUE = "blue",
|
|
12243
|
+
CYAN = "cyan",
|
|
12244
|
+
GREEN = "green",
|
|
12245
|
+
GREY = "grey",
|
|
12246
|
+
ORANGE = "orange",
|
|
12247
|
+
PINK = "pink",
|
|
12248
|
+
PURPLE = "purple",
|
|
12249
|
+
RED = "red",
|
|
12250
|
+
YELLOW = "yellow",
|
|
12251
|
+
}
|
|
12234
12252
|
|
|
12235
12253
|
export interface TabGroup {
|
|
12236
12254
|
/** Whether the group is collapsed. A collapsed group is one whose tabs are hidden. */
|
|
12237
12255
|
collapsed: boolean;
|
|
12238
12256
|
/** The group's color. */
|
|
12239
|
-
color:
|
|
12257
|
+
color: `${Color}`;
|
|
12240
12258
|
/** The ID of the group. Group IDs are unique within a browser session. */
|
|
12241
12259
|
id: number;
|
|
12242
|
-
/**
|
|
12243
|
-
title?: string
|
|
12260
|
+
/** The title of the group. */
|
|
12261
|
+
title?: string;
|
|
12244
12262
|
/** The ID of the window that contains the group. */
|
|
12245
12263
|
windowId: number;
|
|
12246
12264
|
}
|
|
12247
12265
|
|
|
12248
12266
|
export interface MoveProperties {
|
|
12249
|
-
/** The position to move the group to. Use
|
|
12267
|
+
/** The position to move the group to. Use `-1` to place the group at the end of the window. */
|
|
12250
12268
|
index: number;
|
|
12251
|
-
/**
|
|
12252
|
-
windowId?: number
|
|
12269
|
+
/** The window to move the group to. Defaults to the window the group is currently in. Note that groups can only be moved to and from windows with {@link windows.windowTypeEnum windows.windowType} type `"normal"`. */
|
|
12270
|
+
windowId?: number;
|
|
12253
12271
|
}
|
|
12254
12272
|
|
|
12255
12273
|
export interface QueryInfo {
|
|
12256
|
-
/**
|
|
12257
|
-
collapsed?: boolean
|
|
12258
|
-
/**
|
|
12259
|
-
color?:
|
|
12260
|
-
/**
|
|
12261
|
-
title?: string
|
|
12262
|
-
/**
|
|
12263
|
-
windowId?: number
|
|
12274
|
+
/** Whether the groups are collapsed. */
|
|
12275
|
+
collapsed?: boolean;
|
|
12276
|
+
/** The color of the groups. */
|
|
12277
|
+
color?: `${Color}`;
|
|
12278
|
+
/** Match group titles against a pattern. */
|
|
12279
|
+
title?: string;
|
|
12280
|
+
/** The ID of the parent window, or {@link windows.WINDOW_ID_CURRENT} for the current window. */
|
|
12281
|
+
windowId?: number;
|
|
12264
12282
|
}
|
|
12265
12283
|
|
|
12266
12284
|
export interface UpdateProperties {
|
|
12267
|
-
/**
|
|
12268
|
-
collapsed?: boolean
|
|
12269
|
-
/**
|
|
12270
|
-
color?:
|
|
12271
|
-
/**
|
|
12272
|
-
title?: string
|
|
12285
|
+
/** Whether the group should be collapsed. */
|
|
12286
|
+
collapsed?: boolean;
|
|
12287
|
+
/** The color of the group. */
|
|
12288
|
+
color?: `${Color}`;
|
|
12289
|
+
/** The title of the group. */
|
|
12290
|
+
title?: string;
|
|
12273
12291
|
}
|
|
12274
12292
|
|
|
12275
12293
|
/**
|
|
12276
12294
|
* Retrieves details about the specified group.
|
|
12277
|
-
*
|
|
12278
|
-
*
|
|
12279
|
-
*/
|
|
12280
|
-
export function get(groupId: number, callback: (group: TabGroup) => void): void;
|
|
12281
|
-
|
|
12282
|
-
/**
|
|
12283
|
-
* Retrieves details about the specified group.
|
|
12284
|
-
* @param groupId The ID of the tab group.
|
|
12285
|
-
* @return The `get` method provides its result via callback or returned as a `Promise` (MV3 only).
|
|
12295
|
+
*
|
|
12296
|
+
* Can return its result via Promise since Chrome 90.
|
|
12286
12297
|
*/
|
|
12287
12298
|
export function get(groupId: number): Promise<TabGroup>;
|
|
12299
|
+
export function get(groupId: number, callback: (group: TabGroup) => void): void;
|
|
12288
12300
|
|
|
12289
12301
|
/**
|
|
12290
12302
|
* Moves the group and all its tabs within its window, or to a new window.
|
|
12291
12303
|
* @param groupId The ID of the group to move.
|
|
12292
|
-
*
|
|
12293
|
-
*
|
|
12294
|
-
*/
|
|
12295
|
-
export function move(groupId: number, moveProperties: MoveProperties): Promise<TabGroup>;
|
|
12296
|
-
|
|
12297
|
-
/**
|
|
12298
|
-
* Moves the group and all its tabs within its window, or to a new window.
|
|
12299
|
-
* @param groupId The ID of the group to move.
|
|
12300
|
-
* @param moveProperties Information on how to move the group.
|
|
12301
|
-
* @param callback Optional.
|
|
12304
|
+
*
|
|
12305
|
+
* Can return its result via Promise since Chrome 90.
|
|
12302
12306
|
*/
|
|
12307
|
+
export function move(groupId: number, moveProperties: MoveProperties): Promise<TabGroup | undefined>;
|
|
12303
12308
|
export function move(
|
|
12304
12309
|
groupId: number,
|
|
12305
12310
|
moveProperties: MoveProperties,
|
|
12306
|
-
callback: (group
|
|
12311
|
+
callback: (group?: TabGroup) => void,
|
|
12307
12312
|
): void;
|
|
12308
12313
|
|
|
12309
12314
|
/**
|
|
12310
12315
|
* Gets all groups that have the specified properties, or all groups if no properties are specified.
|
|
12311
|
-
*
|
|
12312
|
-
*
|
|
12313
|
-
*/
|
|
12314
|
-
export function query(queryInfo: QueryInfo, callback: (result: TabGroup[]) => void): void;
|
|
12315
|
-
|
|
12316
|
-
/**
|
|
12317
|
-
* Gets all groups that have the specified properties, or all groups if no properties are specified.
|
|
12318
|
-
* @param queryInfo Object with search parameters.
|
|
12319
|
-
* @return The `query` method provides its result via callback or returned as a `Promise` (MV3 only).
|
|
12316
|
+
*
|
|
12317
|
+
* Can return its result via Promise since Chrome 90.
|
|
12320
12318
|
*/
|
|
12321
12319
|
export function query(queryInfo: QueryInfo): Promise<TabGroup[]>;
|
|
12320
|
+
export function query(queryInfo: QueryInfo, callback: (result: TabGroup[]) => void): void;
|
|
12322
12321
|
|
|
12323
12322
|
/**
|
|
12324
|
-
* Modifies the properties of a group. Properties that are not specified in updateProperties are not modified.
|
|
12325
|
-
* @param groupId The ID of the group to modify.
|
|
12326
|
-
* @param updateProperties Information on how to update the group.
|
|
12327
|
-
* @return The `update` method provides its result via callback or returned as a `Promise` (MV3 only).
|
|
12328
|
-
*/
|
|
12329
|
-
export function update(groupId: number, updateProperties: UpdateProperties): Promise<TabGroup>;
|
|
12330
|
-
|
|
12331
|
-
/**
|
|
12332
|
-
* Modifies the properties of a group. Properties that are not specified in updateProperties are not modified.
|
|
12323
|
+
* Modifies the properties of a group. Properties that are not specified in `updateProperties` are not modified.
|
|
12333
12324
|
* @param groupId The ID of the group to modify.
|
|
12334
|
-
*
|
|
12335
|
-
*
|
|
12325
|
+
*
|
|
12326
|
+
* Can return its result via Promise since Chrome 90.
|
|
12336
12327
|
*/
|
|
12328
|
+
export function update(groupId: number, updateProperties: UpdateProperties): Promise<TabGroup | undefined>;
|
|
12337
12329
|
export function update(
|
|
12338
12330
|
groupId: number,
|
|
12339
12331
|
updateProperties: UpdateProperties,
|
|
12340
|
-
callback: (group
|
|
12332
|
+
callback: (group?: TabGroup) => void,
|
|
12341
12333
|
): void;
|
|
12342
12334
|
|
|
12343
|
-
export interface TabGroupCreatedEvent extends Browser.events.Event<(group: TabGroup) => void> {}
|
|
12344
|
-
export interface TabGroupMovedEvent extends Browser.events.Event<(group: TabGroup) => void> {}
|
|
12345
|
-
export interface TabGroupRemovedEvent extends Browser.events.Event<(group: TabGroup) => void> {}
|
|
12346
|
-
export interface TabGroupUpdated extends Browser.events.Event<(group: TabGroup) => void> {}
|
|
12347
|
-
|
|
12348
12335
|
/** Fired when a group is created. */
|
|
12349
|
-
export
|
|
12336
|
+
export const onCreated: events.Event<(group: TabGroup) => void>;
|
|
12350
12337
|
/** Fired when a group is moved within a window. Move events are still fired for the individual tabs within the group, as well as for the group itself. This event is not fired when a group is moved between windows; instead, it will be removed from one window and created in another. */
|
|
12351
|
-
export
|
|
12352
|
-
/** Fired when a group is closed, either directly by the user or automatically because it contained zero. */
|
|
12353
|
-
export
|
|
12338
|
+
export const onMoved: events.Event<(group: TabGroup) => void>;
|
|
12339
|
+
/** Fired when a group is closed, either directly by the user or automatically because it contained zero tabs. */
|
|
12340
|
+
export const onRemoved: events.Event<(group: TabGroup) => void>;
|
|
12354
12341
|
/** Fired when a group is updated. */
|
|
12355
|
-
export
|
|
12342
|
+
export const onUpdated: events.Event<(group: TabGroup) => void>;
|
|
12356
12343
|
}
|
|
12357
12344
|
|
|
12358
12345
|
////////////////////
|