@astra-spec/ui 0.0.4 → 0.0.6
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/README.md +47 -4
- package/TOKENS.md +14 -8
- package/blocks.css +1 -0
- package/components.css +6 -0
- package/dist/blocks/analysis-tree.d.ts.map +1 -1
- package/dist/blocks/analysis-tree.js +4 -7
- package/dist/blocks/analysis-tree.js.map +1 -1
- package/dist/blocks/decisions-list.d.ts.map +1 -1
- package/dist/blocks/decisions-list.js +1 -1
- package/dist/blocks/decisions-list.js.map +1 -1
- package/dist/blocks/findings-list.d.ts.map +1 -1
- package/dist/blocks/findings-list.js +3 -4
- package/dist/blocks/findings-list.js.map +1 -1
- package/dist/blocks/index.d.ts +2 -4
- package/dist/blocks/index.d.ts.map +1 -1
- package/dist/blocks/index.js +1 -2
- package/dist/blocks/index.js.map +1 -1
- package/dist/blocks/outputs-list.d.ts +2 -7
- package/dist/blocks/outputs-list.d.ts.map +1 -1
- package/dist/blocks/outputs-list.js +11 -21
- package/dist/blocks/outputs-list.js.map +1 -1
- package/dist/blocks/papers-list.d.ts.map +1 -1
- package/dist/blocks/papers-list.js +3 -3
- package/dist/blocks/papers-list.js.map +1 -1
- package/dist/blocks/section.d.ts.map +1 -1
- package/dist/blocks/section.js +3 -2
- package/dist/blocks/section.js.map +1 -1
- package/dist/components/figure-zoom.d.ts +6 -0
- package/dist/components/figure-zoom.d.ts.map +1 -0
- package/dist/components/figure-zoom.js +28 -0
- package/dist/components/figure-zoom.js.map +1 -0
- package/dist/components/finding-detail.d.ts +4 -2
- package/dist/components/finding-detail.d.ts.map +1 -1
- package/dist/components/finding-detail.js +41 -25
- package/dist/components/finding-detail.js.map +1 -1
- package/dist/components/index.d.ts +9 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +5 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/insight-trigger.d.ts.map +1 -1
- package/dist/components/insight-trigger.js +3 -2
- package/dist/components/insight-trigger.js.map +1 -1
- package/dist/components/output-card.d.ts +13 -0
- package/dist/components/output-card.d.ts.map +1 -0
- package/dist/components/output-card.js +12 -0
- package/dist/components/output-card.js.map +1 -0
- package/dist/components/output-detail.d.ts +6 -2
- package/dist/components/output-detail.d.ts.map +1 -1
- package/dist/components/output-detail.js +49 -13
- package/dist/components/output-detail.js.map +1 -1
- package/dist/components/output-dialog.d.ts +6 -1
- package/dist/components/output-dialog.d.ts.map +1 -1
- package/dist/components/output-dialog.js +2 -2
- package/dist/components/output-dialog.js.map +1 -1
- package/dist/components/output-entry.d.ts +17 -0
- package/dist/components/output-entry.d.ts.map +1 -0
- package/dist/components/output-entry.js +21 -0
- package/dist/components/output-entry.js.map +1 -0
- package/dist/components/output-provenance.d.ts +6 -0
- package/dist/components/output-provenance.d.ts.map +1 -0
- package/dist/components/output-provenance.js +16 -0
- package/dist/components/output-provenance.js.map +1 -0
- package/dist/components/output-status.d.ts +8 -0
- package/dist/components/output-status.d.ts.map +1 -0
- package/dist/components/output-status.js +17 -0
- package/dist/components/output-status.js.map +1 -0
- package/dist/components/paper-detail.d.ts.map +1 -1
- package/dist/components/paper-detail.js +2 -2
- package/dist/components/paper-detail.js.map +1 -1
- package/dist/components/paper-row.d.ts +9 -0
- package/dist/components/paper-row.d.ts.map +1 -0
- package/dist/components/paper-row.js +11 -0
- package/dist/components/paper-row.js.map +1 -0
- package/dist/components/record-dialog.d.ts +5 -1
- package/dist/components/record-dialog.d.ts.map +1 -1
- package/dist/components/record-dialog.js +7 -4
- package/dist/components/record-dialog.js.map +1 -1
- package/dist/components/record-preview.d.ts.map +1 -1
- package/dist/components/record-preview.js +8 -7
- package/dist/components/record-preview.js.map +1 -1
- package/dist/lib/labels.d.ts +34 -2
- package/dist/lib/labels.d.ts.map +1 -1
- package/dist/lib/labels.js +35 -4
- package/dist/lib/labels.js.map +1 -1
- package/dist/model/index.d.ts +4 -2
- package/dist/model/index.d.ts.map +1 -1
- package/dist/model/index.js +1 -1
- package/dist/model/index.js.map +1 -1
- package/dist/model/kind.d.ts +2 -2
- package/dist/model/kind.d.ts.map +1 -1
- package/dist/model/kind.js +3 -4
- package/dist/model/kind.js.map +1 -1
- package/dist/model/output-provenance.d.ts +17 -0
- package/dist/model/output-provenance.d.ts.map +1 -0
- package/dist/model/output-provenance.js +2 -0
- package/dist/model/output-provenance.js.map +1 -0
- package/dist/model/output-status.d.ts +17 -0
- package/dist/model/output-status.d.ts.map +1 -0
- package/dist/model/output-status.js +2 -0
- package/dist/model/output-status.js.map +1 -0
- package/dist/model/relations.d.ts +37 -12
- package/dist/model/relations.d.ts.map +1 -1
- package/dist/model/relations.js +76 -23
- package/dist/model/relations.js.map +1 -1
- package/dist/primitives/dialog.d.ts.map +1 -1
- package/dist/primitives/dialog.js +9 -1
- package/dist/primitives/dialog.js.map +1 -1
- package/dist/primitives/index.d.ts +6 -0
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +3 -0
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/inline-reference.d.ts +9 -0
- package/dist/primitives/inline-reference.d.ts.map +1 -0
- package/dist/primitives/inline-reference.js +14 -0
- package/dist/primitives/inline-reference.js.map +1 -0
- package/dist/primitives/kind-glyph.d.ts +8 -0
- package/dist/primitives/kind-glyph.d.ts.map +1 -0
- package/dist/primitives/kind-glyph.js +9 -0
- package/dist/primitives/kind-glyph.js.map +1 -0
- package/dist/primitives/output-status-glyph.d.ts +8 -0
- package/dist/primitives/output-status-glyph.d.ts.map +1 -0
- package/dist/primitives/output-status-glyph.js +13 -0
- package/dist/primitives/output-status-glyph.js.map +1 -0
- package/dist/primitives/preview-popover.d.ts +1 -1
- package/dist/primitives/preview-popover.d.ts.map +1 -1
- package/dist/primitives/record-list.d.ts.map +1 -1
- package/dist/primitives/record-list.js +3 -2
- package/dist/primitives/record-list.js.map +1 -1
- package/dist/primitives/relation-list.d.ts.map +1 -1
- package/dist/primitives/relation-list.js +3 -2
- package/dist/primitives/relation-list.js.map +1 -1
- package/dist/primitives/tooltip.d.ts +7 -0
- package/dist/primitives/tooltip.d.ts.map +1 -0
- package/dist/primitives/tooltip.js +31 -0
- package/dist/primitives/tooltip.js.map +1 -0
- package/dist/views/inventory.d.ts +12 -1
- package/dist/views/inventory.d.ts.map +1 -1
- package/dist/views/inventory.js +23 -17
- package/dist/views/inventory.js.map +1 -1
- package/isolate.css +7 -0
- package/package.json +7 -4
- package/primitives.css +3 -0
- package/src/blocks/analysis-tree.tsx +4 -30
- package/src/blocks/decisions-list.tsx +5 -3
- package/src/blocks/findings-list.tsx +10 -8
- package/src/blocks/index.ts +2 -4
- package/src/blocks/outputs-list.tsx +43 -106
- package/src/blocks/papers-list.tsx +2 -18
- package/src/blocks/section.tsx +3 -2
- package/src/components/figure-zoom.tsx +72 -0
- package/src/components/finding-detail.tsx +106 -30
- package/src/components/index.ts +13 -0
- package/src/components/insight-trigger.tsx +3 -2
- package/src/components/output-card.tsx +51 -0
- package/src/components/output-detail.tsx +69 -21
- package/src/components/output-dialog.tsx +9 -0
- package/src/components/output-entry.tsx +61 -0
- package/src/components/output-provenance.tsx +86 -0
- package/src/components/output-status.tsx +38 -0
- package/src/components/paper-detail.tsx +2 -2
- package/src/components/paper-row.tsx +41 -0
- package/src/components/record-dialog.tsx +13 -1
- package/src/components/record-preview.tsx +8 -14
- package/src/lib/labels.tsx +69 -6
- package/src/model/index.ts +6 -2
- package/src/model/kind.ts +4 -5
- package/src/model/output-provenance.ts +18 -0
- package/src/model/output-status.ts +18 -0
- package/src/model/relations.ts +92 -26
- package/src/primitives/dialog.tsx +7 -1
- package/src/primitives/index.ts +6 -0
- package/src/primitives/inline-reference.tsx +25 -0
- package/src/primitives/kind-glyph.tsx +24 -0
- package/src/primitives/output-status-glyph.tsx +37 -0
- package/src/primitives/preview-popover.tsx +1 -1
- package/src/primitives/record-list.tsx +3 -4
- package/src/primitives/relation-list.tsx +4 -7
- package/src/primitives/tooltip.tsx +51 -0
- package/src/views/inventory.tsx +54 -22
- package/styles/base.css +2 -1
- package/styles/blocks/analysis-tree.css +23 -26
- package/styles/blocks/decisions-list.css +6 -6
- package/styles/blocks/findings-list.css +50 -0
- package/styles/blocks/outputs-list.css +13 -434
- package/styles/blocks/papers-list.css +8 -74
- package/styles/blocks/records.css +13 -13
- package/styles/components/artifact-preview.css +15 -15
- package/styles/components/decision-detail.css +23 -23
- package/styles/components/evidence.css +2 -7
- package/styles/components/figure-zoom.css +62 -0
- package/styles/components/finding-detail.css +73 -11
- package/styles/components/input-detail.css +7 -7
- package/styles/components/insight-detail.css +17 -17
- package/styles/components/insight-list.css +6 -6
- package/styles/components/insight-trigger.css +5 -5
- package/styles/components/output-card.css +290 -0
- package/styles/components/output-detail.css +139 -51
- package/styles/components/output-entry.css +141 -0
- package/styles/components/output-provenance.css +94 -0
- package/styles/components/output-status.css +31 -0
- package/styles/components/paper-detail.css +22 -22
- package/styles/components/paper-doi.css +2 -2
- package/styles/components/paper-pdf-viewer.css +6 -6
- package/styles/components/paper-row.css +72 -0
- package/styles/components/record-preview.css +444 -268
- package/styles/primitives/badge.css +1 -1
- package/styles/primitives/button.css +25 -25
- package/styles/primitives/count-heading.css +3 -3
- package/styles/primitives/detail-layout.css +20 -20
- package/styles/primitives/dialog.css +75 -93
- package/styles/primitives/empty-state.css +1 -1
- package/styles/primitives/inline-reference.css +37 -0
- package/styles/primitives/kind-glyph.css +31 -0
- package/styles/primitives/kind.css +6 -0
- package/styles/primitives/preview-popover.css +6 -11
- package/styles/primitives/prose.css +1 -1
- package/styles/primitives/record-list.css +32 -48
- package/styles/primitives/relation-list.css +14 -36
- package/styles/primitives/surface-header.css +15 -11
- package/styles/primitives/tooltip.css +22 -0
- package/styles/tokens.css +19 -9
- package/styles/views/inventory.css +58 -27
- package/dist/blocks/prior-insights-list.d.ts +0 -9
- package/dist/blocks/prior-insights-list.d.ts.map +0 -1
- package/dist/blocks/prior-insights-list.js +0 -29
- package/dist/blocks/prior-insights-list.js.map +0 -1
- package/src/blocks/prior-insights-list.tsx +0 -52
package/src/views/inventory.tsx
CHANGED
|
@@ -6,42 +6,53 @@ import {
|
|
|
6
6
|
type ResolvedOutput,
|
|
7
7
|
type ResolvedRecord,
|
|
8
8
|
} from '@astra-spec/sdk';
|
|
9
|
-
import { forwardRef, useEffect, useMemo, useRef, type HTMLAttributes, type ReactNode } from 'react';
|
|
9
|
+
import { forwardRef, useEffect, useMemo, useRef, useState, type HTMLAttributes, type ReactNode } from 'react';
|
|
10
10
|
import { collectInventoryPapers, findPaper, paperForDoi, type InventoryPaper, type InventoryPaperMetadataMap } from '../model/papers.js';
|
|
11
11
|
import { locateRecord } from '../model/locate-record.js';
|
|
12
12
|
import { cn } from '../lib/cn.js';
|
|
13
13
|
import { LabelsProvider, useLabels, type AstraLabelOverrides } from '../lib/labels.js';
|
|
14
14
|
import type { OpenPaperFileHandler } from '../components/paper-detail.js';
|
|
15
15
|
import type { PdfJsLoader } from '../lib/pdf-runtime.js';
|
|
16
|
+
import type { OutputStatusLookup } from '../model/output-status.js';
|
|
16
17
|
import { RecordDialog } from '../components/record-dialog.js';
|
|
17
18
|
import { useDetailStack, type DetailEntry } from '../lib/detail-stack.js';
|
|
18
19
|
import type { ArtifactRenderer } from '../components/artifact-preview.js';
|
|
19
20
|
import { DialogProvider, type DialogMode } from '../primitives/dialog.js';
|
|
20
21
|
import type { TextRenderer } from '../lib/prose.js';
|
|
21
22
|
import { DecisionsList } from '../blocks/decisions-list.js';
|
|
23
|
+
import { AnalysisTree } from '../blocks/analysis-tree.js';
|
|
22
24
|
import { FindingsList } from '../blocks/findings-list.js';
|
|
23
25
|
import { InputsList } from '../blocks/inputs-list.js';
|
|
24
26
|
import { OutputsList } from '../blocks/outputs-list.js';
|
|
25
27
|
import { PapersList } from '../blocks/papers-list.js';
|
|
26
|
-
import { PriorInsightsList } from '../blocks/prior-insights-list.js';
|
|
27
28
|
import { InventoryOutline, InventorySection } from '../blocks/section.js';
|
|
28
29
|
import { sectionKind, type InventorySectionId } from '../model/kind.js';
|
|
29
30
|
|
|
30
|
-
export const DEFAULT_SECTIONS: readonly InventorySectionId[] = ['outputs', 'decisions', 'inputs', 'findings', '
|
|
31
|
+
export const DEFAULT_SECTIONS: readonly InventorySectionId[] = ['outputs', 'decisions', 'inputs', 'findings', 'papers'];
|
|
31
32
|
|
|
32
33
|
export interface InventoryProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
33
34
|
document: ResolvedAnalysisDocument;
|
|
34
35
|
/** Pass a prebuilt index to share it with the host; otherwise one is derived from `document`. */
|
|
35
36
|
index?: AnalysisIndex | undefined;
|
|
36
|
-
/**
|
|
37
|
+
/** Controlled analysis selection; pair with `onSelectAnalysis`. Omit to let Inventory navigate internally. Unknown paths show the root. */
|
|
37
38
|
analysisPath?: string | undefined;
|
|
39
|
+
/** Observe navigation, or update `analysisPath` when controlling selection. */
|
|
40
|
+
onSelectAnalysis?: ((canonicalPath: string) => void) | undefined;
|
|
38
41
|
/** Which sections to show, in order. */
|
|
39
42
|
sections?: readonly InventorySectionId[] | undefined;
|
|
40
43
|
/** Prefix for section anchor ids, so several explorers can share a page. */
|
|
41
44
|
idPrefix?: string | undefined;
|
|
42
45
|
showOutline?: boolean | undefined;
|
|
46
|
+
/** Show project navigation below the outline (default true). Hosts controlling `analysisPath` must pair it with `onSelectAnalysis`. */
|
|
47
|
+
showHierarchy?: boolean | undefined;
|
|
43
48
|
labels?: AstraLabelOverrides | undefined;
|
|
44
49
|
renderArtifact?: ArtifactRenderer | undefined;
|
|
50
|
+
/** Host renderer for recorded output provenance, shown below Recipe. */
|
|
51
|
+
renderProvenance?: ((output: ResolvedOutput) => ReactNode) | undefined;
|
|
52
|
+
/** Optional execution status, keyed by the host to the selected universe. */
|
|
53
|
+
getOutputStatus?: OutputStatusLookup | undefined;
|
|
54
|
+
/** Host-provided link to the current code file, shown beside Recipe. */
|
|
55
|
+
renderCodeLink?: ((output: ResolvedOutput) => ReactNode) | undefined;
|
|
45
56
|
renderText?: TextRenderer | undefined;
|
|
46
57
|
loadPdfJs?: PdfJsLoader | undefined;
|
|
47
58
|
onOpenPaperFile?: OpenPaperFileHandler | undefined;
|
|
@@ -83,11 +94,16 @@ export const Inventory = forwardRef<HTMLDivElement, InventoryProps>(function Inv
|
|
|
83
94
|
const ExplorerBody = forwardRef<HTMLDivElement, Omit<InventoryProps, 'labels'>>(function ExplorerBody({
|
|
84
95
|
document,
|
|
85
96
|
index: providedIndex,
|
|
86
|
-
analysisPath
|
|
97
|
+
analysisPath,
|
|
98
|
+
onSelectAnalysis,
|
|
87
99
|
sections = DEFAULT_SECTIONS,
|
|
88
100
|
idPrefix = '',
|
|
89
101
|
showOutline = true,
|
|
102
|
+
showHierarchy = true,
|
|
90
103
|
renderArtifact,
|
|
104
|
+
renderProvenance,
|
|
105
|
+
getOutputStatus,
|
|
106
|
+
renderCodeLink,
|
|
91
107
|
renderText,
|
|
92
108
|
loadPdfJs,
|
|
93
109
|
onOpenPaperFile,
|
|
@@ -105,7 +121,16 @@ const ExplorerBody = forwardRef<HTMLDivElement, Omit<InventoryProps, 'labels'>>(
|
|
|
105
121
|
}, ref) {
|
|
106
122
|
const labels = useLabels();
|
|
107
123
|
const index = useMemo(() => providedIndex ?? indexAnalysis(document), [document, providedIndex]);
|
|
108
|
-
const
|
|
124
|
+
const [internalAnalysisPath, setInternalAnalysisPath] = useState('$');
|
|
125
|
+
// Reset a removed selection so reintroducing that path does not navigate back.
|
|
126
|
+
if (analysisPath === undefined && internalAnalysisPath !== '$' && !index.analysisByPath.has(internalAnalysisPath)) {
|
|
127
|
+
setInternalAnalysisPath('$');
|
|
128
|
+
}
|
|
129
|
+
const analysis = index.analysisByPath.get(analysisPath ?? internalAnalysisPath) ?? document.analysis;
|
|
130
|
+
const selectAnalysis = (path: string) => {
|
|
131
|
+
if (analysisPath === undefined) setInternalAnalysisPath(path);
|
|
132
|
+
onSelectAnalysis?.(path);
|
|
133
|
+
};
|
|
109
134
|
const papers = useMemo(
|
|
110
135
|
() => collectInventoryPapers(document, index, analysis, paperMetadata),
|
|
111
136
|
[analysis, document, index, paperMetadata],
|
|
@@ -141,7 +166,7 @@ const ExplorerBody = forwardRef<HTMLDivElement, Omit<InventoryProps, 'labels'>>(
|
|
|
141
166
|
const sectionContent: Record<InventorySectionId, { count: number; content: ReactNode }> = {
|
|
142
167
|
outputs: {
|
|
143
168
|
count: analysis.outputs.length,
|
|
144
|
-
content: <OutputsList analysis={analysis} renderArtifact={renderArtifact} onOpenRecord={openRecord} />,
|
|
169
|
+
content: <OutputsList analysis={analysis} getOutputStatus={getOutputStatus} renderArtifact={renderArtifact} onOpenRecord={openRecord} />,
|
|
145
170
|
},
|
|
146
171
|
decisions: {
|
|
147
172
|
count: analysis.decisions.length,
|
|
@@ -155,10 +180,6 @@ const ExplorerBody = forwardRef<HTMLDivElement, Omit<InventoryProps, 'labels'>>(
|
|
|
155
180
|
count: analysis.findings.length,
|
|
156
181
|
content: <FindingsList analysis={analysis} onOpenRecord={openRecord} />,
|
|
157
182
|
},
|
|
158
|
-
prior_insights: {
|
|
159
|
-
count: analysis.prior_insights.length,
|
|
160
|
-
content: <PriorInsightsList analysis={analysis} onOpenRecord={openRecord} />,
|
|
161
|
-
},
|
|
162
183
|
papers: {
|
|
163
184
|
count: papers.length,
|
|
164
185
|
content: (
|
|
@@ -170,11 +191,11 @@ const ExplorerBody = forwardRef<HTMLDivElement, Omit<InventoryProps, 'labels'>>(
|
|
|
170
191
|
),
|
|
171
192
|
},
|
|
172
193
|
};
|
|
173
|
-
const anchorId = (section: InventorySectionId) => `${idPrefix}${section
|
|
194
|
+
const anchorId = (section: InventorySectionId) => `${idPrefix}${section}`;
|
|
174
195
|
|
|
175
196
|
return (
|
|
176
197
|
<div data-slot="inventory" {...rest} ref={ref} className={cn('astra-inventory', className)}>
|
|
177
|
-
<div className="astra-inventory__layout">
|
|
198
|
+
<div className="astra-inventory__layout" data-sidebar={showOutline || showHierarchy ? '' : undefined}>
|
|
178
199
|
<div className="astra-inventory__sections">
|
|
179
200
|
{sections.map((section) => (
|
|
180
201
|
<InventorySection
|
|
@@ -190,15 +211,24 @@ const ExplorerBody = forwardRef<HTMLDivElement, Omit<InventoryProps, 'labels'>>(
|
|
|
190
211
|
))}
|
|
191
212
|
{children}
|
|
192
213
|
</div>
|
|
193
|
-
{showOutline ? (
|
|
194
|
-
<
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
214
|
+
{showOutline || showHierarchy ? (
|
|
215
|
+
<div className="astra-inventory__sidebar" data-has-tree={showHierarchy ? '' : undefined}>
|
|
216
|
+
{showOutline ? <InventoryOutline
|
|
217
|
+
entries={sections.map((section) => ({
|
|
218
|
+
id: anchorId(section),
|
|
219
|
+
label: labels.sections[section],
|
|
220
|
+
count: sectionContent[section].count,
|
|
221
|
+
kind: sectionKind(section),
|
|
222
|
+
}))}
|
|
223
|
+
/> : null}
|
|
224
|
+
{showHierarchy ? (
|
|
225
|
+
<AnalysisTree
|
|
226
|
+
document={document}
|
|
227
|
+
analysisPath={analysis.canonicalPath}
|
|
228
|
+
onSelectAnalysis={selectAnalysis}
|
|
229
|
+
/>
|
|
230
|
+
) : null}
|
|
231
|
+
</div>
|
|
202
232
|
) : null}
|
|
203
233
|
</div>
|
|
204
234
|
{stack.active ? (
|
|
@@ -211,6 +241,8 @@ const ExplorerBody = forwardRef<HTMLDivElement, Omit<InventoryProps, 'labels'>>(
|
|
|
211
241
|
papers={papers}
|
|
212
242
|
paperMetadata={paperMetadata}
|
|
213
243
|
renderArtifact={renderArtifact}
|
|
244
|
+
renderProvenance={renderProvenance}
|
|
245
|
+
renderCodeLink={renderCodeLink}
|
|
214
246
|
renderText={renderText}
|
|
215
247
|
loadPdfJs={loadPdfJs}
|
|
216
248
|
onOpenPaperFile={onOpenPaperFile}
|
package/styles/base.css
CHANGED
|
@@ -2,12 +2,11 @@
|
|
|
2
2
|
@layer astra.tokens, astra.base, astra.components, astra.views;
|
|
3
3
|
@layer astra.views {
|
|
4
4
|
:where(.astra-ui) .astra-analysis-tree {
|
|
5
|
-
overflow: visible;
|
|
6
5
|
font-family: var(--astra-font-ui);
|
|
7
6
|
}
|
|
8
7
|
|
|
9
8
|
:where(.astra-ui) .astra-analysis-tree h2 {
|
|
10
|
-
margin: 0 0
|
|
9
|
+
margin: 0 0 8px;
|
|
11
10
|
color: var(--astra-color-text-subtle);
|
|
12
11
|
font-size: var(--astra-font-size-2xs);
|
|
13
12
|
font-weight: 700;
|
|
@@ -21,44 +20,42 @@
|
|
|
21
20
|
list-style: none;
|
|
22
21
|
}
|
|
23
22
|
|
|
24
|
-
:where(.astra-ui) .astra-analysis-tree
|
|
25
|
-
|
|
23
|
+
:where(.astra-ui) .astra-analysis-tree ul ul {
|
|
24
|
+
margin-inline-start: 20px;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/* Indent four levels at most, so deep projects keep room for their labels. */
|
|
28
|
+
:where(.astra-ui) .astra-analysis-tree ul ul ul ul ul ul {
|
|
29
|
+
margin-inline-start: 0;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:where(.astra-ui) .astra-analysis-tree__select {
|
|
33
|
+
display: block;
|
|
26
34
|
width: 100%;
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
min-width: 0;
|
|
36
|
+
padding: 7px 0;
|
|
29
37
|
cursor: pointer;
|
|
30
38
|
border: 0;
|
|
31
|
-
border-radius: 0
|
|
39
|
+
border-radius: 0;
|
|
32
40
|
background: transparent;
|
|
33
|
-
color: var(--astra-color-text-
|
|
34
|
-
padding: 0.375rem 0.5rem;
|
|
41
|
+
color: var(--astra-color-text-subtle);
|
|
35
42
|
font: inherit;
|
|
36
43
|
font-size: var(--astra-font-size-sm);
|
|
37
|
-
line-height: 1.
|
|
44
|
+
line-height: 1.4;
|
|
38
45
|
text-align: start;
|
|
39
46
|
}
|
|
40
47
|
|
|
41
|
-
:where(.astra-ui) .astra-analysis-
|
|
42
|
-
flex: 0 0 auto;
|
|
43
|
-
color: var(--astra-color-kind-analysis);
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:where(.astra-ui) .astra-analysis-tree button span {
|
|
48
|
+
:where(.astra-ui) .astra-analysis-tree__select span {
|
|
47
49
|
min-width: 0;
|
|
48
|
-
overflow:
|
|
49
|
-
text-overflow: ellipsis;
|
|
50
|
-
white-space: nowrap;
|
|
50
|
+
overflow-wrap: anywhere;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
-
:where(.astra-ui) .astra-analysis-
|
|
54
|
-
|
|
55
|
-
background: var(--astra-color-surface-muted);
|
|
56
|
-
color: var(--astra-color-text);
|
|
53
|
+
:where(.astra-ui) .astra-analysis-tree__select:where([aria-current="page"]) {
|
|
54
|
+
font-weight: 700;
|
|
57
55
|
}
|
|
58
56
|
|
|
59
|
-
:where(.astra-ui) .astra-analysis-
|
|
60
|
-
|
|
57
|
+
:where(.astra-ui) .astra-analysis-tree__select:hover,
|
|
58
|
+
:where(.astra-ui) .astra-analysis-tree__select:focus-visible {
|
|
61
59
|
color: var(--astra-color-text);
|
|
62
|
-
font-weight: 700;
|
|
63
60
|
}
|
|
64
61
|
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
|
|
20
20
|
/* The filter stacks on the width of its records block (the query container
|
|
21
21
|
declared in records.css); :where() keeps the specificity unchanged. */
|
|
22
|
-
@container (max-width:
|
|
22
|
+
@container (max-width: 608px) {
|
|
23
23
|
:where(.astra-ui) :where(.astra-inventory-records) .astra-inventory-filter {
|
|
24
24
|
align-items: flex-start;
|
|
25
25
|
flex-direction: column;
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
display: flex;
|
|
31
31
|
align-items: center;
|
|
32
32
|
justify-content: space-between;
|
|
33
|
-
gap:
|
|
34
|
-
margin: 0 0
|
|
33
|
+
gap: 16px;
|
|
34
|
+
margin: 0 0 10px;
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
:where(.astra-ui) .astra-inventory-filter__chips {
|
|
38
38
|
display: flex;
|
|
39
39
|
flex-wrap: wrap;
|
|
40
|
-
gap:
|
|
40
|
+
gap: 6px;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
:where(.astra-ui) .astra-inventory-filter__chips button {
|
|
44
44
|
min-height: 0;
|
|
45
|
-
padding:
|
|
45
|
+
padding: 4px 10px;
|
|
46
46
|
border: 1px solid var(--astra-color-border-strong);
|
|
47
47
|
border-radius: 999px;
|
|
48
48
|
background: transparent;
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
font: 400 var(--astra-font-size-xs)/1.2 var(--astra-font-ui);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
@container (max-width:
|
|
66
|
+
@container (max-width: 544px) {
|
|
67
67
|
:where(.astra-ui) :where(.astra-inventory-records) .astra-inventory-filter {
|
|
68
68
|
align-items: flex-start;
|
|
69
69
|
flex-direction: column;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* findings-list — emitted by src/blocks/findings-list.tsx */
|
|
2
|
+
@layer astra.tokens, astra.base, astra.components, astra.views;
|
|
3
|
+
@layer astra.views {
|
|
4
|
+
/* A finding is a sentence, not a name: the row gives it the width to be
|
|
5
|
+
read, and hangs its identity and evidence count underneath. */
|
|
6
|
+
:where(.astra-ui) .astra-findings-list__entry {
|
|
7
|
+
align-items: start;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
:where(.astra-ui) .astra-findings-list__copy {
|
|
11
|
+
display: grid;
|
|
12
|
+
min-width: 0;
|
|
13
|
+
gap: 5px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
:where(.astra-ui) .astra-findings-list__entry .astra-findings-list__claim {
|
|
17
|
+
overflow: visible;
|
|
18
|
+
color: var(--astra-color-text);
|
|
19
|
+
font: 400 var(--astra-font-size-sm)/1.45 var(--astra-font-body);
|
|
20
|
+
text-overflow: clip;
|
|
21
|
+
white-space: normal;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
:where(.astra-ui) .astra-findings-list__meta {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-wrap: wrap;
|
|
27
|
+
align-items: baseline;
|
|
28
|
+
gap: 4px 10px;
|
|
29
|
+
color: var(--astra-color-text-subtle);
|
|
30
|
+
font: 400 var(--astra-font-size-2xs)/1.3 var(--astra-font-ui);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
:where(.astra-ui) .astra-findings-list__entry .astra-findings-list__name {
|
|
34
|
+
overflow: visible;
|
|
35
|
+
color: var(--astra-color-kind-finding);
|
|
36
|
+
font-family: var(--astra-font-mono);
|
|
37
|
+
text-overflow: clip;
|
|
38
|
+
white-space: normal;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/* The evidence count now belongs to the metadata line, not a fixed column. */
|
|
42
|
+
:where(.astra-ui) .astra-findings-list__meta .astra-record-list__count {
|
|
43
|
+
overflow: visible;
|
|
44
|
+
color: inherit;
|
|
45
|
+
font: inherit;
|
|
46
|
+
text-overflow: clip;
|
|
47
|
+
white-space: normal;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
}
|