@worktile/theia 16.2.1 → 16.2.3

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.
@@ -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: globalThis.Range | StaticRange | Selection): import("slate").BaseRange;
56
+ toSlateRange(editor: AngularEditor, domRange: Selection | globalThis.Range | StaticRange): import("slate").BaseRange;
57
57
  isLeafBlock(editor: AngularEditor, node: Node): boolean;
58
58
  isBlockCardLeftCursor(editor: AngularEditor): boolean;
59
59
  isBlockCardRightCursor(editor: AngularEditor): boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worktile/theia",
3
- "version": "16.2.1",
3
+ "version": "16.2.3",
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;
@@ -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;
@@ -1,4 +1,4 @@
1
- import { ThePluginTableOption } from './table.types';
2
1
  import { TheEditor } from '../../interfaces';
2
+ import { ThePluginTableOption } from './table.types';
3
3
  export declare const withTable: <T extends TheEditor>(editor: T) => T;
4
4
  export declare const createTablePlugin: <T = {}>(override?: Partial<import("../../interfaces").ThePlugin<T, ThePluginTableOption>>, overrideByKey?: import("../../interfaces").OverrideByKey) => import("../../interfaces").ThePlugin<T, ThePluginTableOption>;
@@ -0,0 +1,7 @@
1
+ import { TheEditor } from '../../../interfaces';
2
+ /**
3
+ * 处理单元格内 shift + up/down/left/right 行为
4
+ * @param editor 编辑器对象
5
+ * @param e 键盘事件对象
6
+ */
7
+ export declare const moveSelectionFromCell: (editor: TheEditor, e: KeyboardEvent) => void;
@@ -1,6 +1,6 @@
1
- import { Editor } from 'slate';
2
- export declare function calculateAnchorPositionInCell(editor: Editor): {
1
+ import { Editor, Path, Point } from 'slate';
2
+ export declare function calculateAnchorPositionInCell(editor: Editor, at?: Path | Point): {
3
3
  isFirstLine: boolean;
4
4
  isLastLine: boolean;
5
- anchorBlockPath: import("slate").Path;
5
+ blockPath: Path;
6
6
  };
@@ -0,0 +1,4 @@
1
+ import { TableCellElement } from '../../../custom-types';
2
+ import { TheEditor } from '../../../interfaces';
3
+ import { TableSelectCellDirection } from '../table.types';
4
+ export declare const getNextCell: (e: TheEditor, direction: TableSelectCellDirection, cellPath: number[]) => TableCellElement;
@@ -1,16 +1,15 @@
1
+ export * from './calc-span';
2
+ export * from './calculate-table';
3
+ export * from './cell-position';
1
4
  export * from './create-cell';
2
5
  export * from './create-row';
3
6
  export * from './create-table';
7
+ export * from './create-table-position';
8
+ export * from './get-grid-columns';
9
+ export * from './get-next-cell';
10
+ export * from './get-select-cell-node';
11
+ export * from './is-header-row';
4
12
  export * from './is-range-in-table';
5
13
  export * from './is-selection-in-table';
6
- export * from './table-position';
7
- export * from './calc-span';
8
14
  export * from './is-virtual-key';
9
- export * from './get-grid-columns';
10
- export * from './create-table-position';
11
- export * from './cell-position';
12
- export * from './calculate-table';
13
- export * from './is-header-row';
14
15
  export * from './table-position';
15
- export * from './cell-position';
16
- export * from './get-select-cell-node';
@@ -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>, "at" | "match"> & {
6
+ export declare const isRangeAcrossBlocks: (editor: Editor, { at, ...options }?: Omit<EditorAboveOptions<import("slate").Ancestor>, "match" | "at"> & {
7
7
  at?: Range | null;
8
8
  }) => boolean;