@warlock.js/grimoire 5.55.0 → 5.57.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/ui/grimoire.css CHANGED
@@ -1,59 +1,527 @@
1
- /* The Grimoire tab. Colours come from the dashboard's variables. */
1
+ /*
2
+ * The Grimoire tab. Colours come from the dashboard's panel tokens
3
+ * (--background, --foreground, --card, --muted-foreground, --brand, --success, ...).
4
+ * --muted and --accent are background surfaces, never text colours: text uses
5
+ * --foreground and --muted-foreground, links use --brand. Every class is scoped
6
+ * under .grimoire-root so nothing leaks into, or depends on, the dashboard.
7
+ */
8
+ .grimoire-root {
9
+ --gm-gap: 16px;
10
+ --gm-radius: var(--radius, 10px);
11
+ --gm-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
12
+ --gm-focus: 0 0 0 2px var(--background), 0 0 0 4px var(--ring);
13
+ display: grid;
14
+ gap: var(--gm-gap);
15
+ min-width: 0;
16
+ max-width: 100%;
17
+ color: var(--foreground);
18
+ line-height: 1.5;
19
+ }
20
+ .grimoire-root *,
21
+ .grimoire-root *::before,
22
+ .grimoire-root *::after {
23
+ box-sizing: border-box;
24
+ }
25
+ .grimoire-root a {
26
+ color: var(--brand);
27
+ text-underline-offset: 2px;
28
+ }
29
+ .grimoire-root a:hover {
30
+ text-decoration-thickness: 2px;
31
+ }
32
+ .grimoire-root a:focus-visible,
33
+ .grimoire-root button:focus-visible,
34
+ .grimoire-root input:focus-visible,
35
+ .grimoire-root select:focus-visible {
36
+ outline: 2px solid transparent;
37
+ box-shadow: var(--gm-focus);
38
+ }
39
+ .grimoire-root h2,
40
+ .grimoire-root h3,
41
+ .grimoire-root h4 {
42
+ margin: 0;
43
+ color: var(--foreground);
44
+ line-height: 1.25;
45
+ }
46
+ .grimoire-root h2 {
47
+ font-size: 22px;
48
+ }
49
+ .grimoire-root h3 {
50
+ font-size: 15px;
51
+ }
52
+ .grimoire-root h4 {
53
+ margin: 14px 0 6px;
54
+ font-size: 13px;
55
+ color: var(--muted-foreground);
56
+ }
57
+ .grimoire-root p {
58
+ margin: 0;
59
+ }
60
+ .grimoire-root .empty {
61
+ padding: 14px;
62
+ border: 1px dashed var(--border);
63
+ border-radius: var(--gm-radius);
64
+ color: var(--muted-foreground);
65
+ }
66
+ .grimoire-muted {
67
+ color: var(--muted-foreground);
68
+ }
69
+ .grimoire-mono {
70
+ font-family: var(--gm-mono);
71
+ font-size: 12.5px;
72
+ overflow-wrap: anywhere;
73
+ }
74
+
75
+ /* Header: tabs and search */
2
76
  .grimoire-header {
3
77
  display: grid;
4
- gap: 10px;
5
- margin-bottom: 16px;
78
+ gap: 12px;
6
79
  }
7
- .grimoire-nav {
80
+ .grimoire-tabs {
8
81
  display: flex;
9
- flex-wrap: wrap;
10
- gap: 14px;
82
+ gap: 4px;
83
+ padding: 4px;
84
+ overflow-x: auto;
85
+ border-radius: var(--gm-radius);
86
+ background: var(--muted);
11
87
  }
12
- .grimoire-nav a {
13
- color: var(--accent);
88
+ .grimoire-root .grimoire-tab {
89
+ display: inline-flex;
90
+ align-items: center;
91
+ gap: 6px;
92
+ flex: none;
93
+ min-height: 40px;
94
+ padding: 0 14px;
95
+ border-radius: calc(var(--gm-radius) - 3px);
96
+ color: var(--muted-foreground);
97
+ font-weight: 600;
14
98
  text-decoration: none;
99
+ }
100
+ .grimoire-root .grimoire-tab:hover {
101
+ color: var(--foreground);
102
+ }
103
+ .grimoire-root .grimoire-tab.is-active {
104
+ background: var(--card);
105
+ color: var(--foreground);
106
+ box-shadow: inset 0 -2px 0 var(--brand);
107
+ }
108
+ .grimoire-tab-count {
109
+ min-width: 20px;
110
+ padding: 0 6px;
111
+ border-radius: 999px;
112
+ border: 1px solid var(--border);
113
+ background: var(--card);
114
+ color: var(--muted-foreground);
115
+ font-size: 12px;
15
116
  font-weight: 600;
117
+ text-align: center;
16
118
  }
17
- .grimoire-search {
119
+ .grimoire-tab-count:empty {
120
+ display: none;
121
+ }
122
+ .grimoire-searchbox {
123
+ position: relative;
124
+ }
125
+ .grimoire-search,
126
+ .grimoire-filter-input,
127
+ .grimoire-sort {
18
128
  width: 100%;
19
- max-width: 640px;
20
- padding: 8px 10px;
21
- border: 1px solid var(--line);
22
- border-radius: 6px;
23
- background: var(--surface);
24
- color: var(--text);
129
+ min-height: 44px;
130
+ padding: 0 14px;
131
+ border: 1px solid var(--input);
132
+ border-radius: var(--gm-radius);
133
+ background: var(--card);
134
+ color: var(--foreground);
25
135
  font: inherit;
26
136
  }
137
+ .grimoire-search {
138
+ font-size: 15px;
139
+ }
140
+ .grimoire-search::placeholder,
141
+ .grimoire-filter-input::placeholder {
142
+ color: var(--muted-foreground);
143
+ opacity: 1;
144
+ }
27
145
  .grimoire-results:empty {
28
146
  display: none;
29
147
  }
30
148
  .grimoire-results {
31
- padding: 8px 12px;
32
- border: 1px solid var(--line);
33
- border-radius: 6px;
34
- background: var(--surface);
35
- max-width: 640px;
149
+ position: absolute;
150
+ z-index: 20;
151
+ top: calc(100% + 6px);
152
+ left: 0;
153
+ right: 0;
154
+ max-height: min(60vh, 460px);
155
+ overflow-y: auto;
156
+ padding: 6px;
157
+ border: 1px solid var(--border);
158
+ border-radius: var(--gm-radius);
159
+ background: var(--popover);
160
+ color: var(--popover-foreground);
161
+ box-shadow: 0 12px 32px color-mix(in srgb, var(--foreground) 18%, transparent);
162
+ }
163
+ .grimoire-hit-title {
164
+ padding: 8px 8px 4px;
165
+ color: var(--muted-foreground);
166
+ font-size: 12px;
167
+ font-weight: 600;
168
+ }
169
+ .grimoire-root .grimoire-hit {
170
+ display: flex;
171
+ flex-wrap: wrap;
172
+ align-items: center;
173
+ gap: 4px 10px;
174
+ min-height: 40px;
175
+ padding: 6px 8px;
176
+ border-radius: calc(var(--gm-radius) - 4px);
177
+ color: var(--popover-foreground);
178
+ text-decoration: none;
179
+ }
180
+ .grimoire-root .grimoire-hit:hover,
181
+ .grimoire-root .grimoire-hit.is-active {
182
+ background: var(--accent);
183
+ color: var(--accent-foreground);
184
+ }
185
+ .grimoire-root .grimoire-hit.is-plain {
186
+ color: var(--muted-foreground);
36
187
  }
37
- .grimoire-view h2 {
38
- margin: 0 0 6px;
188
+
189
+ /* Breadcrumbs and titles */
190
+ .grimoire-crumbs ol {
191
+ display: flex;
192
+ flex-wrap: wrap;
193
+ gap: 4px 0;
194
+ margin: 0;
195
+ padding: 0;
196
+ list-style: none;
197
+ color: var(--muted-foreground);
198
+ font-size: 13px;
199
+ }
200
+ .grimoire-crumbs li + li::before {
201
+ content: "\203A";
202
+ padding: 0 8px;
203
+ }
204
+ .grimoire-crumbs [aria-current] {
205
+ color: var(--foreground);
206
+ font-weight: 600;
207
+ overflow-wrap: anywhere;
208
+ }
209
+ .grimoire-view {
210
+ display: grid;
211
+ gap: var(--gm-gap);
212
+ min-width: 0;
213
+ }
214
+ .grimoire-heading {
215
+ display: grid;
216
+ gap: 8px;
217
+ }
218
+ .grimoire-heading h2 {
219
+ overflow-wrap: anywhere;
220
+ }
221
+ .grimoire-heading-meta {
222
+ display: flex;
223
+ flex-wrap: wrap;
224
+ align-items: center;
225
+ gap: 6px 12px;
226
+ }
227
+ .grimoire-lede {
228
+ max-width: 70ch;
229
+ font-size: 15px;
230
+ }
231
+
232
+ /* Pills: status words, severities, types. Tone text is AA on the background and card. */
233
+ .grimoire-pill {
234
+ --gm-tone: var(--muted-foreground);
235
+ display: inline-flex;
236
+ align-items: center;
237
+ padding: 0 8px;
238
+ border: 1px solid color-mix(in srgb, var(--gm-tone) 45%, transparent);
239
+ border-radius: 999px;
240
+ background: color-mix(in srgb, var(--gm-tone) 10%, transparent);
241
+ color: var(--gm-tone);
242
+ font-size: 12px;
243
+ font-weight: 600;
244
+ line-height: 20px;
245
+ white-space: nowrap;
246
+ }
247
+ .grimoire-pill.is-good {
248
+ --gm-tone: var(--success);
249
+ }
250
+ .grimoire-pill.is-info {
251
+ --gm-tone: var(--info);
252
+ }
253
+ .grimoire-pill.is-warn {
254
+ --gm-tone: var(--warning);
255
+ }
256
+ .grimoire-pill.is-bad {
257
+ --gm-tone: var(--destructive);
39
258
  }
40
- .grimoire-view h3,
41
- .grimoire-view h4 {
42
- margin: 12px 0 6px;
259
+
260
+ /* Cards and sections */
261
+ .grimoire-card {
262
+ display: grid;
263
+ align-content: start;
264
+ gap: 10px;
265
+ min-width: 0;
266
+ padding: 16px;
267
+ border: 1px solid var(--border);
268
+ border-radius: var(--gm-radius);
269
+ background: var(--card);
270
+ color: var(--card-foreground);
271
+ }
272
+ .grimoire-split {
273
+ display: grid;
274
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
275
+ gap: var(--gm-gap);
276
+ }
277
+ .grimoire-view-groups,
278
+ .grimoire-app-list {
279
+ display: grid;
280
+ gap: var(--gm-gap);
43
281
  }
44
- .grimoire-view a,
45
- .grimoire-results a {
46
- color: var(--accent);
282
+ .grimoire-note {
283
+ padding: 10px 14px;
284
+ border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent);
285
+ border-left-width: 4px;
286
+ border-radius: var(--gm-radius);
287
+ background: color-mix(in srgb, var(--warning) 8%, var(--card));
288
+ color: var(--foreground);
47
289
  }
48
- .grimoire-cards {
290
+
291
+ /* Overview stat cards */
292
+ .grimoire-stats {
49
293
  display: grid;
50
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
294
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
51
295
  gap: 12px;
52
- margin-bottom: 12px;
296
+ }
297
+ .grimoire-root .grimoire-stat {
298
+ --gm-tone: var(--border);
299
+ display: grid;
300
+ gap: 2px;
301
+ min-height: 44px;
302
+ padding: 14px 16px;
303
+ border: 1px solid var(--border);
304
+ border-left: 4px solid var(--gm-tone);
305
+ border-radius: var(--gm-radius);
306
+ background: var(--card);
307
+ color: var(--card-foreground);
308
+ text-decoration: none;
309
+ }
310
+ .grimoire-root .grimoire-stat:hover {
311
+ border-color: var(--brand);
312
+ border-left-color: var(--gm-tone);
313
+ }
314
+ .grimoire-stat.is-good {
315
+ --gm-tone: var(--success);
316
+ }
317
+ .grimoire-stat.is-warn {
318
+ --gm-tone: var(--warning);
319
+ }
320
+ .grimoire-stat.is-bad {
321
+ --gm-tone: var(--destructive);
322
+ }
323
+ .grimoire-stat-label {
324
+ color: var(--muted-foreground);
325
+ font-size: 13px;
326
+ font-weight: 600;
327
+ }
328
+ .grimoire-stat-value {
329
+ font-size: 28px;
330
+ font-weight: 700;
331
+ line-height: 1.15;
332
+ overflow-wrap: anywhere;
333
+ }
334
+ .grimoire-stat-sub {
335
+ color: var(--muted-foreground);
336
+ font-size: 13px;
337
+ }
338
+
339
+ /* Listings: toolbar, count, filters */
340
+ .grimoire-listing {
341
+ display: grid;
342
+ gap: 12px;
343
+ min-width: 0;
344
+ }
345
+ .grimoire-toolbar {
346
+ display: flex;
347
+ flex-wrap: wrap;
348
+ align-items: center;
349
+ gap: 8px;
350
+ }
351
+ .grimoire-toolbar .grimoire-filter-input {
352
+ flex: 1 1 240px;
353
+ width: auto;
354
+ }
355
+ .grimoire-toolbar .grimoire-sort {
356
+ flex: 0 0 auto;
357
+ width: auto;
358
+ }
359
+ .grimoire-filters {
360
+ display: flex;
361
+ flex-wrap: wrap;
362
+ gap: 6px;
363
+ }
364
+ .grimoire-root .grimoire-filter {
365
+ min-height: 44px;
366
+ padding: 0 14px;
367
+ border: 1px solid var(--input);
368
+ border-radius: 999px;
369
+ background: var(--card);
370
+ color: var(--foreground);
371
+ font: inherit;
372
+ font-size: 13px;
373
+ font-weight: 600;
374
+ cursor: pointer;
375
+ }
376
+ .grimoire-root .grimoire-filter:hover {
377
+ background: var(--accent);
378
+ color: var(--accent-foreground);
379
+ }
380
+ .grimoire-root .grimoire-filter[aria-pressed="true"] {
381
+ border-color: var(--brand);
382
+ background: var(--brand);
383
+ color: var(--brand-foreground);
384
+ }
385
+ .grimoire-listing-count {
386
+ color: var(--muted-foreground);
387
+ font-size: 13px;
388
+ }
389
+
390
+ /* Feature cards */
391
+ .grimoire-feature-grid {
392
+ display: grid;
393
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
394
+ gap: 12px;
395
+ }
396
+ .grimoire-feature {
397
+ --gm-tone: var(--border);
398
+ display: grid;
399
+ align-content: start;
400
+ gap: 8px;
401
+ min-width: 0;
402
+ padding: 14px 16px;
403
+ border: 1px solid var(--border);
404
+ border-left: 4px solid var(--gm-tone);
405
+ border-radius: var(--gm-radius);
406
+ background: var(--card);
407
+ color: var(--card-foreground);
408
+ }
409
+ .grimoire-feature.is-good {
410
+ --gm-tone: var(--success);
411
+ }
412
+ .grimoire-feature.is-info {
413
+ --gm-tone: var(--info);
414
+ }
415
+ .grimoire-feature.is-warn {
416
+ --gm-tone: var(--warning);
417
+ }
418
+ .grimoire-feature header {
419
+ display: flex;
420
+ align-items: flex-start;
421
+ justify-content: space-between;
422
+ gap: 8px;
423
+ }
424
+ .grimoire-feature h3 {
425
+ font-size: 16px;
426
+ overflow-wrap: anywhere;
427
+ }
428
+ .grimoire-feature-id {
429
+ color: var(--muted-foreground);
430
+ font-size: 13px;
431
+ }
432
+ .grimoire-feature-id .grimoire-mono {
433
+ margin-right: 6px;
434
+ color: var(--foreground);
435
+ }
436
+ .grimoire-clamp {
437
+ display: -webkit-box;
438
+ -webkit-line-clamp: 2;
439
+ -webkit-box-orient: vertical;
440
+ overflow: hidden;
441
+ }
442
+ .grimoire-feature-flows {
443
+ display: grid;
444
+ gap: 6px;
445
+ }
446
+
447
+ /* Apps */
448
+ .grimoire-app-head {
449
+ display: flex;
450
+ flex-wrap: wrap;
451
+ align-items: center;
452
+ gap: 8px 10px;
453
+ }
454
+ .grimoire-app-icon {
455
+ flex: none;
456
+ color: var(--brand);
457
+ }
458
+ .grimoire-group h4 {
459
+ margin: 8px 0 6px;
460
+ font-family: var(--gm-mono);
461
+ }
462
+
463
+ /* Chips, lists, facts, tables */
464
+ .grimoire-chips {
465
+ display: flex;
466
+ flex-wrap: wrap;
467
+ align-items: center;
468
+ gap: 6px;
469
+ min-width: 0;
470
+ }
471
+ .grimoire-root .grimoire-chip {
472
+ max-width: 100%;
473
+ padding: 1px 8px;
474
+ border-radius: 6px;
475
+ background: var(--secondary);
476
+ color: var(--secondary-foreground);
477
+ font-family: var(--gm-mono);
478
+ font-size: 12px;
479
+ overflow-wrap: anywhere;
480
+ text-decoration: none;
481
+ }
482
+ .grimoire-root .grimoire-chip:hover {
483
+ background: var(--accent);
484
+ color: var(--accent-foreground);
485
+ text-decoration: underline;
486
+ }
487
+ .grimoire-root .grimoire-more {
488
+ min-height: 28px;
489
+ padding: 0 10px;
490
+ border: 1px dashed var(--input);
491
+ border-radius: 6px;
492
+ background: transparent;
493
+ color: var(--brand);
494
+ font: inherit;
495
+ font-size: 12px;
496
+ font-weight: 600;
497
+ cursor: pointer;
53
498
  }
54
499
  .grimoire-list {
500
+ display: grid;
501
+ gap: 6px;
502
+ margin: 0;
503
+ padding: 0;
504
+ list-style: none;
505
+ }
506
+ .grimoire-list li {
507
+ overflow-wrap: anywhere;
508
+ }
509
+ .grimoire-facts {
510
+ display: grid;
511
+ grid-template-columns: max-content minmax(0, 1fr);
512
+ gap: 6px 16px;
513
+ margin: 0;
514
+ }
515
+ .grimoire-facts dt {
516
+ color: var(--muted-foreground);
517
+ }
518
+ .grimoire-facts dd {
55
519
  margin: 0;
56
- padding-left: 18px;
520
+ overflow-wrap: anywhere;
521
+ }
522
+ .grimoire-scroll {
523
+ max-width: 100%;
524
+ overflow-x: auto;
57
525
  }
58
526
  .grimoire-table {
59
527
  width: 100%;
@@ -61,28 +529,126 @@
61
529
  }
62
530
  .grimoire-table th,
63
531
  .grimoire-table td {
64
- padding: 6px 8px;
65
- border-bottom: 1px solid var(--line);
532
+ padding: 8px 10px;
533
+ border-bottom: 1px solid var(--border);
66
534
  text-align: left;
67
535
  vertical-align: top;
68
536
  }
69
- .grimoire-table td ul {
70
- margin: 0;
71
- padding-left: 16px;
537
+ .grimoire-table th {
538
+ color: var(--muted-foreground);
539
+ font-size: 12px;
540
+ font-weight: 600;
541
+ white-space: nowrap;
72
542
  }
73
- .grimoire-view .card {
74
- margin-bottom: 12px;
543
+ .grimoire-table tbody tr:hover {
544
+ background: var(--muted);
75
545
  }
76
- .grimoire-view .badge.good {
77
- color: var(--good);
546
+ .grimoire-table td .grimoire-list {
547
+ gap: 4px;
78
548
  }
79
- .grimoire-view .badge.bad {
80
- color: var(--bad);
549
+
550
+ /* Check findings */
551
+ .grimoire-findings {
552
+ display: grid;
553
+ gap: 10px;
554
+ margin: 0;
555
+ padding: 0;
556
+ list-style: none;
81
557
  }
82
- .grimoire-view .muted {
83
- color: var(--muted);
558
+ .grimoire-finding {
559
+ display: grid;
560
+ gap: 4px;
561
+ padding: 10px 12px;
562
+ border: 1px solid var(--border);
563
+ border-radius: calc(var(--gm-radius) - 2px);
564
+ background: var(--background);
84
565
  }
566
+ .grimoire-finding-head {
567
+ display: flex;
568
+ flex-wrap: wrap;
569
+ align-items: center;
570
+ gap: 8px;
571
+ }
572
+ .grimoire-finding-message {
573
+ overflow-wrap: anywhere;
574
+ }
575
+
576
+ /* Graphs */
85
577
  .grimoire-svg {
86
578
  width: 100%;
579
+ height: auto;
87
580
  max-height: 460px;
88
581
  }
582
+
583
+ /* Loading and errors */
584
+ .grimoire-skeleton {
585
+ display: grid;
586
+ gap: 10px;
587
+ }
588
+ .grimoire-skeleton-title {
589
+ font-size: 16px;
590
+ font-weight: 600;
591
+ }
592
+ .grimoire-skeleton-grid {
593
+ display: grid;
594
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
595
+ gap: 12px;
596
+ margin-top: 6px;
597
+ }
598
+ .grimoire-skeleton-block {
599
+ height: 84px;
600
+ border-radius: var(--gm-radius);
601
+ background: linear-gradient(90deg, var(--muted) 0%, var(--accent) 50%, var(--muted) 100%);
602
+ background-size: 200% 100%;
603
+ animation: grimoire-shimmer 1.4s ease-in-out infinite;
604
+ }
605
+ @keyframes grimoire-shimmer {
606
+ from {
607
+ background-position: 100% 0;
608
+ }
609
+ to {
610
+ background-position: -100% 0;
611
+ }
612
+ }
613
+ .grimoire-error {
614
+ display: grid;
615
+ gap: 8px;
616
+ padding: 14px 16px;
617
+ border: 1px solid color-mix(in srgb, var(--destructive) 45%, transparent);
618
+ border-left-width: 4px;
619
+ border-radius: var(--gm-radius);
620
+ background: var(--card);
621
+ }
622
+ .grimoire-error-title {
623
+ color: var(--destructive);
624
+ font-weight: 600;
625
+ overflow-wrap: anywhere;
626
+ }
627
+
628
+ /* Small screens and touch */
629
+ @media (max-width: 640px) {
630
+ .grimoire-facts {
631
+ grid-template-columns: minmax(0, 1fr);
632
+ gap: 0;
633
+ }
634
+ .grimoire-facts dd {
635
+ margin-bottom: 8px;
636
+ }
637
+ .grimoire-root h2 {
638
+ font-size: 19px;
639
+ }
640
+ }
641
+ @media (pointer: coarse) {
642
+ .grimoire-root .grimoire-tab,
643
+ .grimoire-root .grimoire-hit {
644
+ min-height: 44px;
645
+ }
646
+ .grimoire-root .grimoire-more {
647
+ min-height: 44px;
648
+ }
649
+ }
650
+ @media (prefers-reduced-motion: reduce) {
651
+ .grimoire-skeleton-block {
652
+ animation: none;
653
+ }
654
+ }