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