@worktile/theia 1.2.15 → 2.0.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.
- package/bundles/worktile-theia.umd.js +131 -33
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/esm2015/editor.component.js +1 -1
- package/esm2015/plugins/code/code.component.js +4 -1
- package/esm2015/plugins/common/block-card.plugin.js +51 -5
- package/esm2015/plugins/placeholder/placeholder.component.js +4 -3
- package/esm2015/plugins/table/table.editor.js +10 -2
- package/esm2015/plugins/table/table.plugin.js +53 -19
- package/esm2015/plugins/table/utils/calc-span.js +2 -2
- package/esm2015/plugins/table/utils/normalize-table.js +3 -3
- package/esm2015/plugins/table/utils/table-position.js +5 -2
- package/esm2015/queries/is-empty-content.js +2 -2
- package/esm2015/queries/is-empty-paragraph.js +6 -2
- package/fesm2015/worktile-theia.js +127 -29
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
- package/plugins/table/table.editor.d.ts +2 -0
- package/plugins/table/utils/calc-span.d.ts +1 -1
- package/styles/typo.scss +8 -23
package/package.json
CHANGED
|
@@ -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
|
|
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;
|
package/styles/typo.scss
CHANGED
|
@@ -1,32 +1,26 @@
|
|
|
1
1
|
@use 'sass:math';
|
|
2
|
-
|
|
3
2
|
$default-text-space: 10px; // text white space 18(distance between paragrahp) - 8(block margin)
|
|
4
|
-
|
|
5
3
|
$headline-one-size: 28px;
|
|
6
4
|
$headline-two-size: 24px;
|
|
7
5
|
$headline-three-size: 20px;
|
|
8
6
|
$headline-four-size: 18px;
|
|
9
7
|
$headline-five-size: 16px;
|
|
10
|
-
|
|
11
8
|
$headline-one-lineHeight: 40px;
|
|
12
9
|
$headline-two-lineHeight: 38px;
|
|
13
10
|
$headline-three-lineHeight: 34px;
|
|
14
11
|
$headline-four-lineHeight: 30px;
|
|
15
12
|
$headline-five-lineHeight: 28px;
|
|
16
13
|
$headline-six-lineHeight: 26px;
|
|
17
|
-
|
|
18
14
|
$the-font-size-base: 14px;
|
|
19
15
|
$block-mb: 8px;
|
|
20
16
|
$block-line-heith: 24px;
|
|
21
17
|
$nav-item-margin: 5px;
|
|
22
18
|
$selection-background: rgba($color: $primary, $alpha: 0.3);
|
|
23
|
-
|
|
24
19
|
.the-editor-typo {
|
|
25
20
|
font-size: $the-font-size-base;
|
|
26
21
|
min-height: 140px;
|
|
27
22
|
padding: 28px 30px;
|
|
28
23
|
word-break: break-all;
|
|
29
|
-
|
|
30
24
|
h1,
|
|
31
25
|
h2,
|
|
32
26
|
h3,
|
|
@@ -59,7 +53,6 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
|
|
|
59
53
|
line-height: $headline-six-lineHeight;
|
|
60
54
|
font-size: $the-font-size-base;
|
|
61
55
|
}
|
|
62
|
-
|
|
63
56
|
// margin
|
|
64
57
|
ul,
|
|
65
58
|
ol,
|
|
@@ -68,10 +61,12 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
|
|
|
68
61
|
padding: 0;
|
|
69
62
|
li {
|
|
70
63
|
margin-left: 2em;
|
|
71
|
-
margin-bottom:
|
|
64
|
+
margin-bottom: math.div($block-mb, 2);
|
|
65
|
+
&:last-child {
|
|
66
|
+
margin-bottom: 0;
|
|
67
|
+
}
|
|
72
68
|
}
|
|
73
69
|
}
|
|
74
|
-
|
|
75
70
|
blockquote {
|
|
76
71
|
margin-left: 0;
|
|
77
72
|
margin-right: 0;
|
|
@@ -79,7 +74,6 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
|
|
|
79
74
|
padding-left: 10px !important;
|
|
80
75
|
border-left: 4px solid $gray-200;
|
|
81
76
|
}
|
|
82
|
-
|
|
83
77
|
.the-hr {
|
|
84
78
|
border: 1px solid transparent;
|
|
85
79
|
padding: 18px 0;
|
|
@@ -98,13 +92,9 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
|
|
|
98
92
|
cursor: text;
|
|
99
93
|
}
|
|
100
94
|
}
|
|
101
|
-
|
|
102
95
|
&.pointer-paint {
|
|
103
|
-
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAUCAYAAACTQC2+AAAABGdBTUEAALGPC/xhBQAAATtJREFUSA3dlTFLA0EQhU+jlSkEG63EYGdlZZFG7QUbSyG/QP/C/Q0rqzQWQX+BwUKwtrexEFRQtFSI35NZWDa3soOHhQ8eM/v2zWw2N9xVVVUdwXUYoFxaq5il2wa8hvtG5dJaxYx16xFvLN8i3lmehiFC6Y94wbsTGsxZosajKA/7aewjrKZiyTocJO9DSYHT82r+YXyQs0eRfYBrD/Y1DB58OMyfeM/hrWq8N9qlZkmFBXiPPd6D7ikWUxwjrKWirTeJkzDeNYttKIxhDUuxiFGjfAnfMkUX3hs19emYqFt9P48mU6zVLEQPFjCfwgk8gyuwEd6pS5t0EQYmHhCXLZ8Kvz1oqmFO+H8HxVOXfZC5vwNd46y3xbx5ni1mQ4+dJ6NyDw4xX0GN9484YfcRhg+fcmmt408+5V99wSyVTWN94gAAAABJRU5ErkJggg==)
|
|
104
|
-
5 10,
|
|
105
|
-
text;
|
|
96
|
+
cursor: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABoAAAAUCAYAAACTQC2+AAAABGdBTUEAALGPC/xhBQAAATtJREFUSA3dlTFLA0EQhU+jlSkEG63EYGdlZZFG7QUbSyG/QP/C/Q0rqzQWQX+BwUKwtrexEFRQtFSI35NZWDa3soOHhQ8eM/v2zWw2N9xVVVUdwXUYoFxaq5il2wa8hvtG5dJaxYx16xFvLN8i3lmehiFC6Y94wbsTGsxZosajKA/7aewjrKZiyTocJO9DSYHT82r+YXyQs0eRfYBrD/Y1DB58OMyfeM/hrWq8N9qlZkmFBXiPPd6D7ikWUxwjrKWirTeJkzDeNYttKIxhDUuxiFGjfAnfMkUX3hs19emYqFt9P48mU6zVLEQPFjCfwgk8gyuwEd6pS5t0EQYmHhCXLZ8Kvz1oqmFO+H8HxVOXfZC5vwNd46y3xbx5ni1mQ4+dJ6NyDw4xX0GN9484YfcRhg+fcmmt408+5V99wSyVTWN94gAAAABJRU5ErkJggg==) 5 10, text;
|
|
106
97
|
}
|
|
107
|
-
|
|
108
98
|
code {
|
|
109
99
|
margin: 0 4px;
|
|
110
100
|
padding: 2px 3px;
|
|
@@ -118,7 +108,6 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
|
|
|
118
108
|
text-indent: 0;
|
|
119
109
|
color: $gray-700;
|
|
120
110
|
}
|
|
121
|
-
|
|
122
111
|
.slate-element-hr,
|
|
123
112
|
.slate-element-code,
|
|
124
113
|
.slate-element-image,
|
|
@@ -131,7 +120,6 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
|
|
|
131
120
|
height: auto !important;
|
|
132
121
|
}
|
|
133
122
|
}
|
|
134
|
-
|
|
135
123
|
.slate-block-card {
|
|
136
124
|
.card-left,
|
|
137
125
|
.card-right {
|
|
@@ -144,7 +132,6 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
|
|
|
144
132
|
bottom: 15px;
|
|
145
133
|
}
|
|
146
134
|
}
|
|
147
|
-
|
|
148
135
|
&.slate-block-card-hr {
|
|
149
136
|
.card-left,
|
|
150
137
|
.card-right {
|
|
@@ -152,7 +139,6 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
|
|
|
152
139
|
}
|
|
153
140
|
}
|
|
154
141
|
}
|
|
155
|
-
|
|
156
142
|
.slate-element-table-content,
|
|
157
143
|
.slate-element-paragraph {
|
|
158
144
|
line-height: $block-line-heith;
|
|
@@ -164,11 +150,11 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
|
|
|
164
150
|
.CodeMirror-focused .CodeMirror-selected {
|
|
165
151
|
background: $selection-background;
|
|
166
152
|
}
|
|
167
|
-
|
|
153
|
+
::-moz-selection {
|
|
168
154
|
/* Code for Firefox */
|
|
169
155
|
background: $selection-background;
|
|
170
156
|
}
|
|
171
|
-
|
|
157
|
+
::selection {
|
|
172
158
|
background: $selection-background;
|
|
173
159
|
}
|
|
174
160
|
.thy-icon-nav .thy-icon-nav-link {
|
|
@@ -180,10 +166,9 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
|
|
|
180
166
|
.remove-link.thy-icon-nav-link:hover {
|
|
181
167
|
color: $danger;
|
|
182
168
|
}
|
|
183
|
-
|
|
184
169
|
@for $i from 1 through 24 {
|
|
185
170
|
.indent-#{$i * 2} {
|
|
186
171
|
margin-left: 2em * $i;
|
|
187
172
|
}
|
|
188
173
|
}
|
|
189
|
-
}
|
|
174
|
+
}
|