slate-angular 20.2.0-next.16 → 20.2.0-next.18
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 +86 -45
- package/fesm2022/slate-angular.mjs.map +1 -1
- package/index.d.ts +12 -8
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as slate_dom from 'slate-dom';
|
|
2
2
|
import { DOMEditor, DOMNode, DOMElement, DOMPoint, DOMRange, DOMStaticRange, DOMSelection, DOMText } from 'slate-dom';
|
|
3
3
|
import * as slate from 'slate';
|
|
4
|
-
import { Descendant, Range as Range$1, Node, Editor, NodeEntry, Point, Element as Element$1, Path, Text, LeafPosition, Ancestor, BaseRange } from 'slate';
|
|
4
|
+
import { Descendant, Range as Range$1, Node, Editor, NodeEntry, Point, Element as Element$1, Path, Text, LeafPosition, Ancestor, BaseRange, Selection as Selection$1 } from 'slate';
|
|
5
5
|
import * as i0 from '@angular/core';
|
|
6
6
|
import { Injector, ViewContainerRef, TemplateRef, OnInit, OnChanges, OnDestroy, AfterViewChecked, DoCheck, ElementRef, Renderer2, ChangeDetectorRef, NgZone, SimpleChanges } from '@angular/core';
|
|
7
7
|
import * as i1 from '@angular/common';
|
|
@@ -334,8 +334,6 @@ interface VirtualViewResult {
|
|
|
334
334
|
|
|
335
335
|
type SafeAny = any;
|
|
336
336
|
|
|
337
|
-
declare const JUST_NOW_UPDATED_VIRTUAL_VIEW: WeakMap<AngularEditor, boolean>;
|
|
338
|
-
declare const ELEMENT_KEY_TO_HEIGHTS: WeakMap<AngularEditor, Map<string, number>>;
|
|
339
337
|
declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewChecked, DoCheck {
|
|
340
338
|
elementRef: ElementRef;
|
|
341
339
|
renderer2: Renderer2;
|
|
@@ -395,8 +393,8 @@ declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewCh
|
|
|
395
393
|
private inViewportChildren;
|
|
396
394
|
private inViewportIndics;
|
|
397
395
|
private keyHeightMap;
|
|
398
|
-
private
|
|
399
|
-
private
|
|
396
|
+
private tryUpdateVirtualViewportAnimId;
|
|
397
|
+
private tryMeasureInViewportChildrenHeightsAnimId;
|
|
400
398
|
private editorResizeObserver?;
|
|
401
399
|
constructor(elementRef: ElementRef, renderer2: Renderer2, cdr: ChangeDetectorRef, ngZone: NgZone, injector: Injector);
|
|
402
400
|
ngOnInit(): void;
|
|
@@ -405,12 +403,14 @@ declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewCh
|
|
|
405
403
|
registerOnTouched(fn: any): void;
|
|
406
404
|
writeValue(value: Element$1[]): void;
|
|
407
405
|
initialize(): void;
|
|
406
|
+
calculateVirtualScrollSelection(selection: Selection$1): slate.BaseRange;
|
|
408
407
|
toNativeSelection(): void;
|
|
409
408
|
onChange(): void;
|
|
410
409
|
ngAfterViewChecked(): void;
|
|
411
410
|
ngDoCheck(): void;
|
|
412
411
|
forceRender(): void;
|
|
413
412
|
render(): void;
|
|
413
|
+
updateListRenderAndRemeasureHeights(): void;
|
|
414
414
|
updateContext(): boolean;
|
|
415
415
|
initializeContext(): void;
|
|
416
416
|
initializeViewContext(): void;
|
|
@@ -431,7 +431,7 @@ declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewCh
|
|
|
431
431
|
private diffVirtualViewport;
|
|
432
432
|
private getBlockHeight;
|
|
433
433
|
private buildAccumulatedHeight;
|
|
434
|
-
private
|
|
434
|
+
private tryMeasureInViewportChildrenHeights;
|
|
435
435
|
private measureVisibleHeights;
|
|
436
436
|
private remeasureHeightByIndics;
|
|
437
437
|
private addEventListener;
|
|
@@ -690,6 +690,7 @@ declare const PLACEHOLDER_SYMBOL: string;
|
|
|
690
690
|
*/
|
|
691
691
|
declare const ELEMENT_TO_COMPONENT: WeakMap<Node, BaseElementComponent | BaseFlavour>;
|
|
692
692
|
declare const IS_ENABLED_VIRTUAL_SCROLL: WeakMap<Editor, boolean>;
|
|
693
|
+
declare const EDITOR_TO_VIRTUAL_SCROLL_SELECTION: WeakMap<slate.BaseEditor, slate.BaseRange>;
|
|
693
694
|
declare const EDITOR_TO_AFTER_VIEW_INIT_QUEUE: WeakMap<Editor, (() => void)[]>;
|
|
694
695
|
|
|
695
696
|
/**
|
|
@@ -740,7 +741,6 @@ declare const IS_QQBROWSER: boolean;
|
|
|
740
741
|
declare const IS_UC_MOBILE: boolean;
|
|
741
742
|
declare const IS_WECHATBROWSER: boolean;
|
|
742
743
|
declare const HAS_BEFORE_INPUT_SUPPORT: boolean;
|
|
743
|
-
declare const VIRTUAL_SCROLL_DEFAULT_BUFFER_COUNT = 3;
|
|
744
744
|
declare const VIRTUAL_SCROLL_DEFAULT_BLOCK_HEIGHT = 40;
|
|
745
745
|
declare const SLATE_DEBUG_KEY = "__SLATE_DEBUG__";
|
|
746
746
|
|
|
@@ -820,5 +820,9 @@ declare const getSelection: (root: Document | ShadowRoot) => Selection | null;
|
|
|
820
820
|
declare const getContentHeight: (element: Element) => number;
|
|
821
821
|
declare const getZeroTextNode: () => DOMText;
|
|
822
822
|
|
|
823
|
-
|
|
823
|
+
declare const ELEMENT_KEY_TO_HEIGHTS: WeakMap<AngularEditor, Map<string, number>>;
|
|
824
|
+
declare const getRealHeightByElement: (editor: AngularEditor, element: Element$1) => number;
|
|
825
|
+
declare const scrollToElement: (editor: Editor, element: Element$1, scrollTo: (scrollTop: number) => void) => void;
|
|
826
|
+
|
|
827
|
+
export { AngularEditor, BaseComponent, BaseElementComponent, BaseElementFlavour, BaseFlavour, BaseLeafComponent, BaseLeafFlavour, BaseTextComponent, BaseTextFlavour, BlockCardRef, DEFAULT_ELEMENT_HEIGHT, DefaultTextFlavour, EDITOR_TO_AFTER_VIEW_INIT_QUEUE, 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_ENABLED_VIRTUAL_SCROLL, 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, SlateBlockCard, SlateChildrenOutlet, SlateEditable, SlateErrorCode, SlateFragmentAttributeKey, SlateModule, VIRTUAL_SCROLL_DEFAULT_BLOCK_HEIGHT, VoidTextFlavour, blobAsString, buildHTMLText, check, completeTable, createClipboardData, createText, createThrottleRAF, defaultScrollSelectionIntoView, fallbackCopyText, getBlockCardByNativeElement, getCardTargetAttribute, getClipboardData, getClipboardFromHTMLText, getContentHeight, getDataTransferClipboard, getDataTransferClipboardText, getNavigatorClipboard, getPlainText, getRealHeightByElement, getSelection, getSlateFragmentAttribute, getZeroTextNode, hasAfterContextChange, hasBeforeContextChange, hasBlockCard, hasBlockCardWithNode, hotkeys, isCardCenterByTargetAttr, isCardLeft, isCardLeftByTargetAttr, isCardRightByTargetAttr, isClipboardFile, isClipboardReadSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isComponentType, isDOMText, isDecoratorRangeListEqual, isFlavourType, isInvalidTable, isTemplateRef, isValid, normalize, scrollToElement, setClipboardData, setDataTransferClipboard, setDataTransferClipboardText, setNavigatorClipboard, shallowCompare, stripHtml, withAngular };
|
|
824
828
|
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