@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.
- package/editor.module.d.ts +1 -1
- package/esm2022/editor.component.mjs +3 -3
- package/esm2022/interfaces/view-base.mjs +1 -9
- package/esm2022/plugins/code/code.component.mjs +6 -5
- package/esm2022/plugins/image/image.component.mjs +3 -2
- package/esm2022/plugins/link/link.component.mjs +3 -2
- package/esm2022/plugins/mention/mention.plugin.mjs +3 -2
- package/esm2022/plugins/paint-format/paint-format.editor.mjs +14 -11
- package/esm2022/plugins/quick-insert/quick-insert.plugin.mjs +4 -4
- package/esm2022/plugins/table/components/table.component.mjs +3 -1
- package/esm2022/plugins/table/components/td/td.component.mjs +3 -1
- package/esm2022/plugins/table/table.editor.mjs +6 -1
- package/esm2022/utils/get-mode.mjs +14 -0
- package/esm2022/utils/index.mjs +2 -1
- package/fesm2022/worktile-theia.mjs +70 -55
- package/fesm2022/worktile-theia.mjs.map +1 -1
- package/interfaces/editor.d.ts +2 -2
- package/interfaces/view-base.d.ts +0 -4
- package/package.json +1 -1
- package/plugins/paint-format/paint-format.editor.d.ts +10 -1
- package/plugins/table/components/table.component.d.ts +1 -0
- package/plugins/table/components/td/td.component.d.ts +1 -0
- package/plugins/table/table.editor.d.ts +10 -1
- package/queries/is-range-across-blocks.d.ts +1 -1
- package/utils/get-mode.d.ts +5 -0
- package/utils/index.d.ts +1 -0
package/interfaces/editor.d.ts
CHANGED
|
@@ -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?: "
|
|
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:
|
|
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,15 @@
|
|
|
1
1
|
import { TheEditor } from '../../interfaces';
|
|
2
|
+
import { MarkTypes } from '../../constants';
|
|
2
3
|
export declare const PaintFormatEditor: {
|
|
3
|
-
formatBrush(editor: TheEditor
|
|
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>, "
|
|
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