@dloizides/ui-feedback 1.18.0 → 1.19.1

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/dist/index.mjs CHANGED
@@ -1,6 +1,6 @@
1
- import { createContext, useMemo, useContext, useCallback, useId, useState, useEffect, useSyncExternalStore, Component, useRef } from 'react';
1
+ import { createContext, useMemo, useContext, useState, useRef, useEffect, useCallback, useId, useSyncExternalStore, Component } from 'react';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
- import { StyleSheet, Platform, TouchableOpacity, Text, View, ActivityIndicator, Modal, useWindowDimensions, Animated, Pressable } from 'react-native';
3
+ import { Platform, StyleSheet, TouchableOpacity, Text, View, ActivityIndicator, Modal, useWindowDimensions, Animated, Pressable } from 'react-native';
4
4
  import { MIN_TOUCH_TARGET_PX } from '@dloizides/a11y';
5
5
  import { Skeleton } from '@dloizides/ui-motion';
6
6
  import { Z_INDEX, resolveOnBrand, UI_DEEP_STEP, UI_MAIN_STEP, isHexColor, canCarryAccessibleInk } from '@dloizides/design-tokens';
@@ -63,6 +63,150 @@ var FEEDBACK_TEST_IDS = {
63
63
  progressBar: "progress-bar"
64
64
  };
65
65
  var MIN_TOUCH_TARGET = 44;
66
+
67
+ // src/ErrorReference/utils/copyText.ts
68
+ var OFFSCREEN_POSITION = "-9999px";
69
+ function hasDom() {
70
+ return typeof document !== "undefined" && document.body !== null;
71
+ }
72
+ function copyViaExecCommand(value) {
73
+ if (!hasDom()) return false;
74
+ const area = document.createElement("textarea");
75
+ area.value = value;
76
+ area.readOnly = true;
77
+ area.setAttribute("aria-hidden", "true");
78
+ area.style.position = "fixed";
79
+ area.style.top = OFFSCREEN_POSITION;
80
+ area.style.left = OFFSCREEN_POSITION;
81
+ area.style.opacity = "0";
82
+ document.body.appendChild(area);
83
+ try {
84
+ area.select();
85
+ area.setSelectionRange(0, value.length);
86
+ return document.execCommand("copy");
87
+ } catch {
88
+ return false;
89
+ } finally {
90
+ document.body.removeChild(area);
91
+ }
92
+ }
93
+ function hasAsyncClipboard() {
94
+ return typeof navigator !== "undefined" && typeof navigator.clipboard?.writeText === "function";
95
+ }
96
+ async function tryWrite(write) {
97
+ try {
98
+ await write();
99
+ return true;
100
+ } catch {
101
+ return false;
102
+ }
103
+ }
104
+ async function copyText(value, writer) {
105
+ if (value === "") return false;
106
+ if (writer !== void 0 && await tryWrite(() => writer(value))) return true;
107
+ if (hasAsyncClipboard() && await tryWrite(() => navigator.clipboard.writeText(value))) return true;
108
+ return copyViaExecCommand(value);
109
+ }
110
+
111
+ // src/ErrorReference/utils/CopyStatus.ts
112
+ var CopyStatus = /* @__PURE__ */ ((CopyStatus2) => {
113
+ CopyStatus2["Idle"] = "idle";
114
+ CopyStatus2["Copied"] = "copied";
115
+ CopyStatus2["Failed"] = "failed";
116
+ return CopyStatus2;
117
+ })(CopyStatus || {});
118
+
119
+ // src/ErrorReference/hooks/useCopyToClipboard.ts
120
+ var COPY_FEEDBACK_MS = 1500;
121
+ function useCopyToClipboard(value, writer) {
122
+ const [status, setStatus] = useState("idle" /* Idle */);
123
+ const timerRef = useRef(null);
124
+ const mountedRef = useRef(true);
125
+ useEffect(() => {
126
+ mountedRef.current = true;
127
+ return () => {
128
+ mountedRef.current = false;
129
+ if (timerRef.current !== null) clearTimeout(timerRef.current);
130
+ };
131
+ }, []);
132
+ const copy = useCallback(() => {
133
+ void copyText(value, writer).then((ok) => {
134
+ if (!mountedRef.current) return;
135
+ setStatus(ok ? "copied" /* Copied */ : "failed" /* Failed */);
136
+ if (timerRef.current !== null) clearTimeout(timerRef.current);
137
+ timerRef.current = setTimeout(() => {
138
+ if (mountedRef.current) setStatus("idle" /* Idle */);
139
+ }, COPY_FEEDBACK_MS);
140
+ });
141
+ }, [value, writer]);
142
+ return { status, copy };
143
+ }
144
+ var REFERENCE_FONT_SIZE = 13;
145
+ var ROW_GAP = 8;
146
+ var COPY_MIN_WIDTH = 56;
147
+ var COPY_PADDING_H = 8;
148
+ var COPY_RADIUS = 6;
149
+ var MONO_FONT = Platform.select({
150
+ web: "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
151
+ ios: "Menlo",
152
+ default: "monospace"
153
+ });
154
+ var styles = StyleSheet.create({
155
+ row: { flexDirection: "row", alignItems: "center", maxWidth: "100%" },
156
+ reference: { flexDirection: "row", flexWrap: "wrap", flexShrink: 1, alignItems: "center", columnGap: ROW_GAP },
157
+ label: { fontSize: REFERENCE_FONT_SIZE },
158
+ id: { fontSize: REFERENCE_FONT_SIZE, fontFamily: MONO_FONT },
159
+ copy: {
160
+ minWidth: COPY_MIN_WIDTH,
161
+ minHeight: MIN_TOUCH_TARGET_PX,
162
+ paddingHorizontal: COPY_PADDING_H,
163
+ borderRadius: COPY_RADIUS,
164
+ alignItems: "center",
165
+ justifyContent: "center"
166
+ },
167
+ copyText: { fontSize: REFERENCE_FONT_SIZE, fontWeight: "600" }
168
+ });
169
+ var STATUS_KEY = {
170
+ ["idle" /* Idle */]: "common.copy",
171
+ ["copied" /* Copied */]: "common.copied",
172
+ ["failed" /* Failed */]: "common.copyFailed"
173
+ };
174
+ var Reference = ({ traceId, color, actionColor, testID, style }) => {
175
+ const { t } = useFeedbackUi();
176
+ const { status, copy } = useCopyToClipboard(traceId);
177
+ const copyLabel = t(STATUS_KEY[status]);
178
+ return /* @__PURE__ */ jsxs(View, { style: [styles.row, style], testID, children: [
179
+ /* @__PURE__ */ jsxs(View, { style: styles.reference, children: [
180
+ /* @__PURE__ */ jsx(Text, { style: [styles.label, { color }], children: t("common.errorReference") }),
181
+ /* @__PURE__ */ jsx(Text, { selectable: true, style: [styles.id, { color }], testID: `${testID}-id`, children: traceId })
182
+ ] }),
183
+ /* @__PURE__ */ jsx(
184
+ TouchableOpacity,
185
+ {
186
+ accessibilityHint: t("common.copyHint"),
187
+ accessibilityLabel: copyLabel,
188
+ accessibilityRole: "button",
189
+ style: styles.copy,
190
+ testID: `${testID}-copy`,
191
+ onPress: copy,
192
+ children: /* @__PURE__ */ jsx(Text, { style: [styles.copyText, { color: actionColor }], children: copyLabel })
193
+ }
194
+ )
195
+ ] });
196
+ };
197
+ var ErrorReferenceRow = (props) => props.traceId === void 0 ? null : /* @__PURE__ */ jsx(Reference, { ...props, traceId: props.traceId });
198
+
199
+ // src/ErrorReference/utils/readTraceId.ts
200
+ function isRecord(value) {
201
+ return typeof value === "object" && value !== null;
202
+ }
203
+ function readTraceId(error) {
204
+ if (!isRecord(error)) return void 0;
205
+ const id = error.traceId;
206
+ if (typeof id !== "string") return void 0;
207
+ const trimmed = id.trim();
208
+ return trimmed === "" ? void 0 : trimmed;
209
+ }
66
210
  var WELL_SIZE = 56;
67
211
  var WELL_MARGIN_BOTTOM = 16;
68
212
  var WELL_TINT_OPACITY = 0.12;
@@ -72,7 +216,7 @@ var BUTTON_PADDING_H = 16;
72
216
  var BUTTON_BORDER_RADIUS = 6;
73
217
  var BUTTON_BORDER_WIDTH = 1;
74
218
  var BUTTON_FONT_SIZE = 14;
75
- var styles = StyleSheet.create({
219
+ var styles2 = StyleSheet.create({
76
220
  well: {
77
221
  width: WELL_SIZE,
78
222
  height: WELL_SIZE,
@@ -101,8 +245,8 @@ var styles = StyleSheet.create({
101
245
  fontWeight: "600"
102
246
  }
103
247
  });
104
- var ErrorStateIconWell = ({ icon, tint, testID }) => /* @__PURE__ */ jsxs(View, { "aria-hidden": true, style: styles.well, testID, children: [
105
- /* @__PURE__ */ jsx(View, { style: [styles.wellTint, { backgroundColor: tint }] }),
248
+ var ErrorStateIconWell = ({ icon, tint, testID }) => /* @__PURE__ */ jsxs(View, { "aria-hidden": true, style: styles2.well, testID, children: [
249
+ /* @__PURE__ */ jsx(View, { style: [styles2.wellTint, { backgroundColor: tint }] }),
106
250
  icon
107
251
  ] });
108
252
  var ErrorStateSecondaryButton = ({
@@ -114,10 +258,10 @@ var ErrorStateSecondaryButton = ({
114
258
  accessibilityHint: action.hint,
115
259
  accessibilityLabel: action.label,
116
260
  accessibilityRole: "button",
117
- style: [styles.secondaryButton, { borderColor: theme.colors.border }],
261
+ style: [styles2.secondaryButton, { borderColor: theme.colors.border }],
118
262
  testID: action.testID,
119
263
  onPress: action.onPress,
120
- children: /* @__PURE__ */ jsx(Text, { style: [styles.secondaryText, { color: theme.colors.text }], children: action.label })
264
+ children: /* @__PURE__ */ jsx(Text, { style: [styles2.secondaryText, { color: theme.colors.text }], children: action.label })
121
265
  }
122
266
  );
123
267
  var MESSAGE_FONT_SIZE = 16;
@@ -130,7 +274,8 @@ var BUTTON_FONT_SIZE2 = 14;
130
274
  var TITLE_FONT_SIZE = 20;
131
275
  var TITLE_MARGIN_BOTTOM = 8;
132
276
  var ACTION_GAP = 12;
133
- var styles2 = StyleSheet.create({
277
+ var REFERENCE_MARGIN_TOP = 12;
278
+ var styles3 = StyleSheet.create({
134
279
  container: {
135
280
  flex: 1,
136
281
  justifyContent: "center",
@@ -162,6 +307,10 @@ var styles2 = StyleSheet.create({
162
307
  paddingHorizontal: BUTTON_PADDING_H2,
163
308
  borderRadius: BUTTON_BORDER_RADIUS2
164
309
  },
310
+ reference: {
311
+ justifyContent: "center",
312
+ marginTop: REFERENCE_MARGIN_TOP
313
+ },
165
314
  retryText: {
166
315
  fontSize: BUTTON_FONT_SIZE2,
167
316
  fontWeight: "600"
@@ -173,7 +322,8 @@ var ErrorState = ({
173
322
  testID = FEEDBACK_TEST_IDS.errorState,
174
323
  title,
175
324
  icon,
176
- secondaryAction
325
+ secondaryAction,
326
+ error
177
327
  }) => {
178
328
  const { theme, t } = useFeedbackUi();
179
329
  const errorColor = theme.semantic.error["500"];
@@ -187,28 +337,38 @@ var ErrorState = ({
187
337
  accessibilityHint: t("common.retryHint"),
188
338
  accessibilityLabel: t("common.retry"),
189
339
  accessibilityRole: "button",
190
- style: [styles2.retryButton, { backgroundColor: primary }],
340
+ style: [styles3.retryButton, { backgroundColor: primary }],
191
341
  testID: FEEDBACK_TEST_IDS.errorStateRetry,
192
342
  onPress: onRetry,
193
- children: /* @__PURE__ */ jsx(Text, { style: [styles2.retryText, { color: theme.colors.surfaceElevated }], children: t("common.retry") })
343
+ children: /* @__PURE__ */ jsx(Text, { style: [styles3.retryText, { color: theme.colors.surfaceElevated }], children: t("common.retry") })
194
344
  }
195
345
  ) : null;
196
- return /* @__PURE__ */ jsxs(View, { style: styles2.container, testID, children: [
346
+ return /* @__PURE__ */ jsxs(View, { style: styles3.container, testID, children: [
197
347
  hasIcon ? /* @__PURE__ */ jsx(ErrorStateIconWell, { icon, testID: `${testID}-icon`, tint: errorColor }) : null,
198
348
  hasTitle ? /* @__PURE__ */ jsx(
199
349
  Text,
200
350
  {
201
351
  accessibilityRole: "header",
202
- style: [styles2.title, { color: theme.colors.text }],
352
+ style: [styles3.title, { color: theme.colors.text }],
203
353
  testID: `${testID}-title`,
204
354
  children: title
205
355
  }
206
356
  ) : null,
207
- /* @__PURE__ */ jsx(Text, { style: [styles2.message, { color: messageColor }], children: message }),
208
- secondaryAction === void 0 ? retry : /* @__PURE__ */ jsxs(View, { style: styles2.actions, children: [
357
+ /* @__PURE__ */ jsx(Text, { style: [styles3.message, { color: messageColor }], children: message }),
358
+ secondaryAction === void 0 ? retry : /* @__PURE__ */ jsxs(View, { style: styles3.actions, children: [
209
359
  retry,
210
360
  /* @__PURE__ */ jsx(ErrorStateSecondaryButton, { action: secondaryAction, theme })
211
- ] })
361
+ ] }),
362
+ /* @__PURE__ */ jsx(
363
+ ErrorReferenceRow,
364
+ {
365
+ actionColor: primary,
366
+ color: theme.colors.textSecondary,
367
+ style: styles3.reference,
368
+ testID: `${testID}-reference`,
369
+ traceId: readTraceId(error)
370
+ }
371
+ )
212
372
  ] });
213
373
  };
214
374
  var MESSAGE_FONT_SIZE2 = 16;
@@ -218,7 +378,7 @@ var CTA_PADDING_HORIZONTAL = 20;
218
378
  var CTA_BORDER_RADIUS = 8;
219
379
  var CTA_FONT_SIZE = 14;
220
380
  var CONTAINER_PADDING2 = 32;
221
- var styles3 = StyleSheet.create({
381
+ var styles4 = StyleSheet.create({
222
382
  container: {
223
383
  flex: 1,
224
384
  justifyContent: "center",
@@ -254,25 +414,25 @@ var EmptyListState = ({
254
414
  if (typeof ctaRoute === "string" && typeof navigate === "function") navigate(ctaRoute);
255
415
  }, [navigate, ctaRoute]);
256
416
  const showCta = typeof ctaTextKey === "string" && typeof ctaHintKey === "string" && typeof ctaRoute === "string";
257
- return /* @__PURE__ */ jsxs(View, { style: styles3.container, testID, children: [
258
- /* @__PURE__ */ jsx(Text, { style: [styles3.message, { color: colors.textSecondary }], children: t(messageKey) }),
417
+ return /* @__PURE__ */ jsxs(View, { style: styles4.container, testID, children: [
418
+ /* @__PURE__ */ jsx(Text, { style: [styles4.message, { color: colors.textSecondary }], children: t(messageKey) }),
259
419
  showCta ? /* @__PURE__ */ jsx(
260
420
  TouchableOpacity,
261
421
  {
262
422
  accessibilityHint: t(ctaHintKey),
263
423
  accessibilityLabel: t(ctaTextKey),
264
424
  accessibilityRole: "button",
265
- style: [styles3.ctaButton, { backgroundColor: primary }],
425
+ style: [styles4.ctaButton, { backgroundColor: primary }],
266
426
  testID: FEEDBACK_TEST_IDS.emptyListCta,
267
427
  onPress: handlePress,
268
- children: /* @__PURE__ */ jsx(Text, { style: [styles3.ctaText, { color: colors.background }], children: t(ctaTextKey) })
428
+ children: /* @__PURE__ */ jsx(Text, { style: [styles4.ctaText, { color: colors.background }], children: t(ctaTextKey) })
269
429
  }
270
430
  ) : null
271
431
  ] });
272
432
  };
273
433
  var FULLSCREEN_MIN_HEIGHT = 300;
274
434
  var CONTAINER_MIN_HEIGHT = 100;
275
- var styles4 = StyleSheet.create({
435
+ var styles5 = StyleSheet.create({
276
436
  container: {
277
437
  flex: 1,
278
438
  justifyContent: "center",
@@ -293,7 +453,7 @@ var LoadingFallback = ({ fullScreen = false, size = "large" }) => {
293
453
  accessibilityHint: t("loadingFallback.hint"),
294
454
  accessibilityLabel: t("loadingFallback.label"),
295
455
  accessibilityRole: "progressbar",
296
- style: [styles4.container, fullScreen && styles4.fullScreen, { backgroundColor: colors.background }],
456
+ style: [styles5.container, fullScreen && styles5.fullScreen, { backgroundColor: colors.background }],
297
457
  testID: FEEDBACK_TEST_IDS.loadingFallback,
298
458
  children: /* @__PURE__ */ jsx(ActivityIndicator, { color: primary, size })
299
459
  }
@@ -310,7 +470,7 @@ var TEXT_LINE_HEIGHT = 16;
310
470
  var TEXT_LINE_FULL_WIDTH = "100%";
311
471
  var TEXT_LINE_SHORT_WIDTH = "70%";
312
472
  var CARD_HEIGHT = 120;
313
- var styles5 = StyleSheet.create({
473
+ var styles6 = StyleSheet.create({
314
474
  container: {
315
475
  flex: 1,
316
476
  padding: 16
@@ -344,25 +504,25 @@ var PageSkeleton = ({
344
504
  const { theme, t } = useFeedbackUi();
345
505
  const colors = theme.colors;
346
506
  const skeletonColor = String(colors.border);
347
- const renderListRow = (index) => /* @__PURE__ */ jsxs(View, { style: styles5.row, children: [
507
+ const renderListRow = (index) => /* @__PURE__ */ jsxs(View, { style: styles6.row, children: [
348
508
  /* @__PURE__ */ jsx(
349
509
  Skeleton,
350
510
  {
351
511
  backgroundColor: skeletonColor,
352
512
  borderRadius: AVATAR_BORDER_RADIUS,
353
513
  height: AVATAR_SIZE,
354
- style: styles5.avatar,
514
+ style: styles6.avatar,
355
515
  width: AVATAR_SIZE
356
516
  }
357
517
  ),
358
- /* @__PURE__ */ jsxs(View, { style: styles5.textContainer, children: [
518
+ /* @__PURE__ */ jsxs(View, { style: styles6.textContainer, children: [
359
519
  /* @__PURE__ */ jsx(
360
520
  Skeleton,
361
521
  {
362
522
  backgroundColor: skeletonColor,
363
523
  borderRadius: SKELETON_BORDER_RADIUS,
364
524
  height: TEXT_LINE_HEIGHT,
365
- style: styles5.textLine,
525
+ style: styles6.textLine,
366
526
  width: TEXT_LINE_FULL_WIDTH
367
527
  }
368
528
  ),
@@ -372,7 +532,7 @@ var PageSkeleton = ({
372
532
  backgroundColor: skeletonColor,
373
533
  borderRadius: SKELETON_BORDER_RADIUS,
374
534
  height: TEXT_LINE_HEIGHT,
375
- style: styles5.textLine,
535
+ style: styles6.textLine,
376
536
  width: TEXT_LINE_SHORT_WIDTH
377
537
  }
378
538
  )
@@ -384,7 +544,7 @@ var PageSkeleton = ({
384
544
  backgroundColor: skeletonColor,
385
545
  borderRadius: CARD_BORDER_RADIUS,
386
546
  height: CARD_HEIGHT,
387
- style: styles5.card
547
+ style: styles6.card
388
548
  },
389
549
  index
390
550
  );
@@ -395,7 +555,7 @@ var PageSkeleton = ({
395
555
  accessibilityHint: t("pageSkeleton.loadingHint"),
396
556
  accessibilityLabel: t("pageSkeleton.loadingLabel"),
397
557
  accessibilityState: { busy: true },
398
- style: [styles5.container, { backgroundColor: colors.background }],
558
+ style: [styles6.container, { backgroundColor: colors.background }],
399
559
  testID: FEEDBACK_TEST_IDS.pageSkeleton,
400
560
  children: [
401
561
  showHeader ? /* @__PURE__ */ jsx(
@@ -404,7 +564,7 @@ var PageSkeleton = ({
404
564
  backgroundColor: skeletonColor,
405
565
  borderRadius: SKELETON_BORDER_RADIUS,
406
566
  height: HEADER_HEIGHT,
407
- style: styles5.header,
567
+ style: styles6.header,
408
568
  width: HEADER_WIDTH
409
569
  }
410
570
  ) : null,
@@ -421,10 +581,11 @@ var AsyncSurface = ({
421
581
  skeletonRows = DEFAULT_SKELETON_ROWS,
422
582
  variant = "list",
423
583
  message,
584
+ error,
424
585
  children
425
586
  }) => {
426
587
  const { t } = useFeedbackUi();
427
- if (isError) return /* @__PURE__ */ jsx(ErrorState, { message: message ?? t("common.loadFailed"), onRetry });
588
+ if (isError) return /* @__PURE__ */ jsx(ErrorState, { error, message: message ?? t("common.loadFailed"), onRetry });
428
589
  if (loading) return /* @__PURE__ */ jsx(PageSkeleton, { showHeader: true, rows: skeletonRows, variant });
429
590
  return children;
430
591
  };
@@ -435,7 +596,7 @@ function confirmInk(theme, destructive) {
435
596
  return resolveOnBrand(confirmFill(theme, destructive));
436
597
  }
437
598
  var DIALOG_MAX_WIDTH = 400;
438
- var styles6 = StyleSheet.create({
599
+ var styles7 = StyleSheet.create({
439
600
  overlay: {
440
601
  flex: 1,
441
602
  backgroundColor: MODAL_OVERLAY_COLOR,
@@ -527,17 +688,17 @@ var ConfirmDialog = ({
527
688
  animationType: "fade",
528
689
  visible,
529
690
  onRequestClose: onCancel,
530
- children: /* @__PURE__ */ jsx(View, { style: styles6.overlay, testID: FEEDBACK_TEST_IDS.confirmDialog, children: /* @__PURE__ */ jsxs(
691
+ children: /* @__PURE__ */ jsx(View, { style: styles7.overlay, testID: FEEDBACK_TEST_IDS.confirmDialog, children: /* @__PURE__ */ jsxs(
531
692
  View,
532
693
  {
533
694
  accessibilityViewIsModal: true,
534
695
  "aria-label": innerDialogRole === void 0 ? void 0 : title,
535
696
  role: innerDialogRole,
536
- style: [styles6.dialog, colorStyles.dialog],
697
+ style: [styles7.dialog, colorStyles.dialog],
537
698
  children: [
538
- /* @__PURE__ */ jsx(Text, { nativeID: titleId, style: [styles6.title, colorStyles.title], children: title }),
539
- /* @__PURE__ */ jsx(Text, { style: [styles6.message, colorStyles.message], children: message }),
540
- /* @__PURE__ */ jsxs(View, { style: styles6.buttonRow, children: [
699
+ /* @__PURE__ */ jsx(Text, { nativeID: titleId, style: [styles7.title, colorStyles.title], children: title }),
700
+ /* @__PURE__ */ jsx(Text, { style: [styles7.message, colorStyles.message], children: message }),
701
+ /* @__PURE__ */ jsxs(View, { style: styles7.buttonRow, children: [
541
702
  /* @__PURE__ */ jsx(
542
703
  TouchableOpacity,
543
704
  {
@@ -545,13 +706,13 @@ var ConfirmDialog = ({
545
706
  accessibilityLabel: resolvedCancelLabel,
546
707
  accessibilityRole: "button",
547
708
  style: [
548
- styles6.button,
549
- styles6.cancelButton,
709
+ styles7.button,
710
+ styles7.cancelButton,
550
711
  colorStyles.cancelButton
551
712
  ],
552
713
  testID: FEEDBACK_TEST_IDS.cancelConfirmButton,
553
714
  onPress: onCancel,
554
- children: /* @__PURE__ */ jsx(Text, { style: [styles6.buttonText, colorStyles.cancelButtonText], children: resolvedCancelLabel })
715
+ children: /* @__PURE__ */ jsx(Text, { style: [styles7.buttonText, colorStyles.cancelButtonText], children: resolvedCancelLabel })
555
716
  }
556
717
  ),
557
718
  /* @__PURE__ */ jsx(
@@ -563,10 +724,10 @@ var ConfirmDialog = ({
563
724
  accessibilityState: { disabled: isConfirmDisabled },
564
725
  disabled: isConfirmDisabled,
565
726
  style: [
566
- styles6.button,
567
- styles6.confirmButton,
727
+ styles7.button,
728
+ styles7.confirmButton,
568
729
  colorStyles.confirmButton,
569
- isConfirmDisabled && styles6.disabledButton
730
+ isConfirmDisabled && styles7.disabledButton
570
731
  ],
571
732
  testID: FEEDBACK_TEST_IDS.confirmButton,
572
733
  onPress: onConfirm,
@@ -580,7 +741,7 @@ var ConfirmDialog = ({
580
741
  ) : /* @__PURE__ */ jsx(
581
742
  Text,
582
743
  {
583
- style: [styles6.buttonText, colorStyles.confirmButtonText],
744
+ style: [styles7.buttonText, colorStyles.confirmButtonText],
584
745
  children: resolvedConfirmLabel
585
746
  }
586
747
  )
@@ -648,7 +809,7 @@ var C1_CONTROL_END = 159;
648
809
  var ZERO_WIDTH_START = 8203;
649
810
  var ZERO_WIDTH_END = 8207;
650
811
  var BYTE_ORDER_MARK = 65279;
651
- var styles7 = StyleSheet.create({
812
+ var styles8 = StyleSheet.create({
652
813
  container: {
653
814
  position: "absolute",
654
815
  left: TOAST_HORIZONTAL_MARGIN,
@@ -684,6 +845,7 @@ var styles7 = StyleSheet.create({
684
845
  lineHeight: TOAST_GLYPH_LINE_HEIGHT,
685
846
  fontWeight: "700"
686
847
  },
848
+ body: { flexShrink: 1 },
687
849
  text: { flexShrink: 1 }
688
850
  });
689
851
  function sanitizeToastText(input, maxLength) {
@@ -724,11 +886,14 @@ var ToastItem = ({ message, onDone, tone, durationMs, fadeMs, testID }) => {
724
886
  {
725
887
  accessibilityLiveRegion: isError ? "assertive" : "polite",
726
888
  role: isError ? "alert" : "status",
727
- style: [styles7.toast, { backgroundColor: tone.fill, borderColor: tone.border, transform: [{ translateY }], opacity }],
889
+ style: [styles8.toast, { backgroundColor: tone.fill, borderColor: tone.border, transform: [{ translateY }], opacity }],
728
890
  testID,
729
891
  children: [
730
- /* @__PURE__ */ jsx(View, { "aria-hidden": true, importantForAccessibility: "no-hide-descendants", style: [styles7.glyph, { borderColor: tone.ink }], children: /* @__PURE__ */ jsx(Text, { style: [styles7.glyphText, { color: tone.ink }], children: tone.glyph }) }),
731
- /* @__PURE__ */ jsx(Text, { style: [styles7.text, { color: tone.ink }], children: message.text })
892
+ /* @__PURE__ */ jsx(View, { "aria-hidden": true, importantForAccessibility: "no-hide-descendants", style: [styles8.glyph, { borderColor: tone.ink }], children: /* @__PURE__ */ jsx(Text, { style: [styles8.glyphText, { color: tone.ink }], children: tone.glyph }) }),
893
+ /* @__PURE__ */ jsxs(View, { style: styles8.body, children: [
894
+ /* @__PURE__ */ jsx(Text, { style: [styles8.text, { color: tone.ink }], children: message.text }),
895
+ /* @__PURE__ */ jsx(ErrorReferenceRow, { actionColor: tone.ink, color: tone.ink, testID: `${testID}-reference`, traceId: message.traceId })
896
+ ] })
732
897
  ]
733
898
  }
734
899
  );
@@ -758,7 +923,7 @@ var ToastHost = ({
758
923
  );
759
924
  const push = useCallback(
760
925
  (toast) => {
761
- setMessages((s) => [...s, { id: nextId(), type: toast.type, text: sanitizeToastText(toast.text, maxLength) }]);
926
+ setMessages((s) => [...s, { id: nextId(), type: toast.type, text: sanitizeToastText(toast.text, maxLength), traceId: toast.traceId }]);
762
927
  },
763
928
  [maxLength]
764
929
  );
@@ -768,7 +933,7 @@ var ToastHost = ({
768
933
  useEffect(() => subscribe(push), [subscribe, push]);
769
934
  if (messages.length === 0) return null;
770
935
  const canPortal = IS_WEB && typeof document !== "undefined";
771
- const layer = /* @__PURE__ */ jsx(View, { style: [styles7.container, { top: toastTop(IS_WEB, topInset) }, canPortal ? WEB_FIXED_LAYER : null], children: messages.map((m) => /* @__PURE__ */ jsx(
936
+ const layer = /* @__PURE__ */ jsx(View, { style: [styles8.container, { top: toastTop(IS_WEB, topInset) }, canPortal ? WEB_FIXED_LAYER : null], children: messages.map((m) => /* @__PURE__ */ jsx(
772
937
  ToastItem,
773
938
  {
774
939
  durationMs,
@@ -844,7 +1009,7 @@ var SUBTITLE_FONT_SIZE = 15;
844
1009
  var ATTEMPT_FONT_SIZE = 13;
845
1010
  var CARD_PADDING = 24;
846
1011
  var NO_ATTEMPT = 0;
847
- var styles8 = StyleSheet.create({
1012
+ var styles9 = StyleSheet.create({
848
1013
  overlay: {
849
1014
  position: "absolute",
850
1015
  top: 0,
@@ -901,13 +1066,13 @@ var WarmingOverlay = ({
901
1066
  {
902
1067
  accessibilityLabel: mergedLabels.accessibilityLabel,
903
1068
  accessibilityRole: "alert",
904
- style: [styles8.overlay, { backgroundColor: colors.background }],
1069
+ style: [styles9.overlay, { backgroundColor: colors.background }],
905
1070
  testID: testIdPrefix,
906
- children: /* @__PURE__ */ jsxs(View, { style: styles8.card, children: [
1071
+ children: /* @__PURE__ */ jsxs(View, { style: styles9.card, children: [
907
1072
  /* @__PURE__ */ jsx(ActivityIndicator, { color: primary, size: "large" }),
908
- /* @__PURE__ */ jsx(Text, { style: [styles8.title, { color: colors.text }], testID: `${testIdPrefix}-title`, children: mergedLabels.title }),
909
- /* @__PURE__ */ jsx(Text, { style: [styles8.subtitle, { color: colors.textSecondary }], testID: `${testIdPrefix}-subtitle`, children: mergedLabels.subtitle }),
910
- showHint ? /* @__PURE__ */ jsx(Text, { style: [styles8.attempt, { color: colors.textSecondary }], testID: `${testIdPrefix}-attempt`, children: mergedLabels.attemptHint(snapshot2.attempt) }) : null
1073
+ /* @__PURE__ */ jsx(Text, { style: [styles9.title, { color: colors.text }], testID: `${testIdPrefix}-title`, children: mergedLabels.title }),
1074
+ /* @__PURE__ */ jsx(Text, { style: [styles9.subtitle, { color: colors.textSecondary }], testID: `${testIdPrefix}-subtitle`, children: mergedLabels.subtitle }),
1075
+ showHint ? /* @__PURE__ */ jsx(Text, { style: [styles9.attempt, { color: colors.textSecondary }], testID: `${testIdPrefix}-attempt`, children: mergedLabels.attemptHint(snapshot2.attempt) }) : null
911
1076
  ] })
912
1077
  }
913
1078
  );
@@ -917,22 +1082,27 @@ var WarmingOverlay = ({
917
1082
  var DEFAULT_TOAST_TYPE = "info";
918
1083
  function createToastBus() {
919
1084
  const listeners2 = /* @__PURE__ */ new Set();
1085
+ const push = (toast) => {
1086
+ for (const listener of [...listeners2]) listener(toast);
1087
+ };
920
1088
  const emit2 = (text, type = DEFAULT_TOAST_TYPE) => {
921
- for (const push of [...listeners2]) push({ text, type });
1089
+ push({ text, type });
922
1090
  };
923
1091
  return {
924
- subscribe(push) {
925
- listeners2.add(push);
1092
+ subscribe(push2) {
1093
+ listeners2.add(push2);
926
1094
  return () => {
927
- listeners2.delete(push);
1095
+ listeners2.delete(push2);
928
1096
  };
929
1097
  },
930
1098
  emit: emit2,
931
1099
  success(text) {
932
1100
  emit2(text, "success");
933
1101
  },
934
- error(text) {
935
- emit2(text, "error");
1102
+ error(text, cause) {
1103
+ const traceId = readTraceId(cause);
1104
+ if (traceId === void 0) emit2(text, "error");
1105
+ else push({ text, type: "error", traceId });
936
1106
  },
937
1107
  info(text) {
938
1108
  emit2(text, "info");
@@ -955,7 +1125,7 @@ var BUTTON_PADDING_V3 = 12;
955
1125
  var BUTTON_BORDER_RADIUS3 = 8;
956
1126
  var BUTTON_MARGIN_TOP3 = 12;
957
1127
  var BUTTON_FONT_SIZE3 = 16;
958
- var styles9 = StyleSheet.create({
1128
+ var styles10 = StyleSheet.create({
959
1129
  container: {
960
1130
  flex: 1,
961
1131
  justifyContent: "center",
@@ -1023,10 +1193,10 @@ var ErrorBoundaryFallback = ({
1023
1193
  accessibilityHint: labels.tryAgainHint,
1024
1194
  accessibilityLabel: labels.tryAgain,
1025
1195
  accessibilityRole: "button",
1026
- style: [styles9.button, reloadIsPrimary ? secondaryFill : primaryFill],
1196
+ style: [styles10.button, reloadIsPrimary ? secondaryFill : primaryFill],
1027
1197
  testID: `${testIDPrefix}-retry-button`,
1028
1198
  onPress: onRetry,
1029
- children: /* @__PURE__ */ jsx(Text, { style: [styles9.buttonText, reloadIsPrimary ? secondaryInk : primaryInk], children: labels.tryAgain })
1199
+ children: /* @__PURE__ */ jsx(Text, { style: [styles10.buttonText, reloadIsPrimary ? secondaryInk : primaryInk], children: labels.tryAgain })
1030
1200
  }
1031
1201
  ) : null;
1032
1202
  const reloadButton = typeof onReload === "function" ? /* @__PURE__ */ jsx(
@@ -1035,10 +1205,10 @@ var ErrorBoundaryFallback = ({
1035
1205
  accessibilityHint: labels.reloadHint,
1036
1206
  accessibilityLabel: labels.reload,
1037
1207
  accessibilityRole: "button",
1038
- style: [styles9.button, reloadIsPrimary ? primaryFill : secondaryFill],
1208
+ style: [styles10.button, reloadIsPrimary ? primaryFill : secondaryFill],
1039
1209
  testID: `${testIDPrefix}-reload-button`,
1040
1210
  onPress: onReload,
1041
- children: /* @__PURE__ */ jsx(Text, { style: [styles9.buttonText, reloadIsPrimary ? primaryInk : secondaryInk], children: labels.reload })
1211
+ children: /* @__PURE__ */ jsx(Text, { style: [styles10.buttonText, reloadIsPrimary ? primaryInk : secondaryInk], children: labels.reload })
1042
1212
  }
1043
1213
  ) : null;
1044
1214
  return /* @__PURE__ */ jsx(
@@ -1046,19 +1216,19 @@ var ErrorBoundaryFallback = ({
1046
1216
  {
1047
1217
  accessibilityLiveRegion: "assertive",
1048
1218
  role: "alert",
1049
- style: [styles9.container, { backgroundColor: theme.colors.background }],
1219
+ style: [styles10.container, { backgroundColor: theme.colors.background }],
1050
1220
  testID: testIDPrefix,
1051
- children: /* @__PURE__ */ jsxs(View, { style: styles9.content, children: [
1052
- /* @__PURE__ */ jsx(Text, { style: [styles9.title, { color: theme.colors.text }], children: labels.title }),
1221
+ children: /* @__PURE__ */ jsxs(View, { style: styles10.content, children: [
1222
+ /* @__PURE__ */ jsx(Text, { style: [styles10.title, { color: theme.colors.text }], children: labels.title }),
1053
1223
  /* @__PURE__ */ jsx(ErrorState, { message: labels.message, testID: `${testIDPrefix}-message` }),
1054
1224
  hasDetails ? /* @__PURE__ */ jsxs(
1055
1225
  View,
1056
1226
  {
1057
- style: [styles9.details, { backgroundColor: theme.colors.surface, borderColor: warningColor }],
1227
+ style: [styles10.details, { backgroundColor: theme.colors.surface, borderColor: warningColor }],
1058
1228
  testID: `${testIDPrefix}-details`,
1059
1229
  children: [
1060
- /* @__PURE__ */ jsx(Text, { style: [styles9.detailsTitle, { color: warningColor }], children: labels.errorDetails }),
1061
- /* @__PURE__ */ jsx(Text, { style: [styles9.detailsText, { color: theme.colors.textSecondary }], children: error.message })
1230
+ /* @__PURE__ */ jsx(Text, { style: [styles10.detailsTitle, { color: warningColor }], children: labels.errorDetails }),
1231
+ /* @__PURE__ */ jsx(Text, { style: [styles10.detailsText, { color: theme.colors.textSecondary }], children: error.message })
1062
1232
  ]
1063
1233
  }
1064
1234
  ) : null,
@@ -1071,7 +1241,7 @@ var ErrorBoundaryFallback = ({
1071
1241
  var CONTAINER_PADDING4 = 20;
1072
1242
  var MESSAGE_FONT_SIZE3 = 16;
1073
1243
  var MESSAGE_MARGIN_TOP = 12;
1074
- var styles10 = StyleSheet.create({
1244
+ var styles11 = StyleSheet.create({
1075
1245
  container: {
1076
1246
  flex: 1,
1077
1247
  justifyContent: "center",
@@ -1094,11 +1264,11 @@ var ErrorBoundaryRecovering = ({
1094
1264
  {
1095
1265
  accessibilityLiveRegion: "polite",
1096
1266
  role: "status",
1097
- style: [styles10.container, { backgroundColor: theme.colors.background }],
1267
+ style: [styles11.container, { backgroundColor: theme.colors.background }],
1098
1268
  testID,
1099
1269
  children: [
1100
1270
  /* @__PURE__ */ jsx(ActivityIndicator, { color: theme.palette.primary["500"], size: "large" }),
1101
- /* @__PURE__ */ jsx(Text, { style: [styles10.message, { color: theme.colors.textSecondary }], children: message })
1271
+ /* @__PURE__ */ jsx(Text, { style: [styles11.message, { color: theme.colors.textSecondary }], children: message })
1102
1272
  ]
1103
1273
  }
1104
1274
  );
@@ -1188,7 +1358,7 @@ var TRACK_MARGIN = 4;
1188
1358
  var INDET_FRACTION = 0.35;
1189
1359
  var INDET_DURATION_MS = 1300;
1190
1360
  var LABEL_FONT_SIZE = 12;
1191
- var styles11 = StyleSheet.create({
1361
+ var styles12 = StyleSheet.create({
1192
1362
  track: { height: BAR_HEIGHT, borderRadius: RADIUS, overflow: "hidden", marginVertical: TRACK_MARGIN },
1193
1363
  fill: { height: "100%", borderRadius: RADIUS },
1194
1364
  label: { fontSize: LABEL_FONT_SIZE, textAlign: "right", fontVariant: ["tabular-nums"] }
@@ -1207,7 +1377,7 @@ function IndeterminateFill({ color, width, testID }) {
1207
1377
  return /* @__PURE__ */ jsx(
1208
1378
  Animated.View,
1209
1379
  {
1210
- style: [styles11.fill, { backgroundColor: color, width: barWidth, transform: [{ translateX }] }],
1380
+ style: [styles12.fill, { backgroundColor: color, width: barWidth, transform: [{ translateX }] }],
1211
1381
  testID
1212
1382
  }
1213
1383
  );
@@ -1242,13 +1412,13 @@ function ProgressBar(props) {
1242
1412
  role: "progressbar",
1243
1413
  testID,
1244
1414
  children: [
1245
- /* @__PURE__ */ jsx(View, { style: [styles11.track, { backgroundColor: trackColor }], onLayout, children: indeterminate ? /* @__PURE__ */ jsx(IndeterminateFill, { color, testID: fillTestID, width }) : /* @__PURE__ */ jsx(View, { style: [styles11.fill, { backgroundColor: color, width: `${safePct}%` }], testID: fillTestID }) }),
1246
- !indeterminate && label !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles11.label, { color: textColor }], children: label }) : null
1415
+ /* @__PURE__ */ jsx(View, { style: [styles12.track, { backgroundColor: trackColor }], onLayout, children: indeterminate ? /* @__PURE__ */ jsx(IndeterminateFill, { color, testID: fillTestID, width }) : /* @__PURE__ */ jsx(View, { style: [styles12.fill, { backgroundColor: color, width: `${safePct}%` }], testID: fillTestID }) }),
1416
+ !indeterminate && label !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles12.label, { color: textColor }], children: label }) : null
1247
1417
  ]
1248
1418
  }
1249
1419
  );
1250
1420
  }
1251
- var styles12 = StyleSheet.create({
1421
+ var styles13 = StyleSheet.create({
1252
1422
  button: {
1253
1423
  minHeight: MIN_TOUCH_TARGET_PX,
1254
1424
  minWidth: MIN_TOUCH_TARGET_PX,
@@ -1271,9 +1441,9 @@ function RunCardButton({ label, hint, color, onPress, testID, disabled = false,
1271
1441
  accessibilityState: { disabled, expanded },
1272
1442
  disabled,
1273
1443
  onPress,
1274
- style: [styles12.button, { borderColor: color }, disabled ? { opacity: DISABLED_OPACITY } : null],
1444
+ style: [styles13.button, { borderColor: color }, disabled ? { opacity: DISABLED_OPACITY } : null],
1275
1445
  testID,
1276
- children: /* @__PURE__ */ jsx(Text, { style: [styles12.text, { color }], children: label })
1446
+ children: /* @__PURE__ */ jsx(Text, { style: [styles13.text, { color }], children: label })
1277
1447
  }
1278
1448
  );
1279
1449
  }
@@ -1342,7 +1512,7 @@ function runToneColor(theme, state) {
1342
1512
  return theme.colors.textSecondary;
1343
1513
  }
1344
1514
  var MARK = { done: "\u2713", running: "\u25CF", pending: "\u25CB", failed: "\u2715" };
1345
- var styles13 = StyleSheet.create({
1515
+ var styles14 = StyleSheet.create({
1346
1516
  row: { flexDirection: "row", flexWrap: "wrap", gap: 6 },
1347
1517
  chip: { borderWidth: 1, borderRadius: 6, paddingHorizontal: 10, justifyContent: "center" },
1348
1518
  tap: { minHeight: MIN_TOUCH_TARGET_PX },
@@ -1355,14 +1525,14 @@ function chipText(group, labels) {
1355
1525
  }
1356
1526
  function RunGroupChips({ groups, labels, testID, selectedId = null, onSelect }) {
1357
1527
  const { theme } = useFeedbackUi();
1358
- return /* @__PURE__ */ jsx(View, { style: styles13.row, testID, children: groups.map((group) => {
1528
+ return /* @__PURE__ */ jsx(View, { style: styles14.row, testID, children: groups.map((group) => {
1359
1529
  const color = runToneColor(theme, group.state);
1360
1530
  const selected = group.id === selectedId;
1361
1531
  const a11y = labels.groupA11y(group.label, group.state, labels.formatDuration(group.durationSec));
1362
- const body = /* @__PURE__ */ jsx(Text, { style: [styles13.text, { color }, selected || group.state === "running" ? styles13.strong : null], children: chipText(group, labels) });
1363
- const look = [styles13.chip, { borderColor: color, backgroundColor: selected ? theme.colors.surfaceElevated : theme.colors.surface }];
1532
+ const body = /* @__PURE__ */ jsx(Text, { style: [styles14.text, { color }, selected || group.state === "running" ? styles14.strong : null], children: chipText(group, labels) });
1533
+ const look = [styles14.chip, { borderColor: color, backgroundColor: selected ? theme.colors.surfaceElevated : theme.colors.surface }];
1364
1534
  if (onSelect === void 0) {
1365
- return /* @__PURE__ */ jsx(View, { style: [look, styles13.still], accessible: true, accessibilityLabel: a11y, testID: `${testID}-${group.id}`, children: body }, group.id);
1535
+ return /* @__PURE__ */ jsx(View, { style: [look, styles14.still], accessible: true, accessibilityLabel: a11y, testID: `${testID}-${group.id}`, children: body }, group.id);
1366
1536
  }
1367
1537
  return /* @__PURE__ */ jsx(
1368
1538
  Pressable,
@@ -1372,7 +1542,7 @@ function RunGroupChips({ groups, labels, testID, selectedId = null, onSelect })
1372
1542
  accessibilityHint: labels.groupHint,
1373
1543
  accessibilityState: { selected },
1374
1544
  onPress: () => onSelect(group.id),
1375
- style: [look, styles13.tap],
1545
+ style: [look, styles14.tap],
1376
1546
  testID: `${testID}-${group.id}`,
1377
1547
  children: body
1378
1548
  },
@@ -1386,8 +1556,8 @@ function RunGroupSummary({ groups, labels, testID }) {
1386
1556
  const open = groups.filter((g) => g.state !== "done");
1387
1557
  const doneColor = runToneColor(theme, "done");
1388
1558
  const doneText = labels.doneSummary(done.count, labels.formatDuration(done.durationSec));
1389
- return /* @__PURE__ */ jsxs(View, { style: styles13.row, testID, children: [
1390
- done.count > 0 ? /* @__PURE__ */ jsx(View, { style: [styles13.chip, styles13.still, { borderColor: doneColor }], accessible: true, accessibilityLabel: doneText, testID: `${testID}-done`, children: /* @__PURE__ */ jsx(Text, { style: [styles13.text, { color: doneColor }], children: `${MARK.done} ${doneText}` }) }) : null,
1559
+ return /* @__PURE__ */ jsxs(View, { style: styles14.row, testID, children: [
1560
+ done.count > 0 ? /* @__PURE__ */ jsx(View, { style: [styles14.chip, styles14.still, { borderColor: doneColor }], accessible: true, accessibilityLabel: doneText, testID: `${testID}-done`, children: /* @__PURE__ */ jsx(Text, { style: [styles14.text, { color: doneColor }], children: `${MARK.done} ${doneText}` }) }) : null,
1391
1561
  /* @__PURE__ */ jsx(RunGroupChips, { groups: open, labels, testID: `${testID}-open` })
1392
1562
  ] });
1393
1563
  }
@@ -1397,7 +1567,7 @@ var LABEL_SHARE = "35%";
1397
1567
  var LABEL_LINES = 2;
1398
1568
  var DURATION_WIDTH = 64;
1399
1569
  var PERCENT = 100;
1400
- var styles14 = StyleSheet.create({
1570
+ var styles15 = StyleSheet.create({
1401
1571
  list: { gap: 6 },
1402
1572
  row: { flexDirection: "row", alignItems: "center", gap: 8 },
1403
1573
  stack: { gap: 4 },
@@ -1416,22 +1586,22 @@ function RunStepBars({ steps, maxBars, labels, compact, testID }) {
1416
1586
  const maxSec = steps.reduce((m, s) => Math.max(m, s.durationSec), 0);
1417
1587
  const folded = split.hiddenCount > 0;
1418
1588
  const canFold = all && steps.length > maxBars;
1419
- return /* @__PURE__ */ jsxs(View, { style: styles14.list, testID, children: [
1589
+ return /* @__PURE__ */ jsxs(View, { style: styles15.list, testID, children: [
1420
1590
  split.visible.map((step, i) => {
1421
1591
  const color = runToneColor(theme, step.state);
1422
1592
  const duration = labels.formatDuration(step.durationSec);
1423
- const strong = step.state === "running" ? styles14.strong : null;
1424
- const name = /* @__PURE__ */ jsx(Text, { style: [compact ? styles14.compactLabel : styles14.label, { color: theme.colors.text }, strong], numberOfLines: LABEL_LINES, testID: `${testID}-name-${String(i)}`, children: step.label });
1425
- const time = /* @__PURE__ */ jsx(Text, { style: [styles14.duration, { color: theme.colors.textSecondary }, strong], children: duration });
1426
- const bar = /* @__PURE__ */ jsx(View, { style: [compact ? styles14.fullTrack : styles14.track, { backgroundColor: theme.colors.border }], children: /* @__PURE__ */ jsx(View, { style: [styles14.fill, { backgroundColor: color, width: `${barFraction(step.durationSec, maxSec) * PERCENT}%` }] }) });
1593
+ const strong = step.state === "running" ? styles15.strong : null;
1594
+ const name = /* @__PURE__ */ jsx(Text, { style: [compact ? styles15.compactLabel : styles15.label, { color: theme.colors.text }, strong], numberOfLines: LABEL_LINES, testID: `${testID}-name-${String(i)}`, children: step.label });
1595
+ const time = /* @__PURE__ */ jsx(Text, { style: [styles15.duration, { color: theme.colors.textSecondary }, strong], children: duration });
1596
+ const bar = /* @__PURE__ */ jsx(View, { style: [compact ? styles15.fullTrack : styles15.track, { backgroundColor: theme.colors.border }], children: /* @__PURE__ */ jsx(View, { style: [styles15.fill, { backgroundColor: color, width: `${barFraction(step.durationSec, maxSec) * PERCENT}%` }] }) });
1427
1597
  const a11y = { accessible: true, accessibilityLabel: labels.stepA11y(step.label, duration), testID: `${testID}-row-${String(i)}` };
1428
- return compact ? /* @__PURE__ */ jsxs(View, { style: styles14.stack, ...a11y, children: [
1429
- /* @__PURE__ */ jsxs(View, { style: styles14.row, children: [
1598
+ return compact ? /* @__PURE__ */ jsxs(View, { style: styles15.stack, ...a11y, children: [
1599
+ /* @__PURE__ */ jsxs(View, { style: styles15.row, children: [
1430
1600
  name,
1431
1601
  time
1432
1602
  ] }),
1433
1603
  bar
1434
- ] }, `${step.label}-${String(i)}`) : /* @__PURE__ */ jsxs(View, { style: styles14.row, ...a11y, children: [
1604
+ ] }, `${step.label}-${String(i)}`) : /* @__PURE__ */ jsxs(View, { style: styles15.row, ...a11y, children: [
1435
1605
  name,
1436
1606
  bar,
1437
1607
  time
@@ -1452,7 +1622,7 @@ function RunStepBars({ steps, maxBars, labels, compact, testID }) {
1452
1622
  }
1453
1623
  var LIVE_RUN_CARD_COMPACT_MAX_PX = 640;
1454
1624
  var DEFAULT_MAX_BARS = 4;
1455
- var styles15 = StyleSheet.create({
1625
+ var styles16 = StyleSheet.create({
1456
1626
  card: { borderWidth: 1, borderRadius: 8, padding: 14, gap: 10 },
1457
1627
  head: { flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: 10 },
1458
1628
  titleBox: { flexGrow: 1, flexShrink: 1, flexBasis: 200, minWidth: 0, gap: 2 },
@@ -1476,18 +1646,18 @@ function LiveRunCard(props) {
1476
1646
  const percent = progressPercent(progress);
1477
1647
  const showTimings = !compact || open;
1478
1648
  const muted = { color: theme.colors.textSecondary };
1479
- return /* @__PURE__ */ jsxs(View, { style: [styles15.card, { borderColor: tone, backgroundColor: theme.colors.surface }], testID, children: [
1480
- /* @__PURE__ */ jsxs(View, { style: styles15.head, children: [
1481
- /* @__PURE__ */ jsx(View, { style: [styles15.pill, { borderColor: tone }], children: /* @__PURE__ */ jsx(Text, { style: [styles15.pillText, { color: tone }], testID: `${testID}-status`, children: labels.status }) }),
1482
- /* @__PURE__ */ jsxs(View, { style: styles15.titleBox, children: [
1483
- /* @__PURE__ */ jsx(Text, { style: [styles15.title, { color: theme.colors.text }], testID: `${testID}-title`, children: title }),
1484
- /* @__PURE__ */ jsx(Text, { style: [styles15.meta, muted], testID: `${testID}-meta`, children: labels.meta })
1649
+ return /* @__PURE__ */ jsxs(View, { style: [styles16.card, { borderColor: tone, backgroundColor: theme.colors.surface }], testID, children: [
1650
+ /* @__PURE__ */ jsxs(View, { style: styles16.head, children: [
1651
+ /* @__PURE__ */ jsx(View, { style: [styles16.pill, { borderColor: tone }], children: /* @__PURE__ */ jsx(Text, { style: [styles16.pillText, { color: tone }], testID: `${testID}-status`, children: labels.status }) }),
1652
+ /* @__PURE__ */ jsxs(View, { style: styles16.titleBox, children: [
1653
+ /* @__PURE__ */ jsx(Text, { style: [styles16.title, { color: theme.colors.text }], testID: `${testID}-title`, children: title }),
1654
+ /* @__PURE__ */ jsx(Text, { style: [styles16.meta, muted], testID: `${testID}-meta`, children: labels.meta })
1485
1655
  ] }),
1486
1656
  onCancel !== void 0 ? /* @__PURE__ */ jsx(RunCardButton, { label: labels.cancel, hint: labels.cancelHint, color: theme.semantic.error["500"], onPress: onCancel, disabled: cancelDisabled, testID: `${testID}-cancel` }) : null
1487
1657
  ] }),
1488
- currentStep !== null && currentStep !== "" ? /* @__PURE__ */ jsx(Text, { style: [styles15.step, { color: theme.colors.text }], testID: `${testID}-step`, children: currentStep }) : null,
1658
+ currentStep !== null && currentStep !== "" ? /* @__PURE__ */ jsx(Text, { style: [styles16.step, { color: theme.colors.text }], testID: `${testID}-step`, children: currentStep }) : null,
1489
1659
  percent !== null ? /* @__PURE__ */ jsx(ProgressBar, { percent, label: labels.progress, accessibilityLabel: labels.progressA11y, color: tone, testID: `${testID}-progress` }) : null,
1490
- percent === null && labels.progress !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles15.meta, muted], testID: `${testID}-progress-text`, children: labels.progress }) : null,
1660
+ percent === null && labels.progress !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles16.meta, muted], testID: `${testID}-progress-text`, children: labels.progress }) : null,
1491
1661
  compact && !open ? /* @__PURE__ */ jsx(RunGroupSummary, { groups, labels, testID: `${testID}-summary` }) : null,
1492
1662
  compact ? /* @__PURE__ */ jsx(RunCardButton, { label: labels.stepTimings, hint: labels.stepTimingsHint, color: theme.colors.textSecondary, onPress: () => setOpen(!open), expanded: open, testID: `${testID}-timings-toggle` }) : null,
1493
1663
  showTimings ? /* @__PURE__ */ jsx(RunGroupChips, { groups, labels, selectedId, onSelect: setPicked, testID: `${testID}-groups` }) : null,
@@ -1495,6 +1665,6 @@ function LiveRunCard(props) {
1495
1665
  ] });
1496
1666
  }
1497
1667
 
1498
- export { AppErrorBoundary, AsyncSurface, ConfirmDialog, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, EmptyListState, ErrorState, FEEDBACK_TEST_IDS, FeedbackUiProvider, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, LoadingFallback, MODAL_OVERLAY_COLOR, PageSkeleton, ProgressBar, ToastHost, FeedbackUiProvider as UiProvider, WARMING_QUIET_PERIOD_MS, WarmingOverlay, barFraction, clampPercent, createToastBus, defaultGroupId, getWarmingSnapshot, mergeRunSteps, notifyWarming, progressPercent, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useFeedbackUi, useFeedbackUi as useUi };
1668
+ export { AppErrorBoundary, AsyncSurface, COPY_FEEDBACK_MS, ConfirmDialog, CopyStatus, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, EmptyListState, ErrorReferenceRow, ErrorState, FEEDBACK_TEST_IDS, FeedbackUiProvider, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, LoadingFallback, MODAL_OVERLAY_COLOR, PageSkeleton, ProgressBar, ToastHost, FeedbackUiProvider as UiProvider, WARMING_QUIET_PERIOD_MS, WarmingOverlay, barFraction, clampPercent, copyText, createToastBus, defaultGroupId, getWarmingSnapshot, mergeRunSteps, notifyWarming, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useCopyToClipboard, useFeedbackUi, useFeedbackUi as useUi };
1499
1669
  //# sourceMappingURL=index.mjs.map
1500
1670
  //# sourceMappingURL=index.mjs.map