@worktile/theia 1.2.11 → 1.2.15

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 (59) hide show
  1. package/bundles/worktile-theia.umd.js +230 -135
  2. package/bundles/worktile-theia.umd.js.map +1 -1
  3. package/components/column-resize/column-resize.directive.d.ts +3 -3
  4. package/components/inline-toolbar/inline-toolbar.component.d.ts +3 -1
  5. package/components/inline-toolbar/inline-toolbar.component.scss +6 -5
  6. package/components/toolbar/toolbar.component.d.ts +2 -1
  7. package/constants/default.d.ts +0 -1
  8. package/custom-types.d.ts +2 -0
  9. package/editor.component.d.ts +2 -0
  10. package/esm2015/components/column-resize/column-resize.directive.js +1 -1
  11. package/esm2015/components/inline-toolbar/inline-toolbar.component.js +10 -7
  12. package/esm2015/components/toolbar/toolbar.component.js +7 -6
  13. package/esm2015/components/toolbar-group/toolbar-group.component.js +1 -1
  14. package/esm2015/components/toolbar-item/toolbar-item.component.js +7 -3
  15. package/esm2015/constants/default.js +1 -2
  16. package/esm2015/custom-types.js +1 -1
  17. package/esm2015/editor.component.js +28 -14
  18. package/esm2015/interfaces/editor.js +1 -1
  19. package/esm2015/interfaces/toolbar.js +1 -1
  20. package/esm2015/plugins/deserializers/deserialize-html.plugin.js +12 -4
  21. package/esm2015/plugins/deserializers/deserialize-md.plugin.js +8 -3
  22. package/esm2015/plugins/index.js +14 -2
  23. package/esm2015/plugins/mark/options.js +6 -1
  24. package/esm2015/plugins/paint-format/options.js +4 -1
  25. package/esm2015/plugins/placeholder/placeholder.component.js +21 -14
  26. package/esm2015/plugins/quick-insert/components/quick-insert.component.js +7 -6
  27. package/esm2015/plugins/quick-insert/quick-insert.plugint.js +3 -2
  28. package/esm2015/plugins/soft-break/soft-break.plugin.js +18 -0
  29. package/esm2015/plugins/soft-break/soft-break.types.js +2 -0
  30. package/esm2015/plugins/table/table.plugin.js +34 -55
  31. package/esm2015/plugins/table/table.types.js +1 -1
  32. package/esm2015/plugins/table/utils/normalize-table.js +31 -0
  33. package/esm2015/queries/is-container-type.js +2 -2
  34. package/esm2015/services/context.service.js +10 -2
  35. package/esm2015/transforms/index.js +2 -3
  36. package/esm2015/utils/auto-focus.js +2 -2
  37. package/esm2015/utils/common.js +3 -0
  38. package/esm2015/utils/fragment.js +24 -2
  39. package/esm2015/utils/index.js +2 -1
  40. package/fesm2015/worktile-theia.js +221 -127
  41. package/fesm2015/worktile-theia.js.map +1 -1
  42. package/interfaces/editor.d.ts +2 -0
  43. package/interfaces/toolbar.d.ts +1 -0
  44. package/package.json +1 -1
  45. package/plugins/image/image.component.scss +172 -168
  46. package/plugins/placeholder/placeholder.component.d.ts +4 -2
  47. package/plugins/soft-break/soft-break.plugin.d.ts +4 -0
  48. package/plugins/soft-break/soft-break.types.d.ts +8 -0
  49. package/plugins/table/table.types.d.ts +7 -0
  50. package/plugins/table/utils/normalize-table.d.ts +2 -0
  51. package/services/context.service.d.ts +2 -0
  52. package/styles/editor.scss +3 -3
  53. package/styles/typo.scss +5 -2
  54. package/transforms/index.d.ts +1 -2
  55. package/utils/common.d.ts +2 -0
  56. package/utils/fragment.d.ts +5 -0
  57. package/utils/index.d.ts +1 -0
  58. package/esm2015/transforms/insert-elements.js +0 -22
  59. package/transforms/insert-elements.d.ts +0 -2
@@ -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.11",
3
+ "version": "1.2.15",
4
4
  "description": "theia editor",
5
5
  "author": "YanDong <nanianqiumo@foxmail.com>",
6
6
  "homepage": "https://github.com/atinc/theia#readme",
@@ -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,16 +1,18 @@
1
1
  import { ElementRef, Renderer2 } from '@angular/core';
2
2
  import { Editor } from 'slate';
3
- import { TheOptions } from '../../interfaces';
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;
9
+ private contextService;
8
10
  editor: Editor;
9
11
  options: TheOptions;
10
12
  isHide: boolean;
11
13
  handleCompositionStart(): void;
12
14
  handleCompositionEnd(event: any): void;
13
- constructor(renderer: Renderer2, elementRef: ElementRef);
15
+ constructor(renderer: Renderer2, elementRef: ElementRef, contextService: TheContextService);
14
16
  checkStatus(): void;
15
17
  private updatePosition;
16
18
  private hide;
@@ -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
+ }
@@ -1,8 +1,15 @@
1
1
  import { InjectionToken } from '@angular/core';
2
2
  import { ComponentType } from 'slate-angular';
3
+ import { TheBaseElementComponent } from '../../interfaces/view-base';
3
4
  import { ElementKinds } from '../../constants/node-types';
4
5
  import type { TheTableComponent } from './components/table.component';
5
6
  export declare const TheTableToken: InjectionToken<ComponentType<TheTableComponent>>;
7
+ export interface TheTableComponentBase extends TheBaseElementComponent {
8
+ initializeColumns: () => void;
9
+ transformColumnsWidth: () => void;
10
+ initializeRows: () => void;
11
+ transformRowHeight: () => void;
12
+ }
6
13
  export declare const BASE_CELL_HEIGHT = 41;
7
14
  export declare const BASE_FILL_HEIGHT: number;
8
15
  export declare const BASE_CELL_INNER_HEIGHT: number;
@@ -0,0 +1,2 @@
1
+ import { TableElement } from "../../../custom-types";
2
+ export declare const normalizeTable: (table: TableElement) => TableElement;
@@ -27,6 +27,8 @@ export declare class TheContextService {
27
27
  constructor(ngZone: NgZone);
28
28
  initialize(options: TheContextOptions): void;
29
29
  getOptions(): TheContextOptions;
30
+ getEditableElement(): Element;
31
+ getFirstElementChild(): HTMLElement;
30
32
  setUploadFileList(file: {
31
33
  url: string;
32
34
  file: File;
@@ -12,9 +12,9 @@ $thy-icon-nav-link-margin-right: 5px;
12
12
 
13
13
  .the-editable-container {
14
14
  padding: 0;
15
+ margin: 0;
15
16
 
16
17
  &.max-height {
17
- padding: 0;
18
18
  overflow-y: auto;
19
19
  overflow-x: hidden;
20
20
  }
@@ -54,10 +54,10 @@ $thy-icon-nav-link-margin-right: 5px;
54
54
 
55
55
  .the-editable-container {
56
56
  position: relative;
57
+ padding-top: 41px;
58
+ margin-top: -41px;
57
59
 
58
60
  &.max-height {
59
- padding-top: 41px;
60
- margin-top: -41px;
61
61
  overflow-y: scroll;
62
62
  }
63
63
  }
package/styles/typo.scss CHANGED
@@ -77,7 +77,7 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
77
77
  margin-right: 0;
78
78
  color: $gray-600;
79
79
  padding-left: 10px !important;
80
- border-left: 4px solid #eee;
80
+ border-left: 4px solid $gray-200;
81
81
  }
82
82
 
83
83
  .the-hr {
@@ -88,7 +88,7 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
88
88
  hr {
89
89
  box-sizing: border-box;
90
90
  width: 100%;
91
- border-top: 1px solid #eee;
91
+ border-top: 1px solid $gray-200;
92
92
  padding: 0;
93
93
  margin: 0;
94
94
  }
@@ -177,6 +177,9 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
177
177
  margin-right: 0;
178
178
  }
179
179
  }
180
+ .remove-link.thy-icon-nav-link:hover {
181
+ color: $danger;
182
+ }
180
183
 
181
184
  @for $i from 1 through 24 {
182
185
  .indent-#{$i * 2} {
@@ -13,8 +13,7 @@ import { unWrap } from './un-wrap';
13
13
  import { splitNode } from './split-node';
14
14
  import { deleteElement } from './delete-element';
15
15
  import { setEndSelection } from './set-end-selection';
16
- import { insertTheElements } from './insert-elements';
17
16
  import { closeConversionHint } from './close-conversion-hint';
18
17
  import { handleContinualDeleteBackward } from './handle-continual-delete-backward';
19
18
  import { handleContinualInsertBreak } from './handle-continual-insert-break';
20
- export { setMarks, clearMarks, insertElement, insertElementNext, insertParagraph, setNode, unwrapNodesByType, onKeyDownResetBlockType, moveChildren, applyDeepToNodes, mergeDeepToNodes, unWrap, splitNode, deleteElement, setEndSelection, insertTheElements, closeConversionHint, handleContinualDeleteBackward, handleContinualInsertBreak };
19
+ export { setMarks, clearMarks, insertElement, insertElementNext, insertParagraph, setNode, unwrapNodesByType, onKeyDownResetBlockType, moveChildren, applyDeepToNodes, mergeDeepToNodes, unWrap, splitNode, deleteElement, setEndSelection, closeConversionHint, handleContinualDeleteBackward, handleContinualInsertBreak };
@@ -0,0 +1,2 @@
1
+ export declare const IS_MAC: boolean;
2
+ export declare const CONTROL_KEY: string;
@@ -3,3 +3,8 @@ export declare const getStartBlock: (editor: Editor, fragment: Element) => any;
3
3
  export declare const getEndBlock: (editor: Editor, fragment: Element) => any;
4
4
  export declare const extractFragment: (data: DataTransfer, deleteKey?: string) => import("@worktile/theia").CustomElement[];
5
5
  export declare function deleteElementKey(nodes: Node[], key: string): Node[];
6
+ /**
7
+ * 删除 text 节点的 颜色/背景色
8
+ * @param node
9
+ */
10
+ export declare function deleteColorAndBackgroundColorOfText(node: Element): void;
package/utils/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './data-transform';
2
2
  export * from './weak-maps';
3
3
  export * from './get-toolbar-class';
4
4
  export * from './create-empty-paragraph';
5
+ export * from './common';
@@ -1,22 +0,0 @@
1
- import { Editor, Range, Path, Transforms } from 'slate';
2
- import * as TheQueries from '../queries';
3
- export const insertTheElements = (editor, nodes) => {
4
- if (Range.isExpanded(editor.selection)) {
5
- Editor.deleteFragment(editor);
6
- }
7
- const isEmptyParagraph = TheQueries.isEmptyParagraph(editor, editor.selection.anchor);
8
- const parentPath = Path.parent(editor.selection.anchor.path);
9
- Editor.withoutNormalizing(editor, () => {
10
- Transforms.insertNodes(editor, nodes);
11
- if (parentPath.length && isEmptyParagraph) {
12
- Transforms.delete(editor, { at: parentPath });
13
- const lastPath = parentPath.pop();
14
- Transforms.select(editor, Editor.end(editor, [...parentPath, lastPath + nodes.length - 1]));
15
- }
16
- else {
17
- const lastPath = parentPath.pop();
18
- Transforms.select(editor, Editor.end(editor, [...parentPath, lastPath + nodes.length]));
19
- }
20
- });
21
- };
22
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5zZXJ0LWVsZW1lbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vcGFja2FnZXMvc3JjL3RyYW5zZm9ybXMvaW5zZXJ0LWVsZW1lbnRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxNQUFNLEVBQVcsS0FBSyxFQUFFLElBQUksRUFBRSxVQUFVLEVBQUUsTUFBTSxPQUFPLENBQUM7QUFDakUsT0FBTyxLQUFLLFVBQVUsTUFBTSxZQUFZLENBQUM7QUFFekMsTUFBTSxDQUFDLE1BQU0saUJBQWlCLEdBQUcsQ0FBQyxNQUFjLEVBQUUsS0FBZ0IsR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IH0pO1xuICAgICAgICAgICAgY29uc3QgbGFzdFBhdGggPSBwYXJlbnRQYXRoLnBvcCgpO1xuICAgICAgICAgICAgVHJhbnNmb3Jtcy5zZWxlY3QoZWRpdG9yLCBFZGl0b3IuZW5kKGVkaXRvciwgWy4uLnBhcmVudFBhdGgsIGxhc3RQYXRoICsgbm9kZXMubGVuZ3RoIC0gMV0pKTtcbiAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgIGNvbnN0IGxhc3RQYXRoID0gcGFyZW50UGF0aC5wb3AoKTtcbiAgICAgICAgICAgIFRyYW5zZm9ybXMuc2VsZWN0KGVkaXRvciwgRWRpdG9yLmVuZChlZGl0b3IsIFsuLi5wYXJlbnRQYXRoLCBsYXN0UGF0aCArIG5vZGVzLmxlbmd0aF0pKTtcbiAgICAgICAgfVxuICAgIH0pO1xufTtcbiJdfQ==
@@ -1,2 +0,0 @@
1
- import { Editor, Element } from 'slate';
2
- export declare const insertTheElements: (editor: Editor, nodes: Element[]) => void;