@cheemsup/dsh-plugin-console 0.1.1 → 0.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.
- package/LICENSE +2 -0
- package/README.md +95 -86
- package/icon.svg +203 -0
- package/lib/client.control.js +7 -2
- package/lib/client.disable-preview.js +904 -0
- package/lib/client.editor.js +3 -3
- package/lib/client.impact-tree.js +487 -0
- package/lib/client.js +38 -8
- package/lib/client.page.js +69 -7
- package/lib/client.plugins.js +5 -3
- package/lib/client.preview-messages.js +14 -3
- package/lib/client.preview.js +3 -2
- package/lib/client.relation-graph.js +364 -0
- package/lib/client.search.js +409 -408
- package/lib/client.shared.js +3 -0
- package/lib/client.styles.js +589 -524
- package/lib/host/attribution.js +34 -0
- package/lib/host/config-layers.js +589 -0
- package/lib/host/constants.js +3 -0
- package/lib/host/disable-preview.js +651 -0
- package/lib/host/entries.js +1 -1
- package/lib/host/impact.js +10 -4
- package/lib/host/injection-owners.js +60 -0
- package/lib/host/patch-config.js +554 -0
- package/lib/host/routes/disable-preview.js +19 -0
- package/lib/host/session-influence.js +2 -10
- package/lib/index.js +4 -1
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +124 -113
package/lib/client.styles.js
CHANGED
|
@@ -1,524 +1,589 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* 整份样式表与一次性注入。
|
|
3
|
-
*
|
|
4
|
-
* 样式只在首次 materialize 时注入一次:重复 materialize 不该重复插入 `<style>`。
|
|
5
|
-
*
|
|
6
|
-
* 颜色分三层:
|
|
7
|
-
* 1. `.ptRoot` 里的「跟随 DSH」映射——把宿主 `--dsw-alias-*` 接到 `--pt-*`;
|
|
8
|
-
* 2. `[data-pt-theme=light]` / `[data-pt-theme=dark]` 两套固定色板;
|
|
9
|
-
* 3. 组件规则只允许引用 `--pt-*`。
|
|
10
|
-
* 这条边界由 `scripts/verify-theme.mjs` 强制:组件里再写一个 `--dsw-alias-*`,
|
|
11
|
-
* 显式主题就会花掉,而且没人会在跟随模式下发现。
|
|
12
|
-
*
|
|
13
|
-
* 外观选择是浏览器本地偏好(`localStorage`),只作用于本面板,不改宿主主题。
|
|
14
|
-
*
|
|
15
|
-
* 本文件是一个包内 chunk:入口用 `require.async('./client.styles.js')` 取它,
|
|
16
|
-
* 工厂返回 `{ CSS, ensureStyles }`。
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
window.__ModuleLoader__.load({
|
|
20
|
-
id: '@cheemsup/dsh-plugin-console',
|
|
21
|
-
chunk: 'client.styles.js',
|
|
22
|
-
factory: () => {
|
|
23
|
-
/** 样式标签的稳定 id;同一个 id 只允许一个标签存在。 */
|
|
24
|
-
const TAG_ID = 'dsh-plugin-console/plugin-console.css'
|
|
25
|
-
|
|
26
|
-
/** 面板的全部样式。 */ const CSS = `
|
|
27
|
-
/* ── Token:跟随 DSH(默认)────────────────────────────────────────────
|
|
28
|
-
显式主题块会整体覆盖这组值;组件规则只认 --pt-*。
|
|
29
|
-
圆角与阴影不随主题变,所以留在这一块。 */
|
|
30
|
-
.ptRoot{
|
|
31
|
-
--pt-canvas:transparent;
|
|
32
|
-
--pt-surface-1:var(--dsw-alias-bg-layer-2,#f5f5f7);
|
|
33
|
-
--pt-surface-2:var(--dsw-alias-bg-layer-1,#ffffff);
|
|
34
|
-
--pt-surface-3:var(--dsw-alias-bg-layer-3,#f0f0f2);
|
|
35
|
-
--pt-line-1:var(--dsw-alias-border-l3,#e0e0e3);
|
|
36
|
-
--pt-line-2:var(--dsw-alias-border-l2,#ececef);
|
|
37
|
-
--pt-line-3:var(--dsw-alias-border-l4,#d2d2d7);
|
|
38
|
-
--pt-text-1:var(--dsw-alias-label-primary,#1d1d1f);
|
|
39
|
-
--pt-text-2:var(--dsw-alias-label-secondary,#6e6e73);
|
|
40
|
-
--pt-text-3:var(--dsw-alias-label-tertiary,#86868b);
|
|
41
|
-
--pt-accent:var(--dsw-alias-state-business-primary,#0066cc);
|
|
42
|
-
--pt-accent-hover:var(--dsw-alias-state-business-primary,#0071e3);
|
|
43
|
-
--pt-accent-soft:var(--dsw-alias-state-business-tertiary,var(--dsw-alias-bg-layer-3,#eaf2fd));
|
|
44
|
-
--pt-on-accent:#ffffff;
|
|
45
|
-
--pt-warn:var(--dsw-alias-state-warn-primary,#a86b12);
|
|
46
|
-
--pt-warn-soft:var(--dsw-alias-state-warn-tertiary,var(--dsw-alias-bg-layer-3,#fbf3e4));
|
|
47
|
-
--pt-error:var(--dsw-alias-state-error-primary,#d93b40);
|
|
48
|
-
--pt-error-soft:var(--dsw-alias-state-error-tertiary,var(--dsw-alias-bg-layer-3,#fbeceb));
|
|
49
|
-
--pt-error-line:rgba(217,59,64,.45);
|
|
50
|
-
--pt-warn-line:rgba(168,107,18,.45);
|
|
51
|
-
--pt-success:var(--dsw-alias-state-success-primary,#0f9184);
|
|
52
|
-
--pt-hover:var(--dsw-alias-interactive-bg-hover,rgba(0,0,0,.045));
|
|
53
|
-
--pt-focus:var(--dsw-alias-state-business-primary,#0071e3);
|
|
54
|
-
--pt-code-bg:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-1,#f5f5f7));
|
|
55
|
-
--pt-skeleton:var(--dsw-alias-bg-skeleton,var(--dsw-alias-bg-layer-2,#f0f0f2));
|
|
56
|
-
--pt-scrim:rgba(0,0,0,.38);
|
|
57
|
-
--pt-on-solid:#ffffff;
|
|
58
|
-
--pt-knob:#ffffff;
|
|
59
|
-
--pt-dock-shadow:0 6px 14px -10px rgba(0,0,0,.45);
|
|
60
|
-
--pt-knob-shadow:0 0 0 .5px rgba(0,0,0,.18);
|
|
61
|
-
--pt-shadow:0 12px 32px rgba(0,0,0,.24);
|
|
62
|
-
--pt-hit-0-bg:rgba(217,59,64,.28);--pt-hit-0-solid:#d93b40;
|
|
63
|
-
--pt-hit-1-bg:rgba(183,121,31,.3);--pt-hit-1-solid:#a86b12;
|
|
64
|
-
--pt-hit-2-bg:rgba(15,148,136,.26);--pt-hit-2-solid:#0f9184;
|
|
65
|
-
--pt-hit-3-bg:rgba(63,111,216,.26);--pt-hit-3-solid:#3f6fd8;
|
|
66
|
-
--pt-hit-4-bg:rgba(124,92,214,.26);--pt-hit-4-solid:#7c5cd6;
|
|
67
|
-
--pt-hit-5-bg:rgba(192,38,143,.26);--pt-hit-5-solid:#c0268f;
|
|
68
|
-
--pt-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
--pt-
|
|
80
|
-
--pt-
|
|
81
|
-
--pt-
|
|
82
|
-
--pt-
|
|
83
|
-
--pt-
|
|
84
|
-
--pt-
|
|
85
|
-
--pt-
|
|
86
|
-
--pt-
|
|
87
|
-
--pt-
|
|
88
|
-
--pt-
|
|
89
|
-
--pt-
|
|
90
|
-
--pt-
|
|
91
|
-
--pt-
|
|
92
|
-
--pt-
|
|
93
|
-
--pt-
|
|
94
|
-
--pt-warn-
|
|
95
|
-
--pt-
|
|
96
|
-
--pt-
|
|
97
|
-
--pt-
|
|
98
|
-
--pt-
|
|
99
|
-
--pt-
|
|
100
|
-
--pt-
|
|
101
|
-
--pt-
|
|
102
|
-
--pt-
|
|
103
|
-
--pt-
|
|
104
|
-
--pt-
|
|
105
|
-
--pt-
|
|
106
|
-
--pt-
|
|
107
|
-
--pt-
|
|
108
|
-
--pt-
|
|
109
|
-
--pt-
|
|
110
|
-
--pt-hit-
|
|
111
|
-
--pt-hit-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
--pt-
|
|
117
|
-
--pt-
|
|
118
|
-
--pt-
|
|
119
|
-
--pt-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
--pt-
|
|
125
|
-
--pt-
|
|
126
|
-
--pt-
|
|
127
|
-
--pt-
|
|
128
|
-
--pt-
|
|
129
|
-
--pt-
|
|
130
|
-
--pt-
|
|
131
|
-
--pt-
|
|
132
|
-
--pt-
|
|
133
|
-
--pt-
|
|
134
|
-
--pt-
|
|
135
|
-
--pt-
|
|
136
|
-
--pt-
|
|
137
|
-
--pt-
|
|
138
|
-
--pt-
|
|
139
|
-
--pt-
|
|
140
|
-
--pt-
|
|
141
|
-
--pt-
|
|
142
|
-
--pt-
|
|
143
|
-
--pt-
|
|
144
|
-
--pt-
|
|
145
|
-
--pt-
|
|
146
|
-
--pt-
|
|
147
|
-
--pt-
|
|
148
|
-
--pt-
|
|
149
|
-
--pt-
|
|
150
|
-
--pt-
|
|
151
|
-
--pt-
|
|
152
|
-
--pt-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
.
|
|
169
|
-
.
|
|
170
|
-
.
|
|
171
|
-
|
|
172
|
-
.
|
|
173
|
-
|
|
174
|
-
.
|
|
175
|
-
|
|
176
|
-
.
|
|
177
|
-
.
|
|
178
|
-
.
|
|
179
|
-
.
|
|
180
|
-
.
|
|
181
|
-
.
|
|
182
|
-
.
|
|
183
|
-
.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
.
|
|
187
|
-
.
|
|
188
|
-
|
|
189
|
-
.
|
|
190
|
-
.
|
|
191
|
-
.
|
|
192
|
-
.
|
|
193
|
-
.
|
|
194
|
-
.
|
|
195
|
-
|
|
196
|
-
.
|
|
197
|
-
.
|
|
198
|
-
.
|
|
199
|
-
|
|
200
|
-
.
|
|
201
|
-
|
|
202
|
-
.
|
|
203
|
-
|
|
204
|
-
.
|
|
205
|
-
|
|
206
|
-
.
|
|
207
|
-
.
|
|
208
|
-
.
|
|
209
|
-
.
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
.
|
|
213
|
-
|
|
214
|
-
.
|
|
215
|
-
.
|
|
216
|
-
|
|
217
|
-
.
|
|
218
|
-
|
|
219
|
-
.
|
|
220
|
-
|
|
221
|
-
.
|
|
222
|
-
|
|
223
|
-
.
|
|
224
|
-
.
|
|
225
|
-
.
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
.
|
|
231
|
-
.
|
|
232
|
-
|
|
233
|
-
.
|
|
234
|
-
.
|
|
235
|
-
.
|
|
236
|
-
.
|
|
237
|
-
|
|
238
|
-
.
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
.
|
|
242
|
-
/*
|
|
243
|
-
.
|
|
244
|
-
|
|
245
|
-
.
|
|
246
|
-
.
|
|
247
|
-
|
|
248
|
-
.
|
|
249
|
-
.
|
|
250
|
-
.
|
|
251
|
-
.
|
|
252
|
-
.
|
|
253
|
-
.
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
.
|
|
257
|
-
/*
|
|
258
|
-
.
|
|
259
|
-
|
|
260
|
-
.
|
|
261
|
-
.
|
|
262
|
-
.
|
|
263
|
-
.
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
.
|
|
267
|
-
.
|
|
268
|
-
.
|
|
269
|
-
.
|
|
270
|
-
.
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
.
|
|
276
|
-
.
|
|
277
|
-
.
|
|
278
|
-
|
|
279
|
-
.
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
.
|
|
284
|
-
.
|
|
285
|
-
|
|
286
|
-
.
|
|
287
|
-
.
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
.
|
|
291
|
-
.
|
|
292
|
-
.
|
|
293
|
-
.
|
|
294
|
-
.
|
|
295
|
-
.
|
|
296
|
-
.
|
|
297
|
-
.
|
|
298
|
-
.
|
|
299
|
-
.
|
|
300
|
-
.
|
|
301
|
-
|
|
302
|
-
.
|
|
303
|
-
.
|
|
304
|
-
.
|
|
305
|
-
.
|
|
306
|
-
.
|
|
307
|
-
.
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
.
|
|
311
|
-
.
|
|
312
|
-
|
|
313
|
-
.
|
|
314
|
-
.
|
|
315
|
-
|
|
316
|
-
.
|
|
317
|
-
|
|
318
|
-
.
|
|
319
|
-
.
|
|
320
|
-
.
|
|
321
|
-
|
|
322
|
-
.
|
|
323
|
-
.
|
|
324
|
-
.
|
|
325
|
-
.
|
|
326
|
-
.
|
|
327
|
-
.
|
|
328
|
-
.
|
|
329
|
-
.
|
|
330
|
-
|
|
331
|
-
.
|
|
332
|
-
|
|
333
|
-
.
|
|
334
|
-
.
|
|
335
|
-
.
|
|
336
|
-
.
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
.
|
|
340
|
-
|
|
341
|
-
.
|
|
342
|
-
.
|
|
343
|
-
.
|
|
344
|
-
|
|
345
|
-
.
|
|
346
|
-
.
|
|
347
|
-
.
|
|
348
|
-
.
|
|
349
|
-
.
|
|
350
|
-
.
|
|
351
|
-
.
|
|
352
|
-
.
|
|
353
|
-
/*
|
|
354
|
-
.
|
|
355
|
-
.
|
|
356
|
-
.
|
|
357
|
-
.
|
|
358
|
-
.
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
.
|
|
362
|
-
|
|
363
|
-
.
|
|
364
|
-
.
|
|
365
|
-
.
|
|
366
|
-
.
|
|
367
|
-
.
|
|
368
|
-
.
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
.
|
|
373
|
-
.
|
|
374
|
-
|
|
375
|
-
.
|
|
376
|
-
|
|
377
|
-
.
|
|
378
|
-
.
|
|
379
|
-
.
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
.
|
|
385
|
-
|
|
386
|
-
.
|
|
387
|
-
.
|
|
388
|
-
.
|
|
389
|
-
.
|
|
390
|
-
|
|
391
|
-
.
|
|
392
|
-
|
|
393
|
-
.
|
|
394
|
-
|
|
395
|
-
.
|
|
396
|
-
.
|
|
397
|
-
.
|
|
398
|
-
.
|
|
399
|
-
.
|
|
400
|
-
|
|
401
|
-
.
|
|
402
|
-
|
|
403
|
-
.
|
|
404
|
-
.
|
|
405
|
-
.
|
|
406
|
-
|
|
407
|
-
.
|
|
408
|
-
|
|
409
|
-
.
|
|
410
|
-
.
|
|
411
|
-
.
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
.
|
|
415
|
-
.
|
|
416
|
-
.
|
|
417
|
-
|
|
418
|
-
.
|
|
419
|
-
.
|
|
420
|
-
.
|
|
421
|
-
.
|
|
422
|
-
|
|
423
|
-
.
|
|
424
|
-
|
|
425
|
-
.
|
|
426
|
-
.
|
|
427
|
-
|
|
428
|
-
.
|
|
429
|
-
/*
|
|
430
|
-
.
|
|
431
|
-
/*
|
|
432
|
-
.
|
|
433
|
-
.
|
|
434
|
-
|
|
435
|
-
.
|
|
436
|
-
/*
|
|
437
|
-
.
|
|
438
|
-
|
|
439
|
-
.
|
|
440
|
-
/*
|
|
441
|
-
.
|
|
442
|
-
|
|
443
|
-
.
|
|
444
|
-
.
|
|
445
|
-
|
|
446
|
-
.
|
|
447
|
-
.
|
|
448
|
-
.
|
|
449
|
-
.
|
|
450
|
-
|
|
451
|
-
.
|
|
452
|
-
|
|
453
|
-
.
|
|
454
|
-
|
|
455
|
-
.
|
|
456
|
-
.
|
|
457
|
-
.
|
|
458
|
-
.
|
|
459
|
-
.
|
|
460
|
-
/*
|
|
461
|
-
.
|
|
462
|
-
|
|
463
|
-
.
|
|
464
|
-
.
|
|
465
|
-
.
|
|
466
|
-
.
|
|
467
|
-
.
|
|
468
|
-
|
|
469
|
-
.
|
|
470
|
-
|
|
471
|
-
.
|
|
472
|
-
|
|
473
|
-
.
|
|
474
|
-
.
|
|
475
|
-
.
|
|
476
|
-
.
|
|
477
|
-
|
|
478
|
-
.
|
|
479
|
-
.
|
|
480
|
-
|
|
481
|
-
.
|
|
482
|
-
.
|
|
483
|
-
.
|
|
484
|
-
|
|
485
|
-
.
|
|
486
|
-
.
|
|
487
|
-
|
|
488
|
-
.
|
|
489
|
-
|
|
490
|
-
.
|
|
491
|
-
|
|
492
|
-
.
|
|
493
|
-
.
|
|
494
|
-
.
|
|
495
|
-
.
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
.
|
|
500
|
-
|
|
501
|
-
.
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
.
|
|
505
|
-
.
|
|
506
|
-
.
|
|
507
|
-
.
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* 整份样式表与一次性注入。
|
|
3
|
+
*
|
|
4
|
+
* 样式只在首次 materialize 时注入一次:重复 materialize 不该重复插入 `<style>`。
|
|
5
|
+
*
|
|
6
|
+
* 颜色分三层:
|
|
7
|
+
* 1. `.ptRoot` 里的「跟随 DSH」映射——把宿主 `--dsw-alias-*` 接到 `--pt-*`;
|
|
8
|
+
* 2. `[data-pt-theme=light]` / `[data-pt-theme=dark]` 两套固定色板;
|
|
9
|
+
* 3. 组件规则只允许引用 `--pt-*`。
|
|
10
|
+
* 这条边界由 `scripts/verify-theme.mjs` 强制:组件里再写一个 `--dsw-alias-*`,
|
|
11
|
+
* 显式主题就会花掉,而且没人会在跟随模式下发现。
|
|
12
|
+
*
|
|
13
|
+
* 外观选择是浏览器本地偏好(`localStorage`),只作用于本面板,不改宿主主题。
|
|
14
|
+
*
|
|
15
|
+
* 本文件是一个包内 chunk:入口用 `require.async('./client.styles.js')` 取它,
|
|
16
|
+
* 工厂返回 `{ CSS, ensureStyles }`。
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
window.__ModuleLoader__.load({
|
|
20
|
+
id: '@cheemsup/dsh-plugin-console',
|
|
21
|
+
chunk: 'client.styles.js',
|
|
22
|
+
factory: () => {
|
|
23
|
+
/** 样式标签的稳定 id;同一个 id 只允许一个标签存在。 */
|
|
24
|
+
const TAG_ID = 'dsh-plugin-console/plugin-console.css'
|
|
25
|
+
|
|
26
|
+
/** 面板的全部样式。 */ const CSS = `
|
|
27
|
+
/* ── Token:跟随 DSH(默认)────────────────────────────────────────────
|
|
28
|
+
显式主题块会整体覆盖这组值;组件规则只认 --pt-*。
|
|
29
|
+
圆角与阴影不随主题变,所以留在这一块。 */
|
|
30
|
+
.ptRoot{
|
|
31
|
+
--pt-canvas:transparent;
|
|
32
|
+
--pt-surface-1:var(--dsw-alias-bg-layer-2,#f5f5f7);
|
|
33
|
+
--pt-surface-2:var(--dsw-alias-bg-layer-1,#ffffff);
|
|
34
|
+
--pt-surface-3:var(--dsw-alias-bg-layer-3,#f0f0f2);
|
|
35
|
+
--pt-line-1:var(--dsw-alias-border-l3,#e0e0e3);
|
|
36
|
+
--pt-line-2:var(--dsw-alias-border-l2,#ececef);
|
|
37
|
+
--pt-line-3:var(--dsw-alias-border-l4,#d2d2d7);
|
|
38
|
+
--pt-text-1:var(--dsw-alias-label-primary,#1d1d1f);
|
|
39
|
+
--pt-text-2:var(--dsw-alias-label-secondary,#6e6e73);
|
|
40
|
+
--pt-text-3:var(--dsw-alias-label-tertiary,#86868b);
|
|
41
|
+
--pt-accent:var(--dsw-alias-state-business-primary,#0066cc);
|
|
42
|
+
--pt-accent-hover:var(--dsw-alias-state-business-primary,#0071e3);
|
|
43
|
+
--pt-accent-soft:var(--dsw-alias-state-business-tertiary,var(--dsw-alias-bg-layer-3,#eaf2fd));
|
|
44
|
+
--pt-on-accent:#ffffff;
|
|
45
|
+
--pt-warn:var(--dsw-alias-state-warn-primary,#a86b12);
|
|
46
|
+
--pt-warn-soft:var(--dsw-alias-state-warn-tertiary,var(--dsw-alias-bg-layer-3,#fbf3e4));
|
|
47
|
+
--pt-error:var(--dsw-alias-state-error-primary,#d93b40);
|
|
48
|
+
--pt-error-soft:var(--dsw-alias-state-error-tertiary,var(--dsw-alias-bg-layer-3,#fbeceb));
|
|
49
|
+
--pt-error-line:rgba(217,59,64,.45);
|
|
50
|
+
--pt-warn-line:rgba(168,107,18,.45);
|
|
51
|
+
--pt-success:var(--dsw-alias-state-success-primary,#0f9184);
|
|
52
|
+
--pt-hover:var(--dsw-alias-interactive-bg-hover,rgba(0,0,0,.045));
|
|
53
|
+
--pt-focus:var(--dsw-alias-state-business-primary,#0071e3);
|
|
54
|
+
--pt-code-bg:var(--dsw-alias-bg-module-platform,var(--dsw-alias-bg-layer-1,#f5f5f7));
|
|
55
|
+
--pt-skeleton:var(--dsw-alias-bg-skeleton,var(--dsw-alias-bg-layer-2,#f0f0f2));
|
|
56
|
+
--pt-scrim:rgba(0,0,0,.38);
|
|
57
|
+
--pt-on-solid:#ffffff;
|
|
58
|
+
--pt-knob:#ffffff;
|
|
59
|
+
--pt-dock-shadow:0 6px 14px -10px rgba(0,0,0,.45);
|
|
60
|
+
--pt-knob-shadow:0 0 0 .5px rgba(0,0,0,.18);
|
|
61
|
+
--pt-shadow:0 12px 32px rgba(0,0,0,.24);
|
|
62
|
+
--pt-hit-0-bg:rgba(217,59,64,.28);--pt-hit-0-solid:#d93b40;
|
|
63
|
+
--pt-hit-1-bg:rgba(183,121,31,.3);--pt-hit-1-solid:#a86b12;
|
|
64
|
+
--pt-hit-2-bg:rgba(15,148,136,.26);--pt-hit-2-solid:#0f9184;
|
|
65
|
+
--pt-hit-3-bg:rgba(63,111,216,.26);--pt-hit-3-solid:#3f6fd8;
|
|
66
|
+
--pt-hit-4-bg:rgba(124,92,214,.26);--pt-hit-4-solid:#7c5cd6;
|
|
67
|
+
--pt-hit-5-bg:rgba(192,38,143,.26);--pt-hit-5-solid:#c0268f;
|
|
68
|
+
--pt-graph-node-fill:var(--dsw-alias-bg-layer-2,#f5f5f7);
|
|
69
|
+
--pt-graph-node-line:var(--dsw-alias-border-l4,#b9b9bf);
|
|
70
|
+
--pt-graph-edge:var(--dsw-alias-label-tertiary,#7c7c82);
|
|
71
|
+
--pt-graph-label-bg:var(--dsw-alias-bg-layer-1,#ffffff);
|
|
72
|
+
--pt-r-xs:4px;--pt-r-sm:6px;--pt-r-md:8px;--pt-r-lg:12px;--pt-r-pill:999px;
|
|
73
|
+
box-sizing:border-box;height:100%;display:flex;flex-direction:column;
|
|
74
|
+
color:var(--pt-text-1);background:var(--pt-canvas);
|
|
75
|
+
font-size:13px;line-height:1.5;
|
|
76
|
+
}
|
|
77
|
+
/* ── Token:明亮(Apple 中性)────────────────────────────────────────── */
|
|
78
|
+
.ptRoot[data-pt-theme=light]{
|
|
79
|
+
--pt-canvas:#ffffff;
|
|
80
|
+
--pt-surface-1:#f5f5f7;
|
|
81
|
+
--pt-surface-2:#ffffff;
|
|
82
|
+
--pt-surface-3:#f0f0f2;
|
|
83
|
+
--pt-line-1:#e0e0e3;
|
|
84
|
+
--pt-line-2:#ececef;
|
|
85
|
+
--pt-line-3:#d2d2d7;
|
|
86
|
+
--pt-text-1:#1d1d1f;
|
|
87
|
+
--pt-text-2:#6e6e73;
|
|
88
|
+
--pt-text-3:#86868b;
|
|
89
|
+
--pt-accent:#0066cc;
|
|
90
|
+
--pt-accent-hover:#0071e3;
|
|
91
|
+
--pt-accent-soft:rgba(0,102,204,.1);
|
|
92
|
+
--pt-on-accent:#ffffff;
|
|
93
|
+
--pt-warn:#a86b12;
|
|
94
|
+
--pt-warn-soft:rgba(168,107,18,.12);
|
|
95
|
+
--pt-error:#d93b40;
|
|
96
|
+
--pt-error-soft:rgba(217,59,64,.1);
|
|
97
|
+
--pt-error-line:rgba(217,59,64,.45);
|
|
98
|
+
--pt-warn-line:rgba(168,107,18,.45);
|
|
99
|
+
--pt-success:#0f9184;
|
|
100
|
+
--pt-hover:rgba(0,0,0,.045);
|
|
101
|
+
--pt-focus:#0071e3;
|
|
102
|
+
--pt-code-bg:#f5f5f7;
|
|
103
|
+
--pt-skeleton:#f0f0f2;
|
|
104
|
+
--pt-scrim:rgba(0,0,0,.3);
|
|
105
|
+
--pt-on-solid:#ffffff;
|
|
106
|
+
--pt-knob:#ffffff;
|
|
107
|
+
--pt-dock-shadow:0 6px 14px -10px rgba(0,0,0,.28);
|
|
108
|
+
--pt-knob-shadow:0 0 0 .5px rgba(0,0,0,.16);
|
|
109
|
+
--pt-shadow:0 12px 32px rgba(0,0,0,.16);
|
|
110
|
+
--pt-hit-0-bg:rgba(217,59,64,.22);--pt-hit-0-solid:#d93b40;
|
|
111
|
+
--pt-hit-1-bg:rgba(168,107,18,.24);--pt-hit-1-solid:#a86b12;
|
|
112
|
+
--pt-hit-2-bg:rgba(15,145,132,.22);--pt-hit-2-solid:#0f9184;
|
|
113
|
+
--pt-hit-3-bg:rgba(63,111,216,.2);--pt-hit-3-solid:#3f6fd8;
|
|
114
|
+
--pt-hit-4-bg:rgba(124,92,214,.2);--pt-hit-4-solid:#7c5cd6;
|
|
115
|
+
--pt-hit-5-bg:rgba(192,38,143,.2);--pt-hit-5-solid:#c0268f;
|
|
116
|
+
--pt-graph-node-fill:#f5f5f7;
|
|
117
|
+
--pt-graph-node-line:#b9b9bf;
|
|
118
|
+
--pt-graph-edge:#7c7c82;
|
|
119
|
+
--pt-graph-label-bg:#ffffff;
|
|
120
|
+
color-scheme:light;
|
|
121
|
+
}
|
|
122
|
+
/* ── Token:夜间(Apple 近黑)────────────────────────────────────────── */
|
|
123
|
+
.ptRoot[data-pt-theme=dark]{
|
|
124
|
+
--pt-canvas:#1d1d1f;
|
|
125
|
+
--pt-surface-1:#272729;
|
|
126
|
+
--pt-surface-2:#2a2a2c;
|
|
127
|
+
--pt-surface-3:#333336;
|
|
128
|
+
--pt-line-1:#3a3a3c;
|
|
129
|
+
--pt-line-2:#2f2f31;
|
|
130
|
+
--pt-line-3:#48484a;
|
|
131
|
+
--pt-text-1:#f5f5f7;
|
|
132
|
+
--pt-text-2:#a1a1a6;
|
|
133
|
+
--pt-text-3:#86868b;
|
|
134
|
+
--pt-accent:#2997ff;
|
|
135
|
+
--pt-accent-hover:#4aa9ff;
|
|
136
|
+
--pt-accent-soft:rgba(41,151,255,.16);
|
|
137
|
+
--pt-on-accent:#0b0b0c;
|
|
138
|
+
--pt-warn:#e8a33d;
|
|
139
|
+
--pt-warn-soft:rgba(232,163,61,.16);
|
|
140
|
+
--pt-error:#f56b6b;
|
|
141
|
+
--pt-error-soft:rgba(245,107,107,.14);
|
|
142
|
+
--pt-error-line:rgba(245,107,107,.42);
|
|
143
|
+
--pt-warn-line:rgba(232,163,61,.42);
|
|
144
|
+
--pt-success:#30d158;
|
|
145
|
+
--pt-hover:rgba(255,255,255,.06);
|
|
146
|
+
--pt-focus:#4aa9ff;
|
|
147
|
+
--pt-code-bg:#202022;
|
|
148
|
+
--pt-skeleton:#2a2a2c;
|
|
149
|
+
--pt-scrim:rgba(0,0,0,.55);
|
|
150
|
+
--pt-on-solid:#0b0b0c;
|
|
151
|
+
--pt-knob:#f5f5f7;
|
|
152
|
+
--pt-dock-shadow:0 6px 14px -10px rgba(0,0,0,.7);
|
|
153
|
+
--pt-knob-shadow:0 0 0 .5px rgba(0,0,0,.4);
|
|
154
|
+
--pt-shadow:0 16px 40px rgba(0,0,0,.5);
|
|
155
|
+
--pt-hit-0-bg:rgba(255,123,123,.26);--pt-hit-0-solid:#ff7b7b;
|
|
156
|
+
--pt-hit-1-bg:rgba(232,179,57,.26);--pt-hit-1-solid:#e8b339;
|
|
157
|
+
--pt-hit-2-bg:rgba(63,214,198,.24);--pt-hit-2-solid:#3fd6c6;
|
|
158
|
+
--pt-hit-3-bg:rgba(122,167,255,.24);--pt-hit-3-solid:#7aa7ff;
|
|
159
|
+
--pt-hit-4-bg:rgba(184,155,255,.24);--pt-hit-4-solid:#b89bff;
|
|
160
|
+
--pt-hit-5-bg:rgba(255,122,200,.24);--pt-hit-5-solid:#ff7ac8;
|
|
161
|
+
--pt-graph-node-fill:#2f2f31;
|
|
162
|
+
--pt-graph-node-line:#5f5f64;
|
|
163
|
+
--pt-graph-edge:#a1a1a6;
|
|
164
|
+
--pt-graph-label-bg:#1d1d1f;
|
|
165
|
+
color-scheme:dark;
|
|
166
|
+
}
|
|
167
|
+
/* 布局:顶栏(标题 + 标签 + 工具条)固定,只有正文滚动。 */
|
|
168
|
+
.ptBar{padding:20px 28px 0;display:flex;flex-direction:column;gap:12px;flex:none}
|
|
169
|
+
.ptHead{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
|
|
170
|
+
.ptTitle{margin:0;font-size:18px;font-weight:600;line-height:26px;letter-spacing:-.01em}
|
|
171
|
+
/* 页面内的独立视图标题(如「提示词定制结果预览」):与页头标题同一档,但不占页头。 */
|
|
172
|
+
.ptPageTitle{margin:2px 0 10px;font-size:18px;font-weight:600;line-height:26px;letter-spacing:-.01em;color:var(--pt-text-1)}
|
|
173
|
+
.ptSub{color:var(--pt-text-3);font-size:12px;line-height:18px}
|
|
174
|
+
.ptSpacer{flex:1}
|
|
175
|
+
/* 按钮:次级默认、primary 实底 pill、danger 描边;全站只有这一套。 */
|
|
176
|
+
.ptBtn{box-sizing:border-box;border:.5px solid var(--pt-line-3);border-radius:var(--pt-r-md);background:var(--pt-surface-1);color:var(--pt-text-1);height:28px;padding:0 12px;font:inherit;font-size:12px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:6px;white-space:nowrap;transition:background .12s ease,border-color .12s ease}
|
|
177
|
+
.ptBtn:hover:not(:disabled){background:var(--pt-hover)}
|
|
178
|
+
.ptBtn:active:not(:disabled){transform:scale(.97)}
|
|
179
|
+
.ptBtn:disabled{opacity:.45;cursor:default}
|
|
180
|
+
.ptBtn:focus-visible{outline:2px solid var(--pt-focus);outline-offset:1px}
|
|
181
|
+
.ptBtn[data-tone=primary]{border-color:transparent;border-radius:var(--pt-r-pill);background:var(--pt-accent);color:var(--pt-on-accent)}
|
|
182
|
+
.ptBtn[data-tone=primary]:hover:not(:disabled){background:var(--pt-accent-hover)}
|
|
183
|
+
.ptBtn[data-tone=danger]{border-color:var(--pt-line-3);color:var(--pt-error);background:transparent}
|
|
184
|
+
.ptBtn[data-tone=danger]:hover:not(:disabled){background:var(--pt-error-soft)}
|
|
185
|
+
/* 色调底:页面级的「下一步」用它。实底 accent 在只读页面上太抢视线,浅蓝底保留可点的提示。 */
|
|
186
|
+
.ptBtn[data-tone=soft]{border-color:transparent;border-radius:var(--pt-r-pill);background:var(--pt-accent-soft);color:var(--pt-accent)}
|
|
187
|
+
.ptBtn[data-tone=soft]:hover:not(:disabled){background:var(--pt-accent-soft);border-color:var(--pt-accent);color:var(--pt-accent-hover)}
|
|
188
|
+
/* 最终确认弹窗里的危险按钮才实底:其余危险动作保持描边,避免整页到处是红。 */
|
|
189
|
+
.ptModalActions .ptBtn[data-tone=danger]{background:var(--pt-error);border-color:transparent;color:var(--pt-on-solid)}
|
|
190
|
+
.ptBtnLarge{box-sizing:border-box;height:36px;padding:0 24px;font-size:13px;border-radius:var(--pt-r-pill)}
|
|
191
|
+
.ptBtnLarge[data-tone=primary]{background:var(--pt-accent);border-color:transparent;color:var(--pt-on-accent)}
|
|
192
|
+
.ptBtnLarge[data-tone=primary]:hover:not(:disabled){background:var(--pt-accent-hover)}
|
|
193
|
+
.ptMeta{display:inline-flex;align-items:center;gap:5px;color:var(--pt-text-3);font-size:11.5px;line-height:18px;white-space:nowrap}
|
|
194
|
+
.ptMetaWrap{white-space:normal;flex-wrap:wrap;row-gap:2px}
|
|
195
|
+
.ptMetaSep{opacity:.55}
|
|
196
|
+
.ptMetaStrong{color:var(--pt-text-1);font-weight:600}
|
|
197
|
+
.ptDirty{display:inline-flex;align-items:center;gap:5px;color:var(--pt-warn);font-size:11.5px;white-space:nowrap}
|
|
198
|
+
.ptDirty::before{content:'';width:5px;height:5px;border-radius:50%;background:currentColor}
|
|
199
|
+
/* 主标签:分段控件,当前项浮在底槽上而不是反色块。 */
|
|
200
|
+
.ptTabs{display:inline-flex;align-items:center;gap:1px;padding:2px;border-radius:var(--pt-r-md);background:var(--pt-surface-1);align-self:flex-start}
|
|
201
|
+
.ptTabsSmall{background:transparent;padding:0;gap:4px;margin-bottom:12px}
|
|
202
|
+
.ptTab{display:inline-flex;align-items:center;gap:5px;border:0;border-radius:var(--pt-r-sm);background:transparent;color:var(--pt-text-2);height:26px;padding:0 11px;font:inherit;font-size:12px;cursor:pointer;white-space:nowrap}
|
|
203
|
+
.ptTab:hover{color:var(--pt-text-1)}
|
|
204
|
+
.ptTab[aria-selected=true]{background:var(--pt-surface-2);color:var(--pt-text-1);box-shadow:0 0 0 .5px var(--pt-line-1)}
|
|
205
|
+
.ptTab:focus-visible{outline:2px solid var(--pt-focus);outline-offset:-2px}
|
|
206
|
+
.ptTabCount{font-size:10.5px;font-weight:400;color:var(--pt-text-3);font-variant-numeric:tabular-nums}
|
|
207
|
+
.ptTab[aria-selected=true] .ptTabCount{color:var(--pt-text-2)}
|
|
208
|
+
.ptTabsSmall .ptTab{height:24px;padding:0 9px;font-size:11.5px;color:var(--pt-text-3)}
|
|
209
|
+
.ptTabsSmall .ptTab[aria-selected=true]{box-shadow:none;background:var(--pt-surface-1);color:var(--pt-text-1)}
|
|
210
|
+
/* 外观三段控件:与标签同一套浮起逻辑,只占一行里的一个控件宽度。 */
|
|
211
|
+
.ptSeg{display:inline-flex;align-items:center;gap:1px;padding:2px;border-radius:var(--pt-r-md);background:var(--pt-surface-1)}
|
|
212
|
+
.ptSegBtn{border:0;border-radius:var(--pt-r-sm);background:transparent;color:var(--pt-text-3);height:24px;padding:0 9px;font:inherit;font-size:11.5px;cursor:pointer;white-space:nowrap}
|
|
213
|
+
.ptSegBtn:hover{color:var(--pt-text-1)}
|
|
214
|
+
.ptSegBtn[aria-pressed=true]{background:var(--pt-surface-2);color:var(--pt-text-1);box-shadow:0 0 0 .5px var(--pt-line-1)}
|
|
215
|
+
.ptSegBtn:focus-visible{outline:2px solid var(--pt-focus);outline-offset:-2px}
|
|
216
|
+
/* 工具条:一个视图一行。搜索只出现在用得到它的视图里。 */
|
|
217
|
+
.ptToolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:0 0 8px;min-height:34px}
|
|
218
|
+
/* 页头搜索:所有视图共用同一入口,固定在标题下方、标签上方。 */
|
|
219
|
+
.ptSearchRow{display:flex;align-items:center}
|
|
220
|
+
/* 请求结构标签下的交棒提示:说明这一页的页头不筛列表,回车把词交给下面的检索。 */
|
|
221
|
+
.ptSearchHandoff{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
|
|
222
|
+
.ptSearch.ptSearchTop{flex:1 1 auto;max-width:none;width:100%}
|
|
223
|
+
.ptSearch{box-sizing:border-box;flex:1 1 200px;min-width:140px;max-width:360px;height:28px;border:.5px solid var(--pt-line-3);border-radius:var(--pt-r-md);background:var(--pt-surface-1);color:var(--pt-text-1);font:inherit;font-size:12.5px;padding:0 10px;outline:none}
|
|
224
|
+
.ptSearch::placeholder{color:var(--pt-text-3)}
|
|
225
|
+
.ptSearch:focus{border-color:var(--pt-accent)}
|
|
226
|
+
/* 页内多词标记:工具行与命中高亮。与页头筛选搜索不同,这里不隐藏任何内容。 */
|
|
227
|
+
.ptSearchTools{display:flex;flex-direction:column;gap:6px;margin:0 0 10px;padding:8px 10px;border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-md);background:var(--pt-surface-1)}
|
|
228
|
+
/* 有搜索框时吸顶:长文本下滑后,改词与上/下定位仍然在手边;它只在所属区块内生效。 */
|
|
229
|
+
.ptSearchTools[data-docked=true]{position:sticky;top:0;z-index:6;box-shadow:var(--pt-dock-shadow)}
|
|
230
|
+
.ptSearchToolsHead{display:flex;align-items:center;gap:8px}
|
|
231
|
+
.ptSearchToolsTitle{font-size:11.5px;font-weight:600;color:var(--pt-text-2);flex:1}
|
|
232
|
+
.ptSearchList{display:flex;flex-direction:column;gap:5px}
|
|
233
|
+
.ptSearchItem{display:flex;align-items:center;gap:6px;min-width:0}
|
|
234
|
+
.ptSearchSwatch{flex:none;display:inline-flex;align-items:center;justify-content:center;min-width:18px;height:18px;box-sizing:border-box;padding:0 4px;border-radius:var(--pt-r-xs);background:var(--pt-hit-solid);color:var(--pt-on-solid);font-size:10px;font-weight:600;font-variant-numeric:tabular-nums}
|
|
235
|
+
.ptSearch.ptSearchInline{flex:1 1 auto;max-width:none;height:26px}
|
|
236
|
+
.ptSearchCount{flex:none;color:var(--pt-text-3);font-size:11px;font-variant-numeric:tabular-nums;white-space:nowrap}
|
|
237
|
+
/* 上/下定位:与 PDF 查看器一致,计数夹在两个箭头之间。 */
|
|
238
|
+
.ptSearchNav{flex:none;display:inline-flex;align-items:center;gap:2px}
|
|
239
|
+
.ptSearchNavBtn{width:20px;height:20px;box-sizing:border-box;padding:0;border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-xs);background:var(--pt-surface-2);font-size:11px;line-height:17px;color:var(--pt-text-2)}
|
|
240
|
+
.ptSearchNavBtn:hover:not(:disabled){color:var(--pt-text-1);background:var(--pt-hover)}
|
|
241
|
+
.ptSearchNavBtn:disabled{opacity:.4;cursor:default}
|
|
242
|
+
/* 当前定位到的那一处加内描边,不改变行高。 */
|
|
243
|
+
.ptSearchMark[data-current=true]{box-shadow:inset 0 0 0 1.5px var(--pt-hit-solid)}
|
|
244
|
+
/* 命中底色用低透明度,明暗主题下正文颜色都不变;徽标由 ::after 画出,不插节点、不进复制文本。 */
|
|
245
|
+
.ptSearchMark{position:relative;border-radius:2px;padding:0;background:var(--pt-hit-bg);color:inherit}
|
|
246
|
+
.ptSearchMark::after{content:attr(data-box);position:absolute;top:-7px;right:-4px;min-width:13px;height:12px;box-sizing:border-box;padding:0 3px;border-radius:6px;background:var(--pt-hit-solid);color:var(--pt-on-solid);font:600 8.5px/12px var(--ds-font-family-code,ui-monospace,monospace);text-align:center;pointer-events:none;user-select:none}
|
|
247
|
+
/* 每个搜索框一种颜色,编号与色板同源;主题切换时整套一起换。 */
|
|
248
|
+
.ptSearchMark[data-search="0"],.ptSearchSwatch[data-search="0"]{--pt-hit-bg:var(--pt-hit-0-bg);--pt-hit-solid:var(--pt-hit-0-solid)}
|
|
249
|
+
.ptSearchMark[data-search="1"],.ptSearchSwatch[data-search="1"]{--pt-hit-bg:var(--pt-hit-1-bg);--pt-hit-solid:var(--pt-hit-1-solid)}
|
|
250
|
+
.ptSearchMark[data-search="2"],.ptSearchSwatch[data-search="2"]{--pt-hit-bg:var(--pt-hit-2-bg);--pt-hit-solid:var(--pt-hit-2-solid)}
|
|
251
|
+
.ptSearchMark[data-search="3"],.ptSearchSwatch[data-search="3"]{--pt-hit-bg:var(--pt-hit-3-bg);--pt-hit-solid:var(--pt-hit-3-solid)}
|
|
252
|
+
.ptSearchMark[data-search="4"],.ptSearchSwatch[data-search="4"]{--pt-hit-bg:var(--pt-hit-4-bg);--pt-hit-solid:var(--pt-hit-4-solid)}
|
|
253
|
+
.ptSearchMark[data-search="5"],.ptSearchSwatch[data-search="5"]{--pt-hit-bg:var(--pt-hit-5-bg);--pt-hit-solid:var(--pt-hit-5-solid)}
|
|
254
|
+
/* 页头筛选的命中标记:单色、无编号、不改变行高。它与页内检索的彩色徽标是两种东西——
|
|
255
|
+
前者回答「这一行为什么留下」,后者回答「第几个搜索框的第几处」。 */
|
|
256
|
+
.ptQueryMark{border-radius:2px;padding:0;background:var(--pt-warn-soft);color:inherit;box-shadow:inset 0 -1px 0 var(--pt-warn)}
|
|
257
|
+
/* 行内「为什么留下」的摘要:只占一行,机制说明挂在 title 上。 */
|
|
258
|
+
.ptQueryReason{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--pt-text-2);font-size:11px;line-height:15px}
|
|
259
|
+
.ptField{display:inline-flex;align-items:center;gap:6px;min-width:0}
|
|
260
|
+
.ptFieldLabel{color:var(--pt-text-3);font-size:11px;white-space:nowrap}
|
|
261
|
+
.ptSelect{box-sizing:border-box;height:26px;max-width:220px;border:.5px solid var(--pt-line-3);border-radius:var(--pt-r-md);background-color:var(--pt-surface-1);color:var(--pt-text-1);font:inherit;font-size:12px;padding:0 22px 0 8px;outline:none;cursor:pointer;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--pt-text-3) 50%),linear-gradient(135deg,var(--pt-text-3) 50%,transparent 50%);background-position:calc(100% - 13px) 11px,calc(100% - 9px) 11px;background-size:4px 4px,4px 4px;background-repeat:no-repeat}
|
|
262
|
+
.ptSelect:focus{border-color:var(--pt-accent)}
|
|
263
|
+
.ptSelect:disabled{opacity:.45;cursor:default}
|
|
264
|
+
/* 可输入选择器:输入框负责筛选,展开的列表仍是完整清单。 */
|
|
265
|
+
.ptCombo{position:relative;min-width:200px;max-width:260px}
|
|
266
|
+
.ptComboInput{width:100%;max-width:100%;cursor:text}
|
|
267
|
+
.ptComboList{position:absolute;z-index:20;top:calc(100% + 4px);left:0;right:0;box-sizing:border-box;max-height:280px;overflow:auto;padding:4px;border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-md);background:var(--pt-surface-1);box-shadow:var(--pt-shadow)}
|
|
268
|
+
.ptComboOption{display:block;width:100%;box-sizing:border-box;padding:4px 8px;border:0;border-radius:var(--pt-r-sm);background:transparent;color:var(--pt-text-1);font:inherit;font-size:12px;line-height:20px;text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer}
|
|
269
|
+
.ptComboOption:hover,.ptComboOption[data-active=true]{background:var(--pt-hover)}
|
|
270
|
+
.ptComboOption[aria-selected=true]{background:var(--pt-accent-soft);color:var(--pt-accent)}
|
|
271
|
+
.ptComboEmpty{margin:0;padding:6px 8px;color:var(--pt-text-3);font-size:11.5px}
|
|
272
|
+
.ptResult{color:var(--pt-text-3);font-size:11px;white-space:nowrap;font-variant-numeric:tabular-nums}
|
|
273
|
+
.ptResult b{font-weight:600;color:var(--pt-text-2)}
|
|
274
|
+
.ptActions{display:inline-flex;align-items:center;gap:4px;margin-left:auto}
|
|
275
|
+
.ptTextBtn{border:0;background:transparent;color:var(--pt-text-3);font:inherit;font-size:11.5px;padding:2px 5px;border-radius:var(--pt-r-xs);cursor:pointer;white-space:nowrap}
|
|
276
|
+
.ptTextBtn:hover:not(:disabled){color:var(--pt-text-1);background:var(--pt-hover)}
|
|
277
|
+
.ptTextBtn:disabled{opacity:.45;cursor:default}
|
|
278
|
+
.ptTextBtn[data-tone=danger]{color:var(--pt-error)}
|
|
279
|
+
.ptTextBtn:focus-visible{outline:2px solid var(--pt-focus);outline-offset:1px}
|
|
280
|
+
/* 右簇:一行里所有读数(长度、order、次数、时间)统一靠右,不再用胶囊包数字。 */
|
|
281
|
+
.ptEnd{display:inline-flex;align-items:center;gap:6px;margin-left:auto;flex:none;min-width:0}
|
|
282
|
+
/* 正文 */
|
|
283
|
+
.ptBody{flex:1;min-height:0;overflow:auto;padding:4px 28px 48px}
|
|
284
|
+
.ptNotice{margin:24px 0;color:var(--pt-text-3);font-size:13px}
|
|
285
|
+
.ptError{color:var(--pt-error)}
|
|
286
|
+
.ptEmpty{padding:32px 8px;text-align:center;color:var(--pt-text-3);font-size:12.5px}
|
|
287
|
+
.ptSkeleton{height:30px;border-radius:var(--pt-r-md);background:var(--pt-skeleton);opacity:.55;margin-bottom:4px}
|
|
288
|
+
/* 分组头:列表分组(插件类别 / 会话工作区 / 工具来源)共用一套外观。 */
|
|
289
|
+
.ptGroupHead,.ptOwnerHead{padding:10px 8px 6px;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px;font-size:12px;font-weight:600;border-bottom:.5px solid var(--pt-line-2);min-height:34px;box-sizing:border-box}
|
|
290
|
+
.ptGroupHead>span[title]{cursor:help}
|
|
291
|
+
.ptGroupHeadClickable{cursor:pointer;border-radius:var(--pt-r-sm);transition:background .12s ease}
|
|
292
|
+
.ptGroupHeadClickable:hover{background:var(--pt-hover)}
|
|
293
|
+
.ptGroupHeadClickable:focus-visible{outline:2px solid var(--pt-focus);outline-offset:-2px}
|
|
294
|
+
summary.ptOwnerHead{cursor:pointer;list-style:none}
|
|
295
|
+
summary.ptOwnerHead::-webkit-details-marker{display:none}
|
|
296
|
+
summary.ptOwnerHead:hover{background:var(--pt-hover)}
|
|
297
|
+
summary.ptOwnerHead:focus-visible{outline:2px solid var(--pt-focus);outline-offset:-2px}
|
|
298
|
+
.ptChevron{display:inline-block;width:10px;color:var(--pt-text-3);font-size:9px;transition:transform .12s ease}
|
|
299
|
+
.ptChevron[data-open=true],details[open]>summary .ptChevron{transform:rotate(90deg)}
|
|
300
|
+
.ptCount{flex:none;color:var(--pt-text-3);font-size:11px;font-variant-numeric:tabular-nums;font-weight:400}
|
|
301
|
+
/* 区块头:详情/编辑器里的章节。静态时是 div,可折叠时是 details>summary。 */
|
|
302
|
+
.ptSectionHead{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;min-height:26px;padding:0 0 6px;border-bottom:.5px solid var(--pt-line-2);box-sizing:border-box}
|
|
303
|
+
summary.ptSectionHead{cursor:pointer;list-style:none;padding:6px 0}
|
|
304
|
+
summary.ptSectionHead::-webkit-details-marker{display:none}
|
|
305
|
+
summary.ptSectionHead:focus-visible{outline:2px solid var(--pt-focus);outline-offset:-2px}
|
|
306
|
+
.ptSectionHead .ptActions{margin-left:auto}
|
|
307
|
+
.ptSectionHead .ptCardTitle,.ptSectionHead .ptSectionTitle{margin:0}
|
|
308
|
+
/* 区块折叠:工具页两段、预演页的报告块共用;展开状态由 details 自己管。 */
|
|
309
|
+
.ptSectionFold{border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-lg);background:var(--pt-surface-1);margin:0 0 14px;overflow:hidden}
|
|
310
|
+
.ptSectionFold>summary.ptSectionHead{padding:8px 12px}
|
|
311
|
+
.ptSectionBody{padding:10px 12px 12px}
|
|
312
|
+
/* 列表行 */
|
|
313
|
+
.ptList{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:0}
|
|
314
|
+
.ptRow{display:flex;align-items:center;gap:8px;flex-wrap:wrap;row-gap:2px;width:100%;min-height:34px;box-sizing:border-box;border:0;border-radius:var(--pt-r-md);background:transparent;color:inherit;font:inherit;text-align:left;cursor:pointer;padding:5px 8px}
|
|
315
|
+
.ptRow:hover{background:var(--pt-hover)}
|
|
316
|
+
.ptRow[data-selected=true]{background:var(--pt-hover)}
|
|
317
|
+
.ptRow[data-off=true] .ptName{color:var(--pt-text-2)}
|
|
318
|
+
.ptRow[data-failed=true] .ptName{color:var(--pt-error)}
|
|
319
|
+
.ptRow:focus-visible{outline:2px solid var(--pt-focus);outline-offset:-2px}
|
|
320
|
+
.ptIndent{flex:none}
|
|
321
|
+
.ptDot{flex:none;width:6px;height:6px;border-radius:50%;border:.5px solid var(--pt-line-3);box-sizing:border-box}
|
|
322
|
+
.ptDot[data-phase=active]{background:var(--pt-success);border-color:transparent}
|
|
323
|
+
.ptDot[data-phase=pending]{background:var(--pt-text-3);border-color:transparent}
|
|
324
|
+
.ptDot[data-phase=loading],.ptDot[data-phase=unloading]{background:var(--pt-warn);border-color:transparent}
|
|
325
|
+
.ptDot[data-phase=failed]{background:var(--pt-error);border-color:transparent}
|
|
326
|
+
.ptName{min-width:0;flex:0 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:19px}
|
|
327
|
+
.ptModule{color:var(--pt-text-3);font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11px;line-height:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
328
|
+
.ptTag{flex:none;display:inline-flex;align-items:center;border-radius:var(--pt-r-xs);background:var(--pt-surface-3);color:var(--pt-text-2);padding:0 6px;font-size:10.5px;line-height:17px;font-family:var(--ds-font-family-code,ui-monospace,monospace);white-space:nowrap}
|
|
329
|
+
.ptTag[data-tone=user]{background:var(--pt-accent-soft);color:var(--pt-accent)}
|
|
330
|
+
.ptTag[data-tone=warn]{background:var(--pt-warn-soft);color:var(--pt-warn)}
|
|
331
|
+
.ptTag[data-tone=error]{background:var(--pt-error-soft);color:var(--pt-error)}
|
|
332
|
+
/* 详情:所有区块自上而下排列,同一行不再左右分栏。 */
|
|
333
|
+
.ptDetail{position:relative;background:var(--pt-surface-1);border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-lg);margin:2px 0 12px 14px;padding:14px 16px 16px;display:flex;flex-direction:column;gap:16px}
|
|
334
|
+
.ptDetailClose{position:absolute;top:10px;right:10px}
|
|
335
|
+
.ptDetailGrid{display:flex;flex-direction:column;gap:16px;align-items:stretch}
|
|
336
|
+
.ptSection{display:flex;flex-direction:column;gap:6px;min-width:0}
|
|
337
|
+
.ptSectionTitle{font-size:12.5px;font-weight:600;color:var(--pt-text-1);margin:0}
|
|
338
|
+
/* 只读事实与写操作之间的分隔:动作永远在最后,且与上面的读数分开。 */
|
|
339
|
+
.ptDivider{border:0;border-top:.5px solid var(--pt-line-2);margin:2px 0;width:100%}
|
|
340
|
+
/* 顶层区块下的子区块:降一级标题 + 左侧竖线,避免与顶层区块读成同级。 */
|
|
341
|
+
.ptSubBlocks{display:flex;flex-direction:column;gap:12px;min-width:0;margin-top:2px;padding-left:10px;border-left:2px solid var(--pt-line-2)}
|
|
342
|
+
.ptSubSection{display:flex;flex-direction:column;gap:6px;min-width:0}
|
|
343
|
+
.ptSubTitle{margin:0;font-size:12px;font-weight:600;color:var(--pt-text-2)}
|
|
344
|
+
/* 标签、字段与元信息的解释都在 title 上;可悬停的读数统一给 help 光标与虚下划线。 */
|
|
345
|
+
.ptSectionTitle[title],.ptSub[title],.ptCardTitle[title],.ptSubTitle [title],.ptTag[title],.ptCount[title],.ptDepKey[title],.ptDepValue[title],.ptFold>summary span[title]{cursor:help}
|
|
346
|
+
.ptMeta span[title]{cursor:help;text-decoration:underline dotted;text-underline-offset:2px}
|
|
347
|
+
.ptSectionNote{margin:0;color:var(--pt-text-3);font-size:11.5px;line-height:17px}
|
|
348
|
+
.ptFacts{margin:0;display:grid;grid-template-columns:max-content minmax(0,1fr);gap:3px 12px;font-size:12px;line-height:19px}
|
|
349
|
+
.ptFacts dt{color:var(--pt-text-3)}
|
|
350
|
+
.ptFacts dt[title]{cursor:help;text-decoration:underline dotted;text-underline-offset:2px}
|
|
351
|
+
.ptFacts dd{margin:0;min-width:0;overflow-wrap:anywhere}
|
|
352
|
+
.ptFacts code{font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11.5px;background:var(--pt-surface-3);border-radius:3px;padding:1px 5px}
|
|
353
|
+
/* 配置值:键与值成对排列,长值(JSON、凭据)自动折行。 */
|
|
354
|
+
.ptConfigList{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:3px;font-size:11.5px;line-height:18px}
|
|
355
|
+
.ptConfigList li{display:flex;flex-wrap:wrap;align-items:baseline;gap:5px;min-width:0}
|
|
356
|
+
.ptConfigKey{font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11px;color:var(--pt-text-3);flex:none}
|
|
357
|
+
.ptConfigEquals{color:var(--pt-text-3)}
|
|
358
|
+
.ptConfigValue{min-width:0;white-space:pre-wrap;overflow-wrap:anywhere;font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11.5px;color:var(--pt-text-2)}
|
|
359
|
+
/* 逐层 config:层标题与内容分成两级——标题走 .ptSubTitle,内容缩进并带竖线,
|
|
360
|
+
键值再降一级,避免三层文字糊成一片。 */
|
|
361
|
+
.ptConfigLayers{display:flex;flex-direction:column;padding:2px 0 4px}
|
|
362
|
+
.ptConfigLayer{padding:10px 12px}
|
|
363
|
+
.ptConfigLayer+.ptConfigLayer{margin-top:2px;border-top:1px solid var(--pt-line-2)}
|
|
364
|
+
.ptConfigLayerHead{display:flex;align-items:baseline;gap:0;flex-wrap:wrap}
|
|
365
|
+
.ptConfigKind{font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:10.5px;font-weight:400;color:var(--pt-text-3)}
|
|
366
|
+
.ptConfigLayerBody{display:flex;flex-direction:column;gap:6px;margin-top:8px;padding-left:10px;border-left:1px solid var(--pt-line-2)}
|
|
367
|
+
.ptConfigRaw{margin:0;padding:6px 8px;border-radius:var(--pt-r-xs);background:var(--pt-surface-3);font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11px;line-height:17px;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--pt-text-2)}
|
|
368
|
+
.ptChain{display:flex;flex-wrap:wrap;align-items:center;gap:5px;font-size:11.5px}
|
|
369
|
+
.ptChainArrow{color:var(--pt-text-3);font-size:10px}
|
|
370
|
+
/* 加载/覆盖链:纵向步骤 + 连线,读起来就是一条链而不是一排标签。 */
|
|
371
|
+
.ptFlow{display:flex;flex-direction:column;gap:0;margin:2px 0 0}
|
|
372
|
+
.ptFlowStep{position:relative;display:flex;align-items:baseline;gap:8px;padding:3px 0 3px 18px;font-size:11.5px}
|
|
373
|
+
.ptFlowStep::before{content:'';position:absolute;left:5px;top:11px;width:5px;height:5px;border-radius:50%;background:var(--pt-accent)}
|
|
374
|
+
.ptFlowStep::after{content:'';position:absolute;left:7px;top:17px;bottom:-4px;width:1px;background:var(--pt-line-2)}
|
|
375
|
+
.ptFlowStep:last-child::after{display:none}
|
|
376
|
+
.ptFlowKey{flex:none;width:76px;white-space:nowrap;color:var(--pt-text-3);font-size:11px}
|
|
377
|
+
.ptFlowValue{min-width:0;overflow-wrap:anywhere;font-family:var(--ds-font-family-code,ui-monospace,monospace);color:var(--pt-text-2)}
|
|
378
|
+
.ptFlowStep[data-tone=muted]::before{background:var(--pt-text-3)}
|
|
379
|
+
.ptFlowStep[data-tone=muted] .ptFlowValue{color:var(--pt-text-3)}
|
|
380
|
+
.ptFlowStep[title]{cursor:help}
|
|
381
|
+
/* 插件禁用预演的上下游树:固定几何 + 线型区分边,深浅主题都只走 --pt-*。
|
|
382
|
+
节点填色与边色单独成 token:线只有 1px 左右,借用表面色会在明亮主题下糊成一片。 */
|
|
383
|
+
/* 图视口:固定大小的画布,图在内部自由缩放/平移,超出的部分由视口裁掉。
|
|
384
|
+
高度与 client.relation-graph.js 的 GRAPH_VIEWPORT_HEIGHT 保持一致。 */
|
|
385
|
+
.ptGraphViewport{position:relative;flex:none;height:clamp(360px,65vh,640px);min-height:360px;margin:6px 0 0;overflow:hidden;border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-md);background:var(--pt-surface-1);cursor:grab;touch-action:none;user-select:none}
|
|
386
|
+
.ptGraphViewport[data-panning=true]{cursor:grabbing}
|
|
387
|
+
.ptGraphViewport[data-panning=true] .ptGraphNode{cursor:grabbing}
|
|
388
|
+
.ptGraphStage{position:absolute;top:0;left:0;transform-origin:0 0;will-change:transform}
|
|
389
|
+
.ptGraph{display:block;width:100%;height:100%}
|
|
390
|
+
/* 缩放控件放在区块头右簇:按钮与读数同高,百分比用等宽数字避免跳动。 */
|
|
391
|
+
.ptGraphZoom{display:inline-flex;align-items:center;gap:2px}
|
|
392
|
+
.ptGraphZoom .ptTextBtn{font-size:13px;line-height:1;padding:2px 7px}
|
|
393
|
+
.ptGraphZoomValue{min-width:38px;text-align:center;font-size:11px;color:var(--pt-text-3);font-variant-numeric:tabular-nums}
|
|
394
|
+
.ptGraphNode{cursor:pointer}
|
|
395
|
+
.ptGraphNode>rect{fill:var(--pt-graph-node-fill);stroke:var(--pt-graph-node-line);stroke-width:1;transition:stroke .12s ease}
|
|
396
|
+
.ptGraphNode:hover>rect{stroke:var(--pt-graph-edge)}
|
|
397
|
+
.ptGraphNode[data-tone=target]>rect{fill:var(--pt-accent-soft);stroke:var(--pt-accent);stroke-width:1.5}
|
|
398
|
+
.ptGraphNode[data-tone=pending]>rect{stroke:var(--pt-warn);stroke-width:1.5;stroke-dasharray:4 2}
|
|
399
|
+
.ptGraphNode[data-tone=pending]:hover>rect{stroke:var(--pt-warn)}
|
|
400
|
+
.ptGraphNode:focus-visible>rect{stroke:var(--pt-focus);stroke-width:2}
|
|
401
|
+
.ptGraphLabel{fill:var(--pt-text-1);font-size:12px;font-weight:600}
|
|
402
|
+
.ptGraphEdge{fill:none;stroke:var(--pt-graph-edge);stroke-width:1.25;stroke-linecap:round}
|
|
403
|
+
.ptGraphEdge[data-kind=config-reference]{stroke-dasharray:4 3}
|
|
404
|
+
.ptGraphEdge[data-kind=group-child]{stroke-dasharray:1.5 3}
|
|
405
|
+
.ptGraphArrow{fill:var(--pt-graph-edge)}
|
|
406
|
+
/* 边标签压在连线上:用画布色描一圈光晕,不用背景矩形容器。 */
|
|
407
|
+
.ptGraphEdgeLabel{fill:var(--pt-text-2);font-size:10.5px;paint-order:stroke fill;stroke:var(--pt-graph-label-bg);stroke-width:3;stroke-linejoin:round}
|
|
408
|
+
.ptDepList{margin:0;padding:0;list-style:none;display:flex;flex-direction:column;gap:2px;font-size:12px}
|
|
409
|
+
.ptDepList li{display:flex;gap:8px;align-items:baseline;overflow-wrap:anywhere}
|
|
410
|
+
.ptDepKey{font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11.5px;color:var(--pt-text-2);flex:none}
|
|
411
|
+
.ptDepValue{color:var(--pt-text-3);min-width:0}
|
|
412
|
+
.ptMissing{color:var(--pt-error)}
|
|
413
|
+
/* 可折叠块:提示词段、工具、编辑器段落共用。 */
|
|
414
|
+
.ptFold{border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-md);margin:2px 0;overflow:hidden;background:var(--pt-surface-2)}
|
|
415
|
+
.ptFold>summary{display:flex;align-items:center;gap:8px;padding:6px 10px;cursor:pointer;list-style:none;font-size:12.5px;line-height:20px}
|
|
416
|
+
.ptFold>summary::-webkit-details-marker{display:none}
|
|
417
|
+
.ptFold>summary:hover{background:var(--pt-hover)}
|
|
418
|
+
.ptFold>summary:focus-visible{outline:2px solid var(--pt-focus);outline-offset:-2px}
|
|
419
|
+
.ptFold>summary .ptFoldChevron{display:inline-block;width:10px;flex:none;color:var(--pt-text-3);font-size:9px;transition:transform .12s ease}
|
|
420
|
+
.ptFold[open]>summary .ptFoldChevron{transform:rotate(90deg)}
|
|
421
|
+
.ptFold[open]>summary{border-bottom:.5px solid var(--pt-line-2);background:var(--pt-surface-1)}
|
|
422
|
+
/* 整条目录被隐藏后,逐条设置不再生效:整块降级成只读,颜色随之下沉。 */
|
|
423
|
+
.ptFold[data-disabled=true]{opacity:.5}
|
|
424
|
+
.ptFold[data-disabled=true]>summary{cursor:default}
|
|
425
|
+
.ptFold[data-disabled=true]>summary .ptPromptName,
|
|
426
|
+
.ptFold[data-disabled=true]>summary .ptFoldMeta{color:var(--pt-text-3)}
|
|
427
|
+
.ptFoldMeta{margin-left:auto;color:var(--pt-text-3);font-size:11px;white-space:nowrap}
|
|
428
|
+
.ptPromptName{font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:12px;color:var(--pt-text-1);flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
|
429
|
+
/* 长文本必须自己滚动:max-height 配 overflow:visible 会把文字画到后面的兄弟节点上(系统提示词折叠曾是这种情况)。 */
|
|
430
|
+
.ptPromptText{margin:0;padding:10px 12px;font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11.5px;line-height:18px;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--pt-text-2);background:var(--pt-code-bg);max-height:none;overflow:auto}
|
|
431
|
+
/* 首次请求的三个部分统一用固定高度窗口:默认展开,超出窗口就滚动。 */
|
|
432
|
+
.ptWindow{max-height:320px;overflow:auto}
|
|
433
|
+
.ptToolBlock>summary{font-size:12px;padding:5px 10px}
|
|
434
|
+
/* 工具块是行里唯一的 flex 项:默认按内容宽度收,展开后 schema 右侧会留一段空档。让它占满整行。 */
|
|
435
|
+
.ptDepList li>.ptToolBlock{flex:1 1 auto;min-width:0}
|
|
436
|
+
/* 预演工具行:摘要即正文——占满宽度,名字一行、描述最多两行;展开才是完整说明。 */
|
|
437
|
+
.ptPreviewTool>summary{display:flex;flex-wrap:wrap;align-items:center;gap:4px 6px;padding:8px 12px;line-height:18px}
|
|
438
|
+
.ptPreviewToolName{font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:12.5px;font-weight:600;color:var(--pt-text-1);min-width:0;overflow-wrap:anywhere}
|
|
439
|
+
.ptPreviewToolDesc{flex:1 0 100%;min-width:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;white-space:normal;overflow-wrap:anywhere;font-size:12px;line-height:18px;color:var(--pt-text-2)}
|
|
440
|
+
/* 展开后正文里已有完整描述:摘要里的截断版收起,免得同一段话读两遍。 */
|
|
441
|
+
.ptPreviewTool[open]>summary .ptPreviewToolDesc{display:none}
|
|
442
|
+
.ptToolDesc{margin:8px 12px 0;font-size:12px;line-height:19px;color:var(--pt-text-2)}
|
|
443
|
+
.ptFold>summary .ptTextBtn{margin-left:2px}
|
|
444
|
+
.ptFoldBody{padding:10px 12px}
|
|
445
|
+
/* 参数视图:每个参数一块——头行放名字 / 类型 / 必填,说明与约束各占自己的行。 */
|
|
446
|
+
.ptSchema{margin-top:8px}
|
|
447
|
+
.ptSchemaHead{display:flex;align-items:baseline;gap:8px;flex-wrap:wrap}
|
|
448
|
+
.ptSchemaSummary{color:var(--pt-text-3);font-size:11px}
|
|
449
|
+
.ptSchemaSpacer{flex:1}
|
|
450
|
+
.ptSchemaRows{margin:2px 0 0;padding:0;list-style:none;display:flex;flex-direction:column;gap:8px}
|
|
451
|
+
.ptSchemaItem{display:flex;flex-direction:column;gap:2px;min-width:0}
|
|
452
|
+
/* 一级参数之间用一条浅虚线分隔;子参数在缩进块里,层级已经说明了关系,不再画线。 */
|
|
453
|
+
.ptSchema>.ptSchemaRows>.ptSchemaItem:not(:last-child){padding-bottom:8px;border-bottom:.5px dashed var(--pt-line-2)}
|
|
454
|
+
/* 头行整体折行:名字按内容占宽,类型与必填紧跟其后;放不下时它们整体落到下一行。 */
|
|
455
|
+
.ptSchemaLine{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;min-width:0}
|
|
456
|
+
.ptSchemaName{flex:0 1 auto;min-width:0;font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:12px;color:var(--pt-text-1);overflow-wrap:anywhere}
|
|
457
|
+
.ptSchemaType{flex:none;max-width:100%;font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11px;color:var(--pt-text-3);overflow-wrap:anywhere}
|
|
458
|
+
.ptSchemaReq{flex:none;padding:0 5px;border:.5px solid var(--pt-accent);border-radius:3px;color:var(--pt-accent);font-size:10.5px;line-height:15px}
|
|
459
|
+
.ptSchemaMore{flex:none;color:var(--pt-text-3);font-size:10.5px}
|
|
460
|
+
/* 说明独占整行:它是最长的内容,和名字共用一行时两边都读不好。 */
|
|
461
|
+
.ptSchemaDesc{margin:0;color:var(--pt-text-2);font-size:12px;line-height:18px;white-space:pre-wrap;overflow-wrap:anywhere}
|
|
462
|
+
/* 约束用两列表:左列是标签,右列自行折行;枚举值在自己的网格里按最小宽度排列。 */
|
|
463
|
+
.ptSchemaFacts{margin:2px 0 0;display:grid;grid-template-columns:max-content minmax(0,1fr);gap:2px 10px;font-size:11px;line-height:17px}
|
|
464
|
+
.ptSchemaFacts dt{color:var(--pt-text-3)}
|
|
465
|
+
.ptSchemaFacts dd{margin:0;min-width:0;color:var(--pt-text-2);overflow-wrap:anywhere}
|
|
466
|
+
.ptSchemaEnumList{display:grid;grid-template-columns:repeat(auto-fill,minmax(7em,1fr));gap:2px 6px}
|
|
467
|
+
.ptSchemaEnum{min-width:0;padding:0 5px;border:.5px solid var(--pt-line-2);border-radius:3px;background:var(--pt-surface-1);font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11px;color:var(--pt-text-2);overflow-wrap:anywhere}
|
|
468
|
+
/* 子参数:缩进 + 左侧竖线表达层级,每一层仍沿用「头行 + 说明」的版式。 */
|
|
469
|
+
.ptSchemaChildren{margin:2px 0 0 2px;padding-left:10px;border-left:.5px solid var(--pt-line-2);display:flex;flex-direction:column;gap:4px}
|
|
470
|
+
.ptSchemaGroupLabel{margin:0;color:var(--pt-text-3);font-size:10.5px;line-height:15px}
|
|
471
|
+
.ptSchemaNote{margin:0;color:var(--pt-text-3);font-size:11.5px;line-height:17px}
|
|
472
|
+
/* 卡片:应用面板、编辑器设置这类「一组动作 / 一组设置」的容器。 */
|
|
473
|
+
.ptCard{background:var(--pt-surface-1);border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-lg);padding:14px 16px;margin:0 0 14px;display:flex;flex-direction:column;gap:8px}
|
|
474
|
+
.ptCardHead{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
|
|
475
|
+
.ptCardTitle{margin:0;font-size:12.5px;font-weight:600}
|
|
476
|
+
.ptCardRow{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
|
|
477
|
+
/* 行内单选:选中项加粗,其余保持次要色。 */
|
|
478
|
+
.ptRadio{display:inline-flex;align-items:center;gap:6px;font-size:12px;color:var(--pt-text-2);cursor:pointer}
|
|
479
|
+
.ptRadio input{cursor:pointer;margin:0}
|
|
480
|
+
.ptRadio input:checked+span{color:var(--pt-text-1);font-weight:600}
|
|
481
|
+
.ptCardActions{display:flex;align-items:center;gap:8px;margin-left:auto}
|
|
482
|
+
.ptDangerCard{border-color:var(--pt-error-line)}
|
|
483
|
+
.ptWarnCard{border-color:var(--pt-warn-line)}
|
|
484
|
+
/* 提示词模板绑定的信息区:改动清单,默认收起。 */
|
|
485
|
+
.ptChangeList{display:flex;flex-direction:column;gap:8px}
|
|
486
|
+
.ptChangeText{margin:0;font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11.5px;line-height:18px;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--pt-text-2);background:var(--pt-surface-2);border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-sm);padding:8px 10px}
|
|
487
|
+
/* 操作区:开关与清理各占一行,破坏性动作不和主开关挤在一起。 */
|
|
488
|
+
.ptBindingActions{display:flex;flex-direction:column;align-items:flex-start;gap:5px}
|
|
489
|
+
/* 本会话清理是这一列唯一的破坏性动作:字号与正文对齐,别缩成一行脚注。 */
|
|
490
|
+
.ptBindingActions .ptTextBtn{font-size:13px;padding:4px 6px}
|
|
491
|
+
/* 确认弹窗:覆盖层 + 居中卡片;点遮罩或 Esc 取消,初始焦点在取消上。 */
|
|
492
|
+
.ptModalOverlay{position:fixed;inset:0;z-index:60;display:flex;align-items:center;justify-content:center;padding:24px;background:var(--pt-scrim)}
|
|
493
|
+
.ptModal{box-sizing:border-box;width:min(440px,100%);background:var(--pt-surface-2);border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-lg);box-shadow:var(--pt-shadow);padding:16px 18px;display:flex;flex-direction:column;gap:10px}
|
|
494
|
+
.ptModalTitle{margin:0;font-size:13px;font-weight:600;line-height:20px}
|
|
495
|
+
.ptModalActions{display:flex;justify-content:flex-end;gap:8px;margin-top:2px}
|
|
496
|
+
/* 首次请求里的消息序列:每类消息一个子区块,按日志顺序竖排。 */
|
|
497
|
+
.ptMessageList{display:flex;flex-direction:column;gap:12px}
|
|
498
|
+
/* 页底唯一主动作:定制上下文。 */
|
|
499
|
+
.ptBottomAction{display:flex;justify-content:center;margin:30px 0 10px}
|
|
500
|
+
/* 按插件来源分组:分组本身是可折叠块,摘要沿用来源头排版,展开时才画分隔线。 */
|
|
501
|
+
.ptOwnerGroup{margin:0 0 8px;border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-md);background:var(--pt-surface-2);overflow:hidden}
|
|
502
|
+
/* 分组已经在一个区块容器里时不再套一层壳:分组之间只用一条 hairline 分隔。 */
|
|
503
|
+
.ptSectionFold .ptOwnerGroup{margin:0;border:0;border-radius:0;background:transparent}
|
|
504
|
+
.ptSectionFold .ptOwnerGroup+.ptOwnerGroup{border-top:.5px solid var(--pt-line-2)}
|
|
505
|
+
.ptSectionFold .ptOwnerHead{padding:8px 0 6px;border-bottom:0}
|
|
506
|
+
.ptSectionFold .ptOwnerBody{padding:0 0 8px}
|
|
507
|
+
.ptOwnerName{border:0;background:transparent;color:var(--pt-accent);font:inherit;font-size:12px;font-weight:600;padding:0;cursor:pointer;text-align:left;overflow-wrap:anywhere}
|
|
508
|
+
.ptOwnerName:hover{text-decoration:underline}
|
|
509
|
+
.ptOwnerBody{padding:4px 8px 8px}
|
|
510
|
+
/* 开关 */
|
|
511
|
+
.ptSwitch{display:inline-flex;align-items:center;gap:7px;border:0;background:transparent;color:var(--pt-text-2);font:inherit;font-size:12px;padding:1px 2px;cursor:pointer;border-radius:var(--pt-r-sm);text-align:left}
|
|
512
|
+
.ptSwitch:disabled{opacity:.5;cursor:default}
|
|
513
|
+
.ptSwitch:focus-visible{outline:2px solid var(--pt-focus);outline-offset:2px}
|
|
514
|
+
.ptSwitchTrack{position:relative;flex:none;width:26px;height:15px;border-radius:999px;background:var(--pt-surface-3);transition:background .12s ease}
|
|
515
|
+
.ptSwitchKnob{position:absolute;top:2px;left:2px;width:11px;height:11px;border-radius:50%;background:var(--pt-knob);box-shadow:var(--pt-knob-shadow);transition:transform .12s ease}
|
|
516
|
+
.ptSwitch[aria-checked=true] .ptSwitchTrack{background:var(--pt-accent)}
|
|
517
|
+
.ptSwitch[aria-checked=true] .ptSwitchKnob{transform:translateX(11px)}
|
|
518
|
+
.ptSwitch[aria-checked=true] .ptSwitchLabel{color:var(--pt-text-1)}
|
|
519
|
+
.ptBindingRow{display:flex;align-items:center;gap:10px;flex-wrap:wrap;padding:2px 8px 8px 26px;font-size:11.5px}
|
|
520
|
+
/* 编辑器 */
|
|
521
|
+
.ptEditor{box-sizing:border-box;width:100%;min-height:84px;resize:vertical;field-sizing:content;border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-md);background:var(--pt-surface-2);color:inherit;font:inherit;font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11.5px;line-height:18px;padding:8px 10px;outline:none}
|
|
522
|
+
.ptEditor:focus{border-color:var(--pt-accent)}
|
|
523
|
+
.ptEditor:disabled{opacity:.55;cursor:not-allowed}
|
|
524
|
+
.ptEditorLabel{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--pt-text-3);flex-wrap:wrap}
|
|
525
|
+
.ptToolGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:1px 6px}
|
|
526
|
+
.ptToolCheck{display:flex;align-items:center;gap:6px;min-height:24px;font-size:11.5px;padding:3px 6px;border-radius:var(--pt-r-sm);min-width:0}
|
|
527
|
+
.ptToolCheck:hover{background:var(--pt-hover)}
|
|
528
|
+
.ptToolCheck code{font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer}
|
|
529
|
+
.ptToolCheck[data-off=true] code{color:var(--pt-text-3);text-decoration:line-through}
|
|
530
|
+
/* 小胶囊:只用于编辑器里少数即时筛选。 */
|
|
531
|
+
.ptChipGroup{display:flex;flex-wrap:wrap;gap:5px;align-items:center}
|
|
532
|
+
.ptChip{border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-sm);background:transparent;color:var(--pt-text-2);height:24px;padding:0 9px;font:inherit;font-size:11px;cursor:pointer;white-space:nowrap}
|
|
533
|
+
.ptChip:hover{background:var(--pt-hover)}
|
|
534
|
+
.ptChip[aria-pressed=true]{border-color:var(--pt-accent);color:var(--pt-text-1);background:var(--pt-surface-1)}
|
|
535
|
+
.ptChip:focus-visible{outline:2px solid var(--pt-focus);outline-offset:1px}
|
|
536
|
+
.ptLink{cursor:pointer;border:0;background:transparent;color:var(--pt-accent);padding:0 4px;border-radius:var(--pt-r-xs);text-align:left}
|
|
537
|
+
.ptLink:hover{background:var(--pt-accent-soft)}
|
|
538
|
+
.ptLink:focus-visible{outline:2px solid var(--pt-focus);outline-offset:1px}
|
|
539
|
+
.ptHint{margin:0 0 10px;color:var(--pt-text-3);font-size:11.5px;line-height:18px}
|
|
540
|
+
/* 关注项:插件页顶部的诊断列表,默认只在有严重项时展开。 */
|
|
541
|
+
.ptAttention{border:.5px solid var(--pt-line-2);border-radius:var(--pt-r-md);margin:4px 0 10px;background:var(--pt-surface-1);overflow:hidden}
|
|
542
|
+
.ptAttention>summary{display:flex;align-items:center;gap:8px;padding:6px 10px;cursor:pointer;list-style:none;font-size:12.5px;line-height:20px}
|
|
543
|
+
.ptAttention>summary::-webkit-details-marker{display:none}
|
|
544
|
+
.ptAttention>summary:hover{background:var(--pt-hover)}
|
|
545
|
+
.ptAttention>summary:focus-visible{outline:2px solid var(--pt-focus);outline-offset:-2px}
|
|
546
|
+
.ptAttention[open]>summary{border-bottom:.5px solid var(--pt-line-2);background:var(--pt-surface-2)}
|
|
547
|
+
.ptAttentionList{margin:0;padding:0;list-style:none}
|
|
548
|
+
.ptAttentionRow{display:flex;align-items:baseline;gap:8px;padding:6px 10px;border-top:.5px solid var(--pt-line-2);font-size:12px;line-height:18px}
|
|
549
|
+
.ptAttentionRow:first-child{border-top:0}
|
|
550
|
+
.ptAttentionRow[data-severity=critical]{background:var(--pt-error-soft)}
|
|
551
|
+
.ptSeverity{flex:none;font-size:10px;line-height:16px;padding:0 5px;border-radius:var(--pt-r-xs);color:var(--pt-text-3);background:var(--pt-surface-3);white-space:nowrap}
|
|
552
|
+
.ptSeverity[data-severity=critical]{color:var(--pt-error);background:var(--pt-error-soft)}
|
|
553
|
+
.ptSeverity[data-severity=warning]{color:var(--pt-warn);background:var(--pt-warn-soft)}
|
|
554
|
+
.ptAttentionText{display:flex;flex-direction:column;gap:1px;min-width:0;flex:1}
|
|
555
|
+
.ptAttentionTitle{color:var(--pt-text-1);overflow-wrap:anywhere}
|
|
556
|
+
.ptAttentionDetail{color:var(--pt-text-3);font-size:11px;line-height:16px;overflow-wrap:anywhere;font-family:var(--ds-font-family-code,ui-monospace,monospace)}
|
|
557
|
+
/* 破坏性清理:收起时只留一行居中小字,点开才是清理卡;再点一次收起。 */
|
|
558
|
+
.ptCleanupFold{margin:26px 0 6px;border:0;background:transparent}
|
|
559
|
+
.ptCleanupFold>.ptCleanupSummary{display:flex;align-items:center;justify-content:center;gap:5px;width:max-content;max-width:100%;margin:0 auto;padding:5px 9px;border-radius:var(--pt-r-sm);list-style:none;cursor:pointer;color:var(--pt-text-3);font-size:11.5px;line-height:18px}
|
|
560
|
+
.ptCleanupFold>.ptCleanupSummary::-webkit-details-marker{display:none}
|
|
561
|
+
.ptCleanupFold>.ptCleanupSummary:hover{color:var(--pt-text-1);background:var(--pt-hover)}
|
|
562
|
+
.ptCleanupFold>.ptCleanupSummary:focus-visible{outline:2px solid var(--pt-focus);outline-offset:1px}
|
|
563
|
+
/* 三角用边框画而不是字形:字号再小也不会退化成一个小点。 */
|
|
564
|
+
.ptCleanupCaret{display:inline-block;width:0;height:0;border-left:4px solid transparent;border-right:4px solid transparent;border-top:5px solid currentColor;transition:transform .12s ease}
|
|
565
|
+
.ptCleanupFold[open]>.ptCleanupSummary{margin-bottom:10px}
|
|
566
|
+
.ptCleanupFold[open]>.ptCleanupSummary .ptCleanupCaret{transform:rotate(180deg)}
|
|
567
|
+
.ptCleanupFold>.ptCard{margin:0}
|
|
568
|
+
@media (max-width:767px){.ptBar{padding:16px 16px 0}.ptBody{padding:0 16px 32px}.ptSearch{max-width:none}.ptDetail{margin-left:0}.ptDetailGrid{grid-template-columns:1fr}}
|
|
569
|
+
`
|
|
570
|
+
|
|
571
|
+
/** 把模块级样式挂到 document 上,重复 materialize 不会重复插入。 */
|
|
572
|
+
function ensureStyles() {
|
|
573
|
+
if (typeof document === 'undefined') return
|
|
574
|
+
const existing = document.querySelector(`style[data-plugin-css="${TAG_ID}"]`)
|
|
575
|
+
if (existing !== null) {
|
|
576
|
+
// 热更新时旧样式还在页面里:内容变了必须替换,否则新类名拿不到规则。
|
|
577
|
+
if (existing.textContent !== CSS) existing.textContent = CSS
|
|
578
|
+
return
|
|
579
|
+
}
|
|
580
|
+
const tag = document.createElement('style')
|
|
581
|
+
tag.dataset.plugin = 'dsh-plugin-console'
|
|
582
|
+
tag.dataset.pluginCss = TAG_ID
|
|
583
|
+
tag.textContent = CSS
|
|
584
|
+
document.head.appendChild(tag)
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
return { CSS, ensureStyles }
|
|
588
|
+
},
|
|
589
|
+
})
|