import * as i0 from '@angular/core'; import { InjectionToken, OnInit, OnDestroy, NgZone, ViewContainerRef, Signal, PipeTransform, AfterViewInit, ChangeDetectorRef, Injector, ElementRef, QueryList, Renderer2, TemplateRef, OnChanges, ComponentRef, SimpleChanges, AfterContentInit, EventEmitter, DestroyRef, WritableSignal } from '@angular/core'; import * as slate from 'slate'; import { Editor, Element as Element$1, Text, Ancestor, Node, Range as Range$1, Path, Point, Span, NodeEntry, Descendant, PathRef, Location, RangeRef, BaseRange } from 'slate'; import * as slate_angular from 'slate-angular'; import { AngularEditor, SlatePlaceholder, ViewType, ClipboardData, BaseElementComponent, ComponentType, DefaultTextFlavour, SlateError, SlateVirtualScrollConfig, BeforeContextChange, SlateElementContext } from 'slate-angular'; import { ComponentType as ComponentType$1 } from '@angular/cdk/portal'; import { HistoryEditor } from 'slate-history'; import { ThyIconRegistry } from 'ngx-tethys/icon'; import * as rxjs from 'rxjs'; import { Observable, Subject, ReplaySubject } from 'rxjs'; import { ThyPopoverRef, ThyPopover } from 'ngx-tethys/popover'; import { Overlay, ScrollDispatcher, OverlayRef, FlexibleConnectedPositionStrategy, ConnectedPosition, FlexibleConnectedPositionStrategyOrigin } from '@angular/cdk/overlay'; import { ThyDropdownDirective } from 'ngx-tethys/dropdown'; import { DOMRange, DOMElement } from 'slate-dom'; import { SafeUrl } from '@angular/platform-browser'; import { ThyUploadResponse } from 'ngx-tethys/upload'; import * as _worktile_theia from '@worktile/theia'; import { ThyImageGroup, ThyImageDirective } from 'ngx-tethys/image'; import { NgCodeMirrorOptions, CodeMirrorComponent } from 'ng-codemirror'; import { ThyResizeEvent } from 'ngx-tethys/resizable'; import { ThyPlacement } from 'ngx-tethys/core'; import { ThyNotifyService } from 'ngx-tethys/notify'; export { assign, cloneDeep, debounce, defaults, groupBy, isEqual, map, uniq } from 'lodash-es'; declare const PICTURE_ACCEPTED_UPLOAD_MIME: string[]; declare const PICTURE_ACCEPTED_UPLOAD_SIZE = 50; declare const A_TAG_REL_ATTR = "noopener noreferrer nofollow external ugc"; declare const LINK_DEFAULT_TEXT = "\u94FE\u63A5"; declare const TAB_SPACE = " "; declare const CLIPBOARD_FORMAT_KEY = "x-theia-fragment"; declare const DEFAULT_SCROLL_CONTAINER = ".the-editable-container"; declare const ELEMENT_UNIQUE_ID = "key"; declare const ZERO_WIDTH_CHAR = "\u200B"; declare const QUICK_INSERT_HOTKEY = "/"; declare const BLOCK_HIDDEN_CLASS = "slate-block-hidden"; declare const ROOT_ELEMENT_MARGIN_BOTTOM = 8; type PredicateObj = Partial>; type PredicateFn = (obj: T) => boolean; type Predicate = PredicateObj | PredicateFn; type NoInfer = [T][T extends any ? 0 : never]; declare enum PluginKeys { list = "list", numberedList = "numbered-list", bulletedList = "bulleted-list", checkItem = "check-item", link = "link", blockCard = "block-card", indent = "indent", table = "table", image = "image", code = "code", heading = "heading", blockquote = "block-quote", inlineCode = "inline-code", color = "select-color", fontSize = "font-size", mark = "mark", hr = "hr", align = "align", verticalAlign = "vertical-align", softBreak = "soft-break", nodeID = "node-id", resetType = "reset-type", removeVoid = "remove-void", removeEmpty = "remove-empty", theHistory = "the-history", insertDataByInvalidType = "insert-data-by-invalid-type", autoFormat = "auto-format", transforms = "transforms", moveSelection = "move-selection", trailingNode = "trailing-node", insertParagraphNodes = "insert-paragraph-nodes", getFragment = "get-fragment", deserializeHtml = "deserialize-html", deserializeMd = "deserialize-md", quickInsert = "quick-insert", paintFormat = "paint-format", mention = "mention", internalCommon = "internalCommon" } /** * 通过 key 存储插件的唯一 key。 */ type PluginKey = PluginKeys | string; interface TheiaPluginKey { /** * 用于在 `editor.pluginsByKey` 中按键存储插件的属性。 */ key?: PluginKey; } type OverrideByKey = Record; type NestedStructureByKey = Record; type WithRequired = Omit & Required>; type ThePluginMenuItemKey = string; interface ThePluginMenuItem { key: ThePluginMenuItemKey; name: string; type: ThePluginMenuItemType; description?: string; icon?: string; menuIcon?: string | ((sceneKey?: string) => string); keywords?: string; children?: Array; displayKey?: string; execute?: (editor: Editor) => void; active?: (editor: Editor) => boolean | string; isDisabled?: (editor: Editor) => boolean; isHidden?: (editor: Editor) => boolean; isDev?: boolean; removeKeywordsType?: 'character' | 'block'; } interface ThePluginMenuGroup { groupName: string; isHidden?: (editor: Editor) => boolean; } type ThePluginMenuItemConfig = ThePluginMenuGroup | ThePluginMenuItemKey; type ThePluginMenuItemWrap = ThePluginMenuItem & { disabled?: boolean; isMenuItem?: boolean; }; type ThePluginMenu = (ThePluginMenuGroup | ThePluginMenuItem)[]; declare const ThePluginMenu: { isMenuGroup(value: any): value is ThePluginMenuGroup; isMenuItem(value: any): value is ThePluginMenuItem; }; /** * theia 插件覆盖了 `editor` 方法。 * 命名约定是 `with*`。 */ type WithOverride = (editor: Editor, plugin: WithThePlugin) => Editor; type ThePluginBaseOption = { allowParentTypes?: (CustomElementKinds | string)[]; disabledOperateTypes?: CustomElementKinds[]; disabled?: boolean; isInline?: boolean; }; type ThePluginOption

= NoInfer<{ [key: string]: any; }> & P & ThePluginBaseOption; type ThePlugin = Required & { /** * 工具栏配置 */ toolbarItems?: ToolbarItem[]; /** * 插件插入菜单配置 */ menuItems?: ThePluginMenuItem[]; /** * 插件使用的扩展属性 */ options?: ThePluginOption

; /** * 插件嵌套结构 */ nestedStructureByKey?: NestedStructureByKey; /** * 用于通过 key 深度覆盖插件 */ overrideByKey?: Record>>; /** * Editor method overriders. */ withOverrides?: WithOverride; /** * 递归插件支持允许在单个插件中包含多个插件。 * 最终将所有插件扁平化到编辑器中。 */ plugins?: ThePlugin[]; }; type WithThePlugin = WithRequired, 'options'>; interface OptionItem { key?: string; } interface ElementOptionsInfo { type: CustomElementKinds; invalidChildrenTypes: CustomElementKinds[]; isSecondaryContainer?: boolean; } declare const inValidTypes: CustomElementKinds[]; declare const DefaultElementOptions: ElementOptionsInfo[]; interface TheEditor extends AngularEditor, HistoryEditor { [key: string]: any; options: TheOptions; plugins: ThePlugin[]; disabled: boolean; pluginsByKey: OverrideByKey; nestedStructureByKey: NestedStructureByKey; extraElementOptions: ElementOptionsInfo[]; globalMousedown: (event: MouseEvent) => void; mousedown: (event: MouseEvent) => void; renderElement: (element: Element$1) => ViewType; renderLeaf: (text: Text) => ViewType; isContainer: (element: Element$1) => boolean; } declare const TheEditor: typeof AngularEditor; declare enum TheDataMode { json = "json", html = "html" } declare enum TheMode { default = "default", print = "print", mobile = "mobile" } type TheModeType = TheMode | string; declare class TheModeConfig { mode: TheModeType; } declare const THE_MODE_TOKEN: InjectionToken; declare const THE_MODE_PROVIDER: { provide: InjectionToken; useValue: { mode: TheMode; }; }; interface TheOptions { mode?: TheDataMode; readonly?: boolean; disabled?: boolean; autoFocus?: boolean; placeholder?: string; inlineToolbarVisible?: boolean; scrollContainer?: string; maxHeight?: number; fontSize?: FontSizes; richMedia?: boolean; toolbar?: ToolbarOption; menu?: ThePluginMenuItemConfig[]; extraElementOptions?: ElementOptionsInfo[]; neededScrollIntoView?: (e: Editor) => boolean; placeholderDecorate?: (e: Editor) => SlatePlaceholder[]; autoNormalize?: boolean; disabledTableStickyScrollbar?: boolean; enableVirtualScroll?: boolean; } type NodeMatch = Predicate; interface MatchOptions { match?: NodeMatch; block?: boolean; } interface IndentOptions { indentTypes?: CustomElementKinds[]; disabledIndentTypes?: CustomElementKinds[]; } interface EditorAboveOptions extends MatchOptions { at?: Range$1 | Path | Point; mode?: 'highest' | 'lowest'; voids?: boolean; } interface EditorNodesOptions { at?: Range$1 | Path | Point | Span; match?: (node: Node) => boolean; mode?: 'highest' | 'lowest' | 'all'; universal?: boolean; reverse?: boolean; voids?: boolean; } interface WrapOptions { at?: Path | Point | Range$1; match?: (node: Node) => boolean; mode?: 'highest' | 'lowest' | 'all'; split?: boolean; voids?: boolean; } interface EditorParentOptions { depth?: number | undefined; edge?: 'start' | 'end' | undefined; } interface QueryOptions { filter?: (entry: NodeEntry) => boolean; allow?: string[]; exclude?: string[]; } interface DomEventDataInfo extends ClipboardData { inputType?: string; key?: string; } type HeadingElementKinds = ElementKinds.heading_1 | ElementKinds.heading_2 | ElementKinds.heading_3 | ElementKinds.heading_4 | ElementKinds.heading_5 | ElementKinds.heading_6; type BlockElementKinds = ElementKinds.image | ElementKinds.paragraph | ElementKinds.numberedList | ElementKinds.bulletedList | ElementKinds.listItem | ElementKinds.checkItem | ElementKinds.table | ElementKinds.tableRow | ElementKinds.tableCell | ElementKinds.tableContent | ElementKinds.code | ElementKinds.blockquote | ElementKinds.hr | ElementKinds.link | ElementKinds.inlineCode | HeadingElementKinds; type InlineElementKinds = ElementKinds.link; interface TheBlockElement { align?: Alignment; textIndent?: number; type: BlockElementKinds; } interface UploadFileEntity { thumbUrl: string; originUrl: string; name?: string; size?: number; } interface FileUploadingItem { scopeId?: string; file: File; url?: string; started?: boolean; result?: ThyUploadResponse; } interface ImageEntry { file?: File; name?: string; width?: number; height?: number; originWidth?: number; originHeight?: number; thumbUrl?: SafeUrl | string; originUrl?: SafeUrl | string; align?: Alignment; layout?: LayoutTypes; reSized?: boolean; size?: number; } type ImageInfo = Pick; interface PreviewImageInfo { image: ImageInfo; index: number; imageGroup: ImageInfo[]; } interface LayoutOption extends ToolbarItem { handle?: (e: MouseEvent, key: Alignment | LayoutTypes) => void; } interface TheImageService { uploadFileHandle: (files: File | string) => Observable; getUploadingItems$: () => Observable; isExternalUrl?: (imageUrl: string) => boolean; getImageUrl?: (element: ImageElement) => Observable<{ thumbUrl: string; originUrl: string; }>; } declare const THE_IMAGE_SERVICE_TOKEN: InjectionToken; interface ImagePluginOptions { allowParentTypes?: CustomElementKinds[]; imageTypes?: string[]; disablePreview?: ((editor: TheEditor) => boolean) | boolean; acceptedUploadSize?: number; errorImageUrl?: string | ((editor: TheEditor) => string); preview?: (data: { editor: TheEditor; previewImageInfo: PreviewImageInfo; }) => void; } interface ThePresetConfig { options?: Pick; plugins?: ThePlugin[]; } declare const THE_PRESET_CONFIG_TOKEN: InjectionToken; declare class TheBaseElement extends BaseElementComponent implements OnInit { onContextChange(): void; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵcmp: i0.ɵɵComponentDeclaration, "TheBaseElement", never, {}, {}, never, never, true, never>; } interface TheContextOptions { editor: TheEditor; nativeElement: HTMLElement; viewContainerRef: ViewContainerRef; width?: number; } interface PaintFormatStatus { isActive: boolean; marks: { [key in MarkTypes]?: any; }; } declare class TheContextService implements OnDestroy { private ngZone; private scrollSubscription?; private destroy$; private options; uploadingFiles: { url: string; file: File | string; }[]; paintFormatStatus: PaintFormatStatus; onMouseUp$: Observable; onMouseMove$: Observable; onMouseDown$: Observable; containerScrolled$: Subject<{ event: Event; direction: ScrollDirection; }>; uploadingStatus$: Subject; containerResized$: Subject<{ entry: ResizeObserverEntry; widthChanged: boolean; heightChanged: boolean; }>; theEditorResized$: Subject<{ entry: ResizeObserverEntry; widthChanged: boolean; heightChanged: boolean; }>; windowResized$: Subject<{ entry: ResizeObserverEntry; widthChanged: boolean; heightChanged: boolean; }>; private containerResizeObserver; private theEditorResizeObserver; private windowResizeObserver; constructor(ngZone: NgZone); initialize(options: TheContextOptions): void; getScrollContainer(): HTMLElement; rebindContainerScroll(): void; bindContainerResize(): void; bindTheEditorResize(): void; bindWindowResize(): void; private elementResize; getOptions(): TheContextOptions; getDefaultFontSize(): FontSizes; getEditableElement(): Element; getFirstElementChild(): HTMLElement; addUploadingFiles(file: { url: string; file: File | string; }): void; removeUploadFile(file: { url: string; file: File | string; }): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } interface CellRect { x: number; y: number; width: number; height: number; } declare function calcSpanForRow(table: TableElement, targetIndex: number): boolean[]; declare function calcSpanForColumn(table: TableElement, targetIndex: number): boolean[]; declare function getOriginCell(table: TableElement, targetRowIndex: number, targetColumnIndex: number): TableCellElement; declare function isInside(cellRect: CellRect, rowIndex: number, columnIndex: number): boolean; declare const calculateRowControls: (editor: TheEditor, element: TableElement) => any[]; declare const calculateHeaderRowHeight: (editor: TheEditor, element: TableElement) => number; /** * 判断是否选中了所有的单元格 * @param editor 编辑器对象 * @param selectedCellPositions 选中的单元格位置数组 * @returns 是否选中了所有的单元格 */ declare const isSelectedAllCell: (editor: Editor, selectedCellPositions: CellPosition[]) => boolean; /** * 获取选中的单元格位置数组 * @param editor 编辑器对象 * @param selectedCells 选中的单元格 * @returns 选中的单元格位置 */ declare const getSelectedCellPositions: (editor: Editor, selectedCells: TableCellElement[]) => { row: number; col: number; }[]; /** * 获取一定范围内所有的单元格位置 * @param startRow 起始行 * @param startCol 起始列 * @param endRow 结束行 * @param endCol 结束列 * @returns 单元格位置 */ declare const getCellPositionsFromRange: (startRow: number, startCol: number, endRow: number, endCol: number) => CellPosition[]; /** * 过滤重复的单元格位置 * @param cells 单元格数组 * @param selectedCellPositions 选中的单元格位置数组 * @returns 过滤后的单元格位置数组 */ declare const uniqueCellPosition: (cells: CellPosition[], selectedCellPositions: CellPosition[]) => CellPosition[]; /** * Create a new cell */ declare function createCell(opts: TableOptions, nodes?: Text[]): TableCellElement; /** * Create a new default content block */ declare function createEmptyContent(opts: TableOptions): { type: _worktile_theia.ElementKinds.paragraph; children: { text: string; }[]; }; /** * Create a new row block */ declare function createRow(opts: TableOptions, columns: number, getCellContent?: (column: number) => Text[]): TableRowElement; /** * Create a table */ declare function createTable(opts: TableOptions, columns: number, rows: number, getCellContent?: (row: number, column: number) => Node[]): TableElement; declare class TablePosition { tableEntry?: NodeEntry; rowEntry?: NodeEntry; cellEntry?: NodeEntry; contentEntry?: NodeEntry; constructor(options?: { tableEntry: any; rowEntry: any; cellEntry: any; contentEntry: any; }); /** * Create a new instance of a TablePosition from a Slate document * and a node key. */ static create(opts: TableOptions, containerNode: Node, path: Path): TablePosition; get table(): TableElement; get row(): TableRowElement; get cell(): TableCellElement; /** * Check to see if this position is within a cell */ isInCell(): boolean; /** * Check to see if this position is within a row */ isInRow(): boolean; /** * Check to see if this position is within a table */ isInTable(): boolean; /** * Check to see if this position is at the top of the cell. */ isTopOfCell(): boolean; /** * Check to see if this position is at the bottom of the cell. */ isBottomOfCell(): boolean; /** * Get count of columns */ getWidth(): number; /** * Get count of rows */ getHeight(): number; /** * Get index of current row in the table. */ getRowIndex(): number; /** * Get index of current column in the row. */ getColumnIndex(): number; /** * find current above column in the table */ findAbove(): TableCellElement; findNext(): TableCellElement; findPrevious(): TableCellElement; /** * find current below column in the table */ findBelow(): TableCellElement; /** * True if on first cell of the table */ isFirstCell(): boolean; /** * True if on last cell of the table */ isLastCell(): boolean; /** * True if on first row */ isFirstRow(): boolean; /** * True if on last row */ isLastRow(): boolean; /** * True if on first column */ isFirstColumn(): boolean; /** * True if on last column */ isLastColumn(): boolean; /** * find cell data with col and row */ findCellByPath(cell: CellPosition): TableCellElement; } declare const getTableByCell: (editor: Editor, cell: TableCellElement) => slate.Ancestor; declare const getTableByRow: (editor: Editor, row: TableRowElement) => slate.Ancestor; declare const createTablePosition: (editor: Editor, path?: Path) => TablePosition; /** * 获取标题行网格列宽值 * @param editor * @param headerRow 标题行 * @param cellsWidth * @returns string */ declare const getGridColumns: (headerRow: HTMLElement, cellsWidth: number[], unit?: string) => string; declare const getColumnsWidth: (cellRow: HTMLElement) => any[]; /** * 打印模式下,按照原宽度比例基于当前表格宽度计算列宽 * 1. 所有列的最小列宽总和大于表格宽度时,所有列返回最小宽度 * @param element * @param minWidthPx * @returns number[] */ declare const calcPrintColumnWidth: (element: TableElement) => { width: number; }[]; declare const getNextCell: (e: TheEditor, direction: TableSelectCellDirection, cellPath: number[]) => TableCellElement; declare function getSelectCellNode(editor: Editor, selectedCells: CellPosition[]): { node: _worktile_theia.TableCellElement; row: number; col: number; }[]; /** * compatible with old data * @returns */ declare function hasHeaderRow(element: TableElement): boolean; declare function hasNumberedColumn(element: TableElement): boolean; /** * True if the given range is inside one table */ declare function isRangeInTable(opts: TableOptions, editor: Editor, range: Range$1): boolean; /** * Is the selection in a table */ declare function isSelectionInTable(opts: TableOptions, editor: Editor): boolean; /** * 传入的单元格能否组成一个矩形 * @param editor * @param cells * @returns boolean */ declare function isRectangularInTableCells(editor: Editor, cells: CellPosition[]): boolean; declare function isVirtualKey(e: KeyboardEvent): any; declare class TableStore implements OnDestroy { private selectedCells$; private dangerousCells$; private cellsChangeObject$; private tableChange$; selectedColumnsIndex: number[]; selectedRowsIndex: number[]; dangerousColumnsIndex: number[]; dangerousRowsIndex: number[]; isSelectedTable: boolean; editor: Editor; isFullscreen: boolean; anchorCellPath: number[]; focusCellPath: number[]; preFocusCellPath: number[]; lastFocusCellPath: number[]; focusCellElement: HTMLTableCellElement; isPrepareSelecting: boolean; isCellSelecting: boolean; isRightClicking: boolean; isFocusedInput: boolean; maxCol: number; get dangerousCells(): CellPosition[]; get selectedCells(): TableCellElement[]; get isExistSelectedCell(): boolean; constructor(); initEditor(editor: Editor): void; getSelectedCellPositions(): CellPosition[]; publishDangerousCells(value: CellPosition[]): void; setSelectedColumnsAndRowIndex(): void; setSelectedCells(cells: CellPosition[], pos: TablePosition, metaKey?: boolean): void; selectRow(editor: Editor, index: number, event?: MouseEvent): void; selectColumn(editor: Editor, index: number, event?: MouseEvent): void; selectTable(editor: Editor, metaKey?: boolean): void; selectCellStart(cell: HTMLTableCellElement, editor: Editor): void; selectCells(editor: Editor, metaKey?: boolean): void; selectFirstCell(): void; selectCell(cell: HTMLTableCellElement, editor: Editor, metaKey?: boolean): void; selectCellOngoing(cell: HTMLTableCellElement, editor: Editor, event?: MouseEvent): void; clearSelectedCells(): void; clearLastFocusPath(): void; selectedCellsChange(): Observable; cellsPositionChange(): Observable; changeCells(): void; emitTableChange(): void; tableChange(): Observable; selectCellEnd(): void; dangerousCellsChange(): Observable; setDangerousCells(): void; clearDangerousCells(): void; dangerousOrSelectedCellsChange(): Observable; setDangerousRows(): void; setDangerousColumns(): void; setDangerousTable(): void; /** * 聚焦单元格并设置聚焦相关路径及元素 */ focusCell(path: number[]): void; /** * 区域选择开始 * @param editor 编辑器对象 * @param cell 单元格元素 */ areaSelectionStart(cell: HTMLTableCellElement, editor: Editor): void; /** * 设置区域选择的单元格 * @param cellElement 单元格元素 */ setAreaSelectionCells(cellElement: TableCellElement, event?: MouseEvent): void; /** * 处理区域选择启用时选择整行/整列 * @param cells 选择的单元格 */ areaSelectRowAndColumn(cells: CellPosition[], event?: MouseEvent): void; /** * 设置指定 anchorCellPath * @param path 路径 */ setAnchorCellPath(path: number[]): void; selectCellInDirection(direction: TableSelectCellDirection): void; destroy(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare enum TheLocaleType { zhHans = "zh-hans", zhHant = "zh-hant", enUs = "en-us", jaJp = "ja-jp", deDe = "de-de", ruRu = "ru-ru" } interface TheI18nLocale { id: TheLocaleType; translations: TheI18nTranslation; } interface TheI18nTranslation { link: string; conversion: string; conversionHint: string; search: string; noData: string; searchResult: string; autoWrap: string; copy: string; copySuccess: string; copyFailed: string; delete: string; text: string; enterText: string; textRequired: string; enterLink: string; apply: string; cancel: string; linkRequired: string; linkPattern: string; insertRow: string; insertCol: string; insertUpward: string; insertDownward: string; insertLeft: string; insertRight: string; row: string; column: string; titleRow: string; titleCol: string; orderCol: string; cellBackground: string; colEqualWidth: string; fullscreen: string; table: string; tableDesc: string; tableOptions: string; mergeCells: string; splitCells: string; deleteEntireRow: string; deleteEntireCol: string; deleteTable: string; clearSelection: string; deleteTheRow: string; deleteTheColumn: string; base: string; alignment: string; alignLeft: string; alignCenter: string; alignRight: string; wrapLeft: string; wrapRight: string; verticalAlign: string; verticalAlignTop: string; verticalAlignMiddle: string; verticalAlignBottom: string; blockquote: string; blockquoteDesc: string; code: string; codeDesc: string; fontColor: string; backgroundColor: string; headingList: string; paragraph: string; heading1: string; heading1Desc: string; heading2: string; heading2Desc: string; heading3: string; heading3Desc: string; heading4: string; heading4Desc: string; heading5: string; heading5Desc: string; heading6: string; heading6Desc: string; divider: string; dividerDesc: string; image: string; imageDesc: string; increaseIndent: string; decreaseIndent: string; inlineCode: string; linkDesc: string; orderedList: string; orderedListDesc: string; unorderedList: string; unorderedListDesc: string; bold: string; italic: string; strike: string; underline: string; undo: string; redo: string; paintFormat: string; cleanFormat: string; checkItem: string; checkItemDesc: string; more: string; fontSize: string; } declare class TheI18nService { private locales; private defaultLocaleId; private locale; setLocale(id: string): void; getLocale(): Signal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare function injectTranslations(theI18nService: TheI18nService): Signal; declare const THE_I18N_LOCALE_ID: InjectionToken; declare const THE_I18N_ZH_HANS: InjectionToken; declare const THE_I18N_ZH_HANT: InjectionToken; declare const THE_I18N_EN_US: InjectionToken; declare const THE_I18N_JA_JP: InjectionToken; declare const THE_I18N_DE_DE: InjectionToken; declare const THE_I18N_RU_RU: InjectionToken; declare const _default$5: { id: TheLocaleType; translations: { link: string; conversion: string; conversionHint: string; search: string; noData: string; searchResult: string; autoWrap: string; copy: string; copySuccess: string; copyFailed: string; delete: string; text: string; enterText: string; textRequired: string; enterLink: string; apply: string; cancel: string; linkRequired: string; linkPattern: string; insertRow: string; insertCol: string; insertUpward: string; insertDownward: string; insertLeft: string; insertRight: string; row: string; column: string; titleRow: string; titleCol: string; orderCol: string; cellBackground: string; colEqualWidth: string; fullscreen: string; table: string; tableDesc: string; tableOptions: string; mergeCells: string; splitCells: string; deleteEntireRow: string; deleteEntireCol: string; deleteTable: string; clearSelection: string; deleteTheRow: string; deleteTheColumn: string; base: string; alignment: string; alignLeft: string; alignCenter: string; alignRight: string; wrapLeft: string; wrapRight: string; verticalAlign: string; verticalAlignTop: string; verticalAlignMiddle: string; verticalAlignBottom: string; blockquote: string; blockquoteDesc: string; code: string; codeDesc: string; fontColor: string; backgroundColor: string; headingList: string; paragraph: string; heading1: string; heading1Desc: string; heading2: string; heading2Desc: string; heading3: string; heading3Desc: string; heading4: string; heading4Desc: string; heading5: string; heading5Desc: string; heading6: string; heading6Desc: string; divider: string; dividerDesc: string; image: string; imageDesc: string; increaseIndent: string; decreaseIndent: string; inlineCode: string; linkDesc: string; orderedList: string; orderedListDesc: string; unorderedList: string; unorderedListDesc: string; bold: string; italic: string; strike: string; underline: string; undo: string; redo: string; paintFormat: string; cleanFormat: string; checkItem: string; checkItemDesc: string; more: string; fontSize: string; }; }; declare const _default$4: { id: TheLocaleType; translations: { link: string; conversion: string; conversionHint: string; search: string; noData: string; searchResult: string; autoWrap: string; copy: string; copySuccess: string; copyFailed: string; delete: string; text: string; enterText: string; textRequired: string; enterLink: string; apply: string; cancel: string; linkRequired: string; linkPattern: string; insertRow: string; insertCol: string; insertUpward: string; insertDownward: string; insertLeft: string; insertRight: string; row: string; column: string; titleRow: string; titleCol: string; orderCol: string; cellBackground: string; colEqualWidth: string; fullscreen: string; table: string; tableDesc: string; tableOptions: string; mergeCells: string; splitCells: string; deleteEntireRow: string; deleteEntireCol: string; deleteTable: string; clearSelection: string; deleteTheRow: string; deleteTheColumn: string; base: string; alignment: string; alignLeft: string; alignCenter: string; alignRight: string; wrapLeft: string; wrapRight: string; verticalAlign: string; verticalAlignTop: string; verticalAlignMiddle: string; verticalAlignBottom: string; blockquote: string; blockquoteDesc: string; code: string; codeDesc: string; fontColor: string; backgroundColor: string; headingList: string; paragraph: string; heading1: string; heading1Desc: string; heading2: string; heading2Desc: string; heading3: string; heading3Desc: string; heading4: string; heading4Desc: string; heading5: string; heading5Desc: string; heading6: string; heading6Desc: string; divider: string; dividerDesc: string; image: string; imageDesc: string; increaseIndent: string; decreaseIndent: string; inlineCode: string; linkDesc: string; orderedList: string; orderedListDesc: string; unorderedList: string; unorderedListDesc: string; bold: string; italic: string; strike: string; underline: string; undo: string; redo: string; paintFormat: string; cleanFormat: string; checkItem: string; checkItemDesc: string; more: string; fontSize: string; }; }; declare const _default$3: { id: TheLocaleType; translations: { link: string; conversion: string; conversionHint: string; search: string; noData: string; searchResult: string; autoWrap: string; copy: string; copySuccess: string; copyFailed: string; delete: string; text: string; enterText: string; textRequired: string; enterLink: string; apply: string; cancel: string; linkRequired: string; linkPattern: string; insertRow: string; insertCol: string; insertUpward: string; insertDownward: string; insertLeft: string; insertRight: string; row: string; column: string; titleRow: string; titleCol: string; orderCol: string; cellBackground: string; colEqualWidth: string; fullscreen: string; table: string; tableDesc: string; tableOptions: string; mergeCells: string; splitCells: string; deleteEntireRow: string; deleteEntireCol: string; deleteTable: string; clearSelection: string; deleteTheRow: string; deleteTheColumn: string; base: string; alignment: string; alignLeft: string; alignCenter: string; alignRight: string; wrapLeft: string; wrapRight: string; verticalAlign: string; verticalAlignTop: string; verticalAlignMiddle: string; verticalAlignBottom: string; blockquote: string; blockquoteDesc: string; code: string; codeDesc: string; fontColor: string; backgroundColor: string; headingList: string; paragraph: string; heading1: string; heading1Desc: string; heading2: string; heading2Desc: string; heading3: string; heading3Desc: string; heading4: string; heading4Desc: string; heading5: string; heading5Desc: string; heading6: string; heading6Desc: string; divider: string; dividerDesc: string; image: string; imageDesc: string; increaseIndent: string; decreaseIndent: string; inlineCode: string; linkDesc: string; orderedList: string; orderedListDesc: string; unorderedList: string; unorderedListDesc: string; bold: string; italic: string; strike: string; underline: string; undo: string; redo: string; paintFormat: string; cleanFormat: string; checkItem: string; checkItemDesc: string; more: string; fontSize: string; }; }; declare const _default$2: { id: TheLocaleType; translations: { link: string; conversion: string; conversionHint: string; search: string; noData: string; searchResult: string; autoWrap: string; copy: string; copySuccess: string; copyFailed: string; delete: string; text: string; enterText: string; textRequired: string; enterLink: string; apply: string; cancel: string; linkRequired: string; linkPattern: string; insertRow: string; insertCol: string; insertUpward: string; insertDownward: string; insertLeft: string; insertRight: string; row: string; column: string; titleRow: string; titleCol: string; orderCol: string; cellBackground: string; colEqualWidth: string; fullscreen: string; table: string; tableDesc: string; tableOptions: string; mergeCells: string; splitCells: string; deleteEntireRow: string; deleteEntireCol: string; deleteTable: string; clearSelection: string; deleteTheRow: string; deleteTheColumn: string; base: string; alignment: string; alignLeft: string; alignCenter: string; alignRight: string; wrapLeft: string; wrapRight: string; verticalAlign: string; verticalAlignTop: string; verticalAlignMiddle: string; verticalAlignBottom: string; blockquote: string; blockquoteDesc: string; code: string; codeDesc: string; fontColor: string; backgroundColor: string; headingList: string; paragraph: string; heading1: string; heading1Desc: string; heading2: string; heading2Desc: string; heading3: string; heading3Desc: string; heading4: string; heading4Desc: string; heading5: string; heading5Desc: string; heading6: string; heading6Desc: string; divider: string; dividerDesc: string; image: string; imageDesc: string; increaseIndent: string; decreaseIndent: string; inlineCode: string; linkDesc: string; orderedList: string; orderedListDesc: string; unorderedList: string; unorderedListDesc: string; bold: string; italic: string; strike: string; underline: string; undo: string; redo: string; paintFormat: string; cleanFormat: string; checkItem: string; checkItemDesc: string; more: string; fontSize: string; }; }; declare const _default$1: { id: TheLocaleType; translations: { link: string; conversion: string; conversionHint: string; search: string; noData: string; searchResult: string; autoWrap: string; copy: string; copySuccess: string; copyFailed: string; delete: string; text: string; enterText: string; textRequired: string; enterLink: string; apply: string; cancel: string; linkRequired: string; linkPattern: string; insertRow: string; insertCol: string; insertUpward: string; insertDownward: string; insertLeft: string; insertRight: string; row: string; column: string; titleRow: string; titleCol: string; orderCol: string; cellBackground: string; colEqualWidth: string; fullscreen: string; table: string; tableDesc: string; tableOptions: string; mergeCells: string; splitCells: string; deleteEntireRow: string; deleteEntireCol: string; deleteTable: string; clearSelection: string; deleteTheRow: string; deleteTheColumn: string; base: string; alignment: string; alignLeft: string; alignCenter: string; alignRight: string; wrapLeft: string; wrapRight: string; verticalAlign: string; verticalAlignTop: string; verticalAlignMiddle: string; verticalAlignBottom: string; blockquote: string; blockquoteDesc: string; code: string; codeDesc: string; fontColor: string; backgroundColor: string; headingList: string; paragraph: string; heading1: string; heading1Desc: string; heading2: string; heading2Desc: string; heading3: string; heading3Desc: string; heading4: string; heading4Desc: string; heading5: string; heading5Desc: string; heading6: string; heading6Desc: string; divider: string; dividerDesc: string; image: string; imageDesc: string; increaseIndent: string; decreaseIndent: string; inlineCode: string; linkDesc: string; orderedList: string; orderedListDesc: string; unorderedList: string; unorderedListDesc: string; bold: string; italic: string; strike: string; underline: string; undo: string; redo: string; paintFormat: string; cleanFormat: string; checkItem: string; checkItemDesc: string; more: string; fontSize: string; }; }; declare const _default: { id: TheLocaleType; translations: { link: string; conversion: string; conversionHint: string; search: string; noData: string; searchResult: string; autoWrap: string; copy: string; copySuccess: string; copyFailed: string; delete: string; text: string; enterText: string; textRequired: string; enterLink: string; apply: string; cancel: string; linkRequired: string; linkPattern: string; insertRow: string; insertCol: string; insertUpward: string; insertDownward: string; insertLeft: string; insertRight: string; row: string; column: string; titleRow: string; titleCol: string; orderCol: string; cellBackground: string; colEqualWidth: string; fullscreen: string; table: string; tableDesc: string; tableOptions: string; mergeCells: string; splitCells: string; deleteEntireRow: string; deleteEntireCol: string; deleteTable: string; clearSelection: string; deleteTheRow: string; deleteTheColumn: string; base: string; alignment: string; alignLeft: string; alignCenter: string; alignRight: string; wrapLeft: string; wrapRight: string; verticalAlign: string; verticalAlignTop: string; verticalAlignMiddle: string; verticalAlignBottom: string; blockquote: string; blockquoteDesc: string; code: string; codeDesc: string; fontColor: string; backgroundColor: string; headingList: string; paragraph: string; heading1: string; heading1Desc: string; heading2: string; heading2Desc: string; heading3: string; heading3Desc: string; heading4: string; heading4Desc: string; heading5: string; heading5Desc: string; heading6: string; heading6Desc: string; divider: string; dividerDesc: string; image: string; imageDesc: string; increaseIndent: string; decreaseIndent: string; inlineCode: string; linkDesc: string; orderedList: string; orderedListDesc: string; unorderedList: string; unorderedListDesc: string; bold: string; italic: string; strike: string; underline: string; undo: string; redo: string; paintFormat: string; cleanFormat: string; checkItem: string; checkItemDesc: string; more: string; fontSize: string; }; }; declare class TheTableContextMenuService { private tableStore; private thyPopover; private ngZone; private theContextService; locale: Signal; menuRef: ThyPopoverRef; get isOpened(): TheContextMenu; get editor(): _worktile_theia.TheEditor; get backgroundColor(): string; constructor(tableStore: TableStore, thyPopover: ThyPopover, ngZone: NgZone, theContextService: TheContextService); menuEntities: MenuEntity[]; getSelectedCell(): { row: number; col: number; selectCellNodes: { node: _worktile_theia.TableCellElement; row: number; col: number; }[]; }; getTargetRowOrColIndex(isFront?: boolean): { targetRowIndex: number; targetColIndex: number; }; openMenuList(event: MouseEvent): void; closeContextMenu(): rxjs.Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class TableFreezeColumnPipe implements PipeTransform { transform(table: TableElement, tablePluginOptions: ThePluginTableOption, tableWrapperWidth: number, editor?: TheEditor): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class TableFreezeRowPipe implements PipeTransform { transform(table: TableElement, tablePluginOptions: ThePluginTableOption, editor?: TheEditor): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class TableService { private thyPopover; private overlay; private tableStore; private ngZone; backdropClosable: boolean; hasBackdrop: boolean; insideClosable: boolean; placement: ThyPlacement; offset: number; toolbarRef: ThyPopoverRef; get isOpened(): any; constructor(thyPopover: ThyPopover, overlay: Overlay, tableStore: TableStore, ngZone: NgZone); private openToolbar; afterSelectedCells(origin: HTMLElement, element: TableElement, isMobileMode: boolean): void; getOrigin(origin: HTMLElement): HTMLElement; closeToolbar(): rxjs.Observable; /** * 判断是否触发了点选,并处理点选状态 * @param e 事件对象 * @param tbody tbody元素 */ handleKeydownForPointerSelection(e: KeyboardEvent, tbody: HTMLElement): void; /** * 判断是否触发了区域选择,并处理区域选择状态 * @param e 事件对象 * @param tbody tbody元素 */ handleKeydownForAreaSelection(e: KeyboardEvent, tbody: HTMLElement): void; /** * 进行区域选择时,阻止默认的选区事件 * @param e 事件对象 * @param editor 编辑器对象 */ selectStartPreventDefault(e: KeyboardEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class TheTable extends TheBaseElement implements OnInit, AfterViewInit, OnDestroy { eventDispatcher: TableCellEventDispatcher; resizeNotifier: ColumnResizeNotifierSource; tableStore: TableStore; cdr: ChangeDetectorRef; ngZone: NgZone; injector: Injector; scrollDispatcher: ScrollDispatcher; overlay: Overlay; tableService: TableService; private theTableContextMenuService; private freezeColumnPipe; freezeRowPipe: TableFreezeRowPipe; private renderer; private contextService; private config; headerRow: boolean; isSelectedAllCell: boolean; destroy$: Subject; rowControls: { height: number; rowIndex: number; }[]; colControls: any[]; isInTable: boolean; tablePluginOptions: ThePluginOption; isStickyTop: boolean; scrollContainerTop: number; isRightShadow: boolean; isLeftShadow: boolean; previousScrollContainer: string; columns: TheTableColumn[]; isMobileMode: boolean; selectedCells: TableCellElement[]; tableWrapperWidth: number; tableWrapperLeft: number; isFreezeRow: boolean; isFreezeColumn: boolean; disabledHorizontalScrollbarFixed: i0.WritableSignal; get nativeElement(): HTMLElement; get tbodyNativeElement(): HTMLElement; tableWrapper: ElementRef; theTableElement: ElementRef; tbodyElement: ElementRef; tableRowControlsWrapper: ElementRef; columnControlsWrapper: ElementRef; cornerControl: ElementRef; rowControlsInner: ElementRef; headerRowLeftShadow: ElementRef; headerRowRightShadow: ElementRef; colgroup: ElementRef; rowControlsButtonWrapper: QueryList>; horizontalScrollbarContainer: ElementRef; horizontalScrollbarContent: ElementRef; getOutletParent: () => any; onContextChange(): void; afterChildrenViewUpdate(): void; afterRowControlsUpdate(): void; constructor(eventDispatcher: TableCellEventDispatcher, resizeNotifier: ColumnResizeNotifierSource, tableStore: TableStore, cdr: ChangeDetectorRef, ngZone: NgZone, injector: Injector, scrollDispatcher: ScrollDispatcher, overlay: Overlay, tableService: TableService, theTableContextMenuService: TheTableContextMenuService, freezeColumnPipe: TableFreezeColumnPipe, freezeRowPipe: TableFreezeRowPipe, renderer: Renderer2, contextService: TheContextService, config: TheModeConfig); ngOnInit(): void; getWrapperWidthAndLeft(): void; ngAfterViewInit(): void; setHeaderRowShadow(): void; calcHeaderRowShadow(): { height: number; top: number; }; subscribeScrollContainerScroll(): void; applyHeaderCellClass(isHeaderCell: boolean, cell: TableCellElement, className: string): void; private updateFreezeState; setTableHeaderStyle(): void; setHeaderCellClass(): void; setHeaderColumnStickyCellClass(): void; setHeaderRowStyle(): void; setGridColumnsStyle(): void; getStickRowElements(): { firstHeaderRow: Element; columnControlsWrapper: HTMLElement; tableCornerControl: HTMLElement; rowControlInner: HTMLElement; firstRowControlButton: HTMLElement; }; setStickyRowStyle(): void; setTableScrollingShadow(): void; setTableLeftShadow(scrollLeft?: number): void; setTableRightShadow(scrollLeft?: number): void; subscribeCellPositionChange(): void; subscribeCellsChange(): void; useRowControls(): void; detectChanges(): void; resolveImage(): Promise | Promise; getColControls(): void; getIsInTable(): void; initializeColumns(): void; initializeRows(): void; transformRowHeight(rowIndex: number): void; transformColumnsWidth(): void; onColMousedown(event: MouseEvent, index: number): void; onRowMousedown(event: MouseEvent, index: number): void; onSelectTable(event: MouseEvent): void; listenTableContextMenuEvent(): void; listenOnSelectedCells(): void; listenKeydownEvent(): void; private listenSelectstartEvent; setStickyRowPointerEvents(pointerEventsStyle: string): void; listenTableWrapperScroll(): void; updateStickyRowScrollLeft(): void; setStickyElementLeftStyle(): void; getColControlButtonWidth: () => number; trackByFnRowControls(index: number): number; trackByFnColControls(index: number): number; ngOnDestroy(): void; private initHorizontalScrollbar; private bindScrollbarEvents; private updateHorizontalScrollbar; private setScrollbarWidth; private updateScrollbarFixedState; private getViewportBottom; private setScrollbarFixed; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } interface TheTableBase extends TheBaseElement { initializeColumns: () => void; transformColumnsWidth: () => void; initializeRows: () => void; transformRowHeight: (rowIndex: number) => void; } interface TheTableColumn { width: number; } interface TheTableOptions { headerRow?: boolean; headerColumn?: boolean; numberedColumn?: boolean; } interface MenuEntity { icon: string; name: string; key: string; divider?: boolean; extendIcon?: string; visibility?: boolean; isInputNumber?: boolean; nameSuffix?: string; count?: number; backgroundColor?: string; actionHandle: (entity: MenuEntity) => void; activeHandle?: (event: MouseEvent, entity?: MenuEntity) => void; deactivateHandle?: (event: MouseEvent) => void; } declare enum FullscreenState { on = "on", off = "off" } interface ThePluginTableOption { freezeColumnHeader?: boolean | ((editor: Editor) => boolean); freezeRowHeader?: boolean | ((editor: Editor) => boolean); disabledHorizontalScrollbarFixed?: boolean; showFullscreen?: boolean; setFullscreen?: (editor: Editor, event: MouseEvent, element: Element$1) => void; fullscreenAction?: (editor: Editor) => Observable<{ element: Element$1 | undefined; state: FullscreenState; }>; rowSelect?: (editor: Editor, data: { index: number; cells: TableCellElement[]; }) => void; colSelect?: (editor: Editor, data: { index: number; cells: TableCellElement[]; }) => void; tableSelect?: (editor: Editor, data: { table: TableElement; }) => void; deselect?: (editor: Editor) => void; } interface CellPosition { row: number; col: number; } interface TableOptionsFormat { typeTable?: ElementKinds.table; typeRow?: ElementKinds.tableRow; typeCell?: ElementKinds.tableCell; typeContent?: ElementKinds.tableContent; exitBlockType?: string; defaultWidth?: number; minWidth?: number; maxWidth?: number; } declare class TableOptions { typeTable: ElementKinds.table; typeRow: ElementKinds.tableRow; typeCell: ElementKinds.tableCell; typeContent: ElementKinds.tableContent; exitBlockType: ElementKinds.paragraph; defaultWidth: number; minWidthPx: number; maxWidthPx: number; minHeightPx: number; maxHeightPx: number; constructor(options?: TableOptionsFormat); } declare enum TableSelectCellDirection { up = 0, right = 1, down = 2, left = 3 } interface TheElement { type: T; children: Descendant[]; key?: string; _id?: string; voids?: boolean; align?: Alignment; indent?: number; textIndent?: number; verticalAlign?: VerticalAlignment; } interface ParagraphElement extends TheElement { type: ElementKinds.paragraph; } interface BlockQuoteElement extends TheElement { type: ElementKinds.blockquote; } interface BulletedListElement extends TheElement { type: ElementKinds.bulletedList; start?: number; } interface NumberedListElement extends TheElement { type: ElementKinds.numberedList; start?: number; } interface ListItemElement extends TheElement { type: ElementKinds.listItem; start?: number; children: Element$1[]; } interface LinkElement extends TheElement { type: ElementKinds.link; url: string; } interface TodoItemElement extends TheElement { type: ElementKinds.checkItem; checked: boolean; } interface HeadingElement extends TheElement { type: ElementKinds.heading_1 | ElementKinds.heading_2 | ElementKinds.heading_3 | ElementKinds.heading_4 | ElementKinds.heading_5 | ElementKinds.heading_6; isCollapsed?: boolean; } interface HeadingOneElement extends HeadingElement { type: ElementKinds.heading_1; } interface HeadingTwoElement extends HeadingElement { type: ElementKinds.heading_2; } interface HeadingThreeElement extends HeadingElement { type: ElementKinds.heading_3; } interface HeadingFourElement extends HeadingElement { type: ElementKinds.heading_4; } interface HeadingFiveElement extends HeadingElement { type: ElementKinds.heading_5; } interface HeadingSixElement extends HeadingElement { type: ElementKinds.heading_6; } interface ImageElement extends TheElement { type: ElementKinds.image; children: EmptyText[]; file?: File; name?: string; width?: number; height?: number; originWidth?: number; originHeight?: number; url?: string; thumbUrl?: string; originUrl?: string; align?: Alignment; layout?: LayoutTypes; reSized?: boolean; size?: number; externalUrl?: string; } interface TableElement extends TheElement { type: ElementKinds.table; children: TableRowElement[]; columns?: TheTableColumn[]; options?: TheTableOptions; } interface TableRowElement extends TheElement { type: ElementKinds.tableRow; children: TableCellElement[]; header?: boolean; height?: number; } interface TableCellElement extends TheElement { key?: string; type: ElementKinds.tableCell; colspan?: number; rowspan?: number; hidden?: boolean; backgroundColor?: string; } interface HrElement extends TheElement { type: ElementKinds.hr; children: EmptyText[]; } interface CodeElement extends TheElement { type: ElementKinds.code; children: EmptyText[]; content?: string; language?: string; height?: number; autoWrap?: boolean; } interface EditableVoidElement { type: 'editable-void'; children: EmptyText[]; } interface InlineCodeElement extends TheElement { type: ElementKinds.inlineCode; } type CustomElement = BlockQuoteElement | NumberedListElement | BulletedListElement | TodoItemElement | HeadingOneElement | HeadingTwoElement | HeadingThreeElement | HeadingFourElement | HeadingFiveElement | HeadingSixElement | ImageElement | LinkElement | ListItemElement | ParagraphElement | TableElement | TableRowElement | TableCellElement | HrElement | InlineCodeElement | CodeElement; type CustomText = { bold?: boolean; italic?: boolean; code?: boolean; text: string; underlined?: boolean; color?: string; [`background-color`]?: string; }; type EmptyText = { text: string; }; type CustomEditor = TheEditor; type Get = T[P]; type CustomElementKinds = Get; declare enum ElementKinds { image = "image", paragraph = "paragraph", headingList = "heading-list", heading_1 = "heading-one", heading_2 = "heading-two", heading_3 = "heading-three", heading_4 = "heading-four", heading_5 = "heading-five", heading_6 = "heading-six", numberedList = "numbered-list", bulletedList = "bulleted-list", listItem = "list-item", checkItem = "check-item", table = "table", tableRow = "table-row", tableCell = "table-cell", tableContent = "paragraph", code = "code", blockquote = "block-quote", hr = "hr", link = "link", default = "paragraph", inlineCode = "inline-code", indent = "indent" } declare const HeaderLevelMap: { "heading-one": number; "heading-two": number; "heading-three": number; "heading-four": number; "heading-five": number; "heading-six": number; }; declare enum Alignment { left = "left", center = "center", right = "right" } declare enum VerticalAlignment { top = "top", middle = "middle", bottom = "bottom" } declare enum LayoutTypes { wrapLeft = "wrap-left", wrapRight = "wrap-right" } declare enum FontSizes { fontSize12 = "12", fontSize13 = "13", fontSize14 = "14", fontSize15 = "15", fontSize16 = "16", fontSize18 = "18", fontSize20 = "20", fontSize24 = "24", fontSize28 = "28", fontSize32 = "32", fontSize40 = "40", fontSize48 = "48" } declare const FontSizeTypes: FontSizes[]; declare enum Indents { indentRight = "indent-right", indentLeft = "indent-left" } declare enum ScrollDirection { X = 0, Y = 1 } declare enum MarkTypes { bold = "bold", italic = "italic", underline = "underlined", strike = "strike", color = "color", backgroundColor = "background-color", fontSize = "font-size" } declare enum ToolbarActionTypes { split = "split", undo = "undo", redo = "redo", paintformat = "paintformat", clean = "clean", alignType = "align-type", alignLeft = "align-left", alignCenter = "align-center", alignRight = "align-right", verticalAlign = "vertical-align", verticalAlignTop = "vertical-align-top", verticalAlignMiddle = "vertical-align-middle", verticalAlignBottom = "vertical-align-bottom", headingList = "heading-list", tableRemove = "table-remove", tableDeleteRows = "table-delete-rows", tableDeleteColumns = "table-delete-columns", group = "group" } declare const MarkProps: Array; declare const STANDARD_HEADING_TYPES: CustomElementKinds[]; declare const HEADING_TYPES: CustomElementKinds[]; declare const ALIGN_BLOCK_TYPES: CustomElementKinds[]; declare const CONTAINER_BLOCKS: CustomElementKinds[]; declare const LIST_BLOCK_TYPES: CustomElementKinds[]; declare const VOID_BLOCK_TYPES: CustomElementKinds[]; declare const BLOCK_DELETE_BACKWARD_TYPES: CustomElementKinds[]; declare const DISABLED_OPERATE_TYPES: CustomElementKinds[]; declare const LOWEST_TEXT_CONTAINER_TYPES: CustomElementKinds[]; declare enum ErrorCodes { UNKNOW_ERROR = 1000, IMAGE_ERR_MIME_FORMAT = 1001, IMAGE_ERR_SIZE_LIMIT = 1002 } declare const DEFAULT_LANGUAGE: { showName: string; value: string; }; declare const CODE_MODES: { showName: string; value: string; }[]; declare const CODEMIRROR_PADDING_TOP = 10; declare const CODEMIRROR_DEFAULT_MAX_HEIGHT = 350; declare class TheToolbarGroup implements OnInit, OnDestroy { elementRef: ElementRef; private thyPopover; private viewContainerRef; private i18n; private _item; locale: Signal; className: string; menus: DefaultToolbarItem[]; set item(i: DefaultToolbarItem); get item(): DefaultToolbarItem; get isOpened(): boolean; editor: Editor; active: boolean; activeMenuItem: DefaultToolbarItem; groupPopoverRef: ThyPopoverRef; groupTemplate: TemplateRef; mousedownHandler(event: any): void; documentMouseupHandle(event: any): void; clickHandle(event: any): void; constructor(elementRef: ElementRef, thyPopover: ThyPopover, viewContainerRef: ViewContainerRef, i18n: TheI18nService); ngOnInit(): void; ngOnDestroy(): void; toggleGroupMenus(event: MouseEvent): void; selectionChange(editor: Editor): void; menusActive(editor: Editor): DefaultToolbarItem; activeChange(): void; openGroup(event: MouseEvent): void; closeGroup(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const TheToolbarGroupToken: InjectionToken>; declare enum DropdownMode { icon = "icon-mode", text = "text-mode" } declare const DefaultGlobalToolbarDefinition: ToolbarKey[]; declare const DefaultInlineToolbarDefinition: ToolbarKey[]; declare const ToolbarMoreGroup: ToolbarItem; declare function getTheDefaultPluginMenu(locale: Signal): ThePluginMenuItemConfig[]; declare enum ThePluginMenuItemType { icon = "iconMenu", group = "groupMenu" } declare enum PluginMenuIcons { heading_1 = "the-icon-heading-one", heading_2 = "the-icon-heading-two", heading_3 = "the-icon-heading-three", heading_4 = "the-icon-heading-four", numberedList = "the-icon-numbered-list", bulletedList = "the-icon-bulleted-list", link = "the-icon-link", image = "the-icon-image", blockquote = "the-icon-block-quote", code = "the-icon-code", table = "the-icon-table", hr = "the-icon-hr", checkItem = "the-icon-check-item" } declare const PluginMenuSvgs: { key: PluginMenuIcons; svg: string; }[]; declare const initializeDefaultMenuIcons: (iconRegistry: ThyIconRegistry) => void; type ColorType = string; declare const SpecialBackgroundColor = "#FFFFFF"; declare const TableHeaderBackgroundColor = "#F3F3F3"; declare const SLA_TABLE_SELECTOR = ".slate-element-table"; declare const SLA_TABLE_CELL_SELECTOR = ".slate-element-table-cell"; type ToolbarKey = MarkTypes | ElementKinds | string; declare enum ToolbarItemType { default = "default", dropdown = "dropdown" } declare enum ToolbarAlignment { left = "start", center = "center", right = "end" } type ToolbarDefinition = { global?: string[]; inline?: string[]; }; interface ToolbarItemBase { key: ToolbarKey; pluginKey?: PluginKey; execute?: (editor: Editor) => void; active?: (editor: Editor) => boolean | string; disable?: (editor: Editor) => boolean; transformToolbar?: (editor: Editor) => ToolbarDefinition | void; styles?: { [key: string]: string; }; includes?: (ToolbarKey | ToolbarItem)[]; } interface CustomizeToolbarItem extends ToolbarItemBase { iconComponent?: ComponentType$1; type?: ToolbarItemType; dropdownMode?: DropdownMode; dropdownItemKey?: ToolbarKey; dropdownFixedIcon?: boolean; isHideDropdownActionIcon?: boolean; } interface DefaultToolbarItem extends ToolbarItemBase { icon?: string; name?: string; shortcutKey?: string; type?: ToolbarItemType; width?: number; } type ToolbarItem = CustomizeToolbarItem & DefaultToolbarItem; type ToolbarEntity = { global?: ToolbarItem[]; inline?: ToolbarItem[]; }; interface ToolbarInitOption { toolbarDefinition: ToolbarDefinition; toolbarEntity: ToolbarEntity; toolbarOperations: Map; } interface ToolbarOption extends ToolbarDefinition { align?: ToolbarAlignment; } interface ToolbarItemsComposeReturn { items: ToolbarItem[]; group: ToolbarItem[]; } declare class TheToolbarComponent implements OnInit, OnChanges, OnDestroy { private cdr; private elementRef; private ngZone; private toolbarGroup; editor: Editor; toolbarItems: ToolbarItem[]; align: ToolbarAlignment; containerClass: string[]; isMore: boolean; afterTemplate: TemplateRef; toolbarContainer: ViewContainerRef; get justifyContent(): ToolbarAlignment; components: Map>; composeToolbarItems: ToolbarItemsComposeReturn; moreGroupMenu: ToolbarItem; resizeObserver: ResizeObserver; elementWidth: number; constructor(cdr: ChangeDetectorRef, elementRef: ElementRef, ngZone: NgZone, toolbarGroup: ComponentType); ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; setToolbarClass(): void; private resizeElement; selectionChange(editor: Editor): void; renderToolbarView(): void; /** * calculation display toolbar and more grouped toolbars * * ┌──────────────────────────────────────── GlobalToolbarView ───────────────────────────────────┐ * | ┌─────────────────────────────────────── #children ─────────────────────────────────────────┐ | * | | ┌─────── #itemsView ────────┐ ┌──────────────────────┐ ┌── #groupedItemsDropdown ───┐ | | * | | | #ungroupedItems | | ToolbarSeparatorView | | #groupedItems | | | * | | └──────────────────────────-┘ └──────────────────────┘ └────────────────────────────┘ | | * | | \---------- only when toolbar items overflow --------/ | | * | └───────────────────────────────────────────────────────────────────────────────────────────┘ | * └───────────────────────────────────────────────────────────────────────────────────────────────┘ */ private toolbarItemsCompose; /** * split width: 13px * item width: default item: 32px * dropdown item: 48px * default paddingRight: 4px */ private getItemWidth; /** * filter adjacent repeated dividers * @param {ToolbarItem[]} items * @returns * @memberof TheToolbarComponent */ pureToolbarItems(items: ToolbarItem[]): ToolbarItem[]; private createToolbarItem; private createToolbarSplit; private createMoreGroup; private viewComponentType; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const createPluginFactory:

(defaultPlugin: ThePlugin<{}, NoInfer

>) => (override?: Partial>>, overrideByKey?: OverrideByKey) => ThePlugin>; declare const createToolbar: (editor: TheEditor, global?: string[], inline?: string[]) => { globalToolbarClass: string[]; toolbarEntity: ToolbarEntity; }; declare abstract class TheBaseToolbarItem { set toolbarItem(value: ToolbarItem); get toolbarItem(): ToolbarItem; editor: Editor; itemMousedownHandle: (item: ToolbarItem) => void; disabled: boolean; active: string | boolean; _toolbarItem: ToolbarItem; class: boolean; get disabledState(): boolean; get activeState(): string | boolean; locale: Signal; constructor(); execute(event: MouseEvent): void; selectionChange(editor?: Editor): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare abstract class TheBaseToolbarDropdown extends TheBaseToolbarItem { activeMenuItem: ToolbarItem; menus: ToolbarItem[]; mode: DropdownMode; dropdownItemKey: ToolbarKey; get defaultDropdownItem(): ToolbarItem; constructor(); selectionChange(editor: Editor): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * 循环 plugins 到 editor.plugins 和 editor.pluginsByKey * 如果有 key 重复则进行覆盖 */ declare const flattenDeepPlugins: (editor: TheEditor, plugins?: ThePlugin[]) => void; declare const getPlugins: (editor: TheEditor) => ThePlugin[]; declare const getPlugin:

(editor: TheEditor, key: PluginKey) => WithThePlugin; declare const getPluginOptions:

(editor: TheEditor, key: PluginKey) => ThePluginOption

; declare const mergeOptions: (plugin: ThePlugin>, override: OverrideByKey) => void; declare const combinePlugins: (editor: TheEditor) => TheEditor; declare const mergeDeepPlugins: [] = ThePlugin[]>(editor: TheEditor, _plugins: P) => void; declare const nestedStructureByKey: (editor: TheEditor, plugins?: ThePlugin[]) => void; declare const pluginsByKey: (editor: TheEditor, plugins?: ThePlugin[]) => void; declare const mergeArray: (origin: T[], source: T[]) => T[]; /** * 构建插入菜单,用于绑定界面 * @param editor * @param items * @returns */ declare const buildPluginMenu: (menuItemMap: Map, items: ThePluginMenuItemConfig[]) => ThePluginMenu; declare const buildPluginMenuItemMap: (editor: Editor) => Map; /** * 构建当前位置允许插入的元素菜单 * @param editor 编辑器对象 * @param menus 插入菜单 * @returns 返回允许插入的元素菜单 */ declare const buildQuickInsertMenus: (editor: TheEditor, menus: ThePluginMenuItemConfig[]) => ThePluginMenuItemConfig[]; declare const withTheia: (editor: T, plugins?: ThePlugin[]) => TheEditor; declare class TheToolbarDropdown extends TheBaseToolbarDropdown implements OnInit { elementRef: ElementRef; private thyPopover; private viewContainerRef; private overlay; className: string; activeKeys: ToolbarKey[]; dropdownMode: typeof DropdownMode; dropdownPopoverRef: ThyPopoverRef; get isOpen(): boolean; get activeIcon(): string; get activeDropdown(): boolean; iconModeTemplate: TemplateRef; textModeTemplate: TemplateRef; dropdownTemplate: TemplateRef; constructor(elementRef: ElementRef, thyPopover: ThyPopover, viewContainerRef: ViewContainerRef, overlay: Overlay); ngOnInit(): void; selectionChange(editor: Editor): void; toggleDropdown(event: MouseEvent): void; itemMousedown(event: MouseEvent, item: ToolbarItem): void; preventDefault(event: Event): void; openDropdownPopover(event: MouseEvent): void; updatePopoverPosition(): void; closeDropdownPopover(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TheToolbarItem extends TheBaseToolbarItem implements OnInit { className: string; toggleDropdown(event: MouseEvent): void; constructor(); ngOnInit(): void; preventDefault(event: Event): void; execute(event: MouseEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const THE_LISTBOX_PARENT_OPTION_TOKEN: InjectionToken; declare const THE_LISTBOX_PARENT_GROUP_TOKEN: InjectionToken; declare const THE_LISTBOX_TOKEN: InjectionToken; type TheListboxChangeEventType = 'turn' | 'child' | 'parent' | 'init' | 'select'; declare class TheListboxOptionDirective { parentOption: TheListboxOptionDirective; parentGroup: TheListboxGroupDirective; elementRef: ElementRef; theOptionValue: ThePluginMenuItem; theOptionDisabled: boolean; className: string; _options: QueryList; private _active; get hasChild(): boolean; get firstChild(): TheListboxOptionDirective; constructor(parentOption: TheListboxOptionDirective, parentGroup: TheListboxGroupDirective, elementRef: ElementRef); getGroups(): TheListboxGroupDirective[]; setActive(active: boolean): void; getActive(): boolean; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } interface TheListboxChangeEvent { option: TheListboxOptionDirective; type: TheListboxChangeEventType; } declare class TheListboxGroupDirective implements AfterContentInit { parentOption: TheListboxOptionDirective; theListBox: TheListboxDirective; /** * 大于 1 表示水平分组,小于等于 1 表示垂直分组 */ horizontalColumn: number; className: string; _options: QueryList; options: TheListboxOptionDirective[]; constructor(parentOption: TheListboxOptionDirective, theListBox: TheListboxDirective); ngAfterContentInit(): void; filterOptions(): void; getSiblingGroups(): TheListboxGroupDirective[]; hasChild(): boolean; getFirst(): TheListboxOptionDirective; getLast(): TheListboxOptionDirective; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class TheListboxDirective implements AfterContentInit { keyboardContainer: HTMLElement; autoActiveFirstItem: boolean; theListboxChange: EventEmitter; className: string; protected _options: QueryList; protected _groups: QueryList; activeOption: TheListboxOptionDirective; groups: TheListboxGroupDirective[]; private ngZone; private elementRef; private destroyRef; ngAfterContentInit(): void; filterGroups(): void; handleKeydown(event: KeyboardEvent): void; /** * ← */ setPreviousItemActive(): void; /** * ↓ 键 */ setNextLineActive(activeOption?: TheListboxOptionDirective): void; /** * → 键 */ setNextItemActive(): void; /** * ↑ 键 */ setPreviousLineActive(): void; enterNextGroup(): void; enterPreviousGroup(): void; setActiveItem(previous: TheListboxOptionDirective | null, option: TheListboxOptionDirective, type: TheListboxChangeEventType, triggerFrom?: 'mouse' | 'keyboard'): void; getOption(key: ThePluginMenuItemKey): TheListboxOptionDirective; clearActiveItem(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class ThePreventDefaultDirective { mousedown(event: MouseEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class ThePluginMenuComponent implements OnInit { editor: Editor; theDisplaySearch: boolean; thePluginMenu: ThePluginMenuItemConfig[]; sceneKey?: string; subPanelClass: string | string[]; autoActiveFirstItem: boolean; containerClassName: string; dropdownTriggers: ThyDropdownDirective[]; locale: Signal; listBox: Signal; listBoxAutoActiveFirstItem: boolean; pathRef: PathRef; keyboardContainer: HTMLElement; _pluginMenu: ThePluginMenu; groupMenu: ThePluginMenu; iconMenu: ThePluginMenu; ThePluginMenuItemType: typeof ThePluginMenuItemType; keyWords: string; thyMessage: string; scrollContainer: HTMLElement; searchGroup: ThePluginMenuGroup; expandPopoverOptions: { placement: string; width: string; minWidth: string; }; tableSelectPopoverConfig: { panelClass: string; minWidth: number; originActiveClass: string; }; originKeywords: string; elementRef: ElementRef; private ngZone; cdr: ChangeDetectorRef; private thyPopoverRef; ngOnInit(): void; initializeSearch(): void; initializePluginMenu(): void; buildMenus(): void; listBoxOptionMouseenter(e: MouseEvent, menu: ThePluginMenuItem): void; listBoxOptionMouseleave(e: MouseEvent, menu: ThePluginMenuItem): void; handleItemSelection(menuItem: ThePluginMenuItem): void; removeBlock: () => void; removeCharacter: () => void; updateKeywords(keywords: string): void; listBoxChange(event: TheListboxChangeEvent): void; findDropdownTrigger(option: TheListboxOptionDirective): ThyDropdownDirective; trackByFn(index: ThePluginMenuItem, item: any): any; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** Indicates the width of a column. */ interface ColumnSize { /** The ID/name of the column, as defined in CdkColumnDef. */ readonly tableCell: HTMLElement; /** The width / height in pixels of the column / row. */ readonly deltaSize?: number; /** The width / height in pixels of the column / row prior to this update, if known. */ readonly previousSize?: number; } /** Interface describing column size changes. */ interface ColumnSizeAction extends ColumnSize { /** * Whether the resize action should be applied instantaneously. False for events triggered during * a UI-triggered resize (such as with the mouse) until the mouse button is released. True * for all programatically triggered resizes. */ readonly completeImmediately?: boolean; } /** * Originating source of column resize events within a table. * @docs-private */ declare class ColumnResizeNotifierSource { /** Emits when an in-progress resize is canceled. */ readonly resizeCanceled: Subject; /** Emits when a resize is applied. */ readonly resizeCompleted: Subject; readonly resizeStarted: Subject; /** Triggers a resize action. */ readonly triggerResize: Subject; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare enum Position { top = "top", right = "right", bottom = "bottom", left = "left" } declare class HoveredCellInfo { cell: HTMLTableCellElement; position: Position; } declare class TableCellEventDispatcher { private readonly ngZone; readonly tableCellHovered: Subject; readonly overlayHandleActiveForCell: Subject; constructor(ngZone: NgZone); readonly tableCellHoveredOrActiveDistinct: Observable; private readonly _tableCellHoveredDistinctReenterZone; private _lastSeenCell; private _lastSeenCellHover; /** * Emits whether the specified row should show its overlay controls. * Emission occurs within the NgZone. */ resizeOverlayVisibleForTableCell(cell: Element): Observable; private _enterZone; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class TheInlineToolbar implements OnInit, OnDestroy { private elementRef; private scrollDispatcher; private cdr; private ngZone; private contextService; editor: Editor; toolbarItems: ToolbarItem[]; inlineToolbar: TheToolbarComponent; destroy$: Subject; constructor(elementRef: ElementRef, scrollDispatcher: ScrollDispatcher, cdr: ChangeDetectorRef, ngZone: NgZone, contextService: TheContextService); ngOnInit(): void; updateInlineToolbar(): void; updatePosition(toolbarElement: HTMLElement, range: Range): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TheConversionHint implements OnInit, OnDestroy { editor: Editor; conversion: () => void; locale: Signal; duration: number; pauseOnHover: boolean; closeTimer: any; mouseenter(): void; mouseleave(): void; ngOnInit(): void; ngOnDestroy(): void; createCloseTimer(): void; clearCloseTimer(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TheContextMenu implements OnInit { elementRef: ElementRef; cdr: ChangeDetectorRef; private thyPopoverRef; menuEntities: MenuEntity[]; actionHandle: (entity: MenuEntity) => void; activeHandle: (event: MouseEvent, entity: MenuEntity) => void; deactivateHandle: (event: MouseEvent, entity: MenuEntity) => void; wrap: boolean; handleDocumentMouseDown(event: MouseEvent): void; handleMouseDown(event: MouseEvent): void; constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, thyPopoverRef: ThyPopoverRef); ngOnInit(): void; itemMousedown(event: MouseEvent, entity: MenuEntity): void; itemMouseleave(event: MouseEvent, entity: MenuEntity): void; itemMouseenter(event: MouseEvent, entity: MenuEntity): void; inputNumberFocus(e: Event): void; itemEnterHandle(e: MouseEvent, entity: MenuEntity): void; changeColor(color: string, item: MenuEntity): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TheTableSelect implements OnInit { private popoverRef; optionsParam: TableOptions; editor: TheEditor; beforeInsert: () => void; tableData: any[]; maxRowIndex: number; maxColIndex: number; constructor(popoverRef: ThyPopoverRef); ngOnInit(): void; onSelectCells(rowIndex: any, colIndex: any): void; executeTable(event: MouseEvent, rowIndex: number, colIndex: number): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.io/license */ /** Tracks state of resize events in progress. */ declare class ResizeRef { readonly origin: ElementRef; readonly overlayRef: OverlayRef; readonly minWidthPx: number; readonly maxWidthPx: number; readonly minHeightPx: number; readonly maxHeightPx: number; readonly updateSizeAndOffset: () => void; direction: 'X' | 'Y'; position: Position; constructor(origin: ElementRef, overlayRef: OverlayRef, minWidthPx: number, maxWidthPx: number, minHeightPx: number, maxHeightPx: number, updateSizeAndOffset: () => void); setDirection(direction: 'X' | 'Y'): void; setPosition(position: Position): void; } declare class TheColumnResizeOverlayHandle implements AfterViewInit { elementRef: ElementRef; viewContainerRef: ViewContainerRef; cdr: ChangeDetectorRef; ngZone: NgZone; resizeRef: ResizeRef; eventDispatcher: TableCellEventDispatcher; resizeNotifier: ColumnResizeNotifierSource; private destroyRef; constructor(elementRef: ElementRef, viewContainerRef: ViewContainerRef, cdr: ChangeDetectorRef, ngZone: NgZone, resizeRef: ResizeRef, eventDispatcher: TableCellEventDispatcher, resizeNotifier: ColumnResizeNotifierSource, destroyRef: DestroyRef); ngAfterViewInit(): void; private _listenForMouseEvents; private _dragStarted; protected updateResizeActive(active: boolean): void; private _isXAxis; private _getOriginHeight; private _getOriginWidth; private _getOriginOffset; private _getOverlayOffset; private _isLtr; private _notifyResizeEnded; private _notifyResizeStarted; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ColumnResizingStore { constructor(); private direction; private resizeCols; private tableCols; storeResizingCol(colElement: HTMLTableColElement): void; storeTableWidth(cols: HTMLTableColElement[]): void; cleanResizing(): void; restoreLeftCols(deltaX: number): number; restoreRightCols(deltaX: number): number; getScrollWidth(deltaX: number): number; isRestoring(deltaValue: any, isXAxis?: boolean): boolean; isResizing(deltaValue: any, isXAxis?: boolean): boolean; initDirection(deltaValue: number, isXAxis?: boolean): void; private getDirection; private popCol; } declare class TheColumnResizeDirective implements AfterViewInit, OnDestroy { elementRef: ElementRef; viewContainerRef: ViewContainerRef; cdr: ChangeDetectorRef; ngZone: NgZone; eventDispatcher: TableCellEventDispatcher; resizeNotifier: ColumnResizeNotifierSource; theTableComponent: TheTableBase; protected readonly destroyed: ReplaySubject; protected position: Position; protected resizeStarted: boolean; protected targetCell: HTMLTableCellElement; constructor(elementRef: ElementRef, viewContainerRef: ViewContainerRef, cdr: ChangeDetectorRef, ngZone: NgZone, eventDispatcher: TableCellEventDispatcher, resizeNotifier: ColumnResizeNotifierSource, theTableComponent: TheTableBase); ngAfterViewInit(): void; private getResizeRowIndex; _listenForCellEdgeHoverEvents(): void; _listenStartDrag(): void; _listenEndDrag(): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class TextFlavour extends DefaultTextFlavour { excludes: string[]; attributes: any[]; render(): void; applyRichtext(): void; onContextChange(): void; } declare class TheEditorComponent implements OnInit, AfterViewInit, OnChanges, OnDestroy { private cdr; private destroyRef; private elementRef; private injector; private ngZone; private viewContainerRef; private theContextService; private iconRegistry; private presetConfig; theOptions: TheOptions; thePlugins: ThePlugin[]; theGlobalToolbar?: TheToolbarComponent; theDecorate: (editor: TheEditor, nodeEntry: NodeEntry) => Range$1[]; theOnError?: (error: SlateError) => void; theOnSave: EventEmitter; theOnDOMEvent: EventEmitter<{ nativeEvent: Event; data?: DomEventDataInfo; }>; theEditorCreated: EventEmitter; theUploadingStatus: EventEmitter; theEditableContainer: ElementRef; globalToolbarInstance: TheToolbarComponent; toolbarEntity: ToolbarEntity; editor: TheEditor; editorValue: Descendant[]; globalToolbarClass: string[]; isMobileMode: boolean; visibleQuickInsertPlus: boolean; elementToHtml: WeakMap; decorate: (nodeEntry: NodeEntry) => Range$1[]; get options(): TheOptions; get theGlobalToolbarInstance(): TheToolbarComponent; get maxHeight(): string; virtualScrollConfig: i0.WritableSignal; private onChangeCallback; private onTouchedCallback; private locale; constructor(cdr: ChangeDetectorRef, destroyRef: DestroyRef, elementRef: ElementRef, injector: Injector, ngZone: NgZone, viewContainerRef: ViewContainerRef, theContextService: TheContextService, iconRegistry: ThyIconRegistry, presetConfig: ThePresetConfig); ngOnInit(): void; ngAfterViewInit(): void; ngOnChanges(changes: SimpleChanges): void; ngOnDestroy(): void; private initializeVirtualScroll; private scrollContainerBoundingTop; private updateVirtualConfig; private initialize; private initializeOptions; private initializeContext; private getPlugins; private initializeMobileMode; private toolbarCalculate; private initializeGlobalToolbar; private initializeQuickInsert; private initializeEvents; private subscribeUploadingStatus; private applyAutoFocus; private isFirstWriteValue; writeValue(value: string | Descendant[]): void; registerOnChange(fn: any): void; registerOnTouched(fn: any): void; scrollSelectionIntoView: (e: TheEditor, domRange: DOMRange) => void; valueChange(value: Descendant[]): void; private serializingValue; private onErrorHandler; renderElement: (element: Element$1) => slate_angular.ViewType; renderLeaf: (text: Text) => slate_angular.ViewType; renderText: (text: Text) => typeof TextFlavour; private generateDecorate; onKeyDown: (event: KeyboardEvent) => void; mousedown(event: MouseEvent): void; onClick: (event: MouseEvent) => void; onSlaPaste: (event: ClipboardEvent) => void; onSlaBeforeInput: (event: Event & { inputType: string; data: string | null; dataTransfer: DataTransfer | null; }) => Promise; onSlaBlur: (event: FocusEvent) => void; onSlaFocus: (event: Event) => void; onSlaCut: (event: ClipboardEvent) => void; onSlaCopy: (event: ClipboardEvent) => void; onSlaCompositionStart: (event: CompositionEvent) => void; onSlaCompositionEnd: (event: CompositionEvent) => void; onSlaDragStart: (event: DragEvent) => void; onSlaDragOver: (event: DragEvent) => void; onDrop: (event: DragEvent) => void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TheEditorModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare const internalPlugins: (locale: Signal) => _worktile_theia.ThePlugin<{}, {}>[]; declare class TheImage extends TheBaseElement implements OnInit, OnDestroy, AfterViewInit, BeforeContextChange { cdr: ChangeDetectorRef; imageGroup: ThyImageGroup; private imageService; private theContextService; private thyPopover; private overlay; private destroyRef; locale: Signal; naturalWidth: number; naturalHeight: number; imageEntry: ImageEntry; uploading: boolean; percentage: number; fileItem: { url: string; file: File | string; }; layoutDefaultWidth: number; disablePreview: boolean; loadImageError: boolean; layoutOptions: LayoutOption[]; private uploadingSubscription; private mouseMoveSubscription; private draggable; private layoutToolbarRef; private imagePluginOptions; private imageLoadedCacheHeightTimer; get isOpen(): boolean; get imageBindingWidth(): number; imageContent: ElementRef; img: ElementRef; layoutToolbar: TemplateRef; imageDirective: ThyImageDirective; constructor(cdr: ChangeDetectorRef, imageGroup: ThyImageGroup, imageService: TheImageService, theContextService: TheContextService, thyPopover: ThyPopover, overlay: Overlay, destroyRef: DestroyRef); beforeContextChange: (value: SlateElementContext) => void; buildImageEntry(newElement: ImageElement, thumbUrl: string, originUrl: string): void; ngOnInit(): void; ngAfterViewInit(): void; afterViewInit(): void; onContextChange(): void; ngOnDestroy(): void; private setImageMinHeight; private clearMinHeight; private setImagePluginOptions; private setDisablePreview; private setImageFileItem; private subscribeMouseUp; private subscribeImageUploadingState; private setImageNodes; uploadImage(): Promise; startDrag(event: MouseEvent, axis: string): void; mouseMoveHandle(event: MouseEvent, options: { axis: string; printerPositionX: number; printerPositionY: number; internalWidth: number; internalHeight: number; maxWidth: number; }): void; endDrag(event: MouseEvent): void; cancelUpload(): void; isShouldOpen(): boolean; isShouldClose(): boolean; openLayoutToolbar(): void; closeLayoutToolbar(): void; layoutActive(key: Alignment | LayoutTypes): boolean; setImageNode(e: MouseEvent, props: Partial): void; setBlockCardLayoutAttr(): void; onDelete(event: MouseEvent): void; createPositionStrategy(): FlexibleConnectedPositionStrategy; imageLoaded(event: Event): void; imageError(event: Event): void; preventDefault(event: Event): void; imageClick(): void; calcHeight(): number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const AlignEditor: { isActive(editor: Editor, alignment: Alignment): boolean; isDisabled(editor: Editor): boolean; setAlign(editor: Editor, alignment: Alignment): void; }; declare const BlockquoteEditor: { toggleBlockquote(editor: Editor): void; }; declare const CodeEditor: { setCodeAttribute(editor: Editor, props: Partial, element?: CodeElement): void; insertCode(editor: Editor): void; removeCode(editor: Editor, code?: CodeElement): void; }; declare class TheCode extends TheBaseElement implements OnInit, AfterViewInit, OnDestroy { locale: Signal; dropdownMode: typeof DropdownMode; maxHeight: number; menus: { key: string; name: string; }[]; destroy$: Subject; isHightLight: boolean; resizeHeight: number; options: WritableSignal; activeLanguage: DefaultToolbarItem; resizeBounds: any; toolbarPopoverRef: ThyPopoverRef; toolbar: TemplateRef; codemirror: CodeMirrorComponent; toolbarDropdown: TheToolbarDropdown; get code(): string; get isToolbarOpen(): boolean; get isSelectedInExpandedSelection(): boolean; isDelayRender: WritableSignal; private thyNotifyService; private contextService; private ngZone; private thyPopover; private overlay; onContextChange(): void; ngOnInit(): void; ngAfterViewInit(): void; private initMaxHeight; openToolbar(): void; closeToolbar(): void; renderCodemirror(): void; codeChange($event: any): void; onDelete(event: MouseEvent): void; onCopy(event: MouseEvent): void; focusChange(codeMirrorFocused: boolean): void; onChangeLanguage: (item: any) => void; useMode(): void; useAutoWrap(): void; useHeight(): void; useReadonly(): void; useAutofocus(): void; useToolbar(): void; onResize({ height }: ThyResizeEvent): void; onEndResize(): void; onChangeWrap(value: boolean): void; ngOnDestroy(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare const ColorEditor: { getActiveColor(editor: Editor, type: MarkTypes.color | MarkTypes.backgroundColor): string; setColor(editor: Editor, color: ColorType, type: MarkTypes.color | MarkTypes.backgroundColor): void; }; type HeadingPluginOptions = { cleanupTypes: CustomElementKinds[]; } & ThePluginBaseOption; declare const headingOptions: HeadingPluginOptions; declare const HeadingEditor: { setHeading(editor: Editor, heading: HeadingElementKinds): void; isHeadingActive(editor: Editor, heading: HeadingElementKinds): boolean; headingPlugins(): ThePlugin<{}, {}>[]; }; declare const HrEditor: { insertHr(editor: Editor): void; isHrActive(editor: Editor): boolean; }; declare const ImageEditor: { openUpload(editor: Editor): void; insertImages(editor: Editor, imageFiles: FileList | File[]): void; handleBase64ImageElement(editor: Editor, image: ImageElement): void; handleExternalImageElement(editor: Editor, image: ImageElement): void; verifyImage(editor: Editor, image: File): boolean; isActive(editor: Editor): boolean; setImageNode(editor: Editor, props: Partial, image?: ImageElement): void; isBase64(url: string): boolean; removeImage(editor: Editor, image?: ImageElement): void; }; declare const IndentEditor: { getAllowedTypes(editor: TheEditor): (_worktile_theia.ElementKinds.image | _worktile_theia.ElementKinds.paragraph | _worktile_theia.ElementKinds.heading_1 | _worktile_theia.ElementKinds.heading_2 | _worktile_theia.ElementKinds.heading_3 | _worktile_theia.ElementKinds.heading_4 | _worktile_theia.ElementKinds.heading_5 | _worktile_theia.ElementKinds.heading_6 | _worktile_theia.ElementKinds.numberedList | _worktile_theia.ElementKinds.bulletedList | _worktile_theia.ElementKinds.listItem | _worktile_theia.ElementKinds.checkItem | _worktile_theia.ElementKinds.table | _worktile_theia.ElementKinds.tableRow | _worktile_theia.ElementKinds.tableCell | _worktile_theia.ElementKinds.code | _worktile_theia.ElementKinds.blockquote | _worktile_theia.ElementKinds.hr | _worktile_theia.ElementKinds.link | _worktile_theia.ElementKinds.inlineCode)[]; setIndent(editor: TheEditor): void; cancelIndent(editor: Editor): void; setTextIndent(editor: TheEditor, kinds: CustomElementKinds[], textIndent: number): void; cancelTextIntent(editor: TheEditor, event: KeyboardEvent, anchorBlock: Element$1, kinds: CustomElementKinds[]): boolean; }; declare const LinkEditor: { insertLink(editor: TheEditor): void; isActive(editor: Editor): boolean; wrapLink(editor: Editor, text: string, url: string): void; unwrapLink(editor: Editor): void; updateLink(editor: Editor, element: LinkElement, url: string, text: string): void; }; declare const ListEditor: { isList(editor: Editor, element: Element$1, type: ElementKinds.bulletedList | ElementKinds.numberedList): boolean; toggleList(editor: Editor, type: ElementKinds.bulletedList | ElementKinds.numberedList, startIndex?: number): void; unwrapList(editor: Editor): void; wrapList(editor: Editor, type: ElementKinds.bulletedList | ElementKinds.numberedList): void; isActive(editor: Editor, type: ElementKinds.bulletedList | ElementKinds.numberedList): boolean; getActiveList(editor: Editor): slate.NodeEntry; buildListItem(editor: Editor): void; buildInsertDataChildren(node: Element$1): any; }; interface MarkEditor extends Editor { removeMark: (key: string, shouldChange?: boolean) => void; } declare const MarkEditor: { isMarkActive(editor: Editor, format: any): boolean; toggleMark(editor: any, format: any): void; }; interface TheMention { type: string; trigger: string; suggestion: ComponentType$1; render: ComponentType$1; disableTrigger?: (editor: TheEditor) => boolean; } interface MentionPluginOptions { mentions: TheMention[]; } declare const MentionEditor: { insertTrigger(editor: TheEditor, type: string): void; deleteTriggerText(editor: TheEditor): void; openSuggestion(editor: TheEditor, type: string): void; getSearchInfo(editor: TheEditor): { currentRange: slate.BaseRange; currentText: string; }; updateSearchText(editor: TheEditor, text: string): void; openSelectOverlay(editor: TheEditor, type: string, origin: ElementRef | HTMLElement, isSoftBreak?: boolean): void; close(editor: TheEditor): void; insertMention(editor: TheEditor, type: string, data: T): void; isActive(editor: TheEditor, type: string): boolean; updatePositionStrategy(editor: TheEditor, isSoftBreak?: boolean): void; }; declare const withMention: (editor: T) => T; declare const createMentionPlugin: (override?: Partial<_worktile_theia.ThePlugin>, overrideByKey?: _worktile_theia.OverrideByKey) => _worktile_theia.ThePlugin; declare abstract class TheBaseSuggestion { editor: TheEditor; type: string; keywords: string; handleMousedown(event: Event): void; abstract getSearchResult(keywords: string): void; abstract selectMention(event: T): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare const QuickInsertEditor: { openMenu(editor: Editor): ThyPopoverRef; updateKeywords(editor: Editor, keywords: string): void; updatePluginMenuRef(editor: Editor, pluginMenuRef: ThyPopoverRef | null): void; closeMenu(editor: Editor): void; isOpenedMenu(editor: Editor): boolean; }; declare const TableEditor: { insertTable(editor: Editor, optionsParam?: TableOptions): void; insertColumn(editor: Editor, count?: number, at?: number, optionsParam?: TableOptions): void; insertRow(editor: Editor, count?: number, at?: number, optionsParam?: TableOptions): void; removeTable(editor: Editor, optionsParam?: TableOptions): void; removeRow(editor: Editor, rowIndex?: number, optionsParam?: TableOptions): void; removeColumn(editor: Editor, colIndex?: number, optionsParam?: TableOptions): void; clearCell(editor: Editor, nodeEntry?: NodeEntry, optionsParam?: TableOptions): void; setCellsBackgroundColor(editor: Editor, color: string, cells?: TableCellElement[]): void; mergeCell(editor: Editor): void; splitCell(editor: Editor): void; setTableOptions(editor: Editor, newOptions: TheTableOptions): void; setEquallyColumn(editor: Editor): void; clearCellsContent(editor: Editor, cells?: TableCellElement[]): void; isActive(editor: Editor): boolean; getSelectedCellPositions(editor: Editor): CellPosition[]; getSelectedCells(editor: Editor, location?: Point): TableCellElement[]; setAlign(editor: Editor, alignment: Alignment, cells?: TableCellElement[]): boolean; setVerticalAlign(editor: TheEditor, alignment: VerticalAlignment, cells?: TableCellElement[]): boolean; isVerticalAlignActive(editor: TheEditor, alignment: VerticalAlignment): boolean; toggleMark(editor: TheEditor, isActive: boolean, format: string | string[], value?: string | number | boolean): boolean; clearMark(editor: TheEditor): boolean; formatBrush(editor: TheEditor, marks: { [key in MarkTypes]?: any; }): boolean; handleSelectedCells(editor: TheEditor, handle: (cellPath: Path, cellRange: Range$1) => void, cells?: TableCellElement[]): boolean; hasHeaderRow(editor: TheEditor, location?: Location): boolean; hasHeaderColumn(editor: TheEditor, location?: Location): boolean; isActiveHeader(editor: TheEditor, location?: Location): boolean; hasHeaderRowCell(editor: TheEditor): boolean; hasHeaderColumnCell(editor: TheEditor): boolean; selectOriginCell(editor: TheEditor, table: TableElement, rowIndex: number, columnIndex: number, isStart: boolean): void; handleIndent(editor: TheEditor, indentType: Indents): boolean; }; declare const TodoItemEditor: { isActive(editor: Editor): boolean; insertTodoItem(editor: Editor): void; }; declare const VerticalAlignEditor: { isVerticalActive(editor: TheEditor, alignment: VerticalAlignment): boolean; setVerticalAlign(editor: TheEditor, alignment: VerticalAlignment): void; }; declare const createVerticalAlignPlugin: (locale: Signal) => _worktile_theia.ThePlugin<{}, {}>; declare const InlineCodeEditor: { toggleInlineCode(editor: any, text?: string): void; wrapInlineCode(editor: Editor, text?: string): void; unwrapInlineCode(editor: Editor): void; isInlineCodeActive(editor: Editor, path?: Path): boolean; }; declare class TheQuickInsert implements OnInit, OnChanges { className: string; editor: Editor; isVisible: boolean; defaultIconName: string; iconNameFill: string; displayIconName: string; iconElement: ElementRef; handleMousedownNativeElement(event: any): void; private cdr; private renderer; private elementRef; ngOnInit(): void; ngOnChanges(changes: SimpleChanges): void; updateIconDisplay(): void; private addHiddenClass; private removeHiddenClass; private isRichMediaScope; private hasExcludeAttribute; private updatePosition; mouseEnter(event: MouseEvent): void; mouseLeave(event: MouseEvent): void; handleClick(event: MouseEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare function isHeadingElement(element: Element$1): element is HeadingElement; declare function isStandardHeadingElement(element: Element$1): element is HeadingOneElement | HeadingTwoElement | HeadingThreeElement | HeadingFourElement; declare function isStandardHeadingElementByType(type: string): boolean; declare function getFollowElements(editor: TheEditor, element: HeadingElement): Element$1[]; declare function getAllVisibleState(editor: Editor): any[]; declare function expandPreviousHeadings(editor: Editor, targetPath: Path): void; declare function getPreviousRelatedHeadingElements(editor: Editor, path: Path): Path[] | null; declare function getCollapsedStandardHeadingAbove(editor: Editor, path: Path): Path[]; declare function getPreviousHeading(editor: Editor, path: Path, options?: { isFirst?: boolean; }): Path[]; declare const anchorBlock: (editor: Editor, at?: Location) => Element$1; declare const anchorBlockEntry: (editor: Editor, at?: Location) => NodeEntry | undefined; declare const anchorInlineEntry: (editor: Editor) => slate.NodeEntry<_worktile_theia.CustomElement>; /** * Iterate through all of the nodes in the editor and return the first match. If * no match is found, return undefined. */ type FindNodeOptions = { at?: Location | Span; reverse?: boolean; voids?: boolean; } & MatchOptions; /** * Find node matching the condition. */ declare const findNode: (editor: Editor, options: FindNodeOptions) => NodeEntry | undefined; /** * Iterate through all of the nodes in the editor and return the first match. If * no match is found, return undefined. */ /** * Get the first descendant node matching the condition. */ declare const findDescendant: (editor: Editor, options: FindNodeOptions) => NodeEntry | undefined; /** * Find the path of Slate node. */ declare const findPath: (editor: AngularEditor, node: Node) => Path; /** * Get node above a location (default: selection). */ declare const getAbove: (editor: Editor, options?: EditorAboveOptions) => slate.NodeEntry; /** * Get the block above a location (default: selection) by type. */ declare const getAboveByType: (editor: Editor, types: string[] | string, options?: Omit) => slate.NodeEntry; declare const getAnchorBlockEntry: (editor: Editor, at?: Path | Point) => NodeEntry; /** * Get the block above a location (default: selection). * If not found, return the editor entry. */ declare const getBlockAbove: (editor: Editor, options?: Omit) => NodeEntry; /** * Get the block above a location (default: selection). * If not found, return the editor entry. */ declare const getBlockCardAbove: (editor: Editor, options?: Omit) => NodeEntry; declare const getBlockCardCenterCursor: (editor: Editor, at?: Location) => slate.BasePoint; declare const getContainerBlocks: (editor: Editor) => (_worktile_theia.ElementKinds.image | _worktile_theia.ElementKinds.paragraph | _worktile_theia.ElementKinds.heading_1 | _worktile_theia.ElementKinds.heading_2 | _worktile_theia.ElementKinds.heading_3 | _worktile_theia.ElementKinds.heading_4 | _worktile_theia.ElementKinds.heading_5 | _worktile_theia.ElementKinds.heading_6 | _worktile_theia.ElementKinds.numberedList | _worktile_theia.ElementKinds.bulletedList | _worktile_theia.ElementKinds.listItem | _worktile_theia.ElementKinds.checkItem | _worktile_theia.ElementKinds.table | _worktile_theia.ElementKinds.tableRow | _worktile_theia.ElementKinds.tableCell | _worktile_theia.ElementKinds.code | _worktile_theia.ElementKinds.blockquote | _worktile_theia.ElementKinds.hr | _worktile_theia.ElementKinds.link | _worktile_theia.ElementKinds.inlineCode)[]; declare const getDirectlyParent: (editor: TheEditor) => slate.NodeEntry; declare const getInsertElementsPath: (editor: TheEditor, allowParentTypes: CustomElementKinds[]) => false | Path; /** * Get the last child of a node */ declare const getLastChild: (nodeEntry: NodeEntry) => NodeEntry; declare const getLastChildPath: (nodeEntry: NodeEntry) => Path; declare const getLastNode: (editor: Editor, level: number) => NodeEntry; /** * Get the next sibling nodes after a path. * @param ancestorEntry Ancestor of the sibling nodes * @param path Path of the reference node */ declare const getNextSiblingNodes: (ancestorEntry: NodeEntry, path: Path) => Descendant[]; declare const getNode: (editor: Editor, path: Path) => Node; interface UnhangRangeOptions { at?: Range$1 | Path | Point | Span; voids?: boolean; unhang?: boolean; } declare const getNodes: (editor: Editor, options?: EditorNodesOptions & UnhangRangeOptions) => Generator, void, undefined>; /** * Get the nodes with a type included in `types` at a location (default: selection). */ declare const getNodesByType: (editor: Editor, types: string[] | string, options?: Omit) => Generator, void, undefined>; /** * See {@link Editor.parent}. * Returns undefined if there is no parent. */ declare const getParent: (editor: Editor, at: Location, options?: EditorParentOptions) => NodeEntry | undefined; /** * get plain text * can specify node text interval, the default is \n */ declare const getPlainText: (editor: Editor, format?: string) => string; declare const getPluginByToolbarItem: (editor: Editor, toolbarItem: ToolbarItem) => ThePlugin; interface BeforeOptions { distance?: number | undefined; unit?: 'character' | 'word' | 'line' | 'block' | 'offset' | undefined; } interface PointBeforeOptions extends BeforeOptions { /** * Lookup before the location for `matchString`. */ matchString?: string | string[]; /** * Lookup before the location until this predicate is true */ match?: (value: { beforeString: string; beforePoint: Point; at: Location; }) => boolean; /** * If true, get the point after the matching point. * If false, get the matching point. */ afterMatch?: boolean; /** * If true, lookup until the start of the editor value. * If false, lookup until the first invalid character. */ skipInvalid?: boolean; /** * Allow lookup across multiple node paths. */ multiPaths?: boolean; } /** * {@link Editor.before} with additional options. * TODO: support for sequence of any characters. */ declare const getPointBefore: (editor: Editor, at: Location, options?: PointBeforeOptions) => any; declare const getPointFromLocation: (editor: Editor, { at, focus }?: { at?: Location | null; focus?: boolean; }) => slate.BasePoint; declare const getPreviousPath: (path: Path) => Path | undefined; /** * Get the range from the start of the block above a location (default: selection) to the location. */ declare const getRangeFromBlockStart: (editor: Editor, options?: Omit) => false | { anchor: slate.BasePoint; focus: slate.BasePoint; }; type RangeBeforeOptions = PointBeforeOptions; /** * Get range from {@link getPointBefore} to the end point of `at`. */ declare const getRangeBefore: (editor: Editor, at: Location, options?: RangeBeforeOptions) => Range$1 | undefined; declare const getSelectionMarks: (editor: Editor) => { [key in MarkTypes]?: any; }; declare const getSelectionNodesByType: (editor: Editor, fragmentData: Descendant[], types?: CustomElementKinds[]) => Node; /** * See {@link Editor.string}. * If `at` is not defined, return an empty string. */ declare const getText: (editor: Editor, at?: Location | null) => string; declare const getToolbarItemDisabled: (editor: Editor, key: PluginKey, customTypes?: CustomElementKinds[]) => boolean; declare const isAcrossBlocks: (editor: Editor, fragment: Element$1[]) => boolean; declare const isAncestor: (node: Node) => node is Ancestor; /** * Is an ancestor empty (empty text and no inline children). */ declare const isAncestorEmpty: (editor: Editor, node: Ancestor) => boolean; /** * Is the block above the selection empty. */ declare const isBlockAboveEmpty: (editor: Editor) => boolean; declare const isBlockActive: (editor: Editor, format: CustomElementKinds) => boolean; declare const isBlockCardCursor: (editor: Editor, at?: Location) => boolean; declare const isBlockCardLeftCursor: (selection: Range$1) => boolean; declare const isBlockCardRightCursor: (selection: Range$1) => boolean; /** * Is there empty text after the selection. * If there is no leaf after the selected leaf, return {@link Editor.isEnd}. * Else, check if the next leaves are empty. */ declare const isBlockTextEmptyAfterSelection: (editor: Editor) => boolean; /** * See {@link Range.isCollapsed}. * Return false if `range` is not defined. */ declare const isCollapsed: (range?: Range$1 | null) => boolean; declare const isContainNestedType: (editor: Editor, types: string[] | string) => boolean; declare const isContainer: (editor: Editor, value: Element$1) => boolean; declare const isDescendant: (node: any) => node is Descendant; declare const isEmptyContent: (children: Descendant[]) => boolean; interface FilterRule { containTypes?: string[]; textSpace?: boolean; } declare const isEmptyContentByFilter: (editor: Editor, rules?: FilterRule) => boolean; declare const isEmptyParagraph: (editor: Editor, at?: Path | Point) => boolean; declare const isEmptyParagraphElement: (editor: Editor, element: Element$1) => boolean; /** * 判断元素是否是空段落,仅仅包含空格或者\n算空段落 * @param editor * @param element * @returns */ declare const isLogicEmptyParagraphElement: (editor: Editor, element: Element$1) => boolean; declare const isEmptyParagraphByPath: (editor: Editor, at: Path) => boolean; /** * Is it the first child of the parent */ declare const isFirstChild: (path: Path) => boolean; declare const isGlobalCollapsed: (editor: Editor) => boolean; declare const isIncludeTypes: (editor: Editor, types: CustomElementKinds[]) => boolean; /** * Is the node entry filling a condition. */ declare const isNodeType: (entry?: NodeEntry, { filter, allow, exclude }?: QueryOptions) => boolean; /** * Is there a node with a type included in `types` at a location (default: selection). */ declare const isNodeTypeIn: (editor: Editor, types: string[] | string, options?: Omit) => boolean; declare const isParagraph: (editor: Editor) => boolean; declare const isPointAtRoot: (point: Point) => boolean; /** * Is the range (default: selection) across blocks. */ declare const isRangeAcrossBlocks: (editor: Editor, { at, ...options }?: Omit & { at?: Range$1 | null; }) => boolean; declare const isRangeAtRoot: (range: Range$1) => boolean; declare const isRootPath: (path: Path) => boolean; /** * {@link Editor.isStart}. If point is null, return false. */ declare const isStart: (editor: Editor, point: Point | null | undefined, at: Location) => boolean; /** * Iterate through all of the nodes in the editor and break early for the first truthy match. Otherwise * returns false. */ declare const someNode: (editor: Editor, options: FindNodeOptions) => boolean; declare const index_d$1_anchorBlock: typeof anchorBlock; declare const index_d$1_anchorBlockEntry: typeof anchorBlockEntry; declare const index_d$1_anchorInlineEntry: typeof anchorInlineEntry; declare const index_d$1_findDescendant: typeof findDescendant; declare const index_d$1_findNode: typeof findNode; declare const index_d$1_findPath: typeof findPath; declare const index_d$1_getAbove: typeof getAbove; declare const index_d$1_getAboveByType: typeof getAboveByType; declare const index_d$1_getAnchorBlockEntry: typeof getAnchorBlockEntry; declare const index_d$1_getBlockAbove: typeof getBlockAbove; declare const index_d$1_getBlockCardAbove: typeof getBlockCardAbove; declare const index_d$1_getBlockCardCenterCursor: typeof getBlockCardCenterCursor; declare const index_d$1_getContainerBlocks: typeof getContainerBlocks; declare const index_d$1_getDirectlyParent: typeof getDirectlyParent; declare const index_d$1_getInsertElementsPath: typeof getInsertElementsPath; declare const index_d$1_getLastChild: typeof getLastChild; declare const index_d$1_getLastChildPath: typeof getLastChildPath; declare const index_d$1_getLastNode: typeof getLastNode; declare const index_d$1_getNextSiblingNodes: typeof getNextSiblingNodes; declare const index_d$1_getNode: typeof getNode; declare const index_d$1_getNodes: typeof getNodes; declare const index_d$1_getNodesByType: typeof getNodesByType; declare const index_d$1_getParent: typeof getParent; declare const index_d$1_getPlainText: typeof getPlainText; declare const index_d$1_getPluginByToolbarItem: typeof getPluginByToolbarItem; declare const index_d$1_getPointBefore: typeof getPointBefore; declare const index_d$1_getPointFromLocation: typeof getPointFromLocation; declare const index_d$1_getPreviousPath: typeof getPreviousPath; declare const index_d$1_getRangeBefore: typeof getRangeBefore; declare const index_d$1_getRangeFromBlockStart: typeof getRangeFromBlockStart; declare const index_d$1_getSelectionMarks: typeof getSelectionMarks; declare const index_d$1_getSelectionNodesByType: typeof getSelectionNodesByType; declare const index_d$1_getText: typeof getText; declare const index_d$1_getToolbarItemDisabled: typeof getToolbarItemDisabled; declare const index_d$1_isAcrossBlocks: typeof isAcrossBlocks; declare const index_d$1_isAncestor: typeof isAncestor; declare const index_d$1_isAncestorEmpty: typeof isAncestorEmpty; declare const index_d$1_isBlockAboveEmpty: typeof isBlockAboveEmpty; declare const index_d$1_isBlockActive: typeof isBlockActive; declare const index_d$1_isBlockCardCursor: typeof isBlockCardCursor; declare const index_d$1_isBlockCardLeftCursor: typeof isBlockCardLeftCursor; declare const index_d$1_isBlockCardRightCursor: typeof isBlockCardRightCursor; declare const index_d$1_isBlockTextEmptyAfterSelection: typeof isBlockTextEmptyAfterSelection; declare const index_d$1_isCollapsed: typeof isCollapsed; declare const index_d$1_isContainNestedType: typeof isContainNestedType; declare const index_d$1_isContainer: typeof isContainer; declare const index_d$1_isDescendant: typeof isDescendant; declare const index_d$1_isEmptyContent: typeof isEmptyContent; declare const index_d$1_isEmptyContentByFilter: typeof isEmptyContentByFilter; declare const index_d$1_isEmptyParagraph: typeof isEmptyParagraph; declare const index_d$1_isEmptyParagraphByPath: typeof isEmptyParagraphByPath; declare const index_d$1_isEmptyParagraphElement: typeof isEmptyParagraphElement; declare const index_d$1_isFirstChild: typeof isFirstChild; declare const index_d$1_isGlobalCollapsed: typeof isGlobalCollapsed; declare const index_d$1_isIncludeTypes: typeof isIncludeTypes; declare const index_d$1_isLogicEmptyParagraphElement: typeof isLogicEmptyParagraphElement; declare const index_d$1_isNodeType: typeof isNodeType; declare const index_d$1_isNodeTypeIn: typeof isNodeTypeIn; declare const index_d$1_isParagraph: typeof isParagraph; declare const index_d$1_isPointAtRoot: typeof isPointAtRoot; declare const index_d$1_isRangeAcrossBlocks: typeof isRangeAcrossBlocks; declare const index_d$1_isRangeAtRoot: typeof isRangeAtRoot; declare const index_d$1_isRootPath: typeof isRootPath; declare const index_d$1_isStart: typeof isStart; declare const index_d$1_someNode: typeof someNode; declare namespace index_d$1 { export { index_d$1_anchorBlock as anchorBlock, index_d$1_anchorBlockEntry as anchorBlockEntry, index_d$1_anchorInlineEntry as anchorInlineEntry, index_d$1_findDescendant as findDescendant, index_d$1_findNode as findNode, index_d$1_findPath as findPath, index_d$1_getAbove as getAbove, index_d$1_getAboveByType as getAboveByType, index_d$1_getAnchorBlockEntry as getAnchorBlockEntry, index_d$1_getBlockAbove as getBlockAbove, index_d$1_getBlockCardAbove as getBlockCardAbove, index_d$1_getBlockCardCenterCursor as getBlockCardCenterCursor, index_d$1_getContainerBlocks as getContainerBlocks, index_d$1_getDirectlyParent as getDirectlyParent, index_d$1_getInsertElementsPath as getInsertElementsPath, index_d$1_getLastChild as getLastChild, index_d$1_getLastChildPath as getLastChildPath, index_d$1_getLastNode as getLastNode, index_d$1_getNextSiblingNodes as getNextSiblingNodes, index_d$1_getNode as getNode, index_d$1_getNodes as getNodes, index_d$1_getNodesByType as getNodesByType, index_d$1_getParent as getParent, index_d$1_getPlainText as getPlainText, index_d$1_getPluginByToolbarItem as getPluginByToolbarItem, index_d$1_getPointBefore as getPointBefore, index_d$1_getPointFromLocation as getPointFromLocation, index_d$1_getPreviousPath as getPreviousPath, index_d$1_getRangeBefore as getRangeBefore, index_d$1_getRangeFromBlockStart as getRangeFromBlockStart, index_d$1_getSelectionMarks as getSelectionMarks, index_d$1_getSelectionNodesByType as getSelectionNodesByType, index_d$1_getText as getText, index_d$1_getToolbarItemDisabled as getToolbarItemDisabled, index_d$1_isAcrossBlocks as isAcrossBlocks, index_d$1_isAncestor as isAncestor, index_d$1_isAncestorEmpty as isAncestorEmpty, index_d$1_isBlockAboveEmpty as isBlockAboveEmpty, index_d$1_isBlockActive as isBlockActive, index_d$1_isBlockCardCursor as isBlockCardCursor, index_d$1_isBlockCardLeftCursor as isBlockCardLeftCursor, index_d$1_isBlockCardRightCursor as isBlockCardRightCursor, index_d$1_isBlockTextEmptyAfterSelection as isBlockTextEmptyAfterSelection, index_d$1_isCollapsed as isCollapsed, index_d$1_isContainNestedType as isContainNestedType, index_d$1_isContainer as isContainer, index_d$1_isDescendant as isDescendant, index_d$1_isEmptyContent as isEmptyContent, index_d$1_isEmptyContentByFilter as isEmptyContentByFilter, index_d$1_isEmptyParagraph as isEmptyParagraph, index_d$1_isEmptyParagraphByPath as isEmptyParagraphByPath, index_d$1_isEmptyParagraphElement as isEmptyParagraphElement, index_d$1_isFirstChild as isFirstChild, index_d$1_isGlobalCollapsed as isGlobalCollapsed, index_d$1_isIncludeTypes as isIncludeTypes, index_d$1_isLogicEmptyParagraphElement as isLogicEmptyParagraphElement, index_d$1_isNodeType as isNodeType, index_d$1_isNodeTypeIn as isNodeTypeIn, index_d$1_isParagraph as isParagraph, index_d$1_isPointAtRoot as isPointAtRoot, index_d$1_isRangeAcrossBlocks as isRangeAcrossBlocks, index_d$1_isRangeAtRoot as isRangeAtRoot, index_d$1_isRootPath as isRootPath, index_d$1_isStart as isStart, index_d$1_someNode as someNode, }; } declare class TheToolbarService { initialize(toolbarItems: ToolbarItem[], global?: string[], inline?: string[]): ToolbarInitOption; nextToolbarEntity(toolbarDefinition: ToolbarDefinition, toolbarItems: Map): ToolbarEntity; getToolbarItemByKeys(keys: ToolbarKey[], toolbarItems: Map): ToolbarItem[]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare class BasicTest { value: Element$1[]; plugins: any[]; editor: TheEditor; locale: Signal; editorComponent: TheEditorComponent; constructor(i18n: TheI18nService); editorCreate(editor: TheEditor): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DataTransferFaker { map: Map; files: any[]; getData(format: string): any; setData(format: string, data: any): void; } declare class theTethysIconRegistryFaker extends ThyIconRegistry { getSvgIcon(name: string, namespace?: string): Observable; splitIconName(iconName: string): [string, string]; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } declare const pluginKey = "test"; declare const pluginKey1 = "test1"; declare const customPluginMockKey = "custom-plugin-mock"; declare const originOptions: { types: string[]; names: string[]; params: { key1: string; key2: string; }; isMerged: boolean; age: number; name: string; rules: ({ type: string; key?: undefined; markup?: undefined; match?: undefined; format?: undefined; } | { key: string; type: string; markup: any[]; match: (editor: Editor) => void; format: (editor: Editor) => void; } | { key: string; type: string; markup: string; format: (editor: Editor) => void; match?: undefined; })[]; }; declare const matchOptions: { types: string[]; names: string[]; params: { key1: string; key2: string; key3: string; }; isMerged: boolean; age: number; name: string; rules: ({ type: string; key?: undefined; markup?: undefined; match?: undefined; format?: undefined; query?: undefined; } | { key: string; type: string; markup: any[]; match: (editor: Editor) => void; format: (editor: Editor) => void; query: (editor: Editor) => void; } | { key: string; type: string; markup: string; format: (editor: Editor) => void; query: (editor: Editor) => void; match?: undefined; })[]; addArrayOption: string[]; }; declare const createTestPlugin: (override?: Partial<_worktile_theia.ThePlugin>, overrideByKey?: _worktile_theia.OverrideByKey) => _worktile_theia.ThePlugin; declare const createTest1Plugin: (override?: Partial<_worktile_theia.ThePlugin>, overrideByKey?: _worktile_theia.OverrideByKey) => _worktile_theia.ThePlugin; declare const errorImageUrlMock = "https://cdn.alpha.pingcode.live/static/portal/assets/images/editor/image-error.svg"; declare const customPluginMock: (override?: Partial<_worktile_theia.ThePlugin>, overrideByKey?: _worktile_theia.OverrideByKey) => _worktile_theia.ThePlugin; declare function EditorPresetConfigFactoryMock(): ThePresetConfig; declare const withTestPlugin: (plugins: ThePlugin[], initValue: Descendant[]) => _worktile_theia.TheEditor; interface ApplyDeepToNodesOptions { node: Node; source: Record | (() => Record); apply: (node: Node, source: Record | (() => Record)) => void; query?: QueryOptions; } /** * Recursively apply an operation to children nodes with a query. */ declare const applyDeepToNodes: ({ node, source, apply, query }: ApplyDeepToNodesOptions) => void; declare const clearMarks: (editor: Editor) => void; declare const deleteElement: (editor: Editor, element: Element$1) => void; declare const deleteNodeByType: (editor: Editor, type: CustomElementKinds) => void; declare function handleContinualDeleteBackward(editor: Editor, aboveResult: NodeEntry, type: CustomElementKinds): boolean; declare function handleContinualInsertBreak(editor: Editor, lowestBlock: Element$1, type: CustomElementKinds): boolean; declare const insertElements: (editor: Editor, elements: Element$1 | Element$1[], select?: boolean) => void; declare const insertInlineElement: (editor: Editor, elements: Element$1 | Element$1[]) => void; declare const insertParagraph: (editor: Editor, at: Location) => void; /** * Recursively merge a source object to children nodes with a query. */ declare const mergeDeepToNodes: (options: Omit) => void; interface MoveChildrenOptions { /** * Parent node of the children to move. */ at: NodeEntry | Path; /** * Path where to move the children. */ to: Path; /** * Start index of the children to move. * Example: 1 means children[0] will not be moved. */ start?: number; /** * Condition for the child to be moved */ match?(entry: NodeEntry): boolean; } /** * 将节点的子级移动到路径。 返回移动的子级数。 */ declare const moveChildren: (editor: Editor, { at, to, match, start }: MoveChildrenOptions) => number; interface ResetBlockTypePluginRule { /** * Node types where the rule applies. */ types: string[]; hotkey?: string | string[]; /** * Additional condition to the rule. */ predicate: (editor: Editor) => boolean; /** * Set node to this default type when resetting. */ defaultType?: string; /** * Callback called when resetting. */ onReset?: (editor: Editor) => void; } interface ResetBlockTypePluginOptions { rules: ResetBlockTypePluginRule[]; } declare const onKeyDownResetBlockType: ({ rules }: ResetBlockTypePluginOptions) => (event: KeyboardEvent | null, editor: Editor) => boolean; declare const setEndSelection: (editor: Editor) => void; declare const setMarks: (editor: Editor, marks: { [key in MarkTypes]?: any; }, at?: Path | Point | Range$1) => void; declare const setNode: (editor: Editor, props: Partial, origin: Element$1) => void; declare const setNodeByType: (editor: Editor, props: Partial, type: CustomElementKinds) => void; declare const unWrap: (editor: Editor, kind: CustomElementKinds) => void; /** * Unwrap nodes by type */ declare const unwrapNodesByType: (editor: Editor, types: string[] | string, options?: Omit) => void; declare const index_d_applyDeepToNodes: typeof applyDeepToNodes; declare const index_d_clearMarks: typeof clearMarks; declare const index_d_deleteElement: typeof deleteElement; declare const index_d_deleteNodeByType: typeof deleteNodeByType; declare const index_d_handleContinualDeleteBackward: typeof handleContinualDeleteBackward; declare const index_d_handleContinualInsertBreak: typeof handleContinualInsertBreak; declare const index_d_insertElements: typeof insertElements; declare const index_d_insertInlineElement: typeof insertInlineElement; declare const index_d_insertParagraph: typeof insertParagraph; declare const index_d_mergeDeepToNodes: typeof mergeDeepToNodes; declare const index_d_moveChildren: typeof moveChildren; declare const index_d_onKeyDownResetBlockType: typeof onKeyDownResetBlockType; declare const index_d_setEndSelection: typeof setEndSelection; declare const index_d_setMarks: typeof setMarks; declare const index_d_setNode: typeof setNode; declare const index_d_setNodeByType: typeof setNodeByType; declare const index_d_unWrap: typeof unWrap; declare const index_d_unwrapNodesByType: typeof unwrapNodesByType; declare namespace index_d { export { index_d_applyDeepToNodes as applyDeepToNodes, index_d_clearMarks as clearMarks, index_d_deleteElement as deleteElement, index_d_deleteNodeByType as deleteNodeByType, index_d_handleContinualDeleteBackward as handleContinualDeleteBackward, index_d_handleContinualInsertBreak as handleContinualInsertBreak, index_d_insertElements as insertElements, index_d_insertInlineElement as insertInlineElement, index_d_insertParagraph as insertParagraph, index_d_mergeDeepToNodes as mergeDeepToNodes, index_d_moveChildren as moveChildren, index_d_onKeyDownResetBlockType as onKeyDownResetBlockType, index_d_setEndSelection as setEndSelection, index_d_setMarks as setMarks, index_d_setNode as setNode, index_d_setNodeByType as setNodeByType, index_d_unWrap as unWrap, index_d_unwrapNodesByType as unwrapNodesByType, }; } declare const autoFocus: (editor: Editor, isFocus: boolean) => void; declare const base64toBlob: (b64Data: any, contentType?: string, sliceSize?: number) => Blob; declare const isColorPanel: (element: HTMLElement) => boolean; declare const isColorIndicator: (element: HTMLElement) => Element; declare const isColorInput: (element: HTMLElement) => Element; declare const IS_MAC: boolean; declare const CONTROL_KEY: string; declare const isDirectionKeydown: (event: KeyboardEvent) => boolean; declare const getTextFromFragment: (nodes: Node[]) => string; declare const setClipboardDataByDom: (e: TheEditor, fragment: Element$1 | Element$1[], data?: DataTransfer) => Promise; declare function copyNode(e: TheEditor, element: Element$1, thyNotifyService?: ThyNotifyService, locale?: Signal): Promise; declare const createEmptyParagraph: () => Element$1; declare function plainToTheia(text: string): Descendant[]; declare function htmlToTheia(value: string): Descendant[]; declare function dataDeserialize(mode: TheDataMode, value: Descendant[] | string): Descendant[]; declare function dataSerializing(mode: TheDataMode, value: Descendant[]): string | Descendant[]; /** Converts CSS pixel values to numbers, eg "123px" to 123. Returns NaN for non pixel values. */ declare function coercePixelsFromCssValue(cssValue: string): number; declare function getElementWidth(element: HTMLElement): number; declare function getElementHeight(element: HTMLElement): number; declare function getColsTotalWidth(cols: HTMLTableColElement[]): number; declare function getRowsTotalHeight(rows: HTMLTableRowElement[]): number; declare function getElementClassByPrefix(el: DOMElement, prefix: string): any; declare function toggleStyle(nativeElement: HTMLElement, styleName: 'display' | 'backgroundColor' | 'textAlign' | 'textIndent' | 'verticalAlign' | 'height', styleValue?: string): void; declare function toggleProperty(nativeElement: HTMLElement, propertyName: 'colspan' | 'rowspan' | 'the-level' | 'start' | 'data-multi-digit', propertyValue?: string | number): void; declare function toggleClass(nativeElement: HTMLElement, className: string, isAdd: boolean): void; declare function toggleHeadingRelatedElement(editor: Editor, element: Element$1, isVisible: boolean): void; declare function createBreakBarChar(): HTMLSpanElement; declare const getEditorUUID: (editor: Editor) => string; declare const setEditorUUID: (editor: Editor, uuid: string) => void; declare const getStartBlock: (editor: Editor, fragment: Element$1) => any; declare const getEndBlock: (editor: Editor, fragment: Element$1) => any; declare const extractFragment: (data: DataTransfer, deleteKey?: string) => Promise<_worktile_theia.CustomElement[]>; declare const extractFragmentByHTML: (data: DataTransfer, deleteKey?: string) => Promise<_worktile_theia.CustomElement[]>; declare function deleteElementKey(nodes: Node[], key: string): Node[]; /** * 过滤文本格式:颜色/背景色/字体大小 * @param node */ declare function filterTextFormat(node: Element$1): void; declare function recursionNodes(nodes: Node[], callback: (node: Node) => void): void; declare const getMode: (editor: Editor) => TheModeType; declare const isMobileMode: (editor: Editor) => boolean; declare const isPrintMode: (editor: Editor) => boolean; declare const getToolbarClass: (editor: Editor) => string; declare function idCreator(length?: number): string; declare function insertDataByInvalidType(editor: Editor, fragment: Element$1[]): boolean; /** * whether the current node is a clean paragraph * @param editor * @param text * @returns boolean */ declare const isCleanEmptyParagraph: (editor: Editor) => boolean; declare const isPureEmptyParagraph: (editor: Editor, block: Node) => boolean; declare const isPureParagraph: (editor: Editor, block: Node | Node[]) => boolean; declare const isPureHeading: (editor: Editor, block: Node | Node[]) => boolean; /** * Loosely validate a URL `string`. * * @param {String} string * @return {Boolean} */ declare function isUrl(string: any): boolean; declare const mergeElementOptions: (elementOptions: ElementOptionsInfo[]) => {}; declare function getDirtyElements(editor: Editor, content: Descendant[], result?: Element$1[]): _worktile_theia.CustomElement[]; declare function fixBlockWithoutText(editor: Editor, path: Path): void; declare function fixBlockWithoutParagraph(editor: Editor, path: Path): void; declare function normalizeValue(editor: Editor, value: Descendant[]): void; declare const reSelection: (editor: TheEditor) => void; declare const refocus: (editor: TheEditor) => void; declare const getEditorScrollContainer: (editor: Editor, scrollContainerSelector?: string) => HTMLElement; declare const topLeftPosition: ConnectedPosition; declare const bottomLeftPosition: ConnectedPosition; declare const bottomRightPosition: ConnectedPosition; declare const topRightPosition: ConnectedPosition; declare const updatePopoverPosition: (overlayRef: OverlayRef, origin: FlexibleConnectedPositionStrategyOrigin, positions?: ConnectedPosition[]) => void; declare const THE_EDITOR_UUID: WeakMap<_worktile_theia.TheEditor, string>; declare const THE_EDITOR_CONVERSION_HINT_REF: WeakMap>; declare const THE_PLUGIN_MENU_REF: WeakMap>; declare const THE_EDITOR_ORIGIN_ANCHOR: WeakMap; declare const THE_EDITOR_POPOVER_REF: WeakMap>; declare const THE_EDITOR_PREVIOUS_SELECTION: WeakMap; declare const THE_EDITOR_COLOR: WeakMap; declare const THE_EDITOR_BG_COLOR: WeakMap; export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BLOCK_HIDDEN_CLASS, BasicTest, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_DEFAULT_MAX_HEIGHT, CODEMIRROR_PADDING_TOP, CODE_MODES, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, ColumnResizeNotifierSource, ColumnResizingStore, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DataTransferFaker, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DropdownMode, ELEMENT_UNIQUE_ID, EditorPresetConfigFactoryMock, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeaderLevelMap, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LOWEST_TEXT_CONTAINER_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QUICK_INSERT_HOTKEY, QuickInsertEditor, ROOT_ELEMENT_MARGIN_BOTTOM, ResizeRef, SLA_TABLE_CELL_SELECTOR, SLA_TABLE_SELECTOR, STANDARD_HEADING_TYPES, ScrollDirection, SpecialBackgroundColor, TAB_SPACE, THE_EDITOR_BG_COLOR, THE_EDITOR_COLOR, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_I18N_DE_DE, THE_I18N_EN_US, THE_I18N_JA_JP, THE_I18N_LOCALE_ID, THE_I18N_RU_RU, THE_I18N_ZH_HANS, THE_I18N_ZH_HANT, THE_IMAGE_SERVICE_TOKEN, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_PRESET_CONFIG_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TablePosition, TheBaseElement, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheCode, TheColumnResizeDirective, TheColumnResizeOverlayHandle, TheContextMenu, TheContextService, TheConversionHint, TheDataMode, TheEditor, TheEditorComponent, TheEditorModule, TheI18nService, TheImage, TheInlineToolbar, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheLocaleType, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index_d$1 as TheQueries, TheQuickInsert, TheTable, TheTableSelect, TheToolbarComponent, TheToolbarDropdown, TheToolbarGroup, TheToolbarGroupToken, TheToolbarItem, TheToolbarService, index_d as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, bottomLeftPosition, bottomRightPosition, buildPluginMenu, buildPluginMenuItemMap, buildQuickInsertMenus, calcPrintColumnWidth, calcSpanForColumn, calcSpanForRow, calculateHeaderRowHeight, calculateRowControls, coercePixelsFromCssValue, combinePlugins, copyNode, createBreakBarChar, createCell, createEmptyContent, createEmptyParagraph, createMentionPlugin, createPluginFactory, createRow, createTable, createTablePosition, createTest1Plugin, createTestPlugin, createToolbar, createVerticalAlignPlugin, customPluginMock, customPluginMockKey, dataDeserialize, dataSerializing, _default$1 as deDeLocale, deleteElementKey, _default$3 as enUsLocale, errorImageUrlMock, expandPreviousHeadings, extractFragment, extractFragmentByHTML, filterTextFormat, fixBlockWithoutParagraph, fixBlockWithoutText, flattenDeepPlugins, getAllVisibleState, getCellPositionsFromRange, getCollapsedStandardHeadingAbove, getColsTotalWidth, getColumnsWidth, getDirtyElements, getEditorScrollContainer, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getFollowElements, getGridColumns, getMode, getNextCell, getOriginCell, getPlugin, getPluginOptions, getPlugins, getPreviousHeading, getPreviousRelatedHeadingElements, getRowsTotalHeight, getSelectCellNode, getSelectedCellPositions, getStartBlock, getTableByCell, getTableByRow, getTextFromFragment, getTheDefaultPluginMenu, getToolbarClass, hasHeaderRow, hasNumberedColumn, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, injectTranslations, insertDataByInvalidType, internalPlugins, isCleanEmptyParagraph, isColorIndicator, isColorInput, isColorPanel, isDirectionKeydown, isHeadingElement, isInside, isMobileMode, isPrintMode, isPureEmptyParagraph, isPureHeading, isPureParagraph, isRangeInTable, isRectangularInTableCells, isSelectedAllCell, isSelectionInTable, isStandardHeadingElement, isStandardHeadingElementByType, isUrl, isVirtualKey, _default$2 as jaJpLocale, matchOptions, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, normalizeValue, originOptions, plainToTheia, pluginKey, pluginKey1, pluginsByKey, reSelection, recursionNodes, refocus, _default as ruRuLocale, setClipboardDataByDom, setEditorUUID, theTethysIconRegistryFaker, toggleClass, toggleHeadingRelatedElement, toggleProperty, toggleStyle, topLeftPosition, topRightPosition, uniqueCellPosition, updatePopoverPosition, withMention, withTestPlugin, withTheia, _default$5 as zhHansLocale, _default$4 as zhHantLocale }; export type { BlockElementKinds, BlockQuoteElement, BulletedListElement, CellRect, CodeElement, ColorType, ColumnSize, ColumnSizeAction, CustomEditor, CustomElement, CustomElementKinds, CustomText, CustomizeToolbarItem, DefaultToolbarItem, DomEventDataInfo, EditableVoidElement, EditorAboveOptions, EditorNodesOptions, EditorParentOptions, ElementOptionsInfo, EmptyText, FileUploadingItem, HeadingElement, HeadingElementKinds, HeadingFiveElement, HeadingFourElement, HeadingOneElement, HeadingSixElement, HeadingThreeElement, HeadingTwoElement, HrElement, ImageElement, ImageEntry, ImageInfo, ImagePluginOptions, IndentOptions, InlineCodeElement, InlineElementKinds, LayoutOption, LinkElement, ListItemElement, MatchOptions, MentionPluginOptions, NestedStructureByKey, NoInfer, NodeMatch, NumberedListElement, OptionItem, OverrideByKey, ParagraphElement, PluginKey, PreviewImageInfo, QueryOptions, TableCellElement, TableElement, TableRowElement, TheBlockElement, TheContextOptions, TheElement, TheI18nLocale, TheI18nTranslation, TheImageService, TheListboxChangeEvent, TheListboxChangeEventType, TheMention, TheModeType, TheOptions, ThePlugin, ThePluginBaseOption, ThePluginMenuGroup, ThePluginMenuItem, ThePluginMenuItemConfig, ThePluginMenuItemKey, ThePluginMenuItemWrap, ThePluginOption, ThePresetConfig, TheiaPluginKey, TodoItemElement, ToolbarDefinition, ToolbarEntity, ToolbarInitOption, ToolbarItem, ToolbarItemsComposeReturn, ToolbarKey, ToolbarOption, UploadFileEntity, WithOverride, WithRequired, WithThePlugin, WrapOptions };