import { ModelFormat } from "./io/format"; import { Filesystem } from "./file_system"; import { MessageBoxOptions } from "./interface/dialog"; import { ToastNotification, ToastNotificationOptions } from "./interface/toast_notification"; export declare const LastVersion: string; export declare const Blockbench: { isWeb: boolean; isMobile: boolean; isLandscape: boolean; isTouch: boolean; readonly isPWA: boolean; version: string; operating_system: string; platform: string; browser: string; flags: any[]; drag_handlers: {}; events: {}; openTime: Date; setup_successful: null | true; argv: string[]; queries: Record; startup_count: number; /** * @deprecated Use Undo.initEdit and Undo.finishEdit instead */ edit(aspects: UndoAspects, cb: () => void): void; reload(): void; isNewerThan(version: string): boolean; isOlderThan(version: string): boolean; registerEdit(): void; getIconNode(icon: IconString | boolean | HTMLElement | (() => (IconString | boolean | HTMLElement)), color?: string): HTMLElement; showQuickMessage(message: any, time?: number): void; showToastNotification(options: ToastNotificationOptions): ToastNotification; setCursorTooltip(text?: string): void; setProgress(progress: number, time?: number, bar?: string): void; showStatusMessage(message: string, time?: number): void; setStatusBarText(text?: string): void; showMessage(message: any, location: any): void; showMessageBox(options: MessageBoxOptions, cb?: (button: number | string, result?: Record, event?: Event) => void): import("./interface/dialog").MessageBox; /** * * @param {*} title * @param {*} value * @param {*} callback * @param {object} options Options * @param {string} options.info Info text * @param {string} options.description Description for the text input * @returns {Promise} Input value */ textPrompt(title: string, value: string, callback: (text: string) => void, options?: { placeholder?: string; description?: string; info?: string; }): Promise; addMenuEntry(name: string, icon: IconString, click: any): void; removeMenuEntry(name: string): void; openLink(link: string): void; notification(title: string, text: string, icon?: string): void; addCSS(css: string, layer?: string): Deletable; addFlag(flag: string): void; removeFlag(flag: string): void; hasFlag(flag: string): boolean | undefined; dispatchEvent(event_name: T, data: D): any[]; on(event_name: T, cb: (data: D) => any): Deletable; once(event_name: T, cb: (data: D) => any): Deletable; addListener(event_name: T, cb: (data: D) => any): Deletable; removeListener(event_name: T, cb: (data: D) => any): void; onUpdateTo(version: string, callback: (previous_version: string) => void): void; Format: (ModelFormat | number); Project: (ModelProject | number); readonly Undo: UndoSystem; import: typeof Filesystem.importFile; importFile: typeof Filesystem.importFile; pickDirectory: typeof Filesystem.pickDirectory; read: typeof Filesystem.readFile; readFile: typeof Filesystem.readFile; export: typeof Filesystem.exportFile; exportFile: typeof Filesystem.exportFile; writeFile: typeof Filesystem.writeFile; findFileFromContent: typeof Filesystem.findFileFromContent; addDragHandler: typeof Filesystem.addDragHandler; removeDragHandler: typeof Filesystem.removeDragHandler; }; declare global { interface Window { Blockbench: typeof Blockbench; osfs: '/' | '\\'; } } declare const global: { LastVersion: string; Blockbench: { isWeb: boolean; isMobile: boolean; isLandscape: boolean; isTouch: boolean; readonly isPWA: boolean; version: string; operating_system: string; platform: string; browser: string; flags: any[]; drag_handlers: {}; events: {}; openTime: Date; setup_successful: null | true; argv: string[]; queries: Record; startup_count: number; /** * @deprecated Use Undo.initEdit and Undo.finishEdit instead */ edit(aspects: UndoAspects, cb: () => void): void; reload(): void; isNewerThan(version: string): boolean; isOlderThan(version: string): boolean; registerEdit(): void; getIconNode(icon: IconString | boolean | HTMLElement | (() => (IconString | boolean | HTMLElement)), color?: string): HTMLElement; showQuickMessage(message: any, time?: number): void; showToastNotification(options: ToastNotificationOptions): ToastNotification; setCursorTooltip(text?: string): void; setProgress(progress: number, time?: number, bar?: string): void; showStatusMessage(message: string, time?: number): void; setStatusBarText(text?: string): void; showMessage(message: any, location: any): void; showMessageBox(options: MessageBoxOptions, cb?: (button: number | string, result?: Record, event?: Event) => void): import("./interface/dialog").MessageBox; /** * * @param {*} title * @param {*} value * @param {*} callback * @param {object} options Options * @param {string} options.info Info text * @param {string} options.description Description for the text input * @returns {Promise} Input value */ textPrompt(title: string, value: string, callback: (text: string) => void, options?: { placeholder?: string; description?: string; info?: string; }): Promise; addMenuEntry(name: string, icon: IconString, click: any): void; removeMenuEntry(name: string): void; openLink(link: string): void; notification(title: string, text: string, icon?: string): void; addCSS(css: string, layer?: string): Deletable; addFlag(flag: string): void; removeFlag(flag: string): void; hasFlag(flag: string): boolean | undefined; dispatchEvent(event_name: T, data: D): any[]; on(event_name: T, cb: (data: D) => any): Deletable; once(event_name: T, cb: (data: D) => any): Deletable; addListener(event_name: T, cb: (data: D) => any): Deletable; removeListener(event_name: T, cb: (data: D) => any): void; onUpdateTo(version: string, callback: (previous_version: string) => void): void; Format: (ModelFormat | number); Project: (ModelProject | number); readonly Undo: UndoSystem; import: typeof Filesystem.importFile; importFile: typeof Filesystem.importFile; pickDirectory: typeof Filesystem.pickDirectory; read: typeof Filesystem.readFile; readFile: typeof Filesystem.readFile; export: typeof Filesystem.exportFile; exportFile: typeof Filesystem.exportFile; writeFile: typeof Filesystem.writeFile; findFileFromContent: typeof Filesystem.findFileFromContent; addDragHandler: typeof Filesystem.addDragHandler; removeDragHandler: typeof Filesystem.removeDragHandler; }; isApp: boolean; }; declare global { const LastVersion: typeof global.LastVersion; const Blockbench: typeof global.Blockbench; } export {};