/// import { PipelineDimension, PipelineDispatcher, PipelineRegistry, PipelineRenderer } from './pipeline'; import { PlaygroundContribution, PlaygroundRegistry } from './playground-contribution'; import { PlaygroundConfig } from './playground-config'; import { ContributionProvider, Disposable, DisposableCollection, Event } from '@gedit/utils'; import { ConfigEntity, Entity, EntityManager, EntityRegistry, AbleDispatchEvent, AbleManager, PlaygroundContext } from '../common'; import { EditorStateConfigEntity, PathPointSelectionEntity, PlaygroundConfigEntity, PlaygroundConfigRevealOpts } from './layer/config'; import { PlaygroundCommandRegistry, PlaygroundId } from './playground-registries'; import { ContextMenuRenderer } from '@gedit/layout'; import { MenuPath, SelectionService } from '@gedit/application-common'; import { PlaygroundContextKeyService } from './playground-context-key-service'; import '../../src/browser/style/index.less'; import { Rectangle } from '@gedit/math'; import { SelectorExtendContribution, SelectorExtendContributionRegistry } from './selector-extend-contribution'; export declare class Playground implements Disposable { readonly id: PlaygroundId; readonly entityManager: EntityManager; readonly ableManager: AbleManager; readonly registry: PlaygroundRegistry; readonly selectorExtendRegistry: SelectorExtendContributionRegistry; readonly context: CONTEXT; protected readonly pipelineRenderer: PipelineRenderer; protected readonly commands: PlaygroundCommandRegistry; protected readonly pipelineRegistry: PipelineRegistry; protected readonly dispatcher: PipelineDispatcher; protected readonly playgroundConfig: PlaygroundConfig; protected readonly contributionProvider: ContributionProvider; protected readonly selectContributionProvider: ContributionProvider; protected readonly contextKeyService?: PlaygroundContextKeyService | undefined; protected readonly selectionService?: SelectionService | undefined; protected readonly contextMenuRenderer?: ContextMenuRenderer | undefined; readonly toDispose: DisposableCollection; readonly node: HTMLElement; private _focused; readonly onBlur: Event; readonly onFocus: Event; readonly onZoom: Event; readonly onScroll: Event<{ scrollX: number; scrollY: number; }>; private onRestoreStateEmitter; private onContextmenuEmitter; private onContextmenuHideEmitter; readonly onRestoreState: Event; onContextmenu(onShow: (e: MouseEvent) => void, onHide?: (e: MouseEvent) => void): Disposable; static getSelection(selectionService: SelectionService): Entity[]; static getAllInstances(): Playground[]; constructor(id: PlaygroundId, entityManager: EntityManager, ableManager: AbleManager, registry: PlaygroundRegistry, selectorExtendRegistry: SelectorExtendContributionRegistry, context: CONTEXT, pipelineRenderer: PipelineRenderer, commands: PlaygroundCommandRegistry, pipelineRegistry: PipelineRegistry, dispatcher: PipelineDispatcher, playgroundConfig: PlaygroundConfig, contributionProvider: ContributionProvider, selectContributionProvider: ContributionProvider, contextKeyService?: PlaygroundContextKeyService | undefined, selectionService?: SelectionService | undefined, contextMenuRenderer?: ContextMenuRenderer | undefined); protected syncToSelection: import("lodash").DebouncedFunc<() => void>; setParent(parent: HTMLElement): void; get onDispatch(): Event; /** * 对应的右键菜单路径 */ get contextMenuPath(): string[]; get contextMenuPathEditPath(): string[]; get zoomEnable(): boolean; set zoomEnable(zoomEnable: boolean); /** * 转换为内部的命令id * @param commandId */ toPlaygroundCommandId(commandId: string): string; /** * 转换为内部的右键菜单路径 * @param menuPath */ toPlaygroundContextMenuPath(menuPath: MenuPath): MenuPath; /** * 通知所有关联able的entity */ dispatch

(payloadKey: string | Symbol, payload: P): string[]; /** * 刷新所有layer */ flush(): void; /** * 浏览器关闭触发,并存储layer的数据 */ storeState(): object; /** * 执行命令 * @param commandId * @param args */ execCommand(commandId: string, ...args: any[]): Promise; private isReady; ready(oldState?: object): void; /** * 浏览器强制刷新后会从localStorage读取layer的状态 * @param oldState */ restoreState(oldState: object): void; /** * 切换Tab,或者关闭情况,需要清空重制画布 */ resetState(): void; /** * 按下边顺序执行 * 1. 指定的entity位置或pos位置 * 2. selection位置 * 3. 初始化位置 */ scrollToView(opts?: PlaygroundConfigRevealOpts): Promise; /** * 这里会由widget透传进来 * @param msg */ resize(msg?: PipelineDimension): void; /** * 触发focus */ focus(): void; /** * 触发blur */ blur(): void; isFocused(): boolean; /** * @deprecated */ get configEntity(): PlaygroundConfigEntity; /** * 画布配置数据 */ get config(): PlaygroundConfigEntity; /** * 画布编辑状态管理 */ get editorState(): EditorStateConfigEntity; /** * 获取 path selection */ get pathPointSelection(): PathPointSelectionEntity; getConfigEntity(r: EntityRegistry): T; dispose(): void; get selectedNodes(): Entity[]; get selectedBounds(): Rectangle; /** * 选择节点 * @param entities */ selectNodes(...entities: Entity[]): void; get disposed(): boolean; } //# sourceMappingURL=playground.d.ts.map