@testerpaykit/expo 2.2.0 → 2.3.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
@@ -591,6 +591,193 @@ declare class CompensationClient {
591
591
  resolveConflict(): Promise<void>;
592
592
  }
593
593
 
594
+ type TpkLanguage = 'de' | 'en';
595
+ /** The device's UI language, reduced to `de` / `en`. */
596
+ declare function detectDeviceLanguage(): TpkLanguage;
597
+ /** Pins the UI language for every TPK surface below it. `undefined`
598
+ * keeps device detection. */
599
+ declare function TpkLanguageProvider({ language, children, }: {
600
+ language?: TpkLanguage;
601
+ children: ReactNode;
602
+ }): React.JSX.Element;
603
+ declare function useTpkLanguage(): TpkLanguage;
604
+ declare function useTpkStrings(): TpkStrings;
605
+ /** Money in the tester's language: "1,00 €" in German, "€1.00" in
606
+ * English. `currency` is an ISO-4217 code (EUR, USD, GBP …). */
607
+ declare function formatTpkMoney(amount: number, currency: string, language: TpkLanguage): string;
608
+ /** Picks the text for the active language: `tr({ en: '…', de: '…' })`.
609
+ * For surfaces with a handful of texts; big surfaces use TPK_STRINGS. */
610
+ declare function useTr(): (texts: {
611
+ en: string;
612
+ de: string;
613
+ }) => string;
614
+ interface TpkStrings {
615
+ menuReportBug: string;
616
+ menuDetailedReport: string;
617
+ menuFeedback: string;
618
+ menuAutoTest: string;
619
+ menuChecklist: string;
620
+ /** Opens the role picker ("Login with TPK"). */
621
+ menuChoosePersona: string;
622
+ /** "Du testest als …": shown while a made-up role is chosen. */
623
+ personaHint: (title: string) => string;
624
+ menuSendToClaude: string;
625
+ menuConnectClaude: string;
626
+ menuDisconnectClaude: string;
627
+ menuCachedCrashes: (count: number) => string;
628
+ menuWorkboard: string;
629
+ menuMyBugs: string;
630
+ menuSessionDetails: string;
631
+ menuMessages: string;
632
+ menuRetests: string;
633
+ menuDebugLogs: string;
634
+ menuEndSession: string;
635
+ menuSessionEarnings: string;
636
+ menuMyMoney: string;
637
+ menuYouAre: (handle: string) => string;
638
+ unreadBadgeA11y: (count: number) => string;
639
+ verifyOfflineTitle: string;
640
+ verifyOffline: string;
641
+ verifiedNow: string;
642
+ /** FAB screen-reader hint: a tap opens the report sheet. */
643
+ fabA11yHint: string;
644
+ /** Report sheet, bottom bar: "Retests" tile (shown when there is no checklist). */
645
+ sheetRetests: string;
646
+ /** Report sheet, bottom bar: the last tile, opens the list of everything. */
647
+ sheetAll: string;
648
+ /** Report sheet, "All" list: back to the report. */
649
+ sheetBack: string;
650
+ reportTitle: string;
651
+ reportClose: string;
652
+ reportSpeak: string;
653
+ stepTitles: readonly [string, string, string, string, string];
654
+ cancel: string;
655
+ back: string;
656
+ continue: string;
657
+ submit: string;
658
+ typeBug: string;
659
+ typeBugDescription: string;
660
+ typeCrash: string;
661
+ typeCrashDescription: string;
662
+ typeUiIssue: string;
663
+ typeUiIssueDescription: string;
664
+ typePerformance: string;
665
+ typePerformanceDescription: string;
666
+ typeFeature: string;
667
+ typeFeatureDescription: string;
668
+ typeFeedback: string;
669
+ typeFeedbackDescription: string;
670
+ severityCritical: string;
671
+ severityCriticalDescription: string;
672
+ severityHigh: string;
673
+ severityHighDescription: string;
674
+ severityMedium: string;
675
+ severityMediumDescription: string;
676
+ severityLow: string;
677
+ severityLowDescription: string;
678
+ frequencyAlways: string;
679
+ frequencyOften: string;
680
+ frequencySometimes: string;
681
+ frequencyOnce: string;
682
+ fieldTitle: string;
683
+ fieldTitlePlaceholder: string;
684
+ fieldDescription: string;
685
+ fieldDescriptionPlaceholder: string;
686
+ fieldExpected: string;
687
+ fieldExpectedPlaceholder: string;
688
+ fieldActual: string;
689
+ fieldActualPlaceholder: string;
690
+ fieldFrequency: string;
691
+ fieldComponent: string;
692
+ fieldComponentPlaceholder: string;
693
+ attachments: string;
694
+ attachScreenshot: string;
695
+ attachImage: string;
696
+ attachFile: string;
697
+ attachA11y: (label: string) => string;
698
+ removeA11y: (name: string) => string;
699
+ stepsAdd: string;
700
+ stepsPlaceholder: string;
701
+ stepsAddA11y: string;
702
+ stepsEmpty: string;
703
+ stepsReorderHint: string;
704
+ stepsDragA11y: (n: number) => string;
705
+ stepsRemoveA11y: (n: number) => string;
706
+ reviewType: string;
707
+ reviewSeverity: string;
708
+ reviewTitle: string;
709
+ reviewDescription: string;
710
+ reviewExpected: string;
711
+ reviewActual: string;
712
+ reviewFrequency: string;
713
+ reviewComponent: string;
714
+ reviewSteps: string;
715
+ reviewAttachments: string;
716
+ reviewEmpty: string;
717
+ errorRejected: string;
718
+ /** 403 phone_required (migration 077). */
719
+ errorPhoneRequired: string;
720
+ /** 403 approval_required — also the wrapper's waiting notice. */
721
+ awaitingApproval: string;
722
+ awaitingApprovalTitle: string;
723
+ /** 426 client_outdated: TPK in this build is below the server's minimum.
724
+ * Same text as the Flutter SDK. */
725
+ clientOutdated: (yours: string, min: string) => string;
726
+ errorFailed: string;
727
+ errorAttachmentLimit: (max: number) => string;
728
+ errorAttachmentSize: (maxMB: number) => string;
729
+ errorNoCaptureRef: string;
730
+ errorNeedsViewShot: string;
731
+ errorScreenshotFailed: string;
732
+ errorNeedsImagePicker: string;
733
+ errorImageNoData: string;
734
+ errorImagePickFailed: string;
735
+ errorNeedsDocumentPicker: string;
736
+ errorFileUnreadable: string;
737
+ errorFilePickFailed: string;
738
+ }
739
+ declare const TPK_STRINGS: Record<TpkLanguage, TpkStrings>;
740
+
741
+ /** One text in both languages. */
742
+ interface PersonaText {
743
+ de?: string | null;
744
+ en?: string | null;
745
+ }
746
+ /** A persona as the server sends it. */
747
+ interface PersonaOption {
748
+ id: string;
749
+ /** The project's own persona (vs. a template). */
750
+ own?: boolean;
751
+ slug?: string | null;
752
+ title: PersonaText;
753
+ sub?: PersonaText;
754
+ briefing?: PersonaText;
755
+ watch?: {
756
+ de?: string[];
757
+ en?: string[];
758
+ };
759
+ /** Made-up attributes (age, situation, ...). */
760
+ attributes?: Record<string, unknown>;
761
+ /** The developer suggested it for this project. */
762
+ suggested?: boolean;
763
+ }
764
+ /** Answer of `GET /v1/testers/me/personas`. */
765
+ interface PersonaCatalog {
766
+ /** Chosen persona id; null = the tester tests as themselves. */
767
+ current: string | null;
768
+ persona: PersonaOption | null;
769
+ personas: PersonaOption[];
770
+ }
771
+ /**
772
+ * What the host app sees (test builds only): the made-up role, the title
773
+ * in the device language (German, else English) and its attributes.
774
+ */
775
+ interface TpkPersona {
776
+ id: string;
777
+ title: string;
778
+ attributes: Record<string, unknown>;
779
+ }
780
+
594
781
  interface TpkExpoConfig {
595
782
  /** Project UUID — bootstrap via `tpk project create` first. */
596
783
  projectId: string;
@@ -925,6 +1112,29 @@ declare class TpkExpo {
925
1112
  /** Startup: a cached confirmation shows the widget before the network. */
926
1113
  private accessFromCache;
927
1114
  private setAccess;
1115
+ private personaStore;
1116
+ private get personas();
1117
+ /**
1118
+ * The made-up role the tester chose for this test (id, title in the
1119
+ * device language, attributes), so the app can prepare matching test
1120
+ * data. `null` when the tester tests as themselves, before the role is
1121
+ * known, and always in a `store` build. Never real data of the tester.
1122
+ */
1123
+ get persona(): TpkPersona | null;
1124
+ /** Called whenever [persona] may have changed. Returns the unsubscribe. */
1125
+ onPersonaChange(listener: () => void): () => void;
1126
+ /**
1127
+ * Loads the roles to choose from and the current choice (also updates
1128
+ * [persona]). `null` when there is nothing to show: the tester is not in
1129
+ * the project yet (404), offline, or this is a `store` build (nothing is
1130
+ * sent there). Never throws.
1131
+ */
1132
+ loadPersonas(): Promise<PersonaCatalog | null>;
1133
+ /**
1134
+ * Chooses the role for the next sessions and reports (`null` = "Myself").
1135
+ * Throws when the server cannot be reached.
1136
+ */
1137
+ choosePersona(personaId: string | null): Promise<void>;
928
1138
  /**
929
1139
  * Starts the confirmation in the TPK app (decision 2026-11-10, replaces
930
1140
  * the SMS code): a short-lived link for this install. Open `appUrl`
@@ -1207,100 +1417,33 @@ declare function hasScreenshotConsent(storage: OnboardingStorage): Promise<boole
1207
1417
  declare function resetOnboardingState(storage: OnboardingStorage): Promise<void>;
1208
1418
 
1209
1419
  interface FloatingFeedbackButtonProps {
1210
- /** Tap "Report Bug". Required — this is the primary action. */
1211
- onReportBug: () => void;
1212
- /** Tap "Feedback". Required — general (non-bug) tester feedback. */
1213
- onGeneralFeedback: () => void;
1214
- /** Since 2.3.0 (voice first): "Report in detail", the step-by-step form,
1215
- * as the last row before "End session". Hosts set it when "Report Bug"
1216
- * opens the voice sheet. Hidden when omitted. */
1217
- onDetailedReport?: () => void;
1218
- /** Tap "My Workboard" — opens the TesterDashboard. Hidden when omitted
1219
- * (the wrapper omits it unless the host enabled the dashboard). */
1220
- onViewDashboard?: () => void;
1221
- /** Tap "Mein Geld" — the money overview. Hidden when omitted. */
1222
- onShowMyMoney?: () => void;
1223
- /** The tester's handle, shown as "Du bist …" at the top of the menu. */
1224
- testerHandle?: string | null;
1225
- /** Called after the first-tap tour (if any) on a tap that would open
1226
- * the menu. Returns true when it took the tap (the daily briefing is
1227
- * showing; it calls `openMenu` on "Los geht's"). A throw never blocks
1228
- * the menu. */
1229
- onDailyBriefing?: (openMenu: () => void) => Promise<boolean>;
1230
- /** The first-tap tour takes this tap (no briefing on top of it today). */
1420
+ /** A tap on the FAB (after the first tour and the daily briefing):
1421
+ * opens the report sheet. Required. */
1422
+ onOpen: () => void;
1423
+ /** Called after the first tour (if any) on a tap that would open the
1424
+ * sheet. Returns true when it took the tap (the daily briefing is
1425
+ * showing; it calls `openSheet` on "Los geht's"). A throw never blocks
1426
+ * the sheet. */
1427
+ onDailyBriefing?: (openSheet: () => void) => Promise<boolean>;
1428
+ /** The first tour takes this tap (no briefing on top of it today). */
1231
1429
  onTourShown?: () => void;
1232
- /** The menu opened (refresh counts, checklist). */
1233
- onMenuOpened?: () => void;
1234
- /** Tap "End Session" — typically opens SessionEndDialog. */
1235
- onEndSession: () => void;
1236
- /** Tap "My Retests". When omitted, the row is hidden. */
1237
- onShowRetests?: () => void;
1238
- /** Badge next to "My Retests". */
1239
- retestCount?: number;
1240
- /** Tap "Debug Logs" — typically opens a TpkTalker history viewer. */
1241
- onShowDebugLogs?: () => void;
1242
- /** Tap "My Bugs" — opens the MyBugsSheet (this tester's submitted bugs +
1243
- * current status). When omitted, the row is hidden. */
1244
- onShowMyBugs?: () => void;
1245
- /** Tap "Session Details" — opens the SessionDetailsSheet (taps, screens,
1246
- * buffered activity diagnostics). When omitted, hidden. */
1247
- onShowSessionDetails?: () => void;
1248
- /** Tap "Nachrichten" — opens the NotificationsSheet (server-pull inbox).
1249
- * When omitted, the row is hidden. */
1250
- onShowMessages?: () => void;
1251
- /** Unread-notification count shown next to "Nachrichten" and as a
1252
- * yellow badge on the FAB itself (distinct from `notificationCount`,
1253
- * which is the cached-crash count). */
1430
+ /** Unread-notification count shown as a yellow badge on the FAB. */
1254
1431
  unreadMessageCount?: number;
1255
- /** Tap "🤖 Auto Test (AI)" — opens the AI-tester surface that lets
1256
- * a server-side LLM drive the app for the next N actions. When
1257
- * omitted, the row is hidden. See `AiRemoteControl` for the
1258
- * receiver-side wiring. */
1259
- onAutoTest?: () => void;
1260
- /** Tap "What to test" — the project's checklist (ChecklistPanel).
1261
- * Hidden when omitted (the wrapper omits it while the checklist is
1262
- * empty). */
1263
- onShowChecklist?: () => void;
1264
- /** Tasks the tester has not passed yet — shown next to the label. */
1265
- checklistCount?: number;
1266
- /** "Send to Claude": one line plus the current screen, read by the
1267
- * developer's Claude Code session (`list_device_notes`). Hidden when
1268
- * omitted. */
1269
- onSendToClaude?: () => void;
1270
- /** Switches the live link to the developer's Claude Code session on
1271
- * or off (MCP `device_snapshot`). Hidden when omitted. */
1272
- onToggleLiveLink?: () => void;
1273
- /** Whether the live link is open — flips the toggle's label. */
1274
- liveLinkConnected?: boolean;
1275
- /** Long-press the FAB — opens the Voice-AI bug-narration flow.
1276
- * When omitted, long-press is a no-op. */
1277
- onLongPressVoiceBug?: () => void | Promise<void>;
1278
- /** Action behind "Send N cached crashes". Returns the count
1279
- * actually submitted. Row is hidden when omitted OR when
1280
- * notificationCount is 0. */
1281
- onFlushCachedCrashes?: () => Promise<number> | number;
1282
- /** Notification badge value (top-right of the FAB) + the
1283
- * "Send N cached crashes" row count. */
1432
+ /** Cached-crash count, shown as a badge bottom-right. */
1284
1433
  notificationCount?: number;
1434
+ /** Title of the chosen made-up role. Shows "Du testest als <title>
1435
+ * (gespielt)" next to the button; nothing when null/omitted. */
1436
+ personaTitle?: string | null;
1285
1437
  /** Initial position of the FAB itself (top-left corner of the 56×56
1286
- * button). Default (16, 100). The user can drag it. The menu opens
1287
- * downward when the FAB sits in the upper half of the window and
1288
- * upward when it sits in the lower half, so a bottom-anchored FAB
1289
- * (e.g. above a host tab dock) never pushes the menu off-screen. */
1438
+ * button). Default (16, 100). The user can drag it. */
1290
1439
  position?: {
1291
1440
  x: number;
1292
1441
  y: number;
1293
1442
  };
1294
- /** Confirmed server balance only (the ledger). Omit when no verified
1295
- * balance is available. There are no local estimates. */
1296
- confirmedEarnings?: {
1297
- amountCents: number;
1298
- currency: string;
1299
- };
1300
1443
  /** Outer style override. */
1301
1444
  style?: StyleProp<ViewStyle>;
1302
1445
  testID?: string;
1303
- /** Show the one-time, first-tap onboarding tour. Default true.
1446
+ /** Show the one-time onboarding tour on the first tap. Default true.
1304
1447
  * Set false to disable the tour entirely (e.g. in tests / demos). */
1305
1448
  enableFirstTapTour?: boolean;
1306
1449
  /** Storage adapter for the tour's "seen" flag. Optional — when
@@ -1309,7 +1452,93 @@ interface FloatingFeedbackButtonProps {
1309
1452
  * wiring. A failed/absent storage degrades gracefully. */
1310
1453
  tourStorage?: OnboardingStorage;
1311
1454
  }
1312
- declare function FloatingFeedbackButton({ onReportBug, onDetailedReport, onGeneralFeedback, onViewDashboard, onShowMyMoney, testerHandle, onDailyBriefing, onTourShown, onMenuOpened, onEndSession, onShowRetests, retestCount, onShowDebugLogs, onShowMyBugs, onShowSessionDetails, onShowMessages, unreadMessageCount, onAutoTest, onShowChecklist, checklistCount, onSendToClaude, onToggleLiveLink, liveLinkConnected, onLongPressVoiceBug, onFlushCachedCrashes, notificationCount, position, confirmedEarnings, style, testID, enableFirstTapTour, tourStorage, }: FloatingFeedbackButtonProps): React.ReactElement;
1455
+ declare function FloatingFeedbackButton({ onOpen, onDailyBriefing, onTourShown, unreadMessageCount, notificationCount, personaTitle, position, style, testID, enableFirstTapTour, tourStorage, }: FloatingFeedbackButtonProps): React.ReactElement;
1456
+
1457
+ type MaterialIconName = string;
1458
+ /**
1459
+ * Semantic icon names used by the SDK. Map to MaterialIcons glyph
1460
+ * names by default; consumers can override via TpkIconsContext.
1461
+ */
1462
+ type TpkIconName = 'bug_report' | 'feedback' | 'dashboard' | 'session_end' | 'voice' | 'voice_off' | 'close' | 'check' | 'star_filled' | 'star_outline' | 'camera' | 'image' | 'attachment' | 'music_note' | 'language' | 'rocket' | 'lightbulb' | 'trend_up' | 'frown' | 'smile' | 'palette' | 'speed_slow' | 'crash' | 'sparkle' | 'cloud_upload' | 'refresh' | 'edit_pen' | 'shape_rect' | 'shape_circle' | 'shape_arrow' | 'text' | 'blur' | 'link' | 'link_off' | 'send' | 'person' | 'money' | 'menu';
1463
+ type TpkIconOverrideMap = Partial<Record<TpkIconName, MaterialIconName>>;
1464
+ declare function TpkIconsProvider({ icons, children, }: {
1465
+ icons: TpkIconOverrideMap;
1466
+ children: ReactNode;
1467
+ }): React.JSX.Element;
1468
+ interface TpkIconProps {
1469
+ name: TpkIconName;
1470
+ size?: number;
1471
+ color?: string;
1472
+ style?: TextStyle;
1473
+ }
1474
+ declare function TpkIcon({ name, size, color, style, }: TpkIconProps): React.ReactElement;
1475
+
1476
+ /** One entry of the "Alles" list. `onTap` runs after the sheet closed. */
1477
+ interface SheetOption {
1478
+ key: string;
1479
+ icon: TpkIconName;
1480
+ label: string;
1481
+ color: string;
1482
+ onTap: () => void;
1483
+ }
1484
+ /** One tile of the bottom bar. The last one (`all`) has no `onTap`: it
1485
+ * switches the sheet to the list. */
1486
+ interface SheetTile {
1487
+ id: 'checklist' | 'retests' | 'bugs' | 'messages' | 'all';
1488
+ icon: TpkIconName;
1489
+ color: string;
1490
+ label: string;
1491
+ badge: number;
1492
+ onTap?: () => void;
1493
+ }
1494
+ interface SheetMore {
1495
+ tiles: SheetTile[];
1496
+ backLabel: string;
1497
+ header: {
1498
+ handle?: string;
1499
+ persona?: string;
1500
+ earnings?: {
1501
+ label: string;
1502
+ amount: string;
1503
+ };
1504
+ };
1505
+ options: SheetOption[];
1506
+ }
1507
+ interface SheetMoreInput {
1508
+ S: TpkStrings;
1509
+ language: TpkLanguage;
1510
+ testerHandle?: string | null;
1511
+ personaTitle?: string | null;
1512
+ confirmedEarnings?: {
1513
+ amountCents: number;
1514
+ currency: string;
1515
+ };
1516
+ /** The checklist has tasks: first tile is "Was testen?", else "Nachtests". */
1517
+ hasChecklist: boolean;
1518
+ checklistCount: number;
1519
+ retestCount: number;
1520
+ unreadMessageCount: number;
1521
+ notificationCount: number;
1522
+ liveLinkConnected: boolean;
1523
+ onReportBug: () => void;
1524
+ onDetailedReport?: () => void;
1525
+ onGeneralFeedback: () => void;
1526
+ onShowChecklist?: () => void;
1527
+ onShowPersona?: () => void;
1528
+ onSendToClaude?: () => void;
1529
+ onToggleLiveLink?: () => void;
1530
+ onAutoTest?: () => void;
1531
+ onFlushCachedCrashes?: () => Promise<number> | number;
1532
+ onViewDashboard?: () => void;
1533
+ onShowMyMoney?: () => void;
1534
+ onShowMyBugs?: () => void;
1535
+ onShowSessionDetails?: () => void;
1536
+ onShowMessages?: () => void;
1537
+ onShowRetests?: () => void;
1538
+ onShowDebugLogs?: () => void;
1539
+ onEndSession: () => void;
1540
+ }
1541
+ declare function buildSheetMore(i: SheetMoreInput): SheetMore;
1313
1542
 
1314
1543
  type AttachmentKind = 'screenshot' | 'image' | 'video' | 'audio' | 'screen-recording' | 'log' | 'json' | 'other';
1315
1544
  interface BugReportAttachmentDraft {
@@ -1774,143 +2003,6 @@ interface TpkWelcomeSheetProps {
1774
2003
  }
1775
2004
  declare function TpkWelcomeSheet({ visible, brief, productName, onStart, onLater, style, testID, }: TpkWelcomeSheetProps): React.ReactElement;
1776
2005
 
1777
- type TpkLanguage = 'de' | 'en';
1778
- /** The device's UI language, reduced to `de` / `en`. */
1779
- declare function detectDeviceLanguage(): TpkLanguage;
1780
- /** Pins the UI language for every TPK surface below it. `undefined`
1781
- * keeps device detection. */
1782
- declare function TpkLanguageProvider({ language, children, }: {
1783
- language?: TpkLanguage;
1784
- children: ReactNode;
1785
- }): React.JSX.Element;
1786
- declare function useTpkLanguage(): TpkLanguage;
1787
- declare function useTpkStrings(): TpkStrings;
1788
- /** Money in the tester's language: "1,00 €" in German, "€1.00" in
1789
- * English. `currency` is an ISO-4217 code (EUR, USD, GBP …). */
1790
- declare function formatTpkMoney(amount: number, currency: string, language: TpkLanguage): string;
1791
- /** Picks the text for the active language: `tr({ en: '…', de: '…' })`.
1792
- * For surfaces with a handful of texts; big surfaces use TPK_STRINGS. */
1793
- declare function useTr(): (texts: {
1794
- en: string;
1795
- de: string;
1796
- }) => string;
1797
- interface TpkStrings {
1798
- menuReportBug: string;
1799
- menuDetailedReport: string;
1800
- menuFeedback: string;
1801
- menuAutoTest: string;
1802
- menuChecklist: string;
1803
- menuSendToClaude: string;
1804
- menuConnectClaude: string;
1805
- menuDisconnectClaude: string;
1806
- menuCachedCrashes: (count: number) => string;
1807
- menuWorkboard: string;
1808
- menuMyBugs: string;
1809
- menuSessionDetails: string;
1810
- menuMessages: string;
1811
- menuRetests: string;
1812
- menuDebugLogs: string;
1813
- menuEndSession: string;
1814
- menuSessionEarnings: string;
1815
- menuMyMoney: string;
1816
- menuYouAre: (handle: string) => string;
1817
- unreadBadgeA11y: (count: number) => string;
1818
- verifyOfflineTitle: string;
1819
- verifyOffline: string;
1820
- verifiedNow: string;
1821
- menuOpen: string;
1822
- menuClose: string;
1823
- reportTitle: string;
1824
- reportClose: string;
1825
- reportSpeak: string;
1826
- stepTitles: readonly [string, string, string, string, string];
1827
- cancel: string;
1828
- back: string;
1829
- continue: string;
1830
- submit: string;
1831
- typeBug: string;
1832
- typeBugDescription: string;
1833
- typeCrash: string;
1834
- typeCrashDescription: string;
1835
- typeUiIssue: string;
1836
- typeUiIssueDescription: string;
1837
- typePerformance: string;
1838
- typePerformanceDescription: string;
1839
- typeFeature: string;
1840
- typeFeatureDescription: string;
1841
- typeFeedback: string;
1842
- typeFeedbackDescription: string;
1843
- severityCritical: string;
1844
- severityCriticalDescription: string;
1845
- severityHigh: string;
1846
- severityHighDescription: string;
1847
- severityMedium: string;
1848
- severityMediumDescription: string;
1849
- severityLow: string;
1850
- severityLowDescription: string;
1851
- frequencyAlways: string;
1852
- frequencyOften: string;
1853
- frequencySometimes: string;
1854
- frequencyOnce: string;
1855
- fieldTitle: string;
1856
- fieldTitlePlaceholder: string;
1857
- fieldDescription: string;
1858
- fieldDescriptionPlaceholder: string;
1859
- fieldExpected: string;
1860
- fieldExpectedPlaceholder: string;
1861
- fieldActual: string;
1862
- fieldActualPlaceholder: string;
1863
- fieldFrequency: string;
1864
- fieldComponent: string;
1865
- fieldComponentPlaceholder: string;
1866
- attachments: string;
1867
- attachScreenshot: string;
1868
- attachImage: string;
1869
- attachFile: string;
1870
- attachA11y: (label: string) => string;
1871
- removeA11y: (name: string) => string;
1872
- stepsAdd: string;
1873
- stepsPlaceholder: string;
1874
- stepsAddA11y: string;
1875
- stepsEmpty: string;
1876
- stepsReorderHint: string;
1877
- stepsDragA11y: (n: number) => string;
1878
- stepsRemoveA11y: (n: number) => string;
1879
- reviewType: string;
1880
- reviewSeverity: string;
1881
- reviewTitle: string;
1882
- reviewDescription: string;
1883
- reviewExpected: string;
1884
- reviewActual: string;
1885
- reviewFrequency: string;
1886
- reviewComponent: string;
1887
- reviewSteps: string;
1888
- reviewAttachments: string;
1889
- reviewEmpty: string;
1890
- errorRejected: string;
1891
- /** 403 phone_required (migration 077). */
1892
- errorPhoneRequired: string;
1893
- /** 403 approval_required — also the wrapper's waiting notice. */
1894
- awaitingApproval: string;
1895
- awaitingApprovalTitle: string;
1896
- /** 426 client_outdated: TPK in this build is below the server's minimum.
1897
- * Same text as the Flutter SDK. */
1898
- clientOutdated: (yours: string, min: string) => string;
1899
- errorFailed: string;
1900
- errorAttachmentLimit: (max: number) => string;
1901
- errorAttachmentSize: (maxMB: number) => string;
1902
- errorNoCaptureRef: string;
1903
- errorNeedsViewShot: string;
1904
- errorScreenshotFailed: string;
1905
- errorNeedsImagePicker: string;
1906
- errorImageNoData: string;
1907
- errorImagePickFailed: string;
1908
- errorNeedsDocumentPicker: string;
1909
- errorFileUnreadable: string;
1910
- errorFilePickFailed: string;
1911
- }
1912
- declare const TPK_STRINGS: Record<TpkLanguage, TpkStrings>;
1913
-
1914
2006
  /** What the server knows about the store versions of this app. */
1915
2007
  interface TpkVersionNotice {
1916
2008
  /** The version this app runs, as the server understood it. */
@@ -2183,24 +2275,30 @@ interface PhoneConfirmSheetProps {
2183
2275
  }
2184
2276
  declare function PhoneConfirmSheet({ visible, tpk, onDone, onCancel, }: PhoneConfirmSheetProps): React.ReactElement;
2185
2277
 
2186
- type MaterialIconName = string;
2278
+ interface PersonaFlowProps {
2279
+ visible: boolean;
2280
+ /** The loaded roles; the flow stays closed while this is null. */
2281
+ catalog: PersonaCatalog | null;
2282
+ /** The tester's handle for the "Connected as" line; omitted when unknown. */
2283
+ handle?: string | null;
2284
+ /** Saves the choice (`null` = "Myself"). May throw when offline. */
2285
+ onChoose: (personaId: string | null) => Promise<void>;
2286
+ /** Closed: after "Let's go" or "Next" on "Myself", or dismissed. */
2287
+ onClose: () => void;
2288
+ }
2289
+ declare function PersonaFlow({ visible, catalog, handle, onChoose, onClose, }: PersonaFlowProps): React.ReactElement;
2290
+
2187
2291
  /**
2188
- * Semantic icon names used by the SDK. Map to MaterialIcons glyph
2189
- * names by default; consumers can override via TpkIconsContext.
2292
+ * The made-up role the tester chose (id, title in the device language,
2293
+ * attributes) and re-renders when it changes. `null` without a client (a
2294
+ * `store` build never has one), while the tester tests as themselves, and
2295
+ * before the role is known. Use it to prepare matching test data; never
2296
+ * real data of the tester.
2297
+ *
2298
+ * const { client } = useTesterPayKit();
2299
+ * const persona = useTpkPersona(client);
2190
2300
  */
2191
- type TpkIconName = 'bug_report' | 'feedback' | 'dashboard' | 'session_end' | 'voice' | 'voice_off' | 'close' | 'check' | 'star_filled' | 'star_outline' | 'camera' | 'image' | 'attachment' | 'music_note' | 'language' | 'rocket' | 'lightbulb' | 'trend_up' | 'frown' | 'smile' | 'palette' | 'speed_slow' | 'crash' | 'sparkle' | 'cloud_upload' | 'refresh' | 'edit_pen' | 'shape_rect' | 'shape_circle' | 'shape_arrow' | 'text' | 'blur' | 'link' | 'link_off' | 'send' | 'person' | 'money';
2192
- type TpkIconOverrideMap = Partial<Record<TpkIconName, MaterialIconName>>;
2193
- declare function TpkIconsProvider({ icons, children, }: {
2194
- icons: TpkIconOverrideMap;
2195
- children: ReactNode;
2196
- }): React.JSX.Element;
2197
- interface TpkIconProps {
2198
- name: TpkIconName;
2199
- size?: number;
2200
- color?: string;
2201
- style?: TextStyle;
2202
- }
2203
- declare function TpkIcon({ name, size, color, style, }: TpkIconProps): React.ReactElement;
2301
+ declare function useTpkPersona(client: TpkExpo | null | undefined): TpkPersona | null;
2204
2302
 
2205
2303
  interface RetestSheetProps {
2206
2304
  visible: boolean;
@@ -2395,6 +2493,9 @@ interface VoiceBugStrings {
2395
2493
  quickNoScreenshot?: string;
2396
2494
  back?: string;
2397
2495
  typeInstead?: string;
2496
+ formHeadline?: string;
2497
+ formDescription?: string;
2498
+ writeReport?: string;
2398
2499
  }
2399
2500
  interface VoiceBugInputSheetProps {
2400
2501
  visible: boolean;
@@ -2410,15 +2511,10 @@ interface VoiceBugInputSheetProps {
2410
2511
  * (bug-red). Hosts that want a brand-tint can override. */
2411
2512
  accentColor?: string;
2412
2513
  /**
2413
- * Opacity of the backdrop + sheet, together, on a 0..1 scale.
2414
- * Default `0.82` (since 0.9.3) — the screen behind stays faintly
2415
- * visible while the text stays readable on light apps; `1` makes
2416
- * it fully opaque as before. A tester describing a bug describes what's on the
2417
- * screen behind this sheet; at `1` that screen is completely
2418
- * hidden while they're doing it. Lower values (e.g. `0.35`, close
2419
- * to the ~30% overall coverage a host asked for) keep both layers
2420
- * translucent together so the failing screen stays legible.
2421
- * (umkreis finding #2, 2026-08-06.)
2514
+ * Opacity of the scrim behind the sheet, on a 0..1 scale (default
2515
+ * `0.82`). Since 2.3.0 the sheet itself is always solid except while
2516
+ * recording (host text showed through the title otherwise, issue #5);
2517
+ * while recording the scrim is almost clear anyway.
2422
2518
  */
2423
2519
  sheetOpacity?: number;
2424
2520
  /**
@@ -2452,10 +2548,21 @@ interface VoiceBugInputSheetProps {
2452
2548
  * opens its written report, usually BugReportSheet at the details step.
2453
2549
  */
2454
2550
  onTypeInstead?: () => void;
2551
+ /**
2552
+ * Since 2.3.0 (`reportMode: 'form'`): the big button writes instead of
2553
+ * recording (it calls `onTypeInstead`) and "Type instead" is hidden.
2554
+ */
2555
+ formFirst?: boolean;
2556
+ /**
2557
+ * Since 2.3.0 (issue #5): the bottom bar and the "All" list. A tap on a
2558
+ * tile or list entry closes the sheet first and runs the action after
2559
+ * the close (React Native cannot stack modals).
2560
+ */
2561
+ more?: SheetMore;
2455
2562
  style?: StyleProp<ViewStyle>;
2456
2563
  testID?: string;
2457
2564
  }
2458
- declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, captureScreen, currentScreen, reporterHandle, onTypeInstead, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
2565
+ declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, captureScreen, currentScreen, reporterHandle, onTypeInstead, formFirst, more, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
2459
2566
  /** Maps the sheet's classification onto the BugReportSheet's
2460
2567
  * BugReportType union. Exported so the host can call it when
2461
2568
  * building the initialDraft for the bug sheet. */
@@ -3136,5 +3243,5 @@ declare function useTpkEarnings(tpk: TpkExpo | null, options?: {
3136
3243
  payoutLimit?: number;
3137
3244
  }): UseEarningsResult;
3138
3245
 
3139
- export { ANNOTATION_PALETTE, AttachmentQueue, Breadcrumbs, BugReportSheet, ChecklistPanel, CompensationClient, CrashQueue, DEFAULT_STYLE, DEFAULT_TPK_THEME, DENY_LABEL_PATTERNS, ExpoStorage, FloatingFeedbackButton, GeneralFeedbackDialog, INTERACTION_NAV_WEIGHT, InviteCodeScreen, LiveNoteDialog, MIN_INTERACTIONS_PER_ACTIVE_MINUTE, MoneyOverview, MyBugsSheet, NotificationsSheet, ONBOARDING_DONE_STORAGE_KEY, PhoneConfirmSheet, RetestSheet, SCREENSHOT_CONSENT_STORAGE_KEY, ScreenRecorder, ScreenshotAnnotationEditor, SessionDetailsSheet, SessionEndDialog, SubmitQueue, TPK_CLIENT_ID, TPK_STRINGS, TPK_VERSION_NOTICE_DEFAULT_API_BASE_URL, TPK_VERSION_NOTICE_DISMISSED_KEY, TPK_VERSION_NOTICE_SEEN_KEY, TaskAnnotationRegistry, TesterDashboard, TesterPayKitProvider, TesterPayKitWrapper, TpkAnnotated, TpkAnnotationOverlay, TpkExpo, TpkIcon, TpkIconsProvider, TpkLanguageProvider, TpkLiveLink, TpkOnboarding, TpkSensitive, TpkTalker, TpkThemeProvider, TpkVersionCheck, TpkWelcomeSheet, TpkWhatsNewSheet, VoiceBugInputSheet, VoiceNoteRecorder, WELCOME_ACK_STORAGE_KEY, WIDGET_TOUR_SEEN_STORAGE_KEY, WidgetDiscovery, WidgetTour, annotations, applySensitiveRedaction, arrowHeadPoints, beginNativeCapture, bugSeverityLabel, bugStatusStyle, canSubmitBugReportDraft, captureLiveSnapshot, captureView, classificationToBugType, clientOutdatedText, createBugReportDraft, createCompensationPushAdapter, decideVersionNotice, deriveTaskProgress, detectDeviceLanguage, dismissVersionUpdate, emptyAnnotationDoc, endNativeCapture, engagedMinutes, extractVoiceBug, fetchVersionNotice, findAssignmentForTask, formatTpkMoney, getAppSnapshot, getBuildChannel, getClientOutdated, getDeviceSnapshot, getEventCounts, getNativeCaptureMode, getSessionStats, getUniqueScreens, hasCompletedOnboarding, hasScreenshotConsent, hasSeenWidgetTour, hasWelcomeBriefBeenSeen, installCrashHandler, installNetworkCapture, loadChecklist, markOnboardingComplete, markWelcomeBriefAsSeen, markWidgetTourSeen, onClientOutdated, parseLiveAction, parseVersionNotice, parseVersionRange, pathToSvgD, playMoneyLabel, quickDraftBug, readLiveState, readScreenTexts, resetOnboardingState, resetWelcomeBriefAck, resetWidgetTourSeen, runLiveAction, simplifyPath, submitBugReportDraft, subscribeNativeCaptureMode, toStepResults, tpkStorePlatform, uploadScreenshotAttachment, useShake, useTaskAnnotation, useTesterPayKit, useTpkClientOutdated, useTpkDashboard, useTpkEarnings, useTpkLanguage, useTpkStrings, useTpkTheme, useTr, versionSatisfies, widgetDiscovery, withNativeCapture, workSeconds };
3140
- export type { AnnotatedElementInfo, AnnotatedScreenshotResult, AnnotationColor, AnnotationEvent, AnnotationEventType, AnnotationInteraction, AnnotationListener, AnnotationShape, AnnotationStyle, AnnotationTool, AppSnapshot, ArrowShape, AttachmentQueueFlushOptions, BlurShape, Breadcrumb, BugFix, BugReportDraft, BugReportSheetProps, BuildInfo, CachedCrash, CaptureViewOptions, ChecklistPanelProps, CircleShape, CompensationPushAdapter, CompletionTrigger, CrashHandlerOptions, CrashInfo, CreateBugReportDraftInput, DashboardData, DeviceSnapshot, DiscoverOptions, EarningsData, EngagedMinutesInput, ExpoNotificationsPort, FeedbackCategory, FetchVersionNoticeOptions, FloatingFeedbackButtonProps, FlushTelemetryResult, FocusArea, GeneralFeedbackDialogProps, InstallNetworkCaptureOptions, InteractionBounds, InteractionType, InviteCodeScreenProps, LiveAction, LiveActionEnv, LiveActionResult, LiveLinkStatus, LiveNoteDialogProps, LiveSnapshotSource, LiveSocket, MoneyOverviewProps, MyBugsSheetProps, NotificationsSheetProps, OnboardingStorage, PathShape, PeriodFilter, PhoneConfirmSheetProps, Point, QueueFlushOptions, QueueFlushResult, QuickActionKind, RecordInteractionDetails, RecordingOptions, RecordingResult, RecordingState, RectShape, RegisterAnnotationInput, ReleaseNote, RetestSheetProps, ScreenText, ScreenshotAnnotationEditorProps, ScreenshotResult, SensitiveMaskingMode, SessionDetailsSheetProps, SessionEndDialogProps, SessionEndStats, SessionStatsSnapshot, StatusStyle, StepDraft, SubmitBugInput, SubmitBugOutcome, SubmitBugResult, TaskAnnotation, TaskInteractionSummary, TaskProgress, TesterDashboardProps, TesterPayKitContextValue, TesterPayKitProviderProps, TesterPayKitWrapperProps, TextShape, TpkAccess, TpkAnnotatedProps, TpkAnnotationOverlayHandle, TpkAnnotationOverlayProps, TpkBuildChannel, TpkClientOutdated, TpkExpoConfig, TpkIconName, TpkIconOverrideMap, TpkIconProps, TpkLanguage, TpkLiveLinkOptions, TpkLogEntry, TpkLogLevel, TpkOnboardingProps, TpkSensitiveProps, TpkStorage, TpkStorePlatform, TpkStrings, TpkTalkerListener, TpkTalkerOptions, TpkTheme, TpkVersionCheckProps, TpkVersionNotice, TpkVersionNoticeKind, TpkWelcomeSheetProps, TpkWhatsNewSheetProps, UseDashboardResult, UseEarningsResult, UseShakeOptions, UseTaskAnnotationOptions, UseTaskAnnotationResult, VersionRange, VoiceBugInputSheetProps, VoiceBugStrings, VoiceClassification, VoiceExtractAudio, VoiceExtractResult, VoiceNoteFileReader, VoiceNoteRecorderLike, VoiceNoteRecorderOptions, VoiceNoteResult, VoiceNoteState, WelcomeAckStorage, WelcomeBrief, WelcomeTask, WidgetInfo, WidgetTourProps };
3246
+ export { ANNOTATION_PALETTE, AttachmentQueue, Breadcrumbs, BugReportSheet, ChecklistPanel, CompensationClient, CrashQueue, DEFAULT_STYLE, DEFAULT_TPK_THEME, DENY_LABEL_PATTERNS, ExpoStorage, FloatingFeedbackButton, GeneralFeedbackDialog, INTERACTION_NAV_WEIGHT, InviteCodeScreen, LiveNoteDialog, MIN_INTERACTIONS_PER_ACTIVE_MINUTE, MoneyOverview, MyBugsSheet, NotificationsSheet, ONBOARDING_DONE_STORAGE_KEY, PersonaFlow, PhoneConfirmSheet, RetestSheet, SCREENSHOT_CONSENT_STORAGE_KEY, ScreenRecorder, ScreenshotAnnotationEditor, SessionDetailsSheet, SessionEndDialog, SubmitQueue, TPK_CLIENT_ID, TPK_STRINGS, TPK_VERSION_NOTICE_DEFAULT_API_BASE_URL, TPK_VERSION_NOTICE_DISMISSED_KEY, TPK_VERSION_NOTICE_SEEN_KEY, TaskAnnotationRegistry, TesterDashboard, TesterPayKitProvider, TesterPayKitWrapper, TpkAnnotated, TpkAnnotationOverlay, TpkExpo, TpkIcon, TpkIconsProvider, TpkLanguageProvider, TpkLiveLink, TpkOnboarding, TpkSensitive, TpkTalker, TpkThemeProvider, TpkVersionCheck, TpkWelcomeSheet, TpkWhatsNewSheet, VoiceBugInputSheet, VoiceNoteRecorder, WELCOME_ACK_STORAGE_KEY, WIDGET_TOUR_SEEN_STORAGE_KEY, WidgetDiscovery, WidgetTour, annotations, applySensitiveRedaction, arrowHeadPoints, beginNativeCapture, bugSeverityLabel, bugStatusStyle, buildSheetMore, canSubmitBugReportDraft, captureLiveSnapshot, captureView, classificationToBugType, clientOutdatedText, createBugReportDraft, createCompensationPushAdapter, decideVersionNotice, deriveTaskProgress, detectDeviceLanguage, dismissVersionUpdate, emptyAnnotationDoc, endNativeCapture, engagedMinutes, extractVoiceBug, fetchVersionNotice, findAssignmentForTask, formatTpkMoney, getAppSnapshot, getBuildChannel, getClientOutdated, getDeviceSnapshot, getEventCounts, getNativeCaptureMode, getSessionStats, getUniqueScreens, hasCompletedOnboarding, hasScreenshotConsent, hasSeenWidgetTour, hasWelcomeBriefBeenSeen, installCrashHandler, installNetworkCapture, loadChecklist, markOnboardingComplete, markWelcomeBriefAsSeen, markWidgetTourSeen, onClientOutdated, parseLiveAction, parseVersionNotice, parseVersionRange, pathToSvgD, playMoneyLabel, quickDraftBug, readLiveState, readScreenTexts, resetOnboardingState, resetWelcomeBriefAck, resetWidgetTourSeen, runLiveAction, simplifyPath, submitBugReportDraft, subscribeNativeCaptureMode, toStepResults, tpkStorePlatform, uploadScreenshotAttachment, useShake, useTaskAnnotation, useTesterPayKit, useTpkClientOutdated, useTpkDashboard, useTpkEarnings, useTpkLanguage, useTpkPersona, useTpkStrings, useTpkTheme, useTr, versionSatisfies, widgetDiscovery, withNativeCapture, workSeconds };
3247
+ export type { AnnotatedElementInfo, AnnotatedScreenshotResult, AnnotationColor, AnnotationEvent, AnnotationEventType, AnnotationInteraction, AnnotationListener, AnnotationShape, AnnotationStyle, AnnotationTool, AppSnapshot, ArrowShape, AttachmentQueueFlushOptions, BlurShape, Breadcrumb, BugFix, BugReportDraft, BugReportSheetProps, BuildInfo, CachedCrash, CaptureViewOptions, ChecklistPanelProps, CircleShape, CompensationPushAdapter, CompletionTrigger, CrashHandlerOptions, CrashInfo, CreateBugReportDraftInput, DashboardData, DeviceSnapshot, DiscoverOptions, EarningsData, EngagedMinutesInput, ExpoNotificationsPort, FeedbackCategory, FetchVersionNoticeOptions, FloatingFeedbackButtonProps, FlushTelemetryResult, FocusArea, GeneralFeedbackDialogProps, InstallNetworkCaptureOptions, InteractionBounds, InteractionType, InviteCodeScreenProps, LiveAction, LiveActionEnv, LiveActionResult, LiveLinkStatus, LiveNoteDialogProps, LiveSnapshotSource, LiveSocket, MoneyOverviewProps, MyBugsSheetProps, NotificationsSheetProps, OnboardingStorage, PathShape, PeriodFilter, PersonaCatalog, PersonaFlowProps, PersonaOption, PersonaText, PhoneConfirmSheetProps, Point, QueueFlushOptions, QueueFlushResult, QuickActionKind, RecordInteractionDetails, RecordingOptions, RecordingResult, RecordingState, RectShape, RegisterAnnotationInput, ReleaseNote, RetestSheetProps, ScreenText, ScreenshotAnnotationEditorProps, ScreenshotResult, SensitiveMaskingMode, SessionDetailsSheetProps, SessionEndDialogProps, SessionEndStats, SessionStatsSnapshot, SheetMore, SheetMoreInput, StatusStyle, StepDraft, SubmitBugInput, SubmitBugOutcome, SubmitBugResult, TaskAnnotation, TaskInteractionSummary, TaskProgress, TesterDashboardProps, TesterPayKitContextValue, TesterPayKitProviderProps, TesterPayKitWrapperProps, TextShape, TpkAccess, TpkAnnotatedProps, TpkAnnotationOverlayHandle, TpkAnnotationOverlayProps, TpkBuildChannel, TpkClientOutdated, TpkExpoConfig, TpkIconName, TpkIconOverrideMap, TpkIconProps, TpkLanguage, TpkLiveLinkOptions, TpkLogEntry, TpkLogLevel, TpkOnboardingProps, TpkPersona, TpkSensitiveProps, TpkStorage, TpkStorePlatform, TpkStrings, TpkTalkerListener, TpkTalkerOptions, TpkTheme, TpkVersionCheckProps, TpkVersionNotice, TpkVersionNoticeKind, TpkWelcomeSheetProps, TpkWhatsNewSheetProps, UseDashboardResult, UseEarningsResult, UseShakeOptions, UseTaskAnnotationOptions, UseTaskAnnotationResult, VersionRange, VoiceBugInputSheetProps, VoiceBugStrings, VoiceClassification, VoiceExtractAudio, VoiceExtractResult, VoiceNoteFileReader, VoiceNoteRecorderLike, VoiceNoteRecorderOptions, VoiceNoteResult, VoiceNoteState, WelcomeAckStorage, WelcomeBrief, WelcomeTask, WidgetInfo, WidgetTourProps };