/** * Copyright 2023-present DreamNum Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import type { IBoundRectNoAngle, IMouseEvent, IPointerEvent } from '@univerjs/engine-render'; import type { IMobileDocElementMenuProps } from '../views/mobile-element-menu/MobileDocElementMenu'; import { Disposable, IUniverInstanceService } from '@univerjs/core'; import { DocCanvasPopManagerService } from './doc-popup-manager.service'; export interface IDocMobileElementTarget extends IMobileDocElementMenuProps { unitId: string; rect: IBoundRectNoAngle; onTap?: (offset: { offsetX: number; offsetY: number; }) => void; onDrag?: (event: IPointerEvent | IMouseEvent) => void; } /** Element hit testing stays in its plugin; the document owns tap-versus-scroll recognition. */ export declare class DocMobileElementMenuService extends Disposable { private readonly _popupService; private _pending; private _editingBounds; private _popup; private _unitId; constructor(_popupService: DocCanvasPopManagerService, instanceService: IUniverInstanceService); capture(target: IDocMobileElementTarget): boolean; takeTarget(unitId: string): IDocMobileElementTarget | null; setEditingBounds(unitId: string, rect: IBoundRectNoAngle): void; getEditingBounds(unitId: string): IBoundRectNoAngle | null; show(target: IDocMobileElementTarget): void; close(): void; dispose(): void; }