@worktile/theia 19.1.6 → 19.2.0-next.0
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/interfaces/editor.d.ts
CHANGED
|
@@ -26,62 +26,66 @@ export interface TheEditor extends AngularEditor, HistoryEditor {
|
|
|
26
26
|
isVisible: (element: Element) => boolean;
|
|
27
27
|
}
|
|
28
28
|
export declare const TheEditor: {
|
|
29
|
-
getWindow(editor: AngularEditor): Window;
|
|
30
|
-
findKey(editor: AngularEditor, node: Node): import("slate-angular").Key;
|
|
31
29
|
onError(errorData: import("slate-angular").SlateError): void;
|
|
32
|
-
findPath(editor: AngularEditor, node: Node): Path;
|
|
33
|
-
isNodeInEditor(editor: AngularEditor, node: Node): boolean;
|
|
34
|
-
findDocumentOrShadowRoot(editor: AngularEditor): Document | ShadowRoot;
|
|
35
|
-
isFocused(editor: AngularEditor): boolean;
|
|
36
|
-
isReadonly(editor: AngularEditor): boolean;
|
|
37
|
-
isBlockHangingRight(editor: AngularEditor): boolean;
|
|
38
|
-
blur(editor: AngularEditor): void;
|
|
39
|
-
focus(editor: AngularEditor): void;
|
|
40
|
-
deselect(editor: AngularEditor): void;
|
|
41
|
-
hasDOMNode(editor: AngularEditor, target: globalThis.Node, options?: {
|
|
42
|
-
editable?: boolean;
|
|
43
|
-
}): boolean;
|
|
44
|
-
insertData(editor: AngularEditor, data: DataTransfer): void;
|
|
45
|
-
insertFragmentData(editor: AngularEditor, data: DataTransfer): Promise<boolean>;
|
|
46
|
-
insertTextData(editor: AngularEditor, data: DataTransfer): Promise<boolean>;
|
|
47
30
|
onKeydown(editor: AngularEditor, data: KeyboardEvent): void;
|
|
48
31
|
onClick(editor: AngularEditor, data: MouseEvent): void;
|
|
49
|
-
setFragmentData(editor: AngularEditor, data: DataTransfer, originEvent?: import("slate-angular").OriginEvent): void;
|
|
50
32
|
deleteCutData(editor: AngularEditor): void;
|
|
51
|
-
toDOMNode(editor: AngularEditor, node: Node): HTMLElement;
|
|
52
|
-
toDOMPoint(editor: AngularEditor, point: Point, options: {
|
|
53
|
-
range: Range;
|
|
54
|
-
}): import("slate-angular").DOMPoint;
|
|
55
|
-
toDOMRange(editor: AngularEditor, range: Range): globalThis.Range;
|
|
56
|
-
toSlateNode<T extends boolean>(editor: AngularEditor, domNode: globalThis.Node, options?: {
|
|
57
|
-
suppressThrow: T;
|
|
58
|
-
}): T extends true ? Node | null : Node;
|
|
59
|
-
findEventRange(editor: AngularEditor, event: any): Range;
|
|
60
|
-
isLeafInEditor(editor: AngularEditor, leafNode: globalThis.Element, options: {
|
|
61
|
-
suppressThrow: boolean;
|
|
62
|
-
}): boolean;
|
|
63
|
-
toSlatePoint<T extends boolean>(editor: AngularEditor, domPoint: import("slate-angular").DOMPoint, options: {
|
|
64
|
-
exactMatch?: boolean;
|
|
65
|
-
suppressThrow: T;
|
|
66
|
-
}): T extends true ? Point | null : Point;
|
|
67
|
-
toSlateRange<T extends boolean>(editor: AngularEditor, domRange: globalThis.Range | StaticRange | Selection, options?: {
|
|
68
|
-
exactMatch?: boolean;
|
|
69
|
-
suppressThrow: T;
|
|
70
|
-
}): T extends true ? Range | null : Range;
|
|
71
33
|
isLeafBlock(editor: AngularEditor, node: Node): boolean;
|
|
72
|
-
isBlockCardLeftCursor(editor: AngularEditor): boolean;
|
|
73
|
-
isBlockCardRightCursor(editor: AngularEditor): boolean;
|
|
74
|
-
getCardCursorNode(editor: AngularEditor, blockCardNode: Node, options: {
|
|
75
|
-
direction: "left" | "right" | "center";
|
|
76
|
-
}): ChildNode;
|
|
77
|
-
toSlateCardEntry(editor: AngularEditor, node: globalThis.Node): NodeEntry;
|
|
78
34
|
moveBlockCard(editor: AngularEditor, blockCardNode: Node, options: {
|
|
79
35
|
direction: "left" | "right";
|
|
80
36
|
}): void;
|
|
81
37
|
moveBlockCardCursor(editor: AngularEditor, path: Path, options: {
|
|
82
38
|
direction: "left" | "right";
|
|
83
39
|
}): void;
|
|
84
|
-
|
|
40
|
+
isNodeInEditor(editor: import("slate-angular/plugins/with-dom").CustomDOMEditor, node: Node): boolean;
|
|
41
|
+
isLeafInEditor(editor: import("slate-angular/plugins/with-dom").CustomDOMEditor, leafNode: globalThis.Element): boolean;
|
|
42
|
+
isBlockHangingRight(editor: Editor): boolean;
|
|
43
|
+
isBlockCardLeftCursor(editor: Editor): boolean;
|
|
44
|
+
isBlockCardRightCursor(editor: Editor): boolean;
|
|
45
|
+
getCardCursorNode(editor: AngularEditor, blockCardNode: Node, options: {
|
|
46
|
+
direction: "left" | "right" | "center";
|
|
47
|
+
}): ChildNode;
|
|
48
|
+
toSlateCardEntry(editor: AngularEditor, node: globalThis.Node): import("slate").NodeEntry;
|
|
49
|
+
androidPendingDiffs: (editor: Editor) => import("slate-dom").TextDiff[] | undefined;
|
|
50
|
+
androidScheduleFlush: (editor: Editor) => void;
|
|
51
|
+
blur: (editor: import("slate-dom").DOMEditor) => void;
|
|
52
|
+
deselect: (editor: import("slate-dom").DOMEditor) => void;
|
|
53
|
+
findDocumentOrShadowRoot: (editor: import("slate-dom").DOMEditor) => Document | ShadowRoot;
|
|
54
|
+
findEventRange: (editor: import("slate-dom").DOMEditor, event: any) => import("slate").Range;
|
|
55
|
+
findKey: (editor: import("slate-dom").DOMEditor, node: Node) => import("slate-dom").Key;
|
|
56
|
+
findPath: (editor: import("slate-dom").DOMEditor, node: Node) => Path;
|
|
57
|
+
focus: (editor: import("slate-dom").DOMEditor, options?: {
|
|
58
|
+
retries: number;
|
|
59
|
+
}) => void;
|
|
60
|
+
getWindow: (editor: import("slate-dom").DOMEditor) => Window;
|
|
61
|
+
hasDOMNode: (editor: import("slate-dom").DOMEditor, target: globalThis.Node, options?: {
|
|
62
|
+
editable?: boolean;
|
|
63
|
+
}) => boolean;
|
|
64
|
+
hasEditableTarget: (editor: import("slate-dom").DOMEditor, target: EventTarget | null) => target is globalThis.Node;
|
|
65
|
+
hasRange: (editor: import("slate-dom").DOMEditor, range: import("slate").Range) => boolean;
|
|
66
|
+
hasSelectableTarget: (editor: import("slate-dom").DOMEditor, target: EventTarget | null) => boolean;
|
|
67
|
+
hasTarget: (editor: import("slate-dom").DOMEditor, target: EventTarget | null) => target is globalThis.Node;
|
|
68
|
+
insertData: (editor: import("slate-dom").DOMEditor, data: DataTransfer) => void;
|
|
69
|
+
insertFragmentData: (editor: import("slate-dom").DOMEditor, data: DataTransfer) => boolean;
|
|
70
|
+
insertTextData: (editor: import("slate-dom").DOMEditor, data: DataTransfer) => boolean;
|
|
71
|
+
isComposing: (editor: import("slate-dom").DOMEditor) => boolean;
|
|
72
|
+
isFocused: (editor: import("slate-dom").DOMEditor) => boolean;
|
|
73
|
+
isReadOnly: (editor: import("slate-dom").DOMEditor) => boolean;
|
|
74
|
+
isTargetInsideNonReadonlyVoid: (editor: import("slate-dom").DOMEditor, target: EventTarget | null) => boolean;
|
|
75
|
+
setFragmentData: (editor: import("slate-dom").DOMEditor, data: DataTransfer, originEvent?: "drag" | "copy" | "cut") => void;
|
|
76
|
+
toDOMNode: (editor: import("slate-dom").DOMEditor, node: Node) => HTMLElement;
|
|
77
|
+
toDOMPoint: (editor: import("slate-dom").DOMEditor, point: import("slate").Point) => import("slate-dom").DOMPoint;
|
|
78
|
+
toDOMRange: (editor: import("slate-dom").DOMEditor, range: import("slate").Range) => globalThis.Range;
|
|
79
|
+
toSlateNode: (editor: import("slate-dom").DOMEditor, domNode: globalThis.Node) => Node;
|
|
80
|
+
toSlatePoint: <T extends boolean>(editor: import("slate-dom").DOMEditor, domPoint: import("slate-dom").DOMPoint, options: {
|
|
81
|
+
exactMatch: boolean;
|
|
82
|
+
suppressThrow: T;
|
|
83
|
+
searchDirection?: "forward" | "backward";
|
|
84
|
+
}) => T extends true ? import("slate").Point | null : import("slate").Point;
|
|
85
|
+
toSlateRange: <T extends boolean>(editor: import("slate-dom").DOMEditor, domRange: globalThis.Range | StaticRange | Selection, options: {
|
|
86
|
+
exactMatch: boolean;
|
|
87
|
+
suppressThrow: T;
|
|
88
|
+
}) => T extends true ? import("slate").Range | null : import("slate").Range;
|
|
85
89
|
};
|
|
86
90
|
export declare enum TheDataMode {
|
|
87
91
|
json = "json",
|
package/package.json
CHANGED
package/utils/dom.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Element } from 'slate';
|
|
2
|
-
import { DOMElement } from 'slate-
|
|
2
|
+
import { DOMElement } from 'slate-dom';
|
|
3
3
|
/** Converts CSS pixel values to numbers, eg "123px" to 123. Returns NaN for non pixel values. */
|
|
4
4
|
export declare function coercePixelsFromCssValue(cssValue: string): number;
|
|
5
5
|
export declare function getElementWidth(element: HTMLElement): number;
|