UNPKG

@visactor/vrender-kits

Version:

```typescript import { xxx } from '@visactor/vrender-kits'; ```

53 lines (52 loc) 2.26 kB
import { BaseWindowHandlerContribution, ContainerModule } from '@visactor/vrender-core'; import type { IContext2d, ICanvas, IDomRectLike, EnvType, IWindowHandlerContribution, IWindowParams } from '@visactor/vrender-core'; import type { IBoundsLike } from '@visactor/vutils'; export declare class BrowserWindowHandlerContribution extends BaseWindowHandlerContribution implements IWindowHandlerContribution { static env: EnvType; type: EnvType; canvas: ICanvas; observer?: MutationObserver; protected _canvasIsIntersecting: boolean; protected _onVisibleChangeCb: (currentVisible: boolean) => void; private readonly global; get container(): HTMLElement | null; static idprefix: string; static prefix_count: number; static GenerateCanvasId(): string; constructor(); getTitle(): string; getWH(): { width: number; height: number; }; getXY(): { x: number; y: number; }; createWindow(params: IWindowParams): void; protected postInit(): void; isElementVisible(el: HTMLElement): boolean; protected observerCanvas(): void; private createWindowByConfig; private createWindowByCanvas; releaseWindow(): void; resizeWindow(width: number, height: number): void; setDpr(dpr: number): void; getContext(): IContext2d; getNativeHandler(): ICanvas; getDpr(): number; addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void; dispatchEvent(event: any): boolean; getStyle(): CSSStyleDeclaration | Record<string, any>; setStyle(style: CSSStyleDeclaration | Record<string, any>): void; getBoundingClientRect(): IDomRectLike; clearViewBox(color?: string): void; isVisible(bbox?: IBoundsLike): boolean; onVisibleChange(cb: (currentVisible: boolean) => void): void; getTopLeft(baseWindow?: boolean): { top: number; left: number; }; } export declare const browserWindowModule: ContainerModule;