@playcanvas/inspector 0.1.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.
Files changed (77) hide show
  1. package/LICENSE +19 -0
  2. package/README.md +110 -0
  3. package/package.json +62 -0
  4. package/src/asset-usage.js +108 -0
  5. package/src/asset-view.js +370 -0
  6. package/src/camera-view.js +128 -0
  7. package/src/debug.js +31 -0
  8. package/src/describe.js +302 -0
  9. package/src/entity-inspector-script.js +130 -0
  10. package/src/frame-graph-view.js +767 -0
  11. package/src/hierarchy-view.js +475 -0
  12. package/src/index.js +4 -0
  13. package/src/input/fly-controller.js +116 -0
  14. package/src/input/input.js +299 -0
  15. package/src/input/math.js +8 -0
  16. package/src/input/orbit-controller.js +158 -0
  17. package/src/input/pose.js +207 -0
  18. package/src/inspector.js +3293 -0
  19. package/src/instance-survey.js +50 -0
  20. package/src/list-view.js +410 -0
  21. package/src/material-view.js +197 -0
  22. package/src/memory-view.js +344 -0
  23. package/src/mesh-view.js +235 -0
  24. package/src/model.js +170 -0
  25. package/src/node-model.js +404 -0
  26. package/src/physics-debug.js +527 -0
  27. package/src/physics-view.js +314 -0
  28. package/src/picker/picker.js +545 -0
  29. package/src/picker/render-pass-picker.js +206 -0
  30. package/src/property-view.js +628 -0
  31. package/src/render-target-view.js +288 -0
  32. package/src/renderers/texture-renderer-shaders.js +139 -0
  33. package/src/renderers/texture-renderer.js +430 -0
  34. package/src/renderers/wire-renderer.js +954 -0
  35. package/src/script-view.js +288 -0
  36. package/src/shader-view.js +287 -0
  37. package/src/styles.js +918 -0
  38. package/src/texture-view.js +186 -0
  39. package/src/tooltip.js +72 -0
  40. package/src/viewport-tools.js +695 -0
  41. package/types/asset-usage.d.ts +23 -0
  42. package/types/asset-view.d.ts +94 -0
  43. package/types/camera-view.d.ts +45 -0
  44. package/types/debug.d.ts +14 -0
  45. package/types/describe.d.ts +43 -0
  46. package/types/entity-inspector-script.d.ts +87 -0
  47. package/types/frame-graph-view.d.ts +155 -0
  48. package/types/hierarchy-view.d.ts +172 -0
  49. package/types/index.d.ts +3 -0
  50. package/types/input/fly-controller.d.ts +42 -0
  51. package/types/input/input.d.ts +192 -0
  52. package/types/input/math.d.ts +1 -0
  53. package/types/input/orbit-controller.d.ts +63 -0
  54. package/types/input/pose.d.ts +126 -0
  55. package/types/inspector.d.ts +1304 -0
  56. package/types/instance-survey.d.ts +35 -0
  57. package/types/list-view.d.ts +151 -0
  58. package/types/material-view.d.ts +63 -0
  59. package/types/memory-view.d.ts +95 -0
  60. package/types/mesh-view.d.ts +89 -0
  61. package/types/model.d.ts +104 -0
  62. package/types/node-model.d.ts +54 -0
  63. package/types/physics-debug.d.ts +254 -0
  64. package/types/physics-view.d.ts +81 -0
  65. package/types/picker/picker.d.ts +255 -0
  66. package/types/picker/render-pass-picker.d.ts +47 -0
  67. package/types/property-view.d.ts +189 -0
  68. package/types/render-target-view.d.ts +98 -0
  69. package/types/renderers/texture-renderer-shaders.d.ts +9 -0
  70. package/types/renderers/texture-renderer.d.ts +231 -0
  71. package/types/renderers/wire-renderer.d.ts +347 -0
  72. package/types/script-view.d.ts +56 -0
  73. package/types/shader-view.d.ts +46 -0
  74. package/types/styles.d.ts +22 -0
  75. package/types/texture-view.d.ts +30 -0
  76. package/types/tooltip.d.ts +17 -0
  77. package/types/viewport-tools.d.ts +237 -0
package/src/styles.js ADDED
@@ -0,0 +1,918 @@
1
+ /**
2
+ * One muted tone per nesting level, cycling, for the indent guides of the property view, so a
3
+ * nested row can be read back to its parent.
4
+ *
5
+ * @type {string[]}
6
+ */
7
+ const INDENT_COLORS = ['#3f4a5f', '#4a4459', '#3f5450', '#55503f'];
8
+
9
+ /**
10
+ * The same tones brighter, for the brackets of the lists. A bracket is the only thing telling which
11
+ * rows belong together there, so it has to read without indentation to back it up.
12
+ *
13
+ * @type {string[]}
14
+ */
15
+ const BRACKET_COLORS = ['#6a7fa8', '#8a76a8', '#62968a', '#a39564'];
16
+
17
+ /**
18
+ * The line icons of the toolbar, as the contents of a 24x24 SVG drawn with a 2px round stroke, in
19
+ * the style of the icons of the examples browser.
20
+ *
21
+ * @type {Record<string, string>}
22
+ */
23
+ const ICONS = {
24
+ pause: '<rect x="6" y="5" width="4" height="14" rx="1"/><rect x="14" y="5" width="4" height="14" rx="1"/>',
25
+ play: '<path d="M7 4.5v15l12-7.5z"/>',
26
+ step: '<path d="M5 4.5v15l10-7.5z"/><path d="M19 5v14"/>',
27
+ pick: '<path d="M4.04 4.69a.5.5 0 0 1 .65-.65l16 6.5a.5.5 0 0 1-.06.95l-6.13 1.58a2 2 0 0 0-1.43 1.43l-1.58 6.13a.5.5 0 0 1-.95.06z"/>',
28
+ orbit: '<circle cx="12" cy="12" r="3"/><circle cx="19" cy="5" r="2"/><circle cx="5" cy="19" r="2"/><path d="M10.4 21.9a10 10 0 0 0 9.94-15.42"/><path d="M13.5 2.1a10 10 0 0 0-9.84 15.42"/>',
29
+ fly: '<path d="m16 13 5.22 3.48a.5.5 0 0 0 .78-.42V7.87a.5.5 0 0 0-.75-.43L16 10.5"/><rect x="2" y="6" width="14" height="12" rx="2"/>',
30
+ popout: '<path d="M15 3h6v6"/><path d="M10 14 21 3"/><path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/>',
31
+ dock: '<rect x="3" y="3" width="18" height="18" rx="2"/><path d="M15 3v18"/>',
32
+ close: '<path d="M18 6 6 18M6 6l12 12"/>'
33
+ };
34
+
35
+ /**
36
+ * A rule per icon, setting the mask the icon buttons draw in their text color.
37
+ *
38
+ * @type {string}
39
+ */
40
+ const ICON_RULES = Object.entries(ICONS).map(([name, body]) => {
41
+ const svg = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="black" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${body}</svg>`;
42
+ return ` .pci-i-${name} { --pci-icon: url("data:image/svg+xml,${encodeURIComponent(svg)}"); }`;
43
+ }).join('\n');
44
+
45
+ /**
46
+ * Stylesheet for the entity inspector panel. Injected into the panel's shadow root, so nothing
47
+ * here leaks into the page and nothing in the page leaks in. Its palette matches the examples
48
+ * browser.
49
+ *
50
+ * @type {string}
51
+ */
52
+ const styles = /* css */ `
53
+ :host {
54
+ all: initial;
55
+ display: block;
56
+ /* native controls (selects, checkboxes) in their dark form */
57
+ color-scheme: dark;
58
+
59
+ --pci-font: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
60
+ --pci-mono: ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;
61
+ --pci-bg: #182022;
62
+ --pci-bar: #13191b;
63
+ --pci-raised: #1f282a;
64
+ --pci-input: #121819;
65
+ --pci-hover: rgba(255, 255, 255, 0.06);
66
+ --pci-pressed: rgba(255, 255, 255, 0.1);
67
+ --pci-border: rgba(255, 255, 255, 0.07);
68
+ --pci-border-strong: rgba(255, 255, 255, 0.12);
69
+ --pci-text: #eef2f3;
70
+ --pci-text-body: #dbe2e4;
71
+ --pci-text-secondary: #b9c4c7;
72
+ --pci-text-label: #93a2a6;
73
+ --pci-text-muted: #7f8f93;
74
+ --pci-text-faint: #56656a;
75
+ --pci-accent: #ff6600;
76
+ --pci-accent-text: #ff8a3c;
77
+ --pci-accent-soft: rgba(255, 102, 0, 0.14);
78
+ --pci-accent-strong: rgba(255, 102, 0, 0.24);
79
+ --pci-selected: rgba(255, 102, 0, 0.16);
80
+ --pci-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
81
+ }
82
+
83
+ ::-webkit-scrollbar {
84
+ width: 10px;
85
+ height: 10px;
86
+ }
87
+
88
+ ::-webkit-scrollbar-track,
89
+ ::-webkit-scrollbar-corner {
90
+ background: transparent;
91
+ }
92
+
93
+ ::-webkit-scrollbar-thumb {
94
+ border: 3px solid transparent;
95
+ border-radius: 999px;
96
+ background: rgba(255, 255, 255, 0.14) padding-box;
97
+ }
98
+
99
+ ::-webkit-scrollbar-thumb:hover {
100
+ background-color: rgba(255, 255, 255, 0.26);
101
+ }
102
+
103
+ @supports not selector(::-webkit-scrollbar) {
104
+ * {
105
+ scrollbar-width: thin;
106
+ scrollbar-color: rgba(255, 255, 255, 0.18) transparent;
107
+ }
108
+ }
109
+
110
+ * {
111
+ box-sizing: border-box;
112
+ }
113
+
114
+ .pci-panel {
115
+ position: fixed;
116
+ top: 0;
117
+ bottom: 0;
118
+ right: 0;
119
+ width: 420px;
120
+ z-index: 100000;
121
+ display: flex;
122
+ flex-direction: column;
123
+ background: var(--pci-bg);
124
+ color: var(--pci-text-body);
125
+ font: 12px/1.45 var(--pci-font);
126
+ border-left: 1px solid var(--pci-border-strong);
127
+ box-shadow: -6px 0 18px rgba(0, 0, 0, 0.35);
128
+ user-select: none;
129
+ -webkit-user-select: none;
130
+ }
131
+
132
+ .pci-panel.pci-dock-left {
133
+ right: auto;
134
+ left: 0;
135
+ border-left: none;
136
+ border-right: 1px solid var(--pci-border-strong);
137
+ box-shadow: 6px 0 18px rgba(0, 0, 0, 0.35);
138
+ }
139
+
140
+ .pci-panel.pci-popout {
141
+ left: 0;
142
+ right: 0;
143
+ width: auto !important;
144
+ border: none;
145
+ box-shadow: none;
146
+ }
147
+
148
+ .pci-edge {
149
+ position: absolute;
150
+ top: 0;
151
+ bottom: 0;
152
+ left: -3px;
153
+ width: 6px;
154
+ cursor: ew-resize;
155
+ }
156
+
157
+ .pci-dock-left .pci-edge {
158
+ left: auto;
159
+ right: -3px;
160
+ }
161
+
162
+ .pci-popout .pci-edge {
163
+ display: none;
164
+ }
165
+
166
+ .pci-toolbar {
167
+ display: flex;
168
+ flex-wrap: wrap;
169
+ align-items: center;
170
+ gap: 2px;
171
+ padding: 6px 6px 6px 12px;
172
+ background: var(--pci-bar);
173
+ border-bottom: 1px solid var(--pci-border);
174
+ flex: 0 0 auto;
175
+ }
176
+
177
+ .pci-toolbar .pci-title {
178
+ font-size: 13px;
179
+ font-weight: 600;
180
+ color: var(--pci-text);
181
+ margin-right: 10px;
182
+ white-space: nowrap;
183
+ }
184
+
185
+ .pci-toolbar .pci-spacer {
186
+ flex: 1 1 auto;
187
+ }
188
+
189
+ .pci-toolbar .pci-sep {
190
+ flex: 0 0 1px;
191
+ align-self: stretch;
192
+ margin: 6px 5px;
193
+ background: var(--pci-border-strong);
194
+ }
195
+
196
+ .pci-btn {
197
+ font: inherit;
198
+ font-weight: 500;
199
+ color: var(--pci-text-secondary);
200
+ background: rgba(255, 255, 255, 0.07);
201
+ border: none;
202
+ border-radius: 6px;
203
+ padding: 3px 10px;
204
+ cursor: pointer;
205
+ white-space: nowrap;
206
+ transition: background-color 100ms, color 100ms;
207
+ }
208
+
209
+ .pci-btn:not(:disabled):hover {
210
+ background: var(--pci-pressed);
211
+ color: var(--pci-text);
212
+ }
213
+
214
+ .pci-btn:focus-visible {
215
+ outline: 2px solid var(--pci-accent);
216
+ outline-offset: -2px;
217
+ }
218
+
219
+ .pci-btn:disabled {
220
+ opacity: 0.35;
221
+ cursor: default;
222
+ }
223
+
224
+ .pci-btn.pci-active,
225
+ .pci-btn.pci-active:not(:disabled):hover {
226
+ background: var(--pci-accent-soft);
227
+ color: var(--pci-accent-text);
228
+ }
229
+
230
+ .pci-btn.pci-active:not(:disabled):hover {
231
+ background: var(--pci-accent-strong);
232
+ }
233
+
234
+ .pci-icon-btn {
235
+ display: inline-flex;
236
+ align-items: center;
237
+ justify-content: center;
238
+ width: 30px;
239
+ height: 30px;
240
+ padding: 0;
241
+ border-radius: 8px;
242
+ background: transparent;
243
+ }
244
+
245
+ .pci-icon-btn::before {
246
+ content: "";
247
+ width: 17px;
248
+ height: 17px;
249
+ background-color: currentColor;
250
+ -webkit-mask: var(--pci-icon) center / contain no-repeat;
251
+ mask: var(--pci-icon) center / contain no-repeat;
252
+ }
253
+
254
+ .pci-icon-btn.pci-warn,
255
+ .pci-icon-btn.pci-warn:not(:disabled):hover {
256
+ background: rgba(241, 76, 76, 0.16);
257
+ color: #ff8f8f;
258
+ }
259
+
260
+ ${ICON_RULES}
261
+
262
+ .pci-body {
263
+ flex: 1 1 auto;
264
+ display: flex;
265
+ flex-direction: column;
266
+ min-height: 0;
267
+ }
268
+
269
+ .pci-hierarchy {
270
+ flex: 0 0 45%;
271
+ display: flex;
272
+ flex-direction: column;
273
+ min-height: 60px;
274
+ }
275
+
276
+ .pci-filter {
277
+ flex: 0 0 auto;
278
+ display: flex;
279
+ gap: 6px;
280
+ padding: 8px;
281
+ border-bottom: 1px solid var(--pci-border);
282
+ }
283
+
284
+ .pci-filter input {
285
+ flex: 1 1 auto;
286
+ min-width: 0;
287
+ font: inherit;
288
+ color: var(--pci-text);
289
+ background: var(--pci-input);
290
+ border: 1px solid var(--pci-border-strong);
291
+ border-radius: 999px;
292
+ padding: 4px 12px;
293
+ outline: none;
294
+ user-select: text;
295
+ -webkit-user-select: text;
296
+ transition: border-color 100ms, box-shadow 100ms;
297
+ }
298
+
299
+ .pci-filter input::placeholder {
300
+ color: var(--pci-text-muted);
301
+ }
302
+
303
+ .pci-filter input:focus {
304
+ border-color: var(--pci-accent);
305
+ box-shadow: 0 0 0 3px var(--pci-accent-soft);
306
+ }
307
+
308
+ .pci-tabs {
309
+ flex: 0 0 auto;
310
+ display: flex;
311
+ flex-wrap: wrap;
312
+ gap: 2px;
313
+ margin: 8px;
314
+ padding: 3px;
315
+ background: var(--pci-input);
316
+ border: 1px solid var(--pci-border);
317
+ border-radius: 9px;
318
+ }
319
+
320
+ .pci-tab {
321
+ font: inherit;
322
+ font-weight: 500;
323
+ color: var(--pci-text-muted);
324
+ background: transparent;
325
+ border: none;
326
+ border-radius: 6px;
327
+ padding: 3px 9px;
328
+ white-space: nowrap;
329
+ cursor: pointer;
330
+ transition: background-color 100ms, color 100ms;
331
+ }
332
+
333
+ .pci-tab:hover {
334
+ color: var(--pci-text);
335
+ background: var(--pci-hover);
336
+ }
337
+
338
+ .pci-tab.pci-active,
339
+ .pci-tab.pci-active:hover {
340
+ color: var(--pci-text);
341
+ background: var(--pci-pressed);
342
+ }
343
+
344
+ .pci-listpanel {
345
+ flex: 1 1 auto;
346
+ display: flex;
347
+ flex-direction: column;
348
+ min-height: 0;
349
+ }
350
+
351
+ .pci-subbar {
352
+ flex: 0 0 auto;
353
+ display: flex;
354
+ flex-wrap: wrap;
355
+ align-items: center;
356
+ gap: 4px 14px;
357
+ padding: 4px 8px;
358
+ border-bottom: 1px solid var(--pci-border);
359
+ color: var(--pci-text-secondary);
360
+ font-size: 11px;
361
+ }
362
+
363
+ .pci-subbar.pci-wrap {
364
+ flex-wrap: wrap;
365
+ row-gap: 4px;
366
+ }
367
+
368
+ .pci-tip {
369
+ display: none;
370
+ position: fixed;
371
+ z-index: 2;
372
+ max-width: 320px;
373
+ padding: 5px 8px;
374
+ background: var(--pci-raised);
375
+ color: var(--pci-text);
376
+ border: 1px solid var(--pci-border-strong);
377
+ border-radius: 6px;
378
+ box-shadow: var(--pci-shadow);
379
+ white-space: pre-line;
380
+ overflow-wrap: anywhere;
381
+ pointer-events: none;
382
+ }
383
+
384
+ .pci-check {
385
+ display: inline-flex;
386
+ align-items: center;
387
+ gap: 5px;
388
+ cursor: pointer;
389
+ white-space: nowrap;
390
+ }
391
+
392
+ .pci-check input.pci-number {
393
+ width: 54px;
394
+ height: auto;
395
+ font: inherit;
396
+ color: var(--pci-text);
397
+ background: var(--pci-input);
398
+ border: 1px solid var(--pci-border-strong);
399
+ border-radius: 5px;
400
+ padding: 1px 4px;
401
+ outline: none;
402
+ user-select: text;
403
+ -webkit-user-select: text;
404
+ }
405
+
406
+ .pci-number:focus {
407
+ border-color: var(--pci-accent);
408
+ }
409
+
410
+ .pci-note {
411
+ flex: 0 0 auto;
412
+ padding: 6px 8px;
413
+ border-bottom: 1px solid var(--pci-border);
414
+ color: #ffb4b4;
415
+ font-size: 11px;
416
+ }
417
+
418
+ .pci-note.pci-note-info {
419
+ color: var(--pci-text-label);
420
+ }
421
+
422
+ .pci-select {
423
+ font: inherit;
424
+ color: var(--pci-text);
425
+ background: var(--pci-input);
426
+ border: 1px solid var(--pci-border-strong);
427
+ border-radius: 5px;
428
+ padding: 2px 6px;
429
+ outline: none;
430
+ }
431
+
432
+ .pci-select:focus {
433
+ border-color: var(--pci-accent);
434
+ }
435
+
436
+ .pci-check input {
437
+ width: 12px;
438
+ height: 12px;
439
+ margin: 0;
440
+ accent-color: var(--pci-accent);
441
+ }
442
+
443
+ .pci-check.pci-strong {
444
+ color: var(--pci-text);
445
+ font-weight: 600;
446
+ }
447
+
448
+ .pci-subbar.pci-master {
449
+ gap: 10px;
450
+ }
451
+
452
+ .pci-subbar .pci-hint {
453
+ color: var(--pci-text-muted);
454
+ }
455
+
456
+ .pci-subbar.pci-options {
457
+ margin-left: 12px;
458
+ border-left: 2px solid var(--pci-border-strong);
459
+ }
460
+
461
+ .pci-subbar.pci-inactive {
462
+ opacity: 0.45;
463
+ }
464
+
465
+ .pci-cell-toggle {
466
+ flex: 0 0 auto;
467
+ width: 12px;
468
+ height: 12px;
469
+ margin: 0;
470
+ accent-color: var(--pci-accent);
471
+ cursor: pointer;
472
+ }
473
+
474
+ .pci-cell-toggle:disabled {
475
+ cursor: default;
476
+ }
477
+
478
+ .pci-cell-spacer {
479
+ flex: 0 0 12px;
480
+ }
481
+
482
+ .pci-list {
483
+ flex: 1 1 auto;
484
+ overflow: auto;
485
+ padding: 4px 0;
486
+ }
487
+
488
+ .pci-lrow {
489
+ display: flex;
490
+ align-items: center;
491
+ gap: 6px;
492
+ height: 20px;
493
+ padding-right: 8px;
494
+ white-space: nowrap;
495
+ cursor: pointer;
496
+ }
497
+
498
+ .pci-lrow:hover {
499
+ background-color: var(--pci-hover);
500
+ }
501
+
502
+ .pci-lrow.pci-selected {
503
+ background-color: var(--pci-selected);
504
+ color: #ffffff;
505
+ }
506
+
507
+ .pci-lrow.pci-dim .pci-cell-name,
508
+ .pci-lrow.pci-dim .pci-cell-info {
509
+ opacity: 0.45;
510
+ }
511
+
512
+ .pci-cell {
513
+ flex: 0 1 auto;
514
+ min-width: 0;
515
+ overflow: hidden;
516
+ text-overflow: ellipsis;
517
+ }
518
+
519
+ .pci-cell-index {
520
+ flex: 0 0 22px;
521
+ text-align: right;
522
+ color: var(--pci-text-muted);
523
+ font-family: var(--pci-mono);
524
+ font-size: 10.5px;
525
+ }
526
+
527
+ .pci-cell-name {
528
+ flex-shrink: 0;
529
+ /* long generated names (shaders) truncate rather than push the other cells out of view */
530
+ max-width: 60%;
531
+ }
532
+
533
+ .pci-cell-info {
534
+ color: var(--pci-text-label);
535
+ font-family: var(--pci-mono);
536
+ font-size: 10.5px;
537
+ }
538
+
539
+ .pci-lrow.pci-selected .pci-cell-info {
540
+ color: var(--pci-text-secondary);
541
+ }
542
+
543
+ .pci-cell-right {
544
+ margin-left: auto;
545
+ flex-shrink: 0;
546
+ }
547
+
548
+ .pci-cell-time {
549
+ flex-shrink: 0;
550
+ margin-left: auto;
551
+ color: #b5cea8;
552
+ font-family: var(--pci-mono);
553
+ font-size: 10.5px;
554
+ }
555
+
556
+ .pci-cell-tag {
557
+ flex-shrink: 0;
558
+ font-size: 9.5px;
559
+ line-height: 13px;
560
+ padding: 0 4px;
561
+ border-radius: 4px;
562
+ background: #5a2a2a;
563
+ color: #ffb4b4;
564
+ }
565
+
566
+ .pci-cell-tag-info {
567
+ background: rgba(255, 255, 255, 0.07);
568
+ color: var(--pci-text-secondary);
569
+ }
570
+
571
+ .pci-cell.pci-link {
572
+ text-decoration: underline dotted;
573
+ }
574
+
575
+ .pci-cell.pci-link:hover {
576
+ color: #9ad7ff;
577
+ }
578
+
579
+ .pci-tree {
580
+ flex: 1 1 auto;
581
+ overflow: auto;
582
+ padding: 4px 0;
583
+ }
584
+
585
+ .pci-row {
586
+ display: flex;
587
+ align-items: center;
588
+ gap: 4px;
589
+ height: 20px;
590
+ padding-right: 8px;
591
+ white-space: nowrap;
592
+ cursor: pointer;
593
+ }
594
+
595
+ .pci-row:hover {
596
+ background: var(--pci-hover);
597
+ }
598
+
599
+ .pci-row.pci-selected {
600
+ background: var(--pci-selected);
601
+ color: #ffffff;
602
+ }
603
+
604
+ .pci-row.pci-disabled .pci-name {
605
+ opacity: 0.45;
606
+ }
607
+
608
+ .pci-row.pci-graphnode .pci-name {
609
+ font-style: italic;
610
+ color: var(--pci-text-secondary);
611
+ }
612
+
613
+ .pci-row.pci-match .pci-name {
614
+ color: #ffd28a;
615
+ }
616
+
617
+ .pci-arrow {
618
+ flex: 0 0 12px;
619
+ width: 12px;
620
+ text-align: center;
621
+ color: var(--pci-text-muted);
622
+ font-size: 11px;
623
+ }
624
+
625
+ .pci-toggle {
626
+ flex: 0 0 auto;
627
+ width: 12px;
628
+ height: 12px;
629
+ margin: 0 3px 0 0;
630
+ accent-color: var(--pci-accent);
631
+ cursor: pointer;
632
+ }
633
+
634
+ .pci-name {
635
+ overflow: hidden;
636
+ text-overflow: ellipsis;
637
+ }
638
+
639
+ .pci-badges {
640
+ display: inline-flex;
641
+ gap: 3px;
642
+ margin-left: 4px;
643
+ }
644
+
645
+ .pci-badge {
646
+ font-size: 9.5px;
647
+ line-height: 13px;
648
+ padding: 0 4px;
649
+ border-radius: 4px;
650
+ background: rgba(255, 255, 255, 0.07);
651
+ color: var(--pci-text-secondary);
652
+ }
653
+
654
+ .pci-selected .pci-badge {
655
+ background: var(--pci-accent-strong);
656
+ color: var(--pci-text);
657
+ }
658
+
659
+ .pci-count {
660
+ margin-left: auto;
661
+ min-width: 4ch;
662
+ text-align: right;
663
+ color: var(--pci-text-muted);
664
+ font-size: 10.5px;
665
+ font-variant-numeric: tabular-nums;
666
+ }
667
+
668
+ /* the whole subtree, in its own column after the children, dimmer */
669
+ .pci-count.pci-count-total {
670
+ margin-left: 6px;
671
+ min-width: 6ch;
672
+ color: var(--pci-text-faint);
673
+ }
674
+
675
+ .pci-splitter {
676
+ flex: 0 0 5px;
677
+ background: var(--pci-raised);
678
+ border-top: 1px solid var(--pci-border-strong);
679
+ border-bottom: 1px solid var(--pci-border-strong);
680
+ cursor: ns-resize;
681
+ }
682
+
683
+ .pci-properties {
684
+ flex: 1 1 auto;
685
+ overflow: auto;
686
+ padding-bottom: 8px;
687
+ font-family: var(--pci-mono);
688
+ font-size: 11px;
689
+ }
690
+
691
+ .pci-empty {
692
+ padding: 12px 10px;
693
+ color: var(--pci-text-muted);
694
+ font-family: var(--pci-font);
695
+ font-size: 12px;
696
+ }
697
+
698
+ .pci-section-title {
699
+ position: sticky;
700
+ top: 0;
701
+ display: flex;
702
+ align-items: center;
703
+ gap: 6px;
704
+ padding: 4px 8px;
705
+ margin-top: 4px;
706
+ background: var(--pci-raised);
707
+ color: var(--pci-text);
708
+ font-family: var(--pci-font);
709
+ font-size: 11.5px;
710
+ font-weight: 600;
711
+ cursor: pointer;
712
+ z-index: 1;
713
+ }
714
+
715
+ .pci-section-title::before {
716
+ content: "▾";
717
+ color: var(--pci-text-muted);
718
+ font-size: 10px;
719
+ }
720
+
721
+ .pci-collapsed .pci-section-title::before {
722
+ content: "▸";
723
+ }
724
+
725
+ .pci-collapsed .pci-rows {
726
+ display: none;
727
+ }
728
+
729
+ .pci-prop {
730
+ display: flex;
731
+ gap: 8px;
732
+ padding: 1px 8px;
733
+ line-height: 17px;
734
+ }
735
+
736
+ .pci-prop:hover {
737
+ background-color: var(--pci-hover);
738
+ }
739
+
740
+ /* an entry of an expanded collection, and everything it opens, reads as one block */
741
+ .pci-prop.pci-group {
742
+ border-top: 1px solid var(--pci-border-strong);
743
+ margin-top: 2px;
744
+ padding-top: 2px;
745
+ }
746
+
747
+ /* the last row a collection's final entry opened, closing the block */
748
+ .pci-prop.pci-group-end {
749
+ border-bottom: 1px solid var(--pci-border-strong);
750
+ margin-bottom: 2px;
751
+ padding-bottom: 2px;
752
+ }
753
+
754
+
755
+ .pci-label {
756
+ flex: 0 0 38%;
757
+ color: var(--pci-text-label);
758
+ overflow: hidden;
759
+ text-overflow: ellipsis;
760
+ white-space: nowrap;
761
+ }
762
+
763
+ .pci-indent .pci-label {
764
+ flex-basis: calc(38% - 14px);
765
+ }
766
+
767
+ .pci-value {
768
+ flex: 1 1 auto;
769
+ min-width: 0;
770
+ color: var(--pci-text-body);
771
+ white-space: pre-wrap;
772
+ word-break: break-word;
773
+ user-select: text;
774
+ -webkit-user-select: text;
775
+ }
776
+
777
+ .pci-v-num { color: #b5cea8; }
778
+ .pci-v-bool { color: #569cd6; }
779
+ .pci-v-str { color: #ce9178; }
780
+ .pci-v-null { color: var(--pci-text-muted); }
781
+ .pci-v-obj { color: #dcdcaa; }
782
+ .pci-v-ref { color: #4fc1ff; }
783
+ .pci-v-err { color: #f14c4c; }
784
+
785
+ .pci-link {
786
+ cursor: pointer;
787
+ text-decoration: underline dotted;
788
+ }
789
+
790
+ .pci-link:hover {
791
+ color: #9ad7ff;
792
+ }
793
+
794
+ .pci-expandable .pci-value, .pci-prop.pci-selectable {
795
+ cursor: pointer;
796
+ }
797
+
798
+ .pci-selectable .pci-caret:hover {
799
+ color: #ffffff;
800
+ }
801
+
802
+ .pci-prop.pci-active {
803
+ background-color: var(--pci-selected);
804
+ }
805
+
806
+ .pci-prop.pci-active .pci-value {
807
+ color: #ffffff;
808
+ }
809
+
810
+ .pci-expandable .pci-value:hover {
811
+ color: #ffffff;
812
+ }
813
+
814
+ .pci-actions {
815
+ display: inline-flex;
816
+ gap: 4px;
817
+ flex: 0 0 auto;
818
+ }
819
+
820
+ .pci-action:disabled {
821
+ opacity: 0.35;
822
+ cursor: default;
823
+ }
824
+
825
+ .pci-copy, .pci-action {
826
+ flex: 0 0 auto;
827
+ font: inherit;
828
+ font-size: 10px;
829
+ line-height: 14px;
830
+ padding: 0 6px;
831
+ color: var(--pci-text-secondary);
832
+ background: rgba(255, 255, 255, 0.07);
833
+ border: none;
834
+ border-radius: 4px;
835
+ cursor: pointer;
836
+ }
837
+
838
+ .pci-copy:hover, .pci-action:not(:disabled):hover {
839
+ color: #ffffff;
840
+ background: var(--pci-selected);
841
+ }
842
+
843
+ .pci-code {
844
+ margin: 2px 8px 6px 8px;
845
+ /* the left margin is set per row, to line the block up with the row that opened it */
846
+ padding: 6px 0;
847
+ max-height: 360px;
848
+ overflow: auto;
849
+ background: var(--pci-input);
850
+ border: 1px solid var(--pci-border);
851
+ border-radius: 6px;
852
+ font-family: var(--pci-mono);
853
+ font-size: 10.5px;
854
+ line-height: 15px;
855
+ color: #d4d4d4;
856
+ tab-size: 4;
857
+ counter-reset: line;
858
+ user-select: text;
859
+ -webkit-user-select: text;
860
+ }
861
+
862
+ .pci-code-line {
863
+ display: block;
864
+ white-space: pre;
865
+ padding-right: 8px;
866
+ counter-increment: line;
867
+ }
868
+
869
+ .pci-code-line::before {
870
+ content: counter(line);
871
+ display: inline-block;
872
+ width: 3.5em;
873
+ margin-right: 10px;
874
+ padding-right: 6px;
875
+ text-align: right;
876
+ color: var(--pci-text-faint);
877
+ border-right: 1px solid var(--pci-border);
878
+ user-select: none;
879
+ -webkit-user-select: none;
880
+ }
881
+
882
+ .pci-swatch {
883
+ display: inline-block;
884
+ width: 10px;
885
+ height: 10px;
886
+ margin-right: 5px;
887
+ vertical-align: -1px;
888
+ border: 1px solid #55595f;
889
+ border-radius: 2px;
890
+ }
891
+
892
+ .pci-status {
893
+ flex: 0 0 auto;
894
+ display: flex;
895
+ gap: 10px;
896
+ padding: 4px 8px;
897
+ background: var(--pci-raised);
898
+ border-top: 1px solid var(--pci-border-strong);
899
+ color: var(--pci-text-muted);
900
+ font-size: 11px;
901
+ white-space: nowrap;
902
+ overflow: hidden;
903
+ }
904
+
905
+ .pci-status .pci-paused {
906
+ color: var(--pci-accent);
907
+ font-weight: 600;
908
+ }
909
+
910
+ .pci-status .pci-path {
911
+ flex: 1 1 auto;
912
+ overflow: hidden;
913
+ text-overflow: ellipsis;
914
+ text-align: right;
915
+ }
916
+ `;
917
+
918
+ export { BRACKET_COLORS, INDENT_COLORS, styles };