@aiot-nexus/plugin-sdk 3.1.1 → 3.2.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.
@@ -1,8 +1,29 @@
1
1
  :root {
2
+ --bg: var(--nexus-color-background, #eef1f4);
3
+ --panel: var(--nexus-color-surface, #ffffff);
4
+ --raise: var(--nexus-color-surface-raised, #f7f9fa);
5
+ --hover: var(--nexus-color-surface-hover, #eef3f6);
6
+ --inset: var(--nexus-color-surface-inset, #e4e9ed);
7
+ --line: var(--nexus-color-border, #d7dde3);
8
+ --line-strong: var(--nexus-color-border-strong, #c2cbd3);
9
+ --fg: var(--nexus-color-text, #212a32);
10
+ --fg-dim: var(--nexus-color-text-muted, #5a6772);
11
+ --fg-faint: var(--nexus-color-text-faint, #8b97a1);
12
+ --brand: var(--nexus-color-primary, #8fc31f);
13
+ --brand-text: var(--nexus-color-accent, #6f9a15);
14
+ --on-brand: var(--nexus-color-on-primary, #ffffff);
15
+ --primary-action: var(--nexus-color-primary, #8fc31f);
16
+ --on-primary: var(--nexus-color-on-primary, #ffffff);
17
+ --on-negative: var(--nexus-color-on-negative, #ffffff);
18
+ --focus-ring: var(--nexus-color-accent, #6f9a15);
19
+ --brand-soft: var(--nexus-color-primary-soft, rgba(143, 195, 31, 0.12));
20
+ --negative: var(--nexus-color-negative, #c2402f);
2
21
  color-scheme: light;
3
- font-family: "Segoe UI", Arial, sans-serif;
4
- background: #f3f5f7;
5
- color: #20252b;
22
+ font-family: "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei",
23
+ "Segoe UI", system-ui, sans-serif;
24
+ background: var(--bg);
25
+ color: var(--fg);
26
+ font-size: 14px;
6
27
  }
7
28
 
8
29
  * {
@@ -19,7 +40,8 @@ body {
19
40
  height: 100vh;
20
41
  min-height: 100vh;
21
42
  overflow: hidden;
22
- background: #f3f5f7;
43
+ background: var(--bg);
44
+ color: var(--fg);
23
45
  }
24
46
 
25
47
  button,
@@ -46,9 +68,9 @@ textarea {
46
68
  .editor-panel,
47
69
  .data-panel {
48
70
  min-width: 0;
49
- border: 1px solid #d4d9df;
50
- border-radius: 8px;
51
- background: #ffffff;
71
+ border: 1px solid var(--line);
72
+ border-radius: 10px;
73
+ background: var(--panel);
52
74
  }
53
75
 
54
76
  .plugin-header {
@@ -86,18 +108,19 @@ p {
86
108
  }
87
109
 
88
110
  h1 {
89
- font-size: 20px;
111
+ font-size: 18px;
112
+ font-weight: 600;
90
113
  }
91
114
 
92
115
  h2 {
93
- font-size: 15px;
116
+ font-size: 14.5px;
94
117
  }
95
118
 
96
119
  .database-heading p {
97
120
  overflow: hidden;
98
121
  max-width: min(62vw, 760px);
99
122
  margin-top: 3px;
100
- color: #65717e;
123
+ color: var(--fg-dim);
101
124
  font-size: 12px;
102
125
  text-overflow: ellipsis;
103
126
  white-space: nowrap;
@@ -115,13 +138,15 @@ h2 {
115
138
 
116
139
  button {
117
140
  min-height: 32px;
118
- border: 1px solid #1768a6;
119
- border-radius: 6px;
141
+ border: 1px solid var(--brand);
142
+ border-radius: 7px;
120
143
  padding: 0 11px;
121
- background: #1768a6;
122
- color: #ffffff;
144
+ background: var(--brand);
145
+ color: var(--on-brand);
123
146
  font-weight: 600;
124
147
  cursor: pointer;
148
+ transition: filter 0.15s ease, background-color 0.15s ease,
149
+ border-color 0.15s ease, color 0.15s ease;
125
150
  }
126
151
 
127
152
  button:disabled,
@@ -133,14 +158,50 @@ textarea:disabled {
133
158
  }
134
159
 
135
160
  button.button-secondary {
136
- border-color: #aeb7c2;
137
- background: #ffffff;
138
- color: #20252b;
161
+ border-color: var(--line-strong);
162
+ background: var(--panel);
163
+ color: var(--fg);
139
164
  }
140
165
 
141
166
  button.button-danger {
142
- border-color: #b42318;
143
- background: #b42318;
167
+ border-color: var(--negative);
168
+ background: var(--negative);
169
+ color: var(--on-negative);
170
+ }
171
+
172
+ button:not(:disabled):hover {
173
+ border-color: var(--primary-action);
174
+ background: var(--primary-action);
175
+ color: var(--on-primary);
176
+ }
177
+
178
+ button.button-secondary:not(:disabled):hover,
179
+ button.record-action:not(:disabled):hover {
180
+ filter: none;
181
+ border-color: var(--brand);
182
+ background: var(--hover);
183
+ color: var(--fg);
184
+ }
185
+
186
+ button.button-danger:not(:disabled):hover {
187
+ border-color: var(--negative);
188
+ background: var(--negative);
189
+ color: var(--on-negative);
190
+ filter: brightness(1.06);
191
+ }
192
+
193
+ button:focus-visible,
194
+ input:focus-visible,
195
+ select:focus-visible,
196
+ textarea:focus-visible {
197
+ outline: 2px solid var(--focus-ring);
198
+ outline-offset: 2px;
199
+ }
200
+
201
+ input:hover,
202
+ select:hover,
203
+ textarea:hover {
204
+ border-color: var(--brand);
144
205
  }
145
206
 
146
207
  .compact-button {
@@ -168,7 +229,7 @@ button.button-danger {
168
229
  #statusLog,
169
230
  .editor-panel .panel-heading p,
170
231
  .field-current {
171
- color: #65717e;
232
+ color: var(--fg-dim);
172
233
  font-size: 12px;
173
234
  }
174
235
 
@@ -184,11 +245,11 @@ select,
184
245
  textarea {
185
246
  width: 100%;
186
247
  min-width: 0;
187
- border: 1px solid #aeb7c2;
188
- border-radius: 6px;
248
+ border: 1px solid var(--line-strong);
249
+ border-radius: 7px;
189
250
  padding: 7px 9px;
190
- background: #ffffff;
191
- color: #20252b;
251
+ background: var(--panel);
252
+ color: var(--fg);
192
253
  }
193
254
 
194
255
  textarea {
@@ -236,7 +297,7 @@ textarea {
236
297
  gap: 6px 8px;
237
298
  align-items: end;
238
299
  min-width: 0;
239
- border-top: 1px solid #e7eaee;
300
+ border-top: 1px solid var(--line);
240
301
  padding-top: 8px;
241
302
  }
242
303
 
@@ -255,11 +316,11 @@ textarea {
255
316
  }
256
317
 
257
318
  .column-badge {
258
- border: 1px solid #ccd3da;
319
+ border: 1px solid var(--line);
259
320
  border-radius: 4px;
260
321
  padding: 1px 4px;
261
- background: #f7f8fa;
262
- color: #56616d;
322
+ background: var(--raise);
323
+ color: var(--fg-dim);
263
324
  font-size: 10px;
264
325
  font-weight: 600;
265
326
  }
@@ -282,7 +343,7 @@ textarea {
282
343
 
283
344
  .error {
284
345
  margin-top: 8px;
285
- color: #b42318;
346
+ color: var(--negative);
286
347
  font-size: 12px;
287
348
  }
288
349
 
@@ -306,9 +367,9 @@ textarea {
306
367
 
307
368
  .empty-state {
308
369
  padding: 18px;
309
- border: 1px dashed #aeb7c2;
310
- border-radius: 6px;
311
- color: #65717e;
370
+ border: 1px dashed var(--line-strong);
371
+ border-radius: 7px;
372
+ color: var(--fg-dim);
312
373
  text-align: center;
313
374
  }
314
375
 
@@ -318,8 +379,8 @@ textarea {
318
379
  min-height: 80px;
319
380
  max-width: 100%;
320
381
  overflow: auto;
321
- border: 1px solid #d4d9df;
322
- border-radius: 6px;
382
+ border: 1px solid var(--line);
383
+ border-radius: 7px;
323
384
  }
324
385
 
325
386
  table {
@@ -331,7 +392,7 @@ table {
331
392
  th,
332
393
  td {
333
394
  max-width: 360px;
334
- border-bottom: 1px solid #e7eaee;
395
+ border-bottom: 1px solid var(--line);
335
396
  padding: 7px 9px;
336
397
  text-align: left;
337
398
  vertical-align: top;
@@ -342,8 +403,8 @@ th {
342
403
  z-index: 1;
343
404
  top: 0;
344
405
  min-width: 120px;
345
- background: #f7f8fa;
346
- color: #56616d;
406
+ background: var(--raise);
407
+ color: var(--fg-dim);
347
408
  font-size: 12px;
348
409
  }
349
410
 
@@ -365,7 +426,7 @@ td {
365
426
  .cell-null,
366
427
  .cell-blob,
367
428
  .cell-truncated {
368
- color: #65717e;
429
+ color: var(--fg-dim);
369
430
  font-family: Consolas, monospace;
370
431
  font-size: 12px;
371
432
  }
@@ -379,7 +440,7 @@ td {
379
440
  td.row-actions-cell {
380
441
  position: sticky;
381
442
  right: 0;
382
- background: #ffffff;
443
+ background: var(--panel);
383
444
  }
384
445
 
385
446
  .pager {
@@ -388,7 +449,7 @@ td.row-actions-cell {
388
449
  justify-content: flex-end;
389
450
  gap: 12px;
390
451
  padding-top: 9px;
391
- color: #65717e;
452
+ color: var(--fg-dim);
392
453
  font-size: 12px;
393
454
  }
394
455
 
@@ -449,14 +510,31 @@ td.row-actions-cell {
449
510
  }
450
511
 
451
512
  :root[data-theme="dark"] {
513
+ --bg: var(--nexus-color-background, #101418);
514
+ --panel: var(--nexus-color-surface, #1b222a);
515
+ --raise: var(--nexus-color-surface-raised, #171c22);
516
+ --hover: var(--nexus-color-surface-hover, #222a34);
517
+ --inset: var(--nexus-color-surface-inset, #0c0f13);
518
+ --line: var(--nexus-color-border, #2a333e);
519
+ --line-strong: var(--nexus-color-border-strong, #38434f);
520
+ --fg: var(--nexus-color-text, #e2e8ee);
521
+ --fg-dim: var(--nexus-color-text-muted, #97a3af);
522
+ --fg-faint: var(--nexus-color-text-faint, #64707c);
523
+ --brand-text: var(--nexus-color-accent, #a5d43e);
524
+ --primary-action: var(--nexus-color-primary, #8fc31f);
525
+ --on-primary: var(--nexus-color-on-primary, #ffffff);
526
+ --on-negative: var(--nexus-color-on-negative, #101418);
527
+ --focus-ring: var(--nexus-color-accent, #a5d43e);
528
+ --brand-soft: var(--nexus-color-primary-soft, rgba(143, 195, 31, 0.14));
529
+ --negative: var(--nexus-color-negative, #e2604f);
452
530
  color-scheme: dark;
453
- background: #16191d;
454
- color: #edf0f2;
531
+ background: var(--bg);
532
+ color: var(--fg);
455
533
  }
456
534
 
457
535
  :root[data-theme="dark"] body {
458
- background: #16191d;
459
- color: #edf0f2;
536
+ background: var(--bg);
537
+ color: var(--fg);
460
538
  }
461
539
 
462
540
  :root[data-theme="dark"] .plugin-header,
@@ -464,8 +542,8 @@ td.row-actions-cell {
464
542
  :root[data-theme="dark"] .editor-panel,
465
543
  :root[data-theme="dark"] .data-panel,
466
544
  :root[data-theme="dark"] td.row-actions-cell {
467
- border-color: #454b52;
468
- background: #24282d;
545
+ border-color: var(--line);
546
+ background: var(--panel);
469
547
  }
470
548
 
471
549
  :root[data-theme="dark"] .database-heading p,
@@ -479,36 +557,36 @@ td.row-actions-cell {
479
557
  :root[data-theme="dark"] .cell-null,
480
558
  :root[data-theme="dark"] .cell-blob,
481
559
  :root[data-theme="dark"] .cell-truncated {
482
- color: #aeb7c2;
560
+ color: var(--fg-dim);
483
561
  }
484
562
 
485
563
  :root[data-theme="dark"] input,
486
564
  :root[data-theme="dark"] select,
487
565
  :root[data-theme="dark"] textarea,
488
566
  :root[data-theme="dark"] button.button-secondary {
489
- border-color: #59616a;
490
- background: #191c20;
491
- color: #edf0f2;
567
+ border-color: var(--line-strong);
568
+ background: var(--inset);
569
+ color: var(--fg);
492
570
  }
493
571
 
494
572
  :root[data-theme="dark"] .column-badge {
495
- border-color: #59616a;
496
- background: #30353b;
497
- color: #d2d8de;
573
+ border-color: var(--line-strong);
574
+ background: var(--raise);
575
+ color: var(--fg-dim);
498
576
  }
499
577
 
500
578
  :root[data-theme="dark"] .table-wrap,
501
579
  :root[data-theme="dark"] .empty-state,
502
580
  :root[data-theme="dark"] .editor-field {
503
- border-color: #454b52;
581
+ border-color: var(--line);
504
582
  }
505
583
 
506
584
  :root[data-theme="dark"] th {
507
- background: #2d3238;
508
- color: #d2d8de;
585
+ background: var(--raise);
586
+ color: var(--fg-dim);
509
587
  }
510
588
 
511
589
  :root[data-theme="dark"] th,
512
590
  :root[data-theme="dark"] td {
513
- border-bottom-color: #454b52;
591
+ border-bottom-color: var(--line);
514
592
  }