@astra-spec/ui 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (172) hide show
  1. package/README.md +47 -4
  2. package/blocks.css +1 -0
  3. package/components.css +6 -0
  4. package/dist/blocks/analysis-tree.d.ts.map +1 -1
  5. package/dist/blocks/analysis-tree.js +4 -7
  6. package/dist/blocks/analysis-tree.js.map +1 -1
  7. package/dist/blocks/decisions-list.d.ts.map +1 -1
  8. package/dist/blocks/decisions-list.js +1 -1
  9. package/dist/blocks/decisions-list.js.map +1 -1
  10. package/dist/blocks/findings-list.d.ts.map +1 -1
  11. package/dist/blocks/findings-list.js +2 -4
  12. package/dist/blocks/findings-list.js.map +1 -1
  13. package/dist/blocks/index.d.ts +2 -4
  14. package/dist/blocks/index.d.ts.map +1 -1
  15. package/dist/blocks/index.js +1 -2
  16. package/dist/blocks/index.js.map +1 -1
  17. package/dist/blocks/outputs-list.d.ts +2 -7
  18. package/dist/blocks/outputs-list.d.ts.map +1 -1
  19. package/dist/blocks/outputs-list.js +11 -21
  20. package/dist/blocks/outputs-list.js.map +1 -1
  21. package/dist/blocks/papers-list.d.ts.map +1 -1
  22. package/dist/blocks/papers-list.js +3 -3
  23. package/dist/blocks/papers-list.js.map +1 -1
  24. package/dist/components/figure-zoom.d.ts +6 -0
  25. package/dist/components/figure-zoom.d.ts.map +1 -0
  26. package/dist/components/figure-zoom.js +28 -0
  27. package/dist/components/figure-zoom.js.map +1 -0
  28. package/dist/components/finding-detail.d.ts +4 -2
  29. package/dist/components/finding-detail.d.ts.map +1 -1
  30. package/dist/components/finding-detail.js +41 -25
  31. package/dist/components/finding-detail.js.map +1 -1
  32. package/dist/components/index.d.ts +9 -0
  33. package/dist/components/index.d.ts.map +1 -1
  34. package/dist/components/index.js +5 -0
  35. package/dist/components/index.js.map +1 -1
  36. package/dist/components/insight-trigger.js +2 -2
  37. package/dist/components/insight-trigger.js.map +1 -1
  38. package/dist/components/output-card.d.ts +13 -0
  39. package/dist/components/output-card.d.ts.map +1 -0
  40. package/dist/components/output-card.js +12 -0
  41. package/dist/components/output-card.js.map +1 -0
  42. package/dist/components/output-detail.d.ts +6 -2
  43. package/dist/components/output-detail.d.ts.map +1 -1
  44. package/dist/components/output-detail.js +49 -13
  45. package/dist/components/output-detail.js.map +1 -1
  46. package/dist/components/output-dialog.d.ts +6 -1
  47. package/dist/components/output-dialog.d.ts.map +1 -1
  48. package/dist/components/output-dialog.js +2 -2
  49. package/dist/components/output-dialog.js.map +1 -1
  50. package/dist/components/output-entry.d.ts +17 -0
  51. package/dist/components/output-entry.d.ts.map +1 -0
  52. package/dist/components/output-entry.js +21 -0
  53. package/dist/components/output-entry.js.map +1 -0
  54. package/dist/components/output-provenance.d.ts +6 -0
  55. package/dist/components/output-provenance.d.ts.map +1 -0
  56. package/dist/components/output-provenance.js +16 -0
  57. package/dist/components/output-provenance.js.map +1 -0
  58. package/dist/components/output-status.d.ts +8 -0
  59. package/dist/components/output-status.d.ts.map +1 -0
  60. package/dist/components/output-status.js +17 -0
  61. package/dist/components/output-status.js.map +1 -0
  62. package/dist/components/paper-detail.d.ts.map +1 -1
  63. package/dist/components/paper-detail.js +11 -15
  64. package/dist/components/paper-detail.js.map +1 -1
  65. package/dist/components/paper-row.d.ts +9 -0
  66. package/dist/components/paper-row.d.ts.map +1 -0
  67. package/dist/components/paper-row.js +11 -0
  68. package/dist/components/paper-row.js.map +1 -0
  69. package/dist/components/record-dialog.d.ts +5 -1
  70. package/dist/components/record-dialog.d.ts.map +1 -1
  71. package/dist/components/record-dialog.js +7 -4
  72. package/dist/components/record-dialog.js.map +1 -1
  73. package/dist/lib/labels.d.ts +34 -2
  74. package/dist/lib/labels.d.ts.map +1 -1
  75. package/dist/lib/labels.js +35 -4
  76. package/dist/lib/labels.js.map +1 -1
  77. package/dist/model/index.d.ts +4 -2
  78. package/dist/model/index.d.ts.map +1 -1
  79. package/dist/model/index.js +1 -1
  80. package/dist/model/index.js.map +1 -1
  81. package/dist/model/kind.d.ts +1 -1
  82. package/dist/model/kind.d.ts.map +1 -1
  83. package/dist/model/kind.js +0 -1
  84. package/dist/model/kind.js.map +1 -1
  85. package/dist/model/output-provenance.d.ts +17 -0
  86. package/dist/model/output-provenance.d.ts.map +1 -0
  87. package/dist/model/output-provenance.js +2 -0
  88. package/dist/model/output-provenance.js.map +1 -0
  89. package/dist/model/output-status.d.ts +17 -0
  90. package/dist/model/output-status.d.ts.map +1 -0
  91. package/dist/model/output-status.js +2 -0
  92. package/dist/model/output-status.js.map +1 -0
  93. package/dist/model/relations.d.ts +37 -12
  94. package/dist/model/relations.d.ts.map +1 -1
  95. package/dist/model/relations.js +76 -23
  96. package/dist/model/relations.js.map +1 -1
  97. package/dist/primitives/dialog.d.ts.map +1 -1
  98. package/dist/primitives/dialog.js +9 -1
  99. package/dist/primitives/dialog.js.map +1 -1
  100. package/dist/primitives/index.d.ts +2 -0
  101. package/dist/primitives/index.d.ts.map +1 -1
  102. package/dist/primitives/index.js +1 -0
  103. package/dist/primitives/index.js.map +1 -1
  104. package/dist/primitives/output-status-glyph.d.ts +8 -0
  105. package/dist/primitives/output-status-glyph.d.ts.map +1 -0
  106. package/dist/primitives/output-status-glyph.js +13 -0
  107. package/dist/primitives/output-status-glyph.js.map +1 -0
  108. package/dist/primitives/tooltip.d.ts +7 -0
  109. package/dist/primitives/tooltip.d.ts.map +1 -0
  110. package/dist/primitives/tooltip.js +31 -0
  111. package/dist/primitives/tooltip.js.map +1 -0
  112. package/dist/views/inventory.d.ts +12 -1
  113. package/dist/views/inventory.d.ts.map +1 -1
  114. package/dist/views/inventory.js +23 -17
  115. package/dist/views/inventory.js.map +1 -1
  116. package/package.json +3 -2
  117. package/primitives.css +1 -0
  118. package/src/blocks/analysis-tree.tsx +4 -30
  119. package/src/blocks/decisions-list.tsx +5 -3
  120. package/src/blocks/findings-list.tsx +8 -7
  121. package/src/blocks/index.ts +2 -4
  122. package/src/blocks/outputs-list.tsx +43 -106
  123. package/src/blocks/papers-list.tsx +2 -18
  124. package/src/components/figure-zoom.tsx +72 -0
  125. package/src/components/finding-detail.tsx +106 -30
  126. package/src/components/index.ts +13 -0
  127. package/src/components/insight-trigger.tsx +2 -2
  128. package/src/components/output-card.tsx +51 -0
  129. package/src/components/output-detail.tsx +69 -21
  130. package/src/components/output-dialog.tsx +9 -0
  131. package/src/components/output-entry.tsx +61 -0
  132. package/src/components/output-provenance.tsx +86 -0
  133. package/src/components/output-status.tsx +38 -0
  134. package/src/components/paper-detail.tsx +52 -54
  135. package/src/components/paper-row.tsx +41 -0
  136. package/src/components/record-dialog.tsx +13 -1
  137. package/src/lib/labels.tsx +69 -6
  138. package/src/model/index.ts +6 -2
  139. package/src/model/kind.ts +1 -2
  140. package/src/model/output-provenance.ts +18 -0
  141. package/src/model/output-status.ts +18 -0
  142. package/src/model/relations.ts +92 -26
  143. package/src/primitives/dialog.tsx +7 -1
  144. package/src/primitives/index.ts +2 -0
  145. package/src/primitives/output-status-glyph.tsx +37 -0
  146. package/src/primitives/tooltip.tsx +51 -0
  147. package/src/views/inventory.tsx +54 -22
  148. package/styles/base.css +2 -1
  149. package/styles/blocks/analysis-tree.css +22 -25
  150. package/styles/blocks/findings-list.css +50 -0
  151. package/styles/blocks/outputs-list.css +0 -421
  152. package/styles/blocks/papers-list.css +4 -70
  153. package/styles/components/evidence.css +1 -18
  154. package/styles/components/figure-zoom.css +62 -0
  155. package/styles/components/finding-detail.css +62 -0
  156. package/styles/components/insight-list.css +0 -4
  157. package/styles/components/insight-trigger.css +8 -6
  158. package/styles/components/output-card.css +290 -0
  159. package/styles/components/output-detail.css +91 -3
  160. package/styles/components/output-entry.css +141 -0
  161. package/styles/components/output-provenance.css +94 -0
  162. package/styles/components/output-status.css +31 -0
  163. package/styles/components/paper-detail.css +112 -59
  164. package/styles/components/paper-row.css +72 -0
  165. package/styles/primitives/dialog.css +4 -22
  166. package/styles/primitives/tooltip.css +22 -0
  167. package/styles/views/inventory.css +35 -2
  168. package/dist/blocks/prior-insights-list.d.ts +0 -9
  169. package/dist/blocks/prior-insights-list.d.ts.map +0 -1
  170. package/dist/blocks/prior-insights-list.js +0 -29
  171. package/dist/blocks/prior-insights-list.js.map +0 -1
  172. package/src/blocks/prior-insights-list.tsx +0 -52
@@ -20,10 +20,17 @@
20
20
 
21
21
  :where(.astra-ui) .astra-insight-trigger:where([data-variant="claim"]) {
22
22
  display: grid;
23
- grid-template-columns: auto minmax(0, 1fr);
23
+ grid-template-columns: 22px minmax(0, 1fr);
24
24
  gap: 8.8px;
25
25
  align-items: start;
26
26
  color: var(--astra-color-text-muted);
27
+ padding: 10px 4px;
28
+ }
29
+
30
+ /* On the claim's first line, not the padding box: the mark reads as part of
31
+ the sentence it stands for. */
32
+ :where(.astra-ui) .astra-insight-trigger__glyph {
33
+ margin-top: 3.52px;
27
34
  }
28
35
 
29
36
  :where(.astra-ui) .astra-insight-trigger:where([data-variant="claim"]):hover {
@@ -38,11 +45,6 @@
38
45
  margin-bottom: 0;
39
46
  }
40
47
 
41
- :where(.astra-ui) .astra-insight-trigger:where([data-variant="claim"]) {
42
- grid-template-columns: 22px minmax(0, 1fr);
43
- padding: 10px 4px;
44
- }
45
-
46
48
  :where(.astra-ui) .astra-insight-trigger__claim {
47
49
  color: var(--astra-color-text);
48
50
  font: 400 var(--astra-font-size)/1.4 var(--astra-font-ui);
@@ -0,0 +1,290 @@
1
+ /* output-card — emitted by src/components/output-card.tsx */
2
+ @layer astra.tokens, astra.base, astra.components, astra.views;
3
+ @layer astra.components {
4
+ @media (prefers-reduced-motion: reduce) {
5
+ :where(.astra-ui) .astra-output-card,
6
+ :where(.astra-ui) .astra-output-card__open {
7
+ transition: none;
8
+ }
9
+
10
+ }
11
+
12
+ :where(.astra-ui) .astra-output-card {
13
+ all: unset;
14
+ position: relative;
15
+ display: flex;
16
+ min-width: 0;
17
+ cursor: pointer;
18
+ flex-direction: column;
19
+ overflow: visible;
20
+ border: 1px solid var(--astra-color-border);
21
+ border-radius: 7.2px;
22
+ background: var(--astra-color-surface-raised);
23
+ color: var(--astra-color-text);
24
+ transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
25
+ }
26
+
27
+ :where(.astra-ui) .astra-output-card__preview {
28
+ position: relative;
29
+ display: flex;
30
+ aspect-ratio: 16 / 10;
31
+ align-items: center;
32
+ justify-content: center;
33
+ overflow: hidden;
34
+ border-bottom: 1px solid var(--astra-color-border);
35
+ background: var(--astra-color-surface);
36
+ }
37
+
38
+ :where(.astra-ui) .astra-output-card__open {
39
+ position: absolute;
40
+ top: 8.8px;
41
+ right: 8.8px;
42
+ border-radius: 99px;
43
+ background: color-mix(in srgb, var(--astra-color-surface) 88%, transparent);
44
+ color: var(--astra-color-text-muted);
45
+ padding: 4px 8px;
46
+ font-family: var(--astra-font-ui);
47
+ font-size: var(--astra-font-size-2xs);
48
+ font-weight: 700;
49
+ opacity: 0;
50
+ transition: opacity 140ms ease;
51
+ }
52
+
53
+ :where(.astra-ui) .astra-output-card:hover .astra-output-card__open,
54
+ :where(.astra-ui) .astra-output-card:focus-visible .astra-output-card__open {
55
+ opacity: 1;
56
+ }
57
+
58
+ :where(.astra-ui) .astra-output-card__kind {
59
+ color: var(--astra-color-accent);
60
+ font-family: var(--astra-font-ui);
61
+ font-size: var(--astra-font-size-2xs);
62
+ font-weight: 700;
63
+ letter-spacing: 0.09em;
64
+ text-transform: uppercase;
65
+ }
66
+
67
+ :where(.astra-ui) .astra-output-card__body strong {
68
+ overflow: hidden;
69
+ font-family: var(--astra-font-ui);
70
+ font-size: 14.72px;
71
+ line-height: 1.2;
72
+ text-overflow: ellipsis;
73
+ white-space: nowrap;
74
+ }
75
+
76
+ :where(.astra-ui) .astra-output-card__body code {
77
+ overflow: hidden;
78
+ color: var(--astra-color-text-subtle);
79
+ font-size: var(--astra-font-size-2xs);
80
+ text-overflow: ellipsis;
81
+ white-space: nowrap;
82
+ }
83
+
84
+ :where(.astra-ui) .astra-output-card {
85
+ --astra-kind: var(--astra-color-kind-output);
86
+ --astra-kind-ink: var(--astra-color-kind-output);
87
+ --astra-kind-soft: var(--astra-color-kind-output-soft);
88
+ }
89
+
90
+ :where(.astra-ui) .astra-output-card {
91
+ border-color: var(--astra-color-border-strong);
92
+ border-radius: 8px;
93
+ background: var(--astra-color-surface-raised);
94
+ box-shadow: none;
95
+ }
96
+
97
+ :where(.astra-ui) .astra-output-card:focus-visible {
98
+ outline: 2px solid var(--astra-color-accent);
99
+ outline-offset: 3px;
100
+ outline-color: var(--astra-color-focus);
101
+ }
102
+
103
+ :where(.astra-ui) .astra-output-card__preview {
104
+ border-color: var(--astra-color-border);
105
+ background: var(--astra-color-surface);
106
+ }
107
+
108
+ :where(.astra-ui) .astra-output-card__preview > img {
109
+ background: var(--astra-color-artifact-paper);
110
+ }
111
+
112
+ :where(.astra-ui) .astra-output-card__kind {
113
+ color: var(--astra-color-kind-output);
114
+ }
115
+
116
+ :where(.astra-ui) .astra-output-card__open {
117
+ border: 1px solid var(--astra-color-border);
118
+ border-radius: var(--astra-radius-control);
119
+ background: color-mix(in srgb, var(--astra-color-surface-raised) 92%, transparent);
120
+ }
121
+
122
+ :where(.astra-ui) .astra-output-card {
123
+ border-color: var(--astra-color-border);
124
+ border-radius: 0;
125
+ background: var(--astra-color-surface-raised);
126
+ box-shadow: none;
127
+ }
128
+
129
+ :where(.astra-ui) .astra-output-card:hover {
130
+ transform: none;
131
+ border-color: var(--astra-color-kind-output);
132
+ box-shadow: none;
133
+ }
134
+
135
+ :where(.astra-ui) .astra-output-card__preview {
136
+ aspect-ratio: 4 / 3;
137
+ border-color: var(--astra-color-border-subtle);
138
+ background: var(--astra-color-surface-raised);
139
+ }
140
+
141
+ :where(.astra-ui) .astra-output-card__preview > img,
142
+ :where(.astra-ui) .astra-output-card__preview > .astra-artifact:where([data-type="image"]) > img {
143
+ width: 100%;
144
+ height: 100%;
145
+ box-sizing: border-box;
146
+ object-fit: contain;
147
+ max-height: none;
148
+ margin: 0;
149
+ padding: 7.2px;
150
+ }
151
+
152
+ :where(.astra-ui) .astra-output-card__preview > .astra-artifact:where([data-type="image"]) {
153
+ display: block;
154
+ width: 100%;
155
+ height: 100%;
156
+ margin: 0;
157
+ border: 0;
158
+ }
159
+
160
+ /* A metric card stacks label over value so the number reads at a glance;
161
+ the host's compact preview supplies the same data as the dialog. */
162
+ :where(.astra-ui) .astra-output-card__preview > .astra-artifact:where([data-type="metric"]) {
163
+ box-sizing: border-box;
164
+ display: flex;
165
+ width: 100%;
166
+ height: 100%;
167
+ flex-direction: column;
168
+ align-items: center;
169
+ justify-content: center;
170
+ gap: 5.6px;
171
+ padding: 9.6px;
172
+ text-align: center;
173
+ }
174
+
175
+ :where(.astra-ui) .astra-output-card__preview > .astra-artifact:where([data-type="metric"]) > .astra-artifact__metric-label {
176
+ overflow: hidden;
177
+ max-width: 100%;
178
+ color: var(--astra-color-text-subtle);
179
+ font-size: var(--astra-font-size-2xs);
180
+ line-height: 1.3;
181
+ text-overflow: ellipsis;
182
+ white-space: nowrap;
183
+ }
184
+
185
+ :where(.astra-ui) .astra-output-card__preview > .astra-artifact:where([data-type="metric"]) .astra-artifact__metric-value {
186
+ max-width: 100%;
187
+ font-size: clamp(var(--astra-font-size-title), 3cqw, 28px);
188
+ }
189
+
190
+ :where(.astra-ui) .astra-output-card__preview > .astra-artifact:where([data-type="metric"]) .astra-artifact__metric-uncertainty,
191
+ :where(.astra-ui) .astra-output-card__preview > .astra-artifact:where([data-type="metric"]) .astra-artifact__metric-unit {
192
+ font-size: var(--astra-font-size-xs);
193
+ }
194
+
195
+ :where(.astra-ui) .astra-output-card__open {
196
+ top: 7.2px;
197
+ right: 7.2px;
198
+ border: 0;
199
+ background: color-mix(in srgb, var(--astra-color-surface-raised) 92%, transparent);
200
+ }
201
+
202
+ :where(.astra-ui) .astra-output-card__body {
203
+ display: grid;
204
+ gap: 2px;
205
+ padding: 8.8px 11px 10.4px;
206
+ }
207
+
208
+ :where(.astra-ui) .astra-output-card__kind {
209
+ color: var(--astra-color-kind-output);
210
+ font-size: var(--astra-font-size-2xs);
211
+ }
212
+
213
+ :where(.astra-ui) .astra-output-card__body strong {
214
+ font-size: var(--astra-font-size-sm);
215
+ font-weight: 600;
216
+ }
217
+
218
+ :where(.astra-ui) .astra-output-card__body code {
219
+ font-size: var(--astra-font-size-2xs);
220
+ }
221
+
222
+ :where(.astra-ui) .astra-output-card {
223
+ overflow: visible;
224
+ padding: 0;
225
+ border: 1px solid var(--astra-color-border);
226
+ border-radius: 0;
227
+ background: var(--astra-color-surface-raised);
228
+ color: var(--astra-color-text);
229
+ box-shadow: none;
230
+ }
231
+
232
+ :where(.astra-ui) .astra-output-card:hover,
233
+ :where(.astra-ui) .astra-output-card:focus-visible {
234
+ border-color: var(--astra-color-kind-output);
235
+ box-shadow: none;
236
+ }
237
+
238
+ :where(.astra-ui) .astra-output-card__preview {
239
+ display: grid;
240
+ aspect-ratio: 4 / 3;
241
+ border-bottom: 1px solid var(--astra-color-border-subtle);
242
+ background: var(--astra-color-surface-raised);
243
+ place-items: center;
244
+ }
245
+
246
+ :where(.astra-ui) .astra-output-card__preview > img {
247
+ box-sizing: border-box;
248
+ width: 100%;
249
+ height: 100%;
250
+ padding: 5.6px;
251
+ object-fit: contain;
252
+ }
253
+
254
+ :where(.astra-ui) .astra-output-card__open {
255
+ top: 7.2px;
256
+ right: 7.2px;
257
+ padding: 0;
258
+ border: 0;
259
+ background: color-mix(in srgb, var(--astra-color-surface-raised) 92%, transparent);
260
+ color: var(--astra-color-text-muted);
261
+ font: 600 var(--astra-font-size-2xs)/1.2 var(--astra-font-ui);
262
+ }
263
+
264
+ :where(.astra-ui) .astra-output-card__body {
265
+ display: block;
266
+ padding: 9px 11px;
267
+ }
268
+
269
+ :where(.astra-ui) .astra-output-card__kind {
270
+ display: block;
271
+ margin-bottom: 2px;
272
+ color: var(--astra-color-kind-output);
273
+ font: 700 var(--astra-font-size-2xs)/1.2 var(--astra-font-ui);
274
+ letter-spacing: 0.08em;
275
+ text-transform: uppercase;
276
+ }
277
+
278
+ :where(.astra-ui) .astra-output-card__body strong {
279
+ display: block;
280
+ overflow: hidden;
281
+ font: 600 var(--astra-font-size-sm)/1.25 var(--astra-font-ui);
282
+ text-overflow: ellipsis;
283
+ white-space: nowrap;
284
+ }
285
+
286
+ :where(.astra-ui) .astra-output-card__body code {
287
+ display: none;
288
+ }
289
+
290
+ }
@@ -111,6 +111,7 @@
111
111
  }
112
112
 
113
113
  :where(.astra-ui) .astra-dialog:where([data-mode="embedded"]) .astra-output-detail__description h4,
114
+ :where(.astra-ui) .astra-dialog:where([data-mode="embedded"]) .astra-output-detail__metric h4,
114
115
  :where(.astra-ui) .astra-dialog:where([data-mode="embedded"]) .astra-output-detail__recipe summary {
115
116
  color: var(--astra-color-text);
116
117
  font: 700 var(--astra-font-size-sm)/1.25 var(--astra-font-ui);
@@ -195,19 +196,25 @@
195
196
  max-height: none;
196
197
  }
197
198
 
199
+ /* Nothing precedes the provenance in the single column, so it opens the
200
+ surface: the result's own padding is the only space above the first
201
+ heading. */
198
202
  :where(.astra-ui) .astra-dialog:where([data-mode="embedded"]) .astra-output-detail__layout:where([data-layout="single"]) .astra-output-detail__provenance {
199
203
  position: static;
200
204
  overflow: visible;
201
- margin-top: 24px;
205
+ margin-top: 0;
202
206
  border-inline-start: 0;
203
207
  background: transparent;
204
- padding: 20px 0 0;
208
+ padding: 0;
205
209
  }
206
210
 
207
211
  :where(.astra-ui) .astra-dialog:where([data-mode="embedded"]) .astra-output-detail__description,
208
212
  :where(.astra-ui) .astra-dialog:where([data-mode="embedded"]) .astra-output-detail__recipe {
209
213
  margin: 0;
210
214
  padding-block: 14px;
215
+ }
216
+
217
+ :where(.astra-ui) .astra-dialog:where([data-mode="embedded"]) .astra-output-detail__description {
211
218
  border-block-start: 1px solid var(--astra-color-border);
212
219
  }
213
220
 
@@ -288,6 +295,7 @@
288
295
  }
289
296
 
290
297
  :where(.astra-ui) .astra-output-detail__description h4,
298
+ :where(.astra-ui) .astra-output-detail__metric h4,
291
299
  :where(.astra-ui) .astra-output-detail__recipe h4 {
292
300
  margin: 0 0 8px;
293
301
  color: var(--astra-color-text);
@@ -427,6 +435,11 @@
427
435
  border: 0;
428
436
  }
429
437
 
438
+ /* The host's provenance slot follows the recipe and carries its own gap. */
439
+ :where(.astra-ui) .astra-output-detail__provenance > .astra-output-provenance {
440
+ margin-top: 20px;
441
+ }
442
+
430
443
  :where(.astra-ui) .astra-output-detail__recipe pre {
431
444
  max-height: none;
432
445
  margin: 0;
@@ -467,12 +480,59 @@
467
480
  :where(.astra-ui) .astra-output-detail__layout:where([data-layout="single"]) .astra-output-detail__provenance {
468
481
  position: static;
469
482
  overflow: visible;
470
- margin-top: 26px;
483
+ margin-top: 0;
471
484
  border: 0;
472
485
  background: var(--astra-color-canvas);
473
486
  padding: 0;
474
487
  }
475
488
 
489
+ /* The full "via" origin list for assistive technology beside the truncated
490
+ "+N more" text. */
491
+ :where(.astra-ui) .astra-output-detail__visually-hidden {
492
+ position: absolute;
493
+ width: 1px;
494
+ height: 1px;
495
+ padding: 0;
496
+ margin: -1px;
497
+ overflow: hidden;
498
+ clip: rect(0, 0, 0, 0);
499
+ white-space: nowrap;
500
+ border: 0;
501
+ }
502
+
503
+ /* A metric has no picture to frame: the value reads as a pill at the head of
504
+ the provenance, and what follows takes the gap a relation list carries. */
505
+ :where(.astra-ui) .astra-output-detail__metric {
506
+ margin: 0;
507
+ padding: 0;
508
+ }
509
+
510
+ :where(.astra-ui) .astra-output-detail__layout .astra-output-detail__metric + * {
511
+ margin-top: 26px;
512
+ }
513
+
514
+ :where(.astra-ui) .astra-output-detail__metric-pill {
515
+ display: inline-flex;
516
+ width: max-content;
517
+ max-width: 100%;
518
+ align-items: baseline;
519
+ border: 1px solid color-mix(in srgb, var(--astra-color-kind-output) 32%, var(--astra-color-border));
520
+ border-radius: var(--astra-radius-control);
521
+ background: var(--astra-color-kind-output-soft);
522
+ padding: 7px 14px;
523
+ }
524
+
525
+ :where(.astra-ui) .astra-output-detail__metric-pill .astra-artifact {
526
+ justify-content: flex-start;
527
+ }
528
+
529
+ :where(.astra-ui) .astra-output-detail__metric-pill .astra-artifact__metric-value {
530
+ max-width: none;
531
+ color: var(--astra-color-kind-output);
532
+ font-size: var(--astra-font-size-title);
533
+ text-align: start;
534
+ }
535
+
476
536
  :where(.astra-ui) .astra-output-detail__artifact[data-expanded] {
477
537
  position: fixed;
478
538
  z-index: var(--astra-z-fullscreen);
@@ -614,4 +674,32 @@
614
674
  background: var(--astra-color-canvas);
615
675
  }
616
676
 
677
+ :where(.astra-ui) .astra-output-detail__recipe-heading {
678
+ display: flex;
679
+ align-items: baseline;
680
+ justify-content: space-between;
681
+ gap: 12px;
682
+ margin-bottom: 8px;
683
+ }
684
+
685
+ :where(.astra-ui) .astra-output-detail__recipe-heading h4 {
686
+ margin: 0;
687
+ }
688
+
689
+ :where(.astra-ui) .astra-output-detail__recipe-heading button {
690
+ padding: 0;
691
+ border: 0;
692
+ background: transparent;
693
+ color: var(--astra-color-text-subtle);
694
+ font: inherit;
695
+ font-size: var(--astra-font-size-sm);
696
+ white-space: nowrap;
697
+ text-decoration: underline;
698
+ text-underline-offset: 3px;
699
+ cursor: pointer;
700
+ }
701
+
702
+ :where(.astra-ui) .astra-output-detail__recipe-heading button:hover {
703
+ color: var(--astra-color-text);
704
+ }
617
705
  }
@@ -0,0 +1,141 @@
1
+ /* output-entry — emitted by src/components/output-entry.tsx */
2
+ @layer astra.tokens, astra.base, astra.components, astra.views;
3
+ @layer astra.components {
4
+
5
+ :where(.astra-ui) .astra-output-entry {
6
+ appearance: none;
7
+ position: relative;
8
+ display: grid;
9
+ grid-template-columns: minmax(0, 1fr);
10
+ align-items: baseline;
11
+ gap: var(--astra-space-3);
12
+ width: 100%;
13
+ min-width: 0;
14
+ min-height: 44px;
15
+ margin: 0;
16
+ padding: var(--astra-space-3) var(--astra-space-2);
17
+ border: 0;
18
+ border-radius: 0;
19
+ background: transparent;
20
+ color: var(--astra-color-text);
21
+ font: 400 var(--astra-font-size-sm)/1.5 var(--astra-font-ui);
22
+ overflow: visible;
23
+ text-align: start;
24
+ cursor: pointer;
25
+ }
26
+
27
+ /* A file row carries its marker inside the row (see output-status.css);
28
+ reserve its width so long names stay clear of it. */
29
+ :where(.astra-ui) .astra-output-entry:where([data-kind="file"]) {
30
+ padding-inline-end: calc(16px + 2 * var(--astra-space-2));
31
+ }
32
+
33
+ :where(.astra-ui) .astra-output-entry:hover {
34
+ background: var(--astra-color-surface-muted);
35
+ }
36
+
37
+ :where(.astra-ui) .astra-output-entry:focus-visible {
38
+ outline: 2px solid var(--astra-color-focus);
39
+ outline-offset: -2px;
40
+ background: var(--astra-color-surface-muted);
41
+ }
42
+
43
+ :where(.astra-ui) .astra-output-entry__name {
44
+ min-width: 0;
45
+ overflow-wrap: anywhere;
46
+ font-weight: 500;
47
+ }
48
+
49
+ :where(.astra-ui) .astra-output-entry__value {
50
+ min-width: 0;
51
+ text-align: center;
52
+ font-variant-numeric: tabular-nums;
53
+ overflow-wrap: anywhere;
54
+ }
55
+
56
+ :where(.astra-ui) .astra-output-entry__status {
57
+ color: var(--astra-color-text-subtle);
58
+ font-size: var(--astra-font-size-xs);
59
+ overflow-wrap: anywhere;
60
+ }
61
+
62
+ :where(.astra-ui) .astra-output-entry__name .astra-output-entry__status {
63
+ display: block;
64
+ font-weight: 400;
65
+ }
66
+
67
+ :where(.astra-ui) .astra-output-entry__value .astra-artifact__metric {
68
+ flex-wrap: wrap;
69
+ justify-content: center;
70
+ gap: 0 0.3em;
71
+ font: inherit;
72
+ }
73
+
74
+ :where(.astra-ui) .astra-output-entry__value .astra-artifact__metric-label {
75
+ display: none;
76
+ }
77
+
78
+ :where(.astra-ui) .astra-output-entry__value :is(.astra-artifact__metric-value, .astra-artifact__metric-uncertainty, .astra-artifact__metric-unit) {
79
+ max-width: 100%;
80
+ color: inherit;
81
+ font: inherit;
82
+ text-align: center;
83
+ }
84
+
85
+ :where(.astra-ui) .astra-output-entry__value .astra-artifact__metric-value {
86
+ font-weight: 600;
87
+ }
88
+
89
+ :where(.astra-ui) .astra-output-entry__value .astra-artifact__placeholder {
90
+ display: block;
91
+ text-align: center;
92
+ }
93
+
94
+ :where(.astra-ui) .astra-output-entry__value .astra-artifact__placeholder > span:first-child {
95
+ display: none;
96
+ }
97
+
98
+ :where(.astra-ui) .astra-output-entry:where([data-kind="metric"]) {
99
+ gap: calc(0.5 * var(--astra-space-2));
100
+ width: auto;
101
+ max-width: 100%;
102
+ min-height: 52px;
103
+ padding: var(--astra-space-2) var(--astra-space-3);
104
+ border: 1px solid var(--astra-color-border);
105
+ border-radius: calc(2 * var(--astra-radius-preview));
106
+ background: var(--astra-color-artifact-paper);
107
+ color: var(--astra-color-artifact-ink);
108
+ font-size: var(--astra-font-size-xs);
109
+ text-align: center;
110
+ }
111
+
112
+ :where(.astra-ui) .astra-output-entry:where([data-kind="metric"]) .astra-output-entry__name {
113
+ grid-row: 2;
114
+ color: color-mix(in srgb, var(--astra-color-artifact-ink) 72%, var(--astra-color-artifact-paper));
115
+ font: 600 var(--astra-font-size-sm)/1.25 var(--astra-font-ui);
116
+ }
117
+
118
+ :where(.astra-ui) .astra-output-entry:where([data-kind="metric"]) .astra-output-entry__value {
119
+ grid-row: 1;
120
+ }
121
+
122
+ :where(.astra-ui) .astra-output-entry:where([data-kind="metric"]) .astra-artifact__metric {
123
+ color: var(--astra-color-artifact-ink);
124
+ }
125
+
126
+ :where(.astra-ui) .astra-output-entry:where([data-kind="metric"]) .astra-artifact__metric-value {
127
+ font-size: 16px;
128
+ line-height: 1.25;
129
+ }
130
+
131
+ :where(.astra-ui) .astra-output-entry:where([data-kind="metric"]) :is(.astra-output-entry__status, .astra-artifact__placeholder) {
132
+ color: color-mix(in srgb, var(--astra-color-artifact-ink) 72%, var(--astra-color-artifact-paper));
133
+ text-align: center;
134
+ }
135
+
136
+ :where(.astra-ui) .astra-output-entry:where([data-kind="metric"]):hover,
137
+ :where(.astra-ui) .astra-output-entry:where([data-kind="metric"]):focus-visible {
138
+ background: var(--astra-color-artifact-paper);
139
+ border-color: var(--astra-color-focus);
140
+ }
141
+ }
@@ -0,0 +1,94 @@
1
+ /* output-provenance — recorded execution details */
2
+ @layer astra.tokens, astra.base, astra.components, astra.views;
3
+ @layer astra.components {
4
+ :where(.astra-ui) .astra-output-provenance {
5
+ font-size: var(--astra-font-size-sm);
6
+ }
7
+ :where(.astra-ui) .astra-output-provenance__heading {
8
+ display: flex;
9
+ align-items: baseline;
10
+ justify-content: space-between;
11
+ gap: 12px;
12
+ margin-bottom: 10px;
13
+ }
14
+ :where(.astra-ui) .astra-output-provenance__heading h4 {
15
+ margin: 0;
16
+ }
17
+ :where(.astra-ui) .astra-output-provenance__heading button {
18
+ padding: 0;
19
+ border: 0;
20
+ background: transparent;
21
+ color: var(--astra-color-text-subtle);
22
+ font: inherit;
23
+ text-decoration: underline;
24
+ text-underline-offset: 3px;
25
+ cursor: pointer;
26
+ }
27
+ :where(.astra-ui) .astra-output-provenance__heading button:hover {
28
+ color: var(--astra-color-text);
29
+ }
30
+ :where(.astra-ui) .astra-output-provenance :where(dl, dd, p) {
31
+ margin: 0;
32
+ }
33
+ :where(.astra-ui) .astra-output-provenance :where(dt) {
34
+ color: var(--astra-color-text-muted);
35
+ }
36
+ :where(.astra-ui) .astra-output-provenance__summary {
37
+ display: grid;
38
+ gap: 10px;
39
+ }
40
+ :where(.astra-ui) .astra-output-provenance__summary > div {
41
+ display: grid;
42
+ gap: 3px;
43
+ }
44
+ :where(.astra-ui) .astra-output-provenance__status {
45
+ display: inline-flex;
46
+ align-items: center;
47
+ gap: 6px;
48
+ }
49
+ :where(.astra-ui) .astra-output-provenance__reason {
50
+ margin-top: 3px;
51
+ color: var(--astra-color-text-muted);
52
+ font-size: var(--astra-font-size-xs);
53
+ }
54
+ :where(.astra-ui) .astra-output-provenance__icon {
55
+ display: inline-grid;
56
+ width: 16px;
57
+ height: 16px;
58
+ place-items: center;
59
+ border-radius: 50%;
60
+ color: var(--astra-color-kind-output);
61
+ background: var(--astra-color-kind-output-soft);
62
+ }
63
+ :where(.astra-ui) .astra-output-provenance__icon[data-state="behind"] {
64
+ color: var(--astra-color-kind-decision-ink);
65
+ background: var(--astra-color-kind-decision-soft);
66
+ }
67
+ :where(.astra-ui) .astra-output-provenance__icon[data-state="stale"] {
68
+ color: var(--astra-color-danger);
69
+ background: var(--astra-color-danger-soft);
70
+ }
71
+ :where(.astra-ui) .astra-output-provenance :where(code, pre) {
72
+ overflow-wrap: anywhere;
73
+ white-space: pre-wrap;
74
+ font-size: var(--astra-font-size-xs);
75
+ }
76
+ :where(.astra-ui) .astra-output-provenance__dialog-panel {
77
+ width: min(680px, 100%);
78
+ }
79
+ :where(.astra-ui) .astra-output-provenance__details {
80
+ display: grid;
81
+ gap: 20px;
82
+ padding: 24px;
83
+ }
84
+ :where(.astra-ui) .astra-output-provenance__details h4 {
85
+ margin: 0 0 8px;
86
+ }
87
+ :where(.astra-ui) .astra-output-provenance__details pre {
88
+ margin: 0;
89
+ }
90
+ :where(.astra-ui) .astra-output-provenance__details dl {
91
+ display: grid;
92
+ gap: 10px;
93
+ }
94
+ }