slate-angular 19.4.0-next.1 → 20.0.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/fesm2022/slate-angular.mjs +32 -34
- package/fesm2022/slate-angular.mjs.map +1 -1
- package/index.d.ts +767 -3
- package/package.json +1 -1
- package/components/block-card/block-card.component.d.ts +0 -15
- package/components/children/children-outlet.component.d.ts +0 -9
- package/components/editable/editable.component.d.ts +0 -104
- package/components/element.flavour.d.ts +0 -7
- package/components/leaf/leaf.flavour.d.ts +0 -8
- package/components/string/string-render.d.ts +0 -39
- package/components/string/string.component.d.ts +0 -9
- package/components/text/default-text.flavour.d.ts +0 -12
- package/custom-event/BeforeInputEventPlugin.d.ts +0 -38
- package/custom-event/DOMTopLevelEventTypes.d.ts +0 -12
- package/custom-event/FallbackCompositionState.d.ts +0 -10
- package/custom-event/before-input-polyfill.d.ts +0 -5
- package/module.d.ts +0 -11
- package/plugins/angular-editor.d.ts +0 -103
- package/plugins/with-angular.d.ts +0 -3
- package/plugins/with-dom.d.ts +0 -68
- package/public-api.d.ts +0 -14
- package/types/clipboard.d.ts +0 -8
- package/types/error.d.ts +0 -17
- package/types/feature.d.ts +0 -4
- package/types/index.d.ts +0 -5
- package/types/view.d.ts +0 -6
- package/utils/block-card.d.ts +0 -10
- package/utils/clipboard/clipboard.d.ts +0 -13
- package/utils/clipboard/common.d.ts +0 -8
- package/utils/clipboard/data-transfer.d.ts +0 -5
- package/utils/clipboard/index.d.ts +0 -4
- package/utils/clipboard/navigator-clipboard.d.ts +0 -4
- package/utils/dom.d.ts +0 -19
- package/utils/environment.d.ts +0 -13
- package/utils/global-normalize.d.ts +0 -5
- package/utils/hotkeys.d.ts +0 -32
- package/utils/index.d.ts +0 -10
- package/utils/range-list.d.ts +0 -10
- package/utils/restore-dom.d.ts +0 -2
- package/utils/throttle.d.ts +0 -2
- package/utils/view.d.ts +0 -5
- package/utils/weak-maps.d.ts +0 -12
- package/view/base.d.ts +0 -95
- package/view/context-change.d.ts +0 -8
- package/view/context.d.ts +0 -53
- package/view/flavour/base.d.ts +0 -19
- package/view/flavour/element.d.ts +0 -27
- package/view/flavour/index.d.ts +0 -5
- package/view/flavour/leaf.d.ts +0 -17
- package/view/flavour/ref.d.ts +0 -5
- package/view/flavour/text.d.ts +0 -16
- package/view/render/leaves-render.d.ts +0 -21
- package/view/render/list-render.d.ts +0 -38
- package/view/render/utils.d.ts +0 -11
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { Descendant, Element } from 'slate';
|
|
2
|
-
declare const isValid: (value: Descendant) => any;
|
|
3
|
-
declare const check: (document: Element[]) => boolean;
|
|
4
|
-
declare function normalize(document: Element[]): import("slate").BaseElement[];
|
|
5
|
-
export { normalize, check, isValid };
|
package/utils/hotkeys.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Hotkeys.
|
|
3
|
-
*/
|
|
4
|
-
declare const hotkeys: {
|
|
5
|
-
isBold: (event: KeyboardEvent) => boolean;
|
|
6
|
-
isCompose: (event: KeyboardEvent) => boolean;
|
|
7
|
-
isMoveBackward: (event: KeyboardEvent) => boolean;
|
|
8
|
-
isMoveForward: (event: KeyboardEvent) => boolean;
|
|
9
|
-
isMoveUp: (event: KeyboardEvent) => boolean;
|
|
10
|
-
isMoveDown: (event: KeyboardEvent) => boolean;
|
|
11
|
-
isDeleteBackward: (event: KeyboardEvent) => boolean;
|
|
12
|
-
isDeleteForward: (event: KeyboardEvent) => boolean;
|
|
13
|
-
isDeleteLineBackward: (event: KeyboardEvent) => boolean;
|
|
14
|
-
isDeleteLineForward: (event: KeyboardEvent) => boolean;
|
|
15
|
-
isDeleteWordBackward: (event: KeyboardEvent) => boolean;
|
|
16
|
-
isDeleteWordForward: (event: KeyboardEvent) => boolean;
|
|
17
|
-
isExtendBackward: (event: KeyboardEvent) => boolean;
|
|
18
|
-
isExtendForward: (event: KeyboardEvent) => boolean;
|
|
19
|
-
isExtendLineBackward: (event: KeyboardEvent) => boolean;
|
|
20
|
-
isExtendLineForward: (event: KeyboardEvent) => boolean;
|
|
21
|
-
isItalic: (event: KeyboardEvent) => boolean;
|
|
22
|
-
isMoveLineBackward: (event: KeyboardEvent) => boolean;
|
|
23
|
-
isMoveLineForward: (event: KeyboardEvent) => boolean;
|
|
24
|
-
isMoveWordBackward: (event: KeyboardEvent) => boolean;
|
|
25
|
-
isMoveWordForward: (event: KeyboardEvent) => boolean;
|
|
26
|
-
isRedo: (event: KeyboardEvent) => boolean;
|
|
27
|
-
isSplitBlock: (event: KeyboardEvent) => boolean;
|
|
28
|
-
isTransposeCharacter: (event: KeyboardEvent) => boolean;
|
|
29
|
-
isUndo: (event: KeyboardEvent) => boolean;
|
|
30
|
-
};
|
|
31
|
-
export default hotkeys;
|
|
32
|
-
export { hotkeys };
|
package/utils/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export * from './weak-maps';
|
|
2
|
-
export * from './hotkeys';
|
|
3
|
-
export * from './view';
|
|
4
|
-
export * from './environment';
|
|
5
|
-
export * from './range-list';
|
|
6
|
-
export * from './block-card';
|
|
7
|
-
export * from './global-normalize';
|
|
8
|
-
export * from './throttle';
|
|
9
|
-
export * from './clipboard';
|
|
10
|
-
export * from './dom';
|
package/utils/range-list.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Range } from 'slate';
|
|
2
|
-
export declare const shallowCompare: (obj1: {}, obj2: {}) => boolean;
|
|
3
|
-
/**
|
|
4
|
-
* Check if a list of decorator ranges are equal to another.
|
|
5
|
-
*
|
|
6
|
-
* PERF: this requires the two lists to also have the ranges inside them in the
|
|
7
|
-
* same order, but this is an okay constraint for us since decorations are
|
|
8
|
-
* kept in order, and the odd case where they aren't is okay to re-render for.
|
|
9
|
-
*/
|
|
10
|
-
export declare const isDecoratorRangeListEqual: (list: Range[], another: Range[]) => boolean;
|
package/utils/restore-dom.d.ts
DELETED
package/utils/throttle.d.ts
DELETED
package/utils/view.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TemplateRef } from '@angular/core';
|
|
2
|
-
import { ComponentType, ViewType } from '../types/view';
|
|
3
|
-
export declare function isTemplateRef<C>(value: ViewType): value is TemplateRef<C>;
|
|
4
|
-
export declare function isComponentType<T>(value: ViewType): value is ComponentType<T>;
|
|
5
|
-
export declare function isFlavourType<T>(value: ViewType): value is ComponentType<T>;
|
package/utils/weak-maps.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { Node, Editor } from 'slate';
|
|
2
|
-
import { BaseElementComponent } from '../view/base';
|
|
3
|
-
import { BaseFlavour } from '../view/flavour/base';
|
|
4
|
-
/**
|
|
5
|
-
* Symbols.
|
|
6
|
-
*/
|
|
7
|
-
export declare const PLACEHOLDER_SYMBOL: string;
|
|
8
|
-
/**
|
|
9
|
-
* Weak map for associating the html element with the component.
|
|
10
|
-
*/
|
|
11
|
-
export declare const ELEMENT_TO_COMPONENT: WeakMap<Node, BaseElementComponent | BaseFlavour>;
|
|
12
|
-
export declare const EDITOR_TO_AFTER_VIEW_INIT_QUEUE: WeakMap<Editor, (() => void)[]>;
|
package/view/base.d.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { ChangeDetectorRef, ElementRef, OnDestroy, OnInit, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { Descendant, Element, Range, Text } from 'slate';
|
|
3
|
-
import { SlateChildrenOutlet } from '../components/children/children-outlet.component';
|
|
4
|
-
import { AngularEditor } from '../plugins/angular-editor';
|
|
5
|
-
import { SlateChildrenContext, SlateElementContext, SlateLeafContext, SlateTextContext, SlateViewContext } from './context';
|
|
6
|
-
import { LeavesRender } from './render/leaves-render';
|
|
7
|
-
import { ListRender } from './render/list-render';
|
|
8
|
-
import { SlateStringRender } from '../components/string/string-render';
|
|
9
|
-
import * as i0 from "@angular/core";
|
|
10
|
-
/**
|
|
11
|
-
* base class for template
|
|
12
|
-
*/
|
|
13
|
-
export interface BaseEmbeddedView<T, K extends AngularEditor = AngularEditor> {
|
|
14
|
-
context: T;
|
|
15
|
-
viewContext: SlateViewContext<K>;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* base class for custom element component or text component
|
|
19
|
-
*/
|
|
20
|
-
export declare abstract class BaseComponent<T = SlateTextContext | SlateLeafContext | SlateElementContext, K extends AngularEditor = AngularEditor> {
|
|
21
|
-
initialized: boolean;
|
|
22
|
-
protected _context: T;
|
|
23
|
-
set context(value: T);
|
|
24
|
-
get context(): T;
|
|
25
|
-
viewContext: SlateViewContext<K>;
|
|
26
|
-
get editor(): K;
|
|
27
|
-
get nativeElement(): HTMLElement;
|
|
28
|
-
elementRef: ElementRef<any>;
|
|
29
|
-
cdr: ChangeDetectorRef;
|
|
30
|
-
abstract onContextChange(): any;
|
|
31
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BaseComponent<any, any>, never>;
|
|
32
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseComponent<any, any>, never, never, { "context": { "alias": "context"; "required": false; }; "viewContext": { "alias": "viewContext"; "required": false; }; }, {}, never, never, true, never>;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* base class for custom element component
|
|
36
|
-
*/
|
|
37
|
-
export declare class BaseElementComponent<T extends Element = Element, K extends AngularEditor = AngularEditor> extends BaseComponent<SlateElementContext<T>, K> implements OnInit, OnDestroy {
|
|
38
|
-
viewContainerRef: ViewContainerRef;
|
|
39
|
-
childrenContext: SlateChildrenContext;
|
|
40
|
-
childrenOutletInstance?: SlateChildrenOutlet;
|
|
41
|
-
get element(): T;
|
|
42
|
-
get selection(): Range;
|
|
43
|
-
get decorations(): Range[];
|
|
44
|
-
get children(): Descendant[];
|
|
45
|
-
get isCollapsed(): boolean;
|
|
46
|
-
get isCollapsedAndNonReadonly(): boolean;
|
|
47
|
-
get readonly(): boolean;
|
|
48
|
-
getOutletParent: () => any;
|
|
49
|
-
getOutletElement: () => HTMLElement;
|
|
50
|
-
listRender: ListRender;
|
|
51
|
-
ngOnInit(): void;
|
|
52
|
-
afterViewInit(): void;
|
|
53
|
-
updateWeakMap(): void;
|
|
54
|
-
ngOnDestroy(): void;
|
|
55
|
-
onContextChange(): void;
|
|
56
|
-
updateChildrenView(): void;
|
|
57
|
-
getChildrenContext(): SlateChildrenContext;
|
|
58
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BaseElementComponent<any, any>, never>;
|
|
59
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseElementComponent<any, any>, never, never, {}, {}, never, never, true, never>;
|
|
60
|
-
}
|
|
61
|
-
/**
|
|
62
|
-
* base class for custom text component
|
|
63
|
-
*/
|
|
64
|
-
export declare class BaseTextComponent<T extends Text = Text> extends BaseComponent<SlateTextContext<T>> implements OnInit, OnDestroy {
|
|
65
|
-
viewContainerRef: ViewContainerRef;
|
|
66
|
-
get text(): T;
|
|
67
|
-
leavesRender: LeavesRender;
|
|
68
|
-
childrenOutletInstance?: SlateChildrenOutlet;
|
|
69
|
-
getOutletParent: () => any;
|
|
70
|
-
getOutletElement: () => HTMLElement;
|
|
71
|
-
ngOnInit(): void;
|
|
72
|
-
updateWeakMap(): void;
|
|
73
|
-
ngOnDestroy(): void;
|
|
74
|
-
onContextChange(): void;
|
|
75
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BaseTextComponent<any>, never>;
|
|
76
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseTextComponent<any>, never, never, {}, {}, never, never, true, never>;
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* base class for custom leaf component
|
|
80
|
-
*/
|
|
81
|
-
export declare class BaseLeafComponent extends BaseComponent<SlateLeafContext> implements OnInit {
|
|
82
|
-
placeholderElement: HTMLSpanElement;
|
|
83
|
-
stringRender: SlateStringRender | null;
|
|
84
|
-
isSlateLeaf: boolean;
|
|
85
|
-
get text(): Text;
|
|
86
|
-
get leaf(): Text;
|
|
87
|
-
ngOnInit(): void;
|
|
88
|
-
onContextChange(): void;
|
|
89
|
-
renderPlaceholder(): void;
|
|
90
|
-
createPlaceholder(): void;
|
|
91
|
-
updatePlaceholder(): void;
|
|
92
|
-
destroyPlaceholder(): void;
|
|
93
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<BaseLeafComponent, never>;
|
|
94
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<BaseLeafComponent, never, never, {}, {}, never, never, true, never>;
|
|
95
|
-
}
|
package/view/context-change.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export interface BeforeContextChange<T> {
|
|
2
|
-
beforeContextChange: (value: T) => void;
|
|
3
|
-
}
|
|
4
|
-
export interface AfterContextChange {
|
|
5
|
-
afterContextChange: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare function hasBeforeContextChange<T>(value: any): value is BeforeContextChange<T>;
|
|
8
|
-
export declare function hasAfterContextChange<T>(value: any): value is AfterContextChange;
|
package/view/context.d.ts
DELETED
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { NodeEntry, Range, Element, Ancestor, Text, LeafPosition } from 'slate';
|
|
2
|
-
import { AngularEditor } from '../plugins/angular-editor';
|
|
3
|
-
import { ViewType } from '../types/view';
|
|
4
|
-
export interface SlateViewContext<T extends AngularEditor = AngularEditor> {
|
|
5
|
-
editor: T;
|
|
6
|
-
trackBy: (element: Element) => any;
|
|
7
|
-
renderElement?: (element: Element) => ViewType;
|
|
8
|
-
renderLeaf?: (text: Text) => ViewType;
|
|
9
|
-
renderText?: (text: Text) => ViewType;
|
|
10
|
-
isStrictDecorate: boolean;
|
|
11
|
-
}
|
|
12
|
-
export interface SlateChildrenContext {
|
|
13
|
-
parent: Ancestor;
|
|
14
|
-
selection: Range;
|
|
15
|
-
decorations: Range[];
|
|
16
|
-
decorate: (entry: NodeEntry) => Range[];
|
|
17
|
-
readonly: boolean;
|
|
18
|
-
}
|
|
19
|
-
export interface SlateElementContext<T extends Element = Element> {
|
|
20
|
-
element: T;
|
|
21
|
-
selection: Range | null;
|
|
22
|
-
decorations: Range[];
|
|
23
|
-
attributes: SlateElementAttributes;
|
|
24
|
-
contentEditable?: boolean;
|
|
25
|
-
decorate: (entry: NodeEntry) => Range[];
|
|
26
|
-
readonly: boolean;
|
|
27
|
-
}
|
|
28
|
-
export interface SlateTextContext<T extends Text = Text> {
|
|
29
|
-
text: T;
|
|
30
|
-
decorations: Range[];
|
|
31
|
-
isLast: boolean;
|
|
32
|
-
parent: Element;
|
|
33
|
-
}
|
|
34
|
-
export interface SlateLeafContext {
|
|
35
|
-
leaf: Text;
|
|
36
|
-
leafPosition?: LeafPosition;
|
|
37
|
-
text: Text;
|
|
38
|
-
parent: Element;
|
|
39
|
-
isLast: boolean;
|
|
40
|
-
index: number;
|
|
41
|
-
}
|
|
42
|
-
export interface SlateElementAttributes {
|
|
43
|
-
'data-slate-node': 'element';
|
|
44
|
-
'data-slate-void'?: boolean;
|
|
45
|
-
'data-slate-inline'?: boolean;
|
|
46
|
-
'data-slate-key'?: string;
|
|
47
|
-
dir?: 'rtl';
|
|
48
|
-
}
|
|
49
|
-
export interface SlateStringContext {
|
|
50
|
-
text: string;
|
|
51
|
-
elementStringLength: number;
|
|
52
|
-
type: 'string' | 'lineBreakEmptyString';
|
|
53
|
-
}
|
package/view/flavour/base.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { AngularEditor } from '../../plugins/angular-editor';
|
|
3
|
-
import { SlateElementContext, SlateLeafContext, SlateTextContext, SlateViewContext } from '../context';
|
|
4
|
-
export declare abstract class BaseFlavour<T = SlateTextContext | SlateLeafContext | SlateElementContext, K extends AngularEditor = AngularEditor> {
|
|
5
|
-
static isFlavour: boolean;
|
|
6
|
-
initialized: boolean;
|
|
7
|
-
protected _context: T;
|
|
8
|
-
viewContainerRef: ViewContainerRef;
|
|
9
|
-
set context(value: T);
|
|
10
|
-
get context(): T;
|
|
11
|
-
viewContext: SlateViewContext<K>;
|
|
12
|
-
get editor(): K;
|
|
13
|
-
nativeElement: HTMLElement;
|
|
14
|
-
abstract onContextChange(): any;
|
|
15
|
-
abstract onInit(): any;
|
|
16
|
-
abstract onDestroy(): any;
|
|
17
|
-
abstract render(): any;
|
|
18
|
-
abstract rerender(): any;
|
|
19
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { AngularEditor } from '../../plugins/angular-editor';
|
|
2
|
-
import { SlateChildrenContext, SlateElementContext } from '../context';
|
|
3
|
-
import { Descendant, Element, Range } from 'slate';
|
|
4
|
-
import { BaseFlavour } from './base';
|
|
5
|
-
import { ListRender } from '../render/list-render';
|
|
6
|
-
export declare abstract class BaseElementFlavour<T extends Element = Element, K extends AngularEditor = AngularEditor> extends BaseFlavour<SlateElementContext<T>, K> {
|
|
7
|
-
childrenContext: SlateChildrenContext;
|
|
8
|
-
get element(): T;
|
|
9
|
-
get selection(): Range;
|
|
10
|
-
get decorations(): Range[];
|
|
11
|
-
get children(): Descendant[];
|
|
12
|
-
get isCollapsed(): boolean;
|
|
13
|
-
get isCollapsedAndNonReadonly(): boolean;
|
|
14
|
-
get readonly(): boolean;
|
|
15
|
-
getOutletParent: () => HTMLElement;
|
|
16
|
-
getOutletElement: () => HTMLElement | null;
|
|
17
|
-
listRender: ListRender;
|
|
18
|
-
onInit(): void;
|
|
19
|
-
afterViewInit(): void;
|
|
20
|
-
updateWeakMap(): void;
|
|
21
|
-
onDestroy(): void;
|
|
22
|
-
onContextChange(): void;
|
|
23
|
-
updateChildrenView(): void;
|
|
24
|
-
getChildrenContext(): SlateChildrenContext;
|
|
25
|
-
abstract render(): any;
|
|
26
|
-
abstract rerender(): any;
|
|
27
|
-
}
|
package/view/flavour/index.d.ts
DELETED
package/view/flavour/leaf.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { Text } from 'slate';
|
|
2
|
-
import { SlateLeafContext } from '../context';
|
|
3
|
-
import { BaseFlavour } from './base';
|
|
4
|
-
export declare abstract class BaseLeafFlavour extends BaseFlavour<SlateLeafContext> {
|
|
5
|
-
placeholderElement: HTMLSpanElement;
|
|
6
|
-
get text(): Text;
|
|
7
|
-
get leaf(): Text;
|
|
8
|
-
onInit(): void;
|
|
9
|
-
onContextChange(): void;
|
|
10
|
-
renderPlaceholder(): void;
|
|
11
|
-
createPlaceholder(): void;
|
|
12
|
-
updatePlaceholder(): void;
|
|
13
|
-
destroyPlaceholder(): void;
|
|
14
|
-
onDestroy(): void;
|
|
15
|
-
abstract render(): any;
|
|
16
|
-
abstract rerender(): any;
|
|
17
|
-
}
|
package/view/flavour/ref.d.ts
DELETED
package/view/flavour/text.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { SlateTextContext } from '../context';
|
|
2
|
-
import { LeavesRender } from '../render/leaves-render';
|
|
3
|
-
import { BaseFlavour } from './base';
|
|
4
|
-
import { Text } from 'slate';
|
|
5
|
-
export declare abstract class BaseTextFlavour<T extends Text = Text> extends BaseFlavour<SlateTextContext<T>> {
|
|
6
|
-
get text(): T;
|
|
7
|
-
leavesRender: LeavesRender;
|
|
8
|
-
getOutletParent: () => HTMLElement;
|
|
9
|
-
getOutletElement: () => HTMLElement | null;
|
|
10
|
-
onInit(): void;
|
|
11
|
-
updateWeakMap(): void;
|
|
12
|
-
onDestroy(): void;
|
|
13
|
-
onContextChange(): void;
|
|
14
|
-
abstract render(): any;
|
|
15
|
-
abstract rerender(): any;
|
|
16
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ViewContainerRef } from '@angular/core';
|
|
2
|
-
import { ViewType } from '../../types/view';
|
|
3
|
-
import { SlateLeafContext, SlateTextContext, SlateViewContext } from '../context';
|
|
4
|
-
export declare class LeavesRender {
|
|
5
|
-
private viewContext;
|
|
6
|
-
private viewContainerRef;
|
|
7
|
-
private getOutletParent;
|
|
8
|
-
private getOutletElement;
|
|
9
|
-
private decoratedLeaves;
|
|
10
|
-
private views;
|
|
11
|
-
private contexts;
|
|
12
|
-
private viewTypes;
|
|
13
|
-
private differ;
|
|
14
|
-
constructor(viewContext: SlateViewContext, viewContainerRef: ViewContainerRef, getOutletParent: () => HTMLElement, getOutletElement: () => HTMLElement);
|
|
15
|
-
initialize(context: SlateTextContext): void;
|
|
16
|
-
update(context: SlateTextContext): void;
|
|
17
|
-
private getLeaves;
|
|
18
|
-
}
|
|
19
|
-
export declare function getContext(index: number, leafContexts: SlateLeafContext[]): SlateLeafContext;
|
|
20
|
-
export declare function getViewType(leafContext: SlateLeafContext, viewContext: SlateViewContext): ViewType;
|
|
21
|
-
export declare function trackBy(viewContext: SlateViewContext): (index: any, node: any) => any;
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { Ancestor, Descendant, Range, Editor, Path } from 'slate';
|
|
2
|
-
import { ComponentRef, EmbeddedViewRef, ViewContainerRef } from '@angular/core';
|
|
3
|
-
import { ViewType } from '../../types/view';
|
|
4
|
-
import { SlateChildrenContext, SlateElementContext, SlateTextContext, SlateViewContext } from '../context';
|
|
5
|
-
import { SlateBlockCard } from '../../components/block-card/block-card.component';
|
|
6
|
-
import { FlavourRef } from '../flavour/ref';
|
|
7
|
-
export declare class ListRender {
|
|
8
|
-
private viewContext;
|
|
9
|
-
private viewContainerRef;
|
|
10
|
-
private getOutletParent;
|
|
11
|
-
private getOutletElement;
|
|
12
|
-
private children;
|
|
13
|
-
private views;
|
|
14
|
-
private blockCards;
|
|
15
|
-
private contexts;
|
|
16
|
-
private viewTypes;
|
|
17
|
-
private differ;
|
|
18
|
-
initialized: boolean;
|
|
19
|
-
constructor(viewContext: SlateViewContext, viewContainerRef: ViewContainerRef, getOutletParent: () => HTMLElement, getOutletElement: () => HTMLElement | null);
|
|
20
|
-
initialize(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext): void;
|
|
21
|
-
update(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext): void;
|
|
22
|
-
destroy(): void;
|
|
23
|
-
}
|
|
24
|
-
export declare function getContext(index: number, item: Descendant, parentPath: Path, childrenContext: SlateChildrenContext, viewContext: SlateViewContext): SlateElementContext | SlateTextContext;
|
|
25
|
-
export declare function getCommonContext(index: number, item: Descendant, parentPath: Path, viewContext: SlateViewContext, childrenContext: SlateChildrenContext): {
|
|
26
|
-
selection: Range;
|
|
27
|
-
decorations: Range[];
|
|
28
|
-
};
|
|
29
|
-
export declare function getViewType(item: Descendant, parent: Ancestor, viewContext: SlateViewContext): ViewType;
|
|
30
|
-
export declare function createBlockCard(item: Descendant, view: EmbeddedViewRef<any> | ComponentRef<any> | FlavourRef, viewContainerRef: ViewContainerRef, viewContext: SlateViewContext): ComponentRef<SlateBlockCard>;
|
|
31
|
-
export declare function trackBy(viewContext: SlateViewContext): (index: any, node: any) => any;
|
|
32
|
-
export declare function memoizedContext(viewContext: SlateViewContext, descendant: Descendant, prev: SlateElementContext | SlateTextContext, next: SlateElementContext | SlateTextContext): boolean;
|
|
33
|
-
export declare function memoizedElementContext(viewContext: SlateViewContext, prev: SlateElementContext, next: SlateElementContext): boolean;
|
|
34
|
-
export declare function memoizedTextContext(prev: SlateTextContext, next: SlateTextContext): boolean;
|
|
35
|
-
export declare function addAfterViewInitQueue(editor: Editor, afterViewInitCallback: () => void): void;
|
|
36
|
-
export declare function getAfterViewInitQueue(editor: Editor): (() => void)[];
|
|
37
|
-
export declare function clearAfterViewInitQueue(editor: Editor): void;
|
|
38
|
-
export declare function executeAfterViewInit(editor: Editor): void;
|
package/view/render/utils.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Descendant } from 'slate';
|
|
2
|
-
import { ComponentRef, EmbeddedViewRef, ViewContainerRef } from '@angular/core';
|
|
3
|
-
import { ViewType } from '../../types/view';
|
|
4
|
-
import { SlateElementContext, SlateLeafContext, SlateTextContext, SlateViewContext } from '../context';
|
|
5
|
-
import { SlateBlockCard } from '../../components/block-card/block-card.component';
|
|
6
|
-
import { FlavourRef } from '../flavour/ref';
|
|
7
|
-
export declare function createEmbeddedViewOrComponentOrFlavour(viewType: ViewType, context: any, viewContext: SlateViewContext, viewContainerRef: ViewContainerRef): FlavourRef | EmbeddedViewRef<any> | ComponentRef<any>;
|
|
8
|
-
export declare function updateContext(view: EmbeddedViewRef<any> | ComponentRef<any> | FlavourRef, newContext: SlateElementContext | SlateTextContext | SlateLeafContext, viewContext: SlateViewContext): void;
|
|
9
|
-
export declare function mount(views: (EmbeddedViewRef<any> | ComponentRef<any> | FlavourRef)[], blockCards: (ComponentRef<SlateBlockCard> | null)[] | null, outletParent: HTMLElement, outletElement: HTMLElement | null): void;
|
|
10
|
-
export declare function getRootNodes(ref: EmbeddedViewRef<any> | ComponentRef<any> | FlavourRef, blockCard?: ComponentRef<SlateBlockCard>): HTMLElement[];
|
|
11
|
-
export declare function mountOnItemChange(index: number, item: Descendant, views: (EmbeddedViewRef<any> | ComponentRef<any>)[], blockCards: (ComponentRef<SlateBlockCard> | null)[] | null, outletParent: HTMLElement, firstRootNode: HTMLElement | null, viewContext: SlateViewContext): void;
|