@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
@@ -126,6 +126,12 @@ $thy-icon-nav-link-margin-right: 5px;
126
126
  text-indent: 0;
127
127
  color: $gray-700;
128
128
  }
129
+
130
+ @each $size in 12, 13, 14, 15, 16, 19, 22, 24, 29, 32, 40, 48 {
131
+ [the-font-size="#{$size}"] {
132
+ font-size: #{$size}px;
133
+ }
134
+ }
129
135
  }
130
136
 
131
137
  .the-nav-split-line {
package/styles/index.scss CHANGED
@@ -18,3 +18,4 @@
18
18
  @import '../plugins/quick-insert/components/quick-insert.component.scss';
19
19
  @import '../plugins/quick-insert/components/quick-toolbar/quick-toolbar.component.scss';
20
20
  @import '../plugins/placeholder/placeholder.component.scss';
21
+ @import '../plugins/font-size/toolbar-item.component.scss';
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,18 +61,19 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
68
61
  padding: 0;
69
62
  li {
70
63
  margin-left: 2em;
71
- margin-bottom: 4px;
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;
78
73
  color: $gray-600;
79
74
  padding-left: 10px !important;
80
- border-left: 4px solid #eee;
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;
@@ -88,7 +82,7 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
88
82
  hr {
89
83
  box-sizing: border-box;
90
84
  width: 100%;
91
- border-top: 1px solid #eee;
85
+ border-top: 1px solid $gray-200;
92
86
  padding: 0;
93
87
  margin: 0;
94
88
  }
@@ -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
- ::-moz-selection {
153
+ ::-moz-selection {
168
154
  /* Code for Firefox */
169
155
  background: $selection-background;
170
156
  }
171
- ::selection {
157
+ ::selection {
172
158
  background: $selection-background;
173
159
  }
174
160
  .thy-icon-nav .thy-icon-nav-link {
@@ -177,10 +163,12 @@ $selection-background: rgba($color: $primary, $alpha: 0.3);
177
163
  margin-right: 0;
178
164
  }
179
165
  }
180
-
166
+ .remove-link.thy-icon-nav-link:hover {
167
+ color: $danger;
168
+ }
181
169
  @for $i from 1 through 24 {
182
170
  .indent-#{$i * 2} {
183
171
  margin-left: 2em * $i;
184
172
  }
185
173
  }
186
- }
174
+ }
@@ -8,4 +8,5 @@ export declare const setMarks: (editor: Editor, marks: {
8
8
  color?: any;
9
9
  "background-color"?: any;
10
10
  "code-line"?: any;
11
+ "font-size"?: any;
11
12
  }, at?: Path | Point | Range) => void;
@@ -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';