slate-angular 20.2.0-next.21 → 20.2.0-next.23
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 +29 -6
- package/fesm2022/slate-angular.mjs.map +1 -1
- package/index.d.ts +11 -2
- package/package.json +1 -1
|
@@ -3580,6 +3580,7 @@ class SlateEditable {
|
|
|
3580
3580
|
this.editorResizeObserver = new ResizeObserver(entries => {
|
|
3581
3581
|
if (entries.length > 0 && entries[0].contentRect.width !== editorResizeObserverRectWidth) {
|
|
3582
3582
|
editorResizeObserverRectWidth = entries[0].contentRect.width;
|
|
3583
|
+
this.keyHeightMap.clear();
|
|
3583
3584
|
const remeasureIndics = Array.from(this.inViewportIndics);
|
|
3584
3585
|
this.remeasureHeightByIndics(remeasureIndics);
|
|
3585
3586
|
}
|
|
@@ -3699,7 +3700,7 @@ class SlateEditable {
|
|
|
3699
3700
|
const totalHeight = accumulatedHeights[elementLength];
|
|
3700
3701
|
const maxScrollTop = Math.max(0, totalHeight - viewportHeight);
|
|
3701
3702
|
const limitedScrollTop = Math.min(adjustedScrollTop, maxScrollTop);
|
|
3702
|
-
const viewBottom = limitedScrollTop + viewportHeight
|
|
3703
|
+
const viewBottom = limitedScrollTop + viewportHeight;
|
|
3703
3704
|
let accumulatedOffset = 0;
|
|
3704
3705
|
let visibleStartIndex = -1;
|
|
3705
3706
|
const visible = [];
|
|
@@ -4790,16 +4791,35 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
4790
4791
|
}]
|
|
4791
4792
|
}], ctorParameters: () => [{ type: i0.ElementRef }] });
|
|
4792
4793
|
|
|
4794
|
+
class SlateString {
|
|
4795
|
+
ngOnInit() { }
|
|
4796
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateString, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
4797
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.12", type: SlateString, isStandalone: true, selector: "span[slateString]", inputs: { context: "context", viewContext: "viewContext" }, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
4798
|
+
}
|
|
4799
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateString, decorators: [{
|
|
4800
|
+
type: Component,
|
|
4801
|
+
args: [{
|
|
4802
|
+
selector: 'span[slateString]',
|
|
4803
|
+
template: '',
|
|
4804
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
4805
|
+
standalone: true
|
|
4806
|
+
}]
|
|
4807
|
+
}], propDecorators: { context: [{
|
|
4808
|
+
type: Input
|
|
4809
|
+
}], viewContext: [{
|
|
4810
|
+
type: Input
|
|
4811
|
+
}] } });
|
|
4812
|
+
|
|
4793
4813
|
class SlateModule {
|
|
4794
4814
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
4795
|
-
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: SlateModule, imports: [CommonModule, SlateEditable, SlateChildrenOutlet], exports: [SlateEditable, SlateChildrenOutlet] }); }
|
|
4815
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.12", ngImport: i0, type: SlateModule, imports: [CommonModule, SlateEditable, SlateChildrenOutlet, SlateString], exports: [SlateEditable, SlateChildrenOutlet, SlateString] }); }
|
|
4796
4816
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateModule, imports: [CommonModule] }); }
|
|
4797
4817
|
}
|
|
4798
4818
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: SlateModule, decorators: [{
|
|
4799
4819
|
type: NgModule,
|
|
4800
4820
|
args: [{
|
|
4801
|
-
imports: [CommonModule, SlateEditable, SlateChildrenOutlet],
|
|
4802
|
-
exports: [SlateEditable, SlateChildrenOutlet],
|
|
4821
|
+
imports: [CommonModule, SlateEditable, SlateChildrenOutlet, SlateString],
|
|
4822
|
+
exports: [SlateEditable, SlateChildrenOutlet, SlateString],
|
|
4803
4823
|
providers: []
|
|
4804
4824
|
}]
|
|
4805
4825
|
}] });
|
|
@@ -5029,6 +5049,9 @@ class BaseLeafComponent extends BaseComponent {
|
|
|
5029
5049
|
super(...arguments);
|
|
5030
5050
|
this.stringRender = null;
|
|
5031
5051
|
this.isSlateLeaf = true;
|
|
5052
|
+
this.getOutletParent = () => {
|
|
5053
|
+
return this.elementRef.nativeElement;
|
|
5054
|
+
};
|
|
5032
5055
|
}
|
|
5033
5056
|
get text() {
|
|
5034
5057
|
return this.context && this.context.text;
|
|
@@ -5043,7 +5066,7 @@ class BaseLeafComponent extends BaseComponent {
|
|
|
5043
5066
|
if (!this.initialized) {
|
|
5044
5067
|
this.stringRender = new SlateStringRender(this.context, this.viewContext);
|
|
5045
5068
|
const stringNode = this.stringRender.render();
|
|
5046
|
-
this.
|
|
5069
|
+
this.getOutletParent().appendChild(stringNode);
|
|
5047
5070
|
}
|
|
5048
5071
|
else {
|
|
5049
5072
|
this.stringRender?.update(this.context, this.viewContext);
|
|
@@ -5115,5 +5138,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImpo
|
|
|
5115
5138
|
* Generated bundle index. Do not edit.
|
|
5116
5139
|
*/
|
|
5117
5140
|
|
|
5118
|
-
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 };
|
|
5141
|
+
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 };
|
|
5119
5142
|
//# sourceMappingURL=slate-angular.mjs.map
|