@astra-spec/ui 0.0.2 → 0.0.3
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 +60 -2
- package/TOKENS.md +4 -0
- package/components.css +1 -0
- package/dist/components/index.d.ts +3 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +2 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/record-preview.d.ts +61 -0
- package/dist/components/record-preview.d.ts.map +1 -0
- package/dist/components/record-preview.js +177 -0
- package/dist/components/record-preview.js.map +1 -0
- package/dist/lib/labels.d.ts +12 -0
- package/dist/lib/labels.d.ts.map +1 -1
- package/dist/lib/labels.js +12 -0
- package/dist/lib/labels.js.map +1 -1
- package/dist/primitives/index.d.ts +3 -1
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +1 -0
- package/dist/primitives/index.js.map +1 -1
- package/dist/primitives/preview-popover.d.ts +30 -0
- package/dist/primitives/preview-popover.d.ts.map +1 -0
- package/dist/primitives/preview-popover.js +132 -0
- package/dist/primitives/preview-popover.js.map +1 -0
- package/dist/primitives/prose.d.ts +7 -1
- package/dist/primitives/prose.d.ts.map +1 -1
- package/dist/primitives/prose.js +13 -5
- package/dist/primitives/prose.js.map +1 -1
- package/package.json +2 -1
- package/primitives.css +1 -0
- package/src/components/index.ts +11 -1
- package/src/components/record-preview.tsx +761 -0
- package/src/lib/labels.tsx +27 -0
- package/src/primitives/index.ts +14 -1
- package/src/primitives/preview-popover.tsx +278 -0
- package/src/primitives/prose.tsx +28 -5
- package/styles/components/record-preview.css +316 -0
- package/styles/primitives/preview-popover.css +76 -0
- package/styles/tokens.css +5 -0
package/README.md
CHANGED
|
@@ -63,8 +63,8 @@ layer you need:
|
|
|
63
63
|
| --- | --- | --- |
|
|
64
64
|
| `@astra-spec/ui/views` | Complete, ready-made surfaces | `Inventory` |
|
|
65
65
|
| `@astra-spec/ui/blocks` | Sections that can be assembled into a custom page | `AnalysisTree`, inventory lists, `InventorySection`, `InventoryOutline` |
|
|
66
|
-
| `@astra-spec/ui/components` | One ASTRA record or paper at a time | `*Detail`, `*Dialog`, `RecordDialog`, `ArtifactPreview`, `useDetailStack` |
|
|
67
|
-
| `@astra-spec/ui/primitives` | Generic presentation with no resolved ASTRA model dependency beyond record kinds | Buttons, badges,
|
|
66
|
+
| `@astra-spec/ui/components` | One ASTRA record or paper at a time | `*Detail`, `*Dialog`, `RecordDialog`, `RecordPreview`, `ArtifactPreview`, `useDetailStack` |
|
|
67
|
+
| `@astra-spec/ui/primitives` | Generic presentation with no resolved ASTRA model dependency beyond record kinds | Buttons, badges, dialogs, `PreviewPopover`, detail-layout compounds, lists, prose, labels |
|
|
68
68
|
| `@astra-spec/ui/model` | Pure, React-free derivations over SDK data | Record lookup, relationships, paper collection, display labels, DOI helpers |
|
|
69
69
|
|
|
70
70
|
Every public file also has a direct subpath, such as
|
|
@@ -138,6 +138,61 @@ Dialogs support two modes:
|
|
|
138
138
|
and Escape/backdrop dismissal.
|
|
139
139
|
- `mode="embedded"` renders the same chrome as an inline panel.
|
|
140
140
|
|
|
141
|
+
### Record previews
|
|
142
|
+
|
|
143
|
+
`RecordPreview` is compact, positioning-agnostic content for three entry
|
|
144
|
+
shapes: a resolved record, an analysis node, or the contextual value emitted by
|
|
145
|
+
an inline ASTRA value. It preserves kind-specific evidence and provenance while
|
|
146
|
+
leaving artifact decoding, authored-text rendering, citation formatting, and
|
|
147
|
+
navigation with the host.
|
|
148
|
+
|
|
149
|
+
`PreviewPopover` is the matching generic primitive. It opens after a short
|
|
150
|
+
pointer-hover delay or immediately on keyboard focus, remains open while the
|
|
151
|
+
pointer or focus is inside it, flips and shifts at viewport edges, and dismisses
|
|
152
|
+
with Escape. Preview content may contain links, buttons, and nested previews,
|
|
153
|
+
so it is exposed as a non-modal dialog rather than a tooltip.
|
|
154
|
+
|
|
155
|
+
```tsx
|
|
156
|
+
import { indexAnalysis, type ResolvedDecision } from '@astra-spec/sdk';
|
|
157
|
+
import { RecordPreview } from '@astra-spec/ui/components';
|
|
158
|
+
import { PreviewPopover } from '@astra-spec/ui/primitives';
|
|
159
|
+
import '@astra-spec/ui/components.css';
|
|
160
|
+
|
|
161
|
+
const index = indexAnalysis(document);
|
|
162
|
+
const decision = index.recordByPath.get('decisions.method') as ResolvedDecision;
|
|
163
|
+
const analysis = index.analysisByRecordPath.get(decision.canonicalPath)!;
|
|
164
|
+
|
|
165
|
+
<PreviewPopover
|
|
166
|
+
label={`Decision preview: ${decision.label}`}
|
|
167
|
+
kind="decision"
|
|
168
|
+
trigger={<button type="button">{decision.label}</button>}
|
|
169
|
+
portalProps={{
|
|
170
|
+
// Portaled content cannot inherit classes or attributes from the trigger.
|
|
171
|
+
className: 'your-brand-scope',
|
|
172
|
+
'data-astra-color-scheme': 'light',
|
|
173
|
+
}}
|
|
174
|
+
>
|
|
175
|
+
<RecordPreview
|
|
176
|
+
entry={{ kind: 'record', record: decision, analysis }}
|
|
177
|
+
document={document}
|
|
178
|
+
index={index}
|
|
179
|
+
renderArtifact={renderArtifact}
|
|
180
|
+
renderText={renderText}
|
|
181
|
+
renderCitation={(doi) => <Cite doi={doi} />}
|
|
182
|
+
onOpenRecord={openFullRecord}
|
|
183
|
+
/>
|
|
184
|
+
</PreviewPopover>
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
The portal wrapper establishes an `astra-ui` scope when its mount does not
|
|
188
|
+
already inherit one. Use `portalProps` to add a brand scope and synchronize
|
|
189
|
+
`data-astra-color-scheme` plus any brand-specific scheme attribute. Alternatively,
|
|
190
|
+
mount it under an already-scoped element with `portalRoot`; with no `portalProps`,
|
|
191
|
+
the wrapper preserves that scope instead of creating a nested token root.
|
|
192
|
+
`renderRecordReference` receives each related record and its default trigger so
|
|
193
|
+
a host can wrap decision insights and finding outputs in a nested
|
|
194
|
+
`PreviewPopover` without copying preview markup.
|
|
195
|
+
|
|
141
196
|
### Artifact previews
|
|
142
197
|
|
|
143
198
|
The UI package does not read artifact files. `ArtifactPreview` renders safe,
|
|
@@ -175,6 +230,7 @@ The primitive layer is useful for building surfaces that match the library:
|
|
|
175
230
|
| Components | Purpose |
|
|
176
231
|
| --- | --- |
|
|
177
232
|
| `Button`, `IconButton`, `Badge` | Controls and status/kind labels |
|
|
233
|
+
| `PreviewPopover` | Accessible hover/focus positioning, viewport bounds, portal scoping, and nested preview coordination |
|
|
178
234
|
| `SurfaceHeader` | Reusable title, eyebrow, identifier, leading, and action layout |
|
|
179
235
|
| `Dialog`, `DialogProvider`, `DialogContent`, `DialogHeader`, `DialogBody`, `DialogClose`, `DialogBack`, `DialogAction` | Compound dialog context, state, and presentation building blocks |
|
|
180
236
|
| `DetailDialog` | Preset dialog shell used by record and paper dialogs |
|
|
@@ -193,6 +249,8 @@ and their public types.
|
|
|
193
249
|
Without it, outputs use `ArtifactPreview`'s unavailable state.
|
|
194
250
|
- `renderText(text, { field })` replaces the built-in prose renderer. The
|
|
195
251
|
default understands inline code, `$inline$` math, and `$$display$$` math.
|
|
252
|
+
Hosts that only need custom math commands can reuse that renderer with
|
|
253
|
+
`renderProse(text, { macros })`; macro values are KaTeX expansion strings.
|
|
196
254
|
- `renderPaper(paper, { focusEvidence })` renders host-owned paper content.
|
|
197
255
|
- `onFetchPaper(doi)` asks the host to load paper data. Feed the result and
|
|
198
256
|
`status: 'fetching' | 'error'` back through `paperMetadata`.
|
package/TOKENS.md
CHANGED
|
@@ -85,9 +85,13 @@ Every token is declared on `:where(.astra-ui)` at zero specificity in the `astra
|
|
|
85
85
|
| Token | Light default | Dark default |
|
|
86
86
|
| --- | --- | --- |
|
|
87
87
|
| `--astra-radius-control` | `0` | — |
|
|
88
|
+
| `--astra-radius-preview` | `0.1875rem` | — |
|
|
88
89
|
| `--astra-shadow-raised` | `none` | `0 5px 18px rgb(0 0 0 / 0.38)` |
|
|
90
|
+
| `--astra-shadow-preview` | `0 6px 18px rgb(34 31 32 / 0.1)` | `0 6px 18px rgb(0 0 0 / 0.45)` |
|
|
91
|
+
| `--astra-width-preview` | `27.5rem` | — |
|
|
89
92
|
| `--astra-space-2` | `0.5rem` | — |
|
|
90
93
|
| `--astra-space-3` | `0.75rem` | — |
|
|
91
94
|
| `--astra-z-dialog` | `1000` | — |
|
|
95
|
+
| `--astra-z-preview` | `1100` | — |
|
|
92
96
|
| `--astra-z-fullscreen` | `10000` | — |
|
|
93
97
|
|
package/components.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** ASTRA-aware components: one detail body and
|
|
1
|
+
/** ASTRA-aware components: compact previews, one detail body and dialog per record kind, papers, the RecordDialog router, and the detail stack. */
|
|
2
2
|
export { recordEntry, paperEntry, sameEntry } from './detail-entry.js';
|
|
3
3
|
export type { DetailEntry } from './detail-entry.js';
|
|
4
4
|
export { useDetailStack } from './use-detail-stack.js';
|
|
@@ -23,6 +23,8 @@ export { PaperDetail, PaperDialog, PaperDialogActions } from './paper-detail.js'
|
|
|
23
23
|
export type { PaperDetailProps, PaperDialogActionsProps, PaperDialogProps, PaperRenderOptions, PaperRenderer } from './paper-detail.js';
|
|
24
24
|
export { RecordDialog } from './record-dialog.js';
|
|
25
25
|
export type { RecordDialogProps } from './record-dialog.js';
|
|
26
|
+
export { RecordPreview } from './record-preview.js';
|
|
27
|
+
export type { RecordPreviewCitationContext, RecordPreviewCitationRenderer, RecordPreviewEntry, RecordPreviewProps, RecordPreviewReference, RecordPreviewReferenceRenderer, RecordPreviewTarget, } from './record-preview.js';
|
|
26
28
|
export { ArtifactPreview, metricPreviewFromJson, tablePreviewFromDelimited, tablePreviewFromRows, } from './artifact-preview.js';
|
|
27
29
|
export type { ArtifactPreviewData, ArtifactPreviewProps, ArtifactRenderOptions, ArtifactRenderer, DelimitedPreviewOptions, ImagePreviewData, LoadingPreviewData, MetricPreviewData, TablePreviewData, TextPreviewData, UnavailablePreviewData, } from './artifact-preview.js';
|
|
28
30
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,mJAAmJ;AACnJ,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACvE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACnF,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzG,YAAY,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC1G,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtE,YAAY,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACnE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAClF,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC5E,YAAY,EAAE,yBAAyB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3F,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AACjF,YAAY,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACxI,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EACV,4BAA4B,EAC5B,6BAA6B,EAC7B,kBAAkB,EAClB,kBAAkB,EAClB,sBAAsB,EACtB,8BAA8B,EAC9B,mBAAmB,GACpB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,qBAAqB,EACrB,gBAAgB,EAChB,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,eAAe,EACf,sBAAsB,GACvB,MAAM,uBAAuB,CAAC"}
|
package/dist/components/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** ASTRA-aware components: one detail body and
|
|
1
|
+
/** ASTRA-aware components: compact previews, one detail body and dialog per record kind, papers, the RecordDialog router, and the detail stack. */
|
|
2
2
|
export { recordEntry, paperEntry, sameEntry } from './detail-entry.js';
|
|
3
3
|
export { useDetailStack } from './use-detail-stack.js';
|
|
4
4
|
export { relationItemForRecord, relationItemsForLinks } from './relation-items.js';
|
|
@@ -11,5 +11,6 @@ export { InsightDetail, InsightDialog, primaryLiteratureEvidence } from './insig
|
|
|
11
11
|
export { InsightEvidenceTitle, InsightTrigger } from './insight-trigger.js';
|
|
12
12
|
export { PaperDetail, PaperDialog, PaperDialogActions } from './paper-detail.js';
|
|
13
13
|
export { RecordDialog } from './record-dialog.js';
|
|
14
|
+
export { RecordPreview } from './record-preview.js';
|
|
14
15
|
export { ArtifactPreview, metricPreviewFromJson, tablePreviewFromDelimited, tablePreviewFromRows, } from './artifact-preview.js';
|
|
15
16
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,mJAAmJ;AACnJ,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAEvE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD,OAAO,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AAEnF,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEzG,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtE,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAE/E,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,qBAAqB,CAAC;AAE9F,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAE5E,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAEjF,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAUpD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { AnalysisIndex, ResolvedAnalysisDocument, ResolvedAnalysisNode, ResolvedDecision, ResolvedEvidence, ResolvedInsight, ResolvedOutput, ResolvedRecord } from '@astra-spec/sdk';
|
|
2
|
+
import { type HTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
3
|
+
import { type TextRenderer } from '../primitives/prose.js';
|
|
4
|
+
import type { ArtifactRenderer } from './artifact-preview.js';
|
|
5
|
+
import type { OpenRecordHandler } from './relation-items.js';
|
|
6
|
+
export interface RecordPreviewTarget {
|
|
7
|
+
record: ResolvedRecord;
|
|
8
|
+
analysis: ResolvedAnalysisNode;
|
|
9
|
+
}
|
|
10
|
+
export interface RecordPreviewReference {
|
|
11
|
+
target: RecordPreviewTarget;
|
|
12
|
+
/** Default record trigger. A host may wrap it in another PreviewPopover. */
|
|
13
|
+
trigger: ReactElement;
|
|
14
|
+
}
|
|
15
|
+
export type RecordPreviewReferenceRenderer = (reference: RecordPreviewReference) => ReactNode;
|
|
16
|
+
export interface RecordPreviewCitationContext {
|
|
17
|
+
evidence: ResolvedEvidence;
|
|
18
|
+
record: ResolvedInsight;
|
|
19
|
+
}
|
|
20
|
+
export type RecordPreviewCitationRenderer = (doi: string, context: RecordPreviewCitationContext) => ReactNode;
|
|
21
|
+
export type RecordPreviewEntry = {
|
|
22
|
+
kind: 'record';
|
|
23
|
+
record: ResolvedRecord;
|
|
24
|
+
analysis: ResolvedAnalysisNode;
|
|
25
|
+
} | {
|
|
26
|
+
kind: 'analysis';
|
|
27
|
+
analysis: ResolvedAnalysisNode;
|
|
28
|
+
href?: string | undefined;
|
|
29
|
+
} | {
|
|
30
|
+
kind: 'value';
|
|
31
|
+
record: ResolvedOutput | ResolvedDecision;
|
|
32
|
+
analysis: ResolvedAnalysisNode;
|
|
33
|
+
value: ReactNode;
|
|
34
|
+
unit?: string | undefined;
|
|
35
|
+
column?: string | undefined;
|
|
36
|
+
filter?: string | undefined;
|
|
37
|
+
product?: string | undefined;
|
|
38
|
+
selection?: string | undefined;
|
|
39
|
+
};
|
|
40
|
+
export interface RecordPreviewProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
|
|
41
|
+
entry: RecordPreviewEntry;
|
|
42
|
+
document: ResolvedAnalysisDocument;
|
|
43
|
+
index: AnalysisIndex;
|
|
44
|
+
renderArtifact?: ArtifactRenderer | undefined;
|
|
45
|
+
renderText?: TextRenderer | undefined;
|
|
46
|
+
renderCitation?: RecordPreviewCitationRenderer | undefined;
|
|
47
|
+
/** Opens the full record surface when a related-record trigger is activated. */
|
|
48
|
+
onOpenRecord?: OpenRecordHandler | undefined;
|
|
49
|
+
/** Optional navigation for an analysis preview. The callback receives only a safe HTTP(S) or relative href. */
|
|
50
|
+
onOpenAnalysis?: ((analysis: ResolvedAnalysisNode, href?: string) => void) | undefined;
|
|
51
|
+
/** Wraps related-record triggers, for example in a nested PreviewPopover. */
|
|
52
|
+
renderRecordReference?: RecordPreviewReferenceRenderer | undefined;
|
|
53
|
+
/** Compact decision previews show this many supporting insights before a remaining count. */
|
|
54
|
+
maxSupportingInsights?: number | undefined;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Compact, positioning-agnostic preview content for resolved records,
|
|
58
|
+
* analyses, and inline values. Pair it with PreviewPopover or render it inline.
|
|
59
|
+
*/
|
|
60
|
+
export declare const RecordPreview: import("react").ForwardRefExoticComponent<RecordPreviewProps & import("react").RefAttributes<HTMLElement>>;
|
|
61
|
+
//# sourceMappingURL=record-preview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-preview.d.ts","sourceRoot":"","sources":["../../src/components/record-preview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,aAAa,EACb,wBAAwB,EACxB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAEhB,eAAe,EACf,cAAc,EACd,cAAc,EACf,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAMf,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAGlE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,MAAM,WAAW,mBAAmB;IAClC,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,oBAAoB,CAAC;CAChC;AAED,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,mBAAmB,CAAC;IAC5B,4EAA4E;IAC5E,OAAO,EAAE,YAAY,CAAC;CACvB;AAED,MAAM,MAAM,8BAA8B,GAAG,CAC3C,SAAS,EAAE,sBAAsB,KAC9B,SAAS,CAAC;AAEf,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,eAAe,CAAC;CACzB;AAED,MAAM,MAAM,6BAA6B,GAAG,CAC1C,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,4BAA4B,KAClC,SAAS,CAAC;AAEf,MAAM,MAAM,kBAAkB,GAC1B;IACE,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,cAAc,CAAC;IACvB,QAAQ,EAAE,oBAAoB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AGG;AACH,eAAO,MAAM,aAAa,4GA0DzB,CAAC"}
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, } from 'react';
|
|
3
|
+
import { cn } from '../lib/cn.js';
|
|
4
|
+
import { useLabels } from '../lib/labels.js';
|
|
5
|
+
import { doiHref } from '../model/doi.js';
|
|
6
|
+
import { analysisTitle, recordTitle } from '../model/records.js';
|
|
7
|
+
import { decisionInsights } from '../model/relations.js';
|
|
8
|
+
import { Prose } from '../primitives/prose.js';
|
|
9
|
+
import { surfaceGlyph } from '../primitives/kind.js';
|
|
10
|
+
import { SurfaceHeader } from '../primitives/surface-header.js';
|
|
11
|
+
import { primaryLiteratureEvidence } from './insight-detail.js';
|
|
12
|
+
function claimExcerpt(claim) {
|
|
13
|
+
const text = claim.trim().replace(/\s+/g, ' ');
|
|
14
|
+
const sentence = /^.{10,90}?[.!?](?=\s|$)/.exec(text)?.[0];
|
|
15
|
+
if (sentence)
|
|
16
|
+
return sentence;
|
|
17
|
+
if (text.length <= 90)
|
|
18
|
+
return text;
|
|
19
|
+
return `${text.slice(0, 80).replace(/\s+\S*$/, '')}…`;
|
|
20
|
+
}
|
|
21
|
+
function relationTitle(record) {
|
|
22
|
+
if ((record.kind === 'finding' || record.kind === 'prior_insight') &&
|
|
23
|
+
!record.label) {
|
|
24
|
+
return claimExcerpt(record.claim) || record.id;
|
|
25
|
+
}
|
|
26
|
+
return recordTitle(record);
|
|
27
|
+
}
|
|
28
|
+
function KindEyebrow({ kind, label }) {
|
|
29
|
+
return (_jsxs("span", { className: "astra-record-preview__kind", children: [_jsx("span", { "aria-hidden": "true", children: surfaceGlyph(kind) }), label] }));
|
|
30
|
+
}
|
|
31
|
+
function PreviewHeader({ kind, kindLabel, title, }) {
|
|
32
|
+
return (_jsx(SurfaceHeader, { density: "compact", kind: kind, titleAs: "h3", eyebrow: _jsx(KindEyebrow, { kind: kind, label: kindLabel }), title: title, className: "astra-record-preview__header" }));
|
|
33
|
+
}
|
|
34
|
+
function Citation({ evidence, record, renderCitation, }) {
|
|
35
|
+
const doi = evidence.doi;
|
|
36
|
+
if (!doi)
|
|
37
|
+
return null;
|
|
38
|
+
return (_jsx("div", { className: "astra-record-preview__citation", children: renderCitation ? (renderCitation(doi, { evidence, record })) : (_jsxs("a", { href: doiHref(doi), target: "_blank", rel: "noreferrer", children: [doi, " ", _jsx("span", { "aria-hidden": "true", children: "\u2197" })] })) }));
|
|
39
|
+
}
|
|
40
|
+
function RelatedRecord({ record, index, onOpenRecord, renderRecordReference, detail, }) {
|
|
41
|
+
const labels = useLabels();
|
|
42
|
+
const analysis = index.analysisByRecordPath.get(record.canonicalPath);
|
|
43
|
+
const label = relationTitle(record);
|
|
44
|
+
const copy = (_jsxs(_Fragment, { children: [_jsx("span", { className: "astra-record-preview__relation-glyph", "aria-hidden": "true", children: surfaceGlyph(record.kind) }), _jsx("span", { className: "astra-record-preview__relation-label", children: label }), detail != null ? (_jsx("small", { className: "astra-record-preview__relation-detail", children: detail })) : null] }));
|
|
45
|
+
const trigger = analysis && onOpenRecord ? (_jsx("button", { type: "button", className: "astra-record-preview__relation-trigger", "data-kind": record.kind, "aria-label": labels.preview.openRecord(labels.kinds[record.kind], label), onClick: () => {
|
|
46
|
+
onOpenRecord(record, analysis);
|
|
47
|
+
}, children: copy })) : (_jsx("span", { className: "astra-record-preview__relation-trigger", "data-kind": record.kind, children: copy }));
|
|
48
|
+
if (!analysis || !renderRecordReference)
|
|
49
|
+
return trigger;
|
|
50
|
+
return renderRecordReference({ target: { record, analysis }, trigger });
|
|
51
|
+
}
|
|
52
|
+
function DecisionPreview({ record, index, renderText, onOpenRecord, renderRecordReference, maxSupportingInsights, }) {
|
|
53
|
+
const labels = useLabels();
|
|
54
|
+
const supporting = decisionInsights(index, record);
|
|
55
|
+
const shown = supporting.slice(0, maxSupportingInsights);
|
|
56
|
+
const remaining = supporting.length - shown.length;
|
|
57
|
+
return (_jsxs(_Fragment, { children: [_jsx(PreviewHeader, { kind: "decision", kindLabel: labels.kinds.decision, title: recordTitle(record) }), _jsxs("div", { className: "astra-record-preview__body", children: [record.rationale ? (_jsx("div", { className: "astra-record-preview__description", children: _jsx(Prose, { text: record.rationale, field: "rationale", renderText: renderText }) })) : null, record.options.length ? (_jsxs("section", { className: "astra-record-preview__section", children: [_jsx("h4", { children: labels.preview.optionDetail }), _jsx("ul", { className: "astra-record-preview__options", children: record.options.map((option) => {
|
|
58
|
+
const selected = option.id === record.selectedOptionId;
|
|
59
|
+
return (_jsxs("li", { "data-selected": selected ? '' : undefined, "data-unselected": selected ? undefined : '', "data-excluded": option.excluded ? '' : undefined, children: [_jsx("span", { "aria-hidden": "true", children: selected ? '●' : '○' }), _jsx("span", { className: "astra-record-preview__option-status", children: labels.preview.optionStatus(selected, Boolean(option.excluded)) }), _jsx("strong", { children: option.label })] }, option.id));
|
|
60
|
+
}) })] })) : null, supporting.length ? (_jsxs("section", { className: "astra-record-preview__section", children: [_jsx("h4", { children: labels.preview.supportedBy }), _jsxs("ul", { className: "astra-record-preview__relations", children: [shown.map((insight) => (_jsx("li", { "data-kind": insight.kind, children: _jsx(RelatedRecord, { record: insight, index: index, onOpenRecord: onOpenRecord, renderRecordReference: renderRecordReference }) }, insight.canonicalPath))), remaining > 0 ? (_jsx("li", { className: "astra-record-preview__remaining", children: labels.preview.remainingDecisionDetails(remaining) })) : null] })] })) : null] })] }));
|
|
61
|
+
}
|
|
62
|
+
function FindingPreview({ record, index, renderArtifact, renderText, renderCitation, onOpenRecord, renderRecordReference, }) {
|
|
63
|
+
const labels = useLabels();
|
|
64
|
+
return (_jsxs(_Fragment, { children: [_jsx(PreviewHeader, { kind: "finding", kindLabel: labels.kinds.finding, title: recordTitle(record) }), _jsxs("div", { className: "astra-record-preview__body", children: [_jsx("div", { className: "astra-record-preview__claim", children: _jsx(Prose, { text: record.claim, field: "claim", renderText: renderText }) }), record.scope ? (_jsx("span", { className: "astra-record-preview__scope", children: _jsx(Prose, { text: record.scope, renderText: renderText }) })) : null, record.notes ? (_jsx("div", { className: "astra-record-preview__description", children: _jsx(Prose, { text: record.notes, field: "notes", renderText: renderText }) })) : null, record.evidence.length ? (_jsxs("section", { className: "astra-record-preview__section", children: [_jsx("h4", { children: labels.preview.evidence }), _jsx("ul", { className: "astra-record-preview__evidence", children: record.evidence.map((evidence, indexInRecord) => {
|
|
65
|
+
const candidate = evidence.resolvedOutputPath
|
|
66
|
+
? index.recordByPath.get(evidence.resolvedOutputPath)
|
|
67
|
+
: undefined;
|
|
68
|
+
const output = candidate?.kind === 'output' ? candidate : undefined;
|
|
69
|
+
const artifact = output && renderArtifact
|
|
70
|
+
? renderArtifact(output, { compact: true })
|
|
71
|
+
: null;
|
|
72
|
+
return (_jsxs("li", { children: [artifact != null ? (_jsx("div", { className: "astra-record-preview__artifact", children: artifact })) : null, output ? (_jsx(RelatedRecord, { record: output, index: index, detail: output.type, onOpenRecord: onOpenRecord, renderRecordReference: renderRecordReference })) : evidence.artifact ? (_jsxs("span", { className: "astra-record-preview__relation-trigger", "data-kind": "output", children: [_jsx("span", { className: "astra-record-preview__relation-glyph", "aria-hidden": "true", children: surfaceGlyph('output') }), _jsx("span", { className: "astra-record-preview__relation-label", children: evidence.artifact })] })) : null, evidence.quote ? (_jsx("blockquote", { className: "astra-record-preview__quote", children: _jsx(Prose, { text: evidence.quote.exact, field: "quote", renderText: renderText }) })) : null, _jsx(Citation, { evidence: evidence, record: record, renderCitation: renderCitation })] }, `${evidence.id}-${indexInRecord}`));
|
|
73
|
+
}) })] })) : null] })] }));
|
|
74
|
+
}
|
|
75
|
+
function InsightPreview({ record, renderText, renderCitation, }) {
|
|
76
|
+
const labels = useLabels();
|
|
77
|
+
const source = primaryLiteratureEvidence(record);
|
|
78
|
+
return (_jsxs(_Fragment, { children: [_jsx(PreviewHeader, { kind: "prior_insight", kindLabel: labels.kinds.prior_insight }), _jsxs("div", { className: "astra-record-preview__body", children: [_jsx("div", { className: "astra-record-preview__description", children: _jsx(Prose, { text: record.claim, field: "claim", renderText: renderText }) }), source?.quote ? (_jsx("blockquote", { className: "astra-record-preview__quote", children: _jsx(Prose, { text: source.quote.exact, field: "quote", renderText: renderText }) })) : null, source ? (_jsx(Citation, { evidence: source, record: record, renderCitation: renderCitation })) : null] })] }));
|
|
79
|
+
}
|
|
80
|
+
function OutputRecordPreview({ record, index, renderArtifact, renderText, }) {
|
|
81
|
+
const labels = useLabels();
|
|
82
|
+
const inputNames = record.provenance.inputPaths.map((path) => {
|
|
83
|
+
const input = index.recordByPath.get(path);
|
|
84
|
+
return input ? recordTitle(input) : path;
|
|
85
|
+
});
|
|
86
|
+
const recipe = record.recipe?.command ?? record.recipe?.container;
|
|
87
|
+
const flow = [
|
|
88
|
+
inputNames.length ? inputNames.join(', ') : undefined,
|
|
89
|
+
recipe,
|
|
90
|
+
record.canonicalPath,
|
|
91
|
+
].filter((value) => Boolean(value));
|
|
92
|
+
const artifact = renderArtifact
|
|
93
|
+
? renderArtifact(record, { compact: true })
|
|
94
|
+
: null;
|
|
95
|
+
return (_jsxs(_Fragment, { children: [_jsx(PreviewHeader, { kind: "output", kindLabel: labels.kinds.output, title: recordTitle(record) }), _jsxs("div", { className: "astra-record-preview__body", children: [record.description ? (_jsx("div", { className: "astra-record-preview__description", children: _jsx(Prose, { text: record.description, field: "description", renderText: renderText }) })) : null, artifact != null ? (_jsx("div", { className: "astra-record-preview__artifact", children: artifact })) : null, flow.length > 1 ? (_jsxs("section", { className: "astra-record-preview__section", children: [_jsx("h4", { children: labels.preview.provenance }), _jsx("ol", { className: "astra-record-preview__flow", children: flow.map((node, indexInFlow) => (_jsx("li", { children: _jsx("code", { children: node }) }, `${node}-${indexInFlow}`))) })] })) : null] })] }));
|
|
96
|
+
}
|
|
97
|
+
function InputPreview({ record, renderText, }) {
|
|
98
|
+
const labels = useLabels();
|
|
99
|
+
const source = record.source ?? record.ref ?? record.resolvedFrom ?? record.from;
|
|
100
|
+
return (_jsxs(_Fragment, { children: [_jsx(PreviewHeader, { kind: "input", kindLabel: labels.kinds.input, title: recordTitle(record) }), _jsxs("div", { className: "astra-record-preview__body", children: [record.description ? (_jsx("div", { className: "astra-record-preview__description", children: _jsx(Prose, { text: record.description, field: "description", renderText: renderText }) })) : null, source ? (_jsxs("section", { className: "astra-record-preview__section", children: [_jsx("h4", { children: labels.preview.source }), _jsx("code", { className: "astra-record-preview__source", children: source })] })) : null] })] }));
|
|
101
|
+
}
|
|
102
|
+
function RecordEntryPreview({ record, maxSupportingInsights, ...shared }) {
|
|
103
|
+
switch (record.kind) {
|
|
104
|
+
case 'decision':
|
|
105
|
+
return (_jsx(DecisionPreview, { ...shared, record: record, maxSupportingInsights: maxSupportingInsights }));
|
|
106
|
+
case 'finding':
|
|
107
|
+
return _jsx(FindingPreview, { ...shared, record: record });
|
|
108
|
+
case 'prior_insight':
|
|
109
|
+
return _jsx(InsightPreview, { ...shared, record: record });
|
|
110
|
+
case 'output':
|
|
111
|
+
return _jsx(OutputRecordPreview, { ...shared, record: record });
|
|
112
|
+
case 'input':
|
|
113
|
+
return _jsx(InputPreview, { ...shared, record: record });
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
function AnalysisPreview({ analysis, href, renderText, onOpenAnalysis, }) {
|
|
117
|
+
const labels = useLabels();
|
|
118
|
+
const title = analysisTitle(analysis);
|
|
119
|
+
const safeHref = (() => {
|
|
120
|
+
if (!href)
|
|
121
|
+
return undefined;
|
|
122
|
+
try {
|
|
123
|
+
const parsed = new URL(href, 'https://astra-ui.invalid/');
|
|
124
|
+
return parsed.protocol === 'http:' || parsed.protocol === 'https:'
|
|
125
|
+
? href
|
|
126
|
+
: undefined;
|
|
127
|
+
}
|
|
128
|
+
catch {
|
|
129
|
+
return undefined;
|
|
130
|
+
}
|
|
131
|
+
})();
|
|
132
|
+
let titleNode = title;
|
|
133
|
+
if (onOpenAnalysis) {
|
|
134
|
+
titleNode = (_jsx("button", { type: "button", className: "astra-record-preview__analysis-link", onClick: () => {
|
|
135
|
+
onOpenAnalysis(analysis, safeHref);
|
|
136
|
+
}, children: title }));
|
|
137
|
+
}
|
|
138
|
+
else if (safeHref) {
|
|
139
|
+
titleNode = (_jsx("a", { className: "astra-record-preview__analysis-link", href: safeHref, children: title }));
|
|
140
|
+
}
|
|
141
|
+
return (_jsxs(_Fragment, { children: [_jsx(PreviewHeader, { kind: "analysis", kindLabel: labels.kinds.analysis, title: titleNode }), _jsxs("div", { className: "astra-record-preview__body", children: [analysis.description ? (_jsx("div", { className: "astra-record-preview__description", children: _jsx(Prose, { text: analysis.description, field: "description", renderText: renderText }) })) : null, _jsxs("p", { className: "astra-record-preview__counts", children: [labels.sectionCount('decisions', analysis.decisions.length), ' · ', labels.sectionCount('outputs', analysis.outputs.length)] })] })] }));
|
|
142
|
+
}
|
|
143
|
+
function ValuePreview({ entry, renderText, }) {
|
|
144
|
+
const labels = useLabels();
|
|
145
|
+
const { record } = entry;
|
|
146
|
+
const kindLabel = record.kind === 'output' ? labels.kinds.output : labels.kinds.decision;
|
|
147
|
+
const description = record.kind === 'output' ? record.description : record.rationale;
|
|
148
|
+
return (_jsxs(_Fragment, { children: [_jsx(PreviewHeader, { kind: record.kind, kindLabel: kindLabel, title: _jsxs("span", { className: "astra-record-preview__value", children: [entry.value, entry.unit ? (_jsxs("small", { className: "astra-record-preview__unit", children: [" ", entry.unit] })) : null] }) }), _jsxs("div", { className: "astra-record-preview__body", children: [entry.column ||
|
|
149
|
+
entry.filter ||
|
|
150
|
+
entry.product ||
|
|
151
|
+
entry.selection ? (_jsxs("div", { className: "astra-record-preview__selection", children: [entry.column ? _jsx("code", { children: entry.column }) : null, entry.filter ? _jsx("span", { children: entry.filter }) : null, entry.selection ? _jsx("code", { children: entry.selection }) : null, entry.product ? (_jsx("span", { children: labels.preview.valueSource(entry.product) })) : null] })) : null, description ? (_jsx("div", { className: "astra-record-preview__description", children: _jsx(Prose, { text: description, field: record.kind === 'output' ? 'description' : 'rationale', renderText: renderText }) })) : null] })] }));
|
|
152
|
+
}
|
|
153
|
+
function previewKind(entry) {
|
|
154
|
+
if (entry.kind === 'analysis')
|
|
155
|
+
return 'analysis';
|
|
156
|
+
return entry.record.kind;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Compact, positioning-agnostic preview content for resolved records,
|
|
160
|
+
* analyses, and inline values. Pair it with PreviewPopover or render it inline.
|
|
161
|
+
*/
|
|
162
|
+
export const RecordPreview = forwardRef(function RecordPreview({ entry, document, index, renderArtifact, renderText, renderCitation, onOpenRecord, onOpenAnalysis, renderRecordReference, maxSupportingInsights = 3, className, ...props }, ref) {
|
|
163
|
+
const maximum = Number.isFinite(maxSupportingInsights)
|
|
164
|
+
? Math.max(0, Math.floor(maxSupportingInsights))
|
|
165
|
+
: Number.MAX_SAFE_INTEGER;
|
|
166
|
+
const shared = {
|
|
167
|
+
document,
|
|
168
|
+
index,
|
|
169
|
+
renderArtifact,
|
|
170
|
+
renderText,
|
|
171
|
+
renderCitation,
|
|
172
|
+
onOpenRecord,
|
|
173
|
+
renderRecordReference,
|
|
174
|
+
};
|
|
175
|
+
return (_jsx("article", { "data-slot": "record-preview", "data-entry-kind": entry.kind, "data-kind": previewKind(entry), ...props, ref: ref, className: cn('astra-record-preview', className), children: entry.kind === 'record' ? (_jsx(RecordEntryPreview, { ...shared, record: entry.record, maxSupportingInsights: maximum })) : entry.kind === 'analysis' ? (_jsx(AnalysisPreview, { analysis: entry.analysis, href: entry.href, renderText: renderText, onOpenAnalysis: onOpenAnalysis })) : (_jsx(ValuePreview, { entry: entry, renderText: renderText })) }));
|
|
176
|
+
});
|
|
177
|
+
//# sourceMappingURL=record-preview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"record-preview.js","sourceRoot":"","sources":["../../src/components/record-preview.tsx"],"names":[],"mappings":";AAWA,OAAO,EACL,UAAU,GAIX,MAAM,OAAO,CAAC;AACf,OAA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AQ,EACxB,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc,GAC9B,CACH,CAAC,CAAC,CAAC,CACF,KAAC,YAAY,IAAC,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,UAAU,GAAI,CACvD,GACO,CACX,CAAC;AACJ,CAAC,CACF,CAAC"}
|
package/dist/lib/labels.d.ts
CHANGED
|
@@ -43,6 +43,18 @@ export interface AstraLabels {
|
|
|
43
43
|
openPaper: string;
|
|
44
44
|
locate: string;
|
|
45
45
|
};
|
|
46
|
+
/** Copy used only by the compact RecordPreview surface. */
|
|
47
|
+
preview: {
|
|
48
|
+
optionDetail: string;
|
|
49
|
+
supportedBy: string;
|
|
50
|
+
evidence: string;
|
|
51
|
+
provenance: string;
|
|
52
|
+
source: string;
|
|
53
|
+
openRecord: (kindLabel: string, recordLabel: string) => string;
|
|
54
|
+
optionStatus: (selected: boolean, excluded: boolean) => string;
|
|
55
|
+
remainingDecisionDetails: (count: number) => string;
|
|
56
|
+
valueSource: (product: string) => string;
|
|
57
|
+
};
|
|
46
58
|
}
|
|
47
59
|
export declare const defaultLabels: AstraLabels;
|
|
48
60
|
/** Deep partial of the label set, for host overrides. */
|
package/dist/lib/labels.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labels.d.ts","sourceRoot":"","sources":["../../src/lib/labels.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAE3E,4EAA4E;AAC5E,MAAM,WAAW,WAAW;IAC1B,QAAQ,EAAE;QACR,OAAO,EAAE,MAAM,CAAC;QAChB,SAAS,EAAE,MAAM,CAAC;QAClB,MAAM,EAAE,MAAM,CAAC;QACf,QAAQ,EAAE,MAAM,CAAC;QACjB,cAAc,EAAE,MAAM,CAAC;QACvB,MAAM,EAAE,MAAM,CAAC;KAChB,CAAC;IACF,OAAO,EAAE,MAAM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BAAgB,SAAS,IAAI,WAAW,CAEvC"}
|
package/dist/lib/labels.js
CHANGED
|
@@ -50,6 +50,17 @@ export const defaultLabels = {
|
|
|
50
50
|
openPaper: 'Open',
|
|
51
51
|
locate: 'Locate',
|
|
52
52
|
},
|
|
53
|
+
preview: {
|
|
54
|
+
optionDetail: 'Option detail',
|
|
55
|
+
supportedBy: 'Supported by',
|
|
56
|
+
evidence: 'Evidence',
|
|
57
|
+
provenance: 'Provenance',
|
|
58
|
+
source: 'Source',
|
|
59
|
+
openRecord: (kindLabel, recordLabel) => `Open ${kindLabel.toLowerCase()} details: ${recordLabel}`,
|
|
60
|
+
optionStatus: (selected, excluded) => `${selected ? 'Selected.' : 'Not selected.'}${excluded ? ' Excluded.' : ''}`,
|
|
61
|
+
remainingDecisionDetails: (count) => `+ ${count} more in the decision details`,
|
|
62
|
+
valueSource: (product) => `from ${product}`,
|
|
63
|
+
},
|
|
53
64
|
};
|
|
54
65
|
function defined(value) {
|
|
55
66
|
return Object.fromEntries(Object.entries(value).filter(([, member]) => member !== undefined));
|
|
@@ -63,6 +74,7 @@ function merge(base, overrides) {
|
|
|
63
74
|
kinds: { ...base.kinds, ...defined(overrides.kinds ?? {}) },
|
|
64
75
|
empty: { ...base.empty, ...defined(overrides.empty ?? {}) },
|
|
65
76
|
actions: { ...base.actions, ...defined(overrides.actions ?? {}) },
|
|
77
|
+
preview: { ...base.preview, ...defined(overrides.preview ?? {}) },
|
|
66
78
|
};
|
|
67
79
|
}
|
|
68
80
|
export function mergeLabels(overrides) {
|
package/dist/lib/labels.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../src/lib/labels.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"labels.js","sourceRoot":"","sources":["../../src/lib/labels.tsx"],"names":[],"mappings":";AAAA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AAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,YAAG,QAAQ,GAA0B,CAAC;AACnF,CAAC;AAED,MAAM,UAAU,SAAS;IACvB,OAAO,UAAU,CAAC,aAAa,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -8,6 +8,8 @@ export { surfaceGlyph } from './kind.js';
|
|
|
8
8
|
export type { SurfaceKind } from './kind.js';
|
|
9
9
|
export { Button, IconButton } from './button.js';
|
|
10
10
|
export type { ButtonProps, ButtonSize, ButtonTone, ButtonVariant, IconButtonProps } from './button.js';
|
|
11
|
+
export { PreviewPopover } from './preview-popover.js';
|
|
12
|
+
export type { PreviewPopoverPortalProps, PreviewPopoverProps, } from './preview-popover.js';
|
|
11
13
|
export { Badge } from './badge.js';
|
|
12
14
|
export type { BadgeProps, BadgeStatus, BadgeTone } from './badge.js';
|
|
13
15
|
export { SurfaceHeader } from './surface-header.js';
|
|
@@ -21,5 +23,5 @@ export type { RelationItem, RelationListProps } from './relation-list.js';
|
|
|
21
23
|
export { CountHeading, DetailLayout, DetailMain, DetailRail, DetailSection } from './detail-layout.js';
|
|
22
24
|
export type { CountHeadingProps, DetailLayoutMode, DetailLayoutProps, DetailRailProps, DetailSectionProps } from './detail-layout.js';
|
|
23
25
|
export { Prose, parseProse, renderProse } from './prose.js';
|
|
24
|
-
export type { ProseContext, ProseField, ProseProps, ProseToken, TextRenderer } from './prose.js';
|
|
26
|
+
export type { ProseContext, ProseField, ProseMathMacros, ProseProps, ProseRenderOptions, ProseToken, TextRenderer, } from './prose.js';
|
|
25
27
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,YAAY,EAAE,SAA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.js
CHANGED
|
@@ -4,6 +4,7 @@ export { Slot } from '../lib/slot.js';
|
|
|
4
4
|
export { LabelsProvider, defaultLabels, mergeLabels, useLabels } from '../lib/labels.js';
|
|
5
5
|
export { surfaceGlyph } from './kind.js';
|
|
6
6
|
export { Button, IconButton } from './button.js';
|
|
7
|
+
export { PreviewPopover } from './preview-popover.js';
|
|
7
8
|
export { Badge } from './badge.js';
|
|
8
9
|
export { SurfaceHeader } from './surface-header.js';
|
|
9
10
|
export { DetailDialog, Dialog, DialogAction, DialogBack, DialogBody, DialogClose, DialogContent, DialogHeader, DialogProvider, useDialog, useDialogDismissGuard, } from './dialog.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EACL,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,UAAU,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAcrB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEvG,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/primitives/index.ts"],"names":[],"mappings":"AAAA,mFAAmF;AACnF,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAEzF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAEzC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAKtD,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EACL,YAAY,EACZ,MAAM,EACN,YAAY,EACZ,UAAU,EACV,UAAU,EACV,WAAW,EACX,aAAa,EACb,YAAY,EACZ,cAAc,EACd,SAAS,EACT,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAcrB,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEvG,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactElement, type ReactNode } from 'react';
|
|
2
|
+
import type { SurfaceKind } from './kind.js';
|
|
3
|
+
export interface PreviewPopoverPortalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
4
|
+
[attribute: `data-${string}`]: string | number | boolean | null | undefined;
|
|
5
|
+
'data-astra-color-scheme'?: 'light' | 'dark' | undefined;
|
|
6
|
+
}
|
|
7
|
+
export interface PreviewPopoverProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children' | 'content'> {
|
|
8
|
+
/** A single focusable element. Non-focusable elements receive `tabIndex=0`. */
|
|
9
|
+
trigger: ReactElement;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
/** Accessible name for the non-modal preview dialog. */
|
|
12
|
+
label: string;
|
|
13
|
+
kind?: SurfaceKind | undefined;
|
|
14
|
+
disabled?: boolean | undefined;
|
|
15
|
+
open?: boolean | undefined;
|
|
16
|
+
defaultOpen?: boolean | undefined;
|
|
17
|
+
onOpenChange?: ((open: boolean) => void) | undefined;
|
|
18
|
+
openDelay?: number | undefined;
|
|
19
|
+
closeDelay?: number | undefined;
|
|
20
|
+
/** Optional portal mount. The document body is used by default. */
|
|
21
|
+
portalRoot?: HTMLElement | ShadowRoot | null | undefined;
|
|
22
|
+
/** Host scope and scheme attributes belong here because portals do not inherit DOM ancestry. */
|
|
23
|
+
portalProps?: PreviewPopoverPortalProps | undefined;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Cursor-anchored, non-modal preview opened by hover or keyboard focus.
|
|
27
|
+
* The outermost instance creates the Floating UI tree needed by nested previews.
|
|
28
|
+
*/
|
|
29
|
+
export declare function PreviewPopover(props: PreviewPopoverProps): import("react").JSX.Element;
|
|
30
|
+
//# sourceMappingURL=preview-popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"preview-popover.d.ts","sourceRoot":"","sources":["../../src/primitives/preview-popover.tsx"],"names":[],"mappings":"AA4BA,OAAO,EAKL,KAAK,cAAc,EACnB,KAAK,YAAY,EACjB,K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