@lijian-ui/dsh-term 0.3.0 → 0.3.2
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/lib/client.js +24 -14
- package/lib/client.js.map +1 -1
- package/lib/tsconfig.client.tsbuildinfo +1 -1
- package/lib/tsconfig.host.tsbuildinfo +1 -1
- package/lib/types/client/client-i18n.d.ts +20 -0
- package/lib/types/client/client-i18n.d.ts.map +1 -1
- package/lib/types/client/index.d.ts +2 -2
- package/lib/types/client/index.d.ts.map +1 -1
- package/lib/types/client/term/TerminalPanel.d.ts +4 -3
- package/lib/types/client/term/TerminalPanel.d.ts.map +1 -1
- package/lib/types/client/term/api.d.ts +12 -2
- package/lib/types/client/term/api.d.ts.map +1 -1
- package/lib/types/client/term/chat-helper.d.ts +14 -0
- package/lib/types/client/term/chat-helper.d.ts.map +1 -0
- package/lib/types/core/types.d.ts +23 -3
- package/lib/types/core/types.d.ts.map +1 -1
- package/lib/types/gateway/i18n.d.ts.map +1 -1
- package/lib/types/host/pty-service.d.ts +31 -7
- package/lib/types/host/pty-service.d.ts.map +1 -1
- package/lib/types/host/routes.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/client/term/DockItem.tsx +1 -1
- package/src/client/term/TerminalPanel.tsx +574 -566
- package/src/client/term/animated-dock.module.css +3 -3
- package/src/client/term/chat-helper.ts +1 -1
- package/src/client/term/term.module.css +49 -43
- package/src/client/term/xterm-styles.ts +182 -182
|
@@ -42,9 +42,9 @@
|
|
|
42
42
|
|
|
43
43
|
/* Open-panel highlight: primary tint + thin ring to mirror the live state. */
|
|
44
44
|
.item.active {
|
|
45
|
-
background: var(--
|
|
45
|
+
background: var(--dsw-alias-state-business-primary);
|
|
46
46
|
color: #ffffff;
|
|
47
|
-
box-shadow: 0 0 0 1.5px var(--
|
|
47
|
+
box-shadow: 0 0 0 1.5px var(--dsw-alias-state-business-primary);
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/* Hover tooltip — the small label that floats above each icon (21st.dev style). */
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
font-size: 12px;
|
|
58
58
|
line-height: 1.4;
|
|
59
59
|
white-space: nowrap;
|
|
60
|
-
color: var(--
|
|
60
|
+
color: var(--dsw-alias-label-primary);
|
|
61
61
|
background: rgba(20, 20, 30, 0.9);
|
|
62
62
|
border: 1px solid rgba(255, 255, 255, 0.12);
|
|
63
63
|
border-radius: 6px;
|
|
@@ -19,7 +19,7 @@ export function appendToConversationDraft(ctx: ClientContext, text: string): boo
|
|
|
19
19
|
if (sessionId === undefined) return false
|
|
20
20
|
const actx = ctx.sessions.scope(sessionId)
|
|
21
21
|
if (actx === undefined) return false
|
|
22
|
-
const conversation = (ctx as unknown as { conversation
|
|
22
|
+
const conversation = (ctx as unknown as { get(name: string): unknown }).get('conversation') as { input: { for(c: unknown): { state: { getSnapshot(): { draft: string } }; setDraft(s: string): void } } } | undefined
|
|
23
23
|
if (conversation === undefined) return false
|
|
24
24
|
const input = conversation.input.for(actx as unknown as ClientContext)
|
|
25
25
|
const draft = input.state.getSnapshot().draft
|
|
@@ -6,14 +6,20 @@
|
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
8
|
.col {
|
|
9
|
+
/* Positioned anchor: the floating “添加到对话” button is absolutely
|
|
10
|
+
positioned with panel-relative coordinates (TerminalPanel onMouseUp),
|
|
11
|
+
so this element must be its offset parent — without it the button
|
|
12
|
+
resolves against whatever outer ancestor happens to be positioned
|
|
13
|
+
(the app frame / shell chrome) and lands near the far-left dock. */
|
|
14
|
+
position: relative;
|
|
9
15
|
width: 100%;
|
|
10
16
|
height: 100%;
|
|
11
17
|
display: flex;
|
|
12
18
|
flex-direction: column;
|
|
13
|
-
border-left: 1px solid var(--
|
|
14
|
-
background: var(--
|
|
19
|
+
border-left: 1px solid var(--dsw-alias-border-l2);
|
|
20
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
15
21
|
overflow: hidden;
|
|
16
|
-
font-family: var(--
|
|
22
|
+
font-family: var(--dsw-font-family);
|
|
17
23
|
}
|
|
18
24
|
|
|
19
25
|
.title {
|
|
@@ -21,7 +27,7 @@
|
|
|
21
27
|
padding: 0 8px;
|
|
22
28
|
font-size: 12px;
|
|
23
29
|
font-weight: 600;
|
|
24
|
-
color: var(--
|
|
30
|
+
color: var(--dsw-alias-label-primary);
|
|
25
31
|
user-select: none;
|
|
26
32
|
}
|
|
27
33
|
|
|
@@ -30,7 +36,7 @@
|
|
|
30
36
|
width: 1px;
|
|
31
37
|
height: 16px;
|
|
32
38
|
margin: 0 4px;
|
|
33
|
-
background: var(--
|
|
39
|
+
background: var(--dsw-alias-border-l2);
|
|
34
40
|
}
|
|
35
41
|
|
|
36
42
|
.toolbar {
|
|
@@ -39,8 +45,8 @@
|
|
|
39
45
|
gap: 4px;
|
|
40
46
|
height: 32px;
|
|
41
47
|
padding: 0 6px;
|
|
42
|
-
border-bottom: 1px solid var(--
|
|
43
|
-
background: var(--
|
|
48
|
+
border-bottom: 1px solid var(--dsw-alias-border-l2);
|
|
49
|
+
background: var(--dsw-alias-bg-base);
|
|
44
50
|
flex: none;
|
|
45
51
|
}
|
|
46
52
|
|
|
@@ -53,15 +59,15 @@
|
|
|
53
59
|
border-radius: 5px;
|
|
54
60
|
border: none;
|
|
55
61
|
background: transparent;
|
|
56
|
-
color: var(--
|
|
62
|
+
color: var(--dsw-alias-label-secondary);
|
|
57
63
|
font-size: 12px;
|
|
58
64
|
cursor: pointer;
|
|
59
65
|
max-width: 200px;
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
.tabActive {
|
|
63
|
-
background: var(--
|
|
64
|
-
color: var(--
|
|
69
|
+
background: var(--dsw-alias-bg-layer-2);
|
|
70
|
+
color: var(--dsw-alias-label-primary);
|
|
65
71
|
}
|
|
66
72
|
|
|
67
73
|
.tabClose {
|
|
@@ -73,15 +79,15 @@
|
|
|
73
79
|
border: none;
|
|
74
80
|
border-radius: 3px;
|
|
75
81
|
background: transparent;
|
|
76
|
-
color: var(--
|
|
82
|
+
color: var(--dsw-alias-label-tertiary);
|
|
77
83
|
font-size: 11px;
|
|
78
84
|
line-height: 1;
|
|
79
85
|
cursor: pointer;
|
|
80
86
|
}
|
|
81
87
|
|
|
82
88
|
.tabClose:hover {
|
|
83
|
-
background: var(--
|
|
84
|
-
color: var(--
|
|
89
|
+
background: var(--dsw-alias-bg-layer-3);
|
|
90
|
+
color: var(--dsw-alias-label-primary);
|
|
85
91
|
}
|
|
86
92
|
|
|
87
93
|
.addTab {
|
|
@@ -93,13 +99,13 @@
|
|
|
93
99
|
border: none;
|
|
94
100
|
border-radius: 5px;
|
|
95
101
|
background: transparent;
|
|
96
|
-
color: var(--
|
|
102
|
+
color: var(--dsw-alias-label-secondary);
|
|
97
103
|
font-size: 14px;
|
|
98
104
|
cursor: pointer;
|
|
99
105
|
}
|
|
100
106
|
|
|
101
107
|
.addTab:hover {
|
|
102
|
-
background: var(--
|
|
108
|
+
background: var(--dsw-alias-bg-layer-2);
|
|
103
109
|
}
|
|
104
110
|
|
|
105
111
|
.spacer {
|
|
@@ -115,20 +121,20 @@
|
|
|
115
121
|
border: none;
|
|
116
122
|
border-radius: 5px;
|
|
117
123
|
background: transparent;
|
|
118
|
-
color: var(--
|
|
124
|
+
color: var(--dsw-alias-label-secondary);
|
|
119
125
|
font-size: 13px;
|
|
120
126
|
cursor: pointer;
|
|
121
127
|
}
|
|
122
128
|
|
|
123
129
|
.collapse:hover {
|
|
124
|
-
background: var(--
|
|
130
|
+
background: var(--dsw-alias-bg-layer-2);
|
|
125
131
|
}
|
|
126
132
|
|
|
127
133
|
.stage {
|
|
128
134
|
position: relative;
|
|
129
135
|
flex: 1;
|
|
130
136
|
min-height: 0;
|
|
131
|
-
background: var(--
|
|
137
|
+
background: var(--dsw-alias-bg-base);
|
|
132
138
|
}
|
|
133
139
|
|
|
134
140
|
.termWrap {
|
|
@@ -148,7 +154,7 @@
|
|
|
148
154
|
display: flex;
|
|
149
155
|
align-items: center;
|
|
150
156
|
justify-content: center;
|
|
151
|
-
color: var(--
|
|
157
|
+
color: var(--dsw-alias-label-tertiary);
|
|
152
158
|
font-size: 13px;
|
|
153
159
|
}
|
|
154
160
|
|
|
@@ -156,21 +162,21 @@
|
|
|
156
162
|
flex: none;
|
|
157
163
|
height: 22px;
|
|
158
164
|
padding: 0 6px;
|
|
159
|
-
border: 1px solid var(--
|
|
165
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
160
166
|
border-radius: 5px;
|
|
161
|
-
background: var(--
|
|
162
|
-
color: var(--
|
|
167
|
+
background: var(--dsw-alias-bg-base);
|
|
168
|
+
color: var(--dsw-alias-label-primary);
|
|
163
169
|
font-size: 12px;
|
|
164
170
|
cursor: pointer;
|
|
165
171
|
outline: none;
|
|
166
172
|
}
|
|
167
173
|
|
|
168
174
|
.shellSelect:hover {
|
|
169
|
-
border-color: var(--
|
|
175
|
+
border-color: var(--dsw-alias-border-l1);
|
|
170
176
|
}
|
|
171
177
|
|
|
172
178
|
.shellSelect:focus {
|
|
173
|
-
border-color: var(--
|
|
179
|
+
border-color: var(--dsw-alias-state-business-primary);
|
|
174
180
|
}
|
|
175
181
|
|
|
176
182
|
.reopenBtn {
|
|
@@ -181,16 +187,16 @@
|
|
|
181
187
|
padding: 0 6px;
|
|
182
188
|
border: none;
|
|
183
189
|
border-radius: 5px;
|
|
184
|
-
background: var(--
|
|
185
|
-
color: var(--
|
|
190
|
+
background: var(--dsw-alias-bg-layer-2);
|
|
191
|
+
color: var(--dsw-alias-label-secondary);
|
|
186
192
|
font-size: 12px;
|
|
187
193
|
cursor: pointer;
|
|
188
194
|
gap: 2px;
|
|
189
195
|
}
|
|
190
196
|
|
|
191
197
|
.reopenBtn:hover {
|
|
192
|
-
background: var(--
|
|
193
|
-
color: var(--
|
|
198
|
+
background: var(--dsw-alias-bg-layer-3);
|
|
199
|
+
color: var(--dsw-alias-label-primary);
|
|
194
200
|
}
|
|
195
201
|
|
|
196
202
|
.reopenDropdown {
|
|
@@ -201,9 +207,9 @@
|
|
|
201
207
|
min-width: 180px;
|
|
202
208
|
max-width: 280px;
|
|
203
209
|
padding: 4px 0;
|
|
204
|
-
border: 1px solid var(--
|
|
210
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
205
211
|
border-radius: 8px;
|
|
206
|
-
background: var(--
|
|
212
|
+
background: var(--dsw-alias-bg-base);
|
|
207
213
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
|
|
208
214
|
}
|
|
209
215
|
|
|
@@ -211,7 +217,7 @@
|
|
|
211
217
|
padding: 4px 10px;
|
|
212
218
|
font-size: 11px;
|
|
213
219
|
font-weight: 600;
|
|
214
|
-
color: var(--
|
|
220
|
+
color: var(--dsw-alias-label-tertiary);
|
|
215
221
|
user-select: none;
|
|
216
222
|
}
|
|
217
223
|
|
|
@@ -231,7 +237,7 @@
|
|
|
231
237
|
border: none;
|
|
232
238
|
border-radius: 5px;
|
|
233
239
|
background: transparent;
|
|
234
|
-
color: var(--
|
|
240
|
+
color: var(--dsw-alias-label-primary);
|
|
235
241
|
font-size: 12px;
|
|
236
242
|
cursor: pointer;
|
|
237
243
|
text-align: left;
|
|
@@ -241,7 +247,7 @@
|
|
|
241
247
|
}
|
|
242
248
|
|
|
243
249
|
.reopenItemBtn:hover {
|
|
244
|
-
background: var(--
|
|
250
|
+
background: var(--dsw-alias-bg-layer-2);
|
|
245
251
|
}
|
|
246
252
|
|
|
247
253
|
.reopenItemKill {
|
|
@@ -254,14 +260,14 @@
|
|
|
254
260
|
border: none;
|
|
255
261
|
border-radius: 4px;
|
|
256
262
|
background: transparent;
|
|
257
|
-
color: var(--
|
|
263
|
+
color: var(--dsw-alias-label-tertiary);
|
|
258
264
|
font-size: 13px;
|
|
259
265
|
cursor: pointer;
|
|
260
266
|
}
|
|
261
267
|
|
|
262
268
|
.reopenItemKill:hover {
|
|
263
|
-
background: var(--
|
|
264
|
-
color: var(--
|
|
269
|
+
background: var(--dsw-alias-bg-layer-3);
|
|
270
|
+
color: var(--dsw-alias-label-primary);
|
|
265
271
|
}
|
|
266
272
|
|
|
267
273
|
.addToChatBtn {
|
|
@@ -272,19 +278,19 @@
|
|
|
272
278
|
gap: 4px;
|
|
273
279
|
height: 28px;
|
|
274
280
|
padding: 0 10px;
|
|
275
|
-
border: 1px solid var(--
|
|
281
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
276
282
|
border-radius: 14px;
|
|
277
|
-
background: var(--
|
|
278
|
-
color: var(--
|
|
283
|
+
background: var(--dsw-alias-bg-base);
|
|
284
|
+
color: var(--dsw-alias-label-primary);
|
|
279
285
|
font-size: 12px;
|
|
280
286
|
font-weight: 500;
|
|
281
287
|
cursor: pointer;
|
|
282
|
-
box-shadow:
|
|
288
|
+
box-shadow: var(--dsw-shadow-lv1);
|
|
283
289
|
white-space: nowrap;
|
|
284
290
|
}
|
|
285
291
|
|
|
286
292
|
.addToChatBtn:hover {
|
|
287
|
-
background: var(--
|
|
288
|
-
border-color: var(--
|
|
289
|
-
color: var(--
|
|
293
|
+
background: var(--dsw-alias-bg-layer-2);
|
|
294
|
+
border-color: var(--dsw-alias-state-business-primary);
|
|
295
|
+
color: var(--dsw-alias-state-business-primary);
|
|
290
296
|
}
|
|
@@ -1,182 +1,182 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Inlined xterm.js 5.3.0 core styles (MIT) — injected as a <style> tag at
|
|
3
|
-
* runtime because the client build compiles only *.module.css and the
|
|
4
|
-
* shell's css-modules pipeline rejects a raw :global block with xterm's
|
|
5
|
-
* class names.
|
|
6
|
-
* @module dsh-term/client/term/xterm-styles
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
export const XTERM_CSS: string = `
|
|
10
|
-
.xterm {
|
|
11
|
-
cursor: text;
|
|
12
|
-
position: relative;
|
|
13
|
-
user-select: none;
|
|
14
|
-
-ms-user-select: none;
|
|
15
|
-
-webkit-user-select: none;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
.xterm.focus,
|
|
19
|
-
.xterm:focus {
|
|
20
|
-
outline: none;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.xterm .xterm-helpers {
|
|
24
|
-
position: absolute;
|
|
25
|
-
top: 0;
|
|
26
|
-
/**
|
|
27
|
-
* The z-index of the helpers must be higher than the canvases in order for
|
|
28
|
-
* IMEs to appear on top.
|
|
29
|
-
*/
|
|
30
|
-
z-index: 5;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
.xterm .xterm-helper-textarea {
|
|
34
|
-
padding: 0;
|
|
35
|
-
border: 0;
|
|
36
|
-
margin: 0;
|
|
37
|
-
/* Move textarea out of the screen to the far left, so that the cursor is not visible */
|
|
38
|
-
position: absolute;
|
|
39
|
-
opacity: 0;
|
|
40
|
-
left: -9999em;
|
|
41
|
-
top: 0;
|
|
42
|
-
width: 0;
|
|
43
|
-
height: 0;
|
|
44
|
-
z-index: -5;
|
|
45
|
-
/** Prevent wrapping so the IME appears against the textarea at the correct position */
|
|
46
|
-
white-space: nowrap;
|
|
47
|
-
overflow: hidden;
|
|
48
|
-
resize: none;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
.xterm .composition-view {
|
|
52
|
-
/* TODO: Composition position got messed up somewhere */
|
|
53
|
-
background: #000;
|
|
54
|
-
color: #FFF;
|
|
55
|
-
display: none;
|
|
56
|
-
position: absolute;
|
|
57
|
-
white-space: nowrap;
|
|
58
|
-
z-index: 1;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.xterm .composition-view.active {
|
|
62
|
-
display: block;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
.xterm .xterm-viewport {
|
|
66
|
-
/* On OS X this is required in order for the scroll bar to appear fully opaque */
|
|
67
|
-
background-color:
|
|
68
|
-
overflow-y: scroll;
|
|
69
|
-
cursor: default;
|
|
70
|
-
position: absolute;
|
|
71
|
-
right: 0;
|
|
72
|
-
left: 0;
|
|
73
|
-
top: 0;
|
|
74
|
-
bottom: 0;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.xterm .xterm-screen {
|
|
78
|
-
position: relative;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.xterm .xterm-screen canvas {
|
|
82
|
-
position: absolute;
|
|
83
|
-
left: 0;
|
|
84
|
-
top: 0;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.xterm .xterm-scroll-area {
|
|
88
|
-
visibility: hidden;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.xterm-char-measure-element {
|
|
92
|
-
display: inline-block;
|
|
93
|
-
visibility: hidden;
|
|
94
|
-
position: absolute;
|
|
95
|
-
top: 0;
|
|
96
|
-
left: -9999em;
|
|
97
|
-
line-height: normal;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.xterm.enable-mouse-events {
|
|
101
|
-
/* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
|
|
102
|
-
cursor: default;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
.xterm.xterm-cursor-pointer,
|
|
106
|
-
.xterm .xterm-cursor-pointer {
|
|
107
|
-
cursor: pointer;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
.xterm.column-select.focus {
|
|
111
|
-
/* Column selection mode */
|
|
112
|
-
cursor: crosshair;
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
.xterm .xterm-accessibility,
|
|
116
|
-
.xterm .xterm-message {
|
|
117
|
-
position: absolute;
|
|
118
|
-
left: 0;
|
|
119
|
-
top: 0;
|
|
120
|
-
bottom: 0;
|
|
121
|
-
right: 0;
|
|
122
|
-
z-index: 10;
|
|
123
|
-
color: transparent;
|
|
124
|
-
pointer-events: none;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.xterm .live-region {
|
|
128
|
-
position: absolute;
|
|
129
|
-
left: -9999px;
|
|
130
|
-
width: 1px;
|
|
131
|
-
height: 1px;
|
|
132
|
-
overflow: hidden;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.xterm-dim {
|
|
136
|
-
/* Dim should not apply to background, so the opacity of the foreground color is applied
|
|
137
|
-
* explicitly in the generated class and reset to 1 here */
|
|
138
|
-
opacity: 1 !important;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
.xterm-underline-1 { text-decoration: underline; }
|
|
142
|
-
.xterm-underline-2 { text-decoration: double underline; }
|
|
143
|
-
.xterm-underline-3 { text-decoration: wavy underline; }
|
|
144
|
-
.xterm-underline-4 { text-decoration: dotted underline; }
|
|
145
|
-
.xterm-underline-5 { text-decoration: dashed underline; }
|
|
146
|
-
|
|
147
|
-
.xterm-overline {
|
|
148
|
-
text-decoration: overline;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
|
-
.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
|
|
152
|
-
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
|
|
153
|
-
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
|
|
154
|
-
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
|
|
155
|
-
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }
|
|
156
|
-
|
|
157
|
-
.xterm-strikethrough {
|
|
158
|
-
text-decoration: line-through;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
.xterm-screen .xterm-decoration-container .xterm-decoration {
|
|
162
|
-
z-index: 6;
|
|
163
|
-
position: absolute;
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
|
|
167
|
-
z-index: 7;
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.xterm-decoration-overview-ruler {
|
|
171
|
-
z-index: 8;
|
|
172
|
-
position: absolute;
|
|
173
|
-
top: 0;
|
|
174
|
-
right: 0;
|
|
175
|
-
pointer-events: none;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.xterm-decoration-top {
|
|
179
|
-
z-index: 2;
|
|
180
|
-
position: relative;
|
|
181
|
-
}
|
|
182
|
-
`
|
|
1
|
+
/**
|
|
2
|
+
* Inlined xterm.js 5.3.0 core styles (MIT) — injected as a <style> tag at
|
|
3
|
+
* runtime because the client build compiles only *.module.css and the
|
|
4
|
+
* shell's css-modules pipeline rejects a raw :global block with xterm's
|
|
5
|
+
* class names.
|
|
6
|
+
* @module dsh-term/client/term/xterm-styles
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export const XTERM_CSS: string = `
|
|
10
|
+
.xterm {
|
|
11
|
+
cursor: text;
|
|
12
|
+
position: relative;
|
|
13
|
+
user-select: none;
|
|
14
|
+
-ms-user-select: none;
|
|
15
|
+
-webkit-user-select: none;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.xterm.focus,
|
|
19
|
+
.xterm:focus {
|
|
20
|
+
outline: none;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.xterm .xterm-helpers {
|
|
24
|
+
position: absolute;
|
|
25
|
+
top: 0;
|
|
26
|
+
/**
|
|
27
|
+
* The z-index of the helpers must be higher than the canvases in order for
|
|
28
|
+
* IMEs to appear on top.
|
|
29
|
+
*/
|
|
30
|
+
z-index: 5;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.xterm .xterm-helper-textarea {
|
|
34
|
+
padding: 0;
|
|
35
|
+
border: 0;
|
|
36
|
+
margin: 0;
|
|
37
|
+
/* Move textarea out of the screen to the far left, so that the cursor is not visible */
|
|
38
|
+
position: absolute;
|
|
39
|
+
opacity: 0;
|
|
40
|
+
left: -9999em;
|
|
41
|
+
top: 0;
|
|
42
|
+
width: 0;
|
|
43
|
+
height: 0;
|
|
44
|
+
z-index: -5;
|
|
45
|
+
/** Prevent wrapping so the IME appears against the textarea at the correct position */
|
|
46
|
+
white-space: nowrap;
|
|
47
|
+
overflow: hidden;
|
|
48
|
+
resize: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.xterm .composition-view {
|
|
52
|
+
/* TODO: Composition position got messed up somewhere */
|
|
53
|
+
background: #000;
|
|
54
|
+
color: #FFF;
|
|
55
|
+
display: none;
|
|
56
|
+
position: absolute;
|
|
57
|
+
white-space: nowrap;
|
|
58
|
+
z-index: 1;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.xterm .composition-view.active {
|
|
62
|
+
display: block;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.xterm .xterm-viewport {
|
|
66
|
+
/* On OS X this is required in order for the scroll bar to appear fully opaque */
|
|
67
|
+
background-color: var(--dsw-alias-bg-base);
|
|
68
|
+
overflow-y: scroll;
|
|
69
|
+
cursor: default;
|
|
70
|
+
position: absolute;
|
|
71
|
+
right: 0;
|
|
72
|
+
left: 0;
|
|
73
|
+
top: 0;
|
|
74
|
+
bottom: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.xterm .xterm-screen {
|
|
78
|
+
position: relative;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.xterm .xterm-screen canvas {
|
|
82
|
+
position: absolute;
|
|
83
|
+
left: 0;
|
|
84
|
+
top: 0;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.xterm .xterm-scroll-area {
|
|
88
|
+
visibility: hidden;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.xterm-char-measure-element {
|
|
92
|
+
display: inline-block;
|
|
93
|
+
visibility: hidden;
|
|
94
|
+
position: absolute;
|
|
95
|
+
top: 0;
|
|
96
|
+
left: -9999em;
|
|
97
|
+
line-height: normal;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.xterm.enable-mouse-events {
|
|
101
|
+
/* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
|
|
102
|
+
cursor: default;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.xterm.xterm-cursor-pointer,
|
|
106
|
+
.xterm .xterm-cursor-pointer {
|
|
107
|
+
cursor: pointer;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.xterm.column-select.focus {
|
|
111
|
+
/* Column selection mode */
|
|
112
|
+
cursor: crosshair;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.xterm .xterm-accessibility,
|
|
116
|
+
.xterm .xterm-message {
|
|
117
|
+
position: absolute;
|
|
118
|
+
left: 0;
|
|
119
|
+
top: 0;
|
|
120
|
+
bottom: 0;
|
|
121
|
+
right: 0;
|
|
122
|
+
z-index: 10;
|
|
123
|
+
color: transparent;
|
|
124
|
+
pointer-events: none;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.xterm .live-region {
|
|
128
|
+
position: absolute;
|
|
129
|
+
left: -9999px;
|
|
130
|
+
width: 1px;
|
|
131
|
+
height: 1px;
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
.xterm-dim {
|
|
136
|
+
/* Dim should not apply to background, so the opacity of the foreground color is applied
|
|
137
|
+
* explicitly in the generated class and reset to 1 here */
|
|
138
|
+
opacity: 1 !important;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.xterm-underline-1 { text-decoration: underline; }
|
|
142
|
+
.xterm-underline-2 { text-decoration: double underline; }
|
|
143
|
+
.xterm-underline-3 { text-decoration: wavy underline; }
|
|
144
|
+
.xterm-underline-4 { text-decoration: dotted underline; }
|
|
145
|
+
.xterm-underline-5 { text-decoration: dashed underline; }
|
|
146
|
+
|
|
147
|
+
.xterm-overline {
|
|
148
|
+
text-decoration: overline;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
.xterm-overline.xterm-underline-1 { text-decoration: overline underline; }
|
|
152
|
+
.xterm-overline.xterm-underline-2 { text-decoration: overline double underline; }
|
|
153
|
+
.xterm-overline.xterm-underline-3 { text-decoration: overline wavy underline; }
|
|
154
|
+
.xterm-overline.xterm-underline-4 { text-decoration: overline dotted underline; }
|
|
155
|
+
.xterm-overline.xterm-underline-5 { text-decoration: overline dashed underline; }
|
|
156
|
+
|
|
157
|
+
.xterm-strikethrough {
|
|
158
|
+
text-decoration: line-through;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.xterm-screen .xterm-decoration-container .xterm-decoration {
|
|
162
|
+
z-index: 6;
|
|
163
|
+
position: absolute;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer {
|
|
167
|
+
z-index: 7;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
.xterm-decoration-overview-ruler {
|
|
171
|
+
z-index: 8;
|
|
172
|
+
position: absolute;
|
|
173
|
+
top: 0;
|
|
174
|
+
right: 0;
|
|
175
|
+
pointer-events: none;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
.xterm-decoration-top {
|
|
179
|
+
z-index: 2;
|
|
180
|
+
position: relative;
|
|
181
|
+
}
|
|
182
|
+
`
|