@dloizides/ui-feedback 1.15.1 → 1.16.0

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.d.ts CHANGED
@@ -560,4 +560,88 @@ declare function ProgressBar(props: ProgressBarProps): React.ReactElement;
560
560
  /** Clamps a possibly missing or non-finite percent into the 0-100 range. */
561
561
  declare function clampPercent(value: number | null | undefined): number;
562
562
 
563
- export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, ConfirmDialog, type ConfirmDialogProps, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, EmptyListState, type EmptyListStateProps, type ErrorBoundaryLabels, type ErrorFallbackState, ErrorState, type ErrorStateAction, type ErrorStateProps, FEEDBACK_TEST_IDS, type FeedbackColorScale, type FeedbackNavigate, type FeedbackTheme, type FeedbackThemeColors, type FeedbackThemePalette, type FeedbackThemeSemantic, type FeedbackTranslate, FeedbackUiProvider, type FeedbackUiProviderProps, type FeedbackUiValue, LoadingFallback, type LoadingFallbackProps, MODAL_OVERLAY_COLOR, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type ToastBus, ToastHost, type ToastHostProps, type ToastInput, type ToastPush, type ToastType, type FeedbackColorScale as UiColorScale, type FeedbackNavigate as UiNavigate, FeedbackUiProvider as UiProvider, type FeedbackUiProviderProps as UiProviderProps, type FeedbackTheme as UiTheme, type FeedbackThemeColors as UiThemeColors, type FeedbackThemePalette as UiThemePalette, type FeedbackThemeSemantic as UiThemeSemantic, type FeedbackTranslate as UiTranslate, type FeedbackUiValue as UiValue, WARMING_QUIET_PERIOD_MS, type WarmingInfo, WarmingOverlay, type WarmingOverlayLabels, type WarmingOverlayProps, type WarmingSnapshot, clampPercent, createToastBus, getWarmingSnapshot, notifyWarming, settleWarming, subscribeWarming, useFeedbackUi, useFeedbackUi as useUi };
563
+ type RunStepState = 'done' | 'running' | 'pending' | 'failed';
564
+ interface RunStep {
565
+ label: string;
566
+ durationSec: number;
567
+ state: RunStepState;
568
+ }
569
+ interface RunGroup {
570
+ id: string;
571
+ label: string;
572
+ state: RunStepState;
573
+ durationSec: number;
574
+ steps: RunStep[];
575
+ }
576
+ interface FlatRunStep extends RunStep {
577
+ groupId: string;
578
+ groupLabel: string;
579
+ }
580
+ interface StepSplit {
581
+ visible: RunStep[];
582
+ hiddenCount: number;
583
+ }
584
+ interface DoneSummary {
585
+ count: number;
586
+ durationSec: number;
587
+ }
588
+ /** Folds flat steps into groups in first-seen order: sums each group's time, drops 0s done rows, worst state wins. */
589
+ declare function mergeRunSteps(flat: readonly FlatRunStep[]): RunGroup[];
590
+ /** Keeps the `keep` longest steps (and any running one) in their original order; counts the rest. */
591
+ declare function splitShorterSteps(steps: readonly RunStep[], keep: number): StepSplit;
592
+ /** The group whose steps show first: the running one, else a failed one, else the last. */
593
+ declare function defaultGroupId(groups: readonly RunGroup[]): string | null;
594
+ /** How many groups finished and their total time, for the compact one-chip summary. */
595
+ declare function summariseDoneGroups(groups: readonly RunGroup[]): DoneSummary;
596
+ /** A step bar's width as a 0-1 fraction of the longest step; a non-zero step never draws invisibly thin. */
597
+ declare function barFraction(durationSec: number, maxSec: number): number;
598
+ /** 0-100 from done/total, or null when the total is unknown. */
599
+ declare function progressPercent(progress: {
600
+ done: number;
601
+ total: number;
602
+ } | null | undefined): number | null;
603
+
604
+ interface LiveRunCardLabels {
605
+ status: string;
606
+ meta: string;
607
+ progress?: string;
608
+ progressA11y: string;
609
+ cancel: string;
610
+ cancelHint: string;
611
+ stepTimings: string;
612
+ stepTimingsHint: string;
613
+ groupHint: string;
614
+ moreStepsHint: string;
615
+ fewerSteps: string;
616
+ formatDuration: (sec: number) => string;
617
+ moreSteps: (count: number) => string;
618
+ doneSummary: (count: number, duration: string) => string;
619
+ groupA11y: (label: string, state: RunStepState, duration: string) => string;
620
+ stepA11y: (label: string, duration: string) => string;
621
+ }
622
+ interface LiveRunCardProps {
623
+ title: string;
624
+ status?: RunStepState;
625
+ currentStep?: string | null;
626
+ progress?: {
627
+ done: number;
628
+ total: number;
629
+ } | null;
630
+ groups: readonly RunGroup[];
631
+ labels: LiveRunCardLabels;
632
+ onCancel?: () => void;
633
+ cancelDisabled?: boolean;
634
+ compact?: boolean;
635
+ maxBars?: number;
636
+ testID?: string;
637
+ }
638
+
639
+ /** Below this window width the card renders compact: summary chips, step timings behind a toggle. */
640
+ declare const LIVE_RUN_CARD_COMPACT_MAX_PX = 640;
641
+ /** Presentational card for one active run: status, progress, per-group chips and step-time bars. */
642
+ declare function LiveRunCard(props: LiveRunCardProps): React.ReactElement;
643
+
644
+ /** The theme colour for a step or group state; falls back to primary/text when a semantic scale is absent. */
645
+ declare function runToneColor(theme: FeedbackTheme, state: RunStepState): string;
646
+
647
+ export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, ConfirmDialog, type ConfirmDialogProps, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, type DoneSummary, EmptyListState, type EmptyListStateProps, type ErrorBoundaryLabels, type ErrorFallbackState, ErrorState, type ErrorStateAction, type ErrorStateProps, FEEDBACK_TEST_IDS, type FeedbackColorScale, type FeedbackNavigate, type FeedbackTheme, type FeedbackThemeColors, type FeedbackThemePalette, type FeedbackThemeSemantic, type FeedbackTranslate, FeedbackUiProvider, type FeedbackUiProviderProps, type FeedbackUiValue, type FlatRunStep, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, type LiveRunCardLabels, type LiveRunCardProps, LoadingFallback, type LoadingFallbackProps, MODAL_OVERLAY_COLOR, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type RunGroup, type RunStep, type RunStepState, type StepSplit, type ToastBus, ToastHost, type ToastHostProps, type ToastInput, type ToastPush, type ToastType, type FeedbackColorScale as UiColorScale, type FeedbackNavigate as UiNavigate, FeedbackUiProvider as UiProvider, type FeedbackUiProviderProps as UiProviderProps, type FeedbackTheme as UiTheme, type FeedbackThemeColors as UiThemeColors, type FeedbackThemePalette as UiThemePalette, type FeedbackThemeSemantic as UiThemeSemantic, type FeedbackTranslate as UiTranslate, type FeedbackUiValue as UiValue, WARMING_QUIET_PERIOD_MS, type WarmingInfo, WarmingOverlay, type WarmingOverlayLabels, type WarmingOverlayProps, type WarmingSnapshot, barFraction, clampPercent, createToastBus, defaultGroupId, getWarmingSnapshot, mergeRunSteps, notifyWarming, progressPercent, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useFeedbackUi, useFeedbackUi as useUi };
package/dist/index.js CHANGED
@@ -3,6 +3,7 @@
3
3
  var react = require('react');
4
4
  var jsxRuntime = require('react/jsx-runtime');
5
5
  var reactNative = require('react-native');
6
+ var a11y = require('@dloizides/a11y');
6
7
  var uiMotion = require('@dloizides/ui-motion');
7
8
  var reactDom = require('react-dom');
8
9
  var designTokens = require('@dloizides/design-tokens');
@@ -48,7 +49,6 @@ function useFeedbackUi() {
48
49
 
49
50
  // src/constants.ts
50
51
  var MODAL_OVERLAY_COLOR = "rgba(0, 0, 0, 0.5)";
51
- var MIN_TOUCH_TARGET = 44;
52
52
  var DISABLED_OPACITY = 0.5;
53
53
  var FEEDBACK_TEST_IDS = {
54
54
  errorState: "error-state",
@@ -88,7 +88,7 @@ var styles = reactNative.StyleSheet.create({
88
88
  opacity: WELL_TINT_OPACITY
89
89
  },
90
90
  secondaryButton: {
91
- minHeight: MIN_TOUCH_TARGET,
91
+ minHeight: a11y.MIN_TOUCH_TARGET_PX,
92
92
  justifyContent: "center",
93
93
  alignItems: "center",
94
94
  marginTop: BUTTON_MARGIN_TOP,
@@ -155,7 +155,7 @@ var styles2 = reactNative.StyleSheet.create({
155
155
  columnGap: ACTION_GAP
156
156
  },
157
157
  retryButton: {
158
- minHeight: MIN_TOUCH_TARGET,
158
+ minHeight: a11y.MIN_TOUCH_TARGET_PX,
159
159
  justifyContent: "center",
160
160
  alignItems: "center",
161
161
  marginTop: BUTTON_MARGIN_TOP2,
@@ -1192,6 +1192,237 @@ function ProgressBar(props) {
1192
1192
  }
1193
1193
  );
1194
1194
  }
1195
+ var styles12 = reactNative.StyleSheet.create({
1196
+ button: {
1197
+ minHeight: a11y.MIN_TOUCH_TARGET_PX,
1198
+ minWidth: a11y.MIN_TOUCH_TARGET_PX,
1199
+ paddingHorizontal: 14,
1200
+ borderRadius: 6,
1201
+ borderWidth: 1,
1202
+ justifyContent: "center",
1203
+ alignItems: "center",
1204
+ alignSelf: "flex-start"
1205
+ },
1206
+ text: { fontSize: 14, fontWeight: "600" }
1207
+ });
1208
+ function RunCardButton({ label, hint, color, onPress, testID, disabled = false, expanded }) {
1209
+ return /* @__PURE__ */ jsxRuntime.jsx(
1210
+ reactNative.Pressable,
1211
+ {
1212
+ accessibilityRole: "button",
1213
+ accessibilityLabel: label,
1214
+ accessibilityHint: hint,
1215
+ accessibilityState: { disabled, expanded },
1216
+ disabled,
1217
+ onPress,
1218
+ style: [styles12.button, { borderColor: color }, disabled ? { opacity: DISABLED_OPACITY } : null],
1219
+ testID,
1220
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles12.text, { color }], children: label })
1221
+ }
1222
+ );
1223
+ }
1224
+
1225
+ // src/LiveRunCard/runGroups.ts
1226
+ var STATE_RANK = { done: 0, pending: 1, running: 2, failed: 3 };
1227
+ var MIN_BAR_FRACTION = 0.02;
1228
+ var NONE = 0;
1229
+ function isEmptyDoneMarker(step) {
1230
+ return step.state === "done" && step.durationSec <= NONE;
1231
+ }
1232
+ function mergeRunSteps(flat) {
1233
+ const groups = [];
1234
+ const byId = /* @__PURE__ */ new Map();
1235
+ for (const s of flat) {
1236
+ let group = byId.get(s.groupId);
1237
+ if (group === void 0) {
1238
+ group = { id: s.groupId, label: s.groupLabel, state: "done", durationSec: NONE, steps: [] };
1239
+ byId.set(s.groupId, group);
1240
+ groups.push(group);
1241
+ }
1242
+ const durationSec = Math.max(NONE, s.durationSec);
1243
+ group.durationSec += durationSec;
1244
+ if (STATE_RANK[s.state] > STATE_RANK[group.state]) group.state = s.state;
1245
+ if (!isEmptyDoneMarker(s)) group.steps.push({ label: s.label, durationSec, state: s.state });
1246
+ }
1247
+ return groups;
1248
+ }
1249
+ function splitShorterSteps(steps, keep) {
1250
+ if (steps.length <= keep) return { visible: [...steps], hiddenCount: NONE };
1251
+ const ranked = steps.map((step, index) => ({ step, index })).sort((a, b) => b.step.durationSec - a.step.durationSec || a.index - b.index);
1252
+ const kept = new Set(ranked.slice(0, keep).map((r) => r.index));
1253
+ steps.forEach((step, index) => {
1254
+ if (step.state === "running") kept.add(index);
1255
+ });
1256
+ const visible = steps.filter((_, index) => kept.has(index));
1257
+ return { visible, hiddenCount: steps.length - visible.length };
1258
+ }
1259
+ function defaultGroupId(groups) {
1260
+ const active = groups.find((g) => g.state === "running") ?? groups.find((g) => g.state === "failed");
1261
+ if (active !== void 0) return active.id;
1262
+ return groups.at(-1)?.id ?? null;
1263
+ }
1264
+ function summariseDoneGroups(groups) {
1265
+ const done = groups.filter((g) => g.state === "done");
1266
+ return { count: done.length, durationSec: done.reduce((sum, g) => sum + g.durationSec, NONE) };
1267
+ }
1268
+ function barFraction(durationSec, maxSec) {
1269
+ if (maxSec <= NONE || durationSec <= NONE) return NONE;
1270
+ return Math.min(1, Math.max(MIN_BAR_FRACTION, durationSec / maxSec));
1271
+ }
1272
+ function progressPercent(progress) {
1273
+ if (!progress || progress.total <= NONE) return null;
1274
+ return Math.max(NONE, progress.done) / progress.total * 100;
1275
+ }
1276
+
1277
+ // src/LiveRunCard/runTone.ts
1278
+ function scale(theme, name) {
1279
+ const found = theme.semantic[name];
1280
+ return found?.["500"];
1281
+ }
1282
+ function runToneColor(theme, state) {
1283
+ if (state === "failed") return theme.semantic.error["500"];
1284
+ if (state === "running") return scale(theme, "warning") ?? theme.palette.primary["500"];
1285
+ if (state === "done") return scale(theme, "success") ?? theme.colors.text;
1286
+ return theme.colors.textSecondary;
1287
+ }
1288
+ var MARK = { done: "\u2713", running: "\u25CF", pending: "\u25CB", failed: "\u2715" };
1289
+ var styles13 = reactNative.StyleSheet.create({
1290
+ row: { flexDirection: "row", flexWrap: "wrap", gap: 6 },
1291
+ chip: { borderWidth: 1, borderRadius: 6, paddingHorizontal: 10, justifyContent: "center" },
1292
+ tap: { minHeight: a11y.MIN_TOUCH_TARGET_PX },
1293
+ still: { paddingVertical: 4 },
1294
+ text: { fontSize: 13, fontVariant: ["tabular-nums"] },
1295
+ strong: { fontWeight: "700" }
1296
+ });
1297
+ function chipText(group, labels) {
1298
+ return `${MARK[group.state]} ${group.label} ${labels.formatDuration(group.durationSec)}`;
1299
+ }
1300
+ function RunGroupChips({ groups, labels, testID, selectedId = null, onSelect }) {
1301
+ const { theme } = useFeedbackUi();
1302
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles13.row, testID, children: groups.map((group) => {
1303
+ const color = runToneColor(theme, group.state);
1304
+ const selected = group.id === selectedId;
1305
+ const a11y = labels.groupA11y(group.label, group.state, labels.formatDuration(group.durationSec));
1306
+ const body = /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles13.text, { color }, selected || group.state === "running" ? styles13.strong : null], children: chipText(group, labels) });
1307
+ const look = [styles13.chip, { borderColor: color, backgroundColor: selected ? theme.colors.surfaceElevated : theme.colors.surface }];
1308
+ if (onSelect === void 0) {
1309
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [look, styles13.still], accessible: true, accessibilityLabel: a11y, testID: `${testID}-${group.id}`, children: body }, group.id);
1310
+ }
1311
+ return /* @__PURE__ */ jsxRuntime.jsx(
1312
+ reactNative.Pressable,
1313
+ {
1314
+ accessibilityRole: "button",
1315
+ accessibilityLabel: a11y,
1316
+ accessibilityHint: labels.groupHint,
1317
+ accessibilityState: { selected },
1318
+ onPress: () => onSelect(group.id),
1319
+ style: [look, styles13.tap],
1320
+ testID: `${testID}-${group.id}`,
1321
+ children: body
1322
+ },
1323
+ group.id
1324
+ );
1325
+ }) });
1326
+ }
1327
+ function RunGroupSummary({ groups, labels, testID }) {
1328
+ const { theme } = useFeedbackUi();
1329
+ const done = summariseDoneGroups(groups);
1330
+ const open = groups.filter((g) => g.state !== "done");
1331
+ const doneColor = runToneColor(theme, "done");
1332
+ const doneText = labels.doneSummary(done.count, labels.formatDuration(done.durationSec));
1333
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles13.row, testID, children: [
1334
+ 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,
1335
+ /* @__PURE__ */ jsxRuntime.jsx(RunGroupChips, { groups: open, labels, testID: `${testID}-open` })
1336
+ ] });
1337
+ }
1338
+ var BAR_HEIGHT2 = 8;
1339
+ var LABEL_BASIS = 150;
1340
+ var DURATION_WIDTH = 64;
1341
+ var PERCENT = 100;
1342
+ var styles14 = reactNative.StyleSheet.create({
1343
+ list: { gap: 6 },
1344
+ row: { flexDirection: "row", alignItems: "center", gap: 8, flexWrap: "wrap" },
1345
+ label: { fontSize: 13, flexBasis: LABEL_BASIS, flexGrow: 0, flexShrink: 1, minWidth: 0 },
1346
+ track: { flexGrow: 1, flexShrink: 1, flexBasis: 80, height: BAR_HEIGHT2, borderRadius: 2, overflow: "hidden" },
1347
+ fill: { height: "100%", borderRadius: 2 },
1348
+ duration: { fontSize: 13, width: DURATION_WIDTH, textAlign: "right", fontVariant: ["tabular-nums"] },
1349
+ strong: { fontWeight: "700" }
1350
+ });
1351
+ function RunStepBars({ steps, maxBars, labels, testID }) {
1352
+ const { theme } = useFeedbackUi();
1353
+ const [all, setAll] = react.useState(false);
1354
+ const split = splitShorterSteps(steps, all ? steps.length : maxBars);
1355
+ const maxSec = steps.reduce((m, s) => Math.max(m, s.durationSec), 0);
1356
+ const folded = split.hiddenCount > 0;
1357
+ const canFold = all && steps.length > maxBars;
1358
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles14.list, testID, children: [
1359
+ split.visible.map((step, i) => {
1360
+ const color = runToneColor(theme, step.state);
1361
+ const duration = labels.formatDuration(step.durationSec);
1362
+ const strong = step.state === "running" ? styles14.strong : null;
1363
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles14.row, accessible: true, accessibilityLabel: labels.stepA11y(step.label, duration), testID: `${testID}-row-${String(i)}`, children: [
1364
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.label, { color: theme.colors.text }, strong], numberOfLines: 1, children: step.label }),
1365
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles14.track, { backgroundColor: theme.colors.border }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles14.fill, { backgroundColor: color, width: `${barFraction(step.durationSec, maxSec) * PERCENT}%` }] }) }),
1366
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.duration, { color: theme.colors.textSecondary }, strong], children: duration })
1367
+ ] }, `${step.label}-${String(i)}`);
1368
+ }),
1369
+ folded || canFold ? /* @__PURE__ */ jsxRuntime.jsx(
1370
+ RunCardButton,
1371
+ {
1372
+ label: folded ? labels.moreSteps(split.hiddenCount) : labels.fewerSteps,
1373
+ hint: labels.moreStepsHint,
1374
+ color: theme.colors.textSecondary,
1375
+ onPress: () => setAll(!all),
1376
+ expanded: all,
1377
+ testID: `${testID}-more`
1378
+ }
1379
+ ) : null
1380
+ ] });
1381
+ }
1382
+ var LIVE_RUN_CARD_COMPACT_MAX_PX = 640;
1383
+ var DEFAULT_MAX_BARS = 4;
1384
+ var styles15 = reactNative.StyleSheet.create({
1385
+ card: { borderWidth: 1, borderRadius: 8, padding: 14, gap: 10 },
1386
+ head: { flexDirection: "row", flexWrap: "wrap", alignItems: "center", gap: 10 },
1387
+ titleBox: { flexGrow: 1, flexShrink: 1, flexBasis: 200, minWidth: 0, gap: 2 },
1388
+ pill: { borderWidth: 1, borderRadius: 999, paddingHorizontal: 10, paddingVertical: 2, alignSelf: "flex-start" },
1389
+ pillText: { fontSize: 12, fontWeight: "700" },
1390
+ title: { fontSize: 16, fontWeight: "700" },
1391
+ meta: { fontSize: 13 },
1392
+ step: { fontSize: 14, fontWeight: "600" }
1393
+ });
1394
+ function LiveRunCard(props) {
1395
+ const { title, status = "running", currentStep = null, progress = null, groups, labels, onCancel, cancelDisabled = false } = props;
1396
+ const { maxBars = DEFAULT_MAX_BARS, testID = "live-run-card" } = props;
1397
+ const { theme } = useFeedbackUi();
1398
+ const { width } = reactNative.useWindowDimensions();
1399
+ const compact = props.compact ?? width < LIVE_RUN_CARD_COMPACT_MAX_PX;
1400
+ const [picked, setPicked] = react.useState(null);
1401
+ const [open, setOpen] = react.useState(false);
1402
+ const selectedId = groups.some((g) => g.id === picked) ? picked : defaultGroupId(groups);
1403
+ const selected = groups.find((g) => g.id === selectedId);
1404
+ const tone = runToneColor(theme, status);
1405
+ const percent = progressPercent(progress);
1406
+ const showTimings = !compact || open;
1407
+ const muted = { color: theme.colors.textSecondary };
1408
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles15.card, { borderColor: tone, backgroundColor: theme.colors.surface }], testID, children: [
1409
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.head, children: [
1410
+ /* @__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 }) }),
1411
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.titleBox, children: [
1412
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.title, { color: theme.colors.text }], testID: `${testID}-title`, children: title }),
1413
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.meta, muted], testID: `${testID}-meta`, children: labels.meta })
1414
+ ] }),
1415
+ 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
1416
+ ] }),
1417
+ currentStep !== null && currentStep !== "" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.step, { color: theme.colors.text }], testID: `${testID}-step`, children: currentStep }) : null,
1418
+ percent !== null ? /* @__PURE__ */ jsxRuntime.jsx(ProgressBar, { percent, label: labels.progress, accessibilityLabel: labels.progressA11y, color: tone, testID: `${testID}-progress` }) : null,
1419
+ percent === null && labels.progress !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.meta, muted], testID: `${testID}-progress-text`, children: labels.progress }) : null,
1420
+ compact ? /* @__PURE__ */ jsxRuntime.jsx(RunGroupSummary, { groups, labels, testID: `${testID}-summary` }) : null,
1421
+ 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,
1422
+ showTimings ? /* @__PURE__ */ jsxRuntime.jsx(RunGroupChips, { groups, labels, selectedId, onSelect: setPicked, testID: `${testID}-groups` }) : null,
1423
+ showTimings && selected !== void 0 && selected.steps.length > 0 ? /* @__PURE__ */ jsxRuntime.jsx(RunStepBars, { steps: selected.steps, maxBars, labels, testID: `${testID}-steps` }, selected.id) : null
1424
+ ] });
1425
+ }
1195
1426
 
1196
1427
  exports.AppErrorBoundary = AppErrorBoundary;
1197
1428
  exports.AsyncSurface = AsyncSurface;
@@ -1202,6 +1433,8 @@ exports.EmptyListState = EmptyListState;
1202
1433
  exports.ErrorState = ErrorState;
1203
1434
  exports.FEEDBACK_TEST_IDS = FEEDBACK_TEST_IDS;
1204
1435
  exports.FeedbackUiProvider = FeedbackUiProvider;
1436
+ exports.LIVE_RUN_CARD_COMPACT_MAX_PX = LIVE_RUN_CARD_COMPACT_MAX_PX;
1437
+ exports.LiveRunCard = LiveRunCard;
1205
1438
  exports.LoadingFallback = LoadingFallback;
1206
1439
  exports.MODAL_OVERLAY_COLOR = MODAL_OVERLAY_COLOR;
1207
1440
  exports.PageSkeleton = PageSkeleton;
@@ -1210,12 +1443,19 @@ exports.ToastHost = ToastHost;
1210
1443
  exports.UiProvider = FeedbackUiProvider;
1211
1444
  exports.WARMING_QUIET_PERIOD_MS = WARMING_QUIET_PERIOD_MS;
1212
1445
  exports.WarmingOverlay = WarmingOverlay;
1446
+ exports.barFraction = barFraction;
1213
1447
  exports.clampPercent = clampPercent;
1214
1448
  exports.createToastBus = createToastBus;
1449
+ exports.defaultGroupId = defaultGroupId;
1215
1450
  exports.getWarmingSnapshot = getWarmingSnapshot;
1451
+ exports.mergeRunSteps = mergeRunSteps;
1216
1452
  exports.notifyWarming = notifyWarming;
1453
+ exports.progressPercent = progressPercent;
1454
+ exports.runToneColor = runToneColor;
1217
1455
  exports.settleWarming = settleWarming;
1456
+ exports.splitShorterSteps = splitShorterSteps;
1218
1457
  exports.subscribeWarming = subscribeWarming;
1458
+ exports.summariseDoneGroups = summariseDoneGroups;
1219
1459
  exports.useFeedbackUi = useFeedbackUi;
1220
1460
  exports.useUi = useFeedbackUi;
1221
1461
  //# sourceMappingURL=index.js.map