Skip to content

shared/ipc/overlay-contracts

OverlayContent = NonNullable<v.InferOutput<typeof OverlayContent>>

Defined in: app/src/shared/ipc/overlay-contracts.ts:98

The content of an open overlay.

const AnswerPermission: RequestContract<{ allow: boolean; id: number; }, null>

Defined in: app/src/shared/ipc/overlay-contracts.ts:156

Answers the question of a site for permissions; the answer is kept for the site.


const CloseOverlay: RequestContract<{ }, null>

Defined in: app/src/shared/ipc/overlay-contracts.ts:121

Closes the overlay, for example after a click next to the popover.


const DownloadAction: RequestContract<{ action: "cancel" | "folder" | "open" | "pause" | "resume" | "retry" | "remove"; id: number; }, null>

Defined in: app/src/shared/ipc/overlay-contracts.ts:175

Pauses, resumes, cancels, opens, shows, retries or removes a download of the list.


const GetOverlay: RequestContract<{ }, { anchor: { height: number; width: number; x: number; y: number; }; available: boolean; blocked: number; failed: boolean; kind: "shield"; on: boolean; site: string; } | { host: string; kind: "login"; proxy: boolean; realm: string; secure: boolean; } | { id: number; kind: "permission"; permissions: ("camera" | "microphone" | "location" | "notifications" | "clipboard")[]; site: string; } | { kind: "screen"; site: string; sources: object[]; } | { anchor: { height: number; width: number; x: number; y: number; }; items: object[]; kind: "downloads"; } | null>

Defined in: app/src/shared/ipc/overlay-contracts.ts:106

Asks for what the overlay shows; the page asks once it has loaded.


const OpenBlockerSettings: RequestContract<{ }, null>

Defined in: app/src/shared/ipc/overlay-contracts.ts:137

Opens the settings of the content blocker and closes the overlay.


const OpenDownloadsFolder: RequestContract<{ }, null>

Defined in: app/src/shared/ipc/overlay-contracts.ts:186

Opens the folder that downloads go to.


const OverlayChanged: EventContract<{ anchor: { height: number; width: number; x: number; y: number; }; available: boolean; blocked: number; failed: boolean; kind: "shield"; on: boolean; site: string; } | { host: string; kind: "login"; proxy: boolean; realm: string; secure: boolean; } | { id: number; kind: "permission"; permissions: ("camera" | "microphone" | "location" | "notifications" | "clipboard")[]; site: string; } | { kind: "screen"; site: string; sources: object[]; } | { anchor: { height: number; width: number; x: number; y: number; }; items: object[]; kind: "downloads"; } | null>

Defined in: app/src/shared/ipc/overlay-contracts.ts:114

Tells the overlay page what to show from now on.


const OverlayContent: NullableSchema<UnionSchema<[StrictObjectSchema<{ anchor: StrictObjectSchema<{ height: SchemaWithPipe<readonly [NumberSchema<undefined>, IntegerAction<number, undefined>, MinValueAction<number, 0, undefined>, MaxValueAction<number, 20000, undefined>]>; width: SchemaWithPipe<readonly [NumberSchema<undefined>, IntegerAction<number, undefined>, MinValueAction<number, 0, undefined>, MaxValueAction<number, 20000, undefined>]>; x: SchemaWithPipe<readonly [NumberSchema<undefined>, IntegerAction<number, undefined>, MinValueAction<number, 0, undefined>, MaxValueAction<number, 20000, undefined>]>; y: SchemaWithPipe<readonly [NumberSchema<undefined>, IntegerAction<number, undefined>, MinValueAction<number, 0, undefined>, MaxValueAction<number, 20000, undefined>]>; }, undefined>; available: BooleanSchema<undefined>; blocked: SchemaWithPipe<readonly [NumberSchema<undefined>, IntegerAction<number, undefined>, MinValueAction<number, 0, undefined>]>; failed: BooleanSchema<undefined>; kind: LiteralSchema<"shield", undefined>; on: BooleanSchema<undefined>; site: SchemaWithPipe<readonly [StringSchema<undefined>, MaxLengthAction<string, 253, undefined>]>; }, undefined>, StrictObjectSchema<{ host: SchemaWithPipe<readonly [StringSchema<undefined>, MaxLengthAction<string, 300, undefined>]>; kind: LiteralSchema<"login", undefined>; proxy: BooleanSchema<undefined>; realm: SchemaWithPipe<readonly [StringSchema<undefined>, MaxLengthAction<string, 300, undefined>]>; secure: BooleanSchema<undefined>; }, undefined>, StrictObjectSchema<{ id: SchemaWithPipe<readonly [NumberSchema<undefined>, SafeIntegerAction<number, undefined>, MinValueAction<number, 0, undefined>]>; kind: LiteralSchema<"permission", undefined>; permissions: SchemaWithPipe<readonly [ArraySchema<PicklistSchema<["camera", "microphone", "location", "notifications", "clipboard"], undefined>, undefined>, MinLengthAction<("camera" | "microphone" | "location" | "notifications" | "clipboard")[], 1, undefined>, MaxLengthAction<("camera" | "microphone" | "location" | "notifications" | "clipboard")[], 5, undefined>]>; site: SchemaWithPipe<readonly [StringSchema<undefined>, MaxLengthAction<string, 300, undefined>]>; }, undefined>, StrictObjectSchema<{ kind: LiteralSchema<"screen", undefined>; site: SchemaWithPipe<readonly [StringSchema<undefined>, MaxLengthAction<string, 300, undefined>]>; sources: SchemaWithPipe<readonly [ArraySchema<StrictObjectSchema<{ id: SchemaWithPipe<…>; name: SchemaWithPipe<…>; screen: BooleanSchema<…>; thumbnail: SchemaWithPipe<…>; }, undefined>, undefined>, MinLengthAction<object[], 1, undefined>, MaxLengthAction<object[], 100, undefined>]>; }, undefined>, StrictObjectSchema<{ anchor: StrictObjectSchema<{ height: SchemaWithPipe<readonly [NumberSchema<undefined>, IntegerAction<number, undefined>, MinValueAction<number, 0, undefined>, MaxValueAction<number, 20000, undefined>]>; width: SchemaWithPipe<readonly [NumberSchema<undefined>, IntegerAction<number, undefined>, MinValueAction<number, 0, undefined>, MaxValueAction<number, 20000, undefined>]>; x: SchemaWithPipe<readonly [NumberSchema<undefined>, IntegerAction<number, undefined>, MinValueAction<number, 0, undefined>, MaxValueAction<number, 20000, undefined>]>; y: SchemaWithPipe<readonly [NumberSchema<undefined>, IntegerAction<number, undefined>, MinValueAction<number, 0, undefined>, MaxValueAction<number, 20000, undefined>]>; }, undefined>; items: SchemaWithPipe<readonly [ArraySchema<StrictObjectSchema<{ exists: BooleanSchema<…>; id: SchemaWithPipe<…>; name: SchemaWithPipe<…>; paused: BooleanSchema<…>; received: SchemaWithPipe<…>; state: PicklistSchema<…, …>; total: SchemaWithPipe<…>; }, undefined>, undefined>, MaxLengthAction<object[], 100, undefined>]>; kind: LiteralSchema<"downloads", undefined>; }, undefined>], undefined>, undefined>

Defined in: app/src/shared/ipc/overlay-contracts.ts:98

What the overlay shows, or null when it is closed.


const ShareScreen: RequestContract<{ id: string; }, null>

Defined in: app/src/shared/ipc/overlay-contracts.ts:167

Lets the site that asked see the chosen screen or window.


const SignIn: RequestContract<{ password: string; username: string; }, null>

Defined in: app/src/shared/ipc/overlay-contracts.ts:145

Signs in with the user name and password of the sign-in prompt.


const ToggleSiteBlocking: RequestContract<{ }, null>

Defined in: app/src/shared/ipc/overlay-contracts.ts:129

Turns the content blocker off or on for the site of the active tab, and reloads it.