slate-angular 20.0.0 → 20.1.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/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { DOMEditor, DOMNode, DOMElement, DOMPoint, DOMRange, DOMStaticRange, DOM
3
3
  import * as slate from 'slate';
4
4
  import { Descendant, Range as Range$1, Node, Editor, NodeEntry, Point, Element as Element$1, Path, Text, LeafPosition, Ancestor, BaseRange } from 'slate';
5
5
  import * as i0 from '@angular/core';
6
- import { Injector, ViewContainerRef, TemplateRef, OnInit, ElementRef, OnChanges, OnDestroy, AfterViewChecked, DoCheck, Renderer2, ChangeDetectorRef, NgZone, SimpleChanges } from '@angular/core';
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';
8
8
 
9
9
  declare enum SlateErrorCode {
@@ -274,24 +274,27 @@ interface SlatePlaceholder extends BaseRange {
274
274
  placeholder: string;
275
275
  }
276
276
 
277
- declare class SlateBlockCard implements OnInit {
278
- private elementRef;
279
- centerContainer: ElementRef;
277
+ declare const SLATE_BLOCK_CARD_CLASS_NAME = "slate-block-card";
278
+ declare class SlateBlockCard {
280
279
  centerRootNodes: HTMLElement[];
281
- get nativeElement(): any;
282
- get centerContainerElement(): HTMLElement;
283
- constructor(elementRef: ElementRef);
284
- ngOnInit(): void;
280
+ nativeElement: HTMLElement;
281
+ centerContainer: HTMLElement;
282
+ onInit(): void;
283
+ createContent(): void;
285
284
  append(): void;
286
285
  initializeCenter(rootNodes: HTMLElement[]): void;
287
- static ɵfac: i0.ɵɵFactoryDeclaration<SlateBlockCard, never>;
288
- static ɵcmp: i0.ɵɵComponentDeclaration<SlateBlockCard, "slate-block-card, [slateBlockCard]", never, {}, {}, never, never, true, never>;
286
+ onDestroy(): void;
289
287
  }
288
+ declare const getBlockCardByNativeElement: (nativeElement: HTMLElement) => HTMLElement;
290
289
 
291
290
  declare class FlavourRef {
292
291
  instance: BaseFlavour;
293
292
  destroy(): void;
294
293
  }
294
+ declare class BlockCardRef {
295
+ instance: SlateBlockCard;
296
+ destroy(): void;
297
+ }
295
298
 
296
299
  declare class ListRender {
297
300
  private viewContext;
@@ -456,17 +459,9 @@ declare const createText: (text: string) => {
456
459
  nativeElement: HTMLSpanElement;
457
460
  };
458
461
 
459
- declare class SlateString {
460
- context: SlateLeafContext;
461
- viewContext: SlateViewContext;
462
- ngOnInit(): void;
463
- static ɵfac: i0.ɵɵFactoryDeclaration<SlateString, never>;
464
- static ɵcmp: i0.ɵɵComponentDeclaration<SlateString, "span[slateString]", never, { "context": { "alias": "context"; "required": false; }; "viewContext": { "alias": "viewContext"; "required": false; }; }, {}, never, never, true, never>;
465
- }
466
-
467
462
  declare class SlateModule {
468
463
  static ɵfac: i0.ɵɵFactoryDeclaration<SlateModule, never>;
469
- static ɵmod: i0.ɵɵNgModuleDeclaration<SlateModule, never, [typeof i1.CommonModule, typeof SlateEditable, typeof SlateBlockCard, typeof SlateChildrenOutlet, typeof SlateString], [typeof SlateEditable, typeof SlateChildrenOutlet, typeof SlateString]>;
464
+ static ɵmod: i0.ɵɵNgModuleDeclaration<SlateModule, never, [typeof i1.CommonModule, typeof SlateEditable, typeof SlateChildrenOutlet], [typeof SlateEditable, typeof SlateChildrenOutlet]>;
470
465
  static ɵinj: i0.ɵɵInjectorDeclaration<SlateModule>;
471
466
  }
472
467
 
@@ -762,8 +757,9 @@ declare const getPlainText: (domNode: DOMNode) => string;
762
757
  */
763
758
  declare const getSelection: (root: Document | ShadowRoot) => Selection | null;
764
759
  declare const getContentHeight: (element: Element) => number;
760
+ declare const getZeroTextNode: () => DOMText;
765
761
 
766
762
  type SafeAny = any;
767
763
 
768
- export { AngularEditor, BaseComponent, BaseElementComponent, BaseElementFlavour, BaseFlavour, BaseLeafComponent, BaseLeafFlavour, BaseTextComponent, BaseTextFlavour, DefaultTextFlavour, EDITOR_TO_AFTER_VIEW_INIT_QUEUE, 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, SlateChildrenOutlet, SlateEditable, SlateErrorCode, SlateFragmentAttributeKey, SlateModule, SlateString, VoidTextFlavour, blobAsString, buildHTMLText, check, completeTable, createClipboardData, createText, createThrottleRAF, defaultScrollSelectionIntoView, fallbackCopyText, getCardTargetAttribute, getClipboardData, getClipboardFromHTMLText, getContentHeight, getDataTransferClipboard, getDataTransferClipboardText, getNavigatorClipboard, getPlainText, getSelection, getSlateFragmentAttribute, 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 };
764
+ export { AngularEditor, BaseComponent, BaseElementComponent, BaseElementFlavour, BaseFlavour, BaseLeafComponent, BaseLeafFlavour, BaseTextComponent, BaseTextFlavour, BlockCardRef, DefaultTextFlavour, EDITOR_TO_AFTER_VIEW_INIT_QUEUE, 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, SlateBlockCard, SlateChildrenOutlet, SlateEditable, SlateErrorCode, SlateFragmentAttributeKey, SlateModule, 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 };
769
765
  export type { AfterContextChange, BaseEmbeddedView, BeforeContextChange, ClipboardData, ComponentType, OriginEvent, SafeAny, SlateChildrenContext, SlateElementAttributes, SlateElementContext, SlateError, SlateLeafContext, SlatePlaceholder, SlateStringContext, SlateTextContext, SlateViewContext, ThrottleRAF, ViewType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "slate-angular",
3
- "version": "20.0.0",
3
+ "version": "20.1.0",
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",