@worktile/theia 19.4.2 → 19.5.0-next.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.
@@ -2,15 +2,12 @@ export * from './toolbar/toolbar.component';
2
2
  export * from './toolbar-dropdown/toolbar-dropdown.component';
3
3
  export * from './toolbar-group/toolbar-group.component';
4
4
  export * from './toolbar-item/toolbar-item.component';
5
- export * from './element/element.component';
6
5
  export * from './listbox/listbox';
7
6
  export * from './listbox/listbox.type';
8
7
  export * from './action/prevent-default';
9
8
  export * from './plugin-menu/plugin-menu.component';
10
9
  export * from './column-resize/column-resize-notifier';
11
10
  export * from './column-resize/event-dispatcher';
12
- export * from './template/template.component';
13
- export * from './text/text.component';
14
11
  export * from './action/prevent-default';
15
12
  export * from './inline-toolbar/inline-toolbar.component';
16
13
  export * from './conversion-hint/conversion-hint.component';
@@ -0,0 +1,8 @@
1
+ import { DefaultTextFlavour } from 'slate-angular';
2
+ export declare class TextFlavour extends DefaultTextFlavour {
3
+ excludes: string[];
4
+ attributes: any[];
5
+ render(): void;
6
+ applyRichtext(): void;
7
+ onContextChange(): void;
8
+ }
@@ -3,9 +3,10 @@ import { ThyIconRegistry } from 'ngx-tethys/icon';
3
3
  import { Descendant, Editor, Element, NodeEntry, Range, Text } from 'slate';
4
4
  import { SlateError } from 'slate-angular';
5
5
  import { DOMRange } from 'slate-dom';
6
- import { TheTemplate, TheText, TheToolbarComponent } from './components';
6
+ import { TheToolbarComponent } from './components';
7
7
  import { TheEditor, TheOptions, ThePresetConfig, ThePlugin, ToolbarEntity, DomEventDataInfo } from './interfaces';
8
8
  import { TheContextService } from './services/context.service';
9
+ import { TextFlavour } from './components/text/text.flavour';
9
10
  import * as i0 from "@angular/core";
10
11
  export declare class TheEditorComponent implements OnInit, OnChanges, OnDestroy {
11
12
  private cdr;
@@ -29,7 +30,6 @@ export declare class TheEditorComponent implements OnInit, OnChanges, OnDestroy
29
30
  }>;
30
31
  theEditorCreated: EventEmitter<Editor>;
31
32
  theUploadingStatus: EventEmitter<boolean>;
32
- templateInstance: TheTemplate;
33
33
  theEditableContainer: ElementRef<HTMLElement>;
34
34
  globalToolbarInstance: TheToolbarComponent;
35
35
  toolbarEntity: ToolbarEntity;
@@ -71,7 +71,7 @@ export declare class TheEditorComponent implements OnInit, OnChanges, OnDestroy
71
71
  private onErrorHandler;
72
72
  renderElement: (element: Element) => import("slate-angular").ViewType;
73
73
  renderLeaf: (text: Text) => import("slate-angular").ViewType;
74
- renderText: (text: Text) => typeof TheText;
74
+ renderText: (text: Text) => typeof TextFlavour;
75
75
  private generateDecorate;
76
76
  onKeyDown: (event: KeyboardEvent) => void;
77
77
  mousedown(event: MouseEvent): void;
@@ -1,6 +1,6 @@
1
1
  import { NgStyle, NgTemplateOutlet, NgClass, DOCUMENT } from '@angular/common';
2
2
  import * as i0 from '@angular/core';
3
- import { InjectionToken, Component, inject, signal, Injectable, computed, HostBinding, Input, Directive, ViewChild, HostListener, ViewContainerRef, Inject, TemplateRef, ChangeDetectionStrategy, forwardRef, ContentChildren, Optional, SkipSelf, EventEmitter, NgZone, ElementRef, DestroyRef, Output, Pipe, ChangeDetectorRef, Renderer2, viewChild, ViewChildren, Injector, NgModule } from '@angular/core';
3
+ import { InjectionToken, Component, inject, signal, Injectable, computed, HostBinding, Input, Directive, ViewChild, HostListener, ViewContainerRef, Inject, TemplateRef, forwardRef, ContentChildren, Optional, SkipSelf, EventEmitter, NgZone, ElementRef, DestroyRef, Output, Pipe, ChangeDetectorRef, Renderer2, ChangeDetectionStrategy, viewChild, ViewChildren, Injector, NgModule } from '@angular/core';
4
4
  import { ThyDivider } from 'ngx-tethys/divider';
5
5
  import { ThyAction, ThyActions } from 'ngx-tethys/action';
6
6
  import { ThyDropdownMenuItemDirective, ThyDropdownMenuDivider, ThyDropdownMenuItemNameDirective, ThyDropdownMenuItemIconDirective, ThyDropdownMenuItemActiveDirective, ThyDropdownMenuComponent, ThyDropdownMenuGroup, ThyDropdownDirective, ThyDropdownMenuItemExtendIconDirective } from 'ngx-tethys/dropdown';
@@ -10,7 +10,7 @@ import { cloneDeep, map, assign, defaults, groupBy, uniq, isEqual } from 'lodash
10
10
  export { assign, cloneDeep, debounce, defaults, groupBy, isEqual, map, uniq } from 'lodash';
11
11
  import { Editor, Element, Span, Range, Path, Node, Point, Text, Transforms, Operation, createEditor } from 'slate';
12
12
  import * as i4 from 'slate-angular';
13
- import { FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET, getClipboardData, AngularEditor, hotkeys, getPlainText as getPlainText$1, createClipboardData, setClipboardData, BaseElementComponent, IS_SAFARI, ELEMENT_TO_COMPONENT, BaseTextComponent, SlateModule, hasBlockCard, isCardLeft, SlateChildrenOutlet, defaultScrollSelectionIntoView, getDataTransferClipboard, withAngular } from 'slate-angular';
13
+ import { FAKE_LEFT_BLOCK_CARD_OFFSET, FAKE_RIGHT_BLOCK_CARD_OFFSET, getClipboardData, AngularEditor, hotkeys, getPlainText as getPlainText$1, createClipboardData, setClipboardData, BaseElementComponent, IS_SAFARI, ELEMENT_TO_COMPONENT, SlateModule, hasBlockCard, isCardLeft, SlateChildrenOutlet, BaseElementFlavour, DefaultTextFlavour, defaultScrollSelectionIntoView, getDataTransferClipboard, withAngular } from 'slate-angular';
14
14
  import { HistoryEditor, withHistory } from 'slate-history';
15
15
  import { NODE_TO_PARENT, NODE_TO_INDEX, NODE_TO_ELEMENT, EDITOR_TO_ELEMENT } from 'slate-dom';
16
16
  import { TheiaConverter } from '@atinc/selene';
@@ -4453,26 +4453,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
4453
4453
  args: ['click', ['$event']]
4454
4454
  }] } });
4455
4455
 
4456
- class TheDefaultElement extends TheBaseElement {
4457
- get indent() {
4458
- return this.element?.indent;
4459
- }
4460
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TheDefaultElement, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
4461
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TheDefaultElement, isStandalone: true, selector: "[theDefaultElement]", host: { properties: { "attr.the-indent": "this.indent" } }, usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
4462
- }
4463
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TheDefaultElement, decorators: [{
4464
- type: Component,
4465
- args: [{
4466
- selector: '[theDefaultElement]',
4467
- template: '',
4468
- changeDetection: ChangeDetectionStrategy.OnPush,
4469
- standalone: true
4470
- }]
4471
- }], propDecorators: { indent: [{
4472
- type: HostBinding,
4473
- args: ['attr.the-indent']
4474
- }] } });
4475
-
4476
4456
  const THE_LISTBOX_PARENT_OPTION_TOKEN = new InjectionToken('THE_LISTBOX_PARENT_OPTION_TOKEN');
4477
4457
  const THE_LISTBOX_PARENT_GROUP_TOKEN = new InjectionToken('THE_LISTBOX_PARENT_GROUP_TOKEN');
4478
4458
  const THE_LISTBOX_TOKEN = new InjectionToken('THE_LISTBOX_TOKEN');
@@ -8661,157 +8641,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
8661
8641
  type: Injectable
8662
8642
  }], ctorParameters: () => [{ type: i0.NgZone }] });
8663
8643
 
8664
- class TheHeadingElement extends TheBaseElement {
8665
- constructor() {
8666
- super(...arguments);
8667
- this.beforeContextChange = (value) => {
8668
- const isHeading = isStandardHeadingElement(value.element);
8669
- if (isHeading && this.element && value.element !== this.element) {
8670
- if (value.element.isCollapsed !== this.element.isCollapsed) {
8671
- const followElements = getFollowElements(this.editor, value.element);
8672
- // 一旦内容发生变化会出现 targetDom get undefined 的情况,所以等一个 setTimeout 周期
8673
- setTimeout(() => {
8674
- followElements.forEach(el => {
8675
- const isVisible = this.editor.isVisible(el);
8676
- toggleHeadingRelatedElement(this.editor, el, isVisible);
8677
- });
8678
- }, 0);
8679
- }
8680
- }
8681
- };
8682
- }
8683
- ngOnInit() {
8684
- super.ngOnInit();
8685
- if (this.element && isStandardHeadingElement(this.element) && this.element.isCollapsed) {
8686
- const followElements = getFollowElements(this.editor, this.element);
8687
- // 处理删除后撤销场景
8688
- followElements.forEach(el => {
8689
- toggleHeadingRelatedElement(this.editor, el, false);
8690
- });
8691
- }
8692
- }
8693
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TheHeadingElement, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
8694
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TheHeadingElement, isStandalone: true, selector: "[theHeadingElement]", usesInheritance: true, ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8695
- }
8696
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TheHeadingElement, decorators: [{
8697
- type: Component,
8698
- args: [{
8699
- selector: '[theHeadingElement]',
8700
- template: '',
8701
- changeDetection: ChangeDetectionStrategy.OnPush,
8702
- standalone: true
8703
- }]
8704
- }] });
8705
-
8706
- class TheTemplate {
8707
- constructor() {
8708
- this.renderElement = (element) => {
8709
- if (element.type === ElementKinds.default) {
8710
- return this.paragraphTemplate;
8711
- }
8712
- if (element.type === ElementKinds.heading_1) {
8713
- return this.headingOneTemplate;
8714
- }
8715
- if (element.type === ElementKinds.heading_2) {
8716
- return this.headingTwoTemplate;
8717
- }
8718
- if (element.type === ElementKinds.heading_3) {
8719
- return this.headingThreeTemplate;
8720
- }
8721
- if (element.type === ElementKinds.heading_4) {
8722
- return this.headingFourTemplate;
8723
- }
8724
- if (element.type === ElementKinds.heading_5) {
8725
- return this.headingFiveTemplate;
8726
- }
8727
- if (element.type === ElementKinds.heading_6) {
8728
- return this.headingSixTemplate;
8729
- }
8730
- return null;
8731
- };
8732
- }
8733
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TheTemplate, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
8734
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TheTemplate, isStandalone: true, selector: "the-template,[theTemplate]", viewQueries: [{ propertyName: "paragraphTemplate", first: true, predicate: ["paragraph"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingOneTemplate", first: true, predicate: ["headingOne"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingTwoTemplate", first: true, predicate: ["headingTwo"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingThreeTemplate", first: true, predicate: ["headingThree"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingFourTemplate", first: true, predicate: ["headingFour"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingFiveTemplate", first: true, predicate: ["headingFive"], descendants: true, read: TemplateRef, static: true }, { propertyName: "headingSixTemplate", first: true, predicate: ["headingSix"], descendants: true, read: TemplateRef, static: true }], ngImport: i0, template: "<ng-template #paragraph let-context=\"context\" let-viewContext=\"viewContext\">\n <div theDefaultElement [context]=\"context\" [viewContext]=\"viewContext\" [ngStyle]=\"context.element | elementStyle\"></div>\n</ng-template>\n<ng-template #headingOne let-context=\"context\" let-viewContext=\"viewContext\">\n <h1\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h1>\n</ng-template>\n<ng-template #headingTwo let-context=\"context\" let-viewContext=\"viewContext\">\n <h2\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h2>\n</ng-template>\n<ng-template #headingThree let-context=\"context\" let-viewContext=\"viewContext\">\n <h3\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h3>\n</ng-template>\n<ng-template #headingFour let-context=\"context\" let-viewContext=\"viewContext\">\n <h4\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h4>\n</ng-template>\n<ng-template #headingFive let-context=\"context\" let-viewContext=\"viewContext\">\n <h5\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h5>\n</ng-template>\n<ng-template #headingSix let-context=\"context\" let-viewContext=\"viewContext\">\n <h6\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h6>\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "pipe", type: ElementStylePipe, name: "elementStyle" }, { kind: "component", type: TheDefaultElement, selector: "[theDefaultElement]" }, { kind: "component", type: TheHeadingElement, selector: "[theHeadingElement]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
8735
- }
8736
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TheTemplate, decorators: [{
8737
- type: Component,
8738
- args: [{ selector: 'the-template,[theTemplate]', changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgStyle, ElementStylePipe, TheDefaultElement, TheHeadingElement], template: "<ng-template #paragraph let-context=\"context\" let-viewContext=\"viewContext\">\n <div theDefaultElement [context]=\"context\" [viewContext]=\"viewContext\" [ngStyle]=\"context.element | elementStyle\"></div>\n</ng-template>\n<ng-template #headingOne let-context=\"context\" let-viewContext=\"viewContext\">\n <h1\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h1>\n</ng-template>\n<ng-template #headingTwo let-context=\"context\" let-viewContext=\"viewContext\">\n <h2\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h2>\n</ng-template>\n<ng-template #headingThree let-context=\"context\" let-viewContext=\"viewContext\">\n <h3\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h3>\n</ng-template>\n<ng-template #headingFour let-context=\"context\" let-viewContext=\"viewContext\">\n <h4\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h4>\n</ng-template>\n<ng-template #headingFive let-context=\"context\" let-viewContext=\"viewContext\">\n <h5\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h5>\n</ng-template>\n<ng-template #headingSix let-context=\"context\" let-viewContext=\"viewContext\">\n <h6\n theHeadingElement\n [context]=\"context\"\n [viewContext]=\"viewContext\"\n [attr.id]=\"context.element.key\"\n [ngStyle]=\"context.element | elementStyle\"\n ></h6>\n</ng-template>\n" }]
8739
- }], propDecorators: { paragraphTemplate: [{
8740
- type: ViewChild,
8741
- args: ['paragraph', { read: TemplateRef, static: true }]
8742
- }], headingOneTemplate: [{
8743
- type: ViewChild,
8744
- args: ['headingOne', { read: TemplateRef, static: true }]
8745
- }], headingTwoTemplate: [{
8746
- type: ViewChild,
8747
- args: ['headingTwo', { read: TemplateRef, static: true }]
8748
- }], headingThreeTemplate: [{
8749
- type: ViewChild,
8750
- args: ['headingThree', { read: TemplateRef, static: true }]
8751
- }], headingFourTemplate: [{
8752
- type: ViewChild,
8753
- args: ['headingFour', { read: TemplateRef, static: true }]
8754
- }], headingFiveTemplate: [{
8755
- type: ViewChild,
8756
- args: ['headingFive', { read: TemplateRef, static: true }]
8757
- }], headingSixTemplate: [{
8758
- type: ViewChild,
8759
- args: ['headingSix', { read: TemplateRef, static: true }]
8760
- }] } });
8761
-
8762
- class TheText extends BaseTextComponent {
8763
- constructor() {
8764
- super(...arguments);
8765
- this.excludes = ['color', 'font-size', 'background-color', 'text'];
8766
- this.attributes = [];
8767
- this.renderer2 = inject(Renderer2);
8768
- }
8769
- onContextChange() {
8770
- super.onContextChange();
8771
- this.applyTextMark();
8772
- }
8773
- applyTextMark() {
8774
- this.attributes.forEach(attr => {
8775
- this.renderer2.removeAttribute(this.elementRef.nativeElement, attr);
8776
- });
8777
- this.attributes = [];
8778
- for (const key in this.text) {
8779
- if (Object.prototype.hasOwnProperty.call(this.text, key) && !this.excludes.includes(key) && !!this.text[key]) {
8780
- const attr = `the-${key}`;
8781
- this.renderer2.setAttribute(this.elementRef.nativeElement, attr, 'true');
8782
- this.attributes.push(attr);
8783
- }
8784
- }
8785
- const fontSize = this.text[MarkTypes.fontSize];
8786
- this.renderer2.setAttribute(this.elementRef.nativeElement, `the-${MarkTypes.fontSize}`, fontSize ? fontSize : null);
8787
- if (this.text[MarkTypes.color]) {
8788
- this.renderer2.setStyle(this.elementRef.nativeElement, 'color', this.text[MarkTypes.color]);
8789
- }
8790
- else {
8791
- this.renderer2.removeStyle(this.elementRef.nativeElement, 'color');
8792
- }
8793
- if (this.text[MarkTypes.backgroundColor]) {
8794
- this.renderer2.setStyle(this.elementRef.nativeElement, 'background-color', this.text[MarkTypes.backgroundColor]);
8795
- }
8796
- else {
8797
- this.renderer2.removeStyle(this.elementRef.nativeElement, 'background-color');
8798
- }
8799
- }
8800
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TheText, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
8801
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.14", type: TheText, isStandalone: true, selector: "span[theText]", host: { attributes: { "data-slate-node": "text" } }, usesInheritance: true, ngImport: i0, template: ``, isInline: true }); }
8802
- }
8803
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TheText, decorators: [{
8804
- type: Component,
8805
- args: [{
8806
- selector: 'span[theText]',
8807
- template: ``,
8808
- host: {
8809
- 'data-slate-node': 'text'
8810
- },
8811
- standalone: true
8812
- }]
8813
- }] });
8814
-
8815
8644
  class TheInlineToolbar {
8816
8645
  constructor(elementRef, scrollDispatcher, cdr, ngZone, contextService) {
8817
8646
  this.elementRef = elementRef;
@@ -18256,6 +18085,191 @@ const shortcuts = (editor, event) => {
18256
18085
  markShortcuts(editor, event);
18257
18086
  };
18258
18087
 
18088
+ class TheBaseFlavourElement extends BaseElementFlavour {
18089
+ toggleClassNames() {
18090
+ if (this.selection && this.editor && this.editor.isVoid(this.element)) {
18091
+ this.nativeElement.classList.add(`slate-selected-element`);
18092
+ if (this.isCollapsed && isGlobalCollapsed(this.editor)) {
18093
+ this.nativeElement.classList.add(`slate-focus-element`);
18094
+ }
18095
+ else {
18096
+ this.nativeElement.classList.remove(`slate-focus-element`);
18097
+ }
18098
+ }
18099
+ else {
18100
+ this.nativeElement.classList.remove(`slate-selected-element`);
18101
+ this.nativeElement.classList.remove(`slate-focus-element`);
18102
+ }
18103
+ }
18104
+ toggleIndent() {
18105
+ if (this.element?.indent) {
18106
+ this.nativeElement.setAttribute('the-indent', this.element.indent.toString());
18107
+ }
18108
+ else {
18109
+ this.nativeElement.removeAttribute('the-indent');
18110
+ }
18111
+ }
18112
+ toggleStyles() {
18113
+ if (this.element?.align) {
18114
+ this.nativeElement.style.textAlign = this.element.align;
18115
+ }
18116
+ else {
18117
+ this.nativeElement.style.textAlign = '';
18118
+ }
18119
+ if (this.element?.textIndent) {
18120
+ this.nativeElement.style.textIndent = this.element.textIndent + 'em';
18121
+ }
18122
+ else {
18123
+ this.nativeElement.style.textIndent = '';
18124
+ }
18125
+ }
18126
+ render() {
18127
+ this.context.attributes['data-slate-key'] = this.context.element.key;
18128
+ const nativeElement = this.createNativeElement();
18129
+ this.nativeElement = nativeElement;
18130
+ const blockClass = this.editor.isInline(this.element) ? 'slate-inline-block' : 'slate-block';
18131
+ this.nativeElement.classList.add(`slate-element-${this.element.type}`, blockClass);
18132
+ this.toggleClassNames();
18133
+ this.toggleStyles();
18134
+ }
18135
+ onInit() {
18136
+ super.onInit();
18137
+ if (this.editor) {
18138
+ const isVisible = this.editor.isVisible(this.element);
18139
+ const isBlockCard = this.editor.isBlockCard(this.element);
18140
+ if (!isVisible) {
18141
+ if (isBlockCard) {
18142
+ setTimeout(() => {
18143
+ toggleHeadingRelatedElement(this.editor, this.element, isVisible);
18144
+ }, 0);
18145
+ }
18146
+ else {
18147
+ toggleHeadingRelatedElement(this.editor, this.element, isVisible);
18148
+ }
18149
+ }
18150
+ }
18151
+ }
18152
+ rerender() {
18153
+ this.toggleClassNames();
18154
+ this.toggleStyles();
18155
+ }
18156
+ }
18157
+
18158
+ class ParagraphFlavour extends TheBaseFlavourElement {
18159
+ render() {
18160
+ super.render();
18161
+ this.toggleIndent();
18162
+ }
18163
+ rerender() {
18164
+ super.rerender();
18165
+ this.toggleIndent();
18166
+ }
18167
+ createNativeElement() {
18168
+ return document.createElement('div');
18169
+ }
18170
+ }
18171
+
18172
+ class HeadingFlavour extends TheBaseFlavourElement {
18173
+ constructor() {
18174
+ super(...arguments);
18175
+ this.beforeContextChange = (value) => {
18176
+ const isHeading = isStandardHeadingElement(value.element);
18177
+ if (isHeading && this.element && value.element !== this.element) {
18178
+ if (value.element.isCollapsed !== this.element.isCollapsed) {
18179
+ const followElements = getFollowElements(this.editor, value.element);
18180
+ // 一旦内容发生变化会出现 targetDom get undefined 的情况,所以等一个 setTimeout 周期
18181
+ setTimeout(() => {
18182
+ followElements.forEach(el => {
18183
+ const isVisible = this.editor.isVisible(el);
18184
+ toggleHeadingRelatedElement(this.editor, el, isVisible);
18185
+ });
18186
+ }, 0);
18187
+ }
18188
+ }
18189
+ };
18190
+ }
18191
+ render() {
18192
+ super.render();
18193
+ this.nativeElement.setAttribute('id', this.element.key || '');
18194
+ }
18195
+ onInit() {
18196
+ super.onInit();
18197
+ if (this.element && isStandardHeadingElement(this.element) && this.element.isCollapsed) {
18198
+ const followElements = getFollowElements(this.editor, this.element);
18199
+ // 处理删除后撤销场景
18200
+ followElements.forEach(el => {
18201
+ toggleHeadingRelatedElement(this.editor, el, false);
18202
+ });
18203
+ }
18204
+ }
18205
+ createNativeElement() {
18206
+ const type = this.element.type;
18207
+ switch (type) {
18208
+ case 'heading-one':
18209
+ return this.createHeadingElement(1);
18210
+ case 'heading-two':
18211
+ return this.createHeadingElement(2);
18212
+ case 'heading-three':
18213
+ return this.createHeadingElement(3);
18214
+ case 'heading-four':
18215
+ return this.createHeadingElement(4);
18216
+ case 'heading-five':
18217
+ return this.createHeadingElement(5);
18218
+ case 'heading-six':
18219
+ return this.createHeadingElement(6);
18220
+ }
18221
+ return document.createElement('div');
18222
+ }
18223
+ createHeadingElement(level) {
18224
+ return document.createElement(`h${level}`);
18225
+ }
18226
+ }
18227
+
18228
+ class TextFlavour extends DefaultTextFlavour {
18229
+ constructor() {
18230
+ super(...arguments);
18231
+ this.excludes = ['color', 'font-size', 'background-color', 'text'];
18232
+ this.attributes = [];
18233
+ }
18234
+ render() {
18235
+ super.render();
18236
+ this.applyRichtext();
18237
+ }
18238
+ applyRichtext() {
18239
+ this.attributes.forEach(attr => {
18240
+ this.nativeElement.removeAttribute(attr);
18241
+ });
18242
+ this.attributes = [];
18243
+ for (const key in this.text) {
18244
+ if (Object.prototype.hasOwnProperty.call(this.text, key) && !this.excludes.includes(key) && !!this.text[key]) {
18245
+ const attr = `the-${key}`;
18246
+ this.nativeElement.setAttribute(attr, 'true');
18247
+ this.attributes.push(attr);
18248
+ }
18249
+ }
18250
+ const fontSize = this.text[MarkTypes.fontSize];
18251
+ this.nativeElement.setAttribute(`the-${MarkTypes.fontSize}`, fontSize ? fontSize : null);
18252
+ if (this.text[MarkTypes.color]) {
18253
+ this.nativeElement.style.color = this.text[MarkTypes.color];
18254
+ }
18255
+ else {
18256
+ this.nativeElement.style.color = '';
18257
+ }
18258
+ if (this.text[MarkTypes.backgroundColor]) {
18259
+ this.nativeElement.style.backgroundColor = this.text[MarkTypes.backgroundColor];
18260
+ }
18261
+ else {
18262
+ this.nativeElement.style.backgroundColor = '';
18263
+ }
18264
+ }
18265
+ onContextChange() {
18266
+ super.onContextChange();
18267
+ if (this.initialized) {
18268
+ this.applyRichtext();
18269
+ }
18270
+ }
18271
+ }
18272
+
18259
18273
  class TheEditorComponent {
18260
18274
  get options() {
18261
18275
  return this.editor?.options;
@@ -18295,18 +18309,26 @@ class TheEditorComponent {
18295
18309
  defaultScrollSelectionIntoView(e, domRange);
18296
18310
  };
18297
18311
  this.renderElement = (element) => {
18298
- const template = this.templateInstance.renderElement(element);
18299
18312
  const component = this.editor.renderElement(element);
18300
- return component ? component : template;
18313
+ if (component) {
18314
+ return component;
18315
+ }
18316
+ if (element.type === 'paragraph') {
18317
+ return ParagraphFlavour;
18318
+ }
18319
+ if (isHeadingElement(element)) {
18320
+ return HeadingFlavour;
18321
+ }
18322
+ return null;
18301
18323
  };
18302
18324
  this.renderLeaf = (text) => {
18303
18325
  const leaf = this.editor.renderLeaf(text);
18304
- return leaf ? leaf : null;
18326
+ return leaf;
18305
18327
  };
18306
18328
  this.renderText = (text) => {
18307
18329
  for (const key in MarkTypes) {
18308
18330
  if (text[MarkTypes[key]]) {
18309
- return TheText;
18331
+ return TextFlavour;
18310
18332
  }
18311
18333
  }
18312
18334
  if (text.text.length === 0) {
@@ -18652,7 +18674,7 @@ class TheEditorComponent {
18652
18674
  useExisting: forwardRef(() => TheEditorComponent),
18653
18675
  multi: true
18654
18676
  }
18655
- ], viewQueries: [{ propertyName: "templateInstance", first: true, predicate: ["templateInstance"], descendants: true, static: true }, { propertyName: "theEditableContainer", first: true, predicate: ["theEditableContainer"], descendants: true, read: ElementRef, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (!options?.readonly && !theGlobalToolbar && !isMobileMode) {\n <the-toolbar\n [ngClass]=\"{\n 'the-toolbar-disabled': options?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"options?.toolbar?.align\"\n ></the-toolbar>\n}\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': options?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [isStrictDecorate]=\"false\"\n [decorate]=\"decorate\"\n [placeholder]=\"options?.placeholder\"\n [placeholderDecorate]=\"options?.placeholderDecorate ? options?.placeholderDecorate : null\"\n [readonly]=\"options?.readonly || options?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [beforeInput]=\"onSlaBeforeInput\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n [scrollSelectionIntoView]=\"scrollSelectionIntoView\"\n (ngModelChange)=\"valueChange($event)\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n\n @if (!isMobileMode) {\n @if (!options?.readonly && options?.inlineToolbarVisible) {\n <the-inline-toolbar [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n }\n @if (!options?.readonly) {\n <div theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n }\n }\n\n <the-template #templateInstance></the-template>\n</div>\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SlateModule }, { kind: "component", type: i4.SlateEditable, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "scrollSelectionIntoView", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionUpdate", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { kind: "component", type: TheTemplate, selector: "the-template,[theTemplate]" }, { kind: "component", type: TheQuickInsert, selector: "[theQuickInsert]", inputs: ["editor", "isVisible"] }, { kind: "component", type: TheInlineToolbar, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { kind: "component", type: ThyImageGroup, selector: "thy-image-group, [thyImageGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18677
+ ], viewQueries: [{ propertyName: "theEditableContainer", first: true, predicate: ["theEditableContainer"], descendants: true, read: ElementRef, static: true }, { propertyName: "globalToolbarInstance", first: true, predicate: ["globalToolbar"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (!options?.readonly && !theGlobalToolbar && !isMobileMode) {\n <the-toolbar\n [ngClass]=\"{\n 'the-toolbar-disabled': options?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"options?.toolbar?.align\"\n ></the-toolbar>\n}\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': options?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [isStrictDecorate]=\"false\"\n [decorate]=\"decorate\"\n [placeholder]=\"options?.placeholder\"\n [placeholderDecorate]=\"options?.placeholderDecorate ? options?.placeholderDecorate : null\"\n [readonly]=\"options?.readonly || options?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [beforeInput]=\"onSlaBeforeInput\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n [scrollSelectionIntoView]=\"scrollSelectionIntoView\"\n (ngModelChange)=\"valueChange($event)\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n\n @if (!isMobileMode) {\n @if (!options?.readonly && options?.inlineToolbarVisible) {\n <the-inline-toolbar [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n }\n @if (!options?.readonly) {\n <div theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n }\n }\n</div>\n", dependencies: [{ kind: "directive", type: NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: SlateModule }, { kind: "component", type: i4.SlateEditable, selector: "slate-editable", inputs: ["editor", "renderElement", "renderLeaf", "renderText", "decorate", "placeholderDecorate", "scrollSelectionIntoView", "isStrictDecorate", "trackBy", "readonly", "placeholder", "beforeInput", "blur", "click", "compositionEnd", "compositionUpdate", "compositionStart", "copy", "cut", "dragOver", "dragStart", "dragEnd", "drop", "focus", "keydown", "paste", "spellCheck", "autoCorrect", "autoCapitalize"] }, { kind: "component", type: TheQuickInsert, selector: "[theQuickInsert]", inputs: ["editor", "isVisible"] }, { kind: "component", type: TheInlineToolbar, selector: "the-inline-toolbar", inputs: ["editor", "toolbarItems"] }, { kind: "component", type: TheToolbarComponent, selector: "the-toolbar", inputs: ["editor", "toolbarItems", "align", "containerClass", "isMore", "afterTemplate"] }, { kind: "component", type: ThyImageGroup, selector: "thy-image-group, [thyImageGroup]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
18656
18678
  }
18657
18679
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImport: i0, type: TheEditorComponent, decorators: [{
18658
18680
  type: Component,
@@ -18660,17 +18682,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
18660
18682
  class: 'the-editor',
18661
18683
  '[class.the-editor-readonly]': 'editor.options?.readonly',
18662
18684
  '[class.the-mobile-editor]': 'isMobileMode'
18663
- }, changeDetection: ChangeDetectionStrategy.OnPush, imports: [
18664
- NgStyle,
18665
- NgClass,
18666
- FormsModule,
18667
- SlateModule,
18668
- TheTemplate,
18669
- TheQuickInsert,
18670
- TheInlineToolbar,
18671
- TheToolbarComponent,
18672
- ThyImageGroup
18673
- ], providers: [
18685
+ }, changeDetection: ChangeDetectionStrategy.OnPush, imports: [NgStyle, NgClass, FormsModule, SlateModule, TheQuickInsert, TheInlineToolbar, TheToolbarComponent, ThyImageGroup], providers: [
18674
18686
  TheContextService,
18675
18687
  {
18676
18688
  provide: TheToolbarGroupToken,
@@ -18681,7 +18693,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
18681
18693
  useExisting: forwardRef(() => TheEditorComponent),
18682
18694
  multi: true
18683
18695
  }
18684
- ], template: "@if (!options?.readonly && !theGlobalToolbar && !isMobileMode) {\n <the-toolbar\n [ngClass]=\"{\n 'the-toolbar-disabled': options?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"options?.toolbar?.align\"\n ></the-toolbar>\n}\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': options?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [isStrictDecorate]=\"false\"\n [decorate]=\"decorate\"\n [placeholder]=\"options?.placeholder\"\n [placeholderDecorate]=\"options?.placeholderDecorate ? options?.placeholderDecorate : null\"\n [readonly]=\"options?.readonly || options?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [beforeInput]=\"onSlaBeforeInput\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n [scrollSelectionIntoView]=\"scrollSelectionIntoView\"\n (ngModelChange)=\"valueChange($event)\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n\n @if (!isMobileMode) {\n @if (!options?.readonly && options?.inlineToolbarVisible) {\n <the-inline-toolbar [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n }\n @if (!options?.readonly) {\n <div theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n }\n }\n\n <the-template #templateInstance></the-template>\n</div>\n" }]
18696
+ ], template: "@if (!options?.readonly && !theGlobalToolbar && !isMobileMode) {\n <the-toolbar\n [ngClass]=\"{\n 'the-toolbar-disabled': options?.disabled\n }\"\n #globalToolbar\n [editor]=\"editor\"\n [toolbarItems]=\"toolbarEntity.global\"\n [containerClass]=\"globalToolbarClass\"\n [align]=\"options?.toolbar?.align\"\n ></the-toolbar>\n}\n\n<div\n #theEditableContainer\n class=\"the-editable-container\"\n thyImageGroup\n [ngClass]=\"{\n 'the-editor-disabled': options?.disabled,\n 'max-height': maxHeight\n }\"\n [ngStyle]=\"{ 'max-height': maxHeight }\"\n>\n <slate-editable\n class=\"the-editor-typo\"\n [editor]=\"editor\"\n [ngModel]=\"editorValue\"\n [renderElement]=\"renderElement\"\n [renderText]=\"renderText\"\n [renderLeaf]=\"renderLeaf\"\n [isStrictDecorate]=\"false\"\n [decorate]=\"decorate\"\n [placeholder]=\"options?.placeholder\"\n [placeholderDecorate]=\"options?.placeholderDecorate ? options?.placeholderDecorate : null\"\n [readonly]=\"options?.readonly || options?.disabled\"\n [keydown]=\"onKeyDown\"\n [click]=\"onClick\"\n [paste]=\"onSlaPaste\"\n [blur]=\"onSlaBlur\"\n [focus]=\"onSlaFocus\"\n [copy]=\"onSlaCopy\"\n [cut]=\"onSlaCut\"\n [beforeInput]=\"onSlaBeforeInput\"\n [compositionStart]=\"onSlaCompositionStart\"\n [compositionEnd]=\"onSlaCompositionEnd\"\n [dragStart]=\"onSlaDragStart\"\n [dragOver]=\"onSlaDragOver\"\n [drop]=\"onDrop\"\n [scrollSelectionIntoView]=\"scrollSelectionIntoView\"\n (ngModelChange)=\"valueChange($event)\"\n (mousedown)=\"mousedown($event)\"\n ></slate-editable>\n\n @if (!isMobileMode) {\n @if (!options?.readonly && options?.inlineToolbarVisible) {\n <the-inline-toolbar [editor]=\"editor\" [toolbarItems]=\"toolbarEntity.inline\"></the-inline-toolbar>\n }\n @if (!options?.readonly) {\n <div theQuickInsert [editor]=\"editor\" [isVisible]=\"visibleQuickInsertPlus\"></div>\n }\n }\n</div>\n" }]
18685
18697
  }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i0.DestroyRef }, { type: i0.ElementRef }, { type: i0.Injector }, { type: i0.NgZone }, { type: i0.ViewContainerRef }, { type: TheContextService }, { type: i2$5.ThyIconRegistry }, { type: undefined, decorators: [{
18686
18698
  type: Optional
18687
18699
  }, {
@@ -18705,9 +18717,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.14", ngImpo
18705
18717
  type: Output
18706
18718
  }], theUploadingStatus: [{
18707
18719
  type: Output
18708
- }], templateInstance: [{
18709
- type: ViewChild,
18710
- args: ['templateInstance', { static: true }]
18711
18720
  }], theEditableContainer: [{
18712
18721
  type: ViewChild,
18713
18722
  args: ['theEditableContainer', { static: true, read: ElementRef }]
@@ -18982,5 +18991,5 @@ const withTestPlugin = (plugins, initValue) => {
18982
18991
  * Generated bundle index. Do not edit.
18983
18992
  */
18984
18993
 
18985
- export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BLOCK_HIDDEN_CLASS, BasicTest, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, ColumnResizeNotifierSource, ColumnResizingStore, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DataTransferFaker, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DropdownMode, ELEMENT_UNIQUE_ID, EditorPresetConfigFactoryMock, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeaderLevelMap, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LOWEST_TEXT_CONTAINER_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QUICK_INSERT_HOTKEY, QuickInsertEditor, ResizeRef, SLA_TABLE_CELL_SELECTOR, SLA_TABLE_SELECTOR, STANDARD_HEADING_TYPES, ScrollDirection, SpecialBackgroundColor, TAB_SPACE, THE_EDITOR_BG_COLOR, THE_EDITOR_COLOR, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_I18N_DE_DE, THE_I18N_EN_US, THE_I18N_JA_JP, THE_I18N_LOCALE_ID, THE_I18N_RU_RU, THE_I18N_ZH_HANS, THE_I18N_ZH_HANT, THE_IMAGE_SERVICE_TOKEN, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_PRESET_CONFIG_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TablePosition, TheBaseElement, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheColumnResizeDirective, TheColumnResizeOverlayHandle, TheContextMenu, TheContextService, TheConversionHint, TheDataMode, TheDefaultElement, TheEditor, TheEditorComponent, TheEditorModule, TheI18nService, TheImage, TheInlineToolbar, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheLocaleType, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheQuickInsert, TheTableSelect, TheTemplate, TheText, TheToolbarComponent, TheToolbarDropdown, TheToolbarGroup, TheToolbarGroupToken, TheToolbarItem, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, bottomLeftPosition, bottomRightPosition, buildPluginMenu, buildPluginMenuItemMap, buildQuickInsertMenus, calcPrintColumnWidth, calcSpanForColumn, calcSpanForRow, calculateHeaderRowHeight, calculateRowControls, coercePixelsFromCssValue, combinePlugins, copyNode, createCell, createEmptyContent, createEmptyParagraph, createMentionPlugin, createPluginFactory, createRow, createTable, createTablePosition, createTest1Plugin, createTestPlugin, createToolbar, createVerticalAlignPlugin, customPluginMock, customPluginMockKey, dataDeserialize, dataSerializing, deDeLocale, deleteElementKey, enUsLocale, errorImageUrlMock, expandPreviousHeadings, extractFragment, extractFragmentByHTML, filterTextFormat, fixBlockWithoutParagraph, fixBlockWithoutText, flattenDeepPlugins, getCellPositionsFromRange, getCollapsedStandardHeadingAbove, getColsTotalWidth, getColumnsWidth, getDirtyElements, getEditorScrollContainer, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getFollowElements, getGridColumns, getMode, getNextCell, getOriginCell, getPlugin, getPluginOptions, getPlugins, getPreviousRelatedHeadingElements, getRowsTotalHeight, getSelectCellNode, getSelectedCellPositions, getStartBlock, getTableByCell, getTableByRow, getTheDefaultPluginMenu, getToolbarClass, hasHeaderRow, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, injectTranslations, insertDataByInvalidType, internalPlugins, isCleanEmptyParagraph, isColorIndicator, isColorInput, isColorPanel, isDirectionKeydown, isHeadingElement, isInside, isMobileMode, isPrintMode, isPureEmptyParagraph, isRangeInTable, isRectangularInTableCells, isSelectedAllCell, isSelectionInTable, isStandardHeadingElement, isStandardHeadingElementByType, isUrl, isVirtualKey, jaJpLocale, matchOptions, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, normalizeValue, originOptions, plainToTheia, pluginKey, pluginKey1, pluginsByKey, reSelection, recursionNodes, refocus, ruRuLocale, setClipboardDataByDom, setEditorUUID, theTethysIconRegistryFaker, toggleHeadingRelatedElement, topLeftPosition, topRightPosition, uniqueCellPosition, updatePopoverPosition, useElementStyle, withMention, withTestPlugin, withTheia, zhHansLocale, zhHantLocale };
18994
+ export { ALIGN_BLOCK_TYPES, A_TAG_REL_ATTR, AlignEditor, Alignment, BLOCK_DELETE_BACKWARD_TYPES, BLOCK_HIDDEN_CLASS, BasicTest, BlockquoteEditor, CLIPBOARD_FORMAT_KEY, CODEMIRROR_PADDING_TOP, CODE_MODES, CONTAINER_BLOCKS, CONTROL_KEY, CodeEditor, ColorEditor, ColumnResizeNotifierSource, ColumnResizingStore, DEFAULT_LANGUAGE, DEFAULT_SCROLL_CONTAINER, DISABLED_OPERATE_TYPES, DataTransferFaker, DefaultElementOptions, DefaultGlobalToolbarDefinition, DefaultInlineToolbarDefinition, DropdownMode, ELEMENT_UNIQUE_ID, EditorPresetConfigFactoryMock, ElementKinds, ErrorCodes, FontSizeTypes, FontSizes, HEADING_TYPES, HeaderLevelMap, HeadingEditor, HoveredCellInfo, HrEditor, IS_MAC, ImageEditor, IndentEditor, Indents, InlineCodeEditor, LINK_DEFAULT_TEXT, LIST_BLOCK_TYPES, LOWEST_TEXT_CONTAINER_TYPES, LayoutTypes, LinkEditor, ListEditor, MarkEditor, MarkProps, MarkTypes, MentionEditor, PICTURE_ACCEPTED_UPLOAD_MIME, PICTURE_ACCEPTED_UPLOAD_SIZE, PluginKeys, PluginMenuIcons, PluginMenuSvgs, Position, QUICK_INSERT_HOTKEY, QuickInsertEditor, ResizeRef, SLA_TABLE_CELL_SELECTOR, SLA_TABLE_SELECTOR, STANDARD_HEADING_TYPES, ScrollDirection, SpecialBackgroundColor, TAB_SPACE, THE_EDITOR_BG_COLOR, THE_EDITOR_COLOR, THE_EDITOR_CONVERSION_HINT_REF, THE_EDITOR_ORIGIN_ANCHOR, THE_EDITOR_POPOVER_REF, THE_EDITOR_PREVIOUS_SELECTION, THE_EDITOR_UUID, THE_I18N_DE_DE, THE_I18N_EN_US, THE_I18N_JA_JP, THE_I18N_LOCALE_ID, THE_I18N_RU_RU, THE_I18N_ZH_HANS, THE_I18N_ZH_HANT, THE_IMAGE_SERVICE_TOKEN, THE_LISTBOX_PARENT_GROUP_TOKEN, THE_LISTBOX_PARENT_OPTION_TOKEN, THE_LISTBOX_TOKEN, THE_MODE_PROVIDER, THE_MODE_TOKEN, THE_PLUGIN_MENU_REF, THE_PRESET_CONFIG_TOKEN, TableCellEventDispatcher, TableEditor, TableHeaderBackgroundColor, TablePosition, TheBaseElement, TheBaseSuggestion, TheBaseToolbarDropdown, TheBaseToolbarItem, TheColumnResizeDirective, TheColumnResizeOverlayHandle, TheContextMenu, TheContextService, TheConversionHint, TheDataMode, TheEditor, TheEditorComponent, TheEditorModule, TheI18nService, TheImage, TheInlineToolbar, TheListboxDirective, TheListboxGroupDirective, TheListboxOptionDirective, TheLocaleType, TheMode, TheModeConfig, ThePluginMenu, ThePluginMenuComponent, ThePluginMenuItemType, ThePreventDefaultDirective, index$1 as TheQueries, TheQuickInsert, TheTableSelect, TheToolbarComponent, TheToolbarDropdown, TheToolbarGroup, TheToolbarGroupToken, TheToolbarItem, TheToolbarService, index as TheTransforms, TodoItemEditor, ToolbarActionTypes, ToolbarAlignment, ToolbarItemType, ToolbarMoreGroup, VOID_BLOCK_TYPES, VerticalAlignEditor, VerticalAlignment, ZERO_WIDTH_CHAR, autoFocus, base64toBlob, bottomLeftPosition, bottomRightPosition, buildPluginMenu, buildPluginMenuItemMap, buildQuickInsertMenus, calcPrintColumnWidth, calcSpanForColumn, calcSpanForRow, calculateHeaderRowHeight, calculateRowControls, coercePixelsFromCssValue, combinePlugins, copyNode, createCell, createEmptyContent, createEmptyParagraph, createMentionPlugin, createPluginFactory, createRow, createTable, createTablePosition, createTest1Plugin, createTestPlugin, createToolbar, createVerticalAlignPlugin, customPluginMock, customPluginMockKey, dataDeserialize, dataSerializing, deDeLocale, deleteElementKey, enUsLocale, errorImageUrlMock, expandPreviousHeadings, extractFragment, extractFragmentByHTML, filterTextFormat, fixBlockWithoutParagraph, fixBlockWithoutText, flattenDeepPlugins, getCellPositionsFromRange, getCollapsedStandardHeadingAbove, getColsTotalWidth, getColumnsWidth, getDirtyElements, getEditorScrollContainer, getEditorUUID, getElementClassByPrefix, getElementHeight, getElementWidth, getEndBlock, getFollowElements, getGridColumns, getMode, getNextCell, getOriginCell, getPlugin, getPluginOptions, getPlugins, getPreviousRelatedHeadingElements, getRowsTotalHeight, getSelectCellNode, getSelectedCellPositions, getStartBlock, getTableByCell, getTableByRow, getTheDefaultPluginMenu, getToolbarClass, hasHeaderRow, headingOptions, htmlToTheia, idCreator, inValidTypes, initializeDefaultMenuIcons, injectTranslations, insertDataByInvalidType, internalPlugins, isCleanEmptyParagraph, isColorIndicator, isColorInput, isColorPanel, isDirectionKeydown, isHeadingElement, isInside, isMobileMode, isPrintMode, isPureEmptyParagraph, isRangeInTable, isRectangularInTableCells, isSelectedAllCell, isSelectionInTable, isStandardHeadingElement, isStandardHeadingElementByType, isUrl, isVirtualKey, jaJpLocale, matchOptions, mergeArray, mergeDeepPlugins, mergeElementOptions, mergeOptions, nestedStructureByKey, normalizeValue, originOptions, plainToTheia, pluginKey, pluginKey1, pluginsByKey, reSelection, recursionNodes, refocus, ruRuLocale, setClipboardDataByDom, setEditorUUID, theTethysIconRegistryFaker, toggleHeadingRelatedElement, topLeftPosition, topRightPosition, uniqueCellPosition, updatePopoverPosition, useElementStyle, withMention, withTestPlugin, withTheia, zhHansLocale, zhHantLocale };
18986
18995
  //# sourceMappingURL=worktile-theia.mjs.map