/** * 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 { DocumentDataModel, IDocumentBody, Nullable } from '@univerjs/core'; import type { IDocumentSkeletonPage, IRenderContext, IRenderModule, UniverRenderingContext } from '@univerjs/engine-render'; import type { IUniverDocsUIConfig } from '../../config/config'; import { Disposable, IConfigService, LocaleService, ThemeService } from '@univerjs/core'; import { DocSelectionManagerService } from '@univerjs/docs'; export interface IParagraphPlaceholderLayout { clipBottom?: number; clipLeft?: number; clipRight?: number; clipTop?: number; fontFamily: string; fontSize: number; fontWeight: string; maxWidth: number; text: string; x: number; y: number; } interface IParagraphPlaceholderLocale { heading1: string; heading2: string; heading3: string; heading4: string; heading5: string; listItem: string; normalText: string; } interface IParagraphPlaceholderLayoutOptions { docsLeft?: number; unitId?: string; } export declare class DocParagraphPlaceholderRenderController extends Disposable implements IRenderModule { private readonly _context; private readonly _localeService; private readonly _docSelectionManagerService; private readonly _configService; private readonly _themeService; constructor(_context: IRenderContext, _localeService: LocaleService, _docSelectionManagerService: DocSelectionManagerService, _configService: IConfigService, _themeService: ThemeService); private _initParagraphPlaceholderRender; private _drawPagePlaceholders; private _getLocale; } export declare function shouldRenderParagraphPlaceholder(documentModel: DocumentDataModel, unitId: string, config?: Nullable): boolean; export declare function getParagraphPlaceholderLayouts(page: IDocumentSkeletonPage, body: IDocumentBody, locale: IParagraphPlaceholderLocale, pageLeft: number | undefined, pageTop: number | undefined, activeOffset: number, options?: IParagraphPlaceholderLayoutOptions): IParagraphPlaceholderLayout[]; export declare function drawParagraphPlaceholders(ctx: UniverRenderingContext, placeholders: IParagraphPlaceholderLayout[], color?: string): void; export {};