2023-03-28 07:12:58 +08:00
|
|
|
declare global {
|
|
|
|
interface Window {
|
|
|
|
__gradio_mode__: "app" | "website";
|
2023-08-11 22:54:56 +08:00
|
|
|
__gradio_space__: string | null;
|
2023-03-28 07:12:58 +08:00
|
|
|
launchGradio: Function;
|
|
|
|
launchGradioFromSpaces: Function;
|
|
|
|
gradio_config: Config;
|
|
|
|
scoped_css_attach: (link: HTMLLinkElement) => void;
|
|
|
|
__is_colab__: boolean;
|
2023-06-29 05:52:12 +08:00
|
|
|
parentIFrame?: {
|
|
|
|
scrollTo: (x: number, y: number) => void;
|
|
|
|
};
|
2023-03-28 07:12:58 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export interface Config {
|
|
|
|
auth_required: boolean | undefined;
|
|
|
|
auth_message: string;
|
|
|
|
components: any[];
|
|
|
|
css: string | null;
|
|
|
|
dependencies: any[];
|
|
|
|
dev_mode: boolean;
|
|
|
|
enable_queue: boolean;
|
|
|
|
layout: any;
|
|
|
|
mode: "blocks" | "interface";
|
|
|
|
root: string;
|
|
|
|
theme: string;
|
|
|
|
title: string;
|
|
|
|
version: string;
|
2023-06-22 03:25:25 +08:00
|
|
|
space_id: string | null;
|
2023-03-28 07:12:58 +08:00
|
|
|
is_colab: boolean;
|
|
|
|
show_api: boolean;
|
|
|
|
stylesheets: string[];
|
|
|
|
path: string;
|
|
|
|
}
|