mirror of
https://github.com/zoriya/v10.git
synced 2026-08-16 02:45:09 +00:00
21 lines
732 B
TypeScript
21 lines
732 B
TypeScript
import { ThumbnailConstraints } from "../../core/ui/thumbnail/types.js";
|
|
//#region src/dom/ui/thumbnail.d.ts
|
|
interface CreateThumbnailOptions {
|
|
getContainer: () => HTMLElement | null;
|
|
getImg: () => HTMLImageElement | null;
|
|
onStateChange: () => void;
|
|
}
|
|
interface ThumbnailApi {
|
|
readonly loading: boolean;
|
|
readonly error: boolean;
|
|
readonly naturalWidth: number;
|
|
readonly naturalHeight: number;
|
|
readConstraints(): ThumbnailConstraints;
|
|
updateSrc(url: string | undefined): void;
|
|
connect(): void;
|
|
destroy(): void;
|
|
}
|
|
declare function createThumbnail(options: CreateThumbnailOptions): ThumbnailApi;
|
|
//#endregion
|
|
export { CreateThumbnailOptions, ThumbnailApi, createThumbnail };
|
|
//# sourceMappingURL=thumbnail.d.ts.map
|