@worktile/theia 15.0.13 → 15.0.15
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/action/prevent-default.d.ts +1 -1
- package/components/color-select/color-select.component.d.ts +1 -1
- package/components/column-resize/column-resize.directive.d.ts +1 -1
- package/components/column-resize/overlay-handle.component.d.ts +1 -1
- package/components/contextmenu/contextmenu.component.d.ts +1 -1
- package/components/conversion-hint/conversion-hint.component.d.ts +1 -1
- package/components/element/element.component.d.ts +1 -1
- package/components/inline-toolbar/inline-toolbar.component.d.ts +1 -1
- package/components/listbox/listbox.d.ts +3 -3
- package/components/listbox/listbox.type.d.ts +1 -1
- package/components/plugin-menu/plugin-menu.component.d.ts +1 -1
- package/components/table-select/table-select.component.d.ts +1 -1
- package/components/template/template.component.d.ts +1 -1
- package/components/text/text.component.d.ts +1 -1
- package/components/toolbar/toolbar.component.d.ts +1 -1
- package/components/toolbar-dropdown/toolbar-dropdown.component.d.ts +1 -1
- package/components/toolbar-group/toolbar-group.component.d.ts +1 -1
- package/components/toolbar-item/toolbar-item.component.d.ts +1 -1
- package/constants/color-select.d.ts +1 -1
- package/core/toolbar-item/base-toolbar-item.d.ts +2 -2
- package/custom-types.d.ts +6 -6
- package/editor.component.d.ts +1 -1
- package/esm2020/components/action/prevent-default.mjs +3 -3
- package/esm2020/components/color-select/color-select.component.mjs +9 -9
- package/esm2020/components/column-resize/column-resize-notifier.mjs +3 -3
- package/esm2020/components/column-resize/column-resize.directive.mjs +3 -3
- package/esm2020/components/column-resize/column-resize.module.mjs +8 -8
- package/esm2020/components/column-resize/event-dispatcher.mjs +3 -3
- package/esm2020/components/column-resize/overlay-handle.component.mjs +3 -3
- package/esm2020/components/column-resize/resizing.store.mjs +3 -3
- package/esm2020/components/contextmenu/contextmenu.component.mjs +10 -10
- package/esm2020/components/conversion-hint/conversion-hint.component.mjs +3 -3
- package/esm2020/components/element/element.component.mjs +3 -3
- package/esm2020/components/inline-toolbar/inline-toolbar.component.mjs +3 -3
- package/esm2020/components/listbox/listbox.mjs +16 -16
- package/esm2020/components/plugin-menu/plugin-menu.component.mjs +3 -3
- package/esm2020/components/table-select/table-select.component.mjs +3 -3
- package/esm2020/components/template/template.component.mjs +3 -3
- package/esm2020/components/text/text.component.mjs +3 -3
- package/esm2020/components/toolbar/toolbar.component.mjs +7 -7
- package/esm2020/components/toolbar-dropdown/toolbar-dropdown.component.mjs +14 -14
- package/esm2020/components/toolbar-group/toolbar-group.component.mjs +11 -11
- package/esm2020/components/toolbar-item/toolbar-item.component.mjs +7 -7
- package/esm2020/core/toolbar-item/base-toolbar-item.mjs +6 -6
- package/esm2020/editor.component.mjs +10 -10
- package/esm2020/editor.module.mjs +4 -4
- package/esm2020/interfaces/view-base.mjs +3 -3
- package/esm2020/pipes.mjs +6 -6
- package/esm2020/plugins/blockquote/blockquote.component.mjs +3 -3
- package/esm2020/plugins/code/code.component.mjs +10 -10
- package/esm2020/plugins/color/toolbar-item.component.mjs +7 -7
- package/esm2020/plugins/common/auto-insert-data.mjs +12 -17
- package/esm2020/plugins/hr/hr.component.mjs +3 -3
- package/esm2020/plugins/image/image.component.mjs +13 -13
- package/esm2020/plugins/inline-code/inline-code.component.mjs +3 -3
- package/esm2020/plugins/link/edit/link-edit.component.mjs +9 -9
- package/esm2020/plugins/link/hover/link-hover.component.mjs +3 -3
- package/esm2020/plugins/link/link.component.mjs +13 -13
- package/esm2020/plugins/list/components/bulleted-list.component.mjs +7 -7
- package/esm2020/plugins/list/components/list-item.component.mjs +3 -3
- package/esm2020/plugins/list/components/numbered-list.component.mjs +9 -9
- package/esm2020/plugins/mention/suggestion.component.mjs +3 -3
- package/esm2020/plugins/quick-insert/components/quick-insert.component.mjs +8 -8
- package/esm2020/plugins/table/components/insert-mark/insert-mark.component.mjs +9 -9
- package/esm2020/plugins/table/components/row/row.component.mjs +3 -3
- package/esm2020/plugins/table/components/table.component.mjs +36 -30
- package/esm2020/plugins/table/components/td/td.component.mjs +20 -20
- package/esm2020/plugins/table/components/toolbar/table-options.component.mjs +7 -7
- package/esm2020/plugins/table/components/toolbar/table-toolbar.component.mjs +13 -13
- package/esm2020/plugins/table/table.pipe.mjs +6 -6
- package/esm2020/plugins/table/table.plugin.mjs +26 -1
- package/esm2020/plugins/table/table.service.mjs +7 -7
- package/esm2020/plugins/table/table.store.mjs +10 -10
- package/esm2020/plugins/table/toolbar-item.component.mjs +7 -7
- package/esm2020/plugins/todo-item/todo-item.component.mjs +11 -11
- package/esm2020/plugins/vertical-align/toolbar-item.component.mjs +11 -11
- package/esm2020/services/color-select.service.mjs +7 -7
- package/esm2020/services/context.service.mjs +19 -9
- package/esm2020/services/table-contextmenu.service.mjs +13 -13
- package/esm2020/services/toolbar.service.mjs +3 -3
- package/fesm2015/worktile-theia.mjs +499 -462
- package/fesm2015/worktile-theia.mjs.map +1 -1
- package/fesm2020/worktile-theia.mjs +487 -451
- package/fesm2020/worktile-theia.mjs.map +1 -1
- package/interfaces/editor.d.ts +2 -2
- package/interfaces/element.d.ts +3 -3
- package/interfaces/plugins/no-infer.d.ts +1 -1
- package/interfaces/plugins/plugin-key.d.ts +1 -1
- package/interfaces/plugins/plugin-menu.d.ts +4 -4
- package/interfaces/plugins/plugins.d.ts +4 -4
- package/interfaces/plugins/with-override.d.ts +1 -1
- package/interfaces/toolbar.d.ts +4 -4
- package/interfaces/utility/nested-structure-by-key.d.ts +1 -1
- package/interfaces/utility/override-by-key.d.ts +1 -1
- package/interfaces/utility/types.d.ts +1 -1
- package/interfaces/view-base.d.ts +1 -1
- package/package.json +1 -1
- package/plugins/blockquote/blockquote.component.d.ts +1 -1
- package/plugins/code/code.component.d.ts +1 -1
- package/plugins/color/toolbar-item.component.d.ts +1 -1
- package/plugins/common/transforms.plugin.d.ts +1 -1
- package/plugins/heading/heading.plugin.d.ts +1 -1
- package/plugins/hr/hr.component.d.ts +1 -1
- package/plugins/image/image.component.d.ts +1 -1
- package/plugins/inline-code/inline-code.component.d.ts +1 -1
- package/plugins/link/edit/link-edit.component.d.ts +1 -1
- package/plugins/link/hover/link-hover.component.d.ts +1 -1
- package/plugins/link/link.component.d.ts +2 -2
- package/plugins/list/components/bulleted-list.component.d.ts +1 -1
- package/plugins/list/components/list-item.component.d.ts +1 -1
- package/plugins/list/components/numbered-list.component.d.ts +1 -1
- package/plugins/list/types.d.ts +1 -1
- package/plugins/mention/suggestion.component.d.ts +1 -1
- package/plugins/quick-insert/components/quick-insert.component.d.ts +1 -1
- package/plugins/table/components/insert-mark/insert-mark.component.d.ts +1 -1
- package/plugins/table/components/row/row.component.d.ts +1 -1
- package/plugins/table/components/table.component.d.ts +1 -1
- package/plugins/table/components/td/td.component.d.ts +1 -1
- package/plugins/table/components/toolbar/table-options.component.d.ts +1 -1
- package/plugins/table/components/toolbar/table-toolbar.component.d.ts +1 -1
- package/plugins/table/toolbar-item.component.d.ts +1 -1
- package/plugins/todo-item/todo-item.component.d.ts +1 -1
- package/plugins/vertical-align/toolbar-item.component.d.ts +1 -1
- package/queries/find-node.d.ts +1 -1
- package/queries/get-range-before.d.ts +1 -1
- package/services/context.service.d.ts +8 -0
- package/utils/match.d.ts +3 -3
package/interfaces/editor.d.ts
CHANGED
|
@@ -74,7 +74,7 @@ export declare enum TheMode {
|
|
|
74
74
|
default = "default",
|
|
75
75
|
print = "print"
|
|
76
76
|
}
|
|
77
|
-
export
|
|
77
|
+
export type TheModeType = TheMode | string;
|
|
78
78
|
export declare class TheModeConfig {
|
|
79
79
|
mode: TheModeType;
|
|
80
80
|
}
|
|
@@ -103,7 +103,7 @@ export interface TheOptions {
|
|
|
103
103
|
neededScrollIntoView?: (e: Editor) => boolean;
|
|
104
104
|
placeholderDecorate?: (e: Editor) => SlatePlaceholder[];
|
|
105
105
|
}
|
|
106
|
-
export
|
|
106
|
+
export type NodeMatch<T = Node> = Predicate<T>;
|
|
107
107
|
export interface MatchOptions<T = Node> {
|
|
108
108
|
match?: NodeMatch<T>;
|
|
109
109
|
block?: boolean;
|
package/interfaces/element.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Alignment, ElementKinds } from '../constants';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type HeadingElementKinds = ElementKinds.heading_1 | ElementKinds.heading_2 | ElementKinds.heading_3 | ElementKinds.heading_4 | ElementKinds.heading_5 | ElementKinds.heading_6;
|
|
3
|
+
export type BlockElementKinds = ElementKinds.image | ElementKinds.paragraph | ElementKinds.numberedList | ElementKinds.bulletedList | ElementKinds.listItem | ElementKinds.checkItem | ElementKinds.table | ElementKinds.tableRow | ElementKinds.tableCell | ElementKinds.tableContent | ElementKinds.code | ElementKinds.blockquote | ElementKinds.hr | ElementKinds.link | ElementKinds.inlineCode | HeadingElementKinds;
|
|
4
|
+
export type InlineElementKinds = ElementKinds.link;
|
|
5
5
|
export interface TheBlockElement {
|
|
6
6
|
align?: Alignment;
|
|
7
7
|
textIndent?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type NoInfer<T> = [T][T extends any ? 0 : never];
|
|
@@ -41,7 +41,7 @@ export declare enum PluginKeys {
|
|
|
41
41
|
/**
|
|
42
42
|
* 通过 key 存储插件的唯一 key。
|
|
43
43
|
*/
|
|
44
|
-
export
|
|
44
|
+
export type PluginKey = PluginKeys | string;
|
|
45
45
|
export interface TheiaPluginKey {
|
|
46
46
|
/**
|
|
47
47
|
* 用于在 `editor.pluginsByKey` 中按键存储插件的属性。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Editor } from 'slate';
|
|
2
2
|
import { ThePluginMenuItemType } from '../../constants';
|
|
3
|
-
export
|
|
3
|
+
export type ThePluginMenuItemKey = string;
|
|
4
4
|
export interface ThePluginMenuItem {
|
|
5
5
|
key: ThePluginMenuItemKey;
|
|
6
6
|
name: string;
|
|
@@ -19,9 +19,9 @@ export interface ThePluginMenuItem {
|
|
|
19
19
|
export interface ThePluginMenuGroup {
|
|
20
20
|
groupName: string;
|
|
21
21
|
}
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
22
|
+
export type ThePluginMenuItemConfig = ThePluginMenuGroup | ThePluginMenuItemKey;
|
|
23
|
+
export type ThePluginMenu = (ThePluginMenuGroup | ThePluginMenuItem)[];
|
|
24
|
+
export type ThePluginMenuItemWrap = ThePluginMenuItem & {
|
|
25
25
|
disabled?: boolean;
|
|
26
26
|
isMenuItem?: boolean;
|
|
27
27
|
};
|
|
@@ -6,15 +6,15 @@ import { ThePluginMenuItem } from './plugin-menu';
|
|
|
6
6
|
import { NoInfer } from './no-infer';
|
|
7
7
|
import { PluginKey, TheiaPluginKey } from './plugin-key';
|
|
8
8
|
import { WithOverride } from './with-override';
|
|
9
|
-
export
|
|
9
|
+
export type ThePluginBaseOption = {
|
|
10
10
|
allowParentTypes?: (CustomElementKinds | string)[];
|
|
11
11
|
disabledOperateTypes?: CustomElementKinds[];
|
|
12
12
|
disabled?: boolean;
|
|
13
13
|
};
|
|
14
|
-
export
|
|
14
|
+
export type ThePluginOption<P> = NoInfer<{
|
|
15
15
|
[key: string]: any;
|
|
16
16
|
}> & P & ThePluginBaseOption;
|
|
17
|
-
export
|
|
17
|
+
export type ThePlugin<T = {}, P = {}> = Required<TheiaPluginKey> & {
|
|
18
18
|
/**
|
|
19
19
|
* 工具栏配置
|
|
20
20
|
*/
|
|
@@ -45,7 +45,7 @@ export declare type ThePlugin<T = {}, P = {}> = Required<TheiaPluginKey> & {
|
|
|
45
45
|
*/
|
|
46
46
|
plugins?: ThePlugin<T>[];
|
|
47
47
|
};
|
|
48
|
-
export
|
|
48
|
+
export type WithThePlugin<T = {}, P = {}> = WithRequired<ThePlugin<T, P>, 'options'>;
|
|
49
49
|
export interface OptionItem {
|
|
50
50
|
key?: string;
|
|
51
51
|
}
|
|
@@ -4,4 +4,4 @@ import { WithThePlugin } from './plugins';
|
|
|
4
4
|
* theia 插件覆盖了 `editor` 方法。
|
|
5
5
|
* 命名约定是 `with*`。
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
7
|
+
export type WithOverride<T = {}, P = {}> = (editor: Editor, plugin: WithThePlugin<T, P>) => Editor;
|
package/interfaces/toolbar.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { ComponentType } from '@angular/cdk/portal';
|
|
|
2
2
|
import { Editor } from 'slate';
|
|
3
3
|
import { ElementKinds, MarkTypes, DropdownMode } from '../constants';
|
|
4
4
|
import { PluginKey } from './plugins';
|
|
5
|
-
export
|
|
5
|
+
export type ToolbarKey = MarkTypes | ElementKinds | string;
|
|
6
6
|
export declare enum ToolbarItemType {
|
|
7
7
|
default = "default",
|
|
8
8
|
dropdown = "dropdown"
|
|
@@ -12,7 +12,7 @@ export declare enum ToolbarAlignment {
|
|
|
12
12
|
center = "center",
|
|
13
13
|
right = "end"
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type ToolbarDefinition = {
|
|
16
16
|
global?: string[];
|
|
17
17
|
inline?: string[];
|
|
18
18
|
};
|
|
@@ -42,8 +42,8 @@ export interface DefaultToolbarItem extends ToolbarItemBase {
|
|
|
42
42
|
shortcutKey?: string;
|
|
43
43
|
type?: ToolbarItemType;
|
|
44
44
|
}
|
|
45
|
-
export
|
|
46
|
-
export
|
|
45
|
+
export type ToolbarItem = CustomizeToolbarItem & DefaultToolbarItem;
|
|
46
|
+
export type ToolbarEntity = {
|
|
47
47
|
global?: ToolbarItem[];
|
|
48
48
|
inline?: ToolbarItem[];
|
|
49
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type WithRequired<T, K extends keyof T> = Omit<T, K> & Required<Pick<T, K>>;
|
|
@@ -6,5 +6,5 @@ export declare class TheBaseElementComponent<T extends Element = Element, K exte
|
|
|
6
6
|
onContextChange(): void;
|
|
7
7
|
ngOnInit(): void;
|
|
8
8
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheBaseElementComponent<any, any>, never>;
|
|
9
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheBaseElementComponent<any, any>, "TheBaseElementComponent", never, {}, {}, never, never, false>;
|
|
9
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheBaseElementComponent<any, any>, "TheBaseElementComponent", never, {}, {}, never, never, false, never>;
|
|
10
10
|
}
|
package/package.json
CHANGED
|
@@ -7,5 +7,5 @@ export declare class TheBlockquoteComponent extends TheBaseElementComponent<Elem
|
|
|
7
7
|
cdr: ChangeDetectorRef;
|
|
8
8
|
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef);
|
|
9
9
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheBlockquoteComponent, never>;
|
|
10
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheBlockquoteComponent, "blockquote[theBlockquote]", never, {}, {}, never, never, false>;
|
|
10
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheBlockquoteComponent, "blockquote[theBlockquote]", never, {}, {}, never, never, false, never>;
|
|
11
11
|
}
|
|
@@ -72,5 +72,5 @@ export declare class TheCodeComponent extends TheBaseElementComponent<CodeElemen
|
|
|
72
72
|
onChangeWrap(value: boolean): void;
|
|
73
73
|
ngOnDestroy(): void;
|
|
74
74
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheCodeComponent, never>;
|
|
75
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheCodeComponent, "div[theCode]", never, {}, {}, never, never, false>;
|
|
75
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheCodeComponent, "div[theCode]", never, {}, {}, never, never, false, never>;
|
|
76
76
|
}
|
|
@@ -15,5 +15,5 @@ export declare class TheColorToolbarItemComponent extends TheBaseToolbarItem {
|
|
|
15
15
|
toggleColorSelect(event: MouseEvent, type: MarkTypes.color | MarkTypes.backgroundColor): ThyPopoverRef<TheColorSelectComponent, unknown, unknown>;
|
|
16
16
|
close(): void;
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheColorToolbarItemComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheColorToolbarItemComponent, "the-color-toolbar-item", never, {}, {}, never, never, false>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheColorToolbarItemComponent, "the-color-toolbar-item", never, {}, {}, never, never, false, never>;
|
|
19
19
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CustomElementKinds } from '../../custom-types';
|
|
2
2
|
import { ThePluginBaseOption } from '../../interfaces';
|
|
3
|
-
export
|
|
3
|
+
export type HeadingPluginOptions = {
|
|
4
4
|
cleanupTypes: CustomElementKinds[];
|
|
5
5
|
} & ThePluginBaseOption;
|
|
6
6
|
export declare const withHeading: <T extends import("../../interfaces").TheEditor>(editor: T) => T;
|
|
@@ -8,5 +8,5 @@ export declare class TheHrComponent extends TheBaseElementComponent<Element, Edi
|
|
|
8
8
|
constructor(elementRef: ElementRef, cdr: ChangeDetectorRef);
|
|
9
9
|
ngAfterViewInit(): void;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheHrComponent, never>;
|
|
11
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheHrComponent, "the-hr, [theHr]", never, {}, {}, never, never, false>;
|
|
11
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheHrComponent, "the-hr, [theHr]", never, {}, {}, never, never, false, never>;
|
|
12
12
|
}
|
|
@@ -74,5 +74,5 @@ export declare class TheImageComponent extends TheBaseElementComponent<ImageElem
|
|
|
74
74
|
imageLoaded(event: Event): void;
|
|
75
75
|
preventDefault(event: Event): void;
|
|
76
76
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheImageComponent, never>;
|
|
77
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheImageComponent, "the-image, [theImage]", never, {}, {}, never, never, false>;
|
|
77
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheImageComponent, "the-image, [theImage]", never, {}, {}, never, never, false, never>;
|
|
78
78
|
}
|
|
@@ -5,5 +5,5 @@ import * as i0 from "@angular/core";
|
|
|
5
5
|
export declare class TheInlineCodeComponent extends TheBaseElementComponent<InlineCodeElement, Editor> {
|
|
6
6
|
inlineChromiumBugfix: string;
|
|
7
7
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheInlineCodeComponent, never>;
|
|
8
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheInlineCodeComponent, "span[theInlineCode]", never, {}, {}, never, never, false>;
|
|
8
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheInlineCodeComponent, "span[theInlineCode]", never, {}, {}, never, never, false, never>;
|
|
9
9
|
}
|
|
@@ -32,5 +32,5 @@ export declare class TheLinkEditComponent implements OnInit {
|
|
|
32
32
|
closePopover(type?: string): void;
|
|
33
33
|
applyLink(form: any): void;
|
|
34
34
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheLinkEditComponent, never>;
|
|
35
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheLinkEditComponent, "the-link-edit", never, { "tag": "tag"; "node": "node"; "link": "link"; "text": "text"; "originSelection": "originSelection"; }, {}, never, never, false>;
|
|
35
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheLinkEditComponent, "the-link-edit", never, { "tag": "tag"; "node": "node"; "link": "link"; "text": "text"; "originSelection": "originSelection"; }, {}, never, never, false, never>;
|
|
36
36
|
}
|
|
@@ -11,5 +11,5 @@ export declare class TheLinkHoverComponent implements OnInit {
|
|
|
11
11
|
editLink(event: MouseEvent): void;
|
|
12
12
|
removeLink(event: MouseEvent): void;
|
|
13
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheLinkHoverComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheLinkHoverComponent, "the-link-hover", never, { "link": "link"; "dom": "dom"; "editHandle": "editHandle"; "deleteHandle": "deleteHandle"; }, {}, never, never, false>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheLinkHoverComponent, "the-link-hover", never, { "link": "link"; "dom": "dom"; "editHandle": "editHandle"; "deleteHandle": "deleteHandle"; }, {}, never, never, false, never>;
|
|
15
15
|
}
|
|
@@ -30,10 +30,10 @@ export declare class TheBaseLinkComponent extends TheBaseElementComponent<LinkEl
|
|
|
30
30
|
close(type?: string): void;
|
|
31
31
|
ngOnDestroy(): void;
|
|
32
32
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheBaseLinkComponent, never>;
|
|
33
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheBaseLinkComponent, "[TheBaseLinkComponent]", never, {}, {}, never, never, false>;
|
|
33
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheBaseLinkComponent, "[TheBaseLinkComponent]", never, {}, {}, never, never, false, never>;
|
|
34
34
|
}
|
|
35
35
|
export declare class TheLinkComponent extends TheBaseLinkComponent {
|
|
36
36
|
inlineChromiumBugfix: string;
|
|
37
37
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheLinkComponent, never>;
|
|
38
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheLinkComponent, "a[theLink]", never, {}, {}, never, never, false>;
|
|
38
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheLinkComponent, "a[theLink]", never, {}, {}, never, never, false, never>;
|
|
39
39
|
}
|
|
@@ -11,5 +11,5 @@ export declare class TheBulletedListComponent extends TheBaseElementComponent<Bu
|
|
|
11
11
|
ngOnInit(): void;
|
|
12
12
|
ngOnDestroy(): void;
|
|
13
13
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheBulletedListComponent, never>;
|
|
14
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheBulletedListComponent, "ul[theUl]", never, {}, {}, never, never, false>;
|
|
14
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheBulletedListComponent, "ul[theUl]", never, {}, {}, never, never, false, never>;
|
|
15
15
|
}
|
|
@@ -16,5 +16,5 @@ export declare class TheListItemComponent extends TheBaseElementComponent<Elemen
|
|
|
16
16
|
getLiIndex(): number;
|
|
17
17
|
addMultiDigit(): void;
|
|
18
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheListItemComponent, never>;
|
|
19
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheListItemComponent, "li[theLi]", never, {}, {}, never, never, false>;
|
|
19
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheListItemComponent, "li[theLi]", never, {}, {}, never, never, false, never>;
|
|
20
20
|
}
|
|
@@ -12,5 +12,5 @@ export declare class TheNumberedListComponent extends TheBaseElementComponent<Nu
|
|
|
12
12
|
ngOnInit(): void;
|
|
13
13
|
ngOnDestroy(): void;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheNumberedListComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheNumberedListComponent, "ol[theOl]", never, {}, {}, never, never, false>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheNumberedListComponent, "ol[theOl]", never, {}, {}, never, never, false, never>;
|
|
16
16
|
}
|
package/plugins/list/types.d.ts
CHANGED
|
@@ -8,5 +8,5 @@ export declare abstract class TheBaseSuggestion {
|
|
|
8
8
|
abstract getSearchResult(keywords: string): void;
|
|
9
9
|
abstract selectMention<T>(event: T): void;
|
|
10
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheBaseSuggestion, never>;
|
|
11
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<TheBaseSuggestion, never, never, { "editor": "editor"; "type": "type"; "keywords": "keywords"; }, {}, never, never, false>;
|
|
11
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<TheBaseSuggestion, never, never, { "editor": "editor"; "type": "type"; "keywords": "keywords"; }, {}, never, never, false, never>;
|
|
12
12
|
}
|
|
@@ -25,5 +25,5 @@ export declare class TheQuickInsertComponent implements OnInit {
|
|
|
25
25
|
mouseLeave(event: MouseEvent): void;
|
|
26
26
|
handleClick(event: MouseEvent): void;
|
|
27
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheQuickInsertComponent, never>;
|
|
28
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheQuickInsertComponent, "[theQuickInsert]", never, { "editor": "editor"; "isVisible": "isVisible"; }, {}, never, never, false>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheQuickInsertComponent, "[theQuickInsert]", never, { "editor": "editor"; "isVisible": "isVisible"; }, {}, never, never, false, never>;
|
|
29
29
|
}
|
|
@@ -21,5 +21,5 @@ export declare class TheInsertMarkComponent implements OnInit {
|
|
|
21
21
|
onMouseLeave(event: MouseEvent): void;
|
|
22
22
|
getLength(): string;
|
|
23
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheInsertMarkComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheInsertMarkComponent, "the-table-insert-mark", never, { "type": "type"; "at": "at"; "tableStore": "tableStore"; "parentElement": "parentElement"; }, {}, never, never, false>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheInsertMarkComponent, "the-table-insert-mark", never, { "type": "type"; "at": "at"; "tableStore": "tableStore"; "parentElement": "parentElement"; }, {}, never, never, false, never>;
|
|
25
25
|
}
|
|
@@ -12,5 +12,5 @@ export declare class TheTableRowComponent extends TheBaseElementComponent<TableR
|
|
|
12
12
|
ngOnInit(): void;
|
|
13
13
|
useHeight(): void;
|
|
14
14
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTableRowComponent, never>;
|
|
15
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableRowComponent, "tr[theTableRow]", never, {}, {}, never, never, false>;
|
|
15
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableRowComponent, "tr[theTableRow]", never, {}, {}, never, never, false, never>;
|
|
16
16
|
}
|
|
@@ -118,5 +118,5 @@ export declare class TheTableComponent extends TheBaseElementComponent<TableElem
|
|
|
118
118
|
trackByFnColControls(index: number): number;
|
|
119
119
|
ngOnDestroy(): void;
|
|
120
120
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTableComponent, never>;
|
|
121
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableComponent, "the-table, [theTable]", never, {}, {}, never, never, false>;
|
|
121
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableComponent, "the-table, [theTable]", never, {}, {}, never, never, false, never>;
|
|
122
122
|
}
|
|
@@ -92,5 +92,5 @@ export declare class TheTdComponent extends TheBaseElementComponent<TableCellEle
|
|
|
92
92
|
applyBottomRows(rows: HTMLTableRowElement[], deltaY: number, rowIndex: number): number;
|
|
93
93
|
ngOnDestroy(): void;
|
|
94
94
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTdComponent, never>;
|
|
95
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheTdComponent, "td[theTd]", never, {}, {}, never, never, false>;
|
|
95
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheTdComponent, "td[theTd]", never, {}, {}, never, never, false, never>;
|
|
96
96
|
}
|
|
@@ -15,5 +15,5 @@ export declare class TheTableOptionsComponent implements OnInit {
|
|
|
15
15
|
setColumnOptions(): void;
|
|
16
16
|
setTableOptions(event: MouseEvent, option: TableDropdownOption): void;
|
|
17
17
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTableOptionsComponent, never>;
|
|
18
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableOptionsComponent, "the-table-options", never, { "tableStore": "tableStore"; "editor": "editor"; }, {}, never, never, false>;
|
|
18
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableOptionsComponent, "the-table-options", never, { "tableStore": "tableStore"; "editor": "editor"; }, {}, never, never, false, never>;
|
|
19
19
|
}
|
|
@@ -40,7 +40,7 @@ export declare class TheTableToolbarComponent implements OnInit, OnDestroy {
|
|
|
40
40
|
setEquallyColumnHandle(event: MouseEvent): void;
|
|
41
41
|
openTableOptionMenu(event: Event): void;
|
|
42
42
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTableToolbarComponent, never>;
|
|
43
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableToolbarComponent, "the-table-toolbar", never, { "tableStore": "tableStore"; "tableElement": "tableElement"; }, {}, never, never, false>;
|
|
43
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableToolbarComponent, "the-table-toolbar", never, { "tableStore": "tableStore"; "tableElement": "tableElement"; }, {}, never, never, false, never>;
|
|
44
44
|
}
|
|
45
45
|
export declare enum DeleteIcon {
|
|
46
46
|
'table-delete-rows' = "table-delete-rows",
|
|
@@ -14,5 +14,5 @@ export declare class TheTableToolbarItemComponent extends TheBaseToolbarItem {
|
|
|
14
14
|
execute(event: MouseEvent): void;
|
|
15
15
|
toggleTableSelect(event: MouseEvent, optionsParam?: TableOptions): ThyPopoverRef<TheTableSelectComponent, unknown, unknown>;
|
|
16
16
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTableToolbarItemComponent, never>;
|
|
17
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableToolbarItemComponent, "the-table-toolbar-item", never, {}, {}, never, never, false>;
|
|
17
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheTableToolbarItemComponent, "the-table-toolbar-item", never, {}, {}, never, never, false, never>;
|
|
18
18
|
}
|
|
@@ -17,5 +17,5 @@ export declare class TheTodoItemComponent extends TheBaseElementComponent<TodoIt
|
|
|
17
17
|
ngOnInit(): void;
|
|
18
18
|
onCheck(checked: boolean): boolean;
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheTodoItemComponent, never>;
|
|
20
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheTodoItemComponent, "div[theTodoItem]", never, {}, {}, never, never, false>;
|
|
20
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheTodoItemComponent, "div[theTodoItem]", never, {}, {}, never, never, false, never>;
|
|
21
21
|
}
|
|
@@ -21,5 +21,5 @@ export declare class TheVerticalToolbarItemComponent extends TheBaseToolbarDropd
|
|
|
21
21
|
openPopover(): void;
|
|
22
22
|
close(): void;
|
|
23
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<TheVerticalToolbarItemComponent, never>;
|
|
24
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TheVerticalToolbarItemComponent, "the-toolbar-vertical-align-item", never, {}, {}, never, never, false>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TheVerticalToolbarItemComponent, "the-toolbar-vertical-align-item", never, {}, {}, never, never, false, never>;
|
|
25
25
|
}
|
package/queries/find-node.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import { Editor, Location, Node, NodeEntry, Span } from 'slate';
|
|
6
6
|
import { MatchOptions } from '../interfaces';
|
|
7
|
-
export
|
|
7
|
+
export type FindNodeOptions<T extends Node = Node> = {
|
|
8
8
|
at?: Location | Span;
|
|
9
9
|
reverse?: boolean;
|
|
10
10
|
voids?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Editor, Location, Range } from 'slate';
|
|
2
2
|
import { PointBeforeOptions } from './get-point-before';
|
|
3
|
-
export
|
|
3
|
+
export type RangeBeforeOptions = PointBeforeOptions;
|
|
4
4
|
/**
|
|
5
5
|
* Get range from {@link getPointBefore} to the end point of `at`.
|
|
6
6
|
*/
|
|
@@ -20,6 +20,7 @@ export declare class TheContextService implements OnDestroy {
|
|
|
20
20
|
private scrollSubscription?;
|
|
21
21
|
private destroy$;
|
|
22
22
|
private options;
|
|
23
|
+
private containerElement;
|
|
23
24
|
uploadingFiles: {
|
|
24
25
|
url: string;
|
|
25
26
|
file: File;
|
|
@@ -38,17 +39,24 @@ export declare class TheContextService implements OnDestroy {
|
|
|
38
39
|
widthChanged: boolean;
|
|
39
40
|
heightChanged: boolean;
|
|
40
41
|
}>;
|
|
42
|
+
theEditorResized$: Subject<{
|
|
43
|
+
entry: ResizeObserverEntry;
|
|
44
|
+
widthChanged: boolean;
|
|
45
|
+
heightChanged: boolean;
|
|
46
|
+
}>;
|
|
41
47
|
windowResized$: Subject<{
|
|
42
48
|
entry: ResizeObserverEntry;
|
|
43
49
|
widthChanged: boolean;
|
|
44
50
|
heightChanged: boolean;
|
|
45
51
|
}>;
|
|
46
52
|
private containerResizeObserver;
|
|
53
|
+
private theEditorResizeObserver;
|
|
47
54
|
private windowResizeObserver;
|
|
48
55
|
constructor(ngZone: NgZone);
|
|
49
56
|
initialize(options: TheContextOptions): void;
|
|
50
57
|
rebindContainerScroll(): void;
|
|
51
58
|
bindContainerResize(): void;
|
|
59
|
+
bindTheEditorResize(): void;
|
|
52
60
|
bindWindowResize(): void;
|
|
53
61
|
private elementResize;
|
|
54
62
|
getOptions(): TheContextOptions;
|
package/utils/match.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Editor } from 'slate';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
2
|
+
export type PredicateObj<T> = Partial<Record<keyof T, any | any[]>>;
|
|
3
|
+
export type PredicateFn<T> = (obj: T) => boolean;
|
|
4
|
+
export type Predicate<T> = PredicateObj<T> | PredicateFn<T>;
|
|
5
5
|
/**
|
|
6
6
|
* Match the object with a predicate object or function.
|
|
7
7
|
* If predicate is:
|