@amulet-laboratories/astrolabe 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,669 @@
1
+ :root {
2
+ --bg: #fbfbfa;
3
+ --fg: #1c1c1a;
4
+ --muted: #6f6f68;
5
+ --line: #e2e2dd;
6
+ --panel: #fff;
7
+ --entry: #8b7cc8;
8
+ --route: #2f6fd0;
9
+ --component: #2e9e73;
10
+ --lib: #9a9a90;
11
+ --composable: #d08a2f;
12
+ --store: #7b61c9;
13
+ --collection: #c05a8a;
14
+ --server: #c0563f;
15
+ --external: #7a7a72;
16
+ --config: #4b8fa8;
17
+ --edge: #b9b9b1;
18
+ --accent: #2f6fd0;
19
+ }
20
+ @media (prefers-color-scheme: dark) {
21
+ :root {
22
+ --bg: #16161a;
23
+ --fg: #e8e8e4;
24
+ --muted: #96968d;
25
+ --line: #2c2c33;
26
+ --panel: #1c1c22;
27
+ --entry: #a99aea;
28
+ --route: #6da4f5;
29
+ --component: #4fc99a;
30
+ --lib: #75757c;
31
+ --composable: #e8ab55;
32
+ --store: #a48bea;
33
+ --collection: #e884b4;
34
+ --server: #ef8163;
35
+ --external: #8d8d86;
36
+ --config: #6fb6d0;
37
+ --edge: #3a3a42;
38
+ --accent: #6da4f5;
39
+ }
40
+ }
41
+ * {
42
+ box-sizing: border-box;
43
+ }
44
+ html,
45
+ body {
46
+ height: 100%;
47
+ margin: 0;
48
+ }
49
+ body {
50
+ font:
51
+ 13px/1.5 ui-sans-serif,
52
+ system-ui,
53
+ -apple-system,
54
+ 'Segoe UI',
55
+ sans-serif;
56
+ background: var(--bg);
57
+ color: var(--fg);
58
+ display: flex;
59
+ flex-direction: column;
60
+ overflow: hidden;
61
+ }
62
+
63
+ #bar {
64
+ display: flex;
65
+ align-items: center;
66
+ gap: 12px;
67
+ padding: 8px 12px;
68
+ flex: 0 0 auto;
69
+ flex-wrap: wrap;
70
+ }
71
+ #title {
72
+ display: flex;
73
+ align-items: baseline;
74
+ gap: 8px;
75
+ }
76
+ #subtitle {
77
+ color: var(--muted);
78
+ font-size: 12px;
79
+ }
80
+
81
+ #views {
82
+ display: flex;
83
+ gap: 2px;
84
+ padding: 2px;
85
+ background: var(--bg);
86
+ border: 1px solid var(--line);
87
+ border-radius: 7px;
88
+ }
89
+ #views button {
90
+ font: inherit;
91
+ font-size: 12px;
92
+ padding: 4px 11px;
93
+ border: 0;
94
+ border-radius: 5px;
95
+ background: none;
96
+ color: var(--muted);
97
+ cursor: pointer;
98
+ white-space: nowrap;
99
+ }
100
+ #views button:hover {
101
+ color: var(--fg);
102
+ }
103
+ #views button[aria-selected='true'] {
104
+ background: var(--panel);
105
+ color: var(--fg);
106
+ box-shadow: 0 1px 2px rgb(0 0 0 / 0.1);
107
+ }
108
+
109
+ #tools {
110
+ display: flex;
111
+ align-items: center;
112
+ gap: 10px;
113
+ margin-left: auto;
114
+ }
115
+ #group-label {
116
+ display: flex;
117
+ align-items: center;
118
+ gap: 5px;
119
+ color: var(--muted);
120
+ font-size: 12px;
121
+ user-select: none;
122
+ cursor: pointer;
123
+ }
124
+ #group-label.disabled {
125
+ opacity: 0.4;
126
+ cursor: default;
127
+ }
128
+ #search {
129
+ font: inherit;
130
+ padding: 5px 9px;
131
+ border: 1px solid var(--line);
132
+ border-radius: 6px;
133
+ background: var(--panel);
134
+ color: var(--fg);
135
+ width: 170px;
136
+ }
137
+ #reset,
138
+ #heat {
139
+ font: inherit;
140
+ padding: 5px 10px;
141
+ border: 1px solid var(--line);
142
+ border-radius: 6px;
143
+ background: var(--panel);
144
+ color: var(--fg);
145
+ cursor: pointer;
146
+ }
147
+
148
+ #chips-row {
149
+ display: flex;
150
+ align-items: center;
151
+ gap: 8px;
152
+ padding: 0 12px 8px;
153
+ border-bottom: 1px solid var(--line);
154
+ flex-wrap: wrap;
155
+ }
156
+ #chips {
157
+ display: flex;
158
+ gap: 5px;
159
+ flex-wrap: wrap;
160
+ }
161
+ .chip {
162
+ display: inline-flex;
163
+ align-items: center;
164
+ gap: 5px;
165
+ padding: 3px 9px;
166
+ border-radius: 999px;
167
+ border: 1px solid var(--line);
168
+ background: var(--panel);
169
+ color: var(--muted);
170
+ cursor: pointer;
171
+ font-size: 12px;
172
+ user-select: none;
173
+ white-space: nowrap;
174
+ }
175
+ .chip[aria-pressed='true'] {
176
+ color: var(--fg);
177
+ border-color: currentColor;
178
+ }
179
+ .chip .dot {
180
+ width: 8px;
181
+ height: 8px;
182
+ border-radius: 50%;
183
+ background: var(--dot);
184
+ }
185
+ .chip .n {
186
+ color: var(--muted);
187
+ font-variant-numeric: tabular-nums;
188
+ }
189
+
190
+ #focus-note {
191
+ display: inline-flex;
192
+ align-items: center;
193
+ gap: 6px;
194
+ margin-left: auto;
195
+ font-size: 12px;
196
+ color: var(--fg);
197
+ background: var(--panel);
198
+ border: 1px solid var(--accent);
199
+ border-radius: 999px;
200
+ padding: 2px 4px 2px 10px;
201
+ }
202
+ #focus-note[hidden] {
203
+ display: none;
204
+ }
205
+ #focus-note span {
206
+ font-weight: 600;
207
+ }
208
+ #focus-clear {
209
+ border: 0;
210
+ background: none;
211
+ color: var(--muted);
212
+ cursor: pointer;
213
+ font: inherit;
214
+ padding: 0 5px;
215
+ }
216
+ #focus-clear:hover {
217
+ color: var(--fg);
218
+ }
219
+
220
+ main {
221
+ flex: 1;
222
+ display: flex;
223
+ min-height: 0;
224
+ }
225
+ #canvas {
226
+ flex: 1;
227
+ position: relative;
228
+ overflow: hidden;
229
+ }
230
+ #svg {
231
+ width: 100%;
232
+ height: 100%;
233
+ display: block;
234
+ cursor: grab;
235
+ touch-action: none;
236
+ }
237
+ #svg.grabbing {
238
+ cursor: grabbing;
239
+ }
240
+ #hint {
241
+ position: absolute;
242
+ left: 12px;
243
+ bottom: 10px;
244
+ color: var(--muted);
245
+ font-size: 11px;
246
+ pointer-events: none;
247
+ max-width: 70%;
248
+ }
249
+ #warnings {
250
+ position: absolute;
251
+ left: 12px;
252
+ top: 10px;
253
+ color: var(--server);
254
+ font-size: 11px;
255
+ pointer-events: none;
256
+ }
257
+
258
+ .col-title {
259
+ fill: var(--muted);
260
+ font-size: 11px;
261
+ font-weight: 600;
262
+ letter-spacing: 0.06em;
263
+ text-transform: uppercase;
264
+ }
265
+ .col-rule {
266
+ stroke: var(--line);
267
+ }
268
+ .group-title {
269
+ fill: var(--muted);
270
+ font-size: 10px;
271
+ font-weight: 600;
272
+ opacity: 0.85;
273
+ }
274
+
275
+ .node {
276
+ cursor: pointer;
277
+ }
278
+ .node rect {
279
+ fill: var(--panel);
280
+ stroke: var(--nc);
281
+ stroke-width: 1.5;
282
+ rx: 5;
283
+ }
284
+ .node text {
285
+ fill: var(--fg);
286
+ font-size: 12px;
287
+ dominant-baseline: middle;
288
+ pointer-events: none;
289
+ }
290
+ .node .tick {
291
+ fill: var(--nc);
292
+ }
293
+ .node .badge {
294
+ fill: var(--muted);
295
+ font-size: 10px;
296
+ text-anchor: end;
297
+ }
298
+ .node.dim {
299
+ opacity: 0.12;
300
+ }
301
+ .node.sel rect {
302
+ stroke-width: 2.5;
303
+ fill: var(--nc);
304
+ fill-opacity: 0.1;
305
+ }
306
+ .node.hover rect {
307
+ stroke-width: 2.5;
308
+ }
309
+ .node.hit rect {
310
+ stroke-dasharray: 3 2;
311
+ }
312
+
313
+ .link {
314
+ fill: none;
315
+ /* Tinted by the destination's kind (set per-path as --lc), faint, so the
316
+ mass of edges reads as structure — data vs render vs uses — not grey noise. */
317
+ stroke: var(--lc, var(--edge));
318
+ stroke-opacity: 0.28;
319
+ stroke-width: 1.1;
320
+ }
321
+ .link.dim {
322
+ opacity: 0.05;
323
+ }
324
+ .link.on {
325
+ stroke: var(--lc);
326
+ stroke-opacity: 0.9;
327
+ stroke-width: 2;
328
+ }
329
+
330
+ #panel {
331
+ flex: 0 0 320px;
332
+ border-left: 1px solid var(--line);
333
+ background: var(--panel);
334
+ overflow-y: auto;
335
+ padding: 14px;
336
+ }
337
+ #panel h2 {
338
+ margin: 0 0 2px;
339
+ font-size: 15px;
340
+ word-break: break-word;
341
+ }
342
+ #panel .kind {
343
+ color: var(--muted);
344
+ font-size: 12px;
345
+ margin-bottom: 12px;
346
+ }
347
+ #panel .file {
348
+ font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
349
+ font-size: 11px;
350
+ background: var(--bg);
351
+ border: 1px solid var(--line);
352
+ border-radius: 5px;
353
+ padding: 5px 7px;
354
+ margin-bottom: 10px;
355
+ word-break: break-all;
356
+ }
357
+ #panel .action {
358
+ font: inherit;
359
+ font-size: 12px;
360
+ width: 100%;
361
+ padding: 5px;
362
+ cursor: pointer;
363
+ border: 1px solid var(--line);
364
+ border-radius: 6px;
365
+ background: var(--bg);
366
+ color: var(--fg);
367
+ }
368
+ #panel .action:hover {
369
+ border-color: var(--accent);
370
+ color: var(--accent);
371
+ }
372
+ #panel h3 {
373
+ font-size: 11px;
374
+ text-transform: uppercase;
375
+ letter-spacing: 0.06em;
376
+ color: var(--muted);
377
+ margin: 14px 0 6px;
378
+ font-weight: 600;
379
+ }
380
+ #panel ul {
381
+ list-style: none;
382
+ margin: 0;
383
+ padding: 0;
384
+ }
385
+ #panel li {
386
+ padding: 2px 0;
387
+ }
388
+ #panel .ref {
389
+ background: none;
390
+ border: 0;
391
+ padding: 0;
392
+ font: inherit;
393
+ color: var(--fg);
394
+ cursor: pointer;
395
+ text-align: left;
396
+ border-bottom: 1px dashed var(--line);
397
+ }
398
+ #panel .ref:hover {
399
+ border-bottom-style: solid;
400
+ }
401
+ #panel .rel {
402
+ color: var(--muted);
403
+ font-size: 11px;
404
+ }
405
+ #panel .tags {
406
+ display: flex;
407
+ flex-wrap: wrap;
408
+ gap: 4px;
409
+ }
410
+ #panel .tag {
411
+ font-size: 11px;
412
+ padding: 1px 6px;
413
+ border-radius: 4px;
414
+ background: var(--bg);
415
+ border: 1px solid var(--line);
416
+ color: var(--muted);
417
+ }
418
+ #panel .warn {
419
+ color: var(--server);
420
+ font-size: 12px;
421
+ margin-top: 10px;
422
+ }
423
+ #panel .warn.sev-info {
424
+ color: var(--muted);
425
+ }
426
+
427
+ /* --- overview --- */
428
+ .stat-band {
429
+ display: grid;
430
+ grid-template-columns: repeat(2, 1fr);
431
+ gap: 1px;
432
+ background: var(--line);
433
+ border: 1px solid var(--line);
434
+ border-radius: 7px;
435
+ overflow: hidden;
436
+ margin: 12px 0 4px;
437
+ }
438
+ .stat-band div {
439
+ background: var(--panel);
440
+ padding: 8px 10px;
441
+ display: flex;
442
+ flex-direction: column;
443
+ }
444
+ .stat-band strong {
445
+ font-size: 17px;
446
+ font-variant-numeric: tabular-nums;
447
+ line-height: 1.2;
448
+ }
449
+ .stat-band span {
450
+ color: var(--muted);
451
+ font-size: 11px;
452
+ }
453
+
454
+ .bar {
455
+ display: flex;
456
+ height: 8px;
457
+ border-radius: 4px;
458
+ overflow: hidden;
459
+ gap: 1px;
460
+ margin-bottom: 8px;
461
+ }
462
+ .bar span {
463
+ min-width: 2px;
464
+ }
465
+
466
+ .legend-list li {
467
+ display: flex;
468
+ align-items: center;
469
+ gap: 7px;
470
+ }
471
+ .legend-list .dot {
472
+ width: 8px;
473
+ height: 8px;
474
+ border-radius: 50%;
475
+ flex: 0 0 auto;
476
+ }
477
+ .legend-list .rel {
478
+ margin-left: auto;
479
+ }
480
+ .edge-swatch {
481
+ width: 14px;
482
+ height: 0;
483
+ border-top: 1.5px solid var(--edge);
484
+ flex: 0 0 auto;
485
+ }
486
+
487
+ .findings {
488
+ display: flex;
489
+ flex-direction: column;
490
+ gap: 10px;
491
+ }
492
+ .findings li {
493
+ padding: 8px 9px;
494
+ border: 1px solid var(--line);
495
+ border-radius: 6px;
496
+ background: var(--bg);
497
+ }
498
+ .finding-head {
499
+ display: flex;
500
+ align-items: center;
501
+ gap: 6px;
502
+ font-weight: 600;
503
+ }
504
+ .finding-detail {
505
+ color: var(--muted);
506
+ font-size: 11.5px;
507
+ margin: 3px 0 6px;
508
+ }
509
+ .sev {
510
+ width: 7px;
511
+ height: 7px;
512
+ border-radius: 50%;
513
+ flex: 0 0 auto;
514
+ }
515
+ .sev-warn {
516
+ background: var(--server);
517
+ }
518
+ .sev-info {
519
+ background: var(--muted);
520
+ }
521
+
522
+ .rank li {
523
+ display: flex;
524
+ align-items: baseline;
525
+ gap: 8px;
526
+ }
527
+ .rank .rel {
528
+ margin-left: auto;
529
+ white-space: nowrap;
530
+ font-variant-numeric: tabular-nums;
531
+ }
532
+
533
+ #panel .tag-btn {
534
+ cursor: pointer;
535
+ font-family: inherit;
536
+ }
537
+ #panel .tag-btn:hover {
538
+ border-color: var(--accent);
539
+ color: var(--accent);
540
+ }
541
+ #panel .tag-dim {
542
+ opacity: 0.55;
543
+ }
544
+
545
+ @media (max-width: 860px) {
546
+ main {
547
+ flex-direction: column;
548
+ }
549
+ #panel {
550
+ flex: 0 0 40%;
551
+ border-left: 0;
552
+ border-top: 1px solid var(--line);
553
+ }
554
+ #tools {
555
+ margin-left: 0;
556
+ }
557
+ }
558
+
559
+ /* --- command palette (⌘K) --- */
560
+ #palette {
561
+ position: fixed;
562
+ inset: 0;
563
+ z-index: 60;
564
+ display: flex;
565
+ align-items: flex-start;
566
+ justify-content: center;
567
+ padding-top: 12vh;
568
+ background: color-mix(in srgb, var(--fg) 22%, transparent);
569
+ }
570
+ #palette[hidden] {
571
+ display: none;
572
+ }
573
+ .palette-box {
574
+ width: min(560px, 92vw);
575
+ background: var(--panel);
576
+ border: 1px solid var(--line);
577
+ border-radius: 12px;
578
+ box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
579
+ overflow: hidden;
580
+ }
581
+ .palette-box input {
582
+ width: 100%;
583
+ box-sizing: border-box;
584
+ border: 0;
585
+ border-bottom: 1px solid var(--line);
586
+ padding: 14px 16px;
587
+ font: inherit;
588
+ font-size: 15px;
589
+ background: transparent;
590
+ color: var(--fg);
591
+ outline: none;
592
+ }
593
+ .palette-box ul {
594
+ list-style: none;
595
+ margin: 0;
596
+ padding: 6px;
597
+ max-height: 52vh;
598
+ overflow-y: auto;
599
+ }
600
+ .palette-box li {
601
+ display: flex;
602
+ align-items: center;
603
+ gap: 10px;
604
+ padding: 8px 10px;
605
+ border-radius: 7px;
606
+ cursor: pointer;
607
+ }
608
+ .palette-box li.active {
609
+ background: color-mix(in srgb, var(--accent) 14%, transparent);
610
+ }
611
+ .palette-box .pdot {
612
+ width: 8px;
613
+ height: 8px;
614
+ border-radius: 50%;
615
+ flex: none;
616
+ }
617
+ .palette-box .plabel {
618
+ flex: 1;
619
+ font-size: 13.5px;
620
+ color: var(--fg);
621
+ white-space: nowrap;
622
+ overflow: hidden;
623
+ text-overflow: ellipsis;
624
+ }
625
+ .palette-box .pkind {
626
+ font-size: 11px;
627
+ color: var(--muted);
628
+ flex: none;
629
+ }
630
+
631
+ /* --- heat overlay (git churn) --- */
632
+ :root {
633
+ --hot: #d9542a;
634
+ }
635
+ @media (prefers-color-scheme: dark) {
636
+ :root {
637
+ --hot: #ff7a4d;
638
+ }
639
+ }
640
+ :root[data-theme='light'] {
641
+ --hot: #d9542a;
642
+ }
643
+ :root[data-theme='dark'] {
644
+ --hot: #ff7a4d;
645
+ }
646
+ #canvas.heat .node rect {
647
+ fill: color-mix(in srgb, var(--hot) calc(var(--heat, 0) * 82%), var(--panel));
648
+ }
649
+ #heat[aria-pressed='true'] {
650
+ background: color-mix(in srgb, var(--hot) 20%, var(--panel));
651
+ border-color: var(--hot);
652
+ color: var(--hot);
653
+ }
654
+
655
+ /* --- command-palette affordance --- */
656
+ #pal-hint {
657
+ font: inherit;
658
+ font-size: 11px;
659
+ color: var(--muted);
660
+ padding: 3px 7px;
661
+ border: 1px solid var(--line);
662
+ border-radius: 6px;
663
+ background: var(--panel);
664
+ cursor: pointer;
665
+ }
666
+ #pal-hint:hover {
667
+ border-color: var(--accent);
668
+ color: var(--accent);
669
+ }
Binary file