@dloizides/ui-feedback 1.26.1 → 1.28.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.28.0
4
+
5
+ - `CheckPipeline` `phoneColumns?`: below the breakpoint the checks become a tile grid of that many columns (default 1 = one row per check). `statusUnderTitleEnabled?` puts each status pill under the check name. `CheckStatus` gains `statusUnderTitleEnabled?`; `pipelineItemVariant(width, breakpoint, phoneColumns)` exported.
6
+
7
+ ## 1.27.0
8
+
9
+ - `CheckStatus({ title, detail?, status?, variant: tile|row, onPress?, accessibilityLabel, accessibilityHint, testID? })`: one check as a tile or a row; the status pill is a slot; pressable when `onPress` is set (44 px min height).
10
+ - `CheckPipeline({ items, breakpoint?, ... })`: checks as equal tiles in one row at or above `breakpoint` (default 768), one row per check below; `pipelineVariant(width, breakpoint)` exported.
11
+ - `ThresholdMeter({ value, threshold, max?, lowerPasses?, label, valueText, accessibilityHint, testID? })`: score fill against a threshold mark, success or error tone from the theme; role meter. `meterPercent`, `meetsThreshold` exported.
12
+ - `AttentionCard({ title, heading?, status?, message, evidence?, action?, testID? })`: the one item that needs a person first, with slots for status, evidence and the next action.
13
+
3
14
  ## 1.26.0
4
15
 
5
16
  - `LocalModelGate` + `useLocalModel(model)` (INV-EXTRACT-1 W9): shows its children once a `@dloizides/text-generation` local model is ready, else the offer, download percent, failure retry or blocked reason; labels, test ids and the card/text/button slots come from the app.
package/dist/index.d.mts CHANGED
@@ -738,4 +738,70 @@ declare const LocalModelGate: ({ model, labels, testIds, slots, children, }: Loc
738
738
  /** Follows a local model and checks the browser on first use. */
739
739
  declare function useLocalModel(model: LocalModel): LocalModelState;
740
740
 
741
- export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, COPY_FEEDBACK_MS, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, type DoneSummary, EmptyListState, type EmptyListStateProps, type ErrorBoundaryLabels, type ErrorFallbackState, ErrorNotice, type ErrorNoticeProps, ErrorReferenceRow, type ErrorReferenceRowProps, ErrorState, type ErrorStateAction, type ErrorStateProps, FEEDBACK_TEST_IDS, type FeedbackColorScale, type FeedbackNavigate, type FeedbackTheme, type FeedbackThemeColors, type FeedbackThemePalette, type FeedbackThemeSemantic, type FeedbackThemeSemanticText, type FeedbackTranslate, FeedbackUiProvider, type FeedbackUiProviderProps, type FeedbackUiValue, type FlatRunStep, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, type LiveRunCardLabels, type LiveRunCardProps, LoadingFallback, type LoadingFallbackProps, LocalModelGate, type LocalModelGateLabels, type LocalModelGateProps, type LocalModelGateSlots, type LocalModelGateTestIds, MODAL_OVERLAY_COLOR, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type RunGroup, type RunStep, type RunStepState, type StepSplit, type ToastActionSpec, 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, UiThemeOverride, type UiThemeOverrideProps, type FeedbackThemePalette as UiThemePalette, type FeedbackThemeSemantic as UiThemeSemantic, type FeedbackThemeSemanticText as UiThemeSemanticText, type FeedbackTranslate as UiTranslate, type FeedbackUiValue as UiValue, WARMING_QUIET_PERIOD_MS, type WarmingInfo, WarmingOverlay, type WarmingOverlayLabels, type WarmingOverlayProps, type WarmingSnapshot, barFraction, clampPercent, copyText, createToastBus, defaultGroupId, getWarmingSnapshot, mergeRunSteps, notifyWarming, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useCopyToClipboard, useFeedbackUi, useLocalModel, useFeedbackUi as useUi };
741
+ type CheckStatusVariant = 'tile' | 'row';
742
+ interface CheckStatusProps {
743
+ title: string;
744
+ detail?: string;
745
+ status?: React.ReactNode;
746
+ variant?: CheckStatusVariant;
747
+ statusUnderTitleEnabled?: boolean;
748
+ onPress?: () => void;
749
+ accessibilityLabel: string;
750
+ accessibilityHint: string;
751
+ testID?: string;
752
+ }
753
+ /** One check as a tile (equal share of a row) or a row (title left, status right, or under the title); pressing opens it. */
754
+ declare const CheckStatus: (props: CheckStatusProps) => React.ReactElement;
755
+
756
+ interface CheckPipelineItem extends Omit<CheckStatusProps, 'variant'> {
757
+ id: string;
758
+ }
759
+ interface CheckPipelineProps {
760
+ items: readonly CheckPipelineItem[];
761
+ breakpoint?: number;
762
+ accessibilityLabel: string;
763
+ accessibilityHint: string;
764
+ testID?: string;
765
+ phoneColumns?: number;
766
+ statusUnderTitleEnabled?: boolean;
767
+ }
768
+ /** The checks as equal tiles in one row on a computer; on a phone one row per check, or a tile grid of `phoneColumns`. */
769
+ declare const CheckPipeline: ({ items, breakpoint, accessibilityLabel, accessibilityHint, testID, phoneColumns, statusUnderTitleEnabled }: CheckPipelineProps) => React.ReactElement;
770
+
771
+ declare const PIPELINE_COLLAPSE_BREAKPOINT = 768;
772
+ /** Tiles in one row at or above the breakpoint, one row per check below it. */
773
+ declare function pipelineVariant(width: number, breakpoint?: number): CheckStatusVariant;
774
+ /** The variant each check takes: a phone grid of more than one column keeps tiles, else the pipeline variant. */
775
+ declare function pipelineItemVariant(width: number, breakpoint?: number, phoneColumns?: number): CheckStatusVariant;
776
+
777
+ interface ThresholdMeterProps {
778
+ value: number;
779
+ threshold: number;
780
+ max?: number;
781
+ lowerPasses?: boolean;
782
+ label: string;
783
+ valueText: string;
784
+ accessibilityHint: string;
785
+ testID?: string;
786
+ }
787
+ /** A score against its pass line: the fill is the score, the mark is the threshold, the fill tone says pass or fail. */
788
+ declare const ThresholdMeter: (props: ThresholdMeterProps) => React.ReactElement;
789
+
790
+ /** A value as a 0-100 share of max; a non-positive max gives 0. */
791
+ declare function meterPercent(value: number, max: number): number;
792
+ /** Whether a value meets its threshold: at or above it, or at or below it when lower passes. */
793
+ declare function meetsThreshold(value: number, threshold: number, lowerPasses: boolean): boolean;
794
+
795
+ interface AttentionCardProps {
796
+ title: string;
797
+ heading?: string;
798
+ status?: React.ReactNode;
799
+ message: string;
800
+ evidence?: React.ReactNode;
801
+ action?: React.ReactNode;
802
+ testID?: string;
803
+ }
804
+ /** The one item that needs a person first: its name and status, a line on why, optional evidence and the next action. */
805
+ declare const AttentionCard: ({ title, heading, status, message, evidence, action, testID }: AttentionCardProps) => React.ReactElement;
806
+
807
+ export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, AttentionCard, type AttentionCardProps, COPY_FEEDBACK_MS, CheckPipeline, type CheckPipelineItem, type CheckPipelineProps, CheckStatus, type CheckStatusProps, type CheckStatusVariant, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, type DoneSummary, EmptyListState, type EmptyListStateProps, type ErrorBoundaryLabels, type ErrorFallbackState, ErrorNotice, type ErrorNoticeProps, ErrorReferenceRow, type ErrorReferenceRowProps, ErrorState, type ErrorStateAction, type ErrorStateProps, FEEDBACK_TEST_IDS, type FeedbackColorScale, type FeedbackNavigate, type FeedbackTheme, type FeedbackThemeColors, type FeedbackThemePalette, type FeedbackThemeSemantic, type FeedbackThemeSemanticText, type FeedbackTranslate, FeedbackUiProvider, type FeedbackUiProviderProps, type FeedbackUiValue, type FlatRunStep, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, type LiveRunCardLabels, type LiveRunCardProps, LoadingFallback, type LoadingFallbackProps, LocalModelGate, type LocalModelGateLabels, type LocalModelGateProps, type LocalModelGateSlots, type LocalModelGateTestIds, MODAL_OVERLAY_COLOR, PIPELINE_COLLAPSE_BREAKPOINT, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type RunGroup, type RunStep, type RunStepState, type StepSplit, ThresholdMeter, type ThresholdMeterProps, type ToastActionSpec, 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, UiThemeOverride, type UiThemeOverrideProps, type FeedbackThemePalette as UiThemePalette, type FeedbackThemeSemantic as UiThemeSemantic, type FeedbackThemeSemanticText as UiThemeSemanticText, type FeedbackTranslate as UiTranslate, type FeedbackUiValue as UiValue, WARMING_QUIET_PERIOD_MS, type WarmingInfo, WarmingOverlay, type WarmingOverlayLabels, type WarmingOverlayProps, type WarmingSnapshot, barFraction, clampPercent, copyText, createToastBus, defaultGroupId, getWarmingSnapshot, meetsThreshold, mergeRunSteps, meterPercent, notifyWarming, pipelineItemVariant, pipelineVariant, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useCopyToClipboard, useFeedbackUi, useLocalModel, useFeedbackUi as useUi };
package/dist/index.d.ts CHANGED
@@ -738,4 +738,70 @@ declare const LocalModelGate: ({ model, labels, testIds, slots, children, }: Loc
738
738
  /** Follows a local model and checks the browser on first use. */
739
739
  declare function useLocalModel(model: LocalModel): LocalModelState;
740
740
 
741
- export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, COPY_FEEDBACK_MS, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, type DoneSummary, EmptyListState, type EmptyListStateProps, type ErrorBoundaryLabels, type ErrorFallbackState, ErrorNotice, type ErrorNoticeProps, ErrorReferenceRow, type ErrorReferenceRowProps, ErrorState, type ErrorStateAction, type ErrorStateProps, FEEDBACK_TEST_IDS, type FeedbackColorScale, type FeedbackNavigate, type FeedbackTheme, type FeedbackThemeColors, type FeedbackThemePalette, type FeedbackThemeSemantic, type FeedbackThemeSemanticText, type FeedbackTranslate, FeedbackUiProvider, type FeedbackUiProviderProps, type FeedbackUiValue, type FlatRunStep, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, type LiveRunCardLabels, type LiveRunCardProps, LoadingFallback, type LoadingFallbackProps, LocalModelGate, type LocalModelGateLabels, type LocalModelGateProps, type LocalModelGateSlots, type LocalModelGateTestIds, MODAL_OVERLAY_COLOR, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type RunGroup, type RunStep, type RunStepState, type StepSplit, type ToastActionSpec, 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, UiThemeOverride, type UiThemeOverrideProps, type FeedbackThemePalette as UiThemePalette, type FeedbackThemeSemantic as UiThemeSemantic, type FeedbackThemeSemanticText as UiThemeSemanticText, type FeedbackTranslate as UiTranslate, type FeedbackUiValue as UiValue, WARMING_QUIET_PERIOD_MS, type WarmingInfo, WarmingOverlay, type WarmingOverlayLabels, type WarmingOverlayProps, type WarmingSnapshot, barFraction, clampPercent, copyText, createToastBus, defaultGroupId, getWarmingSnapshot, mergeRunSteps, notifyWarming, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useCopyToClipboard, useFeedbackUi, useLocalModel, useFeedbackUi as useUi };
741
+ type CheckStatusVariant = 'tile' | 'row';
742
+ interface CheckStatusProps {
743
+ title: string;
744
+ detail?: string;
745
+ status?: React.ReactNode;
746
+ variant?: CheckStatusVariant;
747
+ statusUnderTitleEnabled?: boolean;
748
+ onPress?: () => void;
749
+ accessibilityLabel: string;
750
+ accessibilityHint: string;
751
+ testID?: string;
752
+ }
753
+ /** One check as a tile (equal share of a row) or a row (title left, status right, or under the title); pressing opens it. */
754
+ declare const CheckStatus: (props: CheckStatusProps) => React.ReactElement;
755
+
756
+ interface CheckPipelineItem extends Omit<CheckStatusProps, 'variant'> {
757
+ id: string;
758
+ }
759
+ interface CheckPipelineProps {
760
+ items: readonly CheckPipelineItem[];
761
+ breakpoint?: number;
762
+ accessibilityLabel: string;
763
+ accessibilityHint: string;
764
+ testID?: string;
765
+ phoneColumns?: number;
766
+ statusUnderTitleEnabled?: boolean;
767
+ }
768
+ /** The checks as equal tiles in one row on a computer; on a phone one row per check, or a tile grid of `phoneColumns`. */
769
+ declare const CheckPipeline: ({ items, breakpoint, accessibilityLabel, accessibilityHint, testID, phoneColumns, statusUnderTitleEnabled }: CheckPipelineProps) => React.ReactElement;
770
+
771
+ declare const PIPELINE_COLLAPSE_BREAKPOINT = 768;
772
+ /** Tiles in one row at or above the breakpoint, one row per check below it. */
773
+ declare function pipelineVariant(width: number, breakpoint?: number): CheckStatusVariant;
774
+ /** The variant each check takes: a phone grid of more than one column keeps tiles, else the pipeline variant. */
775
+ declare function pipelineItemVariant(width: number, breakpoint?: number, phoneColumns?: number): CheckStatusVariant;
776
+
777
+ interface ThresholdMeterProps {
778
+ value: number;
779
+ threshold: number;
780
+ max?: number;
781
+ lowerPasses?: boolean;
782
+ label: string;
783
+ valueText: string;
784
+ accessibilityHint: string;
785
+ testID?: string;
786
+ }
787
+ /** A score against its pass line: the fill is the score, the mark is the threshold, the fill tone says pass or fail. */
788
+ declare const ThresholdMeter: (props: ThresholdMeterProps) => React.ReactElement;
789
+
790
+ /** A value as a 0-100 share of max; a non-positive max gives 0. */
791
+ declare function meterPercent(value: number, max: number): number;
792
+ /** Whether a value meets its threshold: at or above it, or at or below it when lower passes. */
793
+ declare function meetsThreshold(value: number, threshold: number, lowerPasses: boolean): boolean;
794
+
795
+ interface AttentionCardProps {
796
+ title: string;
797
+ heading?: string;
798
+ status?: React.ReactNode;
799
+ message: string;
800
+ evidence?: React.ReactNode;
801
+ action?: React.ReactNode;
802
+ testID?: string;
803
+ }
804
+ /** The one item that needs a person first: its name and status, a line on why, optional evidence and the next action. */
805
+ declare const AttentionCard: ({ title, heading, status, message, evidence, action, testID }: AttentionCardProps) => React.ReactElement;
806
+
807
+ export { AppErrorBoundary, type AppErrorBoundaryProps, AsyncSurface, type AsyncSurfaceProps, AttentionCard, type AttentionCardProps, COPY_FEEDBACK_MS, CheckPipeline, type CheckPipelineItem, type CheckPipelineProps, CheckStatus, type CheckStatusProps, type CheckStatusVariant, ConfirmDialog, type ConfirmDialogProps, CopyStatus, type CopyToClipboard, DEFAULT_ERROR_BOUNDARY_LABELS, DISABLED_OPACITY, type DoneSummary, EmptyListState, type EmptyListStateProps, type ErrorBoundaryLabels, type ErrorFallbackState, ErrorNotice, type ErrorNoticeProps, ErrorReferenceRow, type ErrorReferenceRowProps, ErrorState, type ErrorStateAction, type ErrorStateProps, FEEDBACK_TEST_IDS, type FeedbackColorScale, type FeedbackNavigate, type FeedbackTheme, type FeedbackThemeColors, type FeedbackThemePalette, type FeedbackThemeSemantic, type FeedbackThemeSemanticText, type FeedbackTranslate, FeedbackUiProvider, type FeedbackUiProviderProps, type FeedbackUiValue, type FlatRunStep, LIVE_RUN_CARD_COMPACT_MAX_PX, LiveRunCard, type LiveRunCardLabels, type LiveRunCardProps, LoadingFallback, type LoadingFallbackProps, LocalModelGate, type LocalModelGateLabels, type LocalModelGateProps, type LocalModelGateSlots, type LocalModelGateTestIds, MODAL_OVERLAY_COLOR, PIPELINE_COLLAPSE_BREAKPOINT, PageSkeleton, type PageSkeletonProps, ProgressBar, type ProgressBarProps, type RunGroup, type RunStep, type RunStepState, type StepSplit, ThresholdMeter, type ThresholdMeterProps, type ToastActionSpec, 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, UiThemeOverride, type UiThemeOverrideProps, type FeedbackThemePalette as UiThemePalette, type FeedbackThemeSemantic as UiThemeSemantic, type FeedbackThemeSemanticText as UiThemeSemanticText, type FeedbackTranslate as UiTranslate, type FeedbackUiValue as UiValue, WARMING_QUIET_PERIOD_MS, type WarmingInfo, WarmingOverlay, type WarmingOverlayLabels, type WarmingOverlayProps, type WarmingSnapshot, barFraction, clampPercent, copyText, createToastBus, defaultGroupId, getWarmingSnapshot, meetsThreshold, mergeRunSteps, meterPercent, notifyWarming, pipelineItemVariant, pipelineVariant, progressPercent, readTraceId, runToneColor, settleWarming, splitShorterSteps, subscribeWarming, summariseDoneGroups, useCopyToClipboard, useFeedbackUi, useLocalModel, useFeedbackUi as useUi };
package/dist/index.js CHANGED
@@ -1819,23 +1819,23 @@ var LocalModelGate = ({
1819
1819
  const consent = react.useCallback(() => {
1820
1820
  model.consent().catch(() => void 0);
1821
1821
  }, [model]);
1822
- const { Card, Text: Text16, Button } = slots;
1822
+ const { Card, Text: Text19, Button } = slots;
1823
1823
  switch (phase) {
1824
1824
  case textGeneration.LocalModelPhase.Checking:
1825
1825
  return null;
1826
1826
  case textGeneration.LocalModelPhase.Blocked:
1827
- return /* @__PURE__ */ jsxRuntime.jsx(Card, { testID: testIds.blocked, children: /* @__PURE__ */ jsxRuntime.jsx(Text16, { children: labels.blocked(block) }) });
1827
+ return /* @__PURE__ */ jsxRuntime.jsx(Card, { testID: testIds.blocked, children: /* @__PURE__ */ jsxRuntime.jsx(Text19, { children: labels.blocked(block) }) });
1828
1828
  case textGeneration.LocalModelPhase.Offer:
1829
1829
  return /* @__PURE__ */ jsxRuntime.jsxs(Card, { testID: testIds.offer, children: [
1830
- /* @__PURE__ */ jsxRuntime.jsx(Text16, { heading: true, children: labels.title }),
1831
- /* @__PURE__ */ jsxRuntime.jsx(Text16, { children: labels.offerBody }),
1830
+ /* @__PURE__ */ jsxRuntime.jsx(Text19, { heading: true, children: labels.title }),
1831
+ /* @__PURE__ */ jsxRuntime.jsx(Text19, { children: labels.offerBody }),
1832
1832
  /* @__PURE__ */ jsxRuntime.jsx(Button, { hint: labels.consentHint, label: labels.consent, testID: testIds.consent, onPress: consent })
1833
1833
  ] });
1834
1834
  case textGeneration.LocalModelPhase.Loading:
1835
- return /* @__PURE__ */ jsxRuntime.jsx(Card, { testID: testIds.loading, children: /* @__PURE__ */ jsxRuntime.jsx(Text16, { children: labels.loading(String(Math.round(progress * PERCENT2))) }) });
1835
+ return /* @__PURE__ */ jsxRuntime.jsx(Card, { testID: testIds.loading, children: /* @__PURE__ */ jsxRuntime.jsx(Text19, { children: labels.loading(String(Math.round(progress * PERCENT2))) }) });
1836
1836
  case textGeneration.LocalModelPhase.Failed:
1837
1837
  return /* @__PURE__ */ jsxRuntime.jsxs(Card, { testID: testIds.failed, children: [
1838
- /* @__PURE__ */ jsxRuntime.jsx(Text16, { children: labels.failed }),
1838
+ /* @__PURE__ */ jsxRuntime.jsx(Text19, { children: labels.failed }),
1839
1839
  /* @__PURE__ */ jsxRuntime.jsx(Button, { hint: labels.consentHint, label: labels.retry, testID: testIds.consent, onPress: consent })
1840
1840
  ] });
1841
1841
  case textGeneration.LocalModelPhase.Ready:
@@ -1843,10 +1843,151 @@ var LocalModelGate = ({
1843
1843
  return children;
1844
1844
  }
1845
1845
  };
1846
+ var RADIUS2 = 8;
1847
+ var PAD = 12;
1848
+ var GAP = 8;
1849
+ var MIN_HIT = 44;
1850
+ var TITLE_FONT = 14;
1851
+ var DETAIL_FONT = 12;
1852
+ var styles19 = reactNative.StyleSheet.create({
1853
+ detail: { fontSize: DETAIL_FONT },
1854
+ row: { alignItems: "center", flexDirection: "row", justifyContent: "space-between" },
1855
+ statusUnder: { alignSelf: "flex-start" },
1856
+ tile: { flexBasis: 0, flexGrow: 1, minWidth: 0 },
1857
+ title: { fontSize: TITLE_FONT, fontWeight: "600" },
1858
+ words: { flexShrink: 1, gap: 2 },
1859
+ wrap: { borderRadius: RADIUS2, borderWidth: 1, gap: GAP, minHeight: MIN_HIT, padding: PAD }
1860
+ });
1861
+ var CheckStatus = (props) => {
1862
+ const { title, detail, status, variant = "tile", statusUnderTitleEnabled = false, onPress, accessibilityLabel, accessibilityHint, testID } = props;
1863
+ const { theme } = useFeedbackUi();
1864
+ const style = [styles19.wrap, variant === "tile" ? styles19.tile : styles19.row, { backgroundColor: theme.colors.surface, borderColor: theme.colors.border }];
1865
+ const body = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1866
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.words, children: [
1867
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles19.title, { color: theme.colors.text }], children: title }),
1868
+ statusUnderTitleEnabled ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.statusUnder, children: status }) : null,
1869
+ detail === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles19.detail, { color: theme.colors.textSecondary }], children: detail })
1870
+ ] }),
1871
+ statusUnderTitleEnabled ? null : status
1872
+ ] });
1873
+ if (onPress === void 0) {
1874
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityHint, accessibilityLabel, style, testID, children: body });
1875
+ }
1876
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { accessibilityHint, accessibilityLabel, accessibilityRole: "button", style, testID, onPress, children: body });
1877
+ };
1878
+
1879
+ // src/CheckStatus/pipelineVariant.ts
1880
+ var PIPELINE_COLLAPSE_BREAKPOINT = 768;
1881
+ function pipelineVariant(width, breakpoint = PIPELINE_COLLAPSE_BREAKPOINT) {
1882
+ return width >= breakpoint ? "tile" : "row";
1883
+ }
1884
+ function pipelineItemVariant(width, breakpoint = PIPELINE_COLLAPSE_BREAKPOINT, phoneColumns = 1) {
1885
+ const variant = pipelineVariant(width, breakpoint);
1886
+ return variant === "row" && phoneColumns > 1 ? "tile" : variant;
1887
+ }
1888
+ var GRID_GAP_SHARE = 2;
1889
+ var styles20 = reactNative.StyleSheet.create({
1890
+ grid: { flexDirection: "row", flexWrap: "wrap", gap: 8 },
1891
+ list: { gap: 8 },
1892
+ row: { flexDirection: "row", gap: 12 }
1893
+ });
1894
+ var CheckPipeline = ({ items, breakpoint, accessibilityLabel, accessibilityHint, testID, phoneColumns = 1, statusUnderTitleEnabled }) => {
1895
+ const width = reactNative.useWindowDimensions().width;
1896
+ const variant = pipelineVariant(width, breakpoint);
1897
+ const itemVariant = pipelineItemVariant(width, breakpoint, phoneColumns);
1898
+ const grid = variant !== itemVariant;
1899
+ const cell = { flexBasis: `${Math.floor(100 / phoneColumns) - GRID_GAP_SHARE}%`, flexGrow: 1 };
1900
+ const containerStyle = variant === "tile" ? styles20.row : grid ? styles20.grid : styles20.list;
1901
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { accessibilityHint, accessibilityLabel, accessibilityRole: "summary", style: containerStyle, testID, children: items.map(({ id, ...item }) => {
1902
+ const check = /* @__PURE__ */ jsxRuntime.jsx(CheckStatus, { ...item, statusUnderTitleEnabled, variant: itemVariant }, id);
1903
+ return grid ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: cell, children: check }, id) : check;
1904
+ }) });
1905
+ };
1906
+
1907
+ // src/CheckStatus/semanticScale.ts
1908
+ function semanticScale(theme, name) {
1909
+ const found = theme.semantic[name];
1910
+ return found?.["500"];
1911
+ }
1912
+
1913
+ // src/ThresholdMeter/meterScale.ts
1914
+ var PERCENT3 = 100;
1915
+ function meterPercent(value, max) {
1916
+ return max > 0 ? clampPercent(value / max * PERCENT3) : 0;
1917
+ }
1918
+ function meetsThreshold(value, threshold, lowerPasses) {
1919
+ return lowerPasses ? value <= threshold : value >= threshold;
1920
+ }
1921
+ var TRACK_HEIGHT = 8;
1922
+ var MARKER_WIDTH = 2;
1923
+ var MARKER_HEIGHT = 16;
1924
+ var MARKER_TOP = -4;
1925
+ var RADIUS3 = 999;
1926
+ var FONT = 12;
1927
+ var styles21 = reactNative.StyleSheet.create({
1928
+ fill: { borderRadius: RADIUS3, height: "100%" },
1929
+ head: { flexDirection: "row", flexWrap: "wrap", gap: 8, justifyContent: "space-between" },
1930
+ marker: { height: MARKER_HEIGHT, marginLeft: -MARKER_WIDTH / 2, position: "absolute", top: MARKER_TOP, width: MARKER_WIDTH },
1931
+ text: { fontSize: FONT, fontVariant: ["tabular-nums"] },
1932
+ track: { borderRadius: RADIUS3, height: TRACK_HEIGHT },
1933
+ wrap: { gap: 6 }
1934
+ });
1935
+ function partId(testID, part) {
1936
+ return testID === void 0 ? void 0 : `${testID}-${part}`;
1937
+ }
1938
+ var ThresholdMeter = (props) => {
1939
+ const { value, threshold, max = 1, lowerPasses = false, label, valueText, accessibilityHint, testID } = props;
1940
+ const { theme } = useFeedbackUi();
1941
+ const passes = meetsThreshold(value, threshold, lowerPasses);
1942
+ const fill = passes ? semanticScale(theme, "success") ?? theme.palette.primary["500"] : theme.semantic.error["500"];
1943
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { accessibilityHint, accessibilityLabel: label, "aria-valuemax": max, "aria-valuemin": 0, "aria-valuenow": value, "aria-valuetext": valueText, role: "meter", style: styles21.wrap, testID, children: [
1944
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.head, children: [
1945
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles21.text, { color: theme.colors.textSecondary }], children: label }),
1946
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles21.text, { color: theme.colors.text }], children: valueText })
1947
+ ] }),
1948
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles21.track, { backgroundColor: theme.colors.border }], children: [
1949
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles21.fill, { backgroundColor: fill, width: `${meterPercent(value, max)}%` }], testID: partId(testID, "fill") }),
1950
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles21.marker, { backgroundColor: theme.colors.text, left: `${meterPercent(threshold, max)}%` }], testID: partId(testID, "threshold") })
1951
+ ] })
1952
+ ] });
1953
+ };
1954
+ var RADIUS4 = 12;
1955
+ var PAD2 = 16;
1956
+ var GAP2 = 8;
1957
+ var STACK_GAP = 12;
1958
+ var TITLE_FONT2 = 15;
1959
+ var HEADING_FONT = 16;
1960
+ var MESSAGE_FONT = 14;
1961
+ var styles22 = reactNative.StyleSheet.create({
1962
+ card: { borderRadius: RADIUS4, borderWidth: 1, gap: GAP2, minWidth: 0, padding: PAD2 },
1963
+ head: { alignItems: "center", flexDirection: "row", flexWrap: "wrap", gap: GAP2, justifyContent: "space-between" },
1964
+ heading: { flexShrink: 1, fontSize: HEADING_FONT, fontWeight: "700" },
1965
+ message: { fontSize: MESSAGE_FONT },
1966
+ stack: { gap: STACK_GAP },
1967
+ title: { fontSize: TITLE_FONT2, fontWeight: "700" }
1968
+ });
1969
+ var AttentionCard = ({ title, heading, status, message, evidence, action, testID }) => {
1970
+ const { theme } = useFeedbackUi();
1971
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles22.card, { backgroundColor: theme.colors.surfaceElevated, borderColor: theme.colors.border }], testID, children: [
1972
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { accessibilityRole: "header", style: [styles22.title, { color: theme.colors.text }], children: title }),
1973
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.stack, children: [
1974
+ heading === void 0 ? null : /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.head, testID: testID === void 0 ? void 0 : `${testID}-head`, children: [
1975
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.heading, { color: theme.colors.text }], children: heading }),
1976
+ status
1977
+ ] }),
1978
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.message, { color: theme.colors.textSecondary }], children: message }),
1979
+ evidence,
1980
+ action
1981
+ ] })
1982
+ ] });
1983
+ };
1846
1984
 
1847
1985
  exports.AppErrorBoundary = AppErrorBoundary;
1848
1986
  exports.AsyncSurface = AsyncSurface;
1987
+ exports.AttentionCard = AttentionCard;
1849
1988
  exports.COPY_FEEDBACK_MS = COPY_FEEDBACK_MS;
1989
+ exports.CheckPipeline = CheckPipeline;
1990
+ exports.CheckStatus = CheckStatus;
1850
1991
  exports.ConfirmDialog = ConfirmDialog;
1851
1992
  exports.CopyStatus = CopyStatus;
1852
1993
  exports.DEFAULT_ERROR_BOUNDARY_LABELS = DEFAULT_ERROR_BOUNDARY_LABELS;
@@ -1862,8 +2003,10 @@ exports.LiveRunCard = LiveRunCard;
1862
2003
  exports.LoadingFallback = LoadingFallback;
1863
2004
  exports.LocalModelGate = LocalModelGate;
1864
2005
  exports.MODAL_OVERLAY_COLOR = MODAL_OVERLAY_COLOR;
2006
+ exports.PIPELINE_COLLAPSE_BREAKPOINT = PIPELINE_COLLAPSE_BREAKPOINT;
1865
2007
  exports.PageSkeleton = PageSkeleton;
1866
2008
  exports.ProgressBar = ProgressBar;
2009
+ exports.ThresholdMeter = ThresholdMeter;
1867
2010
  exports.ToastHost = ToastHost;
1868
2011
  exports.UiProvider = FeedbackUiProvider;
1869
2012
  exports.UiThemeOverride = UiThemeOverride;
@@ -1875,8 +2018,12 @@ exports.copyText = copyText;
1875
2018
  exports.createToastBus = createToastBus;
1876
2019
  exports.defaultGroupId = defaultGroupId;
1877
2020
  exports.getWarmingSnapshot = getWarmingSnapshot;
2021
+ exports.meetsThreshold = meetsThreshold;
1878
2022
  exports.mergeRunSteps = mergeRunSteps;
2023
+ exports.meterPercent = meterPercent;
1879
2024
  exports.notifyWarming = notifyWarming;
2025
+ exports.pipelineItemVariant = pipelineItemVariant;
2026
+ exports.pipelineVariant = pipelineVariant;
1880
2027
  exports.progressPercent = progressPercent;
1881
2028
  exports.readTraceId = readTraceId;
1882
2029
  exports.runToneColor = runToneColor;