@warlock.js/grimoire 5.56.0 → 5.58.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 (105) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/esm/book/build.d.mts.map +1 -1
  3. package/esm/book/build.mjs +2 -1
  4. package/esm/book/build.mjs.map +1 -1
  5. package/esm/book/render.mjs +10 -0
  6. package/esm/book/render.mjs.map +1 -1
  7. package/esm/bookmap/build.d.mts.map +1 -1
  8. package/esm/bookmap/build.mjs +2 -2
  9. package/esm/bookmap/build.mjs.map +1 -1
  10. package/esm/bookmap/steps.mjs +53 -38
  11. package/esm/bookmap/steps.mjs.map +1 -1
  12. package/esm/check/check-grimoire.d.mts.map +1 -1
  13. package/esm/check/check-grimoire.mjs +4 -1
  14. package/esm/check/check-grimoire.mjs.map +1 -1
  15. package/esm/check/rules/criteria.mjs +21 -2
  16. package/esm/check/rules/criteria.mjs.map +1 -1
  17. package/esm/check/rules/screenshots.mjs +57 -0
  18. package/esm/check/rules/screenshots.mjs.map +1 -0
  19. package/esm/codes/codes.d.mts +12 -0
  20. package/esm/codes/codes.d.mts.map +1 -1
  21. package/esm/codes/codes.mjs +6 -0
  22. package/esm/codes/codes.mjs.map +1 -1
  23. package/esm/contracts/adapter.d.mts +6 -0
  24. package/esm/contracts/adapter.d.mts.map +1 -1
  25. package/esm/contracts/book.d.mts +2 -0
  26. package/esm/contracts/book.d.mts.map +1 -1
  27. package/esm/contracts/book.mjs.map +1 -1
  28. package/esm/contracts/bookmap.d.mts +19 -1
  29. package/esm/contracts/bookmap.d.mts.map +1 -1
  30. package/esm/contracts/snapshot.d.mts +11 -0
  31. package/esm/contracts/snapshot.d.mts.map +1 -1
  32. package/esm/contracts/test-results.d.mts +34 -0
  33. package/esm/contracts/test-results.d.mts.map +1 -1
  34. package/esm/contracts/written.d.mts +44 -0
  35. package/esm/contracts/written.d.mts.map +1 -1
  36. package/esm/contracts/written.mjs.map +1 -1
  37. package/esm/devtools/data.mjs +126 -4
  38. package/esm/devtools/data.mjs.map +1 -1
  39. package/esm/devtools/index.d.mts +31 -1
  40. package/esm/devtools/index.d.mts.map +1 -1
  41. package/esm/devtools/index.mjs +94 -5
  42. package/esm/devtools/index.mjs.map +1 -1
  43. package/esm/devtools/product-map.d.mts +14 -0
  44. package/esm/devtools/product-map.d.mts.map +1 -0
  45. package/esm/devtools/product-map.mjs +385 -0
  46. package/esm/devtools/product-map.mjs.map +1 -0
  47. package/esm/devtools/site.d.mts.map +1 -1
  48. package/esm/devtools/site.mjs +97 -21
  49. package/esm/devtools/site.mjs.map +1 -1
  50. package/esm/devtools/snapshot-source.mjs +71 -22
  51. package/esm/devtools/snapshot-source.mjs.map +1 -1
  52. package/esm/graph/index.d.mts +10 -1
  53. package/esm/graph/index.d.mts.map +1 -1
  54. package/esm/graph/index.mjs +3 -2
  55. package/esm/graph/index.mjs.map +1 -1
  56. package/esm/index.d.mts +4 -4
  57. package/esm/paths/index.d.mts +2 -0
  58. package/esm/paths/index.d.mts.map +1 -1
  59. package/esm/paths/index.mjs +3 -1
  60. package/esm/paths/index.mjs.map +1 -1
  61. package/esm/scry/compact.mjs +169 -0
  62. package/esm/scry/compact.mjs.map +1 -0
  63. package/esm/scry/format.d.mts.map +1 -1
  64. package/esm/scry/format.mjs +7 -1
  65. package/esm/scry/format.mjs.map +1 -1
  66. package/esm/scry/query.d.mts.map +1 -1
  67. package/esm/scry/query.mjs +12 -1
  68. package/esm/scry/query.mjs.map +1 -1
  69. package/esm/test-results/index.d.mts +7 -2
  70. package/esm/test-results/index.d.mts.map +1 -1
  71. package/esm/test-results/index.mjs +79 -12
  72. package/esm/test-results/index.mjs.map +1 -1
  73. package/esm/vitest/index.d.mts +6 -0
  74. package/esm/vitest/index.d.mts.map +1 -1
  75. package/esm/vitest/index.mjs +22 -6
  76. package/esm/vitest/index.mjs.map +1 -1
  77. package/esm/warlock/adapter.d.mts.map +1 -1
  78. package/esm/warlock/adapter.mjs +6 -2
  79. package/esm/warlock/adapter.mjs.map +1 -1
  80. package/esm/warlock/mcp-tools.mjs +48 -12
  81. package/esm/warlock/mcp-tools.mjs.map +1 -1
  82. package/esm/workspace/index.d.mts.map +1 -1
  83. package/esm/workspace/index.mjs +4 -2
  84. package/esm/workspace/index.mjs.map +1 -1
  85. package/esm/written/apps.mjs +4 -2
  86. package/esm/written/apps.mjs.map +1 -1
  87. package/esm/written/features.mjs +119 -6
  88. package/esm/written/features.mjs.map +1 -1
  89. package/esm/written/markdown.mjs +66 -1
  90. package/esm/written/markdown.mjs.map +1 -1
  91. package/esm/written/parse-grimoire.d.mts.map +1 -1
  92. package/esm/written/parse-grimoire.mjs +1 -1
  93. package/esm/written/parse-grimoire.mjs.map +1 -1
  94. package/llms-full.txt +77 -2
  95. package/package.json +3 -3
  96. package/skills/backfill-a-grimoire/SKILL.md +5 -0
  97. package/skills/describe-an-app/SKILL.md +12 -0
  98. package/skills/record-a-change/SKILL.md +8 -0
  99. package/skills/use-the-grimoire/SKILL.md +15 -0
  100. package/skills/write-a-feature/SKILL.md +37 -2
  101. package/ui/grimoire-static.js +4 -0
  102. package/ui/grimoire-view.js +2283 -428
  103. package/ui/grimoire.css +1036 -45
  104. package/ui/product-map.css +636 -0
  105. package/ui/product-map.js +817 -0
package/ui/grimoire.css CHANGED
@@ -1,59 +1,562 @@
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
+ grid-template-columns: minmax(0, 1fr);
15
+ gap: var(--gm-gap);
16
+ min-width: 0;
17
+ max-width: 100%;
18
+ color: var(--foreground);
19
+ line-height: 1.5;
20
+ }
21
+ .grimoire-root *,
22
+ .grimoire-root *::before,
23
+ .grimoire-root *::after {
24
+ box-sizing: border-box;
25
+ }
26
+ .grimoire-root a {
27
+ color: var(--brand);
28
+ text-underline-offset: 2px;
29
+ }
30
+ .grimoire-root a:hover {
31
+ text-decoration-thickness: 2px;
32
+ }
33
+ .grimoire-root a:focus-visible,
34
+ .grimoire-root button:focus-visible,
35
+ .grimoire-root input:focus-visible,
36
+ .grimoire-root select:focus-visible {
37
+ outline: 2px solid transparent;
38
+ box-shadow: var(--gm-focus);
39
+ }
40
+ .grimoire-root h2,
41
+ .grimoire-root h3,
42
+ .grimoire-root h4 {
43
+ margin: 0;
44
+ color: var(--foreground);
45
+ line-height: 1.25;
46
+ }
47
+ .grimoire-root h2 {
48
+ font-size: 22px;
49
+ }
50
+ .grimoire-root h3 {
51
+ font-size: 15px;
52
+ }
53
+ .grimoire-root h4 {
54
+ margin: 14px 0 6px;
55
+ font-size: 13px;
56
+ color: var(--muted-foreground);
57
+ }
58
+ .grimoire-root p {
59
+ margin: 0;
60
+ }
61
+ .grimoire-root .empty {
62
+ padding: 14px;
63
+ border: 1px dashed var(--border);
64
+ border-radius: var(--gm-radius);
65
+ color: var(--muted-foreground);
66
+ }
67
+ .grimoire-muted {
68
+ color: var(--muted-foreground);
69
+ }
70
+ .grimoire-mono {
71
+ font-family: var(--gm-mono);
72
+ font-size: 12.5px;
73
+ overflow-wrap: anywhere;
74
+ }
75
+
76
+ /* Header: tabs and search */
2
77
  .grimoire-header {
3
78
  display: grid;
4
- gap: 10px;
5
- margin-bottom: 16px;
79
+ grid-template-columns: minmax(0, 1fr);
80
+ gap: 12px;
81
+ min-width: 0;
6
82
  }
7
- .grimoire-nav {
83
+ .grimoire-tabs {
8
84
  display: flex;
9
- flex-wrap: wrap;
10
- gap: 14px;
85
+ gap: 4px;
86
+ padding: 4px;
87
+ overflow-x: auto;
88
+ overscroll-behavior-x: contain;
89
+ scroll-snap-type: x proximity;
90
+ scrollbar-width: thin;
91
+ border-radius: var(--gm-radius);
92
+ /* Scroll shadows: an edge darkens while more tabs sit past it (the "local" covers hide it at the ends). */
93
+ background-color: var(--muted);
94
+ background-image:
95
+ linear-gradient(to right, var(--muted) 40%, transparent),
96
+ linear-gradient(to left, var(--muted) 40%, transparent),
97
+ radial-gradient(
98
+ farthest-side at 0 50%,
99
+ color-mix(in srgb, var(--foreground) 28%, transparent),
100
+ transparent
101
+ ),
102
+ radial-gradient(
103
+ farthest-side at 100% 50%,
104
+ color-mix(in srgb, var(--foreground) 28%, transparent),
105
+ transparent
106
+ );
107
+ background-position:
108
+ left center,
109
+ right center,
110
+ left center,
111
+ right center;
112
+ background-size:
113
+ 32px 100%,
114
+ 32px 100%,
115
+ 14px 100%,
116
+ 14px 100%;
117
+ background-repeat: no-repeat;
118
+ background-attachment: local, local, scroll, scroll;
11
119
  }
12
- .grimoire-nav a {
13
- color: var(--accent);
120
+ .grimoire-root .grimoire-tab {
121
+ display: inline-flex;
122
+ align-items: center;
123
+ gap: 6px;
124
+ flex: none;
125
+ scroll-snap-align: center;
126
+ min-height: 40px;
127
+ padding: 0 14px;
128
+ white-space: nowrap;
129
+ border-radius: calc(var(--gm-radius) - 3px);
130
+ color: var(--muted-foreground);
131
+ font-weight: 600;
14
132
  text-decoration: none;
133
+ }
134
+ .grimoire-root .grimoire-tab:hover {
135
+ color: var(--foreground);
136
+ }
137
+ .grimoire-root .grimoire-tab.is-active {
138
+ background: var(--card);
139
+ color: var(--foreground);
140
+ box-shadow: inset 0 -2px 0 var(--brand);
141
+ }
142
+ .grimoire-tab-count {
143
+ min-width: 20px;
144
+ padding: 0 6px;
145
+ border-radius: 999px;
146
+ border: 1px solid var(--border);
147
+ background: var(--card);
148
+ color: var(--muted-foreground);
149
+ font-size: 12px;
15
150
  font-weight: 600;
151
+ text-align: center;
16
152
  }
17
- .grimoire-search {
153
+ .grimoire-tab-count:empty {
154
+ display: none;
155
+ }
156
+ .grimoire-searchbox {
157
+ position: relative;
158
+ }
159
+ .grimoire-search,
160
+ .grimoire-filter-input,
161
+ .grimoire-sort {
18
162
  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);
163
+ min-height: 44px;
164
+ padding: 0 14px;
165
+ border: 1px solid var(--input);
166
+ border-radius: var(--gm-radius);
167
+ background: var(--card);
168
+ color: var(--foreground);
25
169
  font: inherit;
26
170
  }
171
+ .grimoire-search {
172
+ font-size: 15px;
173
+ }
174
+ .grimoire-search::placeholder,
175
+ .grimoire-filter-input::placeholder {
176
+ color: var(--muted-foreground);
177
+ opacity: 1;
178
+ }
27
179
  .grimoire-results:empty {
28
180
  display: none;
29
181
  }
30
182
  .grimoire-results {
31
- padding: 8px 12px;
32
- border: 1px solid var(--line);
33
- border-radius: 6px;
34
- background: var(--surface);
35
- max-width: 640px;
183
+ position: absolute;
184
+ z-index: 20;
185
+ top: calc(100% + 6px);
186
+ left: 0;
187
+ right: 0;
188
+ max-height: min(60vh, 460px);
189
+ overflow-y: auto;
190
+ padding: 6px;
191
+ border: 1px solid var(--border);
192
+ border-radius: var(--gm-radius);
193
+ background: var(--popover);
194
+ color: var(--popover-foreground);
195
+ box-shadow: 0 12px 32px color-mix(in srgb, var(--foreground) 18%, transparent);
36
196
  }
37
- .grimoire-view h2 {
38
- margin: 0 0 6px;
197
+ .grimoire-hit-title {
198
+ padding: 8px 8px 4px;
199
+ color: var(--muted-foreground);
200
+ font-size: 12px;
201
+ font-weight: 600;
202
+ }
203
+ .grimoire-root .grimoire-hit {
204
+ display: flex;
205
+ flex-wrap: wrap;
206
+ align-items: center;
207
+ gap: 4px 10px;
208
+ min-height: 40px;
209
+ padding: 6px 8px;
210
+ border-radius: calc(var(--gm-radius) - 4px);
211
+ color: var(--popover-foreground);
212
+ text-decoration: none;
213
+ }
214
+ .grimoire-root .grimoire-hit:hover,
215
+ .grimoire-root .grimoire-hit.is-active {
216
+ background: var(--accent);
217
+ color: var(--accent-foreground);
218
+ }
219
+ .grimoire-root .grimoire-hit.is-plain {
220
+ color: var(--muted-foreground);
221
+ }
222
+
223
+ /* Breadcrumbs and titles */
224
+ .grimoire-crumbs ol {
225
+ display: flex;
226
+ flex-wrap: wrap;
227
+ gap: 4px 0;
228
+ margin: 0;
229
+ padding: 0;
230
+ list-style: none;
231
+ color: var(--muted-foreground);
232
+ font-size: 13px;
233
+ }
234
+ .grimoire-crumbs li + li::before {
235
+ content: "\203A";
236
+ padding: 0 8px;
237
+ }
238
+ .grimoire-crumbs [aria-current] {
239
+ color: var(--foreground);
240
+ font-weight: 600;
241
+ overflow-wrap: anywhere;
242
+ }
243
+ .grimoire-view {
244
+ display: grid;
245
+ grid-template-columns: minmax(0, 1fr);
246
+ gap: var(--gm-gap);
247
+ min-width: 0;
248
+ }
249
+ .grimoire-heading {
250
+ display: grid;
251
+ gap: 8px;
252
+ }
253
+ .grimoire-heading h2 {
254
+ overflow-wrap: anywhere;
255
+ }
256
+ .grimoire-heading-meta {
257
+ display: flex;
258
+ flex-wrap: wrap;
259
+ align-items: center;
260
+ gap: 6px 12px;
261
+ }
262
+ .grimoire-lede {
263
+ max-width: 70ch;
264
+ font-size: 15px;
39
265
  }
40
- .grimoire-view h3,
41
- .grimoire-view h4 {
42
- margin: 12px 0 6px;
266
+
267
+ /* Pills: status words, severities, types. Tone text is AA on the background and card. */
268
+ .grimoire-pill {
269
+ --gm-tone: var(--muted-foreground);
270
+ display: inline-flex;
271
+ align-items: center;
272
+ padding: 0 8px;
273
+ border: 1px solid color-mix(in srgb, var(--gm-tone) 45%, transparent);
274
+ border-radius: 999px;
275
+ background: color-mix(in srgb, var(--gm-tone) 10%, transparent);
276
+ color: var(--gm-tone);
277
+ font-size: 12px;
278
+ font-weight: 600;
279
+ line-height: 20px;
280
+ white-space: nowrap;
281
+ }
282
+ .grimoire-pill.is-good {
283
+ --gm-tone: var(--success);
284
+ }
285
+ .grimoire-pill.is-info {
286
+ --gm-tone: var(--info);
287
+ }
288
+ .grimoire-pill.is-warn {
289
+ --gm-tone: var(--warning);
43
290
  }
44
- .grimoire-view a,
45
- .grimoire-results a {
46
- color: var(--accent);
291
+ .grimoire-pill.is-bad {
292
+ --gm-tone: var(--destructive);
47
293
  }
48
- .grimoire-cards {
294
+
295
+ /* Cards and sections */
296
+ .grimoire-card {
49
297
  display: grid;
50
- grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
298
+ align-content: start;
299
+ gap: 10px;
300
+ min-width: 0;
301
+ padding: 16px;
302
+ border: 1px solid var(--border);
303
+ border-radius: var(--gm-radius);
304
+ background: var(--card);
305
+ color: var(--card-foreground);
306
+ }
307
+ .grimoire-split {
308
+ display: grid;
309
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
310
+ gap: var(--gm-gap);
311
+ }
312
+ .grimoire-view-groups,
313
+ .grimoire-app-list {
314
+ display: grid;
315
+ gap: var(--gm-gap);
316
+ }
317
+ .grimoire-note {
318
+ padding: 10px 14px;
319
+ border: 1px solid color-mix(in srgb, var(--warning) 45%, transparent);
320
+ border-left-width: 4px;
321
+ border-radius: var(--gm-radius);
322
+ background: color-mix(in srgb, var(--warning) 8%, var(--card));
323
+ color: var(--foreground);
324
+ }
325
+
326
+ /* Overview stat cards */
327
+ .grimoire-stats {
328
+ display: grid;
329
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
330
+ gap: 12px;
331
+ }
332
+ .grimoire-root .grimoire-stat {
333
+ --gm-tone: var(--border);
334
+ display: grid;
335
+ gap: 2px;
336
+ min-height: 44px;
337
+ padding: 14px 16px;
338
+ border: 1px solid var(--border);
339
+ border-left: 4px solid var(--gm-tone);
340
+ border-radius: var(--gm-radius);
341
+ background: var(--card);
342
+ color: var(--card-foreground);
343
+ text-decoration: none;
344
+ }
345
+ .grimoire-root .grimoire-stat:hover {
346
+ border-color: var(--brand);
347
+ border-left-color: var(--gm-tone);
348
+ }
349
+ .grimoire-stat.is-good {
350
+ --gm-tone: var(--success);
351
+ }
352
+ .grimoire-stat.is-warn {
353
+ --gm-tone: var(--warning);
354
+ }
355
+ .grimoire-stat.is-bad {
356
+ --gm-tone: var(--destructive);
357
+ }
358
+ .grimoire-stat-label {
359
+ color: var(--muted-foreground);
360
+ font-size: 13px;
361
+ font-weight: 600;
362
+ }
363
+ .grimoire-stat-value {
364
+ font-size: 28px;
365
+ font-weight: 700;
366
+ line-height: 1.15;
367
+ overflow-wrap: anywhere;
368
+ }
369
+ .grimoire-stat-sub {
370
+ color: var(--muted-foreground);
371
+ font-size: 13px;
372
+ }
373
+
374
+ /* Listings: toolbar, count, filters */
375
+ .grimoire-listing {
376
+ display: grid;
377
+ gap: 12px;
378
+ min-width: 0;
379
+ }
380
+ .grimoire-toolbar {
381
+ display: flex;
382
+ flex-wrap: wrap;
383
+ align-items: center;
384
+ gap: 8px;
385
+ }
386
+ .grimoire-toolbar .grimoire-filter-input {
387
+ flex: 1 1 240px;
388
+ width: auto;
389
+ }
390
+ .grimoire-toolbar .grimoire-sort {
391
+ flex: 0 0 auto;
392
+ width: auto;
393
+ }
394
+ .grimoire-filters {
395
+ display: flex;
396
+ flex-wrap: wrap;
397
+ gap: 6px;
398
+ }
399
+ .grimoire-root .grimoire-filter {
400
+ min-height: 44px;
401
+ padding: 0 14px;
402
+ border: 1px solid var(--input);
403
+ border-radius: 999px;
404
+ background: var(--card);
405
+ color: var(--foreground);
406
+ font: inherit;
407
+ font-size: 13px;
408
+ font-weight: 600;
409
+ cursor: pointer;
410
+ }
411
+ .grimoire-root .grimoire-filter:hover {
412
+ background: var(--accent);
413
+ color: var(--accent-foreground);
414
+ }
415
+ .grimoire-root .grimoire-filter[aria-pressed="true"] {
416
+ border-color: var(--brand);
417
+ background: var(--brand);
418
+ color: var(--brand-foreground);
419
+ }
420
+ .grimoire-listing-count {
421
+ color: var(--muted-foreground);
422
+ font-size: 13px;
423
+ }
424
+
425
+ /* Feature cards */
426
+ .grimoire-feature-grid {
427
+ display: grid;
428
+ grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
51
429
  gap: 12px;
52
- margin-bottom: 12px;
430
+ }
431
+ .grimoire-feature {
432
+ --gm-tone: var(--border);
433
+ display: grid;
434
+ align-content: start;
435
+ gap: 8px;
436
+ min-width: 0;
437
+ padding: 14px 16px;
438
+ border: 1px solid var(--border);
439
+ border-left: 4px solid var(--gm-tone);
440
+ border-radius: var(--gm-radius);
441
+ background: var(--card);
442
+ color: var(--card-foreground);
443
+ }
444
+ .grimoire-feature.is-good {
445
+ --gm-tone: var(--success);
446
+ }
447
+ .grimoire-feature.is-info {
448
+ --gm-tone: var(--info);
449
+ }
450
+ .grimoire-feature.is-warn {
451
+ --gm-tone: var(--warning);
452
+ }
453
+ .grimoire-feature header {
454
+ display: flex;
455
+ align-items: flex-start;
456
+ justify-content: space-between;
457
+ gap: 8px;
458
+ }
459
+ .grimoire-feature h3 {
460
+ font-size: 16px;
461
+ overflow-wrap: anywhere;
462
+ }
463
+ .grimoire-feature-id {
464
+ color: var(--muted-foreground);
465
+ font-size: 13px;
466
+ }
467
+ .grimoire-feature-id .grimoire-mono {
468
+ margin-right: 6px;
469
+ color: var(--foreground);
470
+ }
471
+ .grimoire-clamp {
472
+ display: -webkit-box;
473
+ -webkit-line-clamp: 2;
474
+ -webkit-box-orient: vertical;
475
+ overflow: hidden;
476
+ }
477
+ .grimoire-feature-flows {
478
+ display: grid;
479
+ gap: 6px;
480
+ }
481
+
482
+ /* Apps */
483
+ .grimoire-app-head {
484
+ display: flex;
485
+ flex-wrap: wrap;
486
+ align-items: center;
487
+ gap: 8px 10px;
488
+ }
489
+ .grimoire-app-icon {
490
+ flex: none;
491
+ color: var(--brand);
492
+ }
493
+ .grimoire-group h4 {
494
+ margin: 8px 0 6px;
495
+ font-family: var(--gm-mono);
496
+ }
497
+
498
+ /* Chips, lists, facts, tables */
499
+ .grimoire-chips {
500
+ display: flex;
501
+ flex-wrap: wrap;
502
+ align-items: center;
503
+ gap: 6px;
504
+ min-width: 0;
505
+ }
506
+ .grimoire-root .grimoire-chip {
507
+ max-width: 100%;
508
+ padding: 1px 8px;
509
+ border-radius: 6px;
510
+ background: var(--secondary);
511
+ color: var(--secondary-foreground);
512
+ font-family: var(--gm-mono);
513
+ font-size: 12px;
514
+ overflow-wrap: anywhere;
515
+ text-decoration: none;
516
+ }
517
+ .grimoire-root .grimoire-chip:hover {
518
+ background: var(--accent);
519
+ color: var(--accent-foreground);
520
+ text-decoration: underline;
521
+ }
522
+ .grimoire-root .grimoire-more {
523
+ min-height: 28px;
524
+ padding: 0 10px;
525
+ border: 1px dashed var(--input);
526
+ border-radius: 6px;
527
+ background: transparent;
528
+ color: var(--brand);
529
+ font: inherit;
530
+ font-size: 12px;
531
+ font-weight: 600;
532
+ cursor: pointer;
53
533
  }
54
534
  .grimoire-list {
535
+ display: grid;
536
+ gap: 6px;
537
+ margin: 0;
538
+ padding: 0;
539
+ list-style: none;
540
+ }
541
+ .grimoire-list li {
542
+ overflow-wrap: anywhere;
543
+ }
544
+ .grimoire-facts {
545
+ display: grid;
546
+ grid-template-columns: max-content minmax(0, 1fr);
547
+ gap: 6px 16px;
55
548
  margin: 0;
56
- padding-left: 18px;
549
+ }
550
+ .grimoire-facts dt {
551
+ color: var(--muted-foreground);
552
+ }
553
+ .grimoire-facts dd {
554
+ margin: 0;
555
+ overflow-wrap: anywhere;
556
+ }
557
+ .grimoire-scroll {
558
+ max-width: 100%;
559
+ overflow-x: auto;
57
560
  }
58
561
  .grimoire-table {
59
562
  width: 100%;
@@ -61,28 +564,516 @@
61
564
  }
62
565
  .grimoire-table th,
63
566
  .grimoire-table td {
64
- padding: 6px 8px;
65
- border-bottom: 1px solid var(--line);
567
+ padding: 8px 10px;
568
+ border-bottom: 1px solid var(--border);
66
569
  text-align: left;
67
570
  vertical-align: top;
68
571
  }
69
- .grimoire-table td ul {
70
- margin: 0;
71
- padding-left: 16px;
572
+ .grimoire-table th {
573
+ color: var(--muted-foreground);
574
+ font-size: 12px;
575
+ font-weight: 600;
576
+ white-space: nowrap;
72
577
  }
73
- .grimoire-view .card {
74
- margin-bottom: 12px;
578
+ .grimoire-table tbody tr:hover {
579
+ background: var(--muted);
75
580
  }
76
- .grimoire-view .badge.good {
77
- color: var(--good);
581
+ .grimoire-table td .grimoire-list {
582
+ gap: 4px;
78
583
  }
79
- .grimoire-view .badge.bad {
80
- color: var(--bad);
584
+
585
+ /* Check findings */
586
+ .grimoire-findings {
587
+ display: grid;
588
+ gap: 10px;
589
+ margin: 0;
590
+ padding: 0;
591
+ list-style: none;
81
592
  }
82
- .grimoire-view .muted {
83
- color: var(--muted);
593
+ .grimoire-finding {
594
+ display: grid;
595
+ gap: 4px;
596
+ padding: 10px 12px;
597
+ border: 1px solid var(--border);
598
+ border-radius: calc(var(--gm-radius) - 2px);
599
+ background: var(--background);
84
600
  }
601
+ .grimoire-finding-head {
602
+ display: flex;
603
+ flex-wrap: wrap;
604
+ align-items: center;
605
+ gap: 8px;
606
+ }
607
+ .grimoire-finding-message {
608
+ overflow-wrap: anywhere;
609
+ }
610
+
611
+ /* Graphs */
85
612
  .grimoire-svg {
86
613
  width: 100%;
614
+ height: auto;
87
615
  max-height: 460px;
88
616
  }
617
+
618
+ /* Loading and errors */
619
+ .grimoire-skeleton {
620
+ display: grid;
621
+ gap: 10px;
622
+ }
623
+ .grimoire-skeleton-title {
624
+ font-size: 16px;
625
+ font-weight: 600;
626
+ }
627
+ .grimoire-skeleton-grid {
628
+ display: grid;
629
+ grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
630
+ gap: 12px;
631
+ margin-top: 6px;
632
+ }
633
+ .grimoire-skeleton-block {
634
+ height: 84px;
635
+ border-radius: var(--gm-radius);
636
+ background: linear-gradient(90deg, var(--muted) 0%, var(--accent) 50%, var(--muted) 100%);
637
+ background-size: 200% 100%;
638
+ animation: grimoire-shimmer 1.4s ease-in-out infinite;
639
+ }
640
+ @keyframes grimoire-shimmer {
641
+ from {
642
+ background-position: 100% 0;
643
+ }
644
+ to {
645
+ background-position: -100% 0;
646
+ }
647
+ }
648
+ .grimoire-error {
649
+ display: grid;
650
+ gap: 8px;
651
+ padding: 14px 16px;
652
+ border: 1px solid color-mix(in srgb, var(--destructive) 45%, transparent);
653
+ border-left-width: 4px;
654
+ border-radius: var(--gm-radius);
655
+ background: var(--card);
656
+ }
657
+ .grimoire-error-title {
658
+ color: var(--destructive);
659
+ font-weight: 600;
660
+ overflow-wrap: anywhere;
661
+ }
662
+
663
+
664
+ /* Inline code, ids that never wrap, headline */
665
+ .grimoire-root .grimoire-code {
666
+ padding: 1px 5px;
667
+ border-radius: 5px;
668
+ background: var(--secondary);
669
+ color: var(--secondary-foreground);
670
+ font-family: var(--gm-mono);
671
+ font-size: 0.88em;
672
+ overflow-wrap: anywhere;
673
+ }
674
+ .grimoire-root .grimoire-nowrap {
675
+ white-space: nowrap;
676
+ }
677
+ .grimoire-headline {
678
+ color: var(--muted-foreground);
679
+ font-size: 15px;
680
+ font-weight: 600;
681
+ }
682
+ .grimoire-subhead {
683
+ font-size: 14px;
684
+ color: var(--muted-foreground);
685
+ }
686
+ .grimoire-stat-small {
687
+ font-size: 20px;
688
+ }
689
+ div.grimoire-stat {
690
+ cursor: default;
691
+ }
692
+
693
+ /* Sub-tabs inside a view (file sets of a step) */
694
+ .grimoire-subtabs {
695
+ display: flex;
696
+ flex-wrap: wrap;
697
+ gap: 6px;
698
+ }
699
+ .grimoire-root .grimoire-subtab {
700
+ flex: none;
701
+ min-height: 36px;
702
+ padding: 0 12px;
703
+ border: 1px solid var(--input);
704
+ border-radius: 999px;
705
+ background: var(--card);
706
+ color: var(--foreground);
707
+ font: inherit;
708
+ font-size: 13px;
709
+ font-weight: 600;
710
+ cursor: pointer;
711
+ }
712
+ .grimoire-root .grimoire-subtab.is-active {
713
+ border-color: var(--brand);
714
+ background: var(--brand);
715
+ color: var(--brand-foreground);
716
+ }
717
+ .grimoire-root .grimoire-filter.is-active {
718
+ border-color: var(--brand);
719
+ background: var(--brand);
720
+ color: var(--brand-foreground);
721
+ }
722
+ .grimoire-root a.grimoire-filter {
723
+ display: inline-flex;
724
+ align-items: center;
725
+ text-decoration: none;
726
+ }
727
+
728
+ /* Flow page: mini header, switcher, health strip, fix next */
729
+ .grimoire-minihead {
730
+ display: none;
731
+ }
732
+ .grimoire-switcher {
733
+ display: inline-flex;
734
+ gap: 12px;
735
+ margin-left: auto;
736
+ }
737
+ .grimoire-pager {
738
+ display: flex;
739
+ justify-content: space-between;
740
+ gap: 12px;
741
+ padding-top: 8px;
742
+ border-top: 1px solid var(--border);
743
+ }
744
+ .grimoire-root .grimoire-neighbour {
745
+ display: inline-flex;
746
+ align-items: center;
747
+ min-height: 44px;
748
+ max-width: 100%;
749
+ overflow-wrap: anywhere;
750
+ font-weight: 600;
751
+ text-decoration: none;
752
+ }
753
+ .grimoire-root .grimoire-neighbour.is-next {
754
+ margin-left: auto;
755
+ text-align: right;
756
+ }
757
+ .grimoire-fixnext {
758
+ border-left: 4px solid var(--warning);
759
+ }
760
+ .grimoire-fixnext.is-good {
761
+ border-left-color: var(--success);
762
+ }
763
+ .grimoire-fixnext-lead {
764
+ overflow-wrap: anywhere;
765
+ }
766
+ .grimoire-copyline {
767
+ display: flex;
768
+ flex-wrap: wrap;
769
+ align-items: center;
770
+ gap: 8px;
771
+ }
772
+ .grimoire-copyline .grimoire-code {
773
+ flex: 1 1 260px;
774
+ padding: 8px 10px;
775
+ user-select: all;
776
+ }
777
+
778
+ /* Journey: a vertical stepper */
779
+ .grimoire-stepper {
780
+ display: grid;
781
+ gap: 0;
782
+ margin: 0;
783
+ padding: 0;
784
+ list-style: none;
785
+ }
786
+ .grimoire-step {
787
+ position: relative;
788
+ display: grid;
789
+ grid-template-columns: 36px minmax(0, 1fr);
790
+ gap: 12px;
791
+ padding-bottom: 18px;
792
+ }
793
+ .grimoire-step:not(:last-child)::before {
794
+ content: "";
795
+ position: absolute;
796
+ top: 36px;
797
+ bottom: 0;
798
+ left: 17px;
799
+ width: 2px;
800
+ background: var(--border);
801
+ }
802
+ .grimoire-step-marker {
803
+ display: inline-flex;
804
+ align-items: center;
805
+ justify-content: center;
806
+ width: 36px;
807
+ height: 36px;
808
+ border: 2px solid var(--brand);
809
+ border-radius: 50%;
810
+ background: var(--card);
811
+ color: var(--brand);
812
+ }
813
+ .grimoire-step-body {
814
+ display: grid;
815
+ align-content: start;
816
+ gap: 6px;
817
+ min-width: 0;
818
+ }
819
+ .grimoire-step-head,
820
+ .grimoire-step-counts {
821
+ display: flex;
822
+ flex-wrap: wrap;
823
+ align-items: center;
824
+ gap: 6px 10px;
825
+ min-width: 0;
826
+ }
827
+ .grimoire-step-target {
828
+ font-weight: 600;
829
+ overflow-wrap: anywhere;
830
+ }
831
+ .grimoire-linked {
832
+ padding: 8px 10px;
833
+ border-radius: calc(var(--gm-radius) - 2px);
834
+ background: var(--muted);
835
+ overflow-wrap: anywhere;
836
+ }
837
+ .grimoire-step-files {
838
+ display: grid;
839
+ gap: 10px;
840
+ padding: 10px;
841
+ border: 1px solid var(--border);
842
+ border-radius: calc(var(--gm-radius) - 2px);
843
+ background: var(--background);
844
+ }
845
+ .grimoire-step-files-body {
846
+ display: grid;
847
+ gap: 10px;
848
+ min-width: 0;
849
+ }
850
+ .grimoire-module-group h5 {
851
+ margin: 8px 0 4px;
852
+ color: var(--muted-foreground);
853
+ font-family: var(--gm-mono);
854
+ font-size: 12px;
855
+ overflow-wrap: anywhere;
856
+ }
857
+ .grimoire-expand {
858
+ display: grid;
859
+ min-width: 0;
860
+ }
861
+ .grimoire-expand:empty {
862
+ display: none;
863
+ }
864
+
865
+ /* Proof rows */
866
+ .grimoire-proofs,
867
+ .grimoire-proof-tests,
868
+ .grimoire-cases,
869
+ .grimoire-check-features {
870
+ display: grid;
871
+ gap: 10px;
872
+ margin: 0;
873
+ padding: 0;
874
+ list-style: none;
875
+ }
876
+ .grimoire-proof {
877
+ display: grid;
878
+ gap: 6px;
879
+ padding: 10px 12px;
880
+ border: 1px solid var(--border);
881
+ border-radius: calc(var(--gm-radius) - 2px);
882
+ background: var(--background);
883
+ scroll-margin-top: 72px;
884
+ }
885
+ .grimoire-proof-head {
886
+ display: flex;
887
+ flex-wrap: wrap;
888
+ align-items: center;
889
+ gap: 8px;
890
+ }
891
+ .grimoire-proof-text {
892
+ overflow-wrap: anywhere;
893
+ }
894
+ .grimoire-proof-tests {
895
+ gap: 4px;
896
+ font-size: 13px;
897
+ }
898
+ .grimoire-proof-tests li {
899
+ overflow-wrap: anywhere;
900
+ }
901
+ .grimoire-cases li {
902
+ overflow-wrap: anywhere;
903
+ }
904
+ .grimoire-details summary {
905
+ min-height: 32px;
906
+ color: var(--muted-foreground);
907
+ font-weight: 600;
908
+ cursor: pointer;
909
+ }
910
+ .grimoire-details[open] summary {
911
+ margin-bottom: 6px;
912
+ }
913
+
914
+ /* Check groups */
915
+ .grimoire-check-filters {
916
+ align-items: stretch;
917
+ }
918
+ .grimoire-check-head {
919
+ display: flex;
920
+ flex-wrap: wrap;
921
+ align-items: center;
922
+ gap: 6px 10px;
923
+ }
924
+ .grimoire-check-head h3 {
925
+ flex: 1 1 200px;
926
+ overflow-wrap: anywhere;
927
+ }
928
+ .grimoire-check-feature-row {
929
+ display: flex;
930
+ flex-wrap: wrap;
931
+ align-items: center;
932
+ gap: 6px 12px;
933
+ }
934
+ .grimoire-check-feature-row > :first-child {
935
+ flex: 1 1 140px;
936
+ overflow-wrap: anywhere;
937
+ }
938
+ .grimoire-paged {
939
+ display: grid;
940
+ gap: 8px;
941
+ margin-top: 8px;
942
+ }
943
+
944
+ /* Small screens and touch */
945
+ @media (max-width: 640px) {
946
+ .grimoire-facts {
947
+ grid-template-columns: minmax(0, 1fr);
948
+ gap: 0;
949
+ }
950
+ .grimoire-facts dd {
951
+ margin-bottom: 8px;
952
+ }
953
+ .grimoire-root h2 {
954
+ font-size: 19px;
955
+ }
956
+ .grimoire-card {
957
+ padding: 12px;
958
+ }
959
+
960
+ /* No tables: every row is a card and every cell names its column. */
961
+ .grimoire-scroll:has(> .grimoire-table) {
962
+ overflow-x: visible;
963
+ }
964
+ .grimoire-table,
965
+ .grimoire-table tbody,
966
+ .grimoire-table tr,
967
+ .grimoire-table td {
968
+ display: block;
969
+ width: 100%;
970
+ }
971
+ .grimoire-table thead {
972
+ position: absolute;
973
+ width: 1px;
974
+ height: 1px;
975
+ overflow: hidden;
976
+ clip-path: inset(50%);
977
+ }
978
+ .grimoire-table tr {
979
+ margin-bottom: 10px;
980
+ padding: 6px 10px;
981
+ border: 1px solid var(--border);
982
+ border-radius: calc(var(--gm-radius) - 2px);
983
+ background: var(--background);
984
+ }
985
+ .grimoire-table td {
986
+ display: grid;
987
+ grid-template-columns: 88px minmax(0, 1fr);
988
+ gap: 8px;
989
+ padding: 5px 0;
990
+ border-bottom: 1px dashed var(--border);
991
+ overflow-wrap: anywhere;
992
+ }
993
+ .grimoire-table td:last-child {
994
+ border-bottom: 0;
995
+ }
996
+ .grimoire-table td::before {
997
+ content: attr(data-label);
998
+ color: var(--muted-foreground);
999
+ font-size: 12px;
1000
+ font-weight: 600;
1001
+ }
1002
+ .grimoire-table td:empty {
1003
+ display: none;
1004
+ }
1005
+ .grimoire-svg {
1006
+ min-width: 560px;
1007
+ }
1008
+
1009
+ /* The flow page keeps its title in view and moves prev/next to the bottom. */
1010
+ .grimoire-minihead {
1011
+ position: sticky;
1012
+ top: 0;
1013
+ z-index: 10;
1014
+ display: flex;
1015
+ flex-wrap: nowrap;
1016
+ align-items: center;
1017
+ gap: 8px;
1018
+ margin: 0 -2px;
1019
+ padding: 8px 10px;
1020
+ border: 1px solid var(--border);
1021
+ border-radius: calc(var(--gm-radius) - 2px);
1022
+ background: var(--card);
1023
+ box-shadow: 0 4px 12px color-mix(in srgb, var(--foreground) 10%, transparent);
1024
+ }
1025
+ .grimoire-minihead strong {
1026
+ flex: 1 1 auto;
1027
+ min-width: 0;
1028
+ overflow: hidden;
1029
+ text-overflow: ellipsis;
1030
+ white-space: nowrap;
1031
+ }
1032
+ .grimoire-minihead .grimoire-pill,
1033
+ .grimoire-minihead .grimoire-muted {
1034
+ flex: none;
1035
+ }
1036
+ .grimoire-switcher {
1037
+ display: none;
1038
+ }
1039
+ .grimoire-pager {
1040
+ flex-direction: column;
1041
+ }
1042
+ .grimoire-root .grimoire-neighbour.is-next {
1043
+ margin-left: 0;
1044
+ text-align: left;
1045
+ }
1046
+ .grimoire-step {
1047
+ grid-template-columns: 30px minmax(0, 1fr);
1048
+ gap: 10px;
1049
+ }
1050
+ .grimoire-step-marker {
1051
+ width: 30px;
1052
+ height: 30px;
1053
+ }
1054
+ .grimoire-step:not(:last-child)::before {
1055
+ top: 30px;
1056
+ left: 14px;
1057
+ }
1058
+ .grimoire-toolbar .grimoire-sort {
1059
+ width: 100%;
1060
+ }
1061
+ }
1062
+ @media (pointer: coarse) {
1063
+ .grimoire-root .grimoire-tab,
1064
+ .grimoire-root .grimoire-hit {
1065
+ min-height: 44px;
1066
+ }
1067
+ .grimoire-root .grimoire-more,
1068
+ .grimoire-root .grimoire-subtab {
1069
+ min-height: 44px;
1070
+ }
1071
+ }
1072
+ @media (prefers-reduced-motion: reduce) {
1073
+ .grimoire-skeleton-block {
1074
+ animation: none;
1075
+ }
1076
+ .grimoire-tabs {
1077
+ scroll-behavior: auto;
1078
+ }
1079
+ }