@worktile/theia 1.2.14 → 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.
@@ -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.14",
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
  }
@@ -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
+ }
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} {
@@ -0,0 +1,2 @@
1
+ export declare const IS_MAC: boolean;
2
+ export declare const CONTROL_KEY: string;
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';