@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/README.md
CHANGED
|
@@ -82,13 +82,15 @@ optional outline and a drill-down detail stack.
|
|
|
82
82
|
|
|
83
83
|
Its most useful options are:
|
|
84
84
|
|
|
85
|
-
-
|
|
85
|
+
- Inventory shows the project hierarchy and handles navigation automatically; `<Inventory document={document} />` is sufficient.
|
|
86
|
+
- Pass `analysisPath` with `onSelectAnalysis` to control selection from the host (`$` is the project root). The callback alone observes navigation without taking over state.
|
|
86
87
|
- `sections` changes which inventory sections appear and their order.
|
|
87
88
|
- `showOutline` and `idPrefix` control outline navigation.
|
|
88
89
|
- `renderArtifact` and `renderText` replace host-owned content.
|
|
89
90
|
- `loadPdfJs` enables the built-in PDF viewer; `onOpenPaperFile` overrides external PDF opening.
|
|
90
91
|
- `paperMetadata` and `onFetchPaper` connect paper loading to host state.
|
|
91
92
|
- `detail`, `defaultDetail`, and `onDetailChange` control the detail stack.
|
|
93
|
+
- `showHierarchy={false}` hides project navigation independently of `showOutline`. On narrow panels the hierarchy moves above the sections so navigation remains available. Internal navigation preserves selection through refresh, falls back to the root when the selected analysis disappears, and closes uncontrolled record details on selection changes.
|
|
92
94
|
- `detailMode="embedded"` renders details as an inline panel instead of a modal.
|
|
93
95
|
- `labels` overrides user-facing strings.
|
|
94
96
|
- `index` accepts an `AnalysisIndex` the host has already built.
|
|
@@ -100,17 +102,30 @@ Use blocks when your application owns the page layout or routing:
|
|
|
100
102
|
| Component | Purpose |
|
|
101
103
|
| --- | --- |
|
|
102
104
|
| `AnalysisTree` | Recursive picker for the root analysis and its sub-analyses |
|
|
103
|
-
| `OutputsList
|
|
105
|
+
| `OutputsList` | Figure and table galleries plus a list of other outputs, with optional compact artifact previews |
|
|
104
106
|
| `DecisionsList` | Decision rows, selected options, and a controlled or uncontrolled tag filter |
|
|
105
107
|
| `InputsList` | Inputs with their source and declared type |
|
|
106
108
|
| `FindingsList` | Findings with claims and evidence counts |
|
|
107
|
-
| `PriorInsightsList` | Prior insights with claims and source counts |
|
|
108
109
|
| `PapersList`, `PaperRows` | Cited papers derived with `collectInventoryPapers` |
|
|
109
110
|
| `InventorySection`, `InventoryRecords`, `InventoryOutline` | Section chrome, kind-aware record layout, and anchor navigation for custom inventories |
|
|
110
111
|
|
|
111
112
|
List components emit records through callbacks such as `onOpenRecord`; they do
|
|
112
113
|
not own application navigation.
|
|
113
114
|
|
|
115
|
+
### Shared renderers
|
|
116
|
+
|
|
117
|
+
The blocks above are built from renderers you can place yourself, for one
|
|
118
|
+
record at a time, when you own the run that holds them:
|
|
119
|
+
|
|
120
|
+
| Component | What it renders |
|
|
121
|
+
| --- | --- |
|
|
122
|
+
| `OutputCard` | A gallery card: compact artifact preview, title, and a type label for non-figures |
|
|
123
|
+
| `OutputEntry` | One output at a glance — a metric as its value, anything else as its name |
|
|
124
|
+
| `PaperRow` | One cited paper: title, byline, and how much of the analysis leans on it |
|
|
125
|
+
|
|
126
|
+
Each takes the record and an `onOpen` callback, forwards a ref to its button,
|
|
127
|
+
and accepts `className` and `aria-label` overrides.
|
|
128
|
+
|
|
114
129
|
### Record and paper details
|
|
115
130
|
|
|
116
131
|
Each ASTRA record kind has both a dialog and a dialog-free detail body:
|
|
@@ -128,6 +143,15 @@ Use a `*Dialog` when you already have the record and any derived relationship
|
|
|
128
143
|
data. Use the corresponding `*Detail` inside a sidebar, route, or your own
|
|
129
144
|
dialog shell.
|
|
130
145
|
|
|
146
|
+
Figure outputs zoom directly in the detail view, from the fitted view (100%) to
|
|
147
|
+
400%. The zoom buttons overlay the bottom-right corner without reducing the
|
|
148
|
+
figure area. Drag to pan, scroll or pinch to zoom; the
|
|
149
|
+
focused figure also accepts arrow keys to pan, `+`/`-` to zoom and `0` to fit.
|
|
150
|
+
Reopening the output starts fitted again. These
|
|
151
|
+
controls use `react-zoom-pan-pinch` to magnify the host's existing figure rendering;
|
|
152
|
+
artifact loading stays with the host. Double-click toggles magnification. Labels
|
|
153
|
+
are overridable through `labels.figure`.
|
|
154
|
+
|
|
131
155
|
`RecordDialog` is the generic alternative. Given a `DetailEntry`, resolved
|
|
132
156
|
document, and SDK index, it selects the correct detail UI and derives the
|
|
133
157
|
record's relationships, evidence, insights, and papers. Pair it with
|
|
@@ -244,7 +268,26 @@ name merging (`cn`), prose parsing and the label helpers are in `@astra-spec/ui/
|
|
|
244
268
|
## Host extension points
|
|
245
269
|
|
|
246
270
|
- `renderArtifact(output, { compact })` renders host-decoded artifact content.
|
|
247
|
-
Without it, outputs use `ArtifactPreview`'s unavailable state.
|
|
271
|
+
Without it, outputs use `ArtifactPreview`'s unavailable state. Compact previews
|
|
272
|
+
ask it for every output type; the output detail frames only a figure or a table
|
|
273
|
+
and asks for a metric's value as a compact pill, so a data file or another
|
|
274
|
+
non-visual type is not rendered there.
|
|
275
|
+
- `renderCodeLink(output)` adds an optional action beside Recipe. The host resolves
|
|
276
|
+
the current source file and opens it; return `null` when no file is available.
|
|
277
|
+
- `getOutputStatus(output)` supplies optional execution status for inventory
|
|
278
|
+
results in the states `lc status` reports: `current`, `behind`, or `stale`,
|
|
279
|
+
with a `detail` reason. Only behind and stale results show a marker, with
|
|
280
|
+
`detail` on hover; current results stay quiet. Markers sit at card/pill
|
|
281
|
+
corners and inside file rows without changing result dimensions. The host owns lookup; unavailable status has no marker.
|
|
282
|
+
`OutputStatus` and `OutputStatusLookup` are in `@astra-spec/ui/model`, the
|
|
283
|
+
`OutputStatusGlyph` primitive draws the mark, and the marker's strings are
|
|
284
|
+
overridable through `labels.status`.
|
|
285
|
+
- `renderProvenance(output)` adds recorded execution information below Recipe in
|
|
286
|
+
output details. `OutputProvenance` renders a compact status, last-run time and
|
|
287
|
+
Git revision, with a Details popup for the recorded recipe, input versions,
|
|
288
|
+
environment and CLI version. Hosts supply `OutputRun` data; `null` means no
|
|
289
|
+
recorded run, while `undefined` means loading. Copy is configurable through
|
|
290
|
+
`labels.provenance` and `labels.status`.
|
|
248
291
|
- `renderText(text, { field })` replaces the built-in prose renderer. The
|
|
249
292
|
default understands inline code, `$inline$` math, and `$$display$$` math.
|
|
250
293
|
Hosts that only need custom math commands can reuse that renderer with
|
package/TOKENS.md
CHANGED
|
@@ -15,6 +15,7 @@ Every token is declared on `:where(.astra-ui)` at zero specificity in the `astra
|
|
|
15
15
|
| `--astra-color-header` | `#f8f7f3` | `#302d27` |
|
|
16
16
|
| `--astra-color-artifact-paper` | `#ffffff` | `#f8f7f3` |
|
|
17
17
|
| `--astra-color-artifact-ink` | `#221f20` | `#221f20` |
|
|
18
|
+
| `--astra-color-surface-inset` | `color-mix(in srgb, var(--astra-color-text) 4%, var(--astra-color-surface-muted))` | — |
|
|
18
19
|
|
|
19
20
|
## Text
|
|
20
21
|
|
|
@@ -44,6 +45,7 @@ Every token is declared on `:where(.astra-ui)` at zero specificity in the `astra
|
|
|
44
45
|
| `--astra-color-focus` | `#3f7280` | `#86adb7` |
|
|
45
46
|
| `--astra-color-danger` | `#a45a43` | `#d6927d` |
|
|
46
47
|
| `--astra-color-danger-soft` | `rgb(164 90 67 / 0.09)` | `rgb(214 146 125 / 0.13)` |
|
|
48
|
+
| `--astra-color-accent-soft` | `color-mix(in srgb, var(--astra-color-accent) 12%, transparent)` | — |
|
|
47
49
|
|
|
48
50
|
## Record kinds
|
|
49
51
|
|
|
@@ -63,6 +65,7 @@ Every token is declared on `:where(.astra-ui)` at zero specificity in the `astra
|
|
|
63
65
|
| `--astra-color-kind-decision-soft` | `rgb(166 124 60 / 0.11)` | `rgb(216 180 119 / 0.14)` |
|
|
64
66
|
| `--astra-color-kind-finding-soft` | `rgb(164 90 67 / 0.1)` | `rgb(214 146 125 / 0.15)` |
|
|
65
67
|
| `--astra-color-kind-insight-soft` | `rgb(139 125 112 / 0.11)` | `rgb(194 181 169 / 0.15)` |
|
|
68
|
+
| `--astra-color-kind-value` | `var(--astra-color-kind-analysis)` | — |
|
|
66
69
|
|
|
67
70
|
## Kind indirection
|
|
68
71
|
|
|
@@ -78,22 +81,25 @@ Every token is declared on `:where(.astra-ui)` at zero specificity in the `astra
|
|
|
78
81
|
| `--astra-font-body` | `"Source Serif 4", Georgia, "Times New Roman", serif` | — |
|
|
79
82
|
| `--astra-font-heading` | `"Source Serif 4", Georgia, "Times New Roman", serif` | — |
|
|
80
83
|
| `--astra-font-mono` | `ui-monospace, "SF Mono", Menlo, Consolas, monospace` | — |
|
|
81
|
-
| `--astra-font-size-2xs` | `
|
|
82
|
-
| `--astra-font-size-xs` | `
|
|
83
|
-
| `--astra-font-size-sm` | `
|
|
84
|
-
| `--astra-font-size` | `
|
|
84
|
+
| `--astra-font-size-2xs` | `11px` | — |
|
|
85
|
+
| `--astra-font-size-xs` | `12px` | — |
|
|
86
|
+
| `--astra-font-size-sm` | `13px` | — |
|
|
87
|
+
| `--astra-font-size` | `14px` | — |
|
|
88
|
+
| `--astra-font-size-meta` | `11px` | — |
|
|
89
|
+
| `--astra-font-size-title` | `20px` | — |
|
|
90
|
+
| `--astra-font-size-claim` | `19px` | — |
|
|
85
91
|
|
|
86
92
|
## Geometry
|
|
87
93
|
|
|
88
94
|
| Token | Light default | Dark default |
|
|
89
95
|
| --- | --- | --- |
|
|
90
96
|
| `--astra-radius-control` | `0` | — |
|
|
91
|
-
| `--astra-radius-preview` | `
|
|
97
|
+
| `--astra-radius-preview` | `3px` | — |
|
|
92
98
|
| `--astra-shadow-raised` | `none` | `0 5px 18px rgb(0 0 0 / 0.38)` |
|
|
93
99
|
| `--astra-shadow-preview` | `0 6px 18px rgb(34 31 32 / 0.1)` | `0 6px 18px rgb(0 0 0 / 0.45)` |
|
|
94
|
-
| `--astra-width-preview` | `
|
|
95
|
-
| `--astra-space-2` | `
|
|
96
|
-
| `--astra-space-3` | `
|
|
100
|
+
| `--astra-width-preview` | `440px` | — |
|
|
101
|
+
| `--astra-space-2` | `8px` | — |
|
|
102
|
+
| `--astra-space-3` | `12px` | — |
|
|
97
103
|
| `--astra-z-dialog` | `1000` | — |
|
|
98
104
|
| `--astra-z-preview` | `1100` | — |
|
|
99
105
|
| `--astra-z-fullscreen` | `10000` | — |
|
package/blocks.css
CHANGED
package/components.css
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/* Primitives plus the ASTRA-aware components (details and dialogs). */
|
|
2
2
|
@import "./primitives.css";
|
|
3
3
|
@import "./styles/components/artifact-preview.css";
|
|
4
|
+
@import "./styles/components/figure-zoom.css";
|
|
4
5
|
@import "./styles/components/paper-detail.css";
|
|
5
6
|
@import "./styles/components/paper-pdf-viewer.css";
|
|
6
7
|
@import "./styles/components/evidence.css";
|
|
@@ -12,4 +13,9 @@
|
|
|
12
13
|
@import "./styles/components/paper-doi.css";
|
|
13
14
|
@import "./styles/components/finding-detail.css";
|
|
14
15
|
@import "./styles/components/output-detail.css";
|
|
16
|
+
@import "./styles/components/output-card.css";
|
|
17
|
+
@import "./styles/components/output-entry.css";
|
|
18
|
+
@import "./styles/components/output-provenance.css";
|
|
19
|
+
@import "./styles/components/output-status.css";
|
|
20
|
+
@import "./styles/components/paper-row.css";
|
|
15
21
|
@import "./styles/components/record-preview.css";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis-tree.d.ts","sourceRoot":"","sources":["../../src/blocks/analysis-tree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAwB,MAAM,iBAAiB,CAAC;AACtF,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAK/D,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACtF,QAAQ,EAAE,wBAAwB,CAAC;IACnC,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,gBAAgB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACnC;
|
|
1
|
+
{"version":3,"file":"analysis-tree.d.ts","sourceRoot":"","sources":["../../src/blocks/analysis-tree.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAwB,MAAM,iBAAiB,CAAC;AACtF,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAK/D,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACtF,QAAQ,EAAE,wBAAwB,CAAC;IACnC,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,gBAAgB,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,IAAI,CAAC;IAClD,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CACnC;AAsCD,4EAA4E;AAC5E,eAAO,MAAM,YAAY,2GA8BvB,CAAC"}
|
|
@@ -3,17 +3,14 @@ import { forwardRef, useId } from 'react';
|
|
|
3
3
|
import { analysisTitle } from '../model/records.js';
|
|
4
4
|
import { cn } from '../lib/cn.js';
|
|
5
5
|
import { useLabels } from '../lib/labels.js';
|
|
6
|
-
function
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
function AnalysisNode({ analysis, selectedPath, depth, onSelectAnalysis, }) {
|
|
10
|
-
const active = analysis.canonicalPath === selectedPath;
|
|
11
|
-
return (_jsxs("li", { children: [_jsxs("button", { type: "button", style: { paddingInlineStart: `${Math.min(depth, 4) * 1.25}rem` }, "aria-current": active ? 'page' : undefined, onClick: () => { onSelectAnalysis(analysis.canonicalPath); }, children: [_jsx(ProjectDocumentIcon, {}), _jsx("span", { children: analysisTitle(analysis) })] }), analysis.analyses.length ? (_jsx("ul", { children: analysis.analyses.map((child) => (_jsx(AnalysisNode, { analysis: child, selectedPath: selectedPath, depth: depth + 1, onSelectAnalysis: onSelectAnalysis }, child.canonicalPath))) })) : null] }));
|
|
6
|
+
function AnalysisNode({ analysis, selectedPath, onSelectAnalysis, }) {
|
|
7
|
+
const title = analysisTitle(analysis);
|
|
8
|
+
return (_jsxs("li", { children: [_jsx("button", { type: "button", className: "astra-analysis-tree__select", "aria-current": analysis.canonicalPath === selectedPath ? 'page' : undefined, onClick: () => { onSelectAnalysis(analysis.canonicalPath); }, children: _jsx("span", { children: title }) }), analysis.analyses.length ? (_jsx("ul", { children: analysis.analyses.map((child) => (_jsx(AnalysisNode, { analysis: child, selectedPath: selectedPath, onSelectAnalysis: onSelectAnalysis }, child.canonicalPath))) })) : null] }));
|
|
12
9
|
}
|
|
13
10
|
/** The recursive analysis picker: the project root and its sub-analyses. */
|
|
14
11
|
export const AnalysisTree = forwardRef(function AnalysisTree({ document, analysisPath = '$', onSelectAnalysis, showHeading = true, className, 'aria-label': hostLabel, ...props }, ref) {
|
|
15
12
|
const labels = useLabels();
|
|
16
13
|
const headingId = useId();
|
|
17
|
-
return (_jsxs("nav", { "data-slot": "analysis-tree", ...props, ref: ref, className: cn('astra-analysis-tree', className), "aria-labelledby": showHeading && !hostLabel ? headingId : undefined, "aria-label": hostLabel ?? (showHeading ? undefined : labels.analysisTree), children: [showHeading ? _jsx("h2", { id: headingId, children: labels.analysisTree }) : null, _jsx("ul", { children: _jsx(AnalysisNode, { analysis: document.analysis, selectedPath: analysisPath,
|
|
14
|
+
return (_jsxs("nav", { "data-slot": "analysis-tree", ...props, ref: ref, className: cn('astra-analysis-tree', className), "aria-labelledby": showHeading && !hostLabel ? headingId : undefined, "aria-label": hostLabel ?? (showHeading ? undefined : labels.analysisTree), children: [showHeading ? _jsx("h2", { id: headingId, children: labels.analysisTree }) : null, _jsx("ul", { children: _jsx(AnalysisNode, { analysis: document.analysis, selectedPath: analysisPath, onSelectAnalysis: onSelectAnalysis }) })] }));
|
|
18
15
|
});
|
|
19
16
|
//# sourceMappingURL=analysis-tree.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analysis-tree.js","sourceRoot":"","sources":["../../src/blocks/analysis-tree.tsx"],"names":[],"mappings":";AACA,OAA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,CAAC,GAAG,SAAS,CAAC;IACxD,YAAY,EAAE,CAAC,QAAQ,EAAE,gBAAgB,EAAE,QAAQ,EAAE,oBAAoB,KAAK,IAAI,CAAC;CACpF;AAED,mEAAmE;AACnE,eAAO,MAAM,aAAa,+GAwFxB,CAAC"}
|
|
@@ -44,7 +44,7 @@ export const DecisionsList = forwardRef(function DecisionsList({ analysis, tagLa
|
|
|
44
44
|
cells: [
|
|
45
45
|
_jsx(RecordIdentity, { kind: "decision", title: recordTitle(record) }),
|
|
46
46
|
_jsx("span", { className: "astra-record-list__selected", children: selectedOptionLabel(record) }),
|
|
47
|
-
_jsx("span", { className: "astra-record-list__tag", children:
|
|
47
|
+
record.tags?.[0] ? (_jsx("span", { className: "astra-record-list__tag", children: decisionTagLabel(record.tags[0], tagLabels) })) : null,
|
|
48
48
|
_jsx("span", { "aria-hidden": "true", children: "\u2192" }),
|
|
49
49
|
],
|
|
50
50
|
})) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"decisions-list.js","sourceRoot":"","sources":["../../src/blocks/decisions-list.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAuB,MAAM,OAAO,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,WAAW,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AACrG,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AACtF,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAEhD,MAAM,CAAC,MAAM,QAAQ,GAAG,KAAK,CAAC;AAa9B,mEAAmE;AACnE,MAAM,CAAC,MAAM,aAAa,GAAG,UAAU,CAAqC,SAAS,aAAa,CAAC,EACjG,QAAQ,EACR,SAAS,GAAG,EAAE,EACd,SAAS,EAAE,gBAAgB,EAC3B,gBAAgB,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ACR,CAAC,CAAC,CAAC,IAAI;wBACR,8BAAkB,MAAM,uBAAS;qBAClC;iBACF,CAAC,CAAC,GACH,IACe,CACpB,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings-list.d.ts","sourceRoot":"","sources":["../../src/blocks/findings-list.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"findings-list.d.ts","sourceRoot":"","sources":["../../src/blocks/findings-list.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAC7E,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAMxD,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACzF,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,YAAY,EAAE,CAAC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAClF;AAMD,oDAAoD;AACpD,eAAO,MAAM,YAAY,8GA4CvB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { KindGlyph } from '../primitives/kind-glyph.js';
|
|
2
3
|
import { forwardRef } from 'react';
|
|
3
4
|
import { recordTitle } from '../model/records.js';
|
|
4
5
|
import { useLabels } from '../lib/labels.js';
|
|
@@ -14,9 +15,8 @@ export const FindingsList = forwardRef(function FindingsList({ analysis, onOpenR
|
|
|
14
15
|
if (!records.length) {
|
|
15
16
|
return _jsx(EmptyState, { "data-slot": "findings-list", ...props, ref: ref, className: className, children: labels.empty.findings });
|
|
16
17
|
}
|
|
17
|
-
return (_jsx(InventoryRecords, { ...props, ref: ref, kind: "finding", className: className, children: _jsx(RecordList, { label: labels.sections.findings, columnTemplate: "minmax(
|
|
18
|
+
return (_jsx(InventoryRecords, { ...props, ref: ref, kind: "finding", className: className, children: _jsx(RecordList, { label: labels.sections.findings, columnTemplate: "minmax(0, 1fr) 1.5rem", columns: [
|
|
18
19
|
{ label: 'Finding', className: 'astra-record-list__primary' },
|
|
19
|
-
{ label: 'Evidence', className: 'astra-record-list__count astra-record-list__secondary' },
|
|
20
20
|
{ className: 'astra-record-list__arrow' },
|
|
21
21
|
], rows: records.map((record) => {
|
|
22
22
|
const count = record.evidence.length;
|
|
@@ -25,8 +25,7 @@ export const FindingsList = forwardRef(function FindingsList({ analysis, onOpenR
|
|
|
25
25
|
accessibleLabel: `${recordTitle(record)}: ${record.claim} ${evidenceLabel(count)}`,
|
|
26
26
|
onOpen: () => { onOpenRecord(record, analysis); },
|
|
27
27
|
cells: [
|
|
28
|
-
_jsxs("span", { className: "astra-record-list__name", "
|
|
29
|
-
_jsx("span", { children: evidenceLabel(count) }),
|
|
28
|
+
_jsxs("span", { className: "astra-record-list__name astra-findings-list__entry", children: [_jsx(KindGlyph, { className: "astra-record-list__glyph", kind: "finding" }), _jsxs("span", { className: "astra-findings-list__copy", children: [_jsx("span", { className: "astra-findings-list__claim", children: record.claim }), _jsxs("span", { className: "astra-findings-list__meta", children: [_jsx("span", { className: "astra-findings-list__name", children: recordTitle(record) }), _jsx("span", { className: "astra-record-list__count", children: evidenceLabel(count) })] })] })] }),
|
|
30
29
|
_jsx("span", { "aria-hidden": "true", children: "\u2192" }),
|
|
31
30
|
],
|
|
32
31
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"findings-list.js","sourceRoot":"","sources":["../../src/blocks/findings-list.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"findings-list.js","sourceRoot":"","sources":["../../src/blocks/findings-list.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAExD,OAAO,EAAE,UAAU,EAAuB,MAAM,OAAO,CAAC;AACxD,OAAO,EA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AAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;gBACrC,OAAO;oBACL,GAAG,EAAE,MAAM,CAAC,aAAa;oBACzB,eAAe,EAAE,GAAG,WAAW,CAAC,MAAM,CAAC,KAAK,MAAM,CAAC,KAAK,IAAI,aAAa,CAAC,KAAK,CAAC,EAAE;oBAClF,MAAM,EAAE,GAAG,EAAE,GAAG,YAAY,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC;oBACjD,KAAK,EAAE;wBACL,gBAAM,SAAS,EAAC,oDAAoD,aAClE,KAAC,SAAS,IAAC,SAAS,EAAC,0BAA0B,EAAC,IAAI,EAAC,SAAS,GAAG,EACjE,gBAAM,SAAS,EAAC,2BAA2B,aACzC,eAAM,SAAS,EAAC,4BAA4B,YAAE,MAAM,CAAC,KAAK,GAAQ,EAClE,gBAAM,SAAS,EAAC,2BAA2B,aACzC,eAAM,SAAS,EAAC,2BAA2B,YAAE,WAAW,CAAC,MAAM,CAAC,GAAQ,EACxE,eAAM,SAAS,EAAC,0BAA0B,YAAE,aAAa,CAAC,KAAK,CAAC,GAAQ,IACnE,IACF,IACF;wBACP,8BAAkB,MAAM,uBAAS;qBAClC;iBACF,CAAC;YACJ,CAAC,CAAC,GACF,GACe,CACpB,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
package/dist/blocks/index.d.ts
CHANGED
|
@@ -3,16 +3,14 @@ export { AnalysisTree } from './analysis-tree.js';
|
|
|
3
3
|
export type { AnalysisTreeProps } from './analysis-tree.js';
|
|
4
4
|
export { InventoryOutline, InventoryRecords, InventorySection } from './section.js';
|
|
5
5
|
export type { InventoryOutlineEntry, InventoryOutlineProps, InventoryRecordsProps, InventorySectionProps, } from './section.js';
|
|
6
|
-
export {
|
|
7
|
-
export type {
|
|
6
|
+
export { OutputsList } from './outputs-list.js';
|
|
7
|
+
export type { OutputsListProps } from './outputs-list.js';
|
|
8
8
|
export { ALL_TAGS, DecisionsList } from './decisions-list.js';
|
|
9
9
|
export type { DecisionsListProps } from './decisions-list.js';
|
|
10
10
|
export { InputsList } from './inputs-list.js';
|
|
11
11
|
export type { InputsListProps } from './inputs-list.js';
|
|
12
12
|
export { FindingsList } from './findings-list.js';
|
|
13
13
|
export type { FindingsListProps } from './findings-list.js';
|
|
14
|
-
export { PriorInsightsList } from './prior-insights-list.js';
|
|
15
|
-
export type { PriorInsightsListProps } from './prior-insights-list.js';
|
|
16
14
|
export { PaperRows, PapersList } from './papers-list.js';
|
|
17
15
|
export type { PaperRowsProps, PapersListProps } from './papers-list.js';
|
|
18
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpF,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACpF,YAAY,EACV,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAC9D,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACzD,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC"}
|
package/dist/blocks/index.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/** Blocks: sections of the inventory page, composable into any layout. */
|
|
2
2
|
export { AnalysisTree } from './analysis-tree.js';
|
|
3
3
|
export { InventoryOutline, InventoryRecords, InventorySection } from './section.js';
|
|
4
|
-
export {
|
|
4
|
+
export { OutputsList } from './outputs-list.js';
|
|
5
5
|
export { ALL_TAGS, DecisionsList } from './decisions-list.js';
|
|
6
6
|
export { InputsList } from './inputs-list.js';
|
|
7
7
|
export { FindingsList } from './findings-list.js';
|
|
8
|
-
export { PriorInsightsList } from './prior-insights-list.js';
|
|
9
8
|
export { PaperRows, PapersList } from './papers-list.js';
|
|
10
9
|
//# sourceMappingURL=index.js.map
|
package/dist/blocks/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOpF,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/blocks/index.ts"],"names":[],"mappings":"AAAA,0EAA0E;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAOpF,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEhD,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC"}
|
|
@@ -1,18 +1,13 @@
|
|
|
1
1
|
import type { ResolvedAnalysisNode, ResolvedOutput } from '@astra-spec/sdk';
|
|
2
2
|
import { type HTMLAttributes } from 'react';
|
|
3
|
+
import type { OutputStatusLookup } from '../model/output-status.js';
|
|
3
4
|
import type { ArtifactRenderer } from '../components/artifact-preview.js';
|
|
4
5
|
export interface OutputsListProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
5
6
|
analysis: ResolvedAnalysisNode;
|
|
6
7
|
renderArtifact?: ArtifactRenderer | undefined;
|
|
8
|
+
getOutputStatus?: OutputStatusLookup | undefined;
|
|
7
9
|
onOpenRecord: (output: ResolvedOutput, analysis: ResolvedAnalysisNode) => void;
|
|
8
10
|
}
|
|
9
|
-
export interface OutputCardProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'children'> {
|
|
10
|
-
output: ResolvedOutput;
|
|
11
|
-
renderArtifact?: ArtifactRenderer | undefined;
|
|
12
|
-
onOpen: () => void;
|
|
13
|
-
}
|
|
14
|
-
/** A gallery card: compact preview and title, with a type label for non-figures. */
|
|
15
|
-
export declare const OutputCard: import("react").ForwardRefExoticComponent<OutputCardProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
16
11
|
/** Figures and tables as galleries, metrics as compact tiles, files as a compact grid. */
|
|
17
12
|
export declare const OutputsList: import("react").ForwardRefExoticComponent<OutputsListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
13
|
//# sourceMappingURL=outputs-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputs-list.d.ts","sourceRoot":"","sources":["../../src/blocks/outputs-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"outputs-list.d.ts","sourceRoot":"","sources":["../../src/blocks/outputs-list.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,EAAqB,KAAK,cAAc,EAAE,MAAM,OAAO,CAAC;AAG/D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAK1E,MAAM,WAAW,gBAAiB,SAAQ,IAAI,CAAC,cAAc,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;IACxF,QAAQ,EAAE,oBAAoB,CAAC;IAC/B,cAAc,CAAC,EAAE,gBAAgB,GAAG,SAAS,CAAC;IAC9C,eAAe,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACjD,YAAY,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAChF;AA6DD,0FAA0F;AAC1F,eAAO,MAAM,WAAW,6GAyBtB,CAAC"}
|
|
@@ -1,34 +1,24 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef, useId } from 'react';
|
|
3
|
-
import { recordTitle } from '../model/records.js';
|
|
4
3
|
import { cn } from '../lib/cn.js';
|
|
5
4
|
import { useLabels } from '../lib/labels.js';
|
|
6
5
|
import { EmptyState } from '../primitives/record-list.js';
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return null;
|
|
16
|
-
return (_jsxs("section", { className: "astra-inventory-outputs__group", "aria-labelledby": id, children: [_jsx("h3", { id: id, className: "astra-inventory-outputs__group-heading", children: _jsx("span", { children: title }) }), _jsx("div", { className: "astra-inventory-outputs__gallery", children: outputs.map((output) => (_jsx(OutputCard, { output: output, renderArtifact: renderArtifact, onOpen: () => { onOpen(output); } }, output.canonicalPath))) })] }));
|
|
17
|
-
}
|
|
18
|
-
function CompactOutputs({ title, outputs, renderArtifact, onOpen, }) {
|
|
6
|
+
import { OutputCard } from '../components/output-card.js';
|
|
7
|
+
import { OutputEntry } from '../components/output-entry.js';
|
|
8
|
+
/**
|
|
9
|
+
* One titled run of outputs. A gallery frames each output as a card with its
|
|
10
|
+
* preview; the compact form lists them as entries, which is what a metric or a
|
|
11
|
+
* plain file is worth. Everything else about a group is the same either way.
|
|
12
|
+
*/
|
|
13
|
+
function OutputGroup({ title, outputs, variant, renderArtifact, getOutputStatus, onOpen, }) {
|
|
19
14
|
const id = useId();
|
|
20
15
|
if (!outputs.length)
|
|
21
16
|
return null;
|
|
22
|
-
return (_jsxs("section", { className: "astra-inventory-outputs__group", "aria-labelledby": id, children: [_jsx("h3", { id: id, className: "astra-inventory-outputs__group-heading", children: _jsx("span", { children: title }) }), _jsx("ul", { className: "astra-inventory-outputs__compact-grid", "data-layout": outputs[0]?.type === 'metric' ? 'tiles' : 'grid', children: outputs.map((output) => {
|
|
23
|
-
const metric = output.type === 'metric';
|
|
24
|
-
const status = !output.active ? 'Inactive' : !output.artifact ? 'Not yet generated' : undefined;
|
|
25
|
-
return (_jsx("li", { children: _jsxs("button", { type: "button", className: "astra-output-entry", "data-kind": metric ? 'metric' : 'file', "aria-label": `Open ${output.type}: ${recordTitle(output)}`, onClick: () => { onOpen(output); }, children: [_jsxs("span", { className: "astra-output-entry__name", children: [recordTitle(output), !metric && status ? _jsx("span", { className: "astra-output-entry__status", children: status }) : null] }), metric ? (_jsx("span", { className: "astra-output-entry__value", children: renderArtifact?.(output, { compact: true })
|
|
26
|
-
?? _jsx("span", { className: "astra-output-entry__status", children: status ?? 'Preview unavailable' }) })) : (_jsx("span", { className: "astra-output-entry__format", children: output.format ? output.format.replace(/^\./, '').toUpperCase() : 'FILE' }))] }) }, output.canonicalPath));
|
|
27
|
-
}) })] }));
|
|
17
|
+
return (_jsxs("section", { className: "astra-inventory-outputs__group", "aria-labelledby": id, children: [_jsx("h3", { id: id, className: "astra-inventory-outputs__group-heading", children: _jsx("span", { children: title }) }), variant === 'gallery' ? (_jsx("div", { className: "astra-inventory-outputs__gallery", children: outputs.map((output) => (_jsx(OutputCard, { output: output, status: getOutputStatus?.(output), renderArtifact: renderArtifact, onOpen: () => { onOpen(output); } }, output.canonicalPath))) })) : (_jsx("ul", { className: "astra-inventory-outputs__compact-grid", "data-layout": outputs[0]?.type === 'metric' ? 'tiles' : 'grid', children: outputs.map((output) => (_jsx("li", { children: _jsx(OutputEntry, { output: output, status: getOutputStatus?.(output), renderArtifact: renderArtifact, onOpen: () => { onOpen(output); } }) }, output.canonicalPath))) }))] }));
|
|
28
18
|
}
|
|
29
19
|
const GROUPED_TYPES = new Set(['figure', 'table', 'metric']);
|
|
30
20
|
/** Figures and tables as galleries, metrics as compact tiles, files as a compact grid. */
|
|
31
|
-
export const OutputsList = forwardRef(function OutputsList({ analysis, renderArtifact, onOpenRecord, className, ...props }, ref) {
|
|
21
|
+
export const OutputsList = forwardRef(function OutputsList({ analysis, renderArtifact, getOutputStatus, onOpenRecord, className, ...props }, ref) {
|
|
32
22
|
const labels = useLabels();
|
|
33
23
|
const figures = analysis.outputs.filter(({ type }) => type === 'figure');
|
|
34
24
|
const tables = analysis.outputs.filter(({ type }) => type === 'table');
|
|
@@ -38,6 +28,6 @@ export const OutputsList = forwardRef(function OutputsList({ analysis, renderArt
|
|
|
38
28
|
return _jsx(EmptyState, { "data-slot": "outputs-list", ...props, ref: ref, className: className, children: labels.empty.outputs });
|
|
39
29
|
}
|
|
40
30
|
const open = (output) => { onOpenRecord(output, analysis); };
|
|
41
|
-
return (_jsxs("div", { "data-slot": "outputs-list", ...props, ref: ref, className: cn('astra-inventory-outputs', className), children: [_jsx(
|
|
31
|
+
return (_jsxs("div", { "data-slot": "outputs-list", ...props, ref: ref, className: cn('astra-inventory-outputs', className), children: [_jsx(OutputGroup, { variant: "gallery", title: "Figures", outputs: figures, renderArtifact: renderArtifact, getOutputStatus: getOutputStatus, onOpen: open }), _jsx(OutputGroup, { variant: "gallery", title: "Tables", outputs: tables, renderArtifact: renderArtifact, getOutputStatus: getOutputStatus, onOpen: open }), _jsx(OutputGroup, { variant: "compact", title: "Metrics", outputs: metrics, renderArtifact: renderArtifact, getOutputStatus: getOutputStatus, onOpen: open }), _jsx(OutputGroup, { variant: "compact", title: "Output files", outputs: files, getOutputStatus: getOutputStatus, onOpen: open })] }));
|
|
42
32
|
});
|
|
43
33
|
//# sourceMappingURL=outputs-list.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outputs-list.js","sourceRoot":"","sources":["../../src/blocks/outputs-list.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAuB,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"outputs-list.js","sourceRoot":"","sources":["../../src/blocks/outputs-list.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAuB,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,EAAE,EAAE,MAAM,cAA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C,KAAK,EAAE,cAAc,KAAK,IAAI,CAAC;CACzC;AAED,2DAA2D;AAC3D,eAAO,MAAM,SAAS,2GASpB,CAAC;AAEH,eAAO,MAAM,UAAU,4GAgBrB,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { forwardRef } from 'react';
|
|
3
|
-
import { countLabel } from '../model/records.js';
|
|
4
3
|
import { cn } from '../lib/cn.js';
|
|
5
4
|
import { useLabels } from '../lib/labels.js';
|
|
5
|
+
import { PaperRow } from '../components/paper-row.js';
|
|
6
6
|
import { EmptyState } from '../primitives/record-list.js';
|
|
7
7
|
import { InventoryRecords } from './section.js';
|
|
8
8
|
/** Cited papers with their insight and decision counts. */
|
|
9
9
|
export const PaperRows = forwardRef(function PaperRows({ papers, onOpen, className, ...props }, ref) {
|
|
10
10
|
const labels = useLabels();
|
|
11
|
-
return (_jsx("div", { "data-slot": "paper-list", ...props, ref: ref, className: cn('astra-paper-list', className), role: "group", "aria-label": labels.sections.papers, children: papers.map((paper) => (
|
|
11
|
+
return (_jsx("div", { "data-slot": "paper-list", ...props, ref: ref, className: cn('astra-paper-list', className), role: "group", "aria-label": labels.sections.papers, children: papers.map((paper) => (_jsx(PaperRow, { paper: paper, onOpen: () => { onOpen(paper); } }, paper.doi))) }));
|
|
12
12
|
});
|
|
13
13
|
export const PapersList = forwardRef(function PapersList({ papers, analysis, onOpenPaper, className, ...props }, ref) {
|
|
14
14
|
const labels = useLabels();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"papers-list.js","sourceRoot":"","sources":["../../src/blocks/papers-list.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAuB,MAAM,OAAO,CAAC;AAExD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"papers-list.js","sourceRoot":"","sources":["../../src/blocks/papers-list.tsx"],"names":[],"mappings":";AACA,OAA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K,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,YAAG,MAAM,CAAC,KAAK,CAAC,MAAM,GAAc,CAAC;IAC3H,CAAC;IACD,OAAO,CACL,KAAC,gBAAgB,OAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,IAAI,EAAC,OAAO,EAAC,SAAS,EAAE,SAAS,YACtE,KAAC,SAAS,IAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE,EAAE,GAAG,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,GAAI,GAClE,CACpB,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../src/blocks/section.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"section.d.ts","sourceRoot":"","sources":["../../src/blocks/section.tsx"],"names":[],"mappings":"AACA,OAAO,EAAc,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAExE,OAAO,EAAE,KAAK,kBAAkB,EAAE,KAAK,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAG7E,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACvF,+DAA+D;IAC/D,EAAE,EAAE,MAAM,CAAC;IACX,6EAA6E;IAC7E,OAAO,CAAC,EAAE,kBAAkB,GAAG,SAAS,CAAC;IACzC,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,gFAAgF;IAChF,UAAU,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CACpC;AAED,qDAAqD;AACrD,eAAO,MAAM,gBAAgB,+GA2B3B,CAAC;AAGH,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,oEAAoE;IACpE,IAAI,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,WAAW,qBAAsB,SAAQ,IAAI,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,OAAO,CAAC;IACvF,OAAO,EAAE,qBAAqB,EAAE,CAAC;IACjC,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,CAAC;CAC/B;AAED,yDAAyD;AACzD,eAAO,MAAM,gBAAgB,+GA6B3B,CAAC;AAEH,MAAM,WAAW,qBAAsB,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC3E,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,eAAe,GAAG,OAAO,CAAC;CAC/E;AAED,2DAA2D;AAC3D,eAAO,MAAM,gBAAgB,kHAE3B,CAAC"}
|
package/dist/blocks/section.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { KindGlyph } from '../primitives/kind-glyph.js';
|
|
2
3
|
import { forwardRef } from 'react';
|
|
3
4
|
import { cn } from '../lib/cn.js';
|
|
4
|
-
import {
|
|
5
|
+
import {} from '../model/kind.js';
|
|
5
6
|
import { useLabels } from '../lib/labels.js';
|
|
6
7
|
/** A titled, counted block of the inventory page. */
|
|
7
8
|
export const InventorySection = forwardRef(function InventorySection({ id, section, title, count, countLabel, className, children, ...props }, ref) {
|
|
@@ -10,7 +11,7 @@ export const InventorySection = forwardRef(function InventorySection({ id, secti
|
|
|
10
11
|
/** The sticky "on this page" list of section anchors. */
|
|
11
12
|
export const InventoryOutline = forwardRef(function InventoryOutline({ entries, title, className, ...props }, ref) {
|
|
12
13
|
const labels = useLabels();
|
|
13
|
-
return (_jsxs("aside", { "data-slot": "inventory-outline", ...props, ref: ref, className: cn('astra-inventory-outline', className), "aria-label": labels.outline, children: [_jsx("h3", { children: title ?? labels.outline }), _jsx("nav", { children: entries.map((entry) => (_jsxs("a", { href: `#${entry.id}`, children: [_jsx("span", { className: "astra-inventory-outline__glyph", ...(entry.kind ? { 'data-kind': entry.kind } : {}), "aria-hidden": "true", children: entry.kind ?
|
|
14
|
+
return (_jsxs("aside", { "data-slot": "inventory-outline", ...props, ref: ref, className: cn('astra-inventory-outline', className), "aria-label": labels.outline, children: [_jsx("h3", { children: title ?? labels.outline }), _jsx("nav", { children: entries.map((entry) => (_jsxs("a", { href: `#${entry.id}`, children: [_jsx("span", { className: "astra-inventory-outline__glyph", ...(entry.kind ? { 'data-kind': entry.kind } : {}), "aria-hidden": "true", children: entry.kind ? _jsx(KindGlyph, { kind: entry.kind }) : null }), _jsx("span", { children: entry.label }), entry.count !== undefined ? _jsx("span", { children: entry.count }) : null] }, entry.id))) })] }));
|
|
14
15
|
});
|
|
15
16
|
/** Wrapper that gives a per-kind list its layout hooks. */
|
|
16
17
|
export const InventoryRecords = forwardRef(function InventoryRecords({ kind, className, ...props }, ref) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"section.js","sourceRoot":"","sources":["../../src/blocks/section.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAuC,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,
|
|
1
|
+
{"version":3,"file":"section.js","sourceRoot":"","sources":["../../src/blocks/section.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AACxD,OAAO,EAAE,UAAU,EAAuC,MAAM,OAAO,CAAC;AACxE,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAA6C,MAAM,kBAAkB,CAAC;AAC7E,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAa7C,qDAAqD;AACrD,MAAM,CAAC,MAAM,g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AC,IAAI,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,iBAAc,MAAM,YACrH,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,KAAC,SAAS,IAAC,IAAI,EAAE,KAAK,CAAC,IAAI,GAAI,CAAC,CAAC,CAAC,IAAI,GAC/C,EACP,yBAAO,KAAK,CAAC,KAAK,GAAQ,EACzB,KAAK,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,yBAAO,KAAK,CAAC,KAAK,GAAQ,CAAC,CAAC,CAAC,IAAI,KALxD,KAAK,CAAC,EAAE,CAMZ,CACL,CAAC,GACE,IACA,CACT,CAAC;AACJ,CAAC,CAAC,CAAC;AAMH,2DAA2D;AAC3D,MAAM,CAAC,MAAM,gBAAgB,GAAG,UAAU,CAAwC,SAAS,gBAAgB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG;IAC5I,OAAO,2BAAe,mBAAmB,KAAK,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,EAAE,CAAC,yBAAyB,EAAE,SAAS,CAAC,eAAa,IAAI,GAAI,CAAC;AAC1I,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
/** The gesture library magnifies the host's fitted figure; the host still owns its artifact. */
|
|
3
|
+
export declare function FigureZoom({ children }: {
|
|
4
|
+
children: ReactNode;
|
|
5
|
+
}): import("react").JSX.Element;
|
|
6
|
+
//# sourceMappingURL=figure-zoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"figure-zoom.d.ts","sourceRoot":"","sources":["../../src/components/figure-zoom.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AA6CvC,gGAAgG;AAChG,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAyB/D"}
|