@worktile/theia 1.2.13 → 1.2.18

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.
Files changed (64) hide show
  1. package/bundles/worktile-theia.umd.js +518 -179
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/constants/code.d.ts +3 -3
  4. package/constants/default.d.ts +0 -1
  5. package/constants/node-types.d.ts +2 -1
  6. package/custom-types.d.ts +3 -1
  7. package/editor.module.d.ts +43 -39
  8. package/esm2015/components/text/text.component.js +7 -2
  9. package/esm2015/components/toolbar-item/toolbar-item.component.js +7 -3
  10. package/esm2015/constants/code.js +2 -2
  11. package/esm2015/constants/default.js +1 -2
  12. package/esm2015/constants/node-types.js +4 -2
  13. package/esm2015/constants/toolbar.js +2 -1
  14. package/esm2015/custom-types.js +1 -1
  15. package/esm2015/editor.component.js +5 -3
  16. package/esm2015/editor.module.js +14 -5
  17. package/esm2015/interfaces/editor.js +1 -1
  18. package/esm2015/interfaces/toolbar.js +1 -1
  19. package/esm2015/plugins/code/code.component.js +79 -33
  20. package/esm2015/plugins/code/code.editor.js +3 -9
  21. package/esm2015/plugins/common/block-card.plugin.js +51 -5
  22. package/esm2015/plugins/deserializers/deserialize-html.plugin.js +7 -1
  23. package/esm2015/plugins/deserializers/deserialize-md.plugin.js +7 -2
  24. package/esm2015/plugins/font-size/options.js +11 -0
  25. package/esm2015/plugins/font-size/toolbar-item.component.js +129 -0
  26. package/esm2015/plugins/index.js +16 -2
  27. package/esm2015/plugins/mark/options.js +6 -1
  28. package/esm2015/plugins/paint-format/options.js +4 -1
  29. package/esm2015/plugins/placeholder/placeholder.component.js +10 -6
  30. package/esm2015/plugins/soft-break/soft-break.plugin.js +18 -0
  31. package/esm2015/plugins/soft-break/soft-break.types.js +2 -0
  32. package/esm2015/plugins/table/table.editor.js +10 -2
  33. package/esm2015/plugins/table/table.plugin.js +53 -19
  34. package/esm2015/plugins/table/utils/calc-span.js +2 -2
  35. package/esm2015/plugins/table/utils/normalize-table.js +3 -3
  36. package/esm2015/plugins/table/utils/table-position.js +5 -2
  37. package/esm2015/queries/is-empty-content.js +2 -2
  38. package/esm2015/queries/is-empty-paragraph.js +6 -2
  39. package/esm2015/utils/common.js +3 -0
  40. package/esm2015/utils/index.js +2 -1
  41. package/fesm2015/worktile-theia.js +474 -144
  42. package/fesm2015/worktile-theia.js.map +1 -1
  43. package/interfaces/editor.d.ts +2 -0
  44. package/interfaces/toolbar.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/plugins/code/code.component.d.ts +17 -5
  47. package/plugins/code/code.component.scss +46 -7
  48. package/plugins/code/code.editor.d.ts +3 -2
  49. package/plugins/font-size/options.d.ts +3 -0
  50. package/plugins/font-size/toolbar-item.component.d.ts +35 -0
  51. package/plugins/font-size/toolbar-item.component.scss +13 -0
  52. package/plugins/image/image.component.scss +172 -168
  53. package/plugins/placeholder/placeholder.component.d.ts +3 -2
  54. package/plugins/soft-break/soft-break.plugin.d.ts +4 -0
  55. package/plugins/soft-break/soft-break.types.d.ts +8 -0
  56. package/plugins/table/table.editor.d.ts +2 -0
  57. package/plugins/table/utils/calc-span.d.ts +1 -1
  58. package/queries/get-selection-marks.d.ts +1 -0
  59. package/styles/editor.scss +6 -0
  60. package/styles/index.scss +1 -0
  61. package/styles/typo.scss +13 -25
  62. package/transforms/set-marks.d.ts +1 -0
  63. package/utils/common.d.ts +2 -0
  64. package/utils/index.d.ts +1 -0
@@ -68,6 +68,8 @@ export interface TheOptions {
68
68
  disabled?: boolean;
69
69
  autoFocus?: boolean;
70
70
  placeholder?: string;
71
+ isEmptyShowPlaceholder?: boolean;
72
+ isMustShowPlaceholder?: boolean;
71
73
  scrollContainer?: string;
72
74
  maxHeight?: number;
73
75
  toolbar?: ToolbarOption;
@@ -36,6 +36,7 @@ export interface CustomizeToolbarItem extends ToolbarItemBase {
36
36
  export interface DefaultToolbarItem extends ToolbarItemBase {
37
37
  icon?: string;
38
38
  name?: string;
39
+ shortcutKey?: string;
39
40
  type?: ToolbarItemType;
40
41
  }
41
42
  export declare type ToolbarItem = CustomizeToolbarItem & DefaultToolbarItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@worktile/theia",
3
- "version": "1.2.13",
3
+ "version": "1.2.18",
4
4
  "description": "theia editor",
5
5
  "author": "YanDong <nanianqiumo@foxmail.com>",
6
6
  "homepage": "https://github.com/atinc/theia#readme",
@@ -2,24 +2,29 @@ import { ElementRef, ChangeDetectorRef, OnInit, AfterViewInit, NgZone } from '@a
2
2
  import { ThyNotifyService } from 'ngx-tethys/notify';
3
3
  import { Editor } from 'slate';
4
4
  import { CodeMirrorComponent } from 'ng-codemirror';
5
- import { DropdownMode, CodeMode } from '../../constants';
5
+ import { DropdownMode, TheCodeConfig, ToolbarItemMode } from '../../constants';
6
6
  import { DefaultToolbarItem, TheBaseElementComponent } from '../../interfaces';
7
7
  import { CodeElement } from '../../custom-types';
8
+ import { ThyResizeEvent } from 'ngx-tethys/resizable';
8
9
  import * as i0 from "@angular/core";
9
10
  export declare class TheCodeComponent extends TheBaseElementComponent<CodeElement, Editor> implements OnInit, AfterViewInit {
10
11
  elementRef: ElementRef;
11
12
  cdr: ChangeDetectorRef;
12
13
  private thyNotifyService;
13
14
  private ngZone;
14
- private mode;
15
+ private config;
15
16
  startRenderCodemirror: boolean;
16
17
  dropdownMode: typeof DropdownMode;
17
- maxHeight: number;
18
18
  codeMirrorFocused: boolean;
19
+ maxHeight: number;
19
20
  menus: {
20
21
  key: string;
21
22
  name: string;
22
23
  }[];
24
+ ToolbarItemMode: typeof ToolbarItemMode;
25
+ isAutoWrap: boolean;
26
+ isResizing: boolean;
27
+ resizeHeight: number;
23
28
  options: {
24
29
  mode: string;
25
30
  lineNumbers: boolean;
@@ -32,19 +37,26 @@ export declare class TheCodeComponent extends TheBaseElementComponent<CodeElemen
32
37
  actives: DefaultToolbarItem;
33
38
  get code(): string;
34
39
  codemirror: CodeMirrorComponent;
40
+ handleCodeMousedown(event: MouseEvent): void;
35
41
  onContextChange(): void;
36
- constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, thyNotifyService: ThyNotifyService, ngZone: NgZone, mode: CodeMode);
42
+ constructor(elementRef: ElementRef, cdr: ChangeDetectorRef, thyNotifyService: ThyNotifyService, ngZone: NgZone, config: TheCodeConfig);
37
43
  ngOnInit(): void;
38
44
  ngAfterViewInit(): void;
45
+ focusChange(codeMirrorFocused: boolean): void;
39
46
  renderCodemirror(): void;
40
47
  initializeCodemirrorFocus(): void;
41
48
  codeChange($event: any): void;
42
- focusChange(codeMirrorFocused: boolean): void;
43
49
  onDelete(event: MouseEvent): void;
44
50
  onCopy(event: MouseEvent): void;
45
51
  onChangeLangulage: (item: any) => void;
46
52
  useMode(): void;
53
+ useAutoWrap(): void;
54
+ useHeight(): void;
47
55
  useReadonly(): void;
56
+ onResize({ height }: ThyResizeEvent): void;
57
+ onStartResize(): void;
58
+ onEndResize(): void;
59
+ onChangeWrap(value: boolean): void;
48
60
  static ɵfac: i0.ɵɵFactoryDeclaration<TheCodeComponent, never>;
49
61
  static ɵcmp: i0.ɵɵComponentDeclaration<TheCodeComponent, "div[theCode]", never, {}, {}, never, never>;
50
62
  }
@@ -1,18 +1,22 @@
1
1
  @import '~ng-codemirror/index.scss';
2
2
 
3
3
  .the-code-container {
4
- display: block;
5
- font-size: 14px;
6
- position: relative;
7
-
8
- .CodeMirror {
9
- height: auto;
4
+ .resize-code-container{
5
+ display: block;
6
+ font-size: 14px;
7
+ position: relative;
10
8
  counter-reset: codeblock-lm;
11
9
  border: 1px solid $gray-300;
12
10
  border-radius: 2px;
13
11
  color: $gray-600;
14
12
  background: rgba(243, 243, 243, 0.8);
13
+ }
14
+ .CodeMirror {
15
+ height: 100% !important;
15
16
  z-index: 0;
17
+ color: $gray-600;
18
+ background: transparent;
19
+ border: none;
16
20
 
17
21
  .CodeMirror-gutters {
18
22
  border-right: none;
@@ -30,7 +34,34 @@
30
34
  }
31
35
  .ng-codemirror-wrapper {
32
36
  display: block;
33
- overflow: hidden;
37
+ overflow: scroll;
38
+ position: relative;
39
+ height: 100%;
40
+ }
41
+
42
+ .code-resize-icon.thy-resizable-handle-bottom{
43
+ cursor: row-resize;
44
+ height: 8px;
45
+ width: 45px;
46
+ left: 50%;
47
+ transform: translateX(-50%);
48
+ background: $gray-300;
49
+ bottom: -5px;
50
+ border-radius: 5px;
51
+ position: absolute;
52
+ &::before, &:after{
53
+ content: '';
54
+ position: absolute;
55
+ width: 34px;
56
+ height: 1px;
57
+ background: $white;
58
+ left: 50%;
59
+ transform: translateX(-50%);
60
+ top: 2px;
61
+ }
62
+ &:after{
63
+ top: 5px;
64
+ }
34
65
  }
35
66
 
36
67
  @include the-toolbar-active();
@@ -39,5 +70,13 @@
39
70
  padding: 0;
40
71
  width: 100px;
41
72
  }
73
+
74
+ .auto-wrap{
75
+ padding-left: 8px;
76
+ .auto-wrap-btn{
77
+ margin-left: 5px;
78
+ transform: scale(0.8);
79
+ }
80
+ }
42
81
  }
43
82
 
@@ -1,7 +1,8 @@
1
1
  import { Editor } from 'slate';
2
2
  import { CodeElement } from '../../custom-types';
3
3
  export declare const CodeEditor: {
4
- setLanguage(editor: Editor, language: string, element: CodeElement): void;
5
- setCodeContent(editor: Editor, content: string, element: CodeElement): void;
4
+ setCodeAttribute(editor: Editor, element: CodeElement, value: {
5
+ [key: string]: unknown;
6
+ }): void;
6
7
  insertCode(editor: Editor): void;
7
8
  };
@@ -0,0 +1,3 @@
1
+ import { ToolbarItem } from '../../interfaces/toolbar';
2
+ export declare const FontSizes: number[];
3
+ export declare const FontSizeOptions: ToolbarItem[];
@@ -0,0 +1,35 @@
1
+ import { ElementRef, OnInit, TemplateRef, ViewContainerRef } from '@angular/core';
2
+ import { Editor } from 'slate';
3
+ import { ToolbarItem } from '../../interfaces/toolbar';
4
+ import { TheToolbarBaseItemComponent } from '../../components/toolbar-base-item/toolbar-base-item.component';
5
+ import { ThyPopover, ThyPopoverRef } from 'ngx-tethys/popover';
6
+ import { Overlay } from '@angular/cdk/overlay';
7
+ import * as i0 from "@angular/core";
8
+ export declare class TheFontSizeToolbarItemComponent extends TheToolbarBaseItemComponent implements OnInit {
9
+ elementRef: ElementRef;
10
+ private thyPopover;
11
+ private viewContainerRef;
12
+ private overlay;
13
+ editor: Editor;
14
+ item: ToolbarItem;
15
+ activeSize: number | string;
16
+ fontSizes: number[];
17
+ disabled: boolean;
18
+ disableGroup: (import("../../constants/node-types").ElementKinds.image | import("../../constants/node-types").ElementKinds.paragraph | import("../../constants/node-types").ElementKinds.heading_1 | import("../../constants/node-types").ElementKinds.heading_2 | import("../../constants/node-types").ElementKinds.heading_3 | import("../../constants/node-types").ElementKinds.heading_4 | import("../../constants/node-types").ElementKinds.heading_5 | import("../../constants/node-types").ElementKinds.heading_6 | import("../../constants/node-types").ElementKinds.numberedList | import("../../constants/node-types").ElementKinds.bulletedList | import("../../constants/node-types").ElementKinds.listItem | import("../../constants/node-types").ElementKinds.checkItem | import("../../constants/node-types").ElementKinds.table | import("../../constants/node-types").ElementKinds.tableRow | import("../../constants/node-types").ElementKinds.tableCell | import("../../constants/node-types").ElementKinds.code | import("../../constants/node-types").ElementKinds.blockquote | import("../../constants/node-types").ElementKinds.hr | import("../../constants/node-types").ElementKinds.link)[];
19
+ dropdownPopoverRef: ThyPopoverRef<any>;
20
+ get isOpen(): boolean;
21
+ dropdownTemplate: TemplateRef<any>;
22
+ toolbarItemContainer: boolean;
23
+ fontSizeToolbarItem: boolean;
24
+ get disableClass(): boolean;
25
+ toggleDropdown(event: MouseEvent): void;
26
+ handleDocumentMouseDown(event: MouseEvent): void;
27
+ constructor(elementRef: ElementRef, thyPopover: ThyPopover, viewContainerRef: ViewContainerRef, overlay: Overlay);
28
+ ngOnInit(): void;
29
+ statusChange(editor: Editor): void;
30
+ itemMousedown(event: MouseEvent, size: number): void;
31
+ openDropdownPopover(): void;
32
+ closeDropdownPopover(): void;
33
+ static ɵfac: i0.ɵɵFactoryDeclaration<TheFontSizeToolbarItemComponent, never>;
34
+ static ɵcmp: i0.ɵɵComponentDeclaration<TheFontSizeToolbarItemComponent, "the-font-size-toolbar-item", never, { "editor": "editor"; "item": "item"; }, {}, never, never>;
35
+ }
@@ -0,0 +1,13 @@
1
+ .the-font-size-toolbar-item {
2
+ width: 60px;
3
+
4
+ &.disabled {
5
+ cursor: not-allowed;
6
+ opacity: 0.25;
7
+
8
+
9
+ .thy-icon-nav-link {
10
+ pointer-events: none;
11
+ }
12
+ }
13
+ }
@@ -1,190 +1,194 @@
1
- .image-container {
2
- .image-content {
3
- display: inline-block;
4
- position: relative;
5
- height: auto;
6
- cursor: zoom-in;
7
- }
1
+ .slate-element-image {
2
+ display: block;
8
3
 
9
- .pointer {
10
- cursor: pointer;
11
- }
4
+ .image-container {
5
+ .image-content {
6
+ display: inline-block;
7
+ position: relative;
8
+ height: auto;
9
+ cursor: zoom-in;
10
+ }
12
11
 
13
- .main-image {
14
- position: relative;
15
- object-fit: fill;
16
- width: auto;
17
- max-width: 100%;
18
- max-height: 100%;
19
- width: 100%;
20
- height: 100%;
21
- margin: 0 auto;
22
- user-select: none;
23
- }
24
- .image-profile {
25
- position: absolute;
26
- display: block;
27
- bottom: -1px;
28
- left: -1px;
29
- right: -1px;
30
- top: -1px;
31
- .image-pointer {
12
+ .pointer {
13
+ cursor: pointer;
14
+ }
15
+
16
+ .main-image {
17
+ position: relative;
18
+ object-fit: fill;
19
+ width: auto;
20
+ max-width: 100%;
21
+ max-height: 100%;
22
+ width: 100%;
23
+ height: 100%;
24
+ margin: 0 auto;
25
+ user-select: none;
26
+ }
27
+ .image-profile {
32
28
  position: absolute;
33
- width: 12px;
34
- height: 12px;
35
- border-radius: 50%;
36
- background-color: $white;
37
- box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.13);
38
- border: 1px solid $gray-300;
39
- z-index: 2;
40
- &::before {
29
+ display: block;
30
+ bottom: -1px;
31
+ left: -1px;
32
+ right: -1px;
33
+ top: -1px;
34
+ .image-pointer {
41
35
  position: absolute;
36
+ width: 12px;
37
+ height: 12px;
38
+ border-radius: 50%;
39
+ background-color: $white;
40
+ box-shadow: 0 0 4px 0 rgba(0, 0, 0, 0.13);
41
+ border: 1px solid $gray-300;
42
+ z-index: 2;
43
+ &::before {
44
+ position: absolute;
45
+ left: 50%;
46
+ top: 50%;
47
+ display: inline-block;
48
+ content: '';
49
+ height: 8px;
50
+ width: 8px;
51
+ margin-left: -4px;
52
+ margin-top: -4px;
53
+ border-radius: 50%;
54
+ background-color: $primary;
55
+ }
56
+ }
57
+ .left {
58
+ left: -6px;
59
+ }
60
+ .top {
61
+ top: -6px;
62
+ }
63
+ .center {
42
64
  left: 50%;
65
+ margin-left: -5px;
66
+ }
67
+ .middle {
43
68
  top: 50%;
44
- display: inline-block;
45
- content: '';
46
- height: 8px;
47
- width: 8px;
48
- margin-left: -4px;
49
- margin-top: -4px;
50
- border-radius: 50%;
51
- background-color: $primary;
69
+ margin-top: -5px;
70
+ }
71
+ .right {
72
+ right: -6px;
73
+ }
74
+ .bottom {
75
+ bottom: -6px;
76
+ }
77
+ .left.top,
78
+ .right.bottom {
79
+ cursor: nwse-resize;
80
+ }
81
+ .top.center,
82
+ .bottom.center {
83
+ cursor: ns-resize;
84
+ }
85
+ .right.top,
86
+ .left.bottom {
87
+ cursor: nesw-resize;
88
+ }
89
+ .left.middle,
90
+ .right.middle {
91
+ cursor: ew-resize;
52
92
  }
53
93
  }
54
- .left {
55
- left: -6px;
56
- }
57
- .top {
58
- top: -6px;
59
- }
60
- .center {
61
- left: 50%;
62
- margin-left: -5px;
63
- }
64
- .middle {
65
- top: 50%;
66
- margin-top: -5px;
67
- }
68
- .right {
69
- right: -6px;
70
- }
71
- .bottom {
72
- bottom: -6px;
73
- }
74
- .left.top,
75
- .right.bottom {
76
- cursor: nwse-resize;
77
- }
78
- .top.center,
79
- .bottom.center {
80
- cursor: ns-resize;
81
- }
82
- .right.top,
83
- .left.bottom {
84
- cursor: nesw-resize;
85
- }
86
- .left.middle,
87
- .right.middle {
88
- cursor: ew-resize;
94
+ .image-profile.outline {
95
+ border: 1px dashed $primary;
89
96
  }
90
- }
91
- .image-profile.outline {
92
- border: 1px dashed $primary;
93
- }
94
-
95
- .uploading {
96
- position: absolute;
97
- bottom: 0;
98
- left: 0;
99
- right: 0;
100
- top: 0;
101
- display: block;
102
- background-color: rgba(255, 255, 255, 0.65);
103
97
 
104
- .percentage {
105
- position: absolute;
106
- top: 4px;
107
- right: 4px;
108
- width: 102px;
109
- height: 24px;
110
- line-height: 24px;
111
- border: 0.5px solid rgba(0, 0, 0, 0.05);
112
- border-radius: 3px;
113
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.1);
114
- background: $white;
115
- color: grey;
116
- font-weight: 500;
117
- text-align: center;
118
- transition: 0.3s ease;
119
- }
120
- .uploading-percentage {
98
+ .uploading {
121
99
  position: absolute;
122
- top: 50%;
123
- left: 50%;
124
- display: flex;
125
- flex-direction: row;
126
- justify-content: space-between;
127
- align-items: center;
128
- flex-wrap: nowrap;
129
- height: 18px;
130
- margin-left: -60px;
131
- margin-top: -9px;
132
- .progress {
133
- display: inline-block;
134
- width: 120px;
135
- height: 8px;
136
- margin-right: 8px;
137
- margin-top: 1px;
100
+ bottom: 0;
101
+ left: 0;
102
+ right: 0;
103
+ top: 0;
104
+ display: block;
105
+ background-color: rgba(255, 255, 255, 0.65);
106
+
107
+ .percentage {
108
+ position: absolute;
109
+ top: 4px;
110
+ right: 4px;
111
+ width: 102px;
112
+ height: 24px;
113
+ line-height: 24px;
114
+ border: 0.5px solid rgba(0, 0, 0, 0.05);
115
+ border-radius: 3px;
116
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.1);
117
+ background: $white;
118
+ color: grey;
119
+ font-weight: 500;
120
+ text-align: center;
121
+ transition: 0.3s ease;
138
122
  }
139
- .thy-icon {
140
- color: #d8d8d8;
123
+ .uploading-percentage {
124
+ position: absolute;
125
+ top: 50%;
126
+ left: 50%;
127
+ display: flex;
128
+ flex-direction: row;
129
+ justify-content: space-between;
130
+ align-items: center;
131
+ flex-wrap: nowrap;
132
+ height: 18px;
133
+ margin-left: -60px;
134
+ margin-top: -9px;
135
+ .progress {
136
+ display: inline-block;
137
+ width: 120px;
138
+ height: 8px;
139
+ margin-right: 8px;
140
+ margin-top: 1px;
141
+ }
142
+ .thy-icon {
143
+ color: #d8d8d8;
144
+ }
141
145
  }
142
146
  }
143
- }
144
-
145
- .layer {
146
- display: none;
147
- position: absolute;
148
- bottom: 0;
149
- left: 0;
150
- right: 0;
151
- top: 0;
152
147
 
153
- .preview {
148
+ .layer {
149
+ display: none;
154
150
  position: absolute;
155
- top: 6px;
156
- right: 6px;
157
- width: auto;
158
- height: 24px;
159
- padding: 0 3px;
160
- line-height: 24px;
161
- border: 0.5px solid rgba(0, 0, 0, 0.05);
162
- border-radius: 3px;
163
- box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.1);
164
- background: $white;
165
- color: grey;
166
- font-weight: 500;
167
- text-align: center;
168
- transition: 0.3s ease;
169
- cursor: pointer;
151
+ bottom: 0;
152
+ left: 0;
153
+ right: 0;
154
+ top: 0;
155
+
156
+ .preview {
157
+ position: absolute;
158
+ top: 6px;
159
+ right: 6px;
160
+ width: auto;
161
+ height: 24px;
162
+ padding: 0 3px;
163
+ line-height: 24px;
164
+ border: 0.5px solid rgba(0, 0, 0, 0.05);
165
+ border-radius: 3px;
166
+ box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.05), 0 1px 4px 0 rgba(0, 0, 0, 0.1);
167
+ background: $white;
168
+ color: grey;
169
+ font-weight: 500;
170
+ text-align: center;
171
+ transition: 0.3s ease;
172
+ cursor: pointer;
173
+ }
170
174
  }
171
- }
172
175
 
173
- .image-loading {
174
- display: flex;
175
- align-items: center;
176
- justify-content: center;
177
- width: 100%;
178
- height: 280px;
179
- background: rgb(244, 245, 247);
180
- color: $gray-500;
176
+ .image-loading {
177
+ display: flex;
178
+ align-items: center;
179
+ justify-content: center;
180
+ width: 100%;
181
+ height: 280px;
182
+ background: rgb(244, 245, 247);
183
+ color: $gray-500;
184
+ }
181
185
  }
182
- }
183
186
 
184
- .image-container:hover .layer {
185
- display: block;
186
- }
187
+ .image-container:hover .layer {
188
+ display: block;
189
+ }
187
190
 
188
- .image-container:hover .layer.readonly {
189
- cursor: zoom-in;
191
+ .image-container:hover .layer.readonly {
192
+ cursor: zoom-in;
193
+ }
190
194
  }
@@ -1,13 +1,14 @@
1
1
  import { ElementRef, Renderer2 } from '@angular/core';
2
2
  import { Editor } from 'slate';
3
3
  import { TheContextService } from '../../services/context.service';
4
+ import { TheOptions } from '../../interfaces/editor';
4
5
  import * as i0 from "@angular/core";
5
6
  export declare class ThePlaceholderComponent {
6
7
  private renderer;
7
8
  private elementRef;
8
9
  private contextService;
9
10
  editor: Editor;
10
- placeholder: string;
11
+ options: TheOptions;
11
12
  isHide: boolean;
12
13
  handleCompositionStart(): void;
13
14
  handleCompositionEnd(event: any): void;
@@ -16,5 +17,5 @@ export declare class ThePlaceholderComponent {
16
17
  private updatePosition;
17
18
  private hide;
18
19
  static ɵfac: i0.ɵɵFactoryDeclaration<ThePlaceholderComponent, never>;
19
- static ɵcmp: i0.ɵɵComponentDeclaration<ThePlaceholderComponent, "div[thePlaceholder]", never, { "editor": "editor"; "placeholder": "placeholder"; }, {}, never, never>;
20
+ static ɵcmp: i0.ɵɵComponentDeclaration<ThePlaceholderComponent, "div[thePlaceholder]", never, { "editor": "editor"; "options": "options"; }, {}, never, never>;
20
21
  }
@@ -0,0 +1,4 @@
1
+ import { TransformEditor } from '../common/transforms.plugin';
2
+ import { SoftBreakOnKeyDownOptions } from './soft-break.types';
3
+ import { TheEditor } from '../../interfaces/editor';
4
+ export declare const withSoftBreak: (options?: SoftBreakOnKeyDownOptions) => <T extends TheEditor & TransformEditor>(editor: T) => T;
@@ -0,0 +1,8 @@
1
+ import { QueryOptions } from '../../interfaces/editor';
2
+ export interface SoftBreakRule {
3
+ hotkey: string;
4
+ query?: QueryOptions;
5
+ }
6
+ export interface SoftBreakOnKeyDownOptions {
7
+ rules?: SoftBreakRule[];
8
+ }
@@ -2,6 +2,7 @@ import { Editor, NodeEntry, Path, Range } from 'slate';
2
2
  import { TableOptions } from './table.types';
3
3
  import { Alignment, VerticalAlignment } from '../../constants/node-types';
4
4
  import { TheEditor } from '../../interfaces';
5
+ import { TableElement } from '../../custom-types';
5
6
  export declare const TableEditor: {
6
7
  insertTable(editor: Editor, optionsParam?: TableOptions): void;
7
8
  insertColumn(editor: Editor, count?: number, at?: number, optionsParam?: TableOptions): void;
@@ -20,4 +21,5 @@ export declare const TableEditor: {
20
21
  clearMark(editor: TheEditor): boolean;
21
22
  handleSelectedCells(editor: TheEditor, handle: (cellPath: Path, cellRange: Range) => void): boolean;
22
23
  isActiveHeader(editor: TheEditor): boolean;
24
+ selectOriginCell(editor: TheEditor, table: TableElement, rowIndex: number, columnIndex: number, isStart: boolean): void;
23
25
  };
@@ -7,5 +7,5 @@ export interface CellRect {
7
7
  }
8
8
  export declare function calcSpanForRow(table: TableElement, targetIndex: number): boolean[];
9
9
  export declare function calcSpanForColumn(table: TableElement, targetIndex: number): boolean[];
10
- export declare function calcOriginSpan(table: TableElement, targetRowIndex: number, targetColumnIndex: number): TableCellElement;
10
+ export declare function getOriginCell(table: TableElement, targetRowIndex: number, targetColumnIndex: number): TableCellElement;
11
11
  export declare function isInside(cellRect: CellRect, rowIndex: number, columnIndex: number): boolean;
@@ -8,4 +8,5 @@ export declare const getSelectionMarks: (editor: Editor) => {
8
8
  color?: any;
9
9
  "background-color"?: any;
10
10
  "code-line"?: any;
11
+ "font-size"?: any;
11
12
  };