Skip to content

Commit 8b5977f

Browse files
committed
add json schema and evidence hints
Signed-off-by: Alex Goodman <[email protected]>
1 parent a57ac08 commit 8b5977f

File tree

36 files changed

+7059
-69
lines changed

36 files changed

+7059
-69
lines changed

assets/scss/_capability_tables.scss

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,3 +486,78 @@ th:first-child .header-help::before {
486486
left: 12px;
487487
transform: translateX(0);
488488
}
489+
490+
/* Evidence Tooltips for Capability Icons */
491+
492+
/* Capability icon wrapper with evidence - set up tooltip positioning */
493+
.capability-icon-wrapper[data-evidence] {
494+
position: relative;
495+
cursor: help;
496+
display: inline-block; /* needed for proper positioning */
497+
}
498+
499+
/* Tooltip content */
500+
.capability-icon-wrapper[data-evidence]::after {
501+
content: attr(data-evidence);
502+
position: absolute;
503+
bottom: calc(100% + 8px); /* position above with gap */
504+
left: 50%;
505+
transform: translateX(-50%);
506+
507+
/* styling - match header help tooltips */
508+
padding: 0.5rem 0.75rem;
509+
border-radius: 6px;
510+
font-size: 0.75rem;
511+
line-height: 1.6;
512+
font-weight: 400;
513+
text-transform: none;
514+
letter-spacing: normal;
515+
white-space: pre-line; /* preserve line breaks for bullet list */
516+
max-width: 300px;
517+
width: max-content;
518+
text-align: left;
519+
box-shadow:
520+
0 4px 6px -1px rgba(0, 0, 0, 0.1),
521+
0 2px 4px -1px rgba(0, 0, 0, 0.06);
522+
523+
/* theme-aware colors */
524+
[data-bs-theme='light'] & {
525+
background-color: #1f2937;
526+
color: #f9fafb;
527+
}
528+
[data-bs-theme='dark'] & {
529+
background-color: #f9fafb;
530+
color: #1f2937;
531+
border: 1px solid #e5e7eb;
532+
}
533+
534+
/* hidden by default */
535+
opacity: 0;
536+
visibility: hidden;
537+
pointer-events: none;
538+
transition:
539+
opacity 0.2s ease,
540+
visibility 0.2s ease;
541+
542+
/* layer above table */
543+
z-index: 1000;
544+
}
545+
546+
/* Show tooltip on hover */
547+
.capability-icon-wrapper[data-evidence]:hover::after {
548+
opacity: 1;
549+
visibility: visible;
550+
}
551+
552+
/* Adjust positioning for tooltips in cells near right edge */
553+
td:nth-last-child(-n + 2) .capability-icon-wrapper[data-evidence]::after {
554+
left: auto;
555+
right: 0;
556+
transform: translateX(0);
557+
}
558+
559+
/* Adjust positioning for tooltips in cells near left edge */
560+
td:first-child .capability-icon-wrapper[data-evidence]::after {
561+
left: 0;
562+
transform: translateX(0);
563+
}

assets/scss/_schema_tables.scss

Lines changed: 185 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,185 @@
1+
/* Schema Reference Tables - Documentation for JSON Schema Types */
2+
3+
/* Base table styles */
4+
.schema-table {
5+
width: 100%;
6+
table-layout: fixed;
7+
border-collapse: separate;
8+
border-spacing: 0;
9+
margin: 1.5rem 0;
10+
font-size: 0.875rem;
11+
line-height: 1.4;
12+
border: 1px solid #e5e7eb;
13+
border-radius: 6px;
14+
overflow: hidden;
15+
box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
16+
}
17+
18+
.schema-table thead th {
19+
box-shadow: 0 3px 6px rgba(29, 78, 216, 0.4);
20+
padding: 0.625rem 0.5rem;
21+
text-align: left;
22+
font-weight: 600;
23+
font-size: 0.75rem;
24+
text-transform: uppercase;
25+
letter-spacing: 0.05em;
26+
color: #ffffff;
27+
white-space: nowrap;
28+
vertical-align: top;
29+
}
30+
31+
/* Body styles */
32+
.schema-table tbody td {
33+
padding: 0.5rem 0.5rem;
34+
vertical-align: top;
35+
font-size: 0.875rem;
36+
37+
[data-bs-theme='light'] & {
38+
color: #4b5563;
39+
}
40+
[data-bs-theme='dark'] & {
41+
color: #d1d5db;
42+
}
43+
}
44+
45+
/* Code elements within tables */
46+
.schema-table code {
47+
padding: 0.0625rem 0.25rem;
48+
border-radius: 3px;
49+
font-size: 0.8125rem;
50+
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
51+
white-space: nowrap;
52+
53+
[data-bs-theme='light'] & {
54+
background-color: #f9fafb;
55+
color: #1f2937;
56+
border: 1px solid #e5e7eb;
57+
}
58+
[data-bs-theme='dark'] & {
59+
background-color: #1f2937;
60+
color: #e5e7eb;
61+
border: 1px solid #374151;
62+
}
63+
}
64+
65+
/* Column-specific widths for 4-column layout */
66+
.schema-table .col-field-name {
67+
width: 20%;
68+
min-width: 120px;
69+
font-weight: 500;
70+
}
71+
72+
.schema-table .col-type {
73+
width: 15%;
74+
min-width: 100px;
75+
}
76+
77+
.schema-table .col-required {
78+
width: 10%;
79+
min-width: 80px;
80+
text-align: center;
81+
}
82+
83+
.schema-table .col-description {
84+
width: 55%;
85+
min-width: 200px;
86+
white-space: normal;
87+
line-height: 1.6;
88+
}
89+
90+
/* Soft vertical separation */
91+
.schema-table th,
92+
.schema-table td {
93+
border-left: 1px solid rgba(209, 213, 219, 0.6);
94+
}
95+
96+
/* Type column - allow wrapping for complex types */
97+
.schema-table .col-type {
98+
white-space: normal;
99+
word-break: break-word;
100+
}
101+
102+
/* Responsive adjustments */
103+
@media (max-width: 1024px) {
104+
.schema-table {
105+
font-size: 0.875rem;
106+
}
107+
108+
.schema-table thead th {
109+
padding: 0.75rem 0.5rem;
110+
font-size: 0.8125rem;
111+
}
112+
113+
.schema-table tbody td {
114+
padding: 0.75rem 0.5rem;
115+
}
116+
}
117+
118+
@media (max-width: 768px) {
119+
.schema-table {
120+
font-size: 0.8125rem;
121+
margin: 1.5rem 0;
122+
}
123+
124+
/* Adjust column widths for smaller screens */
125+
.schema-table .col-field-name {
126+
width: 25%;
127+
}
128+
129+
.schema-table .col-type {
130+
width: 20%;
131+
}
132+
133+
.schema-table .col-required {
134+
width: 10%;
135+
}
136+
137+
.schema-table .col-description {
138+
width: 45%;
139+
}
140+
}
141+
142+
/* Type section headings */
143+
h3[id] {
144+
margin-top: 2rem;
145+
margin-bottom: 1rem;
146+
padding-bottom: 0.5rem;
147+
148+
[data-bs-theme='light'] & {
149+
border-bottom: 2px solid #e5e7eb;
150+
}
151+
[data-bs-theme='dark'] & {
152+
border-bottom: 2px solid #374151;
153+
}
154+
}
155+
156+
/* Related type headings - shown under ecosystem types (not h4 to avoid TOC overflow) */
157+
p.related-type {
158+
margin-top: 1.5rem;
159+
margin-bottom: 0.75rem;
160+
padding-bottom: 0.25rem;
161+
font-size: 1rem;
162+
163+
[data-bs-theme='light'] & {
164+
color: #6b7280;
165+
border-bottom: 1px solid #e5e7eb;
166+
}
167+
[data-bs-theme='dark'] & {
168+
color: #9ca3af;
169+
border-bottom: 1px solid #374151;
170+
}
171+
}
172+
173+
/* Type description paragraphs (above tables) */
174+
.schema-table + p,
175+
h3 + p {
176+
margin-bottom: 1rem;
177+
line-height: 1.6;
178+
179+
[data-bs-theme='light'] & {
180+
color: #4b5563;
181+
}
182+
[data-bs-theme='dark'] & {
183+
color: #d1d5db;
184+
}
185+
}

assets/scss/_styles_project.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@
2222
// Feature-specific styles
2323
@import 'landing/landing';
2424
@import 'capability_tables';
25+
@import 'schema_tables';

content/docs/capabilities/snippets/ecosystem/alpm/package.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<td class="col-depth value">transitive</td>
2727
<td class="col-edges value">complete</td>
2828
<td class="col-kinds value">runtime</td>
29-
<td class="col-files indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
30-
<td class="col-digests indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
29+
<td class="col-files indicator"><span class="capability-icon-wrapper" data-evidence="AlpmDBEntry.Files"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
30+
<td class="col-digests indicator"><span class="capability-icon-wrapper" data-evidence="AlpmDBEntry.Files[].Digests"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
3131
<td class="col-integrity-hash indicator"></td>
3232
</tr>
3333
</tbody>

content/docs/capabilities/snippets/ecosystem/apk/package.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
<td class="col-depth value">direct</td>
2727
<td class="col-edges value">complete</td>
2828
<td class="col-kinds value">runtime</td>
29-
<td class="col-files indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
30-
<td class="col-digests indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
31-
<td class="col-integrity-hash indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
29+
<td class="col-files indicator"><span class="capability-icon-wrapper" data-evidence="ApkDBEntry.Files"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
30+
<td class="col-digests indicator"><span class="capability-icon-wrapper" data-evidence="ApkDBEntry.Files[].Digest"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
31+
<td class="col-integrity-hash indicator"><span class="capability-icon-wrapper" data-evidence="ApkDBEntry.Checksum"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
3232
</tr>
3333
</tbody>
3434
</table>

content/docs/capabilities/snippets/ecosystem/bitnami/package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
<td class="col-depth value">transitive</td>
2727
<td class="col-edges value">complete</td>
2828
<td class="col-kinds value">runtime</td>
29-
<td class="col-files indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
29+
<td class="col-files indicator"><span class="capability-icon-wrapper" data-evidence="BitnamiSBOMEntry.Files"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
3030
<td class="col-digests indicator"></td>
3131
<td class="col-integrity-hash indicator"></td>
3232
</tr>

content/docs/capabilities/snippets/ecosystem/conda/package.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<td class="col-depth value">direct</td>
2727
<td class="col-edges value"></td>
2828
<td class="col-kinds value">runtime</td>
29-
<td class="col-files indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
30-
<td class="col-digests indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
29+
<td class="col-files indicator"><span class="capability-icon-wrapper" data-evidence="• CondaMetaPackage.Files&#10;• CondaMetaPackage.PathsData.Paths"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
30+
<td class="col-digests indicator"><span class="capability-icon-wrapper" data-evidence="CondaMetaPackage.PathsData.Paths.SHA256"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
3131
<td class="col-integrity-hash indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
3232
</tr>
3333
</tbody>

content/docs/capabilities/snippets/ecosystem/dotnet/package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
<td class="col-kinds value">runtime, dev, build</td>
4949
<td class="col-files indicator"></td>
5050
<td class="col-digests indicator"></td>
51-
<td class="col-integrity-hash indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
51+
<td class="col-integrity-hash indicator"><span class="capability-icon-wrapper" data-evidence="DotnetPackagesLockEntry.ContentHash"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
5252
</tr>
5353
<tr>
5454
<td class="col-cataloger"><div class="cataloger-name">dotnet-portable-executable-cataloger</div><div class="evidence-patterns"><code>*.dll</code>, <code>*.exe</code></div></td>

content/docs/capabilities/snippets/ecosystem/dpkg/package.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
<td class="col-depth value"></td>
2727
<td class="col-edges value"></td>
2828
<td class="col-kinds value"></td>
29-
<td class="col-files indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
30-
<td class="col-digests indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
29+
<td class="col-files indicator"><span class="capability-icon-wrapper" data-evidence="DpkgArchiveEntry.Files"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
30+
<td class="col-digests indicator"><span class="capability-icon-wrapper" data-evidence="DpkgArchiveEntry.Files[].Digest"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
3131
<td class="col-integrity-hash indicator"></td>
3232
</tr>
3333
<tr>
@@ -36,8 +36,8 @@
3636
<td class="col-depth value">transitive</td>
3737
<td class="col-edges value">complete</td>
3838
<td class="col-kinds value">runtime</td>
39-
<td class="col-files indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
40-
<td class="col-digests indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
39+
<td class="col-files indicator"><span class="capability-icon-wrapper" data-evidence="DpkgDBEntry.Files"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
40+
<td class="col-digests indicator"><span class="capability-icon-wrapper" data-evidence="DpkgDBEntry.Files[].Digest"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
4141
<td class="col-integrity-hash indicator"></td>
4242
</tr>
4343
</tbody>

content/docs/capabilities/snippets/ecosystem/elixir/package.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
<td class="col-kinds value">runtime, dev</td>
2929
<td class="col-files indicator"></td>
3030
<td class="col-digests indicator"></td>
31-
<td class="col-integrity-hash indicator"><svg class="capability-icon"><use href="#icon-check"/></svg></td>
31+
<td class="col-integrity-hash indicator"><span class="capability-icon-wrapper" data-evidence="• ElixirMixLockEntry.PkgHash&#10;• ElixirMixLockEntry.PkgHashExt"><svg class="capability-icon"><use href="#icon-check"/></svg></span></td>
3232
</tr>
3333
</tbody>
3434
</table>

0 commit comments

Comments
 (0)