@worktile/theia 17.1.0 → 17.2.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/components/inline-toolbar/inline-toolbar.component.d.ts +2 -2
- package/editor.component.d.ts +1 -0
- package/esm2022/components/conversion-hint/conversion-hint.component.mjs +3 -3
- package/esm2022/components/inline-toolbar/inline-toolbar.component.mjs +6 -6
- package/esm2022/constants/auto-format-rules.mjs +7 -7
- package/esm2022/core/toolbar-item/base-toolbar-item.mjs +2 -2
- package/esm2022/editor.component.mjs +20 -11
- package/esm2022/interfaces/editor.mjs +1 -1
- package/esm2022/interfaces/preset.mjs +1 -1
- package/esm2022/plugins/align/align.editor.mjs +2 -2
- package/esm2022/plugins/align/align.plugin.mjs +3 -3
- package/esm2022/plugins/autoformat/autoformat.plugin.mjs +2 -2
- package/esm2022/plugins/autoformat/transforms/auto-format-inline.mjs +2 -2
- package/esm2022/plugins/blockquote/blockquote.editor.mjs +4 -4
- package/esm2022/plugins/blockquote/blockquote.plugin.mjs +3 -3
- package/esm2022/plugins/code/code.component.mjs +2 -2
- package/esm2022/plugins/code/code.editor.mjs +3 -3
- package/esm2022/plugins/code/code.plugin.mjs +3 -4
- package/esm2022/plugins/common/block-card.plugin.mjs +3 -3
- package/esm2022/plugins/common/get-fragment.plugin.mjs +2 -2
- package/esm2022/plugins/common/move-selection.plugin.mjs +3 -3
- package/esm2022/plugins/common/remove-empty.plugin.mjs +4 -4
- package/esm2022/plugins/common/remove-void.plugin.mjs +4 -4
- package/esm2022/plugins/common/reset-type.plugin.mjs +4 -4
- package/esm2022/plugins/deserialize/deserialize-md.plugin.mjs +2 -2
- package/esm2022/plugins/font-size/font-size.editor.mjs +5 -5
- package/esm2022/plugins/heading/heading.editor.mjs +5 -5
- package/esm2022/plugins/heading/heading.plugin.mjs +2 -2
- package/esm2022/plugins/hr/hr.editor.mjs +2 -2
- package/esm2022/plugins/hr/hr.plugin.mjs +4 -4
- package/esm2022/plugins/image/image.component.mjs +2 -2
- package/esm2022/plugins/image/image.editor.mjs +3 -3
- package/esm2022/plugins/list/components/list-item.component.mjs +2 -2
- package/esm2022/plugins/list/list.editor.mjs +4 -4
- package/esm2022/plugins/list/list.plugin.mjs +21 -21
- package/esm2022/plugins/list/normalizers/normalize-no.mjs +4 -4
- package/esm2022/plugins/list/on-key-down-list.mjs +4 -4
- package/esm2022/plugins/list/queries/get-list-item-entry.mjs +2 -2
- package/esm2022/plugins/list/queries/is-in-list.mjs +2 -2
- package/esm2022/plugins/list/queries/is-selection-at-list-item-start.mjs +2 -2
- package/esm2022/plugins/list/transforms/insert-list-data.mjs +4 -4
- package/esm2022/plugins/list/transforms/insert-list-item.mjs +4 -4
- package/esm2022/plugins/list/transforms/move-list-item-sublist-items-to-list-item-sublist.mjs +2 -2
- package/esm2022/plugins/list/transforms/move-list-item-sublist-items-to-list.mjs +3 -3
- package/esm2022/plugins/list/transforms/move-list-item-up.mjs +2 -2
- package/esm2022/plugins/list/transforms/unwrap-list.mjs +2 -2
- package/esm2022/plugins/mention/mention.editor.mjs +2 -2
- package/esm2022/plugins/node-id/node-id.plugin.mjs +7 -7
- package/esm2022/plugins/normalizers/insert-paragraph-nodes.mjs +2 -2
- package/esm2022/plugins/normalizers/trailing-node.plugin.mjs +4 -4
- package/esm2022/plugins/paint-format/paint-format.editor.mjs +7 -7
- package/esm2022/plugins/quick-insert/components/quick-insert.component.mjs +2 -2
- package/esm2022/plugins/soft-break/soft-break.plugin.mjs +3 -3
- package/esm2022/plugins/table/components/table.component.mjs +2 -2
- package/esm2022/plugins/table/components/td/td.component.mjs +2 -2
- package/esm2022/plugins/table/components/toolbar/table-toolbar.component.mjs +2 -2
- package/esm2022/plugins/table/table.editor.mjs +3 -3
- package/esm2022/plugins/table/table.plugin.mjs +2 -2
- package/esm2022/plugins/table/transforms/insert-table.mjs +2 -2
- package/esm2022/plugins/table/transforms/move-selection-from-cell.mjs +2 -2
- package/esm2022/plugins/table/utils/calc-anchor-position.mjs +2 -2
- package/esm2022/plugins/table/utils/calculate-table.mjs +2 -2
- package/esm2022/plugins/table/utils/is-legal-table.mjs +4 -4
- package/esm2022/plugins/table/utils/merge-cell.mjs +2 -2
- package/esm2022/plugins/table/utils/split-cell.mjs +2 -2
- package/esm2022/plugins/todo-item/todo-item.component.mjs +2 -2
- package/esm2022/plugins/todo-item/todo-item.editor.mjs +2 -2
- package/esm2022/plugins/todo-item/todo-item.plugin.mjs +4 -4
- package/esm2022/public-api.mjs +3 -3
- package/esm2022/queries/index.mjs +2 -67
- package/esm2022/transforms/apply-deep-to-nodes.mjs +2 -2
- package/esm2022/transforms/delete-element.mjs +3 -3
- package/esm2022/transforms/delete-node-by-type.mjs +2 -2
- package/esm2022/transforms/handle-continual-delete-backward.mjs +2 -2
- package/esm2022/transforms/index.mjs +14 -34
- package/esm2022/transforms/insert-elements.mjs +3 -3
- package/esm2022/transforms/move-children.mjs +2 -2
- package/esm2022/transforms/on-keydown-reset-block-type.mjs +2 -2
- package/esm2022/transforms/set-node-by-type.mjs +2 -2
- package/esm2022/transforms/set-node.mjs +2 -2
- package/esm2022/utils/auto-focus.mjs +2 -2
- package/esm2022/utils/index.mjs +2 -1
- package/esm2022/utils/insert-data-by-invalid-type.mjs +2 -2
- package/esm2022/utils/normalize.mjs +61 -0
- package/esm2022/utils/refocus.mjs +4 -4
- package/fesm2022/worktile-theia.mjs +1045 -978
- package/fesm2022/worktile-theia.mjs.map +1 -1
- package/interfaces/editor.d.ts +3 -2
- package/interfaces/preset.d.ts +1 -1
- package/package.json +2 -2
- package/plugins/list/list.editor.d.ts +1 -1
- package/plugins/list/transforms/insert-list-data.d.ts +1 -1
- package/plugins/normalizers/trailing-node.plugin.d.ts +1 -1
- package/plugins/paint-format/paint-format.editor.d.ts +1 -1
- package/plugins/table/components/table.component.d.ts +1 -1
- package/plugins/table/utils/is-legal-table.d.ts +1 -1
- package/plugins/vertical-align/vertical-align.scss +1 -2
- package/public-api.d.ts +2 -2
- package/queries/index.d.ts +61 -82
- package/queries/is-range-across-blocks.d.ts +1 -1
- package/transforms/handle-continual-delete-backward.d.ts +1 -1
- package/transforms/index.d.ts +17 -29
- package/utils/index.d.ts +1 -0
- package/utils/normalize.d.ts +5 -0
package/interfaces/editor.d.ts
CHANGED
|
@@ -61,7 +61,7 @@ export declare const TheEditor: {
|
|
|
61
61
|
exactMatch?: boolean;
|
|
62
62
|
suppressThrow: T_1;
|
|
63
63
|
}): T_1 extends true ? import("slate").BasePoint : import("slate").BasePoint;
|
|
64
|
-
toSlateRange<T_2 extends boolean>(editor: AngularEditor, domRange: globalThis.Range | StaticRange
|
|
64
|
+
toSlateRange<T_2 extends boolean>(editor: AngularEditor, domRange: Selection | globalThis.Range | StaticRange, options?: {
|
|
65
65
|
exactMatch?: boolean;
|
|
66
66
|
suppressThrow: T_2;
|
|
67
67
|
}): T_2 extends true ? import("slate").BaseRange : import("slate").BaseRange;
|
|
@@ -69,7 +69,7 @@ export declare const TheEditor: {
|
|
|
69
69
|
isBlockCardLeftCursor(editor: AngularEditor): boolean;
|
|
70
70
|
isBlockCardRightCursor(editor: AngularEditor): boolean;
|
|
71
71
|
getCardCursorNode(editor: AngularEditor, blockCardNode: Node, options: {
|
|
72
|
-
direction: "
|
|
72
|
+
direction: "left" | "right" | "center";
|
|
73
73
|
}): ChildNode;
|
|
74
74
|
toSlateCardEntry(editor: AngularEditor, node: globalThis.Node): NodeEntry;
|
|
75
75
|
moveBlockCard(editor: AngularEditor, blockCardNode: Node, options: {
|
|
@@ -116,6 +116,7 @@ export interface TheOptions {
|
|
|
116
116
|
extraElementOptions?: ElementOptionsInfo[];
|
|
117
117
|
neededScrollIntoView?: (e: Editor) => boolean;
|
|
118
118
|
placeholderDecorate?: (e: Editor) => SlatePlaceholder[];
|
|
119
|
+
autoNormalize?: boolean;
|
|
119
120
|
}
|
|
120
121
|
export type NodeMatch<T = Node> = Predicate<T>;
|
|
121
122
|
export interface MatchOptions<T = Node> {
|
package/interfaces/preset.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { InjectionToken } from '@angular/core';
|
|
|
2
2
|
import { TheOptions } from './editor';
|
|
3
3
|
import { ThePlugin } from './plugins';
|
|
4
4
|
export interface ThePresetConfig {
|
|
5
|
-
options?: Pick<TheOptions, 'mode' | 'inlineToolbarVisible' | 'toolbar' | 'menu'>;
|
|
5
|
+
options?: Pick<TheOptions, 'mode' | 'inlineToolbarVisible' | 'toolbar' | 'menu' | 'autoNormalize'>;
|
|
6
6
|
plugins?: ThePlugin[];
|
|
7
7
|
}
|
|
8
8
|
export declare const THE_PRESET_CONFIG_TOKEN: InjectionToken<ThePresetConfig>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@worktile/theia",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.2.0",
|
|
4
4
|
"description": "theia editor",
|
|
5
5
|
"author": "YanDong <nanianqiumo@foxmail.com>",
|
|
6
6
|
"homepage": "https://github.com/atinc/theia#readme",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@angular/core": "^17.2.4",
|
|
40
40
|
"date-fns": ">= 2.6.0",
|
|
41
|
-
"slate-angular": "17.1.0",
|
|
41
|
+
"slate-angular": ">= 17.1.0",
|
|
42
42
|
"slate": ">= 0.101.5",
|
|
43
43
|
"ngx-tethys": "^17.0.0",
|
|
44
44
|
"ng-codemirror": "^17.0.0",
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Editor, Element, Node } from 'slate';
|
|
2
2
|
import { ElementKinds } from '../../constants/node-types';
|
|
3
3
|
export declare const ListEditor: {
|
|
4
4
|
isList(editor: Editor, element: Element, type: ElementKinds.bulletedList | ElementKinds.numberedList): boolean;
|
|
@@ -95,7 +95,7 @@ export declare class TheTable extends TheBaseElement<TableElement, Editor> imple
|
|
|
95
95
|
subscribeCellsChange(): void;
|
|
96
96
|
useRowControls(): void;
|
|
97
97
|
detectChanges(): void;
|
|
98
|
-
resolveImage(): Promise<
|
|
98
|
+
resolveImage(): Promise<boolean> | Promise<any[]>;
|
|
99
99
|
getColControls(): void;
|
|
100
100
|
getIsInTable(): void;
|
|
101
101
|
initializeColumns(): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { TableCellElement, TableRowElement } from '../../../custom-types';
|
|
2
1
|
import { Path } from 'slate';
|
|
2
|
+
import { TableCellElement, TableRowElement } from '../../../custom-types';
|
|
3
3
|
import { TheEditor } from '../../../interfaces';
|
|
4
4
|
export declare const isLegalTable: (editor: TheEditor, element: TableRowElement | TableCellElement, path?: Path) => false | import("../../../custom-types").TableElement | TableRowElement;
|
|
5
5
|
export declare const isInTable: (editor: TheEditor, element: TableRowElement) => boolean;
|
package/public-api.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ export * from './interfaces';
|
|
|
8
8
|
export * from './plugins';
|
|
9
9
|
export * from './plugins/image/image.component';
|
|
10
10
|
export * from './plugins/public-api';
|
|
11
|
-
export * from './queries/index';
|
|
11
|
+
export * as TheQueries from './queries/index';
|
|
12
12
|
export * from './services/context.service';
|
|
13
13
|
export * from './services/toolbar.service';
|
|
14
14
|
export * from './test/index';
|
|
15
|
-
export * from './transforms/index';
|
|
15
|
+
export * as TheTransforms from './transforms/index';
|
|
16
16
|
export * from './utils/index';
|
package/queries/index.d.ts
CHANGED
|
@@ -1,82 +1,61 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
isEmptyContentByFilter: (editor: import("@worktile/theia").TheEditor, rules?: import("./is-empty-content-filter").FilterRule) => boolean;
|
|
63
|
-
isEmptyParagraph: (editor: import("@worktile/theia").TheEditor, at?: import("slate").Path | import("slate").BasePoint) => boolean;
|
|
64
|
-
isEmptyParagraphByPath: (editor: import("@worktile/theia").TheEditor, at: import("slate").Path) => boolean;
|
|
65
|
-
isEmptyParagraphElement: (editor: import("@worktile/theia").TheEditor, element: import("@worktile/theia").CustomElement) => boolean;
|
|
66
|
-
isFirstChild: (path: import("slate").Path) => boolean;
|
|
67
|
-
isGlobalCollapsed: (editor: import("@worktile/theia").TheEditor) => boolean;
|
|
68
|
-
isIncludeTypes: (editor: import("@worktile/theia").TheEditor, types: (import("@worktile/theia").ElementKinds.image | import("@worktile/theia").ElementKinds.paragraph | import("@worktile/theia").ElementKinds.heading_1 | import("@worktile/theia").ElementKinds.heading_2 | import("@worktile/theia").ElementKinds.heading_3 | import("@worktile/theia").ElementKinds.heading_4 | import("@worktile/theia").ElementKinds.heading_5 | import("@worktile/theia").ElementKinds.heading_6 | import("@worktile/theia").ElementKinds.numberedList | import("@worktile/theia").ElementKinds.bulletedList | import("@worktile/theia").ElementKinds.listItem | import("@worktile/theia").ElementKinds.checkItem | import("@worktile/theia").ElementKinds.table | import("@worktile/theia").ElementKinds.tableRow | import("@worktile/theia").ElementKinds.tableCell | import("@worktile/theia").ElementKinds.code | import("@worktile/theia").ElementKinds.blockquote | import("@worktile/theia").ElementKinds.hr | import("@worktile/theia").ElementKinds.link | import("@worktile/theia").ElementKinds.inlineCode)[]) => boolean;
|
|
69
|
-
isLogicEmptyParagraphElement: (editor: import("@worktile/theia").TheEditor, element: import("@worktile/theia").CustomElement) => boolean;
|
|
70
|
-
isNodeType: (entry?: import("slate").NodeEntry<import("slate").Node>, { filter, allow, exclude }?: import("@worktile/theia").QueryOptions) => boolean;
|
|
71
|
-
isNodeTypeIn: (editor: import("@worktile/theia").TheEditor, types: string | string[], options?: Omit<import("@worktile/theia").EditorNodesOptions, "match">) => boolean;
|
|
72
|
-
isParagraph: (editor: import("@worktile/theia").TheEditor) => boolean;
|
|
73
|
-
isPointAtRoot: (point: import("slate").BasePoint) => boolean;
|
|
74
|
-
isRangeAcrossBlocks: (editor: import("@worktile/theia").TheEditor, { at, ...options }?: Omit<import("@worktile/theia").EditorAboveOptions<import("slate").Ancestor>, "at" | "match"> & {
|
|
75
|
-
at?: import("slate").BaseRange;
|
|
76
|
-
}) => boolean;
|
|
77
|
-
isRangeAtRoot: (range: import("slate").BaseRange) => boolean;
|
|
78
|
-
isStart: (editor: import("@worktile/theia").TheEditor, point: import("slate").BasePoint, at: import("slate").Location) => boolean;
|
|
79
|
-
someNode: <T_3 extends import("slate").Node = import("slate").Node>(editor: import("@worktile/theia").TheEditor, options: import("./find-node").FindNodeOptions<T_3>) => boolean;
|
|
80
|
-
isRootPath: (path: import("slate").Path) => boolean;
|
|
81
|
-
};
|
|
82
|
-
export { queries as TheQueries };
|
|
1
|
+
import { anchorBlock } from './anchor-block';
|
|
2
|
+
import { anchorBlockEntry } from './anchor-block-entry';
|
|
3
|
+
import { anchorInlineEntry } from './anchor-inline-entry';
|
|
4
|
+
import { findDescendant } from './find-descendant';
|
|
5
|
+
import { findNode } from './find-node';
|
|
6
|
+
import { findPath } from './find-path';
|
|
7
|
+
import { getAbove } from './get-above';
|
|
8
|
+
import { getAboveByType } from './get-above-by-type';
|
|
9
|
+
import { getAnchorBlockEntry } from './get-anchor-block-entry';
|
|
10
|
+
import { getBlockAbove } from './get-block-above';
|
|
11
|
+
import { getBlockCardAbove } from './get-block-card-above';
|
|
12
|
+
import { getBlockCardCenterCursor } from './get-block-card-cursor';
|
|
13
|
+
import { getContainerBlocks } from './get-container-blocks';
|
|
14
|
+
import { getDirectlyParent } from './get-directly-parent';
|
|
15
|
+
import { getInsertElementsPath } from './get-insert-elements-path';
|
|
16
|
+
import { getLastChild, getLastChildPath } from './get-last-child-path';
|
|
17
|
+
import { getLastNode } from './get-last-node';
|
|
18
|
+
import { getNextSiblingNodes } from './get-next-sibling-nodes';
|
|
19
|
+
import { getNode } from './get-node';
|
|
20
|
+
import { getNodes } from './get-nodes';
|
|
21
|
+
import { getNodesByType } from './get-nodes-by-type';
|
|
22
|
+
import { getParent } from './get-parent';
|
|
23
|
+
import { getPlainText } from './get-plain-text';
|
|
24
|
+
import { getPluginByToolbarItem } from './get-plugin-by-toolbar';
|
|
25
|
+
import { getPointBefore } from './get-point-before';
|
|
26
|
+
import { getPointFromLocation } from './get-point-from-location';
|
|
27
|
+
import { getPreviousPath } from './get-previous-path';
|
|
28
|
+
import { getRangeFromBlockStart } from './get-rang-from-block-start';
|
|
29
|
+
import { getRangeBefore } from './get-range-before';
|
|
30
|
+
import { getSelectionMarks } from './get-selection-marks';
|
|
31
|
+
import { getSelectionNodesByType } from './get-selection-nodes-by-type';
|
|
32
|
+
import { getText } from './get-text';
|
|
33
|
+
import { getToolbarItemDisabled } from './get-toolbar-disabled';
|
|
34
|
+
import { isAcrossBlocks } from './is-across-blocks';
|
|
35
|
+
import { isAncestor } from './is-ancestor';
|
|
36
|
+
import { isAncestorEmpty } from './is-ancestor-empty';
|
|
37
|
+
import { isBlockAboveEmpty } from './is-block-above-empty';
|
|
38
|
+
import { isBlockActive } from './is-block-active';
|
|
39
|
+
import { isBlockCardCursor } from './is-block-card-cursor';
|
|
40
|
+
import { isBlockTextEmptyAfterSelection } from './is-block-text-empty-after-selection';
|
|
41
|
+
import { isCollapsed } from './is-collapsed';
|
|
42
|
+
import { isContainNestedType } from './is-contain-nested-type';
|
|
43
|
+
import { isContainer } from './is-container-type';
|
|
44
|
+
import { isDescendant } from './is-descendant';
|
|
45
|
+
import { isEmptyContent } from './is-empty-content';
|
|
46
|
+
import { isEmptyContentByFilter } from './is-empty-content-filter';
|
|
47
|
+
import { isEmptyParagraph, isEmptyParagraphElement, isLogicEmptyParagraphElement } from './is-empty-paragraph';
|
|
48
|
+
import { isEmptyParagraphByPath } from './is-empty-paragraph-by-path';
|
|
49
|
+
import { isFirstChild } from './is-first-child';
|
|
50
|
+
import { isGlobalCollapsed } from './is-global-collapsed';
|
|
51
|
+
import { isIncludeTypes } from './is-include-types';
|
|
52
|
+
import { isNodeType } from './is-node-type';
|
|
53
|
+
import { isNodeTypeIn } from './is-node-type-in';
|
|
54
|
+
import { isParagraph } from './is-paragraph';
|
|
55
|
+
import { isPointAtRoot } from './is-point-at-root';
|
|
56
|
+
import { isRangeAcrossBlocks } from './is-range-across-blocks';
|
|
57
|
+
import { isRangeAtRoot } from './is-range-at-root';
|
|
58
|
+
import { isRootPath } from './is-root-path';
|
|
59
|
+
import { isStart } from './is-start';
|
|
60
|
+
import { someNode } from './some-node';
|
|
61
|
+
export { anchorBlock, anchorBlockEntry, anchorInlineEntry, findDescendant, findNode, findPath, getAbove, getAboveByType, getAnchorBlockEntry, getBlockAbove, getBlockCardAbove, getBlockCardCenterCursor, getContainerBlocks, getDirectlyParent, getInsertElementsPath, getLastChild, getLastChildPath, getLastNode, getNextSiblingNodes, getNode, getNodes, getNodesByType, getParent, getPlainText, getPluginByToolbarItem, getPointBefore, getPointFromLocation, getPreviousPath, getRangeBefore, getRangeFromBlockStart, getSelectionMarks, getSelectionNodesByType, getText, getToolbarItemDisabled, isAcrossBlocks, isAncestor, isAncestorEmpty, isBlockAboveEmpty, isBlockActive, isBlockCardCursor, isBlockTextEmptyAfterSelection, isCollapsed, isContainNestedType, isContainer, isDescendant, isEmptyContent, isEmptyContentByFilter, isEmptyParagraph, isEmptyParagraphByPath, isEmptyParagraphElement, isFirstChild, isGlobalCollapsed, isIncludeTypes, isLogicEmptyParagraphElement, isNodeType, isNodeTypeIn, isParagraph, isPointAtRoot, isRangeAcrossBlocks, isRangeAtRoot, isRootPath, isStart, someNode };
|
|
@@ -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>, "match" | "at"> & {
|
|
7
7
|
at?: Range | null;
|
|
8
8
|
}) => boolean;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { CustomElementKinds } from '../custom-types';
|
|
2
1
|
import { Editor, Element, NodeEntry } from 'slate';
|
|
2
|
+
import { CustomElementKinds } from '../custom-types';
|
|
3
3
|
export declare function handleContinualDeleteBackward(editor: Editor, aboveResult: NodeEntry<Element>, type: CustomElementKinds): boolean;
|
package/transforms/index.d.ts
CHANGED
|
@@ -1,31 +1,19 @@
|
|
|
1
|
+
import { applyDeepToNodes } from './apply-deep-to-nodes';
|
|
2
|
+
import { clearMarks } from './clear-marks';
|
|
3
|
+
import { closeConversionHint } from './close-conversion-hint';
|
|
4
|
+
import { deleteElement } from './delete-element';
|
|
5
|
+
import { deleteNodeByType } from './delete-node-by-type';
|
|
1
6
|
import { handleContinualDeleteBackward } from './handle-continual-delete-backward';
|
|
2
7
|
import { handleContinualInsertBreak } from './handle-continual-insert-break';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
insertParagraph: (editor: import("@worktile/theia").TheEditor, at: import("slate").Location) => void;
|
|
16
|
-
setNode: (editor: import("@worktile/theia").TheEditor, props: Partial<import("@worktile/theia").CustomElement>, origin: import("@worktile/theia").CustomElement) => void;
|
|
17
|
-
unwrapNodesByType: (editor: import("@worktile/theia").TheEditor, types: string | string[], options?: Omit<import("@worktile/theia").WrapOptions, "match">) => void;
|
|
18
|
-
onKeyDownResetBlockType: ({ rules }: import("../interfaces/reset-block-type-plugin-options").ResetBlockTypePluginOptions) => (event: KeyboardEvent, editor: import("@worktile/theia").TheEditor) => boolean;
|
|
19
|
-
moveChildren: (editor: import("@worktile/theia").TheEditor, { at, to, match, start }: import("./move-children").MoveChildrenOptions) => number;
|
|
20
|
-
applyDeepToNodes: ({ node, source, apply, query }: import("./apply-deep-to-nodes").ApplyDeepToNodesOptions) => void;
|
|
21
|
-
mergeDeepToNodes: (options: Omit<import("./apply-deep-to-nodes").ApplyDeepToNodesOptions, "apply">) => void;
|
|
22
|
-
unWrap: (editor: import("@worktile/theia").TheEditor, kind: import("@worktile/theia").ElementKinds.image | import("@worktile/theia").ElementKinds.paragraph | import("@worktile/theia").ElementKinds.heading_1 | import("@worktile/theia").ElementKinds.heading_2 | import("@worktile/theia").ElementKinds.heading_3 | import("@worktile/theia").ElementKinds.heading_4 | import("@worktile/theia").ElementKinds.heading_5 | import("@worktile/theia").ElementKinds.heading_6 | import("@worktile/theia").ElementKinds.numberedList | import("@worktile/theia").ElementKinds.bulletedList | import("@worktile/theia").ElementKinds.listItem | import("@worktile/theia").ElementKinds.checkItem | import("@worktile/theia").ElementKinds.table | import("@worktile/theia").ElementKinds.tableRow | import("@worktile/theia").ElementKinds.tableCell | import("@worktile/theia").ElementKinds.code | import("@worktile/theia").ElementKinds.blockquote | import("@worktile/theia").ElementKinds.hr | import("@worktile/theia").ElementKinds.link | import("@worktile/theia").ElementKinds.inlineCode) => void;
|
|
23
|
-
deleteElement: (editor: import("@worktile/theia").TheEditor, element: import("@worktile/theia").CustomElement) => void;
|
|
24
|
-
setEndSelection: (editor: import("@worktile/theia").TheEditor) => void;
|
|
25
|
-
closeConversionHint: (editor: import("@worktile/theia").TheEditor) => void;
|
|
26
|
-
handleContinualDeleteBackward: typeof handleContinualDeleteBackward;
|
|
27
|
-
handleContinualInsertBreak: typeof handleContinualInsertBreak;
|
|
28
|
-
deleteNodeByType: (editor: import("@worktile/theia").TheEditor, type: import("@worktile/theia").ElementKinds.image | import("@worktile/theia").ElementKinds.paragraph | import("@worktile/theia").ElementKinds.heading_1 | import("@worktile/theia").ElementKinds.heading_2 | import("@worktile/theia").ElementKinds.heading_3 | import("@worktile/theia").ElementKinds.heading_4 | import("@worktile/theia").ElementKinds.heading_5 | import("@worktile/theia").ElementKinds.heading_6 | import("@worktile/theia").ElementKinds.numberedList | import("@worktile/theia").ElementKinds.bulletedList | import("@worktile/theia").ElementKinds.listItem | import("@worktile/theia").ElementKinds.checkItem | import("@worktile/theia").ElementKinds.table | import("@worktile/theia").ElementKinds.tableRow | import("@worktile/theia").ElementKinds.tableCell | import("@worktile/theia").ElementKinds.code | import("@worktile/theia").ElementKinds.blockquote | import("@worktile/theia").ElementKinds.hr | import("@worktile/theia").ElementKinds.link | import("@worktile/theia").ElementKinds.inlineCode) => void;
|
|
29
|
-
setNodeByType: (editor: import("@worktile/theia").TheEditor, props: Partial<import("slate").Node>, type: import("@worktile/theia").ElementKinds.image | import("@worktile/theia").ElementKinds.paragraph | import("@worktile/theia").ElementKinds.heading_1 | import("@worktile/theia").ElementKinds.heading_2 | import("@worktile/theia").ElementKinds.heading_3 | import("@worktile/theia").ElementKinds.heading_4 | import("@worktile/theia").ElementKinds.heading_5 | import("@worktile/theia").ElementKinds.heading_6 | import("@worktile/theia").ElementKinds.numberedList | import("@worktile/theia").ElementKinds.bulletedList | import("@worktile/theia").ElementKinds.listItem | import("@worktile/theia").ElementKinds.checkItem | import("@worktile/theia").ElementKinds.table | import("@worktile/theia").ElementKinds.tableRow | import("@worktile/theia").ElementKinds.tableCell | import("@worktile/theia").ElementKinds.code | import("@worktile/theia").ElementKinds.blockquote | import("@worktile/theia").ElementKinds.hr | import("@worktile/theia").ElementKinds.link | import("@worktile/theia").ElementKinds.inlineCode) => void;
|
|
30
|
-
};
|
|
31
|
-
export { transforms as TheTransforms };
|
|
8
|
+
import { insertElements } from './insert-elements';
|
|
9
|
+
import { insertParagraph } from './insert-paragraph';
|
|
10
|
+
import { mergeDeepToNodes } from './merge-deep-to-nodes';
|
|
11
|
+
import { moveChildren } from './move-children';
|
|
12
|
+
import { onKeyDownResetBlockType } from './on-keydown-reset-block-type';
|
|
13
|
+
import { setEndSelection } from './set-end-selection';
|
|
14
|
+
import { setMarks } from './set-marks';
|
|
15
|
+
import { setNode } from './set-node';
|
|
16
|
+
import { setNodeByType } from './set-node-by-type';
|
|
17
|
+
import { unWrap } from './un-wrap';
|
|
18
|
+
import { unwrapNodesByType } from './unwrap-nodes-by-type';
|
|
19
|
+
export { applyDeepToNodes, clearMarks, closeConversionHint, deleteElement, deleteNodeByType, handleContinualDeleteBackward, handleContinualInsertBreak, insertElements, insertParagraph, mergeDeepToNodes, moveChildren, onKeyDownResetBlockType, setEndSelection, setMarks, setNode, setNodeByType, unWrap, unwrapNodesByType };
|
package/utils/index.d.ts
CHANGED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Descendant, Editor, Element, Path } from 'slate';
|
|
2
|
+
export declare function getDirtyElements(editor: Editor, content: Descendant[], result?: Element[]): import("@worktile/theia").CustomElement[];
|
|
3
|
+
export declare function fixBlockWithoutText(editor: Editor, path: Path): void;
|
|
4
|
+
export declare function fixBlockWithoutParagraph(editor: Editor, path: Path): void;
|
|
5
|
+
export declare function normalizeValue(editor: Editor, value: Descendant[]): void;
|