@knime/kds-code-editor 2.7.0 → 2.8.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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @knime/kds-code-editor
2
2
 
3
+ ## 2.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 45ee099: `KdsCodeEditor`: added `footer` slot rendering additional content inside the editor frame, below the code area (e.g. the output-column controls of the KNIME expression nodes).
8
+ - ae6b58a: Add `KdsConsole` — a read-only xterm.js terminal component with KDS-token-driven light/dark theme, debounced auto-fit, Ctrl+C copy, Escape blur, and auto-scroll on new output. Exports `KdsConsole`, `KdsConsoleHandler`, and `KdsConsoleText`.
9
+
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies [2920e61]
13
+ - Updated dependencies [3e99bd2]
14
+ - @knime/kds-components@2.8.0
15
+ - @knime/kds-styles@2.8.0
16
+
3
17
  ## 2.7.0
4
18
 
5
19
  ### Minor Changes
package/dist/index.css CHANGED
@@ -1,13 +1,13 @@
1
1
 
2
2
  .kds-code-editor {
3
- &[data-v-9af67a44] {
3
+ &[data-v-c9256fb0] {
4
4
  display: flex;
5
5
  flex-direction: column;
6
6
 
7
7
  /* No row bounds set: fill the width and height of the container. */
8
8
  }
9
9
  .editor {
10
- &[data-v-9af67a44] {
10
+ &[data-v-c9256fb0] {
11
11
  display: flex;
12
12
  flex-direction: column;
13
13
  overflow: hidden;
@@ -17,13 +17,16 @@
17
17
 
18
18
  /* Only outline the whole editor when the code area (Monaco) is focused —
19
19
  header buttons keep their own focus ring. */
20
+
21
+ /* Keeps its natural height — in fill mode only the code area grows /
22
+ shrinks with the container. */
20
23
  }
21
- &.focused[data-v-9af67a44] {
24
+ &.focused[data-v-c9256fb0] {
22
25
  outline: var(--kds-border-action-focused);
23
26
  outline-offset: var(--kds-spacing-offset-focus);
24
27
  }
25
28
  .header {
26
- &[data-v-9af67a44] {
29
+ &[data-v-c9256fb0] {
27
30
  display: flex;
28
31
  align-items: center;
29
32
  justify-content: space-between;
@@ -31,7 +34,7 @@
31
34
  var(--kds-spacing-container-0-5x) var(--kds-spacing-container-0-25x)
32
35
  var(--kds-spacing-container-0-75x);
33
36
  }
34
- .left-block[data-v-9af67a44] {
37
+ .left-block[data-v-c9256fb0] {
35
38
  display: flex;
36
39
  flex: 1;
37
40
  gap: var(--kds-spacing-container-0-25x);
@@ -42,13 +45,13 @@
42
45
  buttons are present (matches the small button height). */
43
46
  min-height: var(--kds-dimension-component-height-1-5x);
44
47
  }
45
- .action-buttons[data-v-9af67a44] {
48
+ .action-buttons[data-v-c9256fb0] {
46
49
  display: flex;
47
50
  flex-shrink: 0;
48
51
  gap: var(--kds-spacing-container-0-12x);
49
52
  align-items: center;
50
53
  }
51
- .title[data-v-9af67a44] {
54
+ .title[data-v-c9256fb0] {
52
55
  overflow: hidden;
53
56
  text-overflow: ellipsis;
54
57
  font: var(--kds-font-base-interactive-small);
@@ -56,25 +59,262 @@
56
59
  white-space: nowrap;
57
60
  }
58
61
  }
59
- &.error .header[data-v-9af67a44] {
62
+ &.error .header[data-v-c9256fb0] {
60
63
  background-color: var(--kds-color-background-static-danger-muted);
61
64
  }
62
- &.warning .header[data-v-9af67a44] {
65
+ &.warning .header[data-v-c9256fb0] {
63
66
  background-color: var(--kds-color-background-static-warning-muted);
64
67
  }
65
- .code[data-v-9af67a44] {
68
+ .code[data-v-c9256fb0] {
69
+ width: 100%;
70
+ }
71
+ .footer[data-v-c9256fb0] {
72
+ flex-shrink: 0;
66
73
  width: 100%;
67
74
  }
68
75
  }
69
76
  &.fill {
70
- &[data-v-9af67a44] {
77
+ &[data-v-c9256fb0] {
71
78
  width: 100%;
72
79
  height: 100%;
73
80
  }
74
- .editor[data-v-9af67a44],
75
- .code[data-v-9af67a44] {
81
+ .editor[data-v-c9256fb0],
82
+ .code[data-v-c9256fb0] {
76
83
  flex: 1 1 auto;
77
84
  min-height: 0;
78
85
  }
79
86
  }
80
87
  }
88
+ /**
89
+ * Copyright (c) 2014 The xterm.js authors. All rights reserved.
90
+ * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
91
+ * https://github.com/chjj/term.js
92
+ * @license MIT
93
+ *
94
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
95
+ * of this software and associated documentation files (the "Software"), to deal
96
+ * in the Software without restriction, including without limitation the rights
97
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
98
+ * copies of the Software, and to permit persons to whom the Software is
99
+ * furnished to do so, subject to the following conditions:
100
+ *
101
+ * The above copyright notice and this permission notice shall be included in
102
+ * all copies or substantial portions of the Software.
103
+ *
104
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
105
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
106
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
107
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
108
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
109
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
110
+ * THE SOFTWARE.
111
+ *
112
+ * Originally forked from (with the author's permission):
113
+ * Fabrice Bellard's javascript vt100 for jslinux:
114
+ * http://bellard.org/jslinux/
115
+ * Copyright (c) 2011 Fabrice Bellard
116
+ * The original design remains. The terminal itself
117
+ * has been extended to include xterm CSI codes, among
118
+ * other features.
119
+ */
120
+
121
+ /**
122
+ * Default styles for xterm.js
123
+ */
124
+
125
+ .xterm {
126
+ cursor: text;
127
+ position: relative;
128
+ user-select: none;
129
+ -ms-user-select: none;
130
+ -webkit-user-select: none;
131
+ }
132
+
133
+ .xterm.focus,
134
+ .xterm:focus {
135
+ outline: none;
136
+ }
137
+
138
+ .xterm .xterm-helpers {
139
+ position: absolute;
140
+ top: 0;
141
+ /**
142
+ * The z-index of the helpers must be higher than the canvases in order for
143
+ * IMEs to appear on top.
144
+ */
145
+ z-index: 5;
146
+ }
147
+
148
+ .xterm .xterm-helper-textarea {
149
+ padding: 0;
150
+ border: 0;
151
+ margin: 0;
152
+ /* Move textarea out of the screen to the far left, so that the cursor is not visible */
153
+ position: absolute;
154
+ opacity: 0;
155
+ left: -9999em;
156
+ top: 0;
157
+ width: 0;
158
+ height: 0;
159
+ z-index: -5;
160
+ /** Prevent wrapping so the IME appears against the textarea at the correct position */
161
+ white-space: nowrap;
162
+ overflow: hidden;
163
+ resize: none;
164
+ }
165
+
166
+ .xterm .composition-view {
167
+ /* TODO: Composition position got messed up somewhere */
168
+ background: #000;
169
+ color: #FFF;
170
+ display: none;
171
+ position: absolute;
172
+ white-space: nowrap;
173
+ z-index: 1;
174
+ }
175
+
176
+ .xterm .composition-view.active {
177
+ display: block;
178
+ }
179
+
180
+ .xterm .xterm-viewport {
181
+ /* On OS X this is required in order for the scroll bar to appear fully opaque */
182
+ background-color: #000;
183
+ overflow-y: scroll;
184
+ cursor: default;
185
+ position: absolute;
186
+ right: 0;
187
+ left: 0;
188
+ top: 0;
189
+ bottom: 0;
190
+ }
191
+
192
+ .xterm .xterm-screen {
193
+ position: relative;
194
+ }
195
+
196
+ .xterm .xterm-screen canvas {
197
+ position: absolute;
198
+ left: 0;
199
+ top: 0;
200
+ }
201
+
202
+ .xterm .xterm-scroll-area {
203
+ visibility: hidden;
204
+ }
205
+
206
+ .xterm-char-measure-element {
207
+ display: inline-block;
208
+ visibility: hidden;
209
+ position: absolute;
210
+ top: 0;
211
+ left: -9999em;
212
+ line-height: normal;
213
+ }
214
+
215
+ .xterm.enable-mouse-events {
216
+ /* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
217
+ cursor: default;
218
+ }
219
+
220
+ .xterm.xterm-cursor-pointer,
221
+ .xterm .xterm-cursor-pointer {
222
+ cursor: pointer;
223
+ }
224
+
225
+ .xterm.column-select.focus {
226
+ /* Column selection mode */
227
+ cursor: crosshair;
228
+ }
229
+
230
+ .xterm .xterm-accessibility:not(.debug),
231
+ .xterm .xterm-message {
232
+ position: absolute;
233
+ left: 0;
234
+ top: 0;
235
+ bottom: 0;
236
+ right: 0;
237
+ z-index: 10;
238
+ color: transparent;
239
+ pointer-events: none;
240
+ }
241
+
242
+ .xterm .xterm-accessibility-tree:not(.debug) *::selection {
243
+ color: transparent;
244
+ }
245
+
246
+ .xterm .xterm-accessibility-tree {
247
+ user-select: text;
248
+ white-space: pre;
249
+ }
250
+
251
+ .xterm .live-region {
252
+ position: absolute;
253
+ left: -9999px;
254
+ width: 1px;
255
+ height: 1px;
256
+ overflow: hidden;
257
+ }
258
+
259
+ .xterm-dim {
260
+ /* Dim should not apply to background, so the opacity of the foreground color is applied
261
+ * explicitly in the generated class and reset to 1 here */
262
+ opacity: 1 !important;
263
+ }
264
+
265
+ .xterm-underline-1 { text-decoration: underline; }
266
+ .xterm-underline-2 { text-decoration: double underline; }
267
+ .xterm-underline-3 { text-decoration: wavy underline; }
268
+ .xterm-underline-4 { text-decoration: dotted underline; }
269
+ .xterm-underline-5 { text-decoration: dashed underline; }
270
+
271
+ .xterm-overline {
272
+ text-decoration: overline;
273
+ }
274
+
275
+ .xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
276
+ .xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
277
+ .xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
278
+ .xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
279
+ .xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }
280
+
281
+ .xterm-strikethrough {
282
+ text-decoration: line-through;
283
+ }
284
+
285
+ .xterm-screen .xterm-decoration-container .xterm-decoration {
286
+ z-index: 6;
287
+ position: absolute;
288
+ }
289
+
290
+ .xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
291
+ z-index: 7;
292
+ }
293
+
294
+ .xterm-decoration-overview-ruler {
295
+ z-index: 8;
296
+ position: absolute;
297
+ top: 0;
298
+ right: 0;
299
+ pointer-events: none;
300
+ }
301
+
302
+ .xterm-decoration-top {
303
+ z-index: 2;
304
+ position: relative;
305
+ }
306
+
307
+ .terminal {
308
+ &[data-v-c23d8d58] {
309
+ height: 100%;
310
+ overflow: hidden;
311
+ border-radius: var(--kds-border-radius-container-0-12x);
312
+
313
+ /* Only paint a focus ring when the user navigated to the terminal with the
314
+ keyboard (mouse focus doesn't need the extra ring). */
315
+ }
316
+ &.focus-painted[data-v-c23d8d58]:focus-within {
317
+ outline: var(--kds-border-action-focused);
318
+ outline-offset: var(--kds-spacing-offset-focus);
319
+ }
320
+ }