slate-angular 20.2.0-next.22 → 20.2.0-next.24

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
@@ -311,9 +311,10 @@ declare class ListRender {
311
311
  private viewTypes;
312
312
  private differ;
313
313
  initialized: boolean;
314
+ private preRenderingHTMLElement;
314
315
  constructor(viewContext: SlateViewContext, viewContainerRef: ViewContainerRef, getOutletParent: () => HTMLElement, getOutletElement: () => HTMLElement | null);
315
- initialize(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext): void;
316
- update(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext): void;
316
+ initialize(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext, preRenderingCount?: number): void;
317
+ update(children: Descendant[], parent: Ancestor, childrenContext: SlateChildrenContext, preRenderingCount?: number): void;
317
318
  destroy(): void;
318
319
  }
319
320
 
@@ -327,7 +328,7 @@ interface SlateVirtualScrollConfig {
327
328
  }
328
329
  interface VirtualViewResult {
329
330
  inViewportChildren: Element$1[];
330
- visibleIndexes: Set<number>;
331
+ visibleIndexes: number[];
331
332
  top: number;
332
333
  bottom: number;
333
334
  heights: number[];
@@ -423,8 +424,13 @@ declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewCh
423
424
  virtualBottomHeightElement: HTMLElement;
424
425
  virtualCenterOutlet: HTMLElement;
425
426
  initializeVirtualScroll(): void;
426
- setVirtualSpaceHeight(topHeight: number, bottomHeight: number): void;
427
+ setVirtualSpaceHeight(topHeight: number, bottomHeight?: number): void;
428
+ getVirtualTopHeight(): number;
427
429
  private debugLog;
430
+ handlePreRendering(): {
431
+ preRenderingCount: number;
432
+ childrenWithPreRendering: slate.BaseElement[];
433
+ };
428
434
  private tryUpdateVirtualViewport;
429
435
  private calculateVirtualViewport;
430
436
  private applyVirtualView;
@@ -507,9 +513,17 @@ declare const createText: (text: string) => {
507
513
  nativeElement: HTMLSpanElement;
508
514
  };
509
515
 
516
+ declare class SlateString {
517
+ context: SlateLeafContext;
518
+ viewContext: SlateViewContext;
519
+ ngOnInit(): void;
520
+ static ɵfac: i0.ɵɵFactoryDeclaration<SlateString, never>;
521
+ static ɵcmp: i0.ɵɵComponentDeclaration<SlateString, "span[slateString]", never, { "context": { "alias": "context"; "required": false; }; "viewContext": { "alias": "viewContext"; "required": false; }; }, {}, never, never, true, never>;
522
+ }
523
+
510
524
  declare class SlateModule {
511
525
  static ɵfac: i0.ɵɵFactoryDeclaration<SlateModule, never>;
512
- static ɵmod: i0.ɵɵNgModuleDeclaration<SlateModule, never, [typeof i1.CommonModule, typeof SlateEditable, typeof SlateChildrenOutlet], [typeof SlateEditable, typeof SlateChildrenOutlet]>;
526
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SlateModule, never, [typeof i1.CommonModule, typeof SlateEditable, typeof SlateChildrenOutlet, typeof SlateString], [typeof SlateEditable, typeof SlateChildrenOutlet, typeof SlateString]>;
513
527
  static ɵinj: i0.ɵɵInjectorDeclaration<SlateModule>;
514
528
  }
515
529
 
@@ -830,5 +844,5 @@ declare const buildHeightsAndAccumulatedHeights: (editor: AngularEditor) => {
830
844
  };
831
845
  declare const scrollToElement: (editor: AngularEditor, element: Element$1, scrollTo: (scrollTop: number) => void) => void;
832
846
 
833
- 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_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, SLATE_DEBUG_KEY_SCROLL_TOP, SlateBlockCard, SlateChildrenOutlet, SlateEditable, SlateErrorCode, SlateFragmentAttributeKey, SlateModule, VIRTUAL_SCROLL_DEFAULT_BLOCK_HEIGHT, VoidTextFlavour, blobAsString, buildHTMLText, buildHeightsAndAccumulatedHeights, check, completeTable, createClipboardData, createText, createThrottleRAF, defaultScrollSelectionIntoView, fallbackCopyText, getBlockCardByNativeElement, getBusinessTop, 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 };
847
+ 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_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, SLATE_DEBUG_KEY_SCROLL_TOP, SlateBlockCard, SlateChildrenOutlet, SlateEditable, SlateErrorCode, SlateFragmentAttributeKey, SlateModule, SlateString, VIRTUAL_SCROLL_DEFAULT_BLOCK_HEIGHT, VoidTextFlavour, blobAsString, buildHTMLText, buildHeightsAndAccumulatedHeights, check, completeTable, createClipboardData, createText, createThrottleRAF, defaultScrollSelectionIntoView, fallbackCopyText, getBlockCardByNativeElement, getBusinessTop, 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 };
834
848
  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.22",
3
+ "version": "20.2.0-next.24",
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",