@becrafter/prompt-manager 0.2.4-dev.5 → 0.2.4

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 (59) hide show
  1. package/package.json +1 -3
  2. package/packages/web/0.26974981f2e663e001ca.js +0 -1
  3. package/packages/web/112.895e73058c36df517412.js +0 -1
  4. package/packages/web/130.2145d293d97ee88902a1.js +0 -1
  5. package/packages/web/142.4ef07b4323c04c87bd81.js +0 -1
  6. package/packages/web/165.3b013a0e62121061ce41.js +0 -2
  7. package/packages/web/165.3b013a0e62121061ce41.js.LICENSE.txt +0 -9
  8. package/packages/web/203.a3697c577f74b6538257.js +0 -1
  9. package/packages/web/241.c0b98c14268a1d46d55d.js +0 -1
  10. package/packages/web/249.e10b6b8a1ac4f66185ea.js +0 -1
  11. package/packages/web/291.8c281d2823aa37833137.js +0 -1
  12. package/packages/web/319.5b4ef8bdd727fdac0520.js +0 -1
  13. package/packages/web/32.22d5433bcd9b6b4e98f1.js +0 -1
  14. package/packages/web/325.8810a3f94093d0f19341.js +0 -1
  15. package/packages/web/366.24666676c36ca63de8e1.js +0 -1
  16. package/packages/web/378.07aa22b5f489f8f1ec36.js +0 -1
  17. package/packages/web/391.f39db51c15feb65b46cb.js +0 -1
  18. package/packages/web/393.ab70195ea156eebec40b.js +0 -1
  19. package/packages/web/412.6d38dd3b290782c51ed6.js +0 -1
  20. package/packages/web/465.fb5ab26f362d3eb53da9.js +0 -1
  21. package/packages/web/48.7643e76aedee153e680c.js +0 -1
  22. package/packages/web/480.237737e805b568087d34.js +0 -1
  23. package/packages/web/489.182e98261f30e4da62d6.js +0 -1
  24. package/packages/web/490.3f311f0c36d0c52f8b52.js +0 -1
  25. package/packages/web/492.d07d9857e3682710f3a5.js +0 -1
  26. package/packages/web/495.60324846746eea7d588b.js +0 -1
  27. package/packages/web/510.b6e2c433d2f9bc9a1edd.js +0 -1
  28. package/packages/web/543.223a1c0b8345b4e65ed3.js +0 -1
  29. package/packages/web/567.e438fd025d21373bc95b.js +0 -1
  30. package/packages/web/592.c670d3500195bdb18ca4.js +0 -1
  31. package/packages/web/616.a8b495ba380ec0bcafd9.js +0 -1
  32. package/packages/web/617.bc4db899b54108068892.js +0 -1
  33. package/packages/web/641.1e5e900d36819777d808.js +0 -1
  34. package/packages/web/672.ae0e48b24fd6863bb4d1.js +0 -1
  35. package/packages/web/731.595770c0a8f30f8c453d.js +0 -1
  36. package/packages/web/746.3faf506c16dc0e6ae25a.js +0 -1
  37. package/packages/web/756.16d54ad97aadec6eb440.js +0 -1
  38. package/packages/web/77.d3de1da7532138022a7c.js +0 -1
  39. package/packages/web/802.0a9a7f92703bd3ed0228.js +0 -1
  40. package/packages/web/815.879527c51deda81ff3e6.js +0 -1
  41. package/packages/web/821.12f33b53b488b3995bb9.js +0 -1
  42. package/packages/web/846.64e9bb4b76cae3245c47.js +0 -1
  43. package/packages/web/869.aadd9a07fd56e04ba5dd.js +0 -1
  44. package/packages/web/885.6dc8edf4c16f6b578da6.js +0 -1
  45. package/packages/web/901.45604b599d11f86ae9d8.js +0 -1
  46. package/packages/web/928.69835904eae42113a3ce.js +0 -1
  47. package/packages/web/955.827020bdb97be41eb055.js +0 -1
  48. package/packages/web/981.e4d081b9d1dac0cd275f.js +0 -1
  49. package/packages/web/992.a3843959b85c7fdc6cf9.js +0 -1
  50. package/packages/web/996.07a82c3066973c75984b.js +0 -1
  51. package/packages/web/css/codemirror-theme_xq-light.css +0 -43
  52. package/packages/web/css/codemirror.css +0 -344
  53. package/packages/web/css/main.b013c98c7a56511f8710.css +0 -9995
  54. package/packages/web/css/main.css +0 -4404
  55. package/packages/web/css/skills.css +0 -1753
  56. package/packages/web/css/terminal.css +0 -1218
  57. package/packages/web/index.html +0 -3
  58. package/packages/web/main.cf6dd52dbaa4f935d45a.js +0 -2
  59. package/packages/web/main.cf6dd52dbaa4f935d45a.js.LICENSE.txt +0 -3
@@ -1,1218 +0,0 @@
1
- /* 终端样式 */
2
- .terminal-area {
3
- display: flex;
4
- flex-direction: column;
5
- flex: 1;
6
- background: var(--bg);
7
- position: relative;
8
- height: 100%;
9
- min-width: 0;
10
- }
11
-
12
- .terminal-header {
13
- display: flex;
14
- align-items: center;
15
- justify-content: space-between;
16
- padding: 12px 20px;
17
- border-bottom: 1px solid var(--border);
18
- background: #1a1a1a;
19
- min-height: 60px;
20
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
21
- }
22
-
23
- .terminal-header-left {
24
- display: flex;
25
- align-items: center;
26
- gap: 12px;
27
- }
28
-
29
- .terminal-title {
30
- font-size: 18px;
31
- font-weight: 500;
32
- color: #e0e0e0;
33
- margin: 0;
34
- }
35
-
36
- .terminal-status {
37
- display: flex;
38
- align-items: center;
39
- gap: 5px;
40
- font-size: 11px;
41
- color: #9e9e9e;
42
- background: rgba(255, 255, 255, 0.05);
43
- padding: 4px 12px;
44
- border-radius: 16px;
45
- margin-right: 4px;
46
- padding: 8px;
47
- }
48
-
49
- .status-indicator {
50
- width: 8px;
51
- height: 8px;
52
- border-radius: 50%;
53
- background: #4caf50;
54
- box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
55
- transition: all 0.3s ease;
56
- }
57
-
58
- .status-indicator.connected {
59
- background: #4caf50;
60
- box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
61
- animation: pulse 2s infinite;
62
- }
63
-
64
- .status-indicator.disconnected {
65
- background: #f44336;
66
- box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
67
- }
68
-
69
- .status-indicator.reconnecting {
70
- background: #ff9800;
71
- box-shadow: 0 0 0 2px rgba(255, 152, 0, 0.2);
72
- animation: pulse 1s infinite;
73
- }
74
-
75
- @keyframes pulse {
76
- 0% {
77
- box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.4);
78
- }
79
- 70% {
80
- box-shadow: 0 0 0 6px rgba(76, 175, 80, 0);
81
- }
82
- 100% {
83
- box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
84
- }
85
- }
86
-
87
- .terminal-header-right {
88
- display: flex;
89
- gap: 12px;
90
- align-items: center;
91
- }
92
-
93
- .terminal-header-right .btn {
94
- background: rgba(255, 255, 255, 0.08);
95
- border: 1px solid rgba(255, 255, 255, 0.1);
96
- color: #e0e0e0;
97
- padding: 8px 16px;
98
- border-radius: 6px;
99
- font-size: 13px;
100
- transition: all 0.2s ease;
101
- }
102
-
103
- .terminal-header-right .btn:hover {
104
- background: rgba(255, 255, 255, 0.12);
105
- border-color: rgba(255, 255, 255, 0.2);
106
- color: #fff;
107
- transform: translateY(-1px);
108
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
109
- }
110
-
111
- .terminal-content {
112
- flex: 1;
113
- display: flex;
114
- flex-direction: column;
115
- background: var(--bg);
116
- min-height: 0;
117
- overflow: hidden;
118
- }
119
-
120
- .terminal-output {
121
- flex: 1;
122
- padding: 20px;
123
- overflow-y: auto;
124
- font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
125
- font-size: 13px;
126
- line-height: 1.4;
127
- background: #000000;
128
- color: #ffffff;
129
- }
130
-
131
- .terminal-welcome {
132
- text-align: center;
133
- padding: 40px 20px;
134
- color: #666;
135
- }
136
-
137
- .welcome-icon {
138
- font-size: 48px;
139
- margin-bottom: 16px;
140
- }
141
-
142
- .welcome-text {
143
- font-size: 18px;
144
- font-weight: 600;
145
- color: #ffffff;
146
- margin-bottom: 8px;
147
- }
148
-
149
- .welcome-hint {
150
- font-size: 14px;
151
- color: #666;
152
- }
153
-
154
- .terminal-line {
155
- margin-bottom: 4px;
156
- white-space: pre-wrap;
157
- word-break: break-word;
158
- }
159
-
160
- .terminal-line.terminal-error {
161
- color: #ff6b6b;
162
- }
163
-
164
- .terminal-line.terminal-success {
165
- color: #51cf66;
166
- }
167
-
168
- .terminal-line.terminal-info {
169
- color: #74c0fc;
170
- }
171
-
172
- .terminal-input-area {
173
- padding: 12px 20px;
174
- background: #000000;
175
- border-top: 1px solid #333;
176
- }
177
-
178
- .terminal-prompt {
179
- display: flex;
180
- align-items: center;
181
- gap: 8px;
182
- font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
183
- font-size: 13px;
184
- }
185
-
186
- .prompt-symbol {
187
- color: #51cf66;
188
- font-weight: bold;
189
- user-select: none;
190
- white-space: nowrap;
191
- }
192
-
193
- #terminalInput {
194
- flex: 1;
195
- background: transparent;
196
- border: none;
197
- outline: none;
198
- color: #ffffff;
199
- font-family: inherit;
200
- font-size: 13px;
201
- padding: 8px 0;
202
- min-width: 0;
203
- }
204
-
205
- #terminalInput::placeholder {
206
- color: #666;
207
- }
208
-
209
- #terminalInput:focus {
210
- outline: none;
211
- }
212
-
213
- /* 响应式设计 */
214
- @media (max-width: 768px) {
215
- .terminal-header {
216
- padding: 12px 16px;
217
- }
218
-
219
- .terminal-title {
220
- font-size: 18px;
221
- }
222
-
223
- .terminal-output {
224
- padding: 16px;
225
- font-size: 12px;
226
- }
227
-
228
- .terminal-input-area {
229
- padding: 8px 16px;
230
- }
231
-
232
- .terminal-welcome {
233
- padding: 20px 10px;
234
- }
235
-
236
- .welcome-icon {
237
- font-size: 32px;
238
- }
239
-
240
- .terminal-toolbar {
241
- padding: 6px 12px;
242
- }
243
-
244
- .terminal-status {
245
- font-size: 11px;
246
- }
247
-
248
- .terminal-actions .btn {
249
- width: 22px;
250
- height: 22px;
251
- font-size: 10px;
252
- }
253
-
254
- .xterm {
255
- padding: 6px;
256
- font-size: 12px !important;
257
- }
258
-
259
- .xterm-char-measure-element {
260
- font-size: 12px !important;
261
- }
262
- }
263
-
264
- /* XTerm.js 终端组件样式 */
265
- .xterm-container {
266
- flex: 1;
267
- width: 100%;
268
- height: 100%;
269
- position: relative;
270
- background: #000000;
271
- /* border-radius: 6px; */
272
- overflow: hidden;
273
- }
274
-
275
- .terminal-toolbar {
276
- display: flex;
277
- justify-content: space-between;
278
- align-items: center;
279
- padding: 8px 16px;
280
- /* background: rgba(255, 255, 255, 0.05); */
281
- /* border-bottom: 1px solid rgba(255, 255, 255, 0.1); */
282
- backdrop-filter: blur(10px);
283
- -webkit-backdrop-filter: blur(10px);
284
- position: relative;
285
- overflow: visible; /* 确保展开的按钮可见 */
286
- }
287
-
288
- /* 已删除重复的 terminal-status 和 status-indicator 样式,这些在上面已有定义 */
289
-
290
- .terminal-actions {
291
- display: flex;
292
- gap: 4px;
293
- }
294
-
295
- .terminal-actions .btn {
296
- width: 22px;
297
- height: 22px;
298
- font-size: 12px;
299
- background: rgba(255, 255, 255, 0.05);
300
- border: 1px solid rgba(255, 255, 255, 0.1);
301
- color: #b0b0b0;
302
- border-radius: 6px;
303
- cursor: pointer;
304
- display: inline-flex;
305
- align-items: center;
306
- justify-content: center;
307
- transition: all 0.2s ease;
308
- margin: 0 2px;
309
- }
310
-
311
- .terminal-actions .btn:hover {
312
- background: rgba(255, 255, 255, 0.1);
313
- border-color: rgba(255, 255, 255, 0.2);
314
- color: #fff;
315
- transform: scale(1.05);
316
- }
317
-
318
- .terminal-actions .btn:active {
319
- transform: scale(0.95);
320
- }
321
-
322
- /* 可展开的按钮组样式 - 连接状态触发展开 */
323
- .terminal-status {
324
- position: relative;
325
- cursor: pointer;
326
- transition: all 0.3s ease;
327
- border-radius: 16px;
328
- padding: 8px;
329
- border: 1px solid transparent;
330
- }
331
-
332
- .terminal-status:hover {
333
- background: rgba(255, 255, 255, 0.05);
334
- transform: scale(1.02);
335
- border-color: rgba(255, 255, 255, 0.1);
336
- box-shadow: 0 0 8px rgba(0, 162, 255, 0.2);
337
- }
338
-
339
- .action-buttons-expanded {
340
- position: absolute;
341
- left: -82px; /* 在terminal-actions左侧定位 (74px按钮宽度 + 8px间距) */
342
- top: 50%;
343
- transform: translateY(-50%) translateX(-20px); /* 初始位置向左偏移隐藏 */
344
- display: flex;
345
- gap: 4px;
346
- opacity: 0;
347
- /* visibility: hidden; */
348
- transition: all 0.3s ease;
349
- pointer-events: none;
350
- z-index: 10;
351
- white-space: nowrap; /* 防止换行 */
352
- }
353
-
354
- .action-buttons-expanded .btn {
355
- transform: scale(0.8);
356
- transition: all 0.3s ease;
357
- }
358
-
359
- /* 悬停时展开按钮组 - 扩大hover区域到整个toolbar */
360
- .terminal-toolbar:hover .action-buttons-expanded {
361
- opacity: 1;
362
- visibility: visible;
363
- transform: translateY(-50%) translateX(-8px); /* 从左侧滑入到正确位置 (-82px + 102px = 20px) */
364
- pointer-events: auto;
365
- }
366
-
367
- .terminal-toolbar:hover .action-buttons-expanded .btn {
368
- transform: scale(1);
369
- }
370
-
371
- /* 错开动画效果 */
372
- .terminal-toolbar:hover .action-buttons-expanded .btn:nth-child(1) {
373
- transition-delay: 0.05s;
374
- }
375
-
376
- .terminal-toolbar:hover .action-buttons-expanded .btn:nth-child(2) {
377
- transition-delay: 0.1s;
378
- }
379
-
380
- .terminal-toolbar:hover .action-buttons-expanded .btn:nth-child(3) {
381
- transition-delay: 0.15s;
382
- }
383
-
384
- .terminal-toolbar:hover .action-buttons-expanded .btn:nth-child(4) {
385
- transition-delay: 0.2s;
386
- }
387
-
388
- /* 鼠标离开时的收敛动画 */
389
- .terminal-toolbar:not(:hover) .action-buttons-expanded .btn:nth-child(1) {
390
- transition-delay: 0.15s;
391
- }
392
-
393
- .terminal-toolbar:not(:hover) .action-buttons-expanded .btn:nth-child(2) {
394
- transition-delay: 0.1s;
395
- }
396
-
397
- .terminal-toolbar:not(:hover) .action-buttons-expanded .btn:nth-child(3) {
398
- transition-delay: 0.05s;
399
- }
400
-
401
- .terminal-toolbar:not(:hover) .action-buttons-expanded .btn:nth-child(4) {
402
- transition-delay: 0s;
403
- }
404
-
405
- /* XTerm.js 样式覆盖 */
406
- .xterm {
407
- padding: 12px;
408
- font-feature-settings: "liga" 0;
409
- position: relative;
410
- user-select: none;
411
- -ms-user-select: none;
412
- -webkit-user-select: none;
413
- font-family: "SF Mono", Monaco, "Cascadia Code", "Fira Code", "JetBrains Mono", "Consolas", "Courier New", monospace;
414
- line-height: 1.2;
415
- letter-spacing: 0.01em;
416
- -webkit-font-smoothing: antialiased;
417
- -moz-osx-font-smoothing: grayscale;
418
- text-rendering: optimizeLegibility;
419
- }
420
-
421
- .xterm:focus {
422
- outline: none;
423
- }
424
-
425
- .xterm .xterm-viewport {
426
- background-color: transparent;
427
- overflow-y: scroll;
428
- cursor: default;
429
- position: absolute;
430
- right: 0;
431
- left: 0;
432
- top: 0;
433
- bottom: 0;
434
- }
435
-
436
- .xterm .xterm-screen {
437
- position: relative;
438
- }
439
-
440
- /* 隐藏 xterm 的 textarea 输入元素 */
441
- .xterm textarea {
442
- position: absolute !important;
443
- opacity: 0 !important;
444
- width: 1px !important;
445
- height: 1px !important;
446
- left: -9999px !important;
447
- top: -9999px !important;
448
- border: none !important;
449
- outline: none !important;
450
- resize: none !important;
451
- overflow: hidden !important;
452
- pointer-events: none !important;
453
- -webkit-appearance: none !important;
454
- appearance: none !important;
455
- }
456
-
457
- .xterm .xterm-screen canvas {
458
- position: absolute;
459
- left: 0;
460
- top: 0;
461
- }
462
-
463
- .xterm .xterm-scroll-area {
464
- visibility: hidden;
465
- }
466
-
467
- .xterm-char-measure-element {
468
- display: inline-block;
469
- visibility: hidden;
470
- position: absolute;
471
- top: 0;
472
- left: -9999em;
473
- line-height: normal;
474
- }
475
-
476
- .xterm.enable-mouse-events {
477
- cursor: default;
478
- }
479
-
480
- .xterm.xterm-cursor-pointer {
481
- cursor: pointer;
482
- }
483
-
484
- .xterm.column-select.focus {
485
- cursor: crosshair;
486
- }
487
-
488
- .xterm .xterm-accessibility,
489
- .xterm .xterm-message {
490
- position: absolute;
491
- left: 0;
492
- top: 0;
493
- bottom: 0;
494
- right: 0;
495
- z-index: 10;
496
- color: transparent;
497
- }
498
-
499
- .xterm .live-region {
500
- position: absolute;
501
- left: -9999px;
502
- width: 1px;
503
- height: 1px;
504
- overflow: hidden;
505
- }
506
-
507
- .xterm-dim {
508
- opacity: 0.5;
509
- }
510
-
511
- .xterm-underline {
512
- text-decoration: underline;
513
- }
514
-
515
- .xterm-strikethrough {
516
- text-decoration: line-through;
517
- }
518
-
519
- .xterm-screen .xterm-decoration-container .xterm-decoration.top {
520
- z-index: 2;
521
- position: relative;
522
- }
523
-
524
- .xterm-decoration-overview-ruler {
525
- z-index: 6;
526
- position: absolute;
527
- top: 0;
528
- right: 0;
529
- pointer-events: none;
530
- }
531
-
532
- .xterm-decoration-top {
533
- z-index: 2;
534
- position: relative;
535
- }
536
-
537
- /* 搜索框样式 */
538
- .xterm-search {
539
- position: absolute;
540
- top: 10px;
541
- right: 10px;
542
- background: rgba(30, 30, 30, 0.95);
543
- border: 1px solid rgba(255, 255, 255, 0.2);
544
- border-radius: 4px;
545
- padding: 8px;
546
- display: none;
547
- z-index: 1000;
548
- backdrop-filter: blur(10px);
549
- -webkit-backdrop-filter: blur(10px);
550
- }
551
-
552
- .xterm-search.show {
553
- display: block;
554
- }
555
-
556
- .xterm-search input {
557
- background: transparent;
558
- border: none;
559
- color: #d4d4d4;
560
- outline: none;
561
- font-size: 12px;
562
- width: 200px;
563
- }
564
-
565
- .xterm-search .btn {
566
- background: rgba(255, 255, 255, 0.1);
567
- border: 1px solid rgba(255, 255, 255, 0.2);
568
- border-radius: 3px;
569
- color: #ccc;
570
- font-size: 11px;
571
- padding: 4px 8px;
572
- margin-left: 4px;
573
- cursor: pointer;
574
- }
575
-
576
- .xterm-search .btn:hover {
577
- background: rgba(255, 255, 255, 0.2);
578
- color: #fff;
579
- }
580
-
581
- /* 主题切换动画 */
582
- .terminal-focused {
583
- box-shadow: 0 0 0 2px rgba(36, 114, 200, 0.3);
584
- }
585
-
586
- /* xterm容器样式 */
587
- .xterm-container .xterm {
588
- height: 100% !important;
589
- width: 100% !important;
590
- }
591
-
592
- .xterm-container .terminal-toolbar {
593
- position: absolute;
594
- top: 10px;
595
- right: 12px;
596
- z-index: 100;
597
- border-radius: 8px;
598
- }
599
-
600
-
601
- /* 图标样式(使用Unicode字符代替图标字体) */
602
- .icon-back::before { content: "←"; }
603
- .icon-opencode::before { content: "⚡"; }
604
- .icon-refresh::before { content: "↻"; }
605
- .icon-clear::before { content: "✕"; }
606
- .icon-search::before { content: "🔍"; }
607
- .icon-theme::before { content: "🌙"; }
608
- .icon-menu::before { content: "☰"; }
609
-
610
- /* 终端加载状态样式 */
611
- .terminal-loading {
612
- display: flex;
613
- flex-direction: column;
614
- align-items: center;
615
- justify-content: center;
616
- position: absolute;
617
- top: 0;
618
- left: 0;
619
- right: 0;
620
- bottom: 0;
621
- background: linear-gradient(135deg, #1e1e1e 0%, #2d2d2d 100%);
622
- color: #e0e0e0;
623
- font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Courier New', monospace;
624
- z-index: 10;
625
- }
626
-
627
- .terminal-loading .loading-spinner {
628
- width: 48px;
629
- height: 48px;
630
- border: 3px solid rgba(255, 255, 255, 0.1);
631
- border-top: 3px solid #4a9eff;
632
- border-radius: 50%;
633
- animation: spin 0.8s linear infinite;
634
- margin-bottom: 20px;
635
- box-shadow: 0 0 20px rgba(74, 158, 255, 0.3);
636
- }
637
-
638
- .terminal-loading p {
639
- margin: 0;
640
- font-size: 15px;
641
- font-weight: 500;
642
- opacity: 0.9;
643
- letter-spacing: 0.5px;
644
- }
645
-
646
- /* 为全局loading-spinner添加特定样式,避免冲突 */
647
- .loading-overlay .loading-spinner {
648
- width: 50px;
649
- height: 50px;
650
- border: 4px solid rgba(57, 57, 57, 0.08);
651
- border-top: 4px solid rgba(57, 57, 57, 0.4);
652
- border-radius: 50%;
653
- animation: spin 1s linear infinite;
654
- margin-bottom: 20px;
655
- box-shadow: none;
656
- }
657
-
658
- /* 终端错误状态样式 */
659
- .terminal-error {
660
- display: flex;
661
- flex-direction: column;
662
- align-items: center;
663
- justify-content: center;
664
- padding: 40px 20px;
665
- text-align: center;
666
- padding: 20px;
667
- background: #2d1b1b;
668
- color: #ff6b6b;
669
- border-radius: 4px;
670
- font-family: 'Consolas', 'Courier New', monospace;
671
- margin: 10px;
672
- }
673
-
674
- .terminal-error h3 {
675
- margin: 0 0 10px 0;
676
- color: #ff8787;
677
- }
678
-
679
- .terminal-error p {
680
- margin: 5px 0;
681
- font-size: 13px;
682
- color: rgba(255, 255, 255, 0.7);
683
- }
684
-
685
- .terminal-error ul {
686
- margin: 10px 0;
687
- padding-left: 20px;
688
- color: rgba(255, 255, 255, 0.7);
689
- }
690
-
691
- .terminal-error li {
692
- margin: 3px 0;
693
- font-size: 12px;
694
- opacity: 0.9;
695
- }
696
-
697
- .terminal-error button {
698
- margin-top: 15px;
699
- padding: 8px 16px;
700
- background: #ff6b6b;
701
- color: white;
702
- border: none;
703
- border-radius: 4px;
704
- cursor: pointer;
705
- font-size: 13px;
706
- transition: background-color 0.2s;
707
- }
708
-
709
- .terminal-error button:hover {
710
- background: #ff5252;
711
- }
712
-
713
- /* xterm.js helper 容器 - 必须设置正确的 z-index */
714
- .xterm .xterm-helpers {
715
- position: absolute;
716
- top: 0;
717
- left: 0;
718
- width: 100%;
719
- height: 100%;
720
- z-index: 5; /* 必须高于 canvas (z-index: 1) */
721
- pointer-events: none;
722
- }
723
-
724
- /* textarea 输入框 - 关键修复:字体匹配 + 去除边框 */
725
- .xterm .xterm-helper-textarea {
726
- position: absolute;
727
- opacity: 0;
728
- left: -9999em; /* 默认在屏幕外,xterm.js 会动态调整 */
729
- top: 0;
730
- width: 0;
731
- height: 0;
732
- z-index: -5; /* 默认在 canvas 下面 */
733
- white-space: nowrap; /* 防止换行,IME 必需 */
734
- overflow: hidden;
735
- resize: none;
736
-
737
- /* 关键修复:字体必须与终端完全匹配(Issue #3034) */
738
- font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code',
739
- 'Monaco', 'Menlo', 'Consolas', 'Courier New', monospace !important;
740
- font-size: 14px !important;
741
- line-height: 1.2 !important;
742
- letter-spacing: 0 !important;
743
-
744
- /* 关键修复:去除边框(Issue #3058) */
745
- border: 0px !important;
746
- outline: none !important;
747
- padding: 0 !important;
748
- margin: 0 !important;
749
- }
750
-
751
- /* composition 预览视图 - IME 窗口 */
752
- .xterm .composition-view {
753
- background: #000;
754
- color: #FFF;
755
- display: none;
756
- position: absolute;
757
- white-space: nowrap;
758
- z-index: 1; /* 在 canvas 上面 */
759
- pointer-events: none;
760
- }
761
-
762
- .xterm.composing .composition-view {
763
- display: block;
764
- }
765
-
766
- /* 为xterm设置合适的等宽字体,解决字体重叠问题 */
767
- .xterm {
768
- font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
769
- font-size: 14px !important;
770
- line-height: 1.2 !important;
771
- letter-spacing: 0 !important;
772
- font-feature-settings: "liga" 0, "calt" 0 !important;
773
- -webkit-font-feature-settings: "liga" 0, "calt" 0 !important;
774
- -moz-font-feature-settings: "liga" 0, "calt" 0 !important;
775
- font-weight: 400 !important;
776
- -webkit-font-smoothing: antialiased !important;
777
- -moz-osx-font-smoothing: grayscale !important;
778
- text-rendering: optimizeLegibility !important;
779
- }
780
-
781
- /* 确保字符渲染正确,防止重叠 */
782
- .xterm .xterm-screen {
783
- font-family: inherit !important;
784
- font-size: inherit !important;
785
- line-height: 1.2 !important;
786
- }
787
-
788
- .xterm .xterm-viewport {
789
- font-family: inherit !important;
790
- }
791
-
792
- /* 修复canvas渲染的字体 */
793
- .xterm .xterm-screen canvas {
794
- font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
795
- image-rendering: pixelated !important;
796
- image-rendering: -moz-crisp-edges !important;
797
- image-rendering: crisp-edges !important;
798
- /* 强制启用硬件加速 */
799
- transform: translateZ(0);
800
- backface-visibility: hidden;
801
- /* 优化 Canvas 渲染质量 */
802
- -webkit-font-smoothing: antialiased !important;
803
- -moz-osx-font-smoothing: grayscale !important;
804
- }
805
-
806
- /* 字符测量元素使用相同字体 */
807
- .xterm-char-measure-element {
808
- font-family: 'SF Mono', 'JetBrains Mono', 'Cascadia Code', 'Fira Code', Monaco, 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
809
- font-size: 14px !important;
810
- line-height: 1.2 !important;
811
- }
812
-
813
- /* 行高设置 */
814
- .xterm-rows {
815
- line-height: 1.2 !important;
816
- }
817
-
818
- .xterm-row {
819
- height: 1.2em !important;
820
- line-height: 1.2 !important;
821
- }
822
-
823
- .xterm-char {
824
- width: 0.6em !important;
825
- height: 1.2em !important;
826
- }
827
-
828
- /* 确保输入框字体一致 */
829
- .xterm textarea {
830
- font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', 'Liberation Mono', 'Courier New', monospace !important;
831
- font-size: 14px !important;
832
- }
833
-
834
- /* 修复中文字符显示 */
835
- .xterm-unicode {
836
- font-family: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', 'PingFang SC', 'Microsoft YaHei', monospace !important;
837
- }
838
-
839
- /* ============================================
840
- 主题配置
841
- ============================================ */
842
-
843
- /* 暗色主题优化 */
844
- .xterm.theme-dark {
845
- background: #0a0a0a !important;
846
- color: #f0f0f0 !important;
847
- }
848
-
849
- /* 浅色主题优化 */
850
- .xterm.theme-light {
851
- background: #ffffff !important;
852
- color: #1a1a1a !important;
853
- }
854
-
855
- /* ============================================
856
- 光标样式优化
857
- ============================================ */
858
-
859
- /* 深色主题光标 - 增强对比度和可见性 */
860
- .xterm.theme-dark .xterm-cursor {
861
- background: rgba(255, 255, 255, 0.9) !important;
862
- border: 1px solid rgba(0, 0, 0, 0.3) !important;
863
- width: 10px !important;
864
- box-shadow: 0 0 6px rgba(255, 255, 255, 0.6) !important;
865
- display: block !important; /* 确保在IME期间也可见 */
866
- }
867
-
868
- /* 浅色主题光标 - 增强对比度和可见性 */
869
- .xterm.theme-light .xterm-cursor {
870
- background: rgba(0, 0, 0, 0.85) !important;
871
- border: 1px solid rgba(0, 0, 0, 0.2) !important;
872
- width: 10px !important;
873
- box-shadow: 0 0 6px rgba(0, 0, 0, 0.4) !important;
874
- display: block !important;
875
- }
876
-
877
-
878
-
879
- .xterm .xterm-rows > div {
880
- position: relative;
881
- }
882
-
883
- .xterm .xterm-rows > div.xterm-focus .xterm-selection,
884
- .xterm .xterm-rows .xterm-selection {
885
- background-color: rgba(74, 144, 226, 0.4) !important;
886
- }
887
-
888
- /* 浅色主题下的选中效果 - VS Code风格高对比度 */
889
- .xterm.theme-light .xterm-rows > div.xterm-focus .xterm-selection,
890
- .xterm.theme-light .xterm-rows .xterm-selection {
891
- background-color: rgba(74, 144, 226, 0.4) !important; /* 更明显的蓝色选中 */
892
- border: 1px solid rgba(74, 144, 226, 0.6) !important; /* 添加明显的边框 */
893
- }
894
-
895
- /* 深色主题下的选中效果 - VS Code风格高对比度 */
896
- .xterm.theme-dark .xterm-rows > div.xterm-focus .xterm-selection,
897
- .xterm.theme-dark .xterm-rows .xterm-selection {
898
- background-color: rgba(74, 144, 226, 0.6) !important; /* 更高的透明度,类似VS Code */
899
- border: 1px solid rgba(74, 144, 226, 0.8) !important; /* 添加明显的边框 */
900
- }
901
-
902
- /* xterm-selection span 选中样式 */
903
- .xterm .xterm-selection span {
904
- background-color: inherit !important;
905
- }
906
-
907
- /* 确保浅色主题下的选中文字可见 - 使用深色文字增强对比 */
908
- .xterm.theme-light .xterm-selection span {
909
- color: #000000 !important;
910
- font-weight: 600 !important;
911
- text-shadow: 0 0 1px rgba(255, 255, 255, 0.5) !important;
912
- }
913
-
914
- /* 确保深色主题下的选中文字可见 - 使用浅色文字增强对比 */
915
- .xterm.theme-dark .xterm-selection span {
916
- color: #ffffff !important;
917
- font-weight: 600 !important;
918
- text-shadow: 0 0 1px rgba(0, 0, 0, 0.8) !important;
919
- }
920
-
921
- /* 强制覆盖选中样式 - 浅色主题 */
922
- body .xterm.theme-light .xterm-selection,
923
- body .xterm.theme-light .xterm-rows .xterm-selection,
924
- body .xterm.theme-light .xterm-rows > div .xterm-selection,
925
- body .xterm.theme-light .xterm-screen .xterm-selection,
926
- body div.xterm.theme-light .xterm-selection {
927
- background-color: rgba(24, 144, 255, 0.25) !important;
928
- border: 1px solid rgba(24, 144, 255, 0.4) !important;
929
- }
930
-
931
- /* 强制覆盖选中样式 - 深色主题 */
932
- body .xterm.theme-dark .xterm-selection,
933
- body .xterm.theme-dark .xterm-rows .xterm-selection,
934
- body .xterm.theme-dark .xterm-rows > div .xterm-selection,
935
- body .xterm.theme-dark .xterm-screen .xterm-selection,
936
- body div.xterm.theme-dark .xterm-selection {
937
- background-color: rgba(100, 181, 246, 0.35) !important;
938
- border: 1px solid rgba(100, 181, 246, 0.5) !important;
939
- }
940
-
941
- /* 选中文字颜色 - 浅色主题 */
942
- body .xterm.theme-light .xterm-selection span,
943
- body .xterm.theme-light .xterm-selection .xterm-char {
944
- color: #000000 !important;
945
- font-weight: 600 !important;
946
- text-shadow: 0 0 1px rgba(255, 255, 255, 0.5) !important;
947
- }
948
-
949
- /* 选中文字颜色 - 深色主题 */
950
- body .xterm.theme-dark .xterm-selection span,
951
- body .xterm.theme-dark .xterm-selection .xterm-char {
952
- color: #ffffff !important;
953
- font-weight: 600 !important;
954
- text-shadow: 0 0 1px rgba(0, 0, 0, 0.8) !important;
955
- }
956
-
957
- /* ============================================
958
- 滚动条样式优化
959
- ============================================ */
960
-
961
- .xterm .xterm-viewport::-webkit-scrollbar {
962
- width: 8px !important;
963
- height: 8px !important;
964
- }
965
-
966
- .xterm .xterm-viewport::-webkit-scrollbar-track {
967
- background: transparent !important;
968
- }
969
-
970
- .xterm .xterm-viewport::-webkit-scrollbar-thumb {
971
- background: rgba(128, 128, 128, 0.4) !important;
972
- border-radius: 4px !important;
973
- transition: background-color 0.2s ease !important;
974
- }
975
-
976
- .xterm .xterm-viewport::-webkit-scrollbar-thumb:hover {
977
- background: rgba(128, 128, 128, 0.6) !important;
978
- }
979
-
980
- /* 浅色主题滚动条 */
981
- .xterm.theme-light .xterm-viewport::-webkit-scrollbar-thumb {
982
- background: rgba(0, 0, 0, 0.2) !important;
983
- }
984
-
985
- .xterm.theme-light .xterm-viewport::-webkit-scrollbar-thumb:hover {
986
- background: rgba(0, 0, 0, 0.3) !important;
987
- }
988
-
989
- /* 深色主题滚动条 */
990
- .xterm.theme-dark .xterm-viewport::-webkit-scrollbar-thumb {
991
- background: rgba(255, 255, 255, 0.2) !important;
992
- }
993
-
994
- .xterm.theme-dark .xterm-viewport::-webkit-scrollbar-thumb:hover {
995
- background: rgba(255, 255, 255, 0.3) !important;
996
- }
997
-
998
- /* ============================================
999
- 响应式字体大小调整
1000
- ============================================ */
1001
-
1002
- @media (max-width: 480px) {
1003
- .xterm {
1004
- font-size: 11px !important;
1005
- }
1006
-
1007
- .xterm-char-measure-element {
1008
- font-size: 11px !important;
1009
- }
1010
- }
1011
-
1012
- /* ============================================
1013
- 高DPI屏幕优化
1014
- ============================================ */
1015
-
1016
- @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
1017
- .xterm .xterm-screen canvas {
1018
- /* 高DPI屏幕使用自动渲染以获得更好的清晰度 */
1019
- image-rendering: auto !important;
1020
- /* 确保在高DPI屏幕上使用正确的缩放 */
1021
- transform: translateZ(0);
1022
- }
1023
- }
1024
-
1025
- /* Canvas 渲染器优化 - 确保正确的层级和定位 */
1026
- .xterm .xterm-screen {
1027
- position: relative !important;
1028
- overflow: hidden !important;
1029
- }
1030
-
1031
- /* 确保 Canvas 渲染器优先于 DOM 元素 */
1032
- .xterm .xterm-screen canvas {
1033
- position: relative !important;
1034
- z-index: 1 !important;
1035
- }
1036
-
1037
- /* 隐藏 DOM 渲染元素(当使用 Canvas 时) */
1038
- .xterm.xterm-canvas-mode .xterm-rows {
1039
- display: none !important;
1040
- }
1041
-
1042
- /* ============================================
1043
- 终端容器样式
1044
- ============================================ */
1045
-
1046
- /* 浅色主题容器 */
1047
- .terminal-content.theme-light {
1048
- background: #ffffff !important;
1049
- }
1050
-
1051
-
1052
- /* ============================================
1053
- 终端工具栏样式(保留上面的完整定义)
1054
- ============================================ */
1055
-
1056
- .renderer-info {
1057
- font-size: 11px;
1058
- padding: 2px 6px;
1059
- border-radius: 3px;
1060
- background: rgba(255, 255, 255, 0.1);
1061
- cursor: help;
1062
- transition: all 0.2s ease;
1063
- }
1064
-
1065
- .renderer-info:hover {
1066
- background: rgba(255, 255, 255, 0.2);
1067
- }
1068
-
1069
- /* 浅色主题工具栏 */
1070
- .theme-light .terminal-toolbar {
1071
- background: rgba(0, 0, 0, 0.05);
1072
- border-bottom: 1px solid rgba(0, 0, 0, 0.1);
1073
- }
1074
-
1075
- .theme-light .terminal-status {
1076
- color: rgba(0, 0, 0, 0.7);
1077
- }
1078
-
1079
- .theme-light .terminal-actions .btn {
1080
- background: rgba(0, 0, 0, 0.05);
1081
- border: 1px solid rgba(0, 0, 0, 0.1);
1082
- color: rgba(0, 0, 0, 0.7);
1083
- }
1084
-
1085
- .theme-light .terminal-actions .btn:hover {
1086
- background: rgba(0, 0, 0, 0.1);
1087
- color: rgba(0, 0, 0, 1);
1088
- }
1089
-
1090
- /* ============================================
1091
- 终端加载和错误状态(已删除重复注释,这些样式在上面已有定义)
1092
- ============================================ */
1093
-
1094
- /* ============================================
1095
- 终端容器样式(已删除重复定义,保留上面的完整定义)
1096
- ============================================ */
1097
-
1098
- /* 隐藏xterm默认光标,使用自定义样式 */
1099
- .xterm-cursor-block,
1100
- .xterm-cursor-bar {
1101
- display: none !important;
1102
- }
1103
-
1104
- /* ============================================
1105
- ASCII 艺术动画效果
1106
- ============================================ */
1107
-
1108
- /* 彩虹渐变动画 */
1109
- @keyframes rainbow-shift {
1110
- 0% { filter: hue-rotate(0deg); }
1111
- 25% { filter: hue-rotate(90deg); }
1112
- 50% { filter: hue-rotate(180deg); }
1113
- 75% { filter: hue-rotate(270deg); }
1114
- 100% { filter: hue-rotate(360deg); }
1115
- }
1116
-
1117
- /* 文字发光效果 */
1118
- @keyframes text-glow {
1119
- 0%, 100% {
1120
- text-shadow: 0 0 5px currentColor, 0 0 10px currentColor, 0 0 15px currentColor;
1121
- }
1122
- 50% {
1123
- text-shadow: 0 0 10px currentColor, 0 0 20px currentColor, 0 0 30px currentColor, 0 0 40px currentColor;
1124
- }
1125
- }
1126
-
1127
- /* 打字机效果 */
1128
- @keyframes typewriter {
1129
- from { width: 0; }
1130
- to { width: 100%; }
1131
- }
1132
-
1133
- /* 闪烁效果 */
1134
- @keyframes blink {
1135
- 0%, 50% { opacity: 1; }
1136
- 51%, 100% { opacity: 0; }
1137
- }
1138
-
1139
- /* 渐变背景动画 */
1140
- @keyframes gradient-bg {
1141
- 0% { background-position: 0% 50%; }
1142
- 50% { background-position: 100% 50%; }
1143
- 100% { background-position: 0% 50%; }
1144
- }
1145
-
1146
- /* 为终端容器添加背景渐变动画 */
1147
- .terminal-area {
1148
- background: linear-gradient(-45deg, #1a1a1a, #2a2a2a, #1a1a1a, #0a0a0a);
1149
- background-size: 400% 400%;
1150
- animation: gradient-bg 15s ease infinite;
1151
- }
1152
-
1153
- /* 终端容器内的特殊样式 */
1154
- .terminal-area .xterm-screen {
1155
- /* 为ASCII艺术添加特殊效果 */
1156
- position: relative;
1157
- }
1158
-
1159
- /* 为特定的ASCII艺术行添加动画类 */
1160
- .terminal-area .ascii-art-line {
1161
- transition: all 0.3s ease;
1162
- }
1163
-
1164
- /* 添加悬停效果 */
1165
- .terminal-area:hover {
1166
- filter: brightness(1.1);
1167
- }
1168
-
1169
- /* 光标闪烁动画 */
1170
- .terminal-cursor-blink {
1171
- animation: blink 1s infinite;
1172
- }
1173
-
1174
- /* 彩虹文字效果 */
1175
- .rainbow-text {
1176
- animation: rainbow-shift 3s linear infinite;
1177
- background: linear-gradient(45deg, #ff0000, #ff8000, #ffff00, #80ff00, #00ff00, #00ff80, #00ffff, #0080ff, #0000ff, #8000ff, #ff00ff, #ff0080);
1178
- background-size: 400% 400%;
1179
- -webkit-background-clip: text;
1180
- -webkit-text-fill-color: transparent;
1181
- background-clip: text;
1182
- animation: rainbow-shift 3s linear infinite, text-glow 2s ease-in-out infinite alternate;
1183
- }
1184
-
1185
- /* 发光边框效果 */
1186
- .ascii-art-border {
1187
- filter: drop-shadow(0 0 10px rgba(0, 162, 255, 0.5));
1188
- animation: text-glow 3s ease-in-out infinite alternate;
1189
- }
1190
-
1191
- /* 脉冲效果 */
1192
- @keyframes pulse-glow {
1193
- 0% {
1194
- filter: drop-shadow(0 0 5px rgba(0, 162, 255, 0.3));
1195
- }
1196
- 50% {
1197
- filter: drop-shadow(0 0 20px rgba(0, 162, 255, 0.8));
1198
- }
1199
- 100% {
1200
- filter: drop-shadow(0 0 5px rgba(0, 162, 255, 0.3));
1201
- }
1202
- }
1203
-
1204
- .ascii-art-pulse {
1205
- animation: pulse-glow 2s ease-in-out infinite;
1206
- }
1207
-
1208
- /* 波浪效果 */
1209
- @keyframes wave {
1210
- 0%, 100% { transform: translateY(0px); }
1211
- 25% { transform: translateY(-2px); }
1212
- 50% { transform: translateY(-4px); }
1213
- 75% { transform: translateY(-2px); }
1214
- }
1215
-
1216
- .ascii-art-wave {
1217
- animation: wave 4s ease-in-out infinite;
1218
- }