@we-debug/miniprogram 0.49.1 → 0.50.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.
@@ -0,0 +1,685 @@
1
+ // 与 table-view(Storage 面板)保持一致的配色
2
+ @nv-primary: #4d4fec;
3
+ @nv-primary-light: rgba(77, 79, 236, 0.08);
4
+ @nv-primary-active: rgba(77, 79, 236, 0.2);
5
+ @nv-border: #dadce0;
6
+ @nv-border-light: #e0e0e0;
7
+ @nv-divider: #f1f3f4;
8
+ @nv-bg-bar: #f5f5f5;
9
+ @nv-bg-head: #f8f9fa;
10
+ @nv-text: #202124;
11
+ @nv-text-sub: #5f6368;
12
+ @nv-text-weak: #9aa0a6;
13
+ @nv-red: #d93025;
14
+ @nv-mono: 'Consolas', 'Monaco', monospace;
15
+
16
+ @icon-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235f6368'%3E%3Cpath d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
17
+ @icon-trash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235f6368'%3E%3Cpath d='M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12zM19 4h-3.5l-1-1h-5l-1 1H5v2h14V4z'/%3E%3C/svg%3E");
18
+ @icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%235f6368'%3E%3Cpath d='M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z'/%3E%3C/svg%3E");
19
+ @icon-copy-primary: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234d4fec'%3E%3Cpath d='M16 1H4c-1.1 0-2 .9-2 2v14h2V3h12V1zm3 4H8c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h11c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2zm0 16H8V7h11v14z'/%3E%3C/svg%3E");
20
+
21
+ .nv {
22
+ position: relative;
23
+ display: flex;
24
+ flex-direction: column;
25
+ width: 100%;
26
+ height: 100%;
27
+ overflow: hidden;
28
+ background: #ffffff;
29
+ color: @nv-text;
30
+ font-size: 13px;
31
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
32
+ }
33
+
34
+ /* 操作栏 */
35
+ .nv-toolbar {
36
+ display: flex;
37
+ align-items: center;
38
+ height: 40px;
39
+ padding: 0 8px;
40
+ background: @nv-bg-bar;
41
+ border-bottom: 1px solid @nv-border-light;
42
+ flex-shrink: 0;
43
+ box-sizing: border-box;
44
+ }
45
+
46
+ .nv-btn {
47
+ width: 28px;
48
+ height: 28px;
49
+ display: flex;
50
+ align-items: center;
51
+ justify-content: center;
52
+ background: #ffffff;
53
+ border: 1px solid @nv-border;
54
+ border-radius: 4px;
55
+ flex-shrink: 0;
56
+ box-sizing: border-box;
57
+ transition: all 0.2s ease;
58
+
59
+ &:active {
60
+ background: @nv-divider;
61
+ }
62
+ }
63
+
64
+ .nv-record {
65
+ width: 12px;
66
+ height: 12px;
67
+ border-radius: 50%;
68
+ border: 2px solid @nv-text-sub;
69
+ box-sizing: border-box;
70
+
71
+ &.on {
72
+ border: none;
73
+ background: @nv-red;
74
+ }
75
+ }
76
+
77
+ .nv-icon {
78
+ width: 14px;
79
+ height: 14px;
80
+ background-repeat: no-repeat;
81
+ background-position: center;
82
+ background-size: contain;
83
+ flex-shrink: 0;
84
+
85
+ &.trash {
86
+ background-image: @icon-trash;
87
+ }
88
+
89
+ &.copy {
90
+ background-image: @icon-copy;
91
+ opacity: 0.8;
92
+ }
93
+ }
94
+
95
+ .nv-search {
96
+ position: relative;
97
+ flex: 1;
98
+ min-width: 0;
99
+ height: 28px;
100
+ margin: 0 6px;
101
+
102
+ &::before {
103
+ content: '';
104
+ position: absolute;
105
+ left: 8px;
106
+ top: 50%;
107
+ width: 14px;
108
+ height: 14px;
109
+ transform: translateY(-50%);
110
+ background: @icon-search no-repeat center;
111
+ background-size: contain;
112
+ opacity: 0.5;
113
+ z-index: 1;
114
+ }
115
+ }
116
+
117
+ .nv-search-input {
118
+ width: 100%;
119
+ height: 28px;
120
+ min-height: 28px;
121
+ padding: 0 8px 0 28px;
122
+ font-size: 13px;
123
+ background: #ffffff;
124
+ border: 1px solid @nv-border;
125
+ border-radius: 4px;
126
+ box-sizing: border-box;
127
+ }
128
+
129
+ .nv-chip {
130
+ display: flex;
131
+ align-items: center;
132
+ height: 28px;
133
+ padding: 0 8px;
134
+ margin-left: 6px;
135
+ font-size: 12px;
136
+ color: @nv-text-sub;
137
+ background: @nv-bg-head;
138
+ border: 1px solid @nv-border-light;
139
+ border-radius: 4px;
140
+ flex-shrink: 0;
141
+ box-sizing: border-box;
142
+
143
+ &.active {
144
+ color: @nv-primary;
145
+ background: @nv-primary-light;
146
+ border-color: rgba(77, 79, 236, 0.3);
147
+ }
148
+ }
149
+
150
+ .nv-checkbox {
151
+ position: relative;
152
+ width: 12px;
153
+ height: 12px;
154
+ margin-right: 4px;
155
+ border: 1px solid @nv-text-weak;
156
+ border-radius: 2px;
157
+ background: #ffffff;
158
+ box-sizing: border-box;
159
+
160
+ &.checked {
161
+ background: @nv-primary;
162
+ border-color: @nv-primary;
163
+
164
+ &::after {
165
+ content: '';
166
+ position: absolute;
167
+ left: 3px;
168
+ top: 0;
169
+ width: 3px;
170
+ height: 7px;
171
+ border: solid #ffffff;
172
+ border-width: 0 2px 2px 0;
173
+ transform: rotate(45deg);
174
+ }
175
+ }
176
+ }
177
+
178
+ /* 类型筛选,与面板底部分组胶囊一致 */
179
+ .nv-types {
180
+ height: 36px;
181
+ white-space: nowrap;
182
+ border-bottom: 1px solid @nv-border-light;
183
+ flex-shrink: 0;
184
+ box-sizing: border-box;
185
+ }
186
+
187
+ .nv-type {
188
+ display: inline-block;
189
+ height: 24px;
190
+ line-height: 24px;
191
+ padding: 0 12px;
192
+ margin: 6px 0 0 8px;
193
+ font-size: 12px;
194
+ border-radius: 24px;
195
+ background: #f8f8f8;
196
+ color: @nv-text;
197
+
198
+ &.active {
199
+ background: rgba(77, 79, 236, 0.05);
200
+ color: @nv-primary;
201
+ }
202
+ }
203
+
204
+ /* 表格 */
205
+ .nv-table {
206
+ flex: 1;
207
+ display: flex;
208
+ flex-direction: column;
209
+ min-height: 0;
210
+ }
211
+
212
+ .nv-row {
213
+ display: flex;
214
+ align-items: center;
215
+ min-height: 40px;
216
+ padding: 0 4px;
217
+ border-bottom: 1px solid @nv-divider;
218
+ box-sizing: border-box;
219
+ transition: background-color 0.2s ease;
220
+
221
+ &:active {
222
+ background-color: @nv-primary-active;
223
+ }
224
+
225
+ &.selected {
226
+ background-color: @nv-primary-light;
227
+ }
228
+
229
+ &.error .nv-col,
230
+ &.error .nv-name {
231
+ color: @nv-red;
232
+ }
233
+
234
+ &.pending .nv-col,
235
+ &.pending .nv-name {
236
+ color: @nv-text-weak;
237
+ }
238
+ }
239
+
240
+ .nv-head {
241
+ min-height: 32px;
242
+ background: @nv-bg-head;
243
+ border-bottom: 1px solid @nv-border;
244
+ flex-shrink: 0;
245
+
246
+ &:active {
247
+ background: @nv-bg-head;
248
+ }
249
+
250
+ .nv-col {
251
+ color: @nv-text-sub;
252
+ font-weight: 500;
253
+ }
254
+ }
255
+
256
+ .nv-body {
257
+ flex: 1;
258
+ height: 0;
259
+ }
260
+
261
+ .nv-col {
262
+ padding: 0 4px;
263
+ overflow: hidden;
264
+ text-overflow: ellipsis;
265
+ white-space: nowrap;
266
+ line-height: 1.4;
267
+ color: @nv-text-sub;
268
+ box-sizing: border-box;
269
+
270
+ &.name {
271
+ flex: 1;
272
+ min-width: 0;
273
+ }
274
+
275
+ &.status {
276
+ width: 50px;
277
+ }
278
+
279
+ &.method {
280
+ width: 60px;
281
+ }
282
+
283
+ &.size {
284
+ width: 54px;
285
+ text-align: right;
286
+ font-size: 12px;
287
+ }
288
+
289
+ &.time {
290
+ width: 56px;
291
+ text-align: right;
292
+ font-size: 12px;
293
+ }
294
+ }
295
+
296
+ .nv-name {
297
+ overflow: hidden;
298
+ text-overflow: ellipsis;
299
+ white-space: nowrap;
300
+ color: @nv-text;
301
+ font-weight: 500;
302
+ }
303
+
304
+ .nv-dir {
305
+ overflow: hidden;
306
+ text-overflow: ellipsis;
307
+ white-space: nowrap;
308
+ font-size: 11px;
309
+ color: @nv-text-weak;
310
+ }
311
+
312
+ .nv-empty {
313
+ padding-top: 56px;
314
+ text-align: center;
315
+ color: #d9d9d9;
316
+ font-size: 16px;
317
+ }
318
+
319
+ .nv-empty-sub {
320
+ margin-top: 8px;
321
+ font-size: 12px;
322
+ color: @nv-text-weak;
323
+ }
324
+
325
+ /* 状态栏 */
326
+ .nv-statusbar {
327
+ display: flex;
328
+ align-items: center;
329
+ height: 36px;
330
+ padding: 0 6px;
331
+ background: @nv-bg-bar;
332
+ border-top: 1px solid @nv-border-light;
333
+ flex-shrink: 0;
334
+ box-sizing: border-box;
335
+ overflow: hidden;
336
+ }
337
+
338
+ .nv-stat {
339
+ display: flex;
340
+ align-items: center;
341
+ min-width: 0;
342
+ height: 22px;
343
+ padding: 0 5px;
344
+ margin-right: 4px;
345
+ font-size: 11px;
346
+ white-space: nowrap;
347
+ overflow: hidden;
348
+ background: @nv-bg-head;
349
+ border: 1px solid @nv-border-light;
350
+ border-radius: 4px;
351
+ box-sizing: border-box;
352
+
353
+ &:last-child {
354
+ margin-right: 0;
355
+ }
356
+ }
357
+
358
+ .nv-stat-label {
359
+ margin-right: 4px;
360
+ color: @nv-text-sub;
361
+ opacity: 0.8;
362
+ }
363
+
364
+ .nv-stat-value {
365
+ color: @nv-text;
366
+ font-weight: 500;
367
+ }
368
+
369
+ /* 详情抽屉 */
370
+ .nv-drawer {
371
+ position: absolute;
372
+ top: 0;
373
+ right: -100%;
374
+ width: 100%;
375
+ height: 100%;
376
+ display: flex;
377
+ flex-direction: column;
378
+ background: #ffffff;
379
+ border-left: 1px solid @nv-border-light;
380
+ box-shadow: -2px 0 8px rgba(0, 0, 0, 0.1);
381
+ transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
382
+ z-index: 100;
383
+ box-sizing: border-box;
384
+
385
+ &.show {
386
+ right: 0;
387
+ }
388
+ }
389
+
390
+ .nv-drawer-header {
391
+ display: flex;
392
+ align-items: center;
393
+ justify-content: space-between;
394
+ height: 40px;
395
+ padding: 0 8px 0 12px;
396
+ background: @nv-bg-head;
397
+ border-bottom: 1px solid @nv-border-light;
398
+ flex-shrink: 0;
399
+ box-sizing: border-box;
400
+ }
401
+
402
+ .nv-drawer-title {
403
+ flex: 1;
404
+ min-width: 0;
405
+ margin-right: 8px;
406
+ display: flex;
407
+ align-items: center;
408
+ overflow: hidden;
409
+ text-overflow: ellipsis;
410
+ white-space: nowrap;
411
+ font-size: 13px;
412
+ font-weight: 500;
413
+ color: @nv-text;
414
+
415
+ &::before {
416
+ content: '';
417
+ display: inline-block;
418
+ width: 3px;
419
+ height: 14px;
420
+ margin-right: 8px;
421
+ background: @nv-primary;
422
+ border-radius: 2px;
423
+ flex-shrink: 0;
424
+ }
425
+
426
+ &.error {
427
+ color: @nv-red;
428
+ }
429
+ }
430
+
431
+ .nv-drawer-close {
432
+ position: relative;
433
+ width: 24px;
434
+ height: 24px;
435
+ border-radius: 50%;
436
+ color: @nv-text-sub;
437
+ flex-shrink: 0;
438
+ transition: all 0.2s ease;
439
+
440
+ &::before {
441
+ content: '×';
442
+ position: absolute;
443
+ top: 50%;
444
+ left: 50%;
445
+ font-size: 18px;
446
+ line-height: 1;
447
+ transform: translate(-50%, -50%);
448
+ }
449
+
450
+ &:active {
451
+ background: #e8eaed;
452
+ color: @nv-text;
453
+ }
454
+ }
455
+
456
+ .nv-tabs {
457
+ display: flex;
458
+ height: 36px;
459
+ border-bottom: 1px solid @nv-border-light;
460
+ flex-shrink: 0;
461
+ box-sizing: border-box;
462
+ }
463
+
464
+ .nv-tab {
465
+ flex: 1;
466
+ height: 34px;
467
+ line-height: 34px;
468
+ text-align: center;
469
+ font-size: 12px;
470
+ color: @nv-text-sub;
471
+ border-bottom: 2px solid transparent;
472
+
473
+ &.active {
474
+ color: @nv-primary;
475
+ font-weight: 500;
476
+ border-bottom-color: @nv-primary;
477
+ }
478
+ }
479
+
480
+ .nv-drawer-body {
481
+ flex: 1;
482
+ height: 0;
483
+ padding: 12px;
484
+ box-sizing: border-box;
485
+ }
486
+
487
+ .nv-flex {
488
+ display: flex;
489
+ flex-direction: column;
490
+ overflow: hidden;
491
+ }
492
+
493
+ /* 内容卡片,与 table-view 的 value-preview 一致 */
494
+ .nv-card {
495
+ margin: 0 1px 12px;
496
+ padding: 10px 12px;
497
+ background: @nv-bg-head;
498
+ border: 1px solid @nv-border-light;
499
+ border-radius: 8px;
500
+ box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
501
+ box-sizing: border-box;
502
+ flex-shrink: 0;
503
+ }
504
+
505
+ .nv-card-fill {
506
+ flex: 1;
507
+ min-height: 160px;
508
+ display: flex;
509
+ flex-direction: column;
510
+ margin-bottom: 1px;
511
+ }
512
+
513
+ .nv-card-title {
514
+ display: flex;
515
+ align-items: center;
516
+ justify-content: space-between;
517
+ padding-bottom: 8px;
518
+ margin-bottom: 6px;
519
+ font-size: 12px;
520
+ font-weight: 500;
521
+ color: @nv-text-sub;
522
+ border-bottom: 1px solid @nv-border-light;
523
+ flex-shrink: 0;
524
+ }
525
+
526
+ .nv-count {
527
+ margin-left: 6px;
528
+ padding: 0 6px;
529
+ font-size: 11px;
530
+ line-height: 16px;
531
+ color: @nv-primary;
532
+ background: @nv-primary-light;
533
+ border-radius: 8px;
534
+ }
535
+
536
+ .nv-copy-btn {
537
+ width: 20px;
538
+ height: 20px;
539
+ display: flex;
540
+ align-items: center;
541
+ justify-content: center;
542
+ border-radius: 4px;
543
+
544
+ &:active {
545
+ background: #e8eaed;
546
+ }
547
+ }
548
+
549
+ .nv-kv {
550
+ display: flex;
551
+ padding: 4px 0;
552
+ font-size: 12px;
553
+ line-height: 1.6;
554
+ word-break: break-all;
555
+ }
556
+
557
+ .nv-k {
558
+ flex-shrink: 0;
559
+ width: 42%;
560
+ margin-right: 8px;
561
+ color: @nv-text-sub;
562
+ font-weight: 500;
563
+ word-break: break-word;
564
+ overflow-wrap: break-word;
565
+ }
566
+
567
+ .nv-v {
568
+ flex: 1;
569
+ min-width: 0;
570
+ color: @nv-text;
571
+ font-family: @nv-mono;
572
+
573
+ &.error {
574
+ color: @nv-red;
575
+ }
576
+ }
577
+
578
+ .nv-none {
579
+ padding: 4px 0;
580
+ font-size: 12px;
581
+ color: @nv-text-weak;
582
+ }
583
+
584
+ .nv-json {
585
+ flex: 1;
586
+ height: 0;
587
+ margin: 0 -12px -10px;
588
+ }
589
+
590
+ .nv-code {
591
+ display: block;
592
+ font-family: @nv-mono;
593
+ font-size: 13px;
594
+ line-height: 1.6;
595
+ white-space: pre-wrap;
596
+ word-break: break-all;
597
+ color: @nv-text;
598
+ }
599
+
600
+ .nv-json .nv-code {
601
+ padding: 4px 12px 10px;
602
+ }
603
+
604
+ .nv-placeholder {
605
+ padding-top: 48px;
606
+ text-align: center;
607
+ font-size: 14px;
608
+ color: #d9d9d9;
609
+
610
+ &.error {
611
+ color: @nv-red;
612
+ }
613
+ }
614
+
615
+ .nv-actions {
616
+ display: flex;
617
+ padding-bottom: 4px;
618
+ }
619
+
620
+ .nv-action {
621
+ display: flex;
622
+ align-items: center;
623
+ height: 28px;
624
+ padding: 0 10px;
625
+ margin-right: 8px;
626
+ font-size: 12px;
627
+ color: @nv-primary;
628
+ background: #ffffff;
629
+ border: 1px solid @nv-border;
630
+ border-radius: 4px;
631
+ box-sizing: border-box;
632
+ transition: all 0.2s ease;
633
+
634
+ .nv-icon {
635
+ width: 12px;
636
+ height: 12px;
637
+ margin-right: 4px;
638
+ background-image: @icon-copy-primary;
639
+ opacity: 1;
640
+ }
641
+
642
+ &:active {
643
+ background: @nv-primary-light;
644
+ }
645
+ }
646
+
647
+ .nv-phase {
648
+ display: flex;
649
+ align-items: center;
650
+ padding: 4px 0;
651
+ font-size: 12px;
652
+ }
653
+
654
+ .nv-phase-label {
655
+ width: 40%;
656
+ flex-shrink: 0;
657
+ color: @nv-text-sub;
658
+ overflow: hidden;
659
+ text-overflow: ellipsis;
660
+ white-space: nowrap;
661
+ }
662
+
663
+ .nv-phase-track {
664
+ position: relative;
665
+ flex: 1;
666
+ height: 8px;
667
+ margin: 0 8px;
668
+ background: #ffffff;
669
+ border-radius: 4px;
670
+ overflow: hidden;
671
+ }
672
+
673
+ .nv-phase-bar {
674
+ position: absolute;
675
+ top: 0;
676
+ height: 8px;
677
+ border-radius: 4px;
678
+ }
679
+
680
+ .nv-phase-time {
681
+ width: 56px;
682
+ flex-shrink: 0;
683
+ text-align: right;
684
+ color: @nv-text;
685
+ }