@testerpaykit/expo 0.6.1 → 0.7.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
@@ -2,6 +2,77 @@
2
2
 
3
3
  All notable changes to `@testerpaykit/expo` are documented here.
4
4
 
5
+ ## 0.7.0 — 2026-08-06
6
+
7
+ **Three umkreis dogfood findings: a real bug report could be a
8
+ fabrication, the report window hid the bug it described, and the
9
+ language picker never actually did anything.**
10
+
11
+ ### Added
12
+ - `VoiceBugInputSheetProps.sheetOpacity?: number` (default `1`,
13
+ unchanged) — scales the backdrop and sheet alpha together so a host
14
+ can keep the screen behind the sheet legible while a tester records.
15
+ Previously the sheet was fully opaque no matter what.
16
+ - `VoiceBugInputSheetProps.voiceLanguage?: 'auto' | string` — forces
17
+ the Whisper language hint (any ISO-639-1 code, not just `'de'`/
18
+ `'en'`) instead of leaving it to the tester's chip tap. Useful for a
19
+ host whose tester pool speaks one known language.
20
+ - `VoiceExtractResult.transcriptConfidence: number` and
21
+ `.lowConfidence: boolean` — the server's own confidence in the
22
+ Whisper transcript. Below the server's threshold, `title`/
23
+ `description` are the RAW transcript rather than an LLM paraphrase;
24
+ surface this in host UI so a tester (or a coordinator, via the new
25
+ `bug_reports.transcript_confidence` column) can tell a clean
26
+ transcript from a guess.
27
+ - `VoiceExtractResult.detectedLanguage?: string` — Whisper's own
28
+ language guess, present whenever the request sent no explicit hint.
29
+
30
+ ### Changed
31
+ - The sheet's language chip now defaults to the **device locale**
32
+ (best-effort `expo-localization`, peer-optional) instead of always
33
+ starting at `'auto'`. In practice nobody taps a small chip mid-bug-
34
+ report, so `'auto'` was the value every real recording shipped with
35
+ — and Whisper's own auto-detect degrades on short/noisy clips.
36
+ - `VoiceExtractAudio.language` widened from `'de' | 'en'` to `string`
37
+ so a detected device locale or a host's `voiceLanguage` can pass
38
+ through unconstrained.
39
+
40
+ ### Fixed
41
+ - **The language picker chip did nothing.** The client sent
42
+ `{ language: 'de' }`; the server route reads `body['source_language']`
43
+ — so the DE/EN toggle never reached Whisper, even on the rare
44
+ occasion a tester tapped it. Renamed to the field the server
45
+ actually reads.
46
+ - `VoiceExtractResult.sourceLanguage` was only ever set when the
47
+ request carried an explicit language hint — meaning it, and the
48
+ `bug_reports.tester_language` column it feeds, stayed `null` for
49
+ every voice report recorded in `'auto'` mode (which was all of
50
+ them). Now falls back to the server's own `detectedLanguage`.
51
+
52
+ ## 0.6.1 — 2026-07-28
53
+
54
+ **Four umkreis dogfood findings from a real TestFlight integration
55
+ (Expo SDK 57), ordered by severity.**
56
+
57
+ ### Fixed
58
+ - **Bug submission failed silently** without `crypto.getRandomValues`
59
+ — the `uuid` package was gone from the runtime. New `src/uuid.ts`
60
+ generates v4 ids via a graceful chain (`crypto.randomUUID` →
61
+ `crypto.getRandomValues` → `expo-crypto` → seeded `Math.random`);
62
+ the `react-native-get-random-values` polyfill is no longer needed.
63
+ - Voice notes used the dead `expo-av` API. `VoiceBugInputSheet` now
64
+ uses `expo-audio` (`AudioModule.AudioRecorder`, flattened
65
+ `RecordingPresets`); file reads go through new shared
66
+ `fs-legacy.ts` (`expo-file-system/legacy` first, SDK 54's split),
67
+ deduplicating three copies of the same fallback logic.
68
+ - Optional peer dependencies failed silently at the worst moment —
69
+ new `setup-check.ts` logs once at init (dev only) which optional
70
+ modules are missing and which feature each absence turns off.
71
+ - FAB menu ran off-screen on the right half of the display (iPhone
72
+ 17 Pro Max) — the anchor now pins via the horizontal counterpart of
73
+ the existing `openUp` logic, plus a `maxWidth` so labels wrap
74
+ instead of clipping.
75
+
5
76
  ## 0.6.0 — 2026-07-10
6
77
 
7
78
  **Hosts can place the feedback FAB — and it finally sits where you put it.**
package/dist/index.d.mts CHANGED
@@ -1633,11 +1633,17 @@ interface VoiceExtractAudio {
1633
1633
  /** MIME type of the audio. Whisper accepts m4a / aac / wav / mp3 /
1634
1634
  * webm; the server forwards whatever we send. */
1635
1635
  mimeType: string;
1636
- /** Optional ISO-639-1 language hint forwarded to Whisper. When
1637
- * set, transcription skips language detection and treats the
1638
- * audio as the given language — faster + more accurate when the
1639
- * tester knows their own language. Omit to let Whisper detect. */
1640
- language?: 'de' | 'en';
1636
+ /**
1637
+ * Optional ISO-639-1 language hint forwarded to Whisper (any code
1638
+ * Whisper accepts, e.g. `'de'`, `'tr'`, `'ru'` — not just DE/EN;
1639
+ * widened from the original `'de' | 'en'` union so a host's
1640
+ * `voiceLanguage` prop or a detected device locale can pass through
1641
+ * unconstrained). When set, transcription skips language detection
1642
+ * and treats the audio as the given language — faster + more
1643
+ * accurate when the tester's language is known. Omit to let
1644
+ * Whisper detect.
1645
+ */
1646
+ language?: string;
1641
1647
  }
1642
1648
  interface VoiceExtractResult {
1643
1649
  /** Raw Whisper transcript. */
@@ -1649,11 +1655,38 @@ interface VoiceExtractResult {
1649
1655
  /** Server enum — same set the BugReportSheet's Frequency chips use. */
1650
1656
  frequency: 'always' | 'often' | 'sometimes' | 'rarely';
1651
1657
  /**
1652
- * Voice-bug split (A2): ISO-639-1 code the tester spoke in. The
1653
- * server doesn't echo it, so we carry the request hint through —
1654
- * it rides to submit as the O-Ton language label.
1658
+ * Voice-bug split (A2): ISO-639-1 code the tester spoke in. When
1659
+ * the request carried an explicit hint that wins; otherwise this
1660
+ * is the server's OWN Whisper-detected guess (`detectedLanguage`
1661
+ * below) — umkreis finding #1's third ask was "fill this in even
1662
+ * in auto mode", not just when the host bothered to set the chip.
1655
1663
  */
1656
1664
  sourceLanguage?: string;
1665
+ /**
1666
+ * 0..1 confidence the server had in the Whisper transcript. Below
1667
+ * ~0.5 (see bug_enrichment.dart's `lowConfidenceThreshold`), title
1668
+ * and description above are the RAW transcript, not an LLM
1669
+ * paraphrase — the server skipped extraction rather than asking a
1670
+ * model to polish something it couldn't reliably read (umkreis
1671
+ * finding #1, 2026-08-06). Thread this through to
1672
+ * `BugReportDraft.transcriptConfidence` so it lands on the stored
1673
+ * report for a coordinator to see.
1674
+ */
1675
+ transcriptConfidence: number;
1676
+ /**
1677
+ * Convenience flag — `transcriptConfidence < lowConfidenceThreshold`,
1678
+ * computed server-side so the client doesn't need to know the
1679
+ * threshold. Host UI can show "this looks garbled, please
1680
+ * re-record?" when true.
1681
+ */
1682
+ lowConfidence: boolean;
1683
+ /**
1684
+ * ISO-639-1 code Whisper guessed on its own — only present when the
1685
+ * request sent no language hint (i.e. `audio.language` was unset /
1686
+ * `'auto'`). Unmapped Whisper language names pass through
1687
+ * lowercased rather than being dropped.
1688
+ */
1689
+ detectedLanguage?: string;
1657
1690
  }
1658
1691
  /**
1659
1692
  * Send an audio recording to the voice-extract endpoint and return
@@ -1700,13 +1733,35 @@ interface VoiceBugInputSheetProps {
1700
1733
  /** Accent colour for the mic + active chip. Default `#D83232`
1701
1734
  * (bug-red). Hosts that want a brand-tint can override. */
1702
1735
  accentColor?: string;
1736
+ /**
1737
+ * Opacity of the backdrop + sheet, together, on a 0..1 scale.
1738
+ * Default `1` — fully opaque, unchanged from before this prop
1739
+ * existed. A tester describing a bug describes what's on the
1740
+ * screen behind this sheet; at `1` that screen is completely
1741
+ * hidden while they're doing it. Lower values (e.g. `0.35`, close
1742
+ * to the ~30% overall coverage a host asked for) keep both layers
1743
+ * translucent together so the failing screen stays legible.
1744
+ * (umkreis finding #2, 2026-08-06.)
1745
+ */
1746
+ sheetOpacity?: number;
1747
+ /**
1748
+ * Force the Whisper language hint instead of letting the tester
1749
+ * pick via the chip. Any ISO-639-1 code Whisper accepts (`'de'`,
1750
+ * `'tr'`, …), or `'auto'` to explicitly keep auto-detect. Use this
1751
+ * when the host knows its audience speaks one language —
1752
+ * `voiceLanguage="de"` for an all-German tester pool, say.
1753
+ * Overrides the device-locale default below entirely; the tester
1754
+ * can still tap the chip to cycle away from it.
1755
+ * (umkreis finding #2, 2026-08-06.)
1756
+ */
1757
+ voiceLanguage?: 'auto' | string;
1703
1758
  /** Host-side string overrides. Any missing key falls back to the
1704
1759
  * German default copy. */
1705
1760
  strings?: VoiceBugStrings;
1706
1761
  style?: StyleProp<ViewStyle>;
1707
1762
  testID?: string;
1708
1763
  }
1709
- declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
1764
+ declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
1710
1765
  /** Maps the sheet's classification onto the BugReportSheet's
1711
1766
  * BugReportType union. Exported so the host can call it when
1712
1767
  * building the initialDraft for the bug sheet. */
package/dist/index.d.ts CHANGED
@@ -1633,11 +1633,17 @@ interface VoiceExtractAudio {
1633
1633
  /** MIME type of the audio. Whisper accepts m4a / aac / wav / mp3 /
1634
1634
  * webm; the server forwards whatever we send. */
1635
1635
  mimeType: string;
1636
- /** Optional ISO-639-1 language hint forwarded to Whisper. When
1637
- * set, transcription skips language detection and treats the
1638
- * audio as the given language — faster + more accurate when the
1639
- * tester knows their own language. Omit to let Whisper detect. */
1640
- language?: 'de' | 'en';
1636
+ /**
1637
+ * Optional ISO-639-1 language hint forwarded to Whisper (any code
1638
+ * Whisper accepts, e.g. `'de'`, `'tr'`, `'ru'` — not just DE/EN;
1639
+ * widened from the original `'de' | 'en'` union so a host's
1640
+ * `voiceLanguage` prop or a detected device locale can pass through
1641
+ * unconstrained). When set, transcription skips language detection
1642
+ * and treats the audio as the given language — faster + more
1643
+ * accurate when the tester's language is known. Omit to let
1644
+ * Whisper detect.
1645
+ */
1646
+ language?: string;
1641
1647
  }
1642
1648
  interface VoiceExtractResult {
1643
1649
  /** Raw Whisper transcript. */
@@ -1649,11 +1655,38 @@ interface VoiceExtractResult {
1649
1655
  /** Server enum — same set the BugReportSheet's Frequency chips use. */
1650
1656
  frequency: 'always' | 'often' | 'sometimes' | 'rarely';
1651
1657
  /**
1652
- * Voice-bug split (A2): ISO-639-1 code the tester spoke in. The
1653
- * server doesn't echo it, so we carry the request hint through —
1654
- * it rides to submit as the O-Ton language label.
1658
+ * Voice-bug split (A2): ISO-639-1 code the tester spoke in. When
1659
+ * the request carried an explicit hint that wins; otherwise this
1660
+ * is the server's OWN Whisper-detected guess (`detectedLanguage`
1661
+ * below) — umkreis finding #1's third ask was "fill this in even
1662
+ * in auto mode", not just when the host bothered to set the chip.
1655
1663
  */
1656
1664
  sourceLanguage?: string;
1665
+ /**
1666
+ * 0..1 confidence the server had in the Whisper transcript. Below
1667
+ * ~0.5 (see bug_enrichment.dart's `lowConfidenceThreshold`), title
1668
+ * and description above are the RAW transcript, not an LLM
1669
+ * paraphrase — the server skipped extraction rather than asking a
1670
+ * model to polish something it couldn't reliably read (umkreis
1671
+ * finding #1, 2026-08-06). Thread this through to
1672
+ * `BugReportDraft.transcriptConfidence` so it lands on the stored
1673
+ * report for a coordinator to see.
1674
+ */
1675
+ transcriptConfidence: number;
1676
+ /**
1677
+ * Convenience flag — `transcriptConfidence < lowConfidenceThreshold`,
1678
+ * computed server-side so the client doesn't need to know the
1679
+ * threshold. Host UI can show "this looks garbled, please
1680
+ * re-record?" when true.
1681
+ */
1682
+ lowConfidence: boolean;
1683
+ /**
1684
+ * ISO-639-1 code Whisper guessed on its own — only present when the
1685
+ * request sent no language hint (i.e. `audio.language` was unset /
1686
+ * `'auto'`). Unmapped Whisper language names pass through
1687
+ * lowercased rather than being dropped.
1688
+ */
1689
+ detectedLanguage?: string;
1657
1690
  }
1658
1691
  /**
1659
1692
  * Send an audio recording to the voice-extract endpoint and return
@@ -1700,13 +1733,35 @@ interface VoiceBugInputSheetProps {
1700
1733
  /** Accent colour for the mic + active chip. Default `#D83232`
1701
1734
  * (bug-red). Hosts that want a brand-tint can override. */
1702
1735
  accentColor?: string;
1736
+ /**
1737
+ * Opacity of the backdrop + sheet, together, on a 0..1 scale.
1738
+ * Default `1` — fully opaque, unchanged from before this prop
1739
+ * existed. A tester describing a bug describes what's on the
1740
+ * screen behind this sheet; at `1` that screen is completely
1741
+ * hidden while they're doing it. Lower values (e.g. `0.35`, close
1742
+ * to the ~30% overall coverage a host asked for) keep both layers
1743
+ * translucent together so the failing screen stays legible.
1744
+ * (umkreis finding #2, 2026-08-06.)
1745
+ */
1746
+ sheetOpacity?: number;
1747
+ /**
1748
+ * Force the Whisper language hint instead of letting the tester
1749
+ * pick via the chip. Any ISO-639-1 code Whisper accepts (`'de'`,
1750
+ * `'tr'`, …), or `'auto'` to explicitly keep auto-detect. Use this
1751
+ * when the host knows its audience speaks one language —
1752
+ * `voiceLanguage="de"` for an all-German tester pool, say.
1753
+ * Overrides the device-locale default below entirely; the tester
1754
+ * can still tap the chip to cycle away from it.
1755
+ * (umkreis finding #2, 2026-08-06.)
1756
+ */
1757
+ voiceLanguage?: 'auto' | string;
1703
1758
  /** Host-side string overrides. Any missing key falls back to the
1704
1759
  * German default copy. */
1705
1760
  strings?: VoiceBugStrings;
1706
1761
  style?: StyleProp<ViewStyle>;
1707
1762
  testID?: string;
1708
1763
  }
1709
- declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
1764
+ declare function VoiceBugInputSheet({ visible, tpk, onCancel, onExtracted, maxSeconds, accentColor, sheetOpacity, voiceLanguage, strings, style, testID, }: VoiceBugInputSheetProps): React.ReactElement;
1710
1765
  /** Maps the sheet's classification onto the BugReportSheet's
1711
1766
  * BugReportType union. Exported so the host can call it when
1712
1767
  * building the initialDraft for the bug sheet. */
package/dist/index.js CHANGED
@@ -7491,14 +7491,21 @@ async function extractVoiceBug(tpk, audio) {
7491
7491
  {
7492
7492
  audio_base64: audio.base64,
7493
7493
  mime_type: audio.mimeType,
7494
- // Server-side handling: the route reads `language` (when set)
7495
- // and passes it through to Whisper's `language` param. Older
7496
- // server builds ignore unknown JSON keys, so this is a safe
7497
- // forward-roll — sending it never breaks an out-of-date API.
7498
- ...audio.language ? { language: audio.language } : {}
7494
+ // umkreis finding #1/#3 fixed a real bug here, 2026-08-06: this
7495
+ // used to send `language`, but the server route reads
7496
+ // `source_language` (routes/.../voice-extract.dart) — so the
7497
+ // DE/EN picker chip never actually reached Whisper, even on
7498
+ // the rare occasion a tester tapped it. `source_language` is
7499
+ // the correct, matching key; older server builds ignore
7500
+ // unknown JSON keys either way, so this is a safe forward-roll.
7501
+ ...audio.language ? { source_language: audio.language } : {}
7499
7502
  }
7500
7503
  );
7501
- return audio.language ? { ...response.data, sourceLanguage: audio.language } : response.data;
7504
+ const result = response.data;
7505
+ return {
7506
+ ...result,
7507
+ sourceLanguage: audio.language ?? result.detectedLanguage
7508
+ };
7502
7509
  }
7503
7510
 
7504
7511
  // src/VoiceBugInputSheet.tsx
@@ -7536,6 +7543,8 @@ function VoiceBugInputSheet({
7536
7543
  onExtracted,
7537
7544
  maxSeconds = 60,
7538
7545
  accentColor = "#D83232",
7546
+ sheetOpacity = 1,
7547
+ voiceLanguage,
7539
7548
  strings,
7540
7549
  style,
7541
7550
  testID = "tpk-voice-bug-sheet"
@@ -7549,7 +7558,27 @@ function VoiceBugInputSheet({
7549
7558
  const [seconds, setSeconds] = (0, import_react16.useState)(0);
7550
7559
  const [error, setError] = (0, import_react16.useState)(null);
7551
7560
  const [result, setResult] = (0, import_react16.useState)(null);
7552
- const [language, setLanguage] = (0, import_react16.useState)("auto");
7561
+ const [language, setLanguage] = (0, import_react16.useState)(
7562
+ voiceLanguage ?? "auto"
7563
+ );
7564
+ (0, import_react16.useEffect)(() => {
7565
+ if (voiceLanguage !== void 0) {
7566
+ setLanguage(voiceLanguage);
7567
+ return;
7568
+ }
7569
+ let cancelled = false;
7570
+ (async () => {
7571
+ try {
7572
+ const mod = await import("expo-localization");
7573
+ const code = mod.getLocales?.()[0]?.languageCode?.toLowerCase();
7574
+ if (!cancelled && code) setLanguage(code);
7575
+ } catch {
7576
+ }
7577
+ })();
7578
+ return () => {
7579
+ cancelled = true;
7580
+ };
7581
+ }, [voiceLanguage]);
7553
7582
  const recorderRef = (0, import_react16.useRef)(null);
7554
7583
  const tickerRef = (0, import_react16.useRef)(null);
7555
7584
  const meterAnim = (0, import_react16.useRef)(new import_react_native15.Animated.Value(0)).current;
@@ -7742,6 +7771,9 @@ function VoiceBugInputSheet({
7742
7771
  const isUploading = phase === "uploading";
7743
7772
  const isExtracted = phase === "extracted";
7744
7773
  const isError = phase === "error";
7774
+ const opacity = Math.max(0, Math.min(1, sheetOpacity));
7775
+ const backdropOverride = { backgroundColor: `rgba(0,0,0,${0.55 * opacity})` };
7776
+ const sheetOverride = { backgroundColor: `rgba(17,24,39,${opacity})` };
7745
7777
  return /* @__PURE__ */ import_react16.default.createElement(
7746
7778
  import_react_native15.Modal,
7747
7779
  {
@@ -7750,7 +7782,7 @@ function VoiceBugInputSheet({
7750
7782
  transparent: true,
7751
7783
  visible
7752
7784
  },
7753
- /* @__PURE__ */ import_react16.default.createElement(import_react_native15.View, { style: [styles11.backdrop, style], testID }, /* @__PURE__ */ import_react16.default.createElement(
7785
+ /* @__PURE__ */ import_react16.default.createElement(import_react_native15.View, { style: [styles11.backdrop, backdropOverride, style], testID }, /* @__PURE__ */ import_react16.default.createElement(
7754
7786
  import_react_native15.Pressable,
7755
7787
  {
7756
7788
  accessibilityRole: "button",
@@ -7759,7 +7791,7 @@ function VoiceBugInputSheet({
7759
7791
  onPress: () => void cancel(),
7760
7792
  style: styles11.backdropSpacer
7761
7793
  }
7762
- ), /* @__PURE__ */ import_react16.default.createElement(import_react_native15.View, { style: styles11.sheet }, /* @__PURE__ */ import_react16.default.createElement(import_react_native15.View, { style: styles11.grabber }), /* @__PURE__ */ import_react16.default.createElement(
7794
+ ), /* @__PURE__ */ import_react16.default.createElement(import_react_native15.View, { style: [styles11.sheet, sheetOverride] }, /* @__PURE__ */ import_react16.default.createElement(import_react_native15.View, { style: styles11.grabber }), /* @__PURE__ */ import_react16.default.createElement(
7763
7795
  import_react_native15.Animated.View,
7764
7796
  {
7765
7797
  style: [styles11.dimmable, { opacity: dimAnim }],
package/dist/index.mjs CHANGED
@@ -7402,14 +7402,21 @@ async function extractVoiceBug(tpk, audio) {
7402
7402
  {
7403
7403
  audio_base64: audio.base64,
7404
7404
  mime_type: audio.mimeType,
7405
- // Server-side handling: the route reads `language` (when set)
7406
- // and passes it through to Whisper's `language` param. Older
7407
- // server builds ignore unknown JSON keys, so this is a safe
7408
- // forward-roll — sending it never breaks an out-of-date API.
7409
- ...audio.language ? { language: audio.language } : {}
7405
+ // umkreis finding #1/#3 fixed a real bug here, 2026-08-06: this
7406
+ // used to send `language`, but the server route reads
7407
+ // `source_language` (routes/.../voice-extract.dart) — so the
7408
+ // DE/EN picker chip never actually reached Whisper, even on
7409
+ // the rare occasion a tester tapped it. `source_language` is
7410
+ // the correct, matching key; older server builds ignore
7411
+ // unknown JSON keys either way, so this is a safe forward-roll.
7412
+ ...audio.language ? { source_language: audio.language } : {}
7410
7413
  }
7411
7414
  );
7412
- return audio.language ? { ...response.data, sourceLanguage: audio.language } : response.data;
7415
+ const result = response.data;
7416
+ return {
7417
+ ...result,
7418
+ sourceLanguage: audio.language ?? result.detectedLanguage
7419
+ };
7413
7420
  }
7414
7421
 
7415
7422
  // src/VoiceBugInputSheet.tsx
@@ -7447,6 +7454,8 @@ function VoiceBugInputSheet({
7447
7454
  onExtracted,
7448
7455
  maxSeconds = 60,
7449
7456
  accentColor = "#D83232",
7457
+ sheetOpacity = 1,
7458
+ voiceLanguage,
7450
7459
  strings,
7451
7460
  style,
7452
7461
  testID = "tpk-voice-bug-sheet"
@@ -7460,7 +7469,27 @@ function VoiceBugInputSheet({
7460
7469
  const [seconds, setSeconds] = useState11(0);
7461
7470
  const [error, setError] = useState11(null);
7462
7471
  const [result, setResult] = useState11(null);
7463
- const [language, setLanguage] = useState11("auto");
7472
+ const [language, setLanguage] = useState11(
7473
+ voiceLanguage ?? "auto"
7474
+ );
7475
+ useEffect8(() => {
7476
+ if (voiceLanguage !== void 0) {
7477
+ setLanguage(voiceLanguage);
7478
+ return;
7479
+ }
7480
+ let cancelled = false;
7481
+ (async () => {
7482
+ try {
7483
+ const mod = await import("expo-localization");
7484
+ const code = mod.getLocales?.()[0]?.languageCode?.toLowerCase();
7485
+ if (!cancelled && code) setLanguage(code);
7486
+ } catch {
7487
+ }
7488
+ })();
7489
+ return () => {
7490
+ cancelled = true;
7491
+ };
7492
+ }, [voiceLanguage]);
7464
7493
  const recorderRef = useRef8(null);
7465
7494
  const tickerRef = useRef8(null);
7466
7495
  const meterAnim = useRef8(new Animated2.Value(0)).current;
@@ -7653,6 +7682,9 @@ function VoiceBugInputSheet({
7653
7682
  const isUploading = phase === "uploading";
7654
7683
  const isExtracted = phase === "extracted";
7655
7684
  const isError = phase === "error";
7685
+ const opacity = Math.max(0, Math.min(1, sheetOpacity));
7686
+ const backdropOverride = { backgroundColor: `rgba(0,0,0,${0.55 * opacity})` };
7687
+ const sheetOverride = { backgroundColor: `rgba(17,24,39,${opacity})` };
7656
7688
  return /* @__PURE__ */ React14.createElement(
7657
7689
  Modal6,
7658
7690
  {
@@ -7661,7 +7693,7 @@ function VoiceBugInputSheet({
7661
7693
  transparent: true,
7662
7694
  visible
7663
7695
  },
7664
- /* @__PURE__ */ React14.createElement(View11, { style: [styles11.backdrop, style], testID }, /* @__PURE__ */ React14.createElement(
7696
+ /* @__PURE__ */ React14.createElement(View11, { style: [styles11.backdrop, backdropOverride, style], testID }, /* @__PURE__ */ React14.createElement(
7665
7697
  Pressable9,
7666
7698
  {
7667
7699
  accessibilityRole: "button",
@@ -7670,7 +7702,7 @@ function VoiceBugInputSheet({
7670
7702
  onPress: () => void cancel(),
7671
7703
  style: styles11.backdropSpacer
7672
7704
  }
7673
- ), /* @__PURE__ */ React14.createElement(View11, { style: styles11.sheet }, /* @__PURE__ */ React14.createElement(View11, { style: styles11.grabber }), /* @__PURE__ */ React14.createElement(
7705
+ ), /* @__PURE__ */ React14.createElement(View11, { style: [styles11.sheet, sheetOverride] }, /* @__PURE__ */ React14.createElement(View11, { style: styles11.grabber }), /* @__PURE__ */ React14.createElement(
7674
7706
  Animated2.View,
7675
7707
  {
7676
7708
  style: [styles11.dimmable, { opacity: dimAnim }],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testerpaykit/expo",
3
- "version": "0.6.1",
3
+ "version": "0.7.0",
4
4
  "description": "TesterPayKit Expo / React-Native bindings — shake-to-report, device info, bug-report hook",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -20,9 +20,9 @@
20
20
  "CHANGELOG.md"
21
21
  ],
22
22
  "dependencies": {
23
- "@testerpaykit/ai-tester": "0.4.0",
23
+ "@testerpaykit/core": "1.0.1",
24
24
  "@testerpaykit/api-client": "1.2.0",
25
- "@testerpaykit/core": "1.0.1"
25
+ "@testerpaykit/ai-tester": "0.4.0"
26
26
  },
27
27
  "peerDependencies": {
28
28
  "@expo/vector-icons": ">=14.0.0",
@@ -32,6 +32,7 @@
32
32
  "expo-audio": ">=1.0.0",
33
33
  "expo-device": ">=6.0.0",
34
34
  "expo-file-system": ">=16.0.0",
35
+ "expo-localization": ">=15.0.0",
35
36
  "expo-sensors": ">=12.0.0",
36
37
  "react": ">=18.0.0",
37
38
  "react-native": ">=0.72.0",
@@ -62,6 +63,9 @@
62
63
  "expo-file-system": {
63
64
  "optional": true
64
65
  },
66
+ "expo-localization": {
67
+ "optional": true
68
+ },
65
69
  "react-native-svg": {
66
70
  "optional": true
67
71
  },