slate-angular 20.2.17 → 20.2.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/fesm2022/slate-angular.mjs +942 -908
- package/fesm2022/slate-angular.mjs.map +1 -1
- package/index.d.ts +13 -5
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -325,8 +325,6 @@ interface SlateVirtualScrollConfig {
|
|
|
325
325
|
enabled?: boolean;
|
|
326
326
|
scrollContainer?: HTMLElement;
|
|
327
327
|
scrollTop: number;
|
|
328
|
-
viewportHeight: number;
|
|
329
|
-
viewportBoundingTop: number;
|
|
330
328
|
}
|
|
331
329
|
interface VirtualViewResult {
|
|
332
330
|
inViewportChildren: Element$1[];
|
|
@@ -399,6 +397,7 @@ declare class SlateEditable implements OnInit, OnChanges, OnDestroy, AfterViewCh
|
|
|
399
397
|
private keyHeightMap;
|
|
400
398
|
private tryUpdateVirtualViewportAnimId;
|
|
401
399
|
private editorResizeObserver?;
|
|
400
|
+
private editorScrollContainerResizeObserver?;
|
|
402
401
|
indicsOfNeedBeMeasured$: Subject<number[]>;
|
|
403
402
|
virtualScrollInitialized: boolean;
|
|
404
403
|
virtualTopHeightElement: HTMLElement;
|
|
@@ -699,7 +698,6 @@ declare const PLACEHOLDER_SYMBOL: string;
|
|
|
699
698
|
* Weak map for associating the html element with the component.
|
|
700
699
|
*/
|
|
701
700
|
declare const ELEMENT_TO_COMPONENT: WeakMap<Node, BaseElementComponent | BaseFlavour>;
|
|
702
|
-
declare const IS_ENABLED_VIRTUAL_SCROLL: WeakMap<Editor, boolean>;
|
|
703
701
|
declare const EDITOR_TO_VIRTUAL_SCROLL_SELECTION: WeakMap<slate.BaseEditor, slate.BaseRange>;
|
|
704
702
|
declare const EDITOR_TO_AFTER_VIEW_INIT_QUEUE: WeakMap<Editor, (() => void)[]>;
|
|
705
703
|
|
|
@@ -831,10 +829,15 @@ declare const getSelection: (root: Document | ShadowRoot) => Selection | null;
|
|
|
831
829
|
declare const getContentHeight: (element: Element) => number;
|
|
832
830
|
declare const getZeroTextNode: () => DOMText;
|
|
833
831
|
|
|
832
|
+
declare const VIRTUAL_TOP_HEIGHT_CLASS_NAME = "virtual-top-height";
|
|
833
|
+
declare const VIRTUAL_BOTTOM_HEIGHT_CLASS_NAME = "virtual-bottom-height";
|
|
834
|
+
declare const VIRTUAL_CENTER_OUTLET_CLASS_NAME = "virtual-center-outlet";
|
|
834
835
|
declare const isDebug: boolean;
|
|
835
836
|
declare const isDebugScrollTop: boolean;
|
|
836
837
|
declare const ELEMENT_KEY_TO_HEIGHTS: WeakMap<AngularEditor, Map<string, number>>;
|
|
837
838
|
declare const EDITOR_TO_BUSINESS_TOP: WeakMap<AngularEditor, number>;
|
|
839
|
+
declare const EDITOR_TO_VIRTUAL_SCROLL_CONFIG: WeakMap<AngularEditor, SlateVirtualScrollConfig>;
|
|
840
|
+
declare const EDITOR_TO_VIEWPORT_HEIGHT: WeakMap<AngularEditor, number>;
|
|
838
841
|
declare const EDITOR_TO_ROOT_NODE_WIDTH: WeakMap<AngularEditor, number>;
|
|
839
842
|
declare const EDITOR_TO_IS_FROM_SCROLL_TO: WeakMap<AngularEditor, boolean>;
|
|
840
843
|
declare const isValidNumber: (value: any) => boolean;
|
|
@@ -845,13 +848,18 @@ declare const clearMinHeightByElement: (editor: AngularEditor, element: Element$
|
|
|
845
848
|
declare const calcHeightByElement: (editor: AngularEditor, element: Element$1) => number;
|
|
846
849
|
declare const measureHeightByIndics: (editor: AngularEditor, indics: number[], force?: boolean) => boolean;
|
|
847
850
|
declare const getBusinessTop: (editor: AngularEditor) => number;
|
|
851
|
+
declare const getViewportHeight: (editor: AngularEditor) => number;
|
|
852
|
+
declare const getScrollContainer: (editor: AngularEditor) => HTMLElement;
|
|
848
853
|
declare const getCachedHeightByElement: (editor: AngularEditor, element: Element$1) => number;
|
|
849
854
|
declare const buildHeightsAndAccumulatedHeights: (editor: AngularEditor, visibleStates: boolean[]) => {
|
|
850
855
|
heights: any[];
|
|
851
856
|
accumulatedHeights: any[];
|
|
852
857
|
};
|
|
853
|
-
declare const calculateVirtualTopHeight: (editor: AngularEditor, startIndex: number, visibleStates: boolean[]) =>
|
|
858
|
+
declare const calculateVirtualTopHeight: (editor: AngularEditor, startIndex: number, visibleStates: boolean[]) => number;
|
|
859
|
+
declare const calcBusinessTop: (editor: AngularEditor) => number;
|
|
854
860
|
declare const scrollToElement: (editor: AngularEditor, element: Element$1, scrollTo: (scrollTop: number) => void) => void;
|
|
855
861
|
|
|
856
|
-
|
|
862
|
+
declare const roundTo: (value: number, precision?: number) => number;
|
|
863
|
+
|
|
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, calculateVirtualTopHeight, 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, isTemplateRef, isValid, isValidNumber, measureHeightByIndics, normalize, roundTo, scrollToElement, setClipboardData, setDataTransferClipboard, setDataTransferClipboardText, setMinHeightByElement, setNavigatorClipboard, shallowCompare, stripHtml, withAngular };
|
|
857
865
|
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