slate-angular 20.2.19 → 20.2.21
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 +126 -65
- package/fesm2022/slate-angular.mjs.map +1 -1
- package/index.d.ts +14 -4
- package/package.json +1 -1
- package/styles/index.scss +0 -1
package/index.d.ts
CHANGED
|
@@ -315,6 +315,7 @@ declare class ListRender {
|
|
|
315
315
|
private differ;
|
|
316
316
|
initialized: boolean;
|
|
317
317
|
private preRenderingHTMLElement;
|
|
318
|
+
private virtualTopHeightElement;
|
|
318
319
|
constructor(viewContext: SlateViewContext, viewContainerRef: ViewContainerRef, getOutletParent: () => HTMLElement, getOutletElement: () => HTMLElement | null);
|
|
319
320
|
initialize(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext, preRenderingCount?: number, childrenIndics?: number[]): void;
|
|
320
321
|
update(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext, preRenderingCount?: number, childrenIndics?: number[]): void;
|
|
@@ -336,6 +337,10 @@ interface VirtualViewResult {
|
|
|
336
337
|
|
|
337
338
|
type SafeAny = any;
|
|
338
339
|
|
|
340
|
+
declare class RemeasureConfig {
|
|
341
|
+
indics: number[];
|
|
342
|
+
tryUpdateViewport: boolean;
|
|
343
|
+
}
|
|
339
344
|
declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewChecked, DoCheck {
|
|
340
345
|
elementRef: ElementRef;
|
|
341
346
|
renderer2: Renderer2;
|
|
@@ -398,7 +403,7 @@ declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewCh
|
|
|
398
403
|
private tryUpdateVirtualViewportAnimId;
|
|
399
404
|
private editorResizeObserver?;
|
|
400
405
|
private editorScrollContainerResizeObserver?;
|
|
401
|
-
|
|
406
|
+
indicsOfNeedRemeasured$: Subject<RemeasureConfig>;
|
|
402
407
|
virtualScrollInitialized: boolean;
|
|
403
408
|
virtualTopHeightElement: HTMLElement;
|
|
404
409
|
virtualBottomHeightElement: HTMLElement;
|
|
@@ -415,11 +420,15 @@ declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewCh
|
|
|
415
420
|
getChangedIndics(previousValue: Descendant[]): any[];
|
|
416
421
|
setVirtualSpaceHeight(topHeight: number, bottomHeight?: number): void;
|
|
417
422
|
getActualVirtualTopHeight(): number;
|
|
418
|
-
|
|
423
|
+
appendPreRenderingToViewport(visibleStates: boolean[]): {
|
|
419
424
|
preRenderingCount: number;
|
|
420
425
|
childrenWithPreRendering: slate.BaseElement[];
|
|
421
426
|
childrenWithPreRenderingIndics: number[];
|
|
422
427
|
};
|
|
428
|
+
calculateIndicsStartAndEndBySelection(): {
|
|
429
|
+
minStartIndex: number;
|
|
430
|
+
minEndIndex: number;
|
|
431
|
+
};
|
|
423
432
|
private tryUpdateVirtualViewport;
|
|
424
433
|
private calculateVirtualViewport;
|
|
425
434
|
private applyVirtualView;
|
|
@@ -462,6 +471,7 @@ declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewCh
|
|
|
462
471
|
static ɵcmp: i0.ɵɵComponentDeclaration<SlateEditable, "slate-editable", never, { "editor": { "alias": "editor"; "required": false; }; "renderElement": { "alias": "renderElement"; "required": false; }; "renderLeaf": { "alias": "renderLeaf"; "required": false; }; "renderText": { "alias": "renderText"; "required": false; }; "decorate": { "alias": "decorate"; "required": false; }; "placeholderDecorate": { "alias": "placeholderDecorate"; "required": false; }; "scrollSelectionIntoView": { "alias": "scrollSelectionIntoView"; "required": false; }; "isStrictDecorate": { "alias": "isStrictDecorate"; "required": false; }; "trackBy": { "alias": "trackBy"; "required": false; }; "readonly": { "alias": "readonly"; "required": false; }; "placeholder": { "alias": "placeholder"; "required": false; }; "virtualScroll": { "alias": "virtualScroll"; "required": false; }; "beforeInput": { "alias": "beforeInput"; "required": false; }; "blur": { "alias": "blur"; "required": false; }; "click": { "alias": "click"; "required": false; }; "compositionEnd": { "alias": "compositionEnd"; "required": false; }; "compositionUpdate": { "alias": "compositionUpdate"; "required": false; }; "compositionStart": { "alias": "compositionStart"; "required": false; }; "copy": { "alias": "copy"; "required": false; }; "cut": { "alias": "cut"; "required": false; }; "dragOver": { "alias": "dragOver"; "required": false; }; "dragStart": { "alias": "dragStart"; "required": false; }; "dragEnd": { "alias": "dragEnd"; "required": false; }; "drop": { "alias": "drop"; "required": false; }; "focus": { "alias": "focus"; "required": false; }; "keydown": { "alias": "keydown"; "required": false; }; "paste": { "alias": "paste"; "required": false; }; "spellCheck": { "alias": "spellCheck"; "required": false; }; "autoCorrect": { "alias": "autoCorrect"; "required": false; }; "autoCapitalize": { "alias": "autoCapitalize"; "required": false; }; }, {}, never, never, true, never>;
|
|
463
472
|
}
|
|
464
473
|
declare const defaultScrollSelectionIntoView: (editor: AngularEditor, domRange: DOMRange) => void;
|
|
474
|
+
declare const isSelectionInsideVoid: (editor: AngularEditor) => boolean;
|
|
465
475
|
|
|
466
476
|
declare class SlateChildrenOutlet {
|
|
467
477
|
private elementRef;
|
|
@@ -855,11 +865,11 @@ declare const buildHeightsAndAccumulatedHeights: (editor: AngularEditor, visible
|
|
|
855
865
|
heights: any[];
|
|
856
866
|
accumulatedHeights: any[];
|
|
857
867
|
};
|
|
858
|
-
declare const
|
|
868
|
+
declare const calculateAccumulatedTopHeight: (editor: AngularEditor, startIndex: number, visibleStates: boolean[]) => number;
|
|
859
869
|
declare const calcBusinessTop: (editor: AngularEditor) => number;
|
|
860
870
|
declare const scrollToElement: (editor: AngularEditor, element: Element$1, scrollTo: (scrollTop: number) => void) => void;
|
|
861
871
|
|
|
862
872
|
declare const roundTo: (value: number, precision?: number) => number;
|
|
863
873
|
|
|
864
|
-
export { AngularEditor, BaseComponent, BaseElementComponent, BaseElementFlavour, BaseFlavour, BaseLeafComponent, BaseLeafFlavour, BaseTextComponent, BaseTextFlavour, BlockCardRef, DEFAULT_ELEMENT_HEIGHT, DefaultTextFlavour, EDITOR_TO_AFTER_VIEW_INIT_QUEUE, EDITOR_TO_BUSINESS_TOP, EDITOR_TO_IS_FROM_SCROLL_TO, EDITOR_TO_ROOT_NODE_WIDTH, EDITOR_TO_VIEWPORT_HEIGHT, EDITOR_TO_VIRTUAL_SCROLL_CONFIG, EDITOR_TO_VIRTUAL_SCROLL_SELECTION, ELEMENT_KEY_TO_HEIGHTS, ELEMENT_TO_COMPONENT, FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET, FlavourRef, HAS_BEFORE_INPUT_SUPPORT, IS_ANDROID, IS_APPLE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_FIREFOX_LEGACY, IS_IOS, IS_QQBROWSER, IS_SAFARI, IS_UC_MOBILE, IS_WECHATBROWSER, PLACEHOLDER_SYMBOL, SLATE_BLOCK_CARD_CLASS_NAME, SLATE_DEBUG_KEY, SLATE_DEBUG_KEY_SCROLL_TOP, SlateBlockCard, SlateChildrenOutlet, SlateEditable, SlateErrorCode, SlateFragmentAttributeKey, SlateModule, SlateString, VIRTUAL_BOTTOM_HEIGHT_CLASS_NAME, VIRTUAL_CENTER_OUTLET_CLASS_NAME, VIRTUAL_SCROLL_DEFAULT_BLOCK_HEIGHT, VIRTUAL_TOP_HEIGHT_CLASS_NAME, VoidTextFlavour, blobAsString, buildHTMLText, buildHeightsAndAccumulatedHeights, cacheHeightByElement, calcBusinessTop, calcHeightByElement,
|
|
874
|
+
export { AngularEditor, BaseComponent, BaseElementComponent, BaseElementFlavour, BaseFlavour, BaseLeafComponent, BaseLeafFlavour, BaseTextComponent, BaseTextFlavour, BlockCardRef, DEFAULT_ELEMENT_HEIGHT, DefaultTextFlavour, EDITOR_TO_AFTER_VIEW_INIT_QUEUE, EDITOR_TO_BUSINESS_TOP, EDITOR_TO_IS_FROM_SCROLL_TO, EDITOR_TO_ROOT_NODE_WIDTH, EDITOR_TO_VIEWPORT_HEIGHT, EDITOR_TO_VIRTUAL_SCROLL_CONFIG, EDITOR_TO_VIRTUAL_SCROLL_SELECTION, ELEMENT_KEY_TO_HEIGHTS, ELEMENT_TO_COMPONENT, FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET, FlavourRef, HAS_BEFORE_INPUT_SUPPORT, IS_ANDROID, IS_APPLE, IS_CHROME, IS_CHROME_LEGACY, IS_EDGE_LEGACY, IS_FIREFOX, IS_FIREFOX_LEGACY, IS_IOS, IS_QQBROWSER, IS_SAFARI, IS_UC_MOBILE, IS_WECHATBROWSER, PLACEHOLDER_SYMBOL, SLATE_BLOCK_CARD_CLASS_NAME, SLATE_DEBUG_KEY, SLATE_DEBUG_KEY_SCROLL_TOP, SlateBlockCard, SlateChildrenOutlet, SlateEditable, SlateErrorCode, SlateFragmentAttributeKey, SlateModule, SlateString, VIRTUAL_BOTTOM_HEIGHT_CLASS_NAME, VIRTUAL_CENTER_OUTLET_CLASS_NAME, VIRTUAL_SCROLL_DEFAULT_BLOCK_HEIGHT, VIRTUAL_TOP_HEIGHT_CLASS_NAME, VoidTextFlavour, blobAsString, buildHTMLText, buildHeightsAndAccumulatedHeights, cacheHeightByElement, calcBusinessTop, calcHeightByElement, calculateAccumulatedTopHeight, check, clearMinHeightByElement, completeTable, createClipboardData, createText, createThrottleRAF, debugLog, defaultScrollSelectionIntoView, fallbackCopyText, getBlockCardByNativeElement, getBusinessTop, getCachedHeightByElement, getCardTargetAttribute, getClipboardData, getClipboardFromHTMLText, getContentHeight, getDataTransferClipboard, getDataTransferClipboardText, getNavigatorClipboard, getPlainText, getScrollContainer, getSelection, getSlateFragmentAttribute, getViewportHeight, getZeroTextNode, hasAfterContextChange, hasBeforeContextChange, hasBlockCard, hasBlockCardWithNode, hotkeys, isCardCenterByTargetAttr, isCardLeft, isCardLeftByTargetAttr, isCardRightByTargetAttr, isClipboardFile, isClipboardReadSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isComponentType, isDOMText, isDebug, isDebugScrollTop, isDecoratorRangeListEqual, isFlavourType, isInvalidTable, isSelectionInsideVoid, isTemplateRef, isValid, isValidNumber, measureHeightByIndics, normalize, roundTo, scrollToElement, setClipboardData, setDataTransferClipboard, setDataTransferClipboardText, setMinHeightByElement, setNavigatorClipboard, shallowCompare, stripHtml, withAngular };
|
|
865
875
|
export type { AfterContextChange, BaseEmbeddedView, BeforeContextChange, ClipboardData, ComponentType, OriginEvent, SafeAny, SlateChildrenContext, SlateElementAttributes, SlateElementContext, SlateError, SlateLeafContext, SlatePlaceholder, SlateStringContext, SlateTextContext, SlateViewContext, SlateVirtualScrollConfig, ThrottleRAF, ViewType, VirtualViewResult };
|
package/package.json
CHANGED