@worktile/theia 16.2.0 → 16.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -44,7 +44,7 @@ export declare const TheEditor: {
44
44
  insertTextData(editor: AngularEditor, data: DataTransfer): boolean;
45
45
  onKeydown(editor: AngularEditor, data: KeyboardEvent): void;
46
46
  onClick(editor: AngularEditor, data: MouseEvent): void;
47
- setFragmentData(editor: AngularEditor, data: DataTransfer, originEvent?: "copy" | "drag" | "cut"): void;
47
+ setFragmentData(editor: AngularEditor, data: DataTransfer, originEvent?: "drag" | "copy" | "cut"): void;
48
48
  deleteCutData(editor: AngularEditor): void;
49
49
  toDOMNode(editor: AngularEditor, node: Node): HTMLElement;
50
50
  toDOMPoint(editor: AngularEditor, point: import("slate").BasePoint): import("slate-angular").DOMPoint;
@@ -53,7 +53,7 @@ export declare const TheEditor: {
53
53
  findEventRange(editor: AngularEditor, event: any): import("slate").BaseRange;
54
54
  isLeafInEditor(editor: AngularEditor, leafNode: globalThis.Element): boolean;
55
55
  toSlatePoint(editor: AngularEditor, domPoint: import("slate-angular").DOMPoint): import("slate").BasePoint;
56
- toSlateRange(editor: AngularEditor, domRange: Selection | globalThis.Range | StaticRange): import("slate").BaseRange;
56
+ toSlateRange(editor: AngularEditor, domRange: globalThis.Range | StaticRange | Selection): import("slate").BaseRange;
57
57
  isLeafBlock(editor: AngularEditor, node: Node): boolean;
58
58
  isBlockCardLeftCursor(editor: AngularEditor): boolean;
59
59
  isBlockCardRightCursor(editor: AngularEditor): boolean;
@@ -1,12 +1,8 @@
1
1
  import { OnInit } from '@angular/core';
2
2
  import { BaseElementComponent } from 'slate-angular';
3
3
  import { Editor, Element } from 'slate';
4
- import { TheModeConfig } from './editor';
5
4
  import * as i0 from "@angular/core";
6
5
  export declare class TheBaseElementComponent<T extends Element = Element, K extends Editor = Editor> extends BaseElementComponent<T, K> implements OnInit {
7
- modeConfig: TheModeConfig;
8
- get isMobileMode(): boolean;
9
- get isPrintMode(): boolean;
10
6
  onContextChange(): void;
11
7
  ngOnInit(): void;
12
8
  static ɵfac: i0.ɵɵFactoryDeclaration<TheBaseElementComponent<any, any>, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worktile/theia",
3
- "version": "16.2.0",
3
+ "version": "16.2.2",
4
4
  "description": "theia editor",
5
5
  "author": "YanDong <nanianqiumo@foxmail.com>",
6
6
  "homepage": "https://github.com/atinc/theia#readme",
@@ -1,6 +1,15 @@
1
1
  import { TheEditor } from '../../interfaces';
2
+ import { MarkTypes } from '../../constants';
2
3
  export declare const PaintFormatEditor: {
3
- formatBrush(editor: TheEditor): void;
4
+ formatBrush(editor: TheEditor, marks: {
5
+ bold?: any;
6
+ italic?: any;
7
+ underlined?: any;
8
+ strike?: any;
9
+ color?: any;
10
+ "background-color"?: any;
11
+ "font-size"?: any;
12
+ }): void;
4
13
  isActive(editor: TheEditor): boolean;
5
14
  enableFormatBrush(editor: TheEditor): void;
6
15
  cancelFormatBrushStatus(editor: TheEditor): void;
@@ -42,6 +42,7 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
42
42
  isLeftShadow: boolean;
43
43
  previousScrollContainer: string;
44
44
  columns: TheTableColumn[];
45
+ isMobileMode: boolean;
45
46
  get nativeElement(): HTMLElement;
46
47
  get tbodyNativeElement(): HTMLElement;
47
48
  tableWrapper: ElementRef<HTMLElement>;
@@ -46,6 +46,7 @@ export declare class TheTdComponent extends TheBaseElementComponent<TableCellEle
46
46
  get rowResizeClass(): string[];
47
47
  dotWrapperHovered: boolean;
48
48
  resizeRef: ResizeRef;
49
+ isMobileMode: boolean;
49
50
  backgroundColor: string;
50
51
  colspan: number;
51
52
  rowspan: number;
@@ -1,6 +1,6 @@
1
1
  import { Editor, NodeEntry, Path, Range, Location } from 'slate';
2
2
  import { TableOptions } from './table.types';
3
- import { Alignment, Indents, VerticalAlignment } from '../../constants';
3
+ import { Alignment, Indents, MarkTypes, VerticalAlignment } from '../../constants';
4
4
  import { TheEditor } from '../../interfaces';
5
5
  import { CustomElement, TableElement } from '../../custom-types';
6
6
  export declare const TableEditor: {
@@ -18,6 +18,15 @@ export declare const TableEditor: {
18
18
  isVerticalAlignActive(editor: TheEditor, alignment: VerticalAlignment): boolean;
19
19
  toggleMark(editor: TheEditor, isActive: boolean, format: string | string[], value?: string | number | boolean): boolean;
20
20
  clearMark(editor: TheEditor): boolean;
21
+ formatBrush(editor: TheEditor, marks: {
22
+ bold?: any;
23
+ italic?: any;
24
+ underlined?: any;
25
+ strike?: any;
26
+ color?: any;
27
+ "background-color"?: any;
28
+ "font-size"?: any;
29
+ }): boolean;
21
30
  handleSelectedCells(editor: TheEditor, handle: (cellPath: Path, cellRange: Range) => void): boolean;
22
31
  hasHeaderRow(editor: TheEditor, location?: Location): boolean;
23
32
  hasHeaderColumn(editor: TheEditor, location?: Location): boolean;
@@ -3,6 +3,6 @@ import { EditorAboveOptions } from '../interfaces';
3
3
  /**
4
4
  * Is the range (default: selection) across blocks.
5
5
  */
6
- export declare const isRangeAcrossBlocks: (editor: Editor, { at, ...options }?: Omit<EditorAboveOptions<import("slate").Ancestor>, "match" | "at"> & {
6
+ export declare const isRangeAcrossBlocks: (editor: Editor, { at, ...options }?: Omit<EditorAboveOptions<import("slate").Ancestor>, "at" | "match"> & {
7
7
  at?: Range | null;
8
8
  }) => boolean;
@@ -0,0 +1,5 @@
1
+ import { Editor } from 'slate';
2
+ import { TheModeType } from '../interfaces';
3
+ export declare const getMode: (editor: Editor) => TheModeType;
4
+ export declare const isMobileMode: (editor: Editor) => boolean;
5
+ export declare const isPrintMode: (editor: Editor) => boolean;
package/utils/index.d.ts CHANGED
@@ -16,3 +16,4 @@ export * from './copy-node';
16
16
  export * from './refocus';
17
17
  export * from './insert-data-by-invalid-type';
18
18
  export * from './color-picker';
19
+ export * from './get-mode';