@wxt-dev/browser 0.0.317 → 0.0.318
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 +3 -3
- package/src/gen/index.d.ts +53 -73
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.318",
|
|
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.318",
|
|
23
23
|
"fs-extra": "^11.3.0",
|
|
24
24
|
"nano-spawn": "^0.2.0",
|
|
25
25
|
"tsx": "4.19.3",
|
|
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
|
@@ -12228,131 +12228,111 @@ export namespace Browser {
|
|
|
12228
12228
|
*/
|
|
12229
12229
|
export namespace tabGroups {
|
|
12230
12230
|
/** An ID that represents the absence of a group. */
|
|
12231
|
-
export
|
|
12231
|
+
export const TAB_GROUP_ID_NONE: -1;
|
|
12232
12232
|
|
|
12233
|
-
|
|
12233
|
+
/** The group's color. */
|
|
12234
|
+
export enum Color {
|
|
12235
|
+
BLUE = "blue",
|
|
12236
|
+
CYAN = "cyan",
|
|
12237
|
+
GREEN = "green",
|
|
12238
|
+
GREY = "grey",
|
|
12239
|
+
ORANGE = "orange",
|
|
12240
|
+
PINK = "pink",
|
|
12241
|
+
PURPLE = "purple",
|
|
12242
|
+
RED = "red",
|
|
12243
|
+
YELLOW = "yellow",
|
|
12244
|
+
}
|
|
12234
12245
|
|
|
12235
12246
|
export interface TabGroup {
|
|
12236
12247
|
/** Whether the group is collapsed. A collapsed group is one whose tabs are hidden. */
|
|
12237
12248
|
collapsed: boolean;
|
|
12238
12249
|
/** The group's color. */
|
|
12239
|
-
color:
|
|
12250
|
+
color: `${Color}`;
|
|
12240
12251
|
/** The ID of the group. Group IDs are unique within a browser session. */
|
|
12241
12252
|
id: number;
|
|
12242
|
-
/**
|
|
12243
|
-
title?: string
|
|
12253
|
+
/** The title of the group. */
|
|
12254
|
+
title?: string;
|
|
12244
12255
|
/** The ID of the window that contains the group. */
|
|
12245
12256
|
windowId: number;
|
|
12246
12257
|
}
|
|
12247
12258
|
|
|
12248
12259
|
export interface MoveProperties {
|
|
12249
|
-
/** The position to move the group to. Use
|
|
12260
|
+
/** The position to move the group to. Use `-1` to place the group at the end of the window. */
|
|
12250
12261
|
index: number;
|
|
12251
|
-
/**
|
|
12252
|
-
windowId?: number
|
|
12262
|
+
/** 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"`. */
|
|
12263
|
+
windowId?: number;
|
|
12253
12264
|
}
|
|
12254
12265
|
|
|
12255
12266
|
export interface QueryInfo {
|
|
12256
|
-
/**
|
|
12257
|
-
collapsed?: boolean
|
|
12258
|
-
/**
|
|
12259
|
-
color?:
|
|
12260
|
-
/**
|
|
12261
|
-
title?: string
|
|
12262
|
-
/**
|
|
12263
|
-
windowId?: number
|
|
12267
|
+
/** Whether the groups are collapsed. */
|
|
12268
|
+
collapsed?: boolean;
|
|
12269
|
+
/** The color of the groups. */
|
|
12270
|
+
color?: `${Color}`;
|
|
12271
|
+
/** Match group titles against a pattern. */
|
|
12272
|
+
title?: string;
|
|
12273
|
+
/** The ID of the parent window, or {@link windows.WINDOW_ID_CURRENT} for the current window. */
|
|
12274
|
+
windowId?: number;
|
|
12264
12275
|
}
|
|
12265
12276
|
|
|
12266
12277
|
export interface UpdateProperties {
|
|
12267
|
-
/**
|
|
12268
|
-
collapsed?: boolean
|
|
12269
|
-
/**
|
|
12270
|
-
color?:
|
|
12271
|
-
/**
|
|
12272
|
-
title?: string
|
|
12278
|
+
/** Whether the group should be collapsed. */
|
|
12279
|
+
collapsed?: boolean;
|
|
12280
|
+
/** The color of the group. */
|
|
12281
|
+
color?: `${Color}`;
|
|
12282
|
+
/** The title of the group. */
|
|
12283
|
+
title?: string;
|
|
12273
12284
|
}
|
|
12274
12285
|
|
|
12275
12286
|
/**
|
|
12276
12287
|
* 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).
|
|
12288
|
+
*
|
|
12289
|
+
* Can return its result via Promise since Chrome 90.
|
|
12286
12290
|
*/
|
|
12287
12291
|
export function get(groupId: number): Promise<TabGroup>;
|
|
12292
|
+
export function get(groupId: number, callback: (group: TabGroup) => void): void;
|
|
12288
12293
|
|
|
12289
12294
|
/**
|
|
12290
12295
|
* Moves the group and all its tabs within its window, or to a new window.
|
|
12291
12296
|
* @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.
|
|
12297
|
+
*
|
|
12298
|
+
* Can return its result via Promise since Chrome 90.
|
|
12302
12299
|
*/
|
|
12300
|
+
export function move(groupId: number, moveProperties: MoveProperties): Promise<TabGroup | undefined>;
|
|
12303
12301
|
export function move(
|
|
12304
12302
|
groupId: number,
|
|
12305
12303
|
moveProperties: MoveProperties,
|
|
12306
|
-
callback: (group
|
|
12304
|
+
callback: (group?: TabGroup) => void,
|
|
12307
12305
|
): void;
|
|
12308
12306
|
|
|
12309
12307
|
/**
|
|
12310
12308
|
* 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).
|
|
12309
|
+
*
|
|
12310
|
+
* Can return its result via Promise since Chrome 90.
|
|
12320
12311
|
*/
|
|
12321
12312
|
export function query(queryInfo: QueryInfo): Promise<TabGroup[]>;
|
|
12313
|
+
export function query(queryInfo: QueryInfo, callback: (result: TabGroup[]) => void): void;
|
|
12322
12314
|
|
|
12323
12315
|
/**
|
|
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.
|
|
12316
|
+
* Modifies the properties of a group. Properties that are not specified in `updateProperties` are not modified.
|
|
12333
12317
|
* @param groupId The ID of the group to modify.
|
|
12334
|
-
*
|
|
12335
|
-
*
|
|
12318
|
+
*
|
|
12319
|
+
* Can return its result via Promise since Chrome 90.
|
|
12336
12320
|
*/
|
|
12321
|
+
export function update(groupId: number, updateProperties: UpdateProperties): Promise<TabGroup | undefined>;
|
|
12337
12322
|
export function update(
|
|
12338
12323
|
groupId: number,
|
|
12339
12324
|
updateProperties: UpdateProperties,
|
|
12340
|
-
callback: (group
|
|
12325
|
+
callback: (group?: TabGroup) => void,
|
|
12341
12326
|
): void;
|
|
12342
12327
|
|
|
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
12328
|
/** Fired when a group is created. */
|
|
12349
|
-
export
|
|
12329
|
+
export const onCreated: events.Event<(group: TabGroup) => void>;
|
|
12350
12330
|
/** 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
|
|
12331
|
+
export const onMoved: events.Event<(group: TabGroup) => void>;
|
|
12332
|
+
/** Fired when a group is closed, either directly by the user or automatically because it contained zero tabs. */
|
|
12333
|
+
export const onRemoved: events.Event<(group: TabGroup) => void>;
|
|
12354
12334
|
/** Fired when a group is updated. */
|
|
12355
|
-
export
|
|
12335
|
+
export const onUpdated: events.Event<(group: TabGroup) => void>;
|
|
12356
12336
|
}
|
|
12357
12337
|
|
|
12358
12338
|
////////////////////
|