slate-angular 20.2.20 → 20.2.22
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 +122 -64
- package/fesm2022/slate-angular.mjs.map +1 -1
- package/index.d.ts +14 -4
- package/package.json +1 -1
- package/styles/index.scss +3 -1
|
@@ -1149,7 +1149,7 @@ const buildHeightsAndAccumulatedHeights = (editor, visibleStates) => {
|
|
|
1149
1149
|
}
|
|
1150
1150
|
return { heights, accumulatedHeights };
|
|
1151
1151
|
};
|
|
1152
|
-
const
|
|
1152
|
+
const calculateAccumulatedTopHeight = (editor, startIndex, visibleStates) => {
|
|
1153
1153
|
const { accumulatedHeights } = buildHeightsAndAccumulatedHeights(editor, visibleStates);
|
|
1154
1154
|
const virtualTopHeight = roundTo(accumulatedHeights[startIndex] ?? 0, 1);
|
|
1155
1155
|
return virtualTopHeight;
|
|
@@ -2975,23 +2975,22 @@ const createText = (text) => {
|
|
|
2975
2975
|
|
|
2976
2976
|
const PRE_RENDERING_ELEMENT_ON_TOP_CLASS = 'pre-rendering-element-on-top';
|
|
2977
2977
|
const setPreRenderingElementStyle = (editor, rootNode, isClear = false) => {
|
|
2978
|
-
if (isClear) {
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
}
|
|
2985
|
-
const preRenderingWidth = EDITOR_TO_ROOT_NODE_WIDTH.get(editor) ?? 0;
|
|
2986
|
-
rootNode.style.top = '-100%';
|
|
2987
|
-
if (preRenderingWidth) {
|
|
2988
|
-
|
|
2989
|
-
}
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
rootNode.
|
|
2994
|
-
rootNode.classList.add(PRE_RENDERING_ELEMENT_ON_TOP_CLASS);
|
|
2978
|
+
// if (isClear) {
|
|
2979
|
+
// rootNode.style.top = '';
|
|
2980
|
+
// rootNode.style.width = '';
|
|
2981
|
+
// rootNode.style.position = '';
|
|
2982
|
+
// rootNode.classList.remove(PRE_RENDERING_ELEMENT_ON_TOP_CLASS);
|
|
2983
|
+
// return;
|
|
2984
|
+
// }
|
|
2985
|
+
// const preRenderingWidth = EDITOR_TO_ROOT_NODE_WIDTH.get(editor) ?? 0;
|
|
2986
|
+
// rootNode.style.top = '-100%';
|
|
2987
|
+
// if (preRenderingWidth) {
|
|
2988
|
+
// rootNode.style.width = `${preRenderingWidth}px`;
|
|
2989
|
+
// } else {
|
|
2990
|
+
// rootNode.style.width = '100%';
|
|
2991
|
+
// }
|
|
2992
|
+
// rootNode.style.position = 'absolute';
|
|
2993
|
+
// rootNode.classList.add(PRE_RENDERING_ELEMENT_ON_TOP_CLASS);
|
|
2995
2994
|
};
|
|
2996
2995
|
const updatePreRenderingElementWidth = (editor) => {
|
|
2997
2996
|
const editorDom = AngularEditor.toDOMNode(editor, editor);
|
|
@@ -3020,6 +3019,7 @@ class ListRender {
|
|
|
3020
3019
|
this.differ = null;
|
|
3021
3020
|
this.initialized = false;
|
|
3022
3021
|
this.preRenderingHTMLElement = [];
|
|
3022
|
+
this.virtualTopHeightElement = null;
|
|
3023
3023
|
}
|
|
3024
3024
|
initialize(children, parent, childrenContext, preRenderingCount = 0, childrenIndics) {
|
|
3025
3025
|
this.initialized = true;
|
|
@@ -3065,21 +3065,28 @@ class ListRender {
|
|
|
3065
3065
|
const outletParent = this.getOutletParent();
|
|
3066
3066
|
if (this.preRenderingHTMLElement.length > 0) {
|
|
3067
3067
|
const preRenderingElement = [...this.preRenderingHTMLElement];
|
|
3068
|
+
let previousRootNode = this.virtualTopHeightElement;
|
|
3068
3069
|
preRenderingElement.forEach((rootNodes, index) => {
|
|
3069
|
-
const slateElement = this.children[index];
|
|
3070
|
-
if (slateElement && children.indexOf(slateElement) >= 0) {
|
|
3071
|
-
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
else {
|
|
3079
|
-
if (isDebug) {
|
|
3080
|
-
debugLog('log', 'preRenderingHTMLElement index: ', this.viewContext.editor.children.indexOf(this.children[index]), 'do not clear since it would be removed soon');
|
|
3081
|
-
}
|
|
3070
|
+
// const slateElement = this.children[index];
|
|
3071
|
+
// if (slateElement && children.indexOf(slateElement) >= 0) {
|
|
3072
|
+
rootNodes.forEach(rootNode => {
|
|
3073
|
+
setPreRenderingElementStyle(this.viewContext.editor, rootNode, true);
|
|
3074
|
+
previousRootNode.insertAdjacentElement('afterend', rootNode);
|
|
3075
|
+
previousRootNode = rootNode;
|
|
3076
|
+
});
|
|
3077
|
+
if (isDebug) {
|
|
3078
|
+
debugLog('log', 'preRenderingHTMLElement index: ', this.viewContext.editor.children.indexOf(this.children[index]), 'is clear true');
|
|
3082
3079
|
}
|
|
3080
|
+
// } else {
|
|
3081
|
+
// if (isDebug) {
|
|
3082
|
+
// debugLog(
|
|
3083
|
+
// 'log',
|
|
3084
|
+
// 'preRenderingHTMLElement index: ',
|
|
3085
|
+
// this.viewContext.editor.children.indexOf(this.children[index]),
|
|
3086
|
+
// 'do not clear since it would be removed soon'
|
|
3087
|
+
// );
|
|
3088
|
+
// }
|
|
3089
|
+
// }
|
|
3083
3090
|
});
|
|
3084
3091
|
this.preRenderingHTMLElement = [];
|
|
3085
3092
|
}
|
|
@@ -3194,6 +3201,10 @@ class ListRender {
|
|
|
3194
3201
|
setPreRenderingElementStyle(this.viewContext.editor, rootNode);
|
|
3195
3202
|
});
|
|
3196
3203
|
this.preRenderingHTMLElement.push(rootNodes);
|
|
3204
|
+
if (!this.virtualTopHeightElement) {
|
|
3205
|
+
this.virtualTopHeightElement = rootNodes[0].parentElement.querySelector(`.${VIRTUAL_TOP_HEIGHT_CLASS_NAME}`);
|
|
3206
|
+
}
|
|
3207
|
+
this.virtualTopHeightElement.append(...rootNodes);
|
|
3197
3208
|
if (isDebug) {
|
|
3198
3209
|
debugLog('log', 'preRenderingHTMLElement index: ', this.viewContext.editor.children.indexOf(children[i]));
|
|
3199
3210
|
}
|
|
@@ -3366,6 +3377,8 @@ function executeAfterViewInit(editor) {
|
|
|
3366
3377
|
|
|
3367
3378
|
// not correctly clipboardData on beforeinput
|
|
3368
3379
|
const forceOnDOMPaste = IS_SAFARI;
|
|
3380
|
+
class RemeasureConfig {
|
|
3381
|
+
}
|
|
3369
3382
|
class SlateEditable {
|
|
3370
3383
|
set virtualScroll(config) {
|
|
3371
3384
|
this.virtualScrollConfig = config;
|
|
@@ -3428,7 +3441,7 @@ class SlateEditable {
|
|
|
3428
3441
|
this.inViewportChildren = [];
|
|
3429
3442
|
this.inViewportIndics = [];
|
|
3430
3443
|
this.keyHeightMap = new Map();
|
|
3431
|
-
this.
|
|
3444
|
+
this.indicsOfNeedRemeasured$ = new Subject();
|
|
3432
3445
|
this.virtualScrollInitialized = false;
|
|
3433
3446
|
}
|
|
3434
3447
|
ngOnInit() {
|
|
@@ -3499,12 +3512,12 @@ class SlateEditable {
|
|
|
3499
3512
|
this.listRender.initialize(childrenForRender, this.editor, this.context, 0, virtualView.inViewportIndics);
|
|
3500
3513
|
}
|
|
3501
3514
|
else {
|
|
3502
|
-
const { preRenderingCount, childrenWithPreRendering, childrenWithPreRenderingIndics } = this.
|
|
3515
|
+
const { preRenderingCount, childrenWithPreRendering, childrenWithPreRenderingIndics } = this.appendPreRenderingToViewport(visibleStates);
|
|
3503
3516
|
this.listRender.update(childrenWithPreRendering, this.editor, this.context, preRenderingCount, childrenWithPreRenderingIndics);
|
|
3504
3517
|
}
|
|
3505
3518
|
const remeasureIndics = this.getChangedIndics(previousInViewportChildren);
|
|
3506
3519
|
if (remeasureIndics.length) {
|
|
3507
|
-
this.
|
|
3520
|
+
this.indicsOfNeedRemeasured$.next({ indics: remeasureIndics, tryUpdateViewport: true });
|
|
3508
3521
|
}
|
|
3509
3522
|
}
|
|
3510
3523
|
else {
|
|
@@ -3597,20 +3610,22 @@ class SlateEditable {
|
|
|
3597
3610
|
this.editorScrollContainerResizeObserver.observe(this.virtualScrollConfig.scrollContainer);
|
|
3598
3611
|
}
|
|
3599
3612
|
let pendingRemeasureIndics = [];
|
|
3600
|
-
this.
|
|
3613
|
+
this.indicsOfNeedRemeasured$
|
|
3601
3614
|
.pipe(tap((previousValue) => {
|
|
3602
|
-
previousValue.forEach((index) => {
|
|
3615
|
+
previousValue.indics.forEach((index) => {
|
|
3603
3616
|
if (!pendingRemeasureIndics.includes(index)) {
|
|
3604
3617
|
pendingRemeasureIndics.push(index);
|
|
3605
3618
|
}
|
|
3606
3619
|
});
|
|
3607
3620
|
}), debounceTime(500), filter(() => pendingRemeasureIndics.length > 0))
|
|
3608
|
-
.subscribe(() => {
|
|
3621
|
+
.subscribe((previousValue) => {
|
|
3609
3622
|
const changed = measureHeightByIndics(this.editor, pendingRemeasureIndics, true);
|
|
3610
3623
|
if (changed) {
|
|
3611
|
-
|
|
3612
|
-
|
|
3613
|
-
|
|
3624
|
+
if (previousValue.tryUpdateViewport) {
|
|
3625
|
+
this.tryUpdateVirtualViewport();
|
|
3626
|
+
if (isDebug) {
|
|
3627
|
+
debugLog('log', 'exist pendingRemeasureIndics: ', pendingRemeasureIndics, 'will try to update virtual viewport');
|
|
3628
|
+
}
|
|
3614
3629
|
}
|
|
3615
3630
|
}
|
|
3616
3631
|
pendingRemeasureIndics = [];
|
|
@@ -3635,13 +3650,19 @@ class SlateEditable {
|
|
|
3635
3650
|
this.virtualBottomHeightElement.style.height = `${roundTo(bottomHeight, 1)}px`;
|
|
3636
3651
|
}
|
|
3637
3652
|
}
|
|
3653
|
+
setTopHeightDebugInfo(accumulatedHeight, accumulatedEndIndex) {
|
|
3654
|
+
if (isDebug) {
|
|
3655
|
+
this.virtualTopHeightElement.setAttribute('accumulated-height', accumulatedHeight.toString());
|
|
3656
|
+
this.virtualTopHeightElement.setAttribute('accumulated-height-end-index', accumulatedEndIndex.toString());
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3638
3659
|
getActualVirtualTopHeight() {
|
|
3639
3660
|
if (!this.virtualScrollInitialized) {
|
|
3640
3661
|
return 0;
|
|
3641
3662
|
}
|
|
3642
3663
|
return parseFloat(this.virtualTopHeightElement.style.height.replace('px', ''));
|
|
3643
3664
|
}
|
|
3644
|
-
|
|
3665
|
+
appendPreRenderingToViewport(visibleStates) {
|
|
3645
3666
|
let preRenderingCount = 0;
|
|
3646
3667
|
const childrenWithPreRendering = [...this.inViewportChildren];
|
|
3647
3668
|
const childrenWithPreRenderingIndics = [...this.inViewportIndics];
|
|
@@ -3666,20 +3687,42 @@ class SlateEditable {
|
|
|
3666
3687
|
}
|
|
3667
3688
|
return { preRenderingCount, childrenWithPreRendering, childrenWithPreRenderingIndics };
|
|
3668
3689
|
}
|
|
3690
|
+
calculateIndicsStartAndEndBySelection() {
|
|
3691
|
+
if (!this.editor.selection || Range.isCollapsed(this.editor.selection)) {
|
|
3692
|
+
return;
|
|
3693
|
+
}
|
|
3694
|
+
const isBackward = Range.isBackward(this.editor.selection);
|
|
3695
|
+
const anchorIndex = this.editor.selection.anchor.path[0];
|
|
3696
|
+
const focusIndex = this.editor.selection.focus.path[0];
|
|
3697
|
+
let minStartIndex = anchorIndex;
|
|
3698
|
+
let minEndIndex = focusIndex;
|
|
3699
|
+
if (isBackward) {
|
|
3700
|
+
minStartIndex = focusIndex;
|
|
3701
|
+
minEndIndex = anchorIndex;
|
|
3702
|
+
}
|
|
3703
|
+
if (minStartIndex < this.inViewportIndics[0]) {
|
|
3704
|
+
minStartIndex = this.inViewportIndics[0];
|
|
3705
|
+
}
|
|
3706
|
+
if (minEndIndex > this.inViewportIndics[this.inViewportIndics.length - 1]) {
|
|
3707
|
+
minEndIndex = this.inViewportIndics[this.inViewportIndics.length - 1];
|
|
3708
|
+
}
|
|
3709
|
+
return { minStartIndex, minEndIndex };
|
|
3710
|
+
}
|
|
3669
3711
|
tryUpdateVirtualViewport() {
|
|
3670
3712
|
if (isDebug) {
|
|
3671
3713
|
debugLog('log', 'tryUpdateVirtualViewport');
|
|
3672
3714
|
}
|
|
3673
3715
|
const isFromScrollTo = EDITOR_TO_IS_FROM_SCROLL_TO.get(this.editor);
|
|
3674
3716
|
if (this.inViewportIndics.length > 0 && !isFromScrollTo) {
|
|
3675
|
-
const
|
|
3717
|
+
const realTopHeight = this.getActualVirtualTopHeight();
|
|
3676
3718
|
const visibleStates = this.editor.getAllVisibleStates();
|
|
3677
|
-
const
|
|
3678
|
-
|
|
3719
|
+
const accumulateTopHeigh = calculateAccumulatedTopHeight(this.editor, this.inViewportIndics[0], visibleStates);
|
|
3720
|
+
this.setTopHeightDebugInfo(accumulateTopHeigh, this.inViewportIndics[0] - 1);
|
|
3721
|
+
if (realTopHeight !== accumulateTopHeigh) {
|
|
3679
3722
|
if (isDebug) {
|
|
3680
|
-
debugLog('log', 'update top height since dirty state,增加高度: ',
|
|
3723
|
+
debugLog('log', 'update top height since dirty state,增加高度: ', accumulateTopHeigh - realTopHeight);
|
|
3681
3724
|
}
|
|
3682
|
-
this.setVirtualSpaceHeight(
|
|
3725
|
+
this.setVirtualSpaceHeight(accumulateTopHeigh);
|
|
3683
3726
|
return;
|
|
3684
3727
|
}
|
|
3685
3728
|
}
|
|
@@ -3702,9 +3745,9 @@ class SlateEditable {
|
|
|
3702
3745
|
if (diff.isDifferent) {
|
|
3703
3746
|
this.applyVirtualView(virtualView);
|
|
3704
3747
|
if (this.listRender.initialized) {
|
|
3705
|
-
const { preRenderingCount, childrenWithPreRendering, childrenWithPreRenderingIndics } = this.
|
|
3748
|
+
const { preRenderingCount, childrenWithPreRendering, childrenWithPreRenderingIndics } = this.appendPreRenderingToViewport(visibleStates);
|
|
3706
3749
|
this.listRender.update(childrenWithPreRendering, this.editor, this.context, preRenderingCount, childrenWithPreRenderingIndics);
|
|
3707
|
-
if (diff.needAddOnTop && !isFromScrollTo) {
|
|
3750
|
+
if (diff.needAddOnTop && !isFromScrollTo && diff.changedIndexesOfTop.length === 1) {
|
|
3708
3751
|
const remeasureAddedIndics = diff.changedIndexesOfTop;
|
|
3709
3752
|
if (isDebug) {
|
|
3710
3753
|
debugLog('log', 'needAddOnTop to remeasure heights: ', remeasureAddedIndics);
|
|
@@ -3716,10 +3759,11 @@ class SlateEditable {
|
|
|
3716
3759
|
const newHeights = buildHeightsAndAccumulatedHeights(this.editor, visibleStates);
|
|
3717
3760
|
const actualTopHeightAfterAdd = newHeights.accumulatedHeights[startIndexBeforeAdd];
|
|
3718
3761
|
const newTopHeight = virtualView.top - (actualTopHeightAfterAdd - topHeightBeforeAdd);
|
|
3762
|
+
this.setTopHeightDebugInfo(newHeights.accumulatedHeights[this.inViewportIndics[0]], this.inViewportIndics[0] - 1);
|
|
3719
3763
|
if (topHeightBeforeAdd !== actualTopHeightAfterAdd) {
|
|
3720
3764
|
this.setVirtualSpaceHeight(newTopHeight);
|
|
3721
3765
|
if (isDebug) {
|
|
3722
|
-
debugLog('log', `update top height since will add element in top,减去高度: ${
|
|
3766
|
+
debugLog('log', `update top height since will add element in top,减去高度: ${actualTopHeightAfterAdd - topHeightBeforeAdd}`);
|
|
3723
3767
|
}
|
|
3724
3768
|
}
|
|
3725
3769
|
}
|
|
@@ -3760,10 +3804,13 @@ class SlateEditable {
|
|
|
3760
3804
|
endPosition = startPosition + viewportHeight - (businessTop - scrollTop);
|
|
3761
3805
|
}
|
|
3762
3806
|
let accumulatedOffset = 0;
|
|
3763
|
-
|
|
3764
|
-
const visible = [];
|
|
3807
|
+
const inViewportChildren = [];
|
|
3765
3808
|
const inViewportIndics = [];
|
|
3766
|
-
|
|
3809
|
+
const indicsBySelection = this.calculateIndicsStartAndEndBySelection();
|
|
3810
|
+
if (isDebug) {
|
|
3811
|
+
debugLog('log', 'indicsBySelection: ', indicsBySelection);
|
|
3812
|
+
}
|
|
3813
|
+
for (let i = 0; i < elementLength; i++) {
|
|
3767
3814
|
const currentHeight = heights[i];
|
|
3768
3815
|
const nextOffset = accumulatedOffset + currentHeight;
|
|
3769
3816
|
const isVisible = visibleStates[i];
|
|
@@ -3771,20 +3818,30 @@ class SlateEditable {
|
|
|
3771
3818
|
accumulatedOffset = nextOffset;
|
|
3772
3819
|
continue;
|
|
3773
3820
|
}
|
|
3774
|
-
|
|
3775
|
-
|
|
3776
|
-
|
|
3777
|
-
inViewportStartIndex = i; // 第一个相交起始位置
|
|
3778
|
-
visible.push(children[i]);
|
|
3779
|
-
inViewportIndics.push(i);
|
|
3821
|
+
if ((indicsBySelection && i > indicsBySelection.minEndIndex && accumulatedOffset >= endPosition) ||
|
|
3822
|
+
(!indicsBySelection && accumulatedOffset >= endPosition)) {
|
|
3823
|
+
break;
|
|
3780
3824
|
}
|
|
3825
|
+
if ((indicsBySelection && i < indicsBySelection.minStartIndex && nextOffset <= startPosition) ||
|
|
3826
|
+
(!indicsBySelection && nextOffset <= startPosition)) {
|
|
3827
|
+
accumulatedOffset = nextOffset;
|
|
3828
|
+
continue;
|
|
3829
|
+
}
|
|
3830
|
+
inViewportChildren.push(children[i]);
|
|
3831
|
+
inViewportIndics.push(i);
|
|
3781
3832
|
accumulatedOffset = nextOffset;
|
|
3782
3833
|
}
|
|
3783
|
-
|
|
3784
|
-
|
|
3834
|
+
if (inViewportIndics.length === 0) {
|
|
3835
|
+
inViewportChildren.push(...children);
|
|
3836
|
+
inViewportIndics.push(...Array.from({ length: elementLength }, (_, i) => i));
|
|
3837
|
+
}
|
|
3838
|
+
const inViewportStartIndex = inViewportIndics[0];
|
|
3839
|
+
const inViewportEndIndex = inViewportIndics[inViewportIndics.length - 1];
|
|
3840
|
+
const top = accumulatedHeights[inViewportStartIndex];
|
|
3841
|
+
// todo: totalHeight: totalHeight 逻辑需要优化
|
|
3785
3842
|
const bottom = totalHeight - accumulatedHeights[inViewportEndIndex + 1];
|
|
3786
3843
|
return {
|
|
3787
|
-
inViewportChildren
|
|
3844
|
+
inViewportChildren,
|
|
3788
3845
|
inViewportIndics,
|
|
3789
3846
|
top,
|
|
3790
3847
|
bottom,
|
|
@@ -3796,6 +3853,7 @@ class SlateEditable {
|
|
|
3796
3853
|
this.inViewportChildren = virtualView.inViewportChildren;
|
|
3797
3854
|
this.setVirtualSpaceHeight(virtualView.top, virtualView.bottom);
|
|
3798
3855
|
this.inViewportIndics = virtualView.inViewportIndics;
|
|
3856
|
+
this.setTopHeightDebugInfo(virtualView.top, this.inViewportIndics[0] - 1);
|
|
3799
3857
|
}
|
|
3800
3858
|
diffVirtualViewport(virtualView, stage = 'first') {
|
|
3801
3859
|
if (!this.inViewportChildren.length) {
|
|
@@ -4179,11 +4237,11 @@ class SlateEditable {
|
|
|
4179
4237
|
}
|
|
4180
4238
|
this.applyVirtualView(virtualView);
|
|
4181
4239
|
}
|
|
4182
|
-
const { preRenderingCount, childrenWithPreRendering, childrenWithPreRenderingIndics } = this.
|
|
4240
|
+
const { preRenderingCount, childrenWithPreRendering, childrenWithPreRenderingIndics } = this.appendPreRenderingToViewport(visibleStates);
|
|
4183
4241
|
this.listRender.update(childrenWithPreRendering, this.editor, this.context, preRenderingCount, childrenWithPreRenderingIndics);
|
|
4184
4242
|
const remeasureIndics = this.getChangedIndics(previousInViewportChildren);
|
|
4185
4243
|
if (remeasureIndics.length) {
|
|
4186
|
-
this.
|
|
4244
|
+
this.indicsOfNeedRemeasured$.next({ indics: remeasureIndics, tryUpdateViewport: true });
|
|
4187
4245
|
}
|
|
4188
4246
|
}
|
|
4189
4247
|
updateContext() {
|
|
@@ -5471,5 +5529,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
5471
5529
|
* Generated bundle index. Do not edit.
|
|
5472
5530
|
*/
|
|
5473
5531
|
|
|
5474
|
-
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,
|
|
5532
|
+
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, calculateAccumulatedTopHeight, 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, isSelectionInsideVoid, isTemplateRef, isValid, isValidNumber, measureHeightByIndics, normalize, roundTo, scrollToElement, setClipboardData, setDataTransferClipboard, setDataTransferClipboardText, setMinHeightByElement, setNavigatorClipboard, shallowCompare, stripHtml, withAngular };
|
|
5475
5533
|
//# sourceMappingURL=slate-angular.mjs.map
|