/** * 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 { Disposable, ILogService, LocaleService } from '@univerjs/core'; import { INotificationService } from '../notification/notification.service'; export declare const PLAIN_TEXT_CLIPBOARD_MIME_TYPE = "text/plain"; export declare const HTML_CLIPBOARD_MIME_TYPE = "text/html"; export declare const FILE_PNG_CLIPBOARD_MIME_TYPE = "image/png"; export declare const FILE__JPEG_CLIPBOARD_MIME_TYPE = "image/jpeg"; export declare const FILE__BMP_CLIPBOARD_MIME_TYPE = "image/bmp"; export declare const FILE__WEBP_CLIPBOARD_MIME_TYPE = "image/webp"; export declare const FILE_SVG_XML_CLIPBOARD_MIME_TYPE = "image/svg+xml"; export declare const imageMimeTypeSet: Set; /** * This interface provides an interface to access system's clipboard. */ export interface IClipboardInterfaceService { /** * Write plain text into clipboard. Use write() to write both plain text and html. * @param text */ writeText(text: string): Promise; /** * Write both plain text and html into clipboard. * @param text * @param html */ write(text: string, html: string): Promise; /** * Read plain text from clipboard. Use read() to read both plain text and html. * @returns plain text */ readText(): Promise; /** * Read `ClipboardItem[]` from clipboard. */ read(): Promise; /** * This property tells if the platform supports reading data directly from the clipboard. */ readonly supportClipboard: boolean; } export declare const IClipboardInterfaceService: import("@wendellhu/redi").IdentifierDecorator; export declare class BrowserClipboardService extends Disposable implements IClipboardInterfaceService { private readonly _localeService; private readonly _logService; private readonly _notificationService?; get supportClipboard(): boolean; constructor(_localeService: LocaleService, _logService: ILogService, _notificationService?: INotificationService | undefined); write(text: string, html: string): Promise; writeText(text: string): Promise; read(): Promise; readText(): Promise; private _legacyCopyHtml; private _legacyCopyText; private _showClipboardAuthenticationNotification; }