@dloizides/ui-feedback 1.23.0 → 1.25.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
@@ -44,6 +44,14 @@ var FeedbackUiProvider = ({
44
44
  function useFeedbackUi() {
45
45
  return useContext(FeedbackUiContext);
46
46
  }
47
+ function UiThemeOverride({
48
+ map,
49
+ children
50
+ }) {
51
+ const { theme, t, navigate } = useFeedbackUi();
52
+ const mapped = useMemo(() => map(theme), [map, theme]);
53
+ return /* @__PURE__ */ jsx(FeedbackUiProvider, { navigate, t, theme: mapped, children });
54
+ }
47
55
 
48
56
  // src/constants.ts
49
57
  var MODAL_OVERLAY_COLOR = "rgba(0, 0, 0, 0.5)";
@@ -371,6 +379,26 @@ var ErrorState = ({
371
379
  )
372
380
  ] });
373
381
  };
382
+ var BORDER_WIDTH = 1;
383
+ var BORDER_RADIUS = 8;
384
+ var PADDING = 12;
385
+ var LINE_GAP = 4;
386
+ var styles4 = StyleSheet.create({
387
+ notice: { borderWidth: BORDER_WIDTH, borderRadius: BORDER_RADIUS, padding: PADDING, gap: LINE_GAP }
388
+ });
389
+ var ErrorNotice = ({ children, testID }) => {
390
+ const { theme } = useFeedbackUi();
391
+ const { error } = theme.semantic;
392
+ return /* @__PURE__ */ jsx(
393
+ View,
394
+ {
395
+ "aria-live": "polite",
396
+ style: [styles4.notice, { borderColor: error["500"], backgroundColor: error["50"] }],
397
+ testID,
398
+ children
399
+ }
400
+ );
401
+ };
374
402
  var MESSAGE_FONT_SIZE2 = 16;
375
403
  var CTA_MARGIN_TOP = 16;
376
404
  var CTA_PADDING_VERTICAL = 10;
@@ -378,7 +406,7 @@ var CTA_PADDING_HORIZONTAL = 20;
378
406
  var CTA_BORDER_RADIUS = 8;
379
407
  var CTA_FONT_SIZE = 14;
380
408
  var CONTAINER_PADDING2 = 32;
381
- var styles4 = StyleSheet.create({
409
+ var styles5 = StyleSheet.create({
382
410
  container: {
383
411
  flex: 1,
384
412
  justifyContent: "center",
@@ -414,25 +442,25 @@ var EmptyListState = ({
414
442
  if (typeof ctaRoute === "string" && typeof navigate === "function") navigate(ctaRoute);
415
443
  }, [navigate, ctaRoute]);
416
444
  const showCta = typeof ctaTextKey === "string" && typeof ctaHintKey === "string" && typeof ctaRoute === "string";
417
- return /* @__PURE__ */ jsxs(View, { style: styles4.container, testID, children: [
418
- /* @__PURE__ */ jsx(Text, { style: [styles4.message, { color: colors.textSecondary }], children: t(messageKey) }),
445
+ return /* @__PURE__ */ jsxs(View, { style: styles5.container, testID, children: [
446
+ /* @__PURE__ */ jsx(Text, { style: [styles5.message, { color: colors.textSecondary }], children: t(messageKey) }),
419
447
  showCta ? /* @__PURE__ */ jsx(
420
448
  TouchableOpacity,
421
449
  {
422
450
  accessibilityHint: t(ctaHintKey),
423
451
  accessibilityLabel: t(ctaTextKey),
424
452
  accessibilityRole: "button",
425
- style: [styles4.ctaButton, { backgroundColor: primary }],
453
+ style: [styles5.ctaButton, { backgroundColor: primary }],
426
454
  testID: FEEDBACK_TEST_IDS.emptyListCta,
427
455
  onPress: handlePress,
428
- children: /* @__PURE__ */ jsx(Text, { style: [styles4.ctaText, { color: colors.background }], children: t(ctaTextKey) })
456
+ children: /* @__PURE__ */ jsx(Text, { style: [styles5.ctaText, { color: colors.background }], children: t(ctaTextKey) })
429
457
  }
430
458
  ) : null
431
459
  ] });
432
460
  };
433
461
  var FULLSCREEN_MIN_HEIGHT = 300;
434
462
  var CONTAINER_MIN_HEIGHT = 100;
435
- var styles5 = StyleSheet.create({
463
+ var styles6 = StyleSheet.create({
436
464
  container: {
437
465
  flex: 1,
438
466
  justifyContent: "center",
@@ -453,7 +481,7 @@ var LoadingFallback = ({ fullScreen = false, size = "large" }) => {
453
481
  accessibilityHint: t("loadingFallback.hint"),
454
482
  accessibilityLabel: t("loadingFallback.label"),
455
483
  accessibilityRole: "progressbar",
456
- style: [styles5.container, fullScreen && styles5.fullScreen, { backgroundColor: colors.background }],
484
+ style: [styles6.container, fullScreen && styles6.fullScreen, { backgroundColor: colors.background }],
457
485
  testID: FEEDBACK_TEST_IDS.loadingFallback,
458
486
  children: /* @__PURE__ */ jsx(ActivityIndicator, { color: primary, size })
459
487
  }
@@ -470,7 +498,7 @@ var TEXT_LINE_HEIGHT = 16;
470
498
  var TEXT_LINE_FULL_WIDTH = "100%";
471
499
  var TEXT_LINE_SHORT_WIDTH = "70%";
472
500
  var CARD_HEIGHT = 120;
473
- var styles6 = StyleSheet.create({
501
+ var styles7 = StyleSheet.create({
474
502
  container: {
475
503
  flex: 1,
476
504
  padding: 16
@@ -504,25 +532,25 @@ var PageSkeleton = ({
504
532
  const { theme, t } = useFeedbackUi();
505
533
  const colors = theme.colors;
506
534
  const skeletonColor = String(colors.border);
507
- const renderListRow = (index) => /* @__PURE__ */ jsxs(View, { style: styles6.row, children: [
535
+ const renderListRow = (index) => /* @__PURE__ */ jsxs(View, { style: styles7.row, children: [
508
536
  /* @__PURE__ */ jsx(
509
537
  Skeleton,
510
538
  {
511
539
  backgroundColor: skeletonColor,
512
540
  borderRadius: AVATAR_BORDER_RADIUS,
513
541
  height: AVATAR_SIZE,
514
- style: styles6.avatar,
542
+ style: styles7.avatar,
515
543
  width: AVATAR_SIZE
516
544
  }
517
545
  ),
518
- /* @__PURE__ */ jsxs(View, { style: styles6.textContainer, children: [
546
+ /* @__PURE__ */ jsxs(View, { style: styles7.textContainer, children: [
519
547
  /* @__PURE__ */ jsx(
520
548
  Skeleton,
521
549
  {
522
550
  backgroundColor: skeletonColor,
523
551
  borderRadius: SKELETON_BORDER_RADIUS,
524
552
  height: TEXT_LINE_HEIGHT,
525
- style: styles6.textLine,
553
+ style: styles7.textLine,
526
554
  width: TEXT_LINE_FULL_WIDTH
527
555
  }
528
556
  ),
@@ -532,7 +560,7 @@ var PageSkeleton = ({
532
560
  backgroundColor: skeletonColor,
533
561
  borderRadius: SKELETON_BORDER_RADIUS,
534
562
  height: TEXT_LINE_HEIGHT,
535
- style: styles6.textLine,
563
+ style: styles7.textLine,
536
564
  width: TEXT_LINE_SHORT_WIDTH
537
565
  }
538
566
  )
@@ -544,7 +572,7 @@ var PageSkeleton = ({
544
572
  backgroundColor: skeletonColor,
545
573
  borderRadius: CARD_BORDER_RADIUS,
546
574
  height: CARD_HEIGHT,
547
- style: styles6.card
575
+ style: styles7.card
548
576
  },
549
577
  index
550
578
  );
@@ -555,7 +583,7 @@ var PageSkeleton = ({
555
583
  accessibilityHint: t("pageSkeleton.loadingHint"),
556
584
  accessibilityLabel: t("pageSkeleton.loadingLabel"),
557
585
  accessibilityState: { busy: true },
558
- style: [styles6.container, { backgroundColor: colors.background }],
586
+ style: [styles7.container, { backgroundColor: colors.background }],
559
587
  testID: FEEDBACK_TEST_IDS.pageSkeleton,
560
588
  children: [
561
589
  showHeader ? /* @__PURE__ */ jsx(
@@ -564,7 +592,7 @@ var PageSkeleton = ({
564
592
  backgroundColor: skeletonColor,
565
593
  borderRadius: SKELETON_BORDER_RADIUS,
566
594
  height: HEADER_HEIGHT,
567
- style: styles6.header,
595
+ style: styles7.header,
568
596
  width: HEADER_WIDTH
569
597
  }
570
598
  ) : null,
@@ -596,7 +624,7 @@ function confirmInk(theme, destructive) {
596
624
  return resolveOnBrand(confirmFill(theme, destructive));
597
625
  }
598
626
  var DIALOG_MAX_WIDTH = 400;
599
- var styles7 = StyleSheet.create({
627
+ var styles8 = StyleSheet.create({
600
628
  overlay: {
601
629
  flex: 1,
602
630
  backgroundColor: MODAL_OVERLAY_COLOR,
@@ -688,17 +716,17 @@ var ConfirmDialog = ({
688
716
  animationType: "fade",
689
717
  visible,
690
718
  onRequestClose: onCancel,
691
- children: /* @__PURE__ */ jsx(View, { style: styles7.overlay, testID: FEEDBACK_TEST_IDS.confirmDialog, children: /* @__PURE__ */ jsxs(
719
+ children: /* @__PURE__ */ jsx(View, { style: styles8.overlay, testID: FEEDBACK_TEST_IDS.confirmDialog, children: /* @__PURE__ */ jsxs(
692
720
  View,
693
721
  {
694
722
  accessibilityViewIsModal: true,
695
723
  "aria-label": innerDialogRole === void 0 ? void 0 : title,
696
724
  role: innerDialogRole,
697
- style: [styles7.dialog, colorStyles.dialog],
725
+ style: [styles8.dialog, colorStyles.dialog],
698
726
  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: [
727
+ /* @__PURE__ */ jsx(Text, { nativeID: titleId, style: [styles8.title, colorStyles.title], children: title }),
728
+ /* @__PURE__ */ jsx(Text, { style: [styles8.message, colorStyles.message], children: message }),
729
+ /* @__PURE__ */ jsxs(View, { style: styles8.buttonRow, children: [
702
730
  /* @__PURE__ */ jsx(
703
731
  TouchableOpacity,
704
732
  {
@@ -706,13 +734,13 @@ var ConfirmDialog = ({
706
734
  accessibilityLabel: resolvedCancelLabel,
707
735
  accessibilityRole: "button",
708
736
  style: [
709
- styles7.button,
710
- styles7.cancelButton,
737
+ styles8.button,
738
+ styles8.cancelButton,
711
739
  colorStyles.cancelButton
712
740
  ],
713
741
  testID: FEEDBACK_TEST_IDS.cancelConfirmButton,
714
742
  onPress: onCancel,
715
- children: /* @__PURE__ */ jsx(Text, { style: [styles7.buttonText, colorStyles.cancelButtonText], children: resolvedCancelLabel })
743
+ children: /* @__PURE__ */ jsx(Text, { style: [styles8.buttonText, colorStyles.cancelButtonText], children: resolvedCancelLabel })
716
744
  }
717
745
  ),
718
746
  /* @__PURE__ */ jsx(
@@ -724,10 +752,10 @@ var ConfirmDialog = ({
724
752
  accessibilityState: { disabled: isConfirmDisabled },
725
753
  disabled: isConfirmDisabled,
726
754
  style: [
727
- styles7.button,
728
- styles7.confirmButton,
755
+ styles8.button,
756
+ styles8.confirmButton,
729
757
  colorStyles.confirmButton,
730
- isConfirmDisabled && styles7.disabledButton
758
+ isConfirmDisabled && styles8.disabledButton
731
759
  ],
732
760
  testID: FEEDBACK_TEST_IDS.confirmButton,
733
761
  onPress: onConfirm,
@@ -741,7 +769,7 @@ var ConfirmDialog = ({
741
769
  ) : /* @__PURE__ */ jsx(
742
770
  Text,
743
771
  {
744
- style: [styles7.buttonText, colorStyles.confirmButtonText],
772
+ style: [styles8.buttonText, colorStyles.confirmButtonText],
745
773
  children: resolvedConfirmLabel
746
774
  }
747
775
  )
@@ -757,7 +785,7 @@ var ConfirmDialog = ({
757
785
  var ACTION_PADDING_HORIZONTAL = 12;
758
786
  var ACTION_BORDER_RADIUS = 6;
759
787
  var ACTION_FONT_SIZE = 14;
760
- var styles8 = StyleSheet.create({
788
+ var styles9 = StyleSheet.create({
761
789
  button: {
762
790
  minWidth: MIN_TOUCH_TARGET,
763
791
  minHeight: MIN_TOUCH_TARGET,
@@ -780,10 +808,10 @@ var ToastAction = ({ action, color, testID, onDismiss }) => {
780
808
  accessibilityHint: action.hint ?? action.label,
781
809
  accessibilityLabel: action.label,
782
810
  accessibilityRole: "button",
783
- style: [styles8.button, { borderColor: color }],
811
+ style: [styles9.button, { borderColor: color }],
784
812
  testID,
785
813
  onPress: handlePress,
786
- children: /* @__PURE__ */ jsx(Text, { style: [styles8.label, { color }], children: action.label })
814
+ children: /* @__PURE__ */ jsx(Text, { style: [styles9.label, { color }], children: action.label })
787
815
  }
788
816
  );
789
817
  };
@@ -844,7 +872,7 @@ var C1_CONTROL_END = 159;
844
872
  var ZERO_WIDTH_START = 8203;
845
873
  var ZERO_WIDTH_END = 8207;
846
874
  var BYTE_ORDER_MARK = 65279;
847
- var styles9 = StyleSheet.create({
875
+ var styles10 = StyleSheet.create({
848
876
  container: {
849
877
  position: "absolute",
850
878
  left: TOAST_HORIZONTAL_MARGIN,
@@ -921,12 +949,12 @@ var ToastItem = ({ message, onDone, tone, durationMs, fadeMs, testID }) => {
921
949
  {
922
950
  accessibilityLiveRegion: isError ? "assertive" : "polite",
923
951
  role: isError ? "alert" : "status",
924
- style: [styles9.toast, { backgroundColor: tone.fill, borderColor: tone.border, transform: [{ translateY }], opacity }],
952
+ style: [styles10.toast, { backgroundColor: tone.fill, borderColor: tone.border, transform: [{ translateY }], opacity }],
925
953
  testID,
926
954
  children: [
927
- /* @__PURE__ */ jsx(View, { "aria-hidden": true, importantForAccessibility: "no-hide-descendants", style: [styles9.glyph, { borderColor: tone.ink }], children: /* @__PURE__ */ jsx(Text, { style: [styles9.glyphText, { color: tone.ink }], children: tone.glyph }) }),
928
- /* @__PURE__ */ jsxs(View, { style: styles9.body, children: [
929
- /* @__PURE__ */ jsx(Text, { style: [styles9.text, { color: tone.ink }], children: message.text }),
955
+ /* @__PURE__ */ jsx(View, { "aria-hidden": true, importantForAccessibility: "no-hide-descendants", style: [styles10.glyph, { borderColor: tone.ink }], children: /* @__PURE__ */ jsx(Text, { style: [styles10.glyphText, { color: tone.ink }], children: tone.glyph }) }),
956
+ /* @__PURE__ */ jsxs(View, { style: styles10.body, children: [
957
+ /* @__PURE__ */ jsx(Text, { style: [styles10.text, { color: tone.ink }], children: message.text }),
930
958
  /* @__PURE__ */ jsx(ErrorReferenceRow, { actionColor: tone.ink, color: tone.ink, testID: `${testID}-reference`, traceId: message.traceId })
931
959
  ] }),
932
960
  message.action ? /* @__PURE__ */ jsx(ToastAction, { action: message.action, color: tone.ink, testID: `${testID}-action`, onDismiss: handleDone }) : null
@@ -970,7 +998,7 @@ var ToastHost = ({
970
998
  useEffect(() => subscribe(push), [subscribe, push]);
971
999
  if (messages.length === 0) return null;
972
1000
  const canPortal = IS_WEB && typeof document !== "undefined";
973
- const layer = /* @__PURE__ */ jsx(View, { style: [styles9.container, { top: toastTop(IS_WEB, topInset) }, canPortal ? WEB_FIXED_LAYER : null], children: messages.map((m) => /* @__PURE__ */ jsx(
1001
+ const layer = /* @__PURE__ */ jsx(View, { style: [styles10.container, { top: toastTop(IS_WEB, topInset) }, canPortal ? WEB_FIXED_LAYER : null], children: messages.map((m) => /* @__PURE__ */ jsx(
974
1002
  ToastItem,
975
1003
  {
976
1004
  durationMs,
@@ -1046,7 +1074,7 @@ var SUBTITLE_FONT_SIZE = 15;
1046
1074
  var ATTEMPT_FONT_SIZE = 13;
1047
1075
  var CARD_PADDING = 24;
1048
1076
  var NO_ATTEMPT = 0;
1049
- var styles10 = StyleSheet.create({
1077
+ var styles11 = StyleSheet.create({
1050
1078
  overlay: {
1051
1079
  position: "absolute",
1052
1080
  top: 0,
@@ -1103,13 +1131,13 @@ var WarmingOverlay = ({
1103
1131
  {
1104
1132
  accessibilityLabel: mergedLabels.accessibilityLabel,
1105
1133
  accessibilityRole: "alert",
1106
- style: [styles10.overlay, { backgroundColor: colors.background }],
1134
+ style: [styles11.overlay, { backgroundColor: colors.background }],
1107
1135
  testID: testIdPrefix,
1108
- children: /* @__PURE__ */ jsxs(View, { style: styles10.card, children: [
1136
+ children: /* @__PURE__ */ jsxs(View, { style: styles11.card, children: [
1109
1137
  /* @__PURE__ */ jsx(ActivityIndicator, { color: primary, size: "large" }),
1110
- /* @__PURE__ */ jsx(Text, { style: [styles10.title, { color: colors.text }], testID: `${testIdPrefix}-title`, children: mergedLabels.title }),
1111
- /* @__PURE__ */ jsx(Text, { style: [styles10.subtitle, { color: colors.textSecondary }], testID: `${testIdPrefix}-subtitle`, children: mergedLabels.subtitle }),
1112
- showHint ? /* @__PURE__ */ jsx(Text, { style: [styles10.attempt, { color: colors.textSecondary }], testID: `${testIdPrefix}-attempt`, children: mergedLabels.attemptHint(snapshot2.attempt) }) : null
1138
+ /* @__PURE__ */ jsx(Text, { style: [styles11.title, { color: colors.text }], testID: `${testIdPrefix}-title`, children: mergedLabels.title }),
1139
+ /* @__PURE__ */ jsx(Text, { style: [styles11.subtitle, { color: colors.textSecondary }], testID: `${testIdPrefix}-subtitle`, children: mergedLabels.subtitle }),
1140
+ showHint ? /* @__PURE__ */ jsx(Text, { style: [styles11.attempt, { color: colors.textSecondary }], testID: `${testIdPrefix}-attempt`, children: mergedLabels.attemptHint(snapshot2.attempt) }) : null
1113
1141
  ] })
1114
1142
  }
1115
1143
  );
@@ -1166,7 +1194,7 @@ var BUTTON_PADDING_V3 = 12;
1166
1194
  var BUTTON_BORDER_RADIUS3 = 8;
1167
1195
  var BUTTON_MARGIN_TOP3 = 12;
1168
1196
  var BUTTON_FONT_SIZE3 = 16;
1169
- var styles11 = StyleSheet.create({
1197
+ var styles12 = StyleSheet.create({
1170
1198
  container: {
1171
1199
  flex: 1,
1172
1200
  justifyContent: "center",
@@ -1240,10 +1268,10 @@ var ErrorBoundaryFallback = ({
1240
1268
  accessibilityHint: labels.tryAgainHint,
1241
1269
  accessibilityLabel: labels.tryAgain,
1242
1270
  accessibilityRole: "button",
1243
- style: [styles11.button, reloadIsPrimary ? secondaryFill : primaryFill],
1271
+ style: [styles12.button, reloadIsPrimary ? secondaryFill : primaryFill],
1244
1272
  testID: `${testIDPrefix}-retry-button`,
1245
1273
  onPress: onRetry,
1246
- children: /* @__PURE__ */ jsx(Text, { style: [styles11.buttonText, reloadIsPrimary ? secondaryInk : primaryInk], children: labels.tryAgain })
1274
+ children: /* @__PURE__ */ jsx(Text, { style: [styles12.buttonText, reloadIsPrimary ? secondaryInk : primaryInk], children: labels.tryAgain })
1247
1275
  }
1248
1276
  ) : null;
1249
1277
  const reloadButton = typeof onReload === "function" ? /* @__PURE__ */ jsx(
@@ -1252,10 +1280,10 @@ var ErrorBoundaryFallback = ({
1252
1280
  accessibilityHint: labels.reloadHint,
1253
1281
  accessibilityLabel: labels.reload,
1254
1282
  accessibilityRole: "button",
1255
- style: [styles11.button, reloadIsPrimary ? primaryFill : secondaryFill],
1283
+ style: [styles12.button, reloadIsPrimary ? primaryFill : secondaryFill],
1256
1284
  testID: `${testIDPrefix}-reload-button`,
1257
1285
  onPress: onReload,
1258
- children: /* @__PURE__ */ jsx(Text, { style: [styles11.buttonText, reloadIsPrimary ? primaryInk : secondaryInk], children: labels.reload })
1286
+ children: /* @__PURE__ */ jsx(Text, { style: [styles12.buttonText, reloadIsPrimary ? primaryInk : secondaryInk], children: labels.reload })
1259
1287
  }
1260
1288
  ) : null;
1261
1289
  return /* @__PURE__ */ jsx(
@@ -1263,20 +1291,20 @@ var ErrorBoundaryFallback = ({
1263
1291
  {
1264
1292
  accessibilityLiveRegion: "assertive",
1265
1293
  role: "alert",
1266
- style: [styles11.container, { backgroundColor: theme.colors.background }],
1294
+ style: [styles12.container, { backgroundColor: theme.colors.background }],
1267
1295
  testID: testIDPrefix,
1268
- children: /* @__PURE__ */ jsxs(View, { style: styles11.content, children: [
1269
- logo !== void 0 ? /* @__PURE__ */ jsx(View, { style: styles11.logo, testID: `${testIDPrefix}-logo`, children: logo }) : null,
1270
- /* @__PURE__ */ jsx(Text, { style: [styles11.title, { color: theme.colors.text }], children: labels.title }),
1296
+ children: /* @__PURE__ */ jsxs(View, { style: styles12.content, children: [
1297
+ logo !== void 0 ? /* @__PURE__ */ jsx(View, { style: styles12.logo, testID: `${testIDPrefix}-logo`, children: logo }) : null,
1298
+ /* @__PURE__ */ jsx(Text, { style: [styles12.title, { color: theme.colors.text }], children: labels.title }),
1271
1299
  /* @__PURE__ */ jsx(ErrorState, { message: labels.message, testID: `${testIDPrefix}-message` }),
1272
1300
  hasDetails ? /* @__PURE__ */ jsxs(
1273
1301
  View,
1274
1302
  {
1275
- style: [styles11.details, { backgroundColor: theme.colors.surface, borderColor: warningColor }],
1303
+ style: [styles12.details, { backgroundColor: theme.colors.surface, borderColor: warningColor }],
1276
1304
  testID: `${testIDPrefix}-details`,
1277
1305
  children: [
1278
- /* @__PURE__ */ jsx(Text, { style: [styles11.detailsTitle, { color: warningText }], children: labels.errorDetails }),
1279
- /* @__PURE__ */ jsx(Text, { style: [styles11.detailsText, { color: theme.colors.textSecondary }], children: error.message })
1306
+ /* @__PURE__ */ jsx(Text, { style: [styles12.detailsTitle, { color: warningText }], children: labels.errorDetails }),
1307
+ /* @__PURE__ */ jsx(Text, { style: [styles12.detailsText, { color: theme.colors.textSecondary }], children: error.message })
1280
1308
  ]
1281
1309
  }
1282
1310
  ) : null,
@@ -1289,7 +1317,7 @@ var ErrorBoundaryFallback = ({
1289
1317
  var CONTAINER_PADDING4 = 20;
1290
1318
  var MESSAGE_FONT_SIZE3 = 16;
1291
1319
  var MESSAGE_MARGIN_TOP = 12;
1292
- var styles12 = StyleSheet.create({
1320
+ var styles13 = StyleSheet.create({
1293
1321
  container: {
1294
1322
  flex: 1,
1295
1323
  justifyContent: "center",
@@ -1312,11 +1340,11 @@ var ErrorBoundaryRecovering = ({
1312
1340
  {
1313
1341
  accessibilityLiveRegion: "polite",
1314
1342
  role: "status",
1315
- style: [styles12.container, { backgroundColor: theme.colors.background }],
1343
+ style: [styles13.container, { backgroundColor: theme.colors.background }],
1316
1344
  testID,
1317
1345
  children: [
1318
1346
  /* @__PURE__ */ jsx(ActivityIndicator, { color: theme.palette.primary["500"], size: "large" }),
1319
- /* @__PURE__ */ jsx(Text, { style: [styles12.message, { color: theme.colors.textSecondary }], children: message })
1347
+ /* @__PURE__ */ jsx(Text, { style: [styles13.message, { color: theme.colors.textSecondary }], children: message })
1320
1348
  ]
1321
1349
  }
1322
1350
  );
@@ -1418,7 +1446,7 @@ var TRACK_MARGIN = 4;
1418
1446
  var INDET_FRACTION = 0.35;
1419
1447
  var INDET_DURATION_MS = 1300;
1420
1448
  var LABEL_FONT_SIZE = 12;
1421
- var styles13 = StyleSheet.create({
1449
+ var styles14 = StyleSheet.create({
1422
1450
  track: { height: BAR_HEIGHT, borderRadius: RADIUS, overflow: "hidden", marginVertical: TRACK_MARGIN },
1423
1451
  fill: { height: "100%", borderRadius: RADIUS },
1424
1452
  label: { fontSize: LABEL_FONT_SIZE, textAlign: "right", fontVariant: ["tabular-nums"] }
@@ -1437,7 +1465,7 @@ function IndeterminateFill({ color, width, testID }) {
1437
1465
  return /* @__PURE__ */ jsx(
1438
1466
  Animated.View,
1439
1467
  {
1440
- style: [styles13.fill, { backgroundColor: color, width: barWidth, transform: [{ translateX }] }],
1468
+ style: [styles14.fill, { backgroundColor: color, width: barWidth, transform: [{ translateX }] }],
1441
1469
  testID
1442
1470
  }
1443
1471
  );
@@ -1472,13 +1500,13 @@ function ProgressBar(props) {
1472
1500
  role: "progressbar",
1473
1501
  testID,
1474
1502
  children: [
1475
- /* @__PURE__ */ jsx(View, { style: [styles13.track, { backgroundColor: trackColor }], onLayout, children: indeterminate ? /* @__PURE__ */ jsx(IndeterminateFill, { color, testID: fillTestID, width }) : /* @__PURE__ */ jsx(View, { style: [styles13.fill, { backgroundColor: color, width: `${safePct}%` }], testID: fillTestID }) }),
1476
- !indeterminate && label !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles13.label, { color: textColor }], children: label }) : null
1503
+ /* @__PURE__ */ jsx(View, { style: [styles14.track, { backgroundColor: trackColor }], onLayout, children: indeterminate ? /* @__PURE__ */ jsx(IndeterminateFill, { color, testID: fillTestID, width }) : /* @__PURE__ */ jsx(View, { style: [styles14.fill, { backgroundColor: color, width: `${safePct}%` }], testID: fillTestID }) }),
1504
+ !indeterminate && label !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles14.label, { color: textColor }], children: label }) : null
1477
1505
  ]
1478
1506
  }
1479
1507
  );
1480
1508
  }
1481
- var styles14 = StyleSheet.create({
1509
+ var styles15 = StyleSheet.create({
1482
1510
  button: {
1483
1511
  minHeight: MIN_TOUCH_TARGET_PX,
1484
1512
  minWidth: MIN_TOUCH_TARGET_PX,
@@ -1501,9 +1529,9 @@ function RunCardButton({ label, hint, color, onPress, testID, disabled = false,
1501
1529
  accessibilityState: { disabled, expanded },
1502
1530
  disabled,
1503
1531
  onPress,
1504
- style: [styles14.button, { borderColor: color }, disabled ? { opacity: DISABLED_OPACITY } : null],
1532
+ style: [styles15.button, { borderColor: color }, disabled ? { opacity: DISABLED_OPACITY } : null],
1505
1533
  testID,
1506
- children: /* @__PURE__ */ jsx(Text, { style: [styles14.text, { color }], children: label })
1534
+ children: /* @__PURE__ */ jsx(Text, { style: [styles15.text, { color }], children: label })
1507
1535
  }
1508
1536
  );
1509
1537
  }
@@ -1581,7 +1609,7 @@ function runToneTextColor(theme, state) {
1581
1609
  return inks[state] ?? runToneColor(theme, state);
1582
1610
  }
1583
1611
  var MARK = { done: "\u2713", running: "\u25CF", pending: "\u25CB", failed: "\u2715" };
1584
- var styles15 = StyleSheet.create({
1612
+ var styles16 = StyleSheet.create({
1585
1613
  row: { flexDirection: "row", flexWrap: "wrap", gap: 6 },
1586
1614
  chip: { borderWidth: 1, borderRadius: 6, paddingHorizontal: 10, justifyContent: "center" },
1587
1615
  tap: { minHeight: MIN_TOUCH_TARGET_PX },
@@ -1594,15 +1622,15 @@ function chipText(group, labels) {
1594
1622
  }
1595
1623
  function RunGroupChips({ groups, labels, testID, selectedId = null, onSelect }) {
1596
1624
  const { theme } = useFeedbackUi();
1597
- return /* @__PURE__ */ jsx(View, { style: styles15.row, testID, children: groups.map((group) => {
1625
+ return /* @__PURE__ */ jsx(View, { style: styles16.row, testID, children: groups.map((group) => {
1598
1626
  const color = runToneColor(theme, group.state);
1599
1627
  const ink = runToneTextColor(theme, group.state);
1600
1628
  const selected = group.id === selectedId;
1601
1629
  const a11y = labels.groupA11y(group.label, group.state, labels.formatDuration(group.durationSec));
1602
- const body = /* @__PURE__ */ jsx(Text, { style: [styles15.text, { color: ink }, selected || group.state === "running" ? styles15.strong : null], children: chipText(group, labels) });
1603
- const look = [styles15.chip, { borderColor: color, backgroundColor: selected ? theme.colors.surfaceElevated : theme.colors.surface }];
1630
+ const body = /* @__PURE__ */ jsx(Text, { style: [styles16.text, { color: ink }, selected || group.state === "running" ? styles16.strong : null], children: chipText(group, labels) });
1631
+ const look = [styles16.chip, { borderColor: color, backgroundColor: selected ? theme.colors.surfaceElevated : theme.colors.surface }];
1604
1632
  if (onSelect === void 0) {
1605
- return /* @__PURE__ */ jsx(View, { style: [look, styles15.still], accessible: true, accessibilityLabel: a11y, testID: `${testID}-${group.id}`, children: body }, group.id);
1633
+ return /* @__PURE__ */ jsx(View, { style: [look, styles16.still], accessible: true, accessibilityLabel: a11y, testID: `${testID}-${group.id}`, children: body }, group.id);
1606
1634
  }
1607
1635
  return /* @__PURE__ */ jsx(
1608
1636
  Pressable,
@@ -1612,7 +1640,7 @@ function RunGroupChips({ groups, labels, testID, selectedId = null, onSelect })
1612
1640
  accessibilityHint: labels.groupHint,
1613
1641
  accessibilityState: { selected },
1614
1642
  onPress: () => onSelect(group.id),
1615
- style: [look, styles15.tap],
1643
+ style: [look, styles16.tap],
1616
1644
  testID: `${testID}-${group.id}`,
1617
1645
  children: body
1618
1646
  },
@@ -1626,8 +1654,8 @@ function RunGroupSummary({ groups, labels, testID }) {
1626
1654
  const open = groups.filter((g) => g.state !== "done");
1627
1655
  const doneColor = runToneColor(theme, "done");
1628
1656
  const doneText = labels.doneSummary(done.count, labels.formatDuration(done.durationSec));
1629
- return /* @__PURE__ */ jsxs(View, { style: styles15.row, testID, children: [
1630
- done.count > 0 ? /* @__PURE__ */ jsx(View, { style: [styles15.chip, styles15.still, { borderColor: doneColor }], accessible: true, accessibilityLabel: doneText, testID: `${testID}-done`, children: /* @__PURE__ */ jsx(Text, { style: [styles15.text, { color: runToneTextColor(theme, "done") }], children: `${MARK.done} ${doneText}` }) }) : null,
1657
+ return /* @__PURE__ */ jsxs(View, { style: styles16.row, testID, children: [
1658
+ done.count > 0 ? /* @__PURE__ */ jsx(View, { style: [styles16.chip, styles16.still, { borderColor: doneColor }], accessible: true, accessibilityLabel: doneText, testID: `${testID}-done`, children: /* @__PURE__ */ jsx(Text, { style: [styles16.text, { color: runToneTextColor(theme, "done") }], children: `${MARK.done} ${doneText}` }) }) : null,
1631
1659
  /* @__PURE__ */ jsx(RunGroupChips, { groups: open, labels, testID: `${testID}-open` })
1632
1660
  ] });
1633
1661
  }
@@ -1637,7 +1665,7 @@ var LABEL_SHARE = "35%";
1637
1665
  var LABEL_LINES = 2;
1638
1666
  var DURATION_WIDTH = 64;
1639
1667
  var PERCENT = 100;
1640
- var styles16 = StyleSheet.create({
1668
+ var styles17 = StyleSheet.create({
1641
1669
  list: { gap: 6 },
1642
1670
  row: { flexDirection: "row", alignItems: "center", gap: 8 },
1643
1671
  stack: { gap: 4 },
@@ -1656,22 +1684,22 @@ function RunStepBars({ steps, maxBars, labels, compact, testID }) {
1656
1684
  const maxSec = steps.reduce((m, s) => Math.max(m, s.durationSec), 0);
1657
1685
  const folded = split.hiddenCount > 0;
1658
1686
  const canFold = all && steps.length > maxBars;
1659
- return /* @__PURE__ */ jsxs(View, { style: styles16.list, testID, children: [
1687
+ return /* @__PURE__ */ jsxs(View, { style: styles17.list, testID, children: [
1660
1688
  split.visible.map((step, i) => {
1661
1689
  const color = runToneColor(theme, step.state);
1662
1690
  const duration = labels.formatDuration(step.durationSec);
1663
- const strong = step.state === "running" ? styles16.strong : null;
1664
- const name = /* @__PURE__ */ jsx(Text, { style: [compact ? styles16.compactLabel : styles16.label, { color: theme.colors.text }, strong], numberOfLines: LABEL_LINES, testID: `${testID}-name-${String(i)}`, children: step.label });
1665
- const time = /* @__PURE__ */ jsx(Text, { style: [styles16.duration, { color: theme.colors.textSecondary }, strong], children: duration });
1666
- const bar = /* @__PURE__ */ jsx(View, { style: [compact ? styles16.fullTrack : styles16.track, { backgroundColor: theme.colors.border }], children: /* @__PURE__ */ jsx(View, { style: [styles16.fill, { backgroundColor: color, width: `${barFraction(step.durationSec, maxSec) * PERCENT}%` }] }) });
1691
+ const strong = step.state === "running" ? styles17.strong : null;
1692
+ const name = /* @__PURE__ */ jsx(Text, { style: [compact ? styles17.compactLabel : styles17.label, { color: theme.colors.text }, strong], numberOfLines: LABEL_LINES, testID: `${testID}-name-${String(i)}`, children: step.label });
1693
+ const time = /* @__PURE__ */ jsx(Text, { style: [styles17.duration, { color: theme.colors.textSecondary }, strong], children: duration });
1694
+ const bar = /* @__PURE__ */ jsx(View, { style: [compact ? styles17.fullTrack : styles17.track, { backgroundColor: theme.colors.border }], children: /* @__PURE__ */ jsx(View, { style: [styles17.fill, { backgroundColor: color, width: `${barFraction(step.durationSec, maxSec) * PERCENT}%` }] }) });
1667
1695
  const a11y = { accessible: true, accessibilityLabel: labels.stepA11y(step.label, duration), testID: `${testID}-row-${String(i)}` };
1668
- return compact ? /* @__PURE__ */ jsxs(View, { style: styles16.stack, ...a11y, children: [
1669
- /* @__PURE__ */ jsxs(View, { style: styles16.row, children: [
1696
+ return compact ? /* @__PURE__ */ jsxs(View, { style: styles17.stack, ...a11y, children: [
1697
+ /* @__PURE__ */ jsxs(View, { style: styles17.row, children: [
1670
1698
  name,
1671
1699
  time
1672
1700
  ] }),
1673
1701
  bar
1674
- ] }, `${step.label}-${String(i)}`) : /* @__PURE__ */ jsxs(View, { style: styles16.row, ...a11y, children: [
1702
+ ] }, `${step.label}-${String(i)}`) : /* @__PURE__ */ jsxs(View, { style: styles17.row, ...a11y, children: [
1675
1703
  name,
1676
1704
  bar,
1677
1705
  time
@@ -1692,7 +1720,7 @@ function RunStepBars({ steps, maxBars, labels, compact, testID }) {
1692
1720
  }
1693
1721
  var LIVE_RUN_CARD_COMPACT_MAX_PX = 640;
1694
1722
  var DEFAULT_MAX_BARS = 4;
1695
- var styles17 = StyleSheet.create({
1723
+ var styles18 = StyleSheet.create({
1696
1724
  card: { borderWidth: 1, borderRadius: 8, padding: 14, gap: 10 },
1697
1725
  head: { flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: 10 },
1698
1726
  titleBox: { flexGrow: 1, flexShrink: 1, flexBasis: 200, minWidth: 0, gap: 2 },
@@ -1717,18 +1745,18 @@ function LiveRunCard(props) {
1717
1745
  const percent = progressPercent(progress);
1718
1746
  const showTimings = !compact || open;
1719
1747
  const muted = { color: theme.colors.textSecondary };
1720
- return /* @__PURE__ */ jsxs(View, { style: [styles17.card, { borderColor: tone, backgroundColor: theme.colors.surface }], testID, children: [
1721
- /* @__PURE__ */ jsxs(View, { style: styles17.head, children: [
1722
- /* @__PURE__ */ jsx(View, { style: [styles17.pill, { borderColor: tone }], children: /* @__PURE__ */ jsx(Text, { style: [styles17.pillText, { color: toneText }], testID: `${testID}-status`, children: labels.status }) }),
1723
- /* @__PURE__ */ jsxs(View, { style: styles17.titleBox, children: [
1724
- /* @__PURE__ */ jsx(Text, { style: [styles17.title, { color: theme.colors.text }], testID: `${testID}-title`, children: title }),
1725
- /* @__PURE__ */ jsx(Text, { style: [styles17.meta, muted], testID: `${testID}-meta`, children: labels.meta })
1748
+ return /* @__PURE__ */ jsxs(View, { style: [styles18.card, { borderColor: tone, backgroundColor: theme.colors.surface }], testID, children: [
1749
+ /* @__PURE__ */ jsxs(View, { style: styles18.head, children: [
1750
+ /* @__PURE__ */ jsx(View, { style: [styles18.pill, { borderColor: tone }], children: /* @__PURE__ */ jsx(Text, { style: [styles18.pillText, { color: toneText }], testID: `${testID}-status`, children: labels.status }) }),
1751
+ /* @__PURE__ */ jsxs(View, { style: styles18.titleBox, children: [
1752
+ /* @__PURE__ */ jsx(Text, { style: [styles18.title, { color: theme.colors.text }], testID: `${testID}-title`, children: title }),
1753
+ /* @__PURE__ */ jsx(Text, { style: [styles18.meta, muted], testID: `${testID}-meta`, children: labels.meta })
1726
1754
  ] }),
1727
1755
  onCancel !== void 0 ? /* @__PURE__ */ jsx(RunCardButton, { label: labels.cancel, hint: labels.cancelHint, color: theme.semanticText?.error ?? theme.semantic.error["500"], onPress: onCancel, disabled: cancelDisabled, testID: `${testID}-cancel` }) : null
1728
1756
  ] }),
1729
- currentStep !== null && currentStep !== "" ? /* @__PURE__ */ jsx(Text, { style: [styles17.step, { color: theme.colors.text }], testID: `${testID}-step`, children: currentStep }) : null,
1757
+ currentStep !== null && currentStep !== "" ? /* @__PURE__ */ jsx(Text, { style: [styles18.step, { color: theme.colors.text }], testID: `${testID}-step`, children: currentStep }) : null,
1730
1758
  percent !== null ? /* @__PURE__ */ jsx(ProgressBar, { percent, label: labels.progress, accessibilityLabel: labels.progressA11y, color: tone, testID: `${testID}-progress` }) : null,
1731
- percent === null && labels.progress !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles17.meta, muted], testID: `${testID}-progress-text`, children: labels.progress }) : null,
1759
+ percent === null && labels.progress !== void 0 ? /* @__PURE__ */ jsx(Text, { style: [styles18.meta, muted], testID: `${testID}-progress-text`, children: labels.progress }) : null,
1732
1760
  compact && !open ? /* @__PURE__ */ jsx(RunGroupSummary, { groups, labels, testID: `${testID}-summary` }) : null,
1733
1761
  compact ? /* @__PURE__ */ jsx(RunCardButton, { label: labels.stepTimings, hint: labels.stepTimingsHint, color: theme.colors.textSecondary, onPress: () => setOpen(!open), expanded: open, testID: `${testID}-timings-toggle` }) : null,
1734
1762
  showTimings ? /* @__PURE__ */ jsx(RunGroupChips, { groups, labels, selectedId, onSelect: setPicked, testID: `${testID}-groups` }) : null,
@@ -1736,6 +1764,6 @@ function LiveRunCard(props) {
1736
1764
  ] });
1737
1765
  }
1738
1766
 
1739
- 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 };
1767
+ export { AppErrorBoundary, AsyncSurface, COPY_FEEDBACK_MS, ConfirmDialog, CopyStatus, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, EmptyListState, ErrorNotice, ErrorReferenceRow, ErrorState, FEEDBACK_TEST_IDS, FeedbackUiProvider, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, LoadingFallback, MODAL_OVERLAY_COLOR, PageSkeleton, ProgressBar, ToastHost, FeedbackUiProvider as UiProvider, UiThemeOverride, 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 };
1740
1768
  //# sourceMappingURL=index.mjs.map
1741
1769
  //# sourceMappingURL=index.mjs.map