@worktile/theia 2.3.0-next.2 → 2.3.1
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 +23 -7
- package/bundles/worktile-theia.umd.js.map +1 -1
- package/constants/default.d.ts +0 -1
- package/esm2015/constants/default.js +1 -1
- package/esm2015/editor.component.js +13 -3
- package/esm2015/plugins/image/image.component.js +8 -4
- package/esm2015/plugins/quick-insert/components/quick-insert.component.js +2 -2
- package/esm2015/utils/dom.js +5 -3
- package/fesm2015/worktile-theia.js +23 -8
- package/fesm2015/worktile-theia.js.map +1 -1
- package/package.json +1 -1
- package/plugins/image/image.component.scss +0 -10
- package/styles/editor.scss +152 -133
- package/styles/typo.scss +6 -0
package/package.json
CHANGED
package/styles/editor.scss
CHANGED
|
@@ -61,139 +61,139 @@ $thy-icon-nav-link-margin-right: 5px;
|
|
|
61
61
|
overflow-y: scroll;
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
64
|
+
}
|
|
65
|
+
.the-editor-typo{
|
|
66
|
+
// list style
|
|
67
|
+
ul,
|
|
68
|
+
ol,
|
|
69
|
+
li {
|
|
70
|
+
list-style: inherit;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
ol {
|
|
74
|
+
list-style-type: decimal;
|
|
75
|
+
|
|
76
|
+
ol {
|
|
77
|
+
list-style-type: lower-alpha;
|
|
78
|
+
|
|
79
|
+
ol {
|
|
80
|
+
list-style-type: lower-roman;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
ul {
|
|
86
|
+
list-style-type: disc;
|
|
87
|
+
|
|
88
|
+
ul {
|
|
89
|
+
list-style-type: circle;
|
|
90
|
+
|
|
91
|
+
ul {
|
|
92
|
+
list-style-type: square;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
[the-underlined][the-strike] {
|
|
98
|
+
text-decoration: underline line-through;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
[the-strike] {
|
|
102
|
+
text-decoration: line-through;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
[the-underlined] {
|
|
106
|
+
text-decoration: underline;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
[the-italic] {
|
|
110
|
+
font-style: italic;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
[the-bold] {
|
|
114
|
+
font-weight: bold;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
[the-code-line] {
|
|
118
|
+
margin: 0 4px;
|
|
119
|
+
padding: 2px 3px;
|
|
120
|
+
border: 1px solid $gray-300;
|
|
121
|
+
border-radius: 2px;
|
|
122
|
+
font-family: monospace;
|
|
123
|
+
font-size: inherit;
|
|
124
|
+
background-color: rgba(243, 243, 243, 0.8);
|
|
125
|
+
line-height: inherit;
|
|
126
|
+
word-wrap: break-word;
|
|
127
|
+
text-indent: 0;
|
|
128
|
+
color: $gray-700;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.leaf-with-placeholder {
|
|
132
|
+
background-color: $white;
|
|
133
|
+
}
|
|
134
|
+
[data-slate-placeholder] {
|
|
135
|
+
color: initial;
|
|
136
|
+
font-weight: initial;
|
|
137
|
+
font-style: initial;
|
|
138
|
+
text-decoration: initial;
|
|
139
|
+
background-color: initial;
|
|
140
|
+
overflow: hidden;
|
|
141
|
+
text-overflow: ellipsis;
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
// list: fontSize, li marginLeft, multiDigit li marginLeft
|
|
146
|
+
@each $size, $liMl, $liMultiDigitMl in (12, 13, 14, 15, 16, 18, 20, (24 null 35px), (28 null 42px), (32 33px 50px), (40 40px 62px), (48 50px 78px)) {
|
|
147
|
+
[the-font-size="#{$size}"] {
|
|
148
|
+
font-size: #{$size}px;
|
|
149
|
+
line-height: $font-size-line-height;
|
|
150
|
+
}
|
|
151
|
+
.slate-element-list-item {
|
|
152
|
+
&.font-size-#{$size} {
|
|
153
|
+
&::marker {
|
|
154
|
+
font-size: #{$size}px;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
.slate-element-numbered-list {
|
|
159
|
+
.slate-element-list-item {
|
|
160
|
+
&.font-size-#{$size} {
|
|
161
|
+
margin-left: $liMl;
|
|
162
|
+
|
|
163
|
+
&[data-multi-digit] {
|
|
164
|
+
margin-left: $liMultiDigitMl;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
.slate-element-bulleted-list {
|
|
170
|
+
.slate-element-list-item {
|
|
171
|
+
&.font-size-#{$size} {
|
|
172
|
+
@if $size == 40 {
|
|
173
|
+
margin-left: 2.2em;
|
|
174
|
+
}
|
|
175
|
+
@if $size == 48 {
|
|
176
|
+
margin-left: 2.5em;
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// indent
|
|
184
|
+
@for $i from 1 through 17 {
|
|
185
|
+
[the-indent="#{$i}"] {
|
|
186
|
+
padding-left: $i * 2em;
|
|
187
|
+
}
|
|
188
|
+
// list
|
|
189
|
+
ol[the-level="#{$i}"],
|
|
190
|
+
ul[the-level="#{$i}"] {
|
|
191
|
+
margin-left: $i * 2em;
|
|
192
|
+
}
|
|
193
|
+
.the-check-item[the-level="#{$i}"] {
|
|
194
|
+
padding-left: calc(#{$i * 2em} + 2em);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
197
|
}
|
|
198
198
|
|
|
199
199
|
.the-nav-split-line {
|
|
@@ -281,11 +281,30 @@ $thy-icon-nav-link-margin-right: 5px;
|
|
|
281
281
|
}
|
|
282
282
|
}
|
|
283
283
|
|
|
284
|
+
.the-block-toolbar {
|
|
285
|
+
.thy-popover-container {
|
|
286
|
+
min-width: auto;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
|
|
284
291
|
.the-block-toolbar-popover {
|
|
285
292
|
display: flex;
|
|
286
293
|
padding: 5px 10px;
|
|
287
294
|
background: $white;
|
|
288
295
|
box-shadow: $box-shadow;
|
|
296
|
+
|
|
297
|
+
.thy-icon-nav .thy-icon-nav-link {
|
|
298
|
+
margin-right: $thy-icon-nav-link-margin-right;
|
|
299
|
+
|
|
300
|
+
&:last-child {
|
|
301
|
+
margin-right: 0;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
&.remove-link:hover {
|
|
305
|
+
@include remove-link-hover();
|
|
306
|
+
}
|
|
307
|
+
}
|
|
289
308
|
}
|
|
290
309
|
|
|
291
310
|
@mixin the-toolbar-active {
|
package/styles/typo.scss
CHANGED
|
@@ -220,6 +220,12 @@ $font-size-line-height: 1.5;
|
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
222
|
|
|
223
|
+
// 处理混排时 placeholder 的样式
|
|
224
|
+
.slate-element-paragraph {
|
|
225
|
+
white-space: pre-wrap;
|
|
226
|
+
overflow: hidden;
|
|
227
|
+
}
|
|
228
|
+
|
|
223
229
|
|
|
224
230
|
// 处理相邻图文混排时的布局
|
|
225
231
|
[layout^="wrap-"] + [layout^="wrap-"] + .slate-block {
|