slate-angular 20.2.0-next.17 → 20.2.0-next.19

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/index.d.ts CHANGED
@@ -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 refreshVirtualViewAnimId;
399
- private measureVisibleHeightsAnimId;
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;
@@ -412,6 +410,7 @@ declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewCh
412
410
  ngDoCheck(): void;
413
411
  forceRender(): void;
414
412
  render(): void;
413
+ updateListRenderAndRemeasureHeights(): void;
415
414
  updateContext(): boolean;
416
415
  initializeContext(): void;
417
416
  initializeViewContext(): void;
@@ -430,9 +429,7 @@ declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewCh
430
429
  private calculateVirtualViewport;
431
430
  private applyVirtualView;
432
431
  private diffVirtualViewport;
433
- private getBlockHeight;
434
- private buildAccumulatedHeight;
435
- private scheduleMeasureVisibleHeights;
432
+ private tryMeasureInViewportChildrenHeights;
436
433
  private measureVisibleHeights;
437
434
  private remeasureHeightByIndics;
438
435
  private addEventListener;
@@ -821,5 +818,13 @@ declare const getSelection: (root: Document | ShadowRoot) => Selection | null;
821
818
  declare const getContentHeight: (element: Element) => number;
822
819
  declare const getZeroTextNode: () => DOMText;
823
820
 
824
- 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, JUST_NOW_UPDATED_VIRTUAL_VIEW, 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, getSelection, getSlateFragmentAttribute, getZeroTextNode, hasAfterContextChange, hasBeforeContextChange, hasBlockCard, hasBlockCardWithNode, hotkeys, isCardCenterByTargetAttr, isCardLeft, isCardLeftByTargetAttr, isCardRightByTargetAttr, isClipboardFile, isClipboardReadSupported, isClipboardWriteSupported, isClipboardWriteTextSupported, isComponentType, isDOMText, isDecoratorRangeListEqual, isFlavourType, isInvalidTable, isTemplateRef, isValid, normalize, setClipboardData, setDataTransferClipboard, setDataTransferClipboardText, setNavigatorClipboard, shallowCompare, stripHtml, withAngular };
821
+ declare const ELEMENT_KEY_TO_HEIGHTS: WeakMap<AngularEditor, Map<string, number>>;
822
+ declare const getRealHeightByElement: (editor: AngularEditor, element: Element$1, defaultHeight?: number) => number;
823
+ declare const buildHeightsAndAccumulatedHeights: (editor: AngularEditor) => {
824
+ heights: any[];
825
+ accumulatedHeights: any[];
826
+ };
827
+ declare const scrollToElement: (editor: AngularEditor, element: Element$1, scrollTo: (scrollTop: number) => void) => void;
828
+
829
+ 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, buildHeightsAndAccumulatedHeights, 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 };
825
830
  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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slate-angular",
3
- "version": "20.2.0-next.17",
3
+ "version": "20.2.0-next.19",
4
4
  "description": "Angular view layer for Slate",
5
5
  "author": "pubuzhixing <pubuzhixing@gmail.com>",
6
6
  "homepage": "https://github.com/worktile/slate-angular#readme",