@testerpaykit/expo 0.8.0 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +56 -0
- package/README.md +16 -0
- package/dist/index.d.mts +152 -6
- package/dist/index.d.ts +152 -6
- package/dist/index.js +1384 -917
- package/dist/index.mjs +1001 -540
- package/package.json +15 -11
package/dist/index.mjs
CHANGED
|
@@ -1003,7 +1003,7 @@ function findAssignmentForTask(tasks, key) {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
|
|
1005
1005
|
// package.json
|
|
1006
|
-
var version = "0.
|
|
1006
|
+
var version = "0.9.1";
|
|
1007
1007
|
|
|
1008
1008
|
// src/version.ts
|
|
1009
1009
|
var SDK_VERSION = `@testerpaykit/expo/${version}`;
|
|
@@ -1698,6 +1698,12 @@ async function startServerSession(api, projectId) {
|
|
|
1698
1698
|
appVersion: appSnapshot.version,
|
|
1699
1699
|
sdkVersion: SDK_VERSION
|
|
1700
1700
|
});
|
|
1701
|
+
if (typeof __DEV__ !== "undefined" && __DEV__ && session.sdkUpdate) {
|
|
1702
|
+
const u = session.sdkUpdate;
|
|
1703
|
+
console.warn(
|
|
1704
|
+
`[testerpaykit/expo] ${u.package} ${u.current} is outdated \u2014 ${u.latest} is out. Update: ${u.command}`
|
|
1705
|
+
);
|
|
1706
|
+
}
|
|
1701
1707
|
return session.id;
|
|
1702
1708
|
}
|
|
1703
1709
|
async function loadPersistedSession(storage, projectId, testerCode) {
|
|
@@ -1859,7 +1865,7 @@ function toError(cause) {
|
|
|
1859
1865
|
}
|
|
1860
1866
|
|
|
1861
1867
|
// src/FloatingFeedbackButton.tsx
|
|
1862
|
-
import
|
|
1868
|
+
import React6, { useCallback as useCallback2, useEffect as useEffect3, useMemo as useMemo2, useRef as useRef3, useState as useState3 } from "react";
|
|
1863
1869
|
import {
|
|
1864
1870
|
Animated,
|
|
1865
1871
|
Dimensions as Dimensions2,
|
|
@@ -2012,6 +2018,238 @@ function useTpkTheme() {
|
|
|
2012
2018
|
return useContext3(TpkThemeContext);
|
|
2013
2019
|
}
|
|
2014
2020
|
|
|
2021
|
+
// src/i18n.tsx
|
|
2022
|
+
import React4, { createContext as createContext4, useContext as useContext4 } from "react";
|
|
2023
|
+
var localization = null;
|
|
2024
|
+
void (async () => {
|
|
2025
|
+
try {
|
|
2026
|
+
localization = await import("expo-localization");
|
|
2027
|
+
} catch {
|
|
2028
|
+
}
|
|
2029
|
+
})();
|
|
2030
|
+
function toTpkLanguage(code) {
|
|
2031
|
+
return code?.toLowerCase().startsWith("de") ? "de" : "en";
|
|
2032
|
+
}
|
|
2033
|
+
function detectDeviceLanguage() {
|
|
2034
|
+
try {
|
|
2035
|
+
const code = localization?.getLocales?.()[0]?.languageCode;
|
|
2036
|
+
if (code) return toTpkLanguage(code);
|
|
2037
|
+
} catch {
|
|
2038
|
+
}
|
|
2039
|
+
try {
|
|
2040
|
+
return toTpkLanguage(Intl.DateTimeFormat().resolvedOptions().locale);
|
|
2041
|
+
} catch {
|
|
2042
|
+
return "en";
|
|
2043
|
+
}
|
|
2044
|
+
}
|
|
2045
|
+
var TpkLanguageContext = createContext4(null);
|
|
2046
|
+
function TpkLanguageProvider({
|
|
2047
|
+
language,
|
|
2048
|
+
children
|
|
2049
|
+
}) {
|
|
2050
|
+
return /* @__PURE__ */ React4.createElement(TpkLanguageContext.Provider, { value: language ?? null }, children);
|
|
2051
|
+
}
|
|
2052
|
+
function useTpkLanguage() {
|
|
2053
|
+
return useContext4(TpkLanguageContext) ?? detectDeviceLanguage();
|
|
2054
|
+
}
|
|
2055
|
+
function useTpkStrings() {
|
|
2056
|
+
return TPK_STRINGS[useTpkLanguage()];
|
|
2057
|
+
}
|
|
2058
|
+
var TPK_STRINGS = {
|
|
2059
|
+
de: {
|
|
2060
|
+
menuReportBug: "Bug melden",
|
|
2061
|
+
menuFeedback: "Feedback",
|
|
2062
|
+
menuAutoTest: "Auto-Test (KI)",
|
|
2063
|
+
menuCachedCrashes: (n) => n === 1 ? "1 gespeicherten Absturz senden" : `${n} gespeicherte Abst\xFCrze senden`,
|
|
2064
|
+
menuWorkboard: "Meine \xDCbersicht",
|
|
2065
|
+
menuMyBugs: "Meine Bugs",
|
|
2066
|
+
menuSessionDetails: "Sitzungsdetails",
|
|
2067
|
+
menuMessages: "Nachrichten",
|
|
2068
|
+
menuRetests: "Meine Nachtests",
|
|
2069
|
+
menuDebugLogs: "Debug-Logs",
|
|
2070
|
+
menuEndSession: "Sitzung beenden",
|
|
2071
|
+
menuSessionEarnings: "Dein Verdienst",
|
|
2072
|
+
menuOpen: "Feedback-Men\xFC \xF6ffnen",
|
|
2073
|
+
menuClose: "Feedback-Men\xFC schlie\xDFen",
|
|
2074
|
+
reportTitle: "Bug melden",
|
|
2075
|
+
reportClose: "Bug-Meldung schlie\xDFen",
|
|
2076
|
+
reportSpeak: "Bug einsprechen",
|
|
2077
|
+
stepTitles: ["Art", "Schwere", "Details", "Schritte", "Pr\xFCfen"],
|
|
2078
|
+
cancel: "Abbrechen",
|
|
2079
|
+
back: "Zur\xFCck",
|
|
2080
|
+
continue: "Weiter \u2192",
|
|
2081
|
+
submit: "Senden \u2191",
|
|
2082
|
+
typeBug: "Bug",
|
|
2083
|
+
typeBugDescription: "Etwas geht nicht",
|
|
2084
|
+
typeCrash: "Absturz",
|
|
2085
|
+
typeCrashDescription: "Die App hat sich pl\xF6tzlich geschlossen",
|
|
2086
|
+
typeUiIssue: "Sieht kaputt aus",
|
|
2087
|
+
typeUiIssueDescription: "Layout oder Darstellung stimmt nicht",
|
|
2088
|
+
typePerformance: "Langsam",
|
|
2089
|
+
typePerformanceDescription: "L\xE4dt oder reagiert zu langsam",
|
|
2090
|
+
typeFeature: "Wunsch",
|
|
2091
|
+
typeFeatureDescription: "Das sollte anders funktionieren",
|
|
2092
|
+
typeFeedback: "Feedback",
|
|
2093
|
+
typeFeedbackDescription: "Allgemeine Anmerkung",
|
|
2094
|
+
severityCritical: "Kritisch",
|
|
2095
|
+
severityCriticalDescription: "Blockiert \u2014 die App ist unbenutzbar",
|
|
2096
|
+
severityHigh: "Hoch",
|
|
2097
|
+
severityHighDescription: "St\xF6rt einen wichtigen Ablauf deutlich",
|
|
2098
|
+
severityMedium: "Mittel",
|
|
2099
|
+
severityMediumDescription: "Sp\xFCrbar, aber es gibt einen Umweg",
|
|
2100
|
+
severityLow: "Niedrig",
|
|
2101
|
+
severityLowDescription: "Kleinigkeit / rein optisch",
|
|
2102
|
+
frequencyAlways: "Immer (100 %)",
|
|
2103
|
+
frequencyOften: "Oft (>50 %)",
|
|
2104
|
+
frequencySometimes: "Manchmal (<50 %)",
|
|
2105
|
+
frequencyOnce: "Bisher nur einmal",
|
|
2106
|
+
fieldTitle: "Titel",
|
|
2107
|
+
fieldTitlePlaceholder: "Kurz in einer Zeile",
|
|
2108
|
+
fieldDescription: "Beschreibung",
|
|
2109
|
+
fieldDescriptionPlaceholder: "Was wolltest du tun, und was ging schief?",
|
|
2110
|
+
fieldExpected: "Erwartet",
|
|
2111
|
+
fieldExpectedPlaceholder: "Was h\xE4tte passieren sollen?",
|
|
2112
|
+
fieldActual: "Tats\xE4chlich",
|
|
2113
|
+
fieldActualPlaceholder: "Was ist stattdessen passiert?",
|
|
2114
|
+
fieldFrequency: "Wie oft passiert das?",
|
|
2115
|
+
fieldComponent: "Betroffener Bereich (optional)",
|
|
2116
|
+
fieldComponentPlaceholder: "z. B. Kasse / Einstellungen / Warenkorb",
|
|
2117
|
+
attachments: "Anh\xE4nge",
|
|
2118
|
+
attachScreenshot: "Screenshot",
|
|
2119
|
+
attachImage: "Bild",
|
|
2120
|
+
attachFile: "Datei",
|
|
2121
|
+
attachA11y: (label) => `${label} anh\xE4ngen`,
|
|
2122
|
+
removeA11y: (name) => `${name} entfernen`,
|
|
2123
|
+
stepsAdd: "Schritt zum Nachstellen hinzuf\xFCgen",
|
|
2124
|
+
stepsPlaceholder: "z. B. Warenkorb \xF6ffnen",
|
|
2125
|
+
stepsAddA11y: "Schritt hinzuf\xFCgen",
|
|
2126
|
+
stepsEmpty: "Noch keine Schritte \u2014 freiwillig, aber eine gute Anleitung beschleunigt die Behebung.",
|
|
2127
|
+
stepsReorderHint: "Lange auf \u2261 dr\xFCcken, um die Reihenfolge zu \xE4ndern.",
|
|
2128
|
+
stepsDragA11y: (n) => `Schritt ${n} verschieben`,
|
|
2129
|
+
stepsRemoveA11y: (n) => `Schritt ${n} entfernen`,
|
|
2130
|
+
reviewType: "Art",
|
|
2131
|
+
reviewSeverity: "Schwere",
|
|
2132
|
+
reviewTitle: "Titel",
|
|
2133
|
+
reviewDescription: "Beschreibung",
|
|
2134
|
+
reviewExpected: "Erwartet",
|
|
2135
|
+
reviewActual: "Tats\xE4chlich",
|
|
2136
|
+
reviewFrequency: "H\xE4ufigkeit",
|
|
2137
|
+
reviewComponent: "Betroffener Bereich",
|
|
2138
|
+
reviewSteps: "Schritte",
|
|
2139
|
+
reviewAttachments: "Anh\xE4nge",
|
|
2140
|
+
reviewEmpty: "(leer)",
|
|
2141
|
+
errorRejected: "Senden nicht m\xF6glich \u2014 der Server hat die Meldung abgelehnt (vielleicht ist deine Tester-Sitzung abgelaufen). Dein Entwurf bleibt erhalten; bitte versuch es noch einmal.",
|
|
2142
|
+
errorFailed: "Senden fehlgeschlagen \u2014 bitte versuch es noch einmal.",
|
|
2143
|
+
errorAttachmentLimit: (max) => `H\xF6chstens ${max} Anh\xE4nge.`,
|
|
2144
|
+
errorAttachmentSize: (mb) => `Zusammen mehr als ${mb} MB.`,
|
|
2145
|
+
errorNoCaptureRef: "Kein Bildschirm-Bezug \xFCbergeben \u2014 Screenshot ist aus.",
|
|
2146
|
+
errorNeedsViewShot: "F\xFCr Screenshots fehlt react-native-view-shot.",
|
|
2147
|
+
errorScreenshotFailed: "Screenshot fehlgeschlagen.",
|
|
2148
|
+
errorNeedsImagePicker: "F\xFCr Bilder fehlt expo-image-picker.",
|
|
2149
|
+
errorImageNoData: "Das Bild enthielt keine Daten.",
|
|
2150
|
+
errorImagePickFailed: "Bild konnte nicht gew\xE4hlt werden.",
|
|
2151
|
+
errorNeedsDocumentPicker: "F\xFCr Dateien fehlt expo-document-picker.",
|
|
2152
|
+
errorFileUnreadable: "Datei nicht lesbar (expo-file-system fehlt).",
|
|
2153
|
+
errorFilePickFailed: "Datei konnte nicht gew\xE4hlt werden."
|
|
2154
|
+
},
|
|
2155
|
+
en: {
|
|
2156
|
+
menuReportBug: "Report Bug",
|
|
2157
|
+
menuFeedback: "Feedback",
|
|
2158
|
+
menuAutoTest: "Auto Test (AI)",
|
|
2159
|
+
menuCachedCrashes: (n) => `Send ${n} cached ${n === 1 ? "crash" : "crashes"}`,
|
|
2160
|
+
menuWorkboard: "My Workboard",
|
|
2161
|
+
menuMyBugs: "My Bugs",
|
|
2162
|
+
menuSessionDetails: "Session Details",
|
|
2163
|
+
menuMessages: "Messages",
|
|
2164
|
+
menuRetests: "My Retests",
|
|
2165
|
+
menuDebugLogs: "Debug Logs",
|
|
2166
|
+
menuEndSession: "End Session",
|
|
2167
|
+
menuSessionEarnings: "Session earnings",
|
|
2168
|
+
menuOpen: "Open feedback menu",
|
|
2169
|
+
menuClose: "Close feedback menu",
|
|
2170
|
+
reportTitle: "Report a Bug",
|
|
2171
|
+
reportClose: "Close bug report",
|
|
2172
|
+
reportSpeak: "Speak the bug",
|
|
2173
|
+
stepTitles: ["Bug Type", "Severity", "Details", "Steps", "Review"],
|
|
2174
|
+
cancel: "Cancel",
|
|
2175
|
+
back: "Back",
|
|
2176
|
+
continue: "Continue \u2192",
|
|
2177
|
+
submit: "Submit \u2191",
|
|
2178
|
+
typeBug: "Bug",
|
|
2179
|
+
typeBugDescription: "Something's broken",
|
|
2180
|
+
typeCrash: "Crash",
|
|
2181
|
+
typeCrashDescription: "App closed unexpectedly",
|
|
2182
|
+
typeUiIssue: "UI issue",
|
|
2183
|
+
typeUiIssueDescription: "Layout or visual problem",
|
|
2184
|
+
typePerformance: "Slow",
|
|
2185
|
+
typePerformanceDescription: "Performance issue",
|
|
2186
|
+
typeFeature: "Feature",
|
|
2187
|
+
typeFeatureDescription: "I'd like this to work differently",
|
|
2188
|
+
typeFeedback: "Feedback",
|
|
2189
|
+
typeFeedbackDescription: "General comment",
|
|
2190
|
+
severityCritical: "Critical",
|
|
2191
|
+
severityCriticalDescription: "Blocks the user \u2014 app unusable",
|
|
2192
|
+
severityHigh: "High",
|
|
2193
|
+
severityHighDescription: "Significant impact on core flow",
|
|
2194
|
+
severityMedium: "Medium",
|
|
2195
|
+
severityMediumDescription: "Noticeable problem, workaround exists",
|
|
2196
|
+
severityLow: "Low",
|
|
2197
|
+
severityLowDescription: "Minor / cosmetic",
|
|
2198
|
+
frequencyAlways: "Always (100%)",
|
|
2199
|
+
frequencyOften: "Often (>50%)",
|
|
2200
|
+
frequencySometimes: "Sometimes (<50%)",
|
|
2201
|
+
frequencyOnce: "Only once so far",
|
|
2202
|
+
fieldTitle: "Title",
|
|
2203
|
+
fieldTitlePlaceholder: "One-line summary",
|
|
2204
|
+
fieldDescription: "Description",
|
|
2205
|
+
fieldDescriptionPlaceholder: "What were you trying to do, and what went wrong?",
|
|
2206
|
+
fieldExpected: "Expected behavior",
|
|
2207
|
+
fieldExpectedPlaceholder: "What should have happened?",
|
|
2208
|
+
fieldActual: "Actual behavior",
|
|
2209
|
+
fieldActualPlaceholder: "What actually happened?",
|
|
2210
|
+
fieldFrequency: "How often does this happen?",
|
|
2211
|
+
fieldComponent: "Affected component (optional)",
|
|
2212
|
+
fieldComponentPlaceholder: "e.g. checkout / settings / cart",
|
|
2213
|
+
attachments: "Attachments",
|
|
2214
|
+
attachScreenshot: "Screenshot",
|
|
2215
|
+
attachImage: "Image",
|
|
2216
|
+
attachFile: "File",
|
|
2217
|
+
attachA11y: (label) => `Attach ${label.toLowerCase()}`,
|
|
2218
|
+
removeA11y: (name) => `Remove ${name}`,
|
|
2219
|
+
stepsAdd: "Add a reproduction step",
|
|
2220
|
+
stepsPlaceholder: "e.g. Open cart",
|
|
2221
|
+
stepsAddA11y: "Add step",
|
|
2222
|
+
stepsEmpty: "No steps added yet \u2014 this is optional, but a good repro accelerates the fix.",
|
|
2223
|
+
stepsReorderHint: "Long-press the \u2261 handle to reorder.",
|
|
2224
|
+
stepsDragA11y: (n) => `Drag step ${n}`,
|
|
2225
|
+
stepsRemoveA11y: (n) => `Remove step ${n}`,
|
|
2226
|
+
reviewType: "Type",
|
|
2227
|
+
reviewSeverity: "Severity",
|
|
2228
|
+
reviewTitle: "Title",
|
|
2229
|
+
reviewDescription: "Description",
|
|
2230
|
+
reviewExpected: "Expected",
|
|
2231
|
+
reviewActual: "Actual",
|
|
2232
|
+
reviewFrequency: "Frequency",
|
|
2233
|
+
reviewComponent: "Affected component",
|
|
2234
|
+
reviewSteps: "Steps",
|
|
2235
|
+
reviewAttachments: "Attachments",
|
|
2236
|
+
reviewEmpty: "(empty)",
|
|
2237
|
+
errorRejected: "Could not submit \u2014 the server rejected the report (your tester session may have expired). Your draft is kept; please try again.",
|
|
2238
|
+
errorFailed: "Bug report failed \u2014 please try again.",
|
|
2239
|
+
errorAttachmentLimit: (max) => `Limit reached (${max}).`,
|
|
2240
|
+
errorAttachmentSize: (mb) => `Total above ${mb} MB.`,
|
|
2241
|
+
errorNoCaptureRef: "No view ref provided \u2014 capture is disabled.",
|
|
2242
|
+
errorNeedsViewShot: "Screenshot needs react-native-view-shot.",
|
|
2243
|
+
errorScreenshotFailed: "Screenshot capture failed.",
|
|
2244
|
+
errorNeedsImagePicker: "Install expo-image-picker to attach images.",
|
|
2245
|
+
errorImageNoData: "Image had no base64 payload.",
|
|
2246
|
+
errorImagePickFailed: "Image pick failed.",
|
|
2247
|
+
errorNeedsDocumentPicker: "Install expo-document-picker to attach files.",
|
|
2248
|
+
errorFileUnreadable: "Could not read file (install expo-file-system).",
|
|
2249
|
+
errorFilePickFailed: "File pick failed."
|
|
2250
|
+
}
|
|
2251
|
+
};
|
|
2252
|
+
|
|
2015
2253
|
// src/tour-storage.ts
|
|
2016
2254
|
var WIDGET_TOUR_SEEN_STORAGE_KEY = "tpk-widget-tour-seen";
|
|
2017
2255
|
async function hasSeenWidgetTour(storage) {
|
|
@@ -2030,7 +2268,7 @@ async function resetWidgetTourSeen(storage) {
|
|
|
2030
2268
|
}
|
|
2031
2269
|
|
|
2032
2270
|
// src/WidgetTour.tsx
|
|
2033
|
-
import
|
|
2271
|
+
import React5, { useCallback, useRef as useRef2, useState as useState2 } from "react";
|
|
2034
2272
|
import {
|
|
2035
2273
|
Dimensions,
|
|
2036
2274
|
Modal,
|
|
@@ -2096,7 +2334,7 @@ function WidgetTour({
|
|
|
2096
2334
|
if (isLast) onDone();
|
|
2097
2335
|
else goTo(index + 1);
|
|
2098
2336
|
}, [isLast, onDone, goTo, index]);
|
|
2099
|
-
return /* @__PURE__ */
|
|
2337
|
+
return /* @__PURE__ */ React5.createElement(
|
|
2100
2338
|
Modal,
|
|
2101
2339
|
{
|
|
2102
2340
|
animationType: "slide",
|
|
@@ -2104,7 +2342,7 @@ function WidgetTour({
|
|
|
2104
2342
|
transparent: true,
|
|
2105
2343
|
visible
|
|
2106
2344
|
},
|
|
2107
|
-
/* @__PURE__ */
|
|
2345
|
+
/* @__PURE__ */ React5.createElement(View, { style: [styles.backdrop, style] }, /* @__PURE__ */ React5.createElement(
|
|
2108
2346
|
View,
|
|
2109
2347
|
{
|
|
2110
2348
|
style: styles.sheet,
|
|
@@ -2113,7 +2351,7 @@ function WidgetTour({
|
|
|
2113
2351
|
if (w > 0 && Math.abs(w - cardWidth) > 1) setCardWidth(w);
|
|
2114
2352
|
}
|
|
2115
2353
|
},
|
|
2116
|
-
/* @__PURE__ */
|
|
2354
|
+
/* @__PURE__ */ React5.createElement(View, { style: styles.topBar }, /* @__PURE__ */ React5.createElement(View, { style: styles.grabber }), /* @__PURE__ */ React5.createElement(
|
|
2117
2355
|
Pressable,
|
|
2118
2356
|
{
|
|
2119
2357
|
accessibilityRole: "button",
|
|
@@ -2122,9 +2360,9 @@ function WidgetTour({
|
|
|
2122
2360
|
style: styles.skipButton,
|
|
2123
2361
|
hitSlop: 8
|
|
2124
2362
|
},
|
|
2125
|
-
/* @__PURE__ */
|
|
2363
|
+
/* @__PURE__ */ React5.createElement(Text2, { style: styles.skipLabel }, "\xDCberspringen")
|
|
2126
2364
|
)),
|
|
2127
|
-
/* @__PURE__ */
|
|
2365
|
+
/* @__PURE__ */ React5.createElement(
|
|
2128
2366
|
ScrollView,
|
|
2129
2367
|
{
|
|
2130
2368
|
ref: scrollRef,
|
|
@@ -2135,16 +2373,16 @@ function WidgetTour({
|
|
|
2135
2373
|
scrollEventThrottle: 16,
|
|
2136
2374
|
testID
|
|
2137
2375
|
},
|
|
2138
|
-
CARDS.map((card) => /* @__PURE__ */
|
|
2376
|
+
CARDS.map((card) => /* @__PURE__ */ React5.createElement(Card, { key: card.key, card, width: cardWidth }))
|
|
2139
2377
|
),
|
|
2140
|
-
/* @__PURE__ */
|
|
2378
|
+
/* @__PURE__ */ React5.createElement(
|
|
2141
2379
|
View,
|
|
2142
2380
|
{
|
|
2143
2381
|
style: styles.dots,
|
|
2144
2382
|
accessibilityRole: "adjustable",
|
|
2145
2383
|
accessibilityLabel: `Karte ${index + 1} von ${CARDS.length}`
|
|
2146
2384
|
},
|
|
2147
|
-
CARDS.map((card, i) => /* @__PURE__ */
|
|
2385
|
+
CARDS.map((card, i) => /* @__PURE__ */ React5.createElement(
|
|
2148
2386
|
View,
|
|
2149
2387
|
{
|
|
2150
2388
|
key: card.key,
|
|
@@ -2152,7 +2390,7 @@ function WidgetTour({
|
|
|
2152
2390
|
}
|
|
2153
2391
|
))
|
|
2154
2392
|
),
|
|
2155
|
-
/* @__PURE__ */
|
|
2393
|
+
/* @__PURE__ */ React5.createElement(View, { style: styles.footer }, /* @__PURE__ */ React5.createElement(
|
|
2156
2394
|
Pressable,
|
|
2157
2395
|
{
|
|
2158
2396
|
accessibilityRole: "button",
|
|
@@ -2162,8 +2400,8 @@ function WidgetTour({
|
|
|
2162
2400
|
onPress: () => goTo(index - 1),
|
|
2163
2401
|
style: [styles.backButton, isFirst && styles.backButtonHidden]
|
|
2164
2402
|
},
|
|
2165
|
-
/* @__PURE__ */
|
|
2166
|
-
), /* @__PURE__ */
|
|
2403
|
+
/* @__PURE__ */ React5.createElement(Text2, { style: styles.backLabel }, "Zur\xFCck")
|
|
2404
|
+
), /* @__PURE__ */ React5.createElement(
|
|
2167
2405
|
Pressable,
|
|
2168
2406
|
{
|
|
2169
2407
|
accessibilityRole: "button",
|
|
@@ -2174,7 +2412,7 @@ function WidgetTour({
|
|
|
2174
2412
|
pressed && styles.primaryButtonPressed
|
|
2175
2413
|
]
|
|
2176
2414
|
},
|
|
2177
|
-
/* @__PURE__ */
|
|
2415
|
+
/* @__PURE__ */ React5.createElement(Text2, { style: styles.primaryLabel }, isLast ? "Los geht's" : "Weiter")
|
|
2178
2416
|
))
|
|
2179
2417
|
))
|
|
2180
2418
|
);
|
|
@@ -2183,17 +2421,17 @@ function Card({
|
|
|
2183
2421
|
card,
|
|
2184
2422
|
width
|
|
2185
2423
|
}) {
|
|
2186
|
-
return /* @__PURE__ */
|
|
2424
|
+
return /* @__PURE__ */ React5.createElement(View, { style: [styles.cardPage, { width }] }, /* @__PURE__ */ React5.createElement(
|
|
2187
2425
|
View,
|
|
2188
2426
|
{
|
|
2189
2427
|
accessible: true,
|
|
2190
2428
|
accessibilityLabel: `${card.title}. ${card.body}`,
|
|
2191
2429
|
style: [styles.card, card.hero && styles.cardHero]
|
|
2192
2430
|
},
|
|
2193
|
-
/* @__PURE__ */
|
|
2194
|
-
card.hero && /* @__PURE__ */
|
|
2195
|
-
/* @__PURE__ */
|
|
2196
|
-
/* @__PURE__ */
|
|
2431
|
+
/* @__PURE__ */ React5.createElement(View, { style: [styles.emojiWrap, card.hero && styles.emojiWrapHero] }, /* @__PURE__ */ React5.createElement(Text2, { style: styles.emoji }, card.emoji)),
|
|
2432
|
+
card.hero && /* @__PURE__ */ React5.createElement(View, { style: styles.heroBadge }, /* @__PURE__ */ React5.createElement(Text2, { style: styles.heroBadgeLabel }, "NEU")),
|
|
2433
|
+
/* @__PURE__ */ React5.createElement(Text2, { style: [styles.cardTitle, card.hero && styles.cardTitleHero] }, card.title),
|
|
2434
|
+
/* @__PURE__ */ React5.createElement(Text2, { style: styles.cardBody }, card.body)
|
|
2197
2435
|
));
|
|
2198
2436
|
}
|
|
2199
2437
|
var SHEET_PADDING = 20;
|
|
@@ -2454,6 +2692,7 @@ function FloatingFeedbackButton({
|
|
|
2454
2692
|
enableFirstTapTour = true,
|
|
2455
2693
|
tourStorage
|
|
2456
2694
|
}) {
|
|
2695
|
+
const S = useTpkStrings();
|
|
2457
2696
|
const theme = useTpkTheme();
|
|
2458
2697
|
const [pos, setPos] = useState3(() => position ?? { x: 16, y: 100 });
|
|
2459
2698
|
const [expanded, setExpanded] = useState3(false);
|
|
@@ -2563,14 +2802,14 @@ function FloatingFeedbackButton({
|
|
|
2563
2802
|
{
|
|
2564
2803
|
key: "report-bug",
|
|
2565
2804
|
icon: "bug_report",
|
|
2566
|
-
label:
|
|
2805
|
+
label: S.menuReportBug,
|
|
2567
2806
|
color: "#DC2626",
|
|
2568
2807
|
onTap: () => handleAction(onReportBug)
|
|
2569
2808
|
},
|
|
2570
2809
|
{
|
|
2571
2810
|
key: "feedback",
|
|
2572
2811
|
icon: "feedback",
|
|
2573
|
-
label:
|
|
2812
|
+
label: S.menuFeedback,
|
|
2574
2813
|
color: "#2563EB",
|
|
2575
2814
|
onTap: () => handleAction(onGeneralFeedback)
|
|
2576
2815
|
}
|
|
@@ -2579,7 +2818,7 @@ function FloatingFeedbackButton({
|
|
|
2579
2818
|
opts.push({
|
|
2580
2819
|
key: "auto-test",
|
|
2581
2820
|
icon: "sparkle",
|
|
2582
|
-
label:
|
|
2821
|
+
label: S.menuAutoTest,
|
|
2583
2822
|
color: "#7C3AED",
|
|
2584
2823
|
onTap: () => handleAction(onAutoTest)
|
|
2585
2824
|
});
|
|
@@ -2588,7 +2827,7 @@ function FloatingFeedbackButton({
|
|
|
2588
2827
|
opts.push({
|
|
2589
2828
|
key: "cached-crashes",
|
|
2590
2829
|
icon: "cloud_upload",
|
|
2591
|
-
label:
|
|
2830
|
+
label: S.menuCachedCrashes(notificationCount),
|
|
2592
2831
|
color: "#7C3AED",
|
|
2593
2832
|
onTap: () => handleAction(() => {
|
|
2594
2833
|
void Promise.resolve(onFlushCachedCrashes());
|
|
@@ -2598,7 +2837,7 @@ function FloatingFeedbackButton({
|
|
|
2598
2837
|
opts.push({
|
|
2599
2838
|
key: "workboard",
|
|
2600
2839
|
icon: "dashboard",
|
|
2601
|
-
label:
|
|
2840
|
+
label: S.menuWorkboard,
|
|
2602
2841
|
color: "#16A34A",
|
|
2603
2842
|
onTap: () => handleAction(onViewDashboard)
|
|
2604
2843
|
});
|
|
@@ -2606,7 +2845,7 @@ function FloatingFeedbackButton({
|
|
|
2606
2845
|
opts.push({
|
|
2607
2846
|
key: "my-bugs",
|
|
2608
2847
|
icon: "bug_report",
|
|
2609
|
-
label:
|
|
2848
|
+
label: S.menuMyBugs,
|
|
2610
2849
|
color: "#0EA5E9",
|
|
2611
2850
|
onTap: () => handleAction(onShowMyBugs)
|
|
2612
2851
|
});
|
|
@@ -2615,7 +2854,7 @@ function FloatingFeedbackButton({
|
|
|
2615
2854
|
opts.push({
|
|
2616
2855
|
key: "session-details",
|
|
2617
2856
|
icon: "trend_up",
|
|
2618
|
-
label:
|
|
2857
|
+
label: S.menuSessionDetails,
|
|
2619
2858
|
color: "#16A34A",
|
|
2620
2859
|
onTap: () => handleAction(onShowSessionDetails)
|
|
2621
2860
|
});
|
|
@@ -2624,7 +2863,7 @@ function FloatingFeedbackButton({
|
|
|
2624
2863
|
opts.push({
|
|
2625
2864
|
key: "messages",
|
|
2626
2865
|
icon: "feedback",
|
|
2627
|
-
label: unreadMessageCount > 0 ?
|
|
2866
|
+
label: unreadMessageCount > 0 ? `${S.menuMessages} (${unreadMessageCount})` : S.menuMessages,
|
|
2628
2867
|
color: unreadMessageCount > 0 ? "#0EA5E9" : "#64748B",
|
|
2629
2868
|
onTap: () => handleAction(onShowMessages)
|
|
2630
2869
|
});
|
|
@@ -2633,7 +2872,7 @@ function FloatingFeedbackButton({
|
|
|
2633
2872
|
opts.push({
|
|
2634
2873
|
key: "retests",
|
|
2635
2874
|
icon: "refresh",
|
|
2636
|
-
label: retestCount > 0 ?
|
|
2875
|
+
label: retestCount > 0 ? `${S.menuRetests} (${retestCount})` : S.menuRetests,
|
|
2637
2876
|
color: retestCount > 0 ? "#EA580C" : "#9333EA",
|
|
2638
2877
|
onTap: () => handleAction(onShowRetests)
|
|
2639
2878
|
});
|
|
@@ -2642,7 +2881,7 @@ function FloatingFeedbackButton({
|
|
|
2642
2881
|
opts.push({
|
|
2643
2882
|
key: "debug-logs",
|
|
2644
2883
|
icon: "bug_report",
|
|
2645
|
-
label:
|
|
2884
|
+
label: S.menuDebugLogs,
|
|
2646
2885
|
color: "#4F46E5",
|
|
2647
2886
|
onTap: () => handleAction(onShowDebugLogs)
|
|
2648
2887
|
});
|
|
@@ -2650,7 +2889,7 @@ function FloatingFeedbackButton({
|
|
|
2650
2889
|
opts.push({
|
|
2651
2890
|
key: "end-session",
|
|
2652
2891
|
icon: "session_end",
|
|
2653
|
-
label:
|
|
2892
|
+
label: S.menuEndSession,
|
|
2654
2893
|
color: "#EA580C",
|
|
2655
2894
|
onTap: () => handleAction(onEndSession)
|
|
2656
2895
|
});
|
|
@@ -2670,7 +2909,8 @@ function FloatingFeedbackButton({
|
|
|
2670
2909
|
onAutoTest,
|
|
2671
2910
|
onFlushCachedCrashes,
|
|
2672
2911
|
notificationCount,
|
|
2673
|
-
handleAction
|
|
2912
|
+
handleAction,
|
|
2913
|
+
S
|
|
2674
2914
|
]);
|
|
2675
2915
|
const iconRotation = expandAnim.interpolate({
|
|
2676
2916
|
inputRange: [0, 1],
|
|
@@ -2681,14 +2921,14 @@ function FloatingFeedbackButton({
|
|
|
2681
2921
|
const openLeft = pos.x + FAB_SIZE / 2 > win.width / 2;
|
|
2682
2922
|
const anchorHorizontal = openLeft ? { right: win.width - pos.x - FAB_SIZE, alignItems: "flex-end" } : { left: pos.x, alignItems: "flex-start" };
|
|
2683
2923
|
const anchorPos = openUp ? { ...anchorHorizontal, bottom: win.height - pos.y - FAB_SIZE } : { ...anchorHorizontal, top: pos.y };
|
|
2684
|
-
return /* @__PURE__ */
|
|
2924
|
+
return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(WidgetTour, { visible: tourVisible, onDone: handleTourDone }), expanded && /* @__PURE__ */ React6.createElement(
|
|
2685
2925
|
Pressable2,
|
|
2686
2926
|
{
|
|
2687
|
-
accessibilityLabel:
|
|
2927
|
+
accessibilityLabel: S.menuClose,
|
|
2688
2928
|
onPress: toggleExpanded,
|
|
2689
2929
|
style: styles2.backdrop
|
|
2690
2930
|
}
|
|
2691
|
-
), /* @__PURE__ */
|
|
2931
|
+
), /* @__PURE__ */ React6.createElement(
|
|
2692
2932
|
View2,
|
|
2693
2933
|
{
|
|
2694
2934
|
pointerEvents: "box-none",
|
|
@@ -2700,7 +2940,7 @@ function FloatingFeedbackButton({
|
|
|
2700
2940
|
],
|
|
2701
2941
|
testID
|
|
2702
2942
|
},
|
|
2703
|
-
/* @__PURE__ */
|
|
2943
|
+
/* @__PURE__ */ React6.createElement(
|
|
2704
2944
|
Animated.View,
|
|
2705
2945
|
{
|
|
2706
2946
|
pointerEvents: expanded ? "auto" : "none",
|
|
@@ -2723,20 +2963,20 @@ function FloatingFeedbackButton({
|
|
|
2723
2963
|
}
|
|
2724
2964
|
]
|
|
2725
2965
|
},
|
|
2726
|
-
sessionStartedAt && /* @__PURE__ */
|
|
2966
|
+
sessionStartedAt && /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
|
|
2727
2967
|
EarningsHeader,
|
|
2728
2968
|
{
|
|
2729
2969
|
amount: currentEarnings,
|
|
2730
2970
|
currencySymbol: currencySymbol(earningsCurrency)
|
|
2731
2971
|
}
|
|
2732
|
-
), /* @__PURE__ */
|
|
2733
|
-
menuOptions.map((opt, idx) => /* @__PURE__ */
|
|
2972
|
+
), /* @__PURE__ */ React6.createElement(View2, { style: styles2.divider })),
|
|
2973
|
+
menuOptions.map((opt, idx) => /* @__PURE__ */ React6.createElement(React6.Fragment, { key: opt.key }, idx > 0 && /* @__PURE__ */ React6.createElement(View2, { style: styles2.divider }), /* @__PURE__ */ React6.createElement(MenuRow, { option: opt })))
|
|
2734
2974
|
),
|
|
2735
|
-
/* @__PURE__ */
|
|
2975
|
+
/* @__PURE__ */ React6.createElement(View2, { ...panResponder.panHandlers }, /* @__PURE__ */ React6.createElement(
|
|
2736
2976
|
Pressable2,
|
|
2737
2977
|
{
|
|
2738
2978
|
accessibilityRole: "button",
|
|
2739
|
-
accessibilityLabel:
|
|
2979
|
+
accessibilityLabel: S.menuOpen,
|
|
2740
2980
|
onPress: handleFabTap,
|
|
2741
2981
|
onLongPress: onLongPressVoiceBug ? async () => {
|
|
2742
2982
|
if (expanded) toggleExpanded();
|
|
@@ -2748,7 +2988,7 @@ function FloatingFeedbackButton({
|
|
|
2748
2988
|
pressed && styles2.fabPressed
|
|
2749
2989
|
]
|
|
2750
2990
|
},
|
|
2751
|
-
/* @__PURE__ */
|
|
2991
|
+
/* @__PURE__ */ React6.createElement(Animated.View, { style: { transform: [{ rotate: iconRotation }] } }, /* @__PURE__ */ React6.createElement(
|
|
2752
2992
|
TpkIcon,
|
|
2753
2993
|
{
|
|
2754
2994
|
name: expanded ? "close" : "bug_report",
|
|
@@ -2756,12 +2996,12 @@ function FloatingFeedbackButton({
|
|
|
2756
2996
|
color: "#FFFFFF"
|
|
2757
2997
|
}
|
|
2758
2998
|
))
|
|
2759
|
-
), notificationCount > 0 && /* @__PURE__ */
|
|
2999
|
+
), notificationCount > 0 && /* @__PURE__ */ React6.createElement(
|
|
2760
3000
|
View2,
|
|
2761
3001
|
{
|
|
2762
3002
|
style: [styles2.badge, { borderColor: theme.errorColour }]
|
|
2763
3003
|
},
|
|
2764
|
-
/* @__PURE__ */
|
|
3004
|
+
/* @__PURE__ */ React6.createElement(
|
|
2765
3005
|
Text3,
|
|
2766
3006
|
{
|
|
2767
3007
|
style: [styles2.badgeLabel, { color: theme.errorColour }]
|
|
@@ -2775,10 +3015,11 @@ function EarningsHeader({
|
|
|
2775
3015
|
amount,
|
|
2776
3016
|
currencySymbol: currencySymbol3
|
|
2777
3017
|
}) {
|
|
2778
|
-
|
|
3018
|
+
const S = useTpkStrings();
|
|
3019
|
+
return /* @__PURE__ */ React6.createElement(View2, { style: styles2.earningsRow }, /* @__PURE__ */ React6.createElement(Text3, { style: styles2.earningsLabel }, S.menuSessionEarnings), /* @__PURE__ */ React6.createElement(Text3, { style: styles2.earningsAmount }, currencySymbol3, amount.toFixed(2)));
|
|
2779
3020
|
}
|
|
2780
3021
|
function MenuRow({ option }) {
|
|
2781
|
-
return /* @__PURE__ */
|
|
3022
|
+
return /* @__PURE__ */ React6.createElement(
|
|
2782
3023
|
Pressable2,
|
|
2783
3024
|
{
|
|
2784
3025
|
accessibilityRole: "button",
|
|
@@ -2789,7 +3030,7 @@ function MenuRow({ option }) {
|
|
|
2789
3030
|
pressed && styles2.menuRowPressed
|
|
2790
3031
|
]
|
|
2791
3032
|
},
|
|
2792
|
-
/* @__PURE__ */
|
|
3033
|
+
/* @__PURE__ */ React6.createElement(
|
|
2793
3034
|
View2,
|
|
2794
3035
|
{
|
|
2795
3036
|
style: [
|
|
@@ -2797,9 +3038,9 @@ function MenuRow({ option }) {
|
|
|
2797
3038
|
{ backgroundColor: option.color + "22" }
|
|
2798
3039
|
]
|
|
2799
3040
|
},
|
|
2800
|
-
/* @__PURE__ */
|
|
3041
|
+
/* @__PURE__ */ React6.createElement(TpkIcon, { name: option.icon, size: 18, color: option.color })
|
|
2801
3042
|
),
|
|
2802
|
-
/* @__PURE__ */
|
|
3043
|
+
/* @__PURE__ */ React6.createElement(Text3, { style: styles2.menuLabel }, option.label)
|
|
2803
3044
|
);
|
|
2804
3045
|
}
|
|
2805
3046
|
function clamp(n, min, max) {
|
|
@@ -2938,7 +3179,7 @@ var styles2 = StyleSheet2.create({
|
|
|
2938
3179
|
});
|
|
2939
3180
|
|
|
2940
3181
|
// src/BugReportSheet.tsx
|
|
2941
|
-
import
|
|
3182
|
+
import React7, {
|
|
2942
3183
|
useCallback as useCallback3,
|
|
2943
3184
|
useEffect as useEffect4,
|
|
2944
3185
|
useMemo as useMemo3,
|
|
@@ -3098,6 +3339,27 @@ function isMissingModuleError(e) {
|
|
|
3098
3339
|
return /Cannot find module|react-native-view-shot/.test(msg);
|
|
3099
3340
|
}
|
|
3100
3341
|
|
|
3342
|
+
// src/safe-area.ts
|
|
3343
|
+
import { Platform as Platform3, StatusBar } from "react-native";
|
|
3344
|
+
var safeArea = null;
|
|
3345
|
+
void (async () => {
|
|
3346
|
+
try {
|
|
3347
|
+
safeArea = await import("react-native-safe-area-context");
|
|
3348
|
+
} catch {
|
|
3349
|
+
}
|
|
3350
|
+
})();
|
|
3351
|
+
function getModalInsets() {
|
|
3352
|
+
const insets = safeArea?.initialWindowMetrics?.insets;
|
|
3353
|
+
if (insets && typeof insets.top === "number") {
|
|
3354
|
+
return { top: insets.top, bottom: insets.bottom ?? 0 };
|
|
3355
|
+
}
|
|
3356
|
+
if (Platform3.OS === "android") {
|
|
3357
|
+
return { top: StatusBar.currentHeight ?? 0, bottom: 0 };
|
|
3358
|
+
}
|
|
3359
|
+
if (Platform3.OS === "ios") return { top: 54, bottom: 34 };
|
|
3360
|
+
return { top: 0, bottom: 0 };
|
|
3361
|
+
}
|
|
3362
|
+
|
|
3101
3363
|
// src/BugReportSheet.tsx
|
|
3102
3364
|
function createBugReportDraft(input = {}) {
|
|
3103
3365
|
const reproductionSteps = input.reproductionSteps ? [...input.reproductionSteps] : input.reproductionStepsText ? input.reproductionStepsText.split(/\r?\n/).map((s) => s.trim()).filter(Boolean) : [];
|
|
@@ -3154,77 +3416,60 @@ async function submitBugReportDraft(tpk, draft) {
|
|
|
3154
3416
|
}
|
|
3155
3417
|
return result;
|
|
3156
3418
|
}
|
|
3157
|
-
var STEP_TITLES = [
|
|
3158
|
-
"Bug Type",
|
|
3159
|
-
"Severity",
|
|
3160
|
-
"Details",
|
|
3161
|
-
"Steps",
|
|
3162
|
-
"Review"
|
|
3163
|
-
];
|
|
3164
3419
|
var BUG_TYPES = [
|
|
3165
|
-
{ value: "bug", label: "
|
|
3166
|
-
{
|
|
3167
|
-
|
|
3168
|
-
label: "Crash",
|
|
3169
|
-
icon: "crash",
|
|
3170
|
-
description: "App closed unexpectedly"
|
|
3171
|
-
},
|
|
3172
|
-
{
|
|
3173
|
-
value: "uiIssue",
|
|
3174
|
-
label: "UI issue",
|
|
3175
|
-
icon: "palette",
|
|
3176
|
-
description: "Layout or visual problem"
|
|
3177
|
-
},
|
|
3420
|
+
{ value: "bug", label: "typeBug", icon: "bug_report", description: "typeBugDescription" },
|
|
3421
|
+
{ value: "crash", label: "typeCrash", icon: "crash", description: "typeCrashDescription" },
|
|
3422
|
+
{ value: "uiIssue", label: "typeUiIssue", icon: "palette", description: "typeUiIssueDescription" },
|
|
3178
3423
|
{
|
|
3179
3424
|
value: "performance",
|
|
3180
|
-
label: "
|
|
3425
|
+
label: "typePerformance",
|
|
3181
3426
|
icon: "speed_slow",
|
|
3182
|
-
description: "
|
|
3427
|
+
description: "typePerformanceDescription"
|
|
3183
3428
|
},
|
|
3184
3429
|
{
|
|
3185
3430
|
value: "featureRequest",
|
|
3186
|
-
label: "
|
|
3431
|
+
label: "typeFeature",
|
|
3187
3432
|
icon: "sparkle",
|
|
3188
|
-
description: "
|
|
3433
|
+
description: "typeFeatureDescription"
|
|
3189
3434
|
},
|
|
3190
3435
|
{
|
|
3191
3436
|
value: "generalFeedback",
|
|
3192
|
-
label: "
|
|
3437
|
+
label: "typeFeedback",
|
|
3193
3438
|
icon: "feedback",
|
|
3194
|
-
description: "
|
|
3439
|
+
description: "typeFeedbackDescription"
|
|
3195
3440
|
}
|
|
3196
3441
|
];
|
|
3197
3442
|
var SEVERITIES = [
|
|
3198
3443
|
{
|
|
3199
3444
|
value: "critical",
|
|
3200
|
-
label: "
|
|
3445
|
+
label: "severityCritical",
|
|
3201
3446
|
color: "#B91C1C",
|
|
3202
|
-
description: "
|
|
3447
|
+
description: "severityCriticalDescription"
|
|
3203
3448
|
},
|
|
3204
3449
|
{
|
|
3205
3450
|
value: "high",
|
|
3206
|
-
label: "
|
|
3451
|
+
label: "severityHigh",
|
|
3207
3452
|
color: "#EA580C",
|
|
3208
|
-
description: "
|
|
3453
|
+
description: "severityHighDescription"
|
|
3209
3454
|
},
|
|
3210
3455
|
{
|
|
3211
3456
|
value: "medium",
|
|
3212
|
-
label: "
|
|
3457
|
+
label: "severityMedium",
|
|
3213
3458
|
color: "#CA8A04",
|
|
3214
|
-
description: "
|
|
3459
|
+
description: "severityMediumDescription"
|
|
3215
3460
|
},
|
|
3216
3461
|
{
|
|
3217
3462
|
value: "low",
|
|
3218
|
-
label: "
|
|
3463
|
+
label: "severityLow",
|
|
3219
3464
|
color: "#16A34A",
|
|
3220
|
-
description: "
|
|
3465
|
+
description: "severityLowDescription"
|
|
3221
3466
|
}
|
|
3222
3467
|
];
|
|
3223
3468
|
var FREQUENCIES = [
|
|
3224
|
-
{ value: "always", label: "
|
|
3225
|
-
{ value: "often", label: "
|
|
3226
|
-
{ value: "sometimes", label: "
|
|
3227
|
-
{ value: "once", label: "
|
|
3469
|
+
{ value: "always", label: "frequencyAlways" },
|
|
3470
|
+
{ value: "often", label: "frequencyOften" },
|
|
3471
|
+
{ value: "sometimes", label: "frequencySometimes" },
|
|
3472
|
+
{ value: "once", label: "frequencyOnce" }
|
|
3228
3473
|
];
|
|
3229
3474
|
var DEFAULT_MAX_ATTACHMENTS = 10;
|
|
3230
3475
|
var DEFAULT_MAX_TOTAL_MB = 25;
|
|
@@ -3245,6 +3490,7 @@ function BugReportSheet({
|
|
|
3245
3490
|
maxTotalSizeMB = DEFAULT_MAX_TOTAL_MB,
|
|
3246
3491
|
style
|
|
3247
3492
|
}) {
|
|
3493
|
+
const S = useTpkStrings();
|
|
3248
3494
|
const initialDraft = useMemo3(() => {
|
|
3249
3495
|
const base = createBugReportDraft({
|
|
3250
3496
|
currentScreen,
|
|
@@ -3311,9 +3557,7 @@ function BugReportSheet({
|
|
|
3311
3557
|
const response = await submitBugReportDraft(tpk, draft);
|
|
3312
3558
|
onSubmitted?.(response);
|
|
3313
3559
|
if (response.outcome === "failedPermanent") {
|
|
3314
|
-
setSubmitBanner(
|
|
3315
|
-
"Could not submit \u2014 the server rejected the report (your tester session may have expired). Your draft is kept; please try again."
|
|
3316
|
-
);
|
|
3560
|
+
setSubmitBanner(S.errorRejected);
|
|
3317
3561
|
return;
|
|
3318
3562
|
}
|
|
3319
3563
|
onClose();
|
|
@@ -3321,7 +3565,7 @@ function BugReportSheet({
|
|
|
3321
3565
|
onError?.(
|
|
3322
3566
|
cause instanceof Error ? cause : new Error("Bug report failed.")
|
|
3323
3567
|
);
|
|
3324
|
-
setSubmitBanner(
|
|
3568
|
+
setSubmitBanner(S.errorFailed);
|
|
3325
3569
|
} finally {
|
|
3326
3570
|
setSubmitting(false);
|
|
3327
3571
|
}
|
|
@@ -3330,7 +3574,7 @@ function BugReportSheet({
|
|
|
3330
3574
|
(att) => {
|
|
3331
3575
|
setDraft((cur) => {
|
|
3332
3576
|
if (cur.attachments.length >= maxAttachments) {
|
|
3333
|
-
setAttachmentError(
|
|
3577
|
+
setAttachmentError(S.errorAttachmentLimit(maxAttachments));
|
|
3334
3578
|
return cur;
|
|
3335
3579
|
}
|
|
3336
3580
|
const nextBytes = cur.attachments.reduce(
|
|
@@ -3339,14 +3583,14 @@ function BugReportSheet({
|
|
|
3339
3583
|
);
|
|
3340
3584
|
const addBytes = att.byteLength ?? att.base64.length;
|
|
3341
3585
|
if ((nextBytes + addBytes) / 1024 / 1024 > maxTotalSizeMB) {
|
|
3342
|
-
setAttachmentError(
|
|
3586
|
+
setAttachmentError(S.errorAttachmentSize(maxTotalSizeMB));
|
|
3343
3587
|
return cur;
|
|
3344
3588
|
}
|
|
3345
3589
|
setAttachmentError(null);
|
|
3346
3590
|
return { ...cur, attachments: [...cur.attachments, att] };
|
|
3347
3591
|
});
|
|
3348
3592
|
},
|
|
3349
|
-
[maxAttachments, maxTotalSizeMB]
|
|
3593
|
+
[maxAttachments, maxTotalSizeMB, S]
|
|
3350
3594
|
);
|
|
3351
3595
|
const removeAttachment = useCallback3((id) => {
|
|
3352
3596
|
setDraft((cur) => ({
|
|
@@ -3356,9 +3600,7 @@ function BugReportSheet({
|
|
|
3356
3600
|
}, []);
|
|
3357
3601
|
const captureScreenshot = useCallback3(async () => {
|
|
3358
3602
|
if (!captureRootRef) {
|
|
3359
|
-
setAttachmentError(
|
|
3360
|
-
"No view ref provided \u2014 capture is disabled."
|
|
3361
|
-
);
|
|
3603
|
+
setAttachmentError(S.errorNoCaptureRef);
|
|
3362
3604
|
return;
|
|
3363
3605
|
}
|
|
3364
3606
|
try {
|
|
@@ -3367,7 +3609,7 @@ function BugReportSheet({
|
|
|
3367
3609
|
redactSensitive: true
|
|
3368
3610
|
});
|
|
3369
3611
|
if (!result) {
|
|
3370
|
-
setAttachmentError(
|
|
3612
|
+
setAttachmentError(S.errorNeedsViewShot);
|
|
3371
3613
|
return;
|
|
3372
3614
|
}
|
|
3373
3615
|
addAttachment({
|
|
@@ -3380,10 +3622,10 @@ function BugReportSheet({
|
|
|
3380
3622
|
});
|
|
3381
3623
|
} catch (e) {
|
|
3382
3624
|
setAttachmentError(
|
|
3383
|
-
e instanceof Error ? e.message :
|
|
3625
|
+
e instanceof Error ? e.message : S.errorScreenshotFailed
|
|
3384
3626
|
);
|
|
3385
3627
|
}
|
|
3386
|
-
}, [captureRootRef, addAttachment]);
|
|
3628
|
+
}, [captureRootRef, addAttachment, S]);
|
|
3387
3629
|
const autoCapturedRef = useRef4(false);
|
|
3388
3630
|
useEffect4(() => {
|
|
3389
3631
|
if (!visible) {
|
|
@@ -3401,7 +3643,7 @@ function BugReportSheet({
|
|
|
3401
3643
|
try {
|
|
3402
3644
|
const mod = await import("expo-image-picker");
|
|
3403
3645
|
if (!mod.launchImageLibraryAsync) {
|
|
3404
|
-
setAttachmentError(
|
|
3646
|
+
setAttachmentError(S.errorNeedsImagePicker);
|
|
3405
3647
|
return;
|
|
3406
3648
|
}
|
|
3407
3649
|
const res = await mod.launchImageLibraryAsync({
|
|
@@ -3412,7 +3654,7 @@ function BugReportSheet({
|
|
|
3412
3654
|
if (res.canceled || !res.assets || res.assets.length === 0) return;
|
|
3413
3655
|
const asset = res.assets[0];
|
|
3414
3656
|
if (!asset.base64) {
|
|
3415
|
-
setAttachmentError(
|
|
3657
|
+
setAttachmentError(S.errorImageNoData);
|
|
3416
3658
|
return;
|
|
3417
3659
|
}
|
|
3418
3660
|
addAttachment({
|
|
@@ -3425,15 +3667,15 @@ function BugReportSheet({
|
|
|
3425
3667
|
});
|
|
3426
3668
|
} catch (e) {
|
|
3427
3669
|
setAttachmentError(
|
|
3428
|
-
e instanceof Error ? e.message :
|
|
3670
|
+
e instanceof Error ? e.message : S.errorImagePickFailed
|
|
3429
3671
|
);
|
|
3430
3672
|
}
|
|
3431
|
-
}, [addAttachment]);
|
|
3673
|
+
}, [addAttachment, S]);
|
|
3432
3674
|
const pickFile = useCallback3(async () => {
|
|
3433
3675
|
try {
|
|
3434
3676
|
const mod = await import("expo-document-picker");
|
|
3435
3677
|
if (!mod.getDocumentAsync) {
|
|
3436
|
-
setAttachmentError(
|
|
3678
|
+
setAttachmentError(S.errorNeedsDocumentPicker);
|
|
3437
3679
|
return;
|
|
3438
3680
|
}
|
|
3439
3681
|
const res = await mod.getDocumentAsync({});
|
|
@@ -3450,7 +3692,7 @@ function BugReportSheet({
|
|
|
3450
3692
|
} catch {
|
|
3451
3693
|
}
|
|
3452
3694
|
if (!base64) {
|
|
3453
|
-
setAttachmentError(
|
|
3695
|
+
setAttachmentError(S.errorFileUnreadable);
|
|
3454
3696
|
return;
|
|
3455
3697
|
}
|
|
3456
3698
|
addAttachment({
|
|
@@ -3463,13 +3705,14 @@ function BugReportSheet({
|
|
|
3463
3705
|
});
|
|
3464
3706
|
} catch (e) {
|
|
3465
3707
|
setAttachmentError(
|
|
3466
|
-
e instanceof Error ? e.message :
|
|
3708
|
+
e instanceof Error ? e.message : S.errorFilePickFailed
|
|
3467
3709
|
);
|
|
3468
3710
|
}
|
|
3469
|
-
}, [addAttachment]);
|
|
3711
|
+
}, [addAttachment, S]);
|
|
3712
|
+
const insets = getModalInsets();
|
|
3470
3713
|
const isFinalStep = step === 4;
|
|
3471
3714
|
const canContinue = step === 2 ? canSubmitBugReportDraft(draft) : true;
|
|
3472
|
-
return /* @__PURE__ */
|
|
3715
|
+
return /* @__PURE__ */ React7.createElement(
|
|
3473
3716
|
Modal2,
|
|
3474
3717
|
{
|
|
3475
3718
|
animationType: "slide",
|
|
@@ -3477,25 +3720,26 @@ function BugReportSheet({
|
|
|
3477
3720
|
transparent: false,
|
|
3478
3721
|
visible
|
|
3479
3722
|
},
|
|
3480
|
-
/* @__PURE__ */
|
|
3723
|
+
/* @__PURE__ */ React7.createElement(View3, { style: [styles3.root, style] }, /* @__PURE__ */ React7.createElement(
|
|
3481
3724
|
Header,
|
|
3482
3725
|
{
|
|
3726
|
+
topInset: insets.top,
|
|
3483
3727
|
onClose,
|
|
3484
3728
|
onOpenVoiceBug
|
|
3485
3729
|
}
|
|
3486
|
-
), /* @__PURE__ */
|
|
3730
|
+
), /* @__PURE__ */ React7.createElement(StepIndicator, { current: step }), /* @__PURE__ */ React7.createElement(ScrollView2, { contentContainerStyle: styles3.body }, step === 0 && /* @__PURE__ */ React7.createElement(
|
|
3487
3731
|
TypeSelectionStep,
|
|
3488
3732
|
{
|
|
3489
3733
|
selected: draft.type,
|
|
3490
3734
|
onSelect: (type) => patchDraft({ type })
|
|
3491
3735
|
}
|
|
3492
|
-
), step === 1 && /* @__PURE__ */
|
|
3736
|
+
), step === 1 && /* @__PURE__ */ React7.createElement(
|
|
3493
3737
|
SeveritySelectionStep,
|
|
3494
3738
|
{
|
|
3495
3739
|
selected: draft.severity,
|
|
3496
3740
|
onSelect: (severity) => patchDraft({ severity })
|
|
3497
3741
|
}
|
|
3498
|
-
), step === 2 && /* @__PURE__ */
|
|
3742
|
+
), step === 2 && /* @__PURE__ */ React7.createElement(
|
|
3499
3743
|
DetailsStep,
|
|
3500
3744
|
{
|
|
3501
3745
|
draft,
|
|
@@ -3511,7 +3755,7 @@ function BugReportSheet({
|
|
|
3511
3755
|
onRemoveAttachment: removeAttachment,
|
|
3512
3756
|
captureAvailable: !!captureRootRef
|
|
3513
3757
|
}
|
|
3514
|
-
), step === 3 && /* @__PURE__ */
|
|
3758
|
+
), step === 3 && /* @__PURE__ */ React7.createElement(
|
|
3515
3759
|
ReproStepsStep,
|
|
3516
3760
|
{
|
|
3517
3761
|
steps: draft.reproductionSteps,
|
|
@@ -3534,17 +3778,18 @@ function BugReportSheet({
|
|
|
3534
3778
|
}),
|
|
3535
3779
|
onReorder: (next) => patchDraft({ reproductionSteps: next })
|
|
3536
3780
|
}
|
|
3537
|
-
), step === 4 && /* @__PURE__ */
|
|
3781
|
+
), step === 4 && /* @__PURE__ */ React7.createElement(ReviewStep, { draft })), submitBanner && /* @__PURE__ */ React7.createElement(
|
|
3538
3782
|
View3,
|
|
3539
3783
|
{
|
|
3540
3784
|
accessibilityRole: "alert",
|
|
3541
3785
|
accessibilityLabel: submitBanner,
|
|
3542
3786
|
style: styles3.submitBanner
|
|
3543
3787
|
},
|
|
3544
|
-
/* @__PURE__ */
|
|
3545
|
-
), /* @__PURE__ */
|
|
3788
|
+
/* @__PURE__ */ React7.createElement(Text4, { style: styles3.submitBannerText }, submitBanner)
|
|
3789
|
+
), /* @__PURE__ */ React7.createElement(
|
|
3546
3790
|
Footer,
|
|
3547
3791
|
{
|
|
3792
|
+
bottomInset: insets.bottom,
|
|
3548
3793
|
step,
|
|
3549
3794
|
isFinalStep,
|
|
3550
3795
|
submitting,
|
|
@@ -3557,39 +3802,42 @@ function BugReportSheet({
|
|
|
3557
3802
|
);
|
|
3558
3803
|
}
|
|
3559
3804
|
function Header({
|
|
3805
|
+
topInset,
|
|
3560
3806
|
onClose,
|
|
3561
3807
|
onOpenVoiceBug
|
|
3562
3808
|
}) {
|
|
3563
3809
|
const theme = useTpkTheme();
|
|
3564
|
-
|
|
3810
|
+
const S = useTpkStrings();
|
|
3811
|
+
return /* @__PURE__ */ React7.createElement(View3, { style: [styles3.header, { paddingTop: 12 + topInset }] }, /* @__PURE__ */ React7.createElement(
|
|
3565
3812
|
Pressable3,
|
|
3566
3813
|
{
|
|
3567
3814
|
accessibilityRole: "button",
|
|
3568
|
-
accessibilityLabel:
|
|
3815
|
+
accessibilityLabel: S.reportClose,
|
|
3569
3816
|
onPress: onClose,
|
|
3570
3817
|
style: styles3.headerIconButton
|
|
3571
3818
|
},
|
|
3572
|
-
/* @__PURE__ */
|
|
3573
|
-
), /* @__PURE__ */
|
|
3819
|
+
/* @__PURE__ */ React7.createElement(TpkIcon, { name: "close", size: 22, color: theme.onSurface })
|
|
3820
|
+
), /* @__PURE__ */ React7.createElement(View3, { style: styles3.headerTitleRow }, /* @__PURE__ */ React7.createElement(TpkIcon, { name: "bug_report", size: 22, color: theme.errorColour }), /* @__PURE__ */ React7.createElement(Text4, { style: styles3.headerTitle }, S.reportTitle)), onOpenVoiceBug && /* @__PURE__ */ React7.createElement(
|
|
3574
3821
|
Pressable3,
|
|
3575
3822
|
{
|
|
3576
3823
|
accessibilityRole: "button",
|
|
3577
|
-
accessibilityLabel:
|
|
3824
|
+
accessibilityLabel: S.reportSpeak,
|
|
3578
3825
|
onPress: () => {
|
|
3579
3826
|
void onOpenVoiceBug();
|
|
3580
3827
|
},
|
|
3581
3828
|
style: styles3.headerIconButton
|
|
3582
3829
|
},
|
|
3583
|
-
/* @__PURE__ */
|
|
3830
|
+
/* @__PURE__ */ React7.createElement(TpkIcon, { name: "voice", size: 22, color: theme.onSurface })
|
|
3584
3831
|
));
|
|
3585
3832
|
}
|
|
3586
3833
|
function StepIndicator({
|
|
3587
3834
|
current
|
|
3588
3835
|
}) {
|
|
3589
|
-
|
|
3836
|
+
const S = useTpkStrings();
|
|
3837
|
+
return /* @__PURE__ */ React7.createElement(View3, { style: styles3.indicator }, S.stepTitles.map((title, idx) => {
|
|
3590
3838
|
const active = idx === current;
|
|
3591
3839
|
const done = idx < current;
|
|
3592
|
-
return /* @__PURE__ */
|
|
3840
|
+
return /* @__PURE__ */ React7.createElement(View3, { key: title, style: styles3.indicatorStepWrap }, /* @__PURE__ */ React7.createElement(
|
|
3593
3841
|
View3,
|
|
3594
3842
|
{
|
|
3595
3843
|
style: [
|
|
@@ -3597,7 +3845,7 @@ function StepIndicator({
|
|
|
3597
3845
|
active ? styles3.indicatorDotActive : done ? styles3.indicatorDotDone : styles3.indicatorDotIdle
|
|
3598
3846
|
]
|
|
3599
3847
|
},
|
|
3600
|
-
done ? /* @__PURE__ */
|
|
3848
|
+
done ? /* @__PURE__ */ React7.createElement(TpkIcon, { name: "check", size: 14, color: "#FFFFFF" }) : /* @__PURE__ */ React7.createElement(
|
|
3601
3849
|
Text4,
|
|
3602
3850
|
{
|
|
3603
3851
|
style: [
|
|
@@ -3607,7 +3855,7 @@ function StepIndicator({
|
|
|
3607
3855
|
},
|
|
3608
3856
|
String(idx + 1)
|
|
3609
3857
|
)
|
|
3610
|
-
), /* @__PURE__ */
|
|
3858
|
+
), /* @__PURE__ */ React7.createElement(
|
|
3611
3859
|
Text4,
|
|
3612
3860
|
{
|
|
3613
3861
|
style: [
|
|
@@ -3621,6 +3869,7 @@ function StepIndicator({
|
|
|
3621
3869
|
}));
|
|
3622
3870
|
}
|
|
3623
3871
|
function Footer({
|
|
3872
|
+
bottomInset,
|
|
3624
3873
|
step,
|
|
3625
3874
|
isFinalStep,
|
|
3626
3875
|
submitting,
|
|
@@ -3630,7 +3879,8 @@ function Footer({
|
|
|
3630
3879
|
onNext
|
|
3631
3880
|
}) {
|
|
3632
3881
|
const theme = useTpkTheme();
|
|
3633
|
-
|
|
3882
|
+
const S = useTpkStrings();
|
|
3883
|
+
return /* @__PURE__ */ React7.createElement(View3, { style: [styles3.footer, { paddingBottom: Math.max(16, bottomInset) }] }, /* @__PURE__ */ React7.createElement(
|
|
3634
3884
|
Pressable3,
|
|
3635
3885
|
{
|
|
3636
3886
|
accessibilityRole: "button",
|
|
@@ -3641,8 +3891,8 @@ function Footer({
|
|
|
3641
3891
|
pressed && { opacity: 0.7 }
|
|
3642
3892
|
]
|
|
3643
3893
|
},
|
|
3644
|
-
/* @__PURE__ */
|
|
3645
|
-
), /* @__PURE__ */
|
|
3894
|
+
/* @__PURE__ */ React7.createElement(Text4, { style: styles3.footerSecondaryLabel }, step === 0 ? S.cancel : S.back)
|
|
3895
|
+
), /* @__PURE__ */ React7.createElement(
|
|
3646
3896
|
Pressable3,
|
|
3647
3897
|
{
|
|
3648
3898
|
accessibilityRole: "button",
|
|
@@ -3655,22 +3905,23 @@ function Footer({
|
|
|
3655
3905
|
pressed && { opacity: 0.85 }
|
|
3656
3906
|
]
|
|
3657
3907
|
},
|
|
3658
|
-
submitting ? /* @__PURE__ */
|
|
3908
|
+
submitting ? /* @__PURE__ */ React7.createElement(ActivityIndicator, { color: "#FAFAF7" }) : /* @__PURE__ */ React7.createElement(Text4, { style: styles3.footerPrimaryLabel }, isFinalStep ? S.submit : S.continue)
|
|
3659
3909
|
));
|
|
3660
3910
|
}
|
|
3661
3911
|
function TypeSelectionStep({
|
|
3662
3912
|
selected,
|
|
3663
3913
|
onSelect
|
|
3664
3914
|
}) {
|
|
3665
|
-
|
|
3915
|
+
const S = useTpkStrings();
|
|
3916
|
+
return /* @__PURE__ */ React7.createElement(View3, { style: styles3.cardList }, BUG_TYPES.map((opt) => /* @__PURE__ */ React7.createElement(
|
|
3666
3917
|
SelectableCard,
|
|
3667
3918
|
{
|
|
3668
3919
|
key: opt.value,
|
|
3669
3920
|
active: selected === opt.value,
|
|
3670
3921
|
onPress: () => onSelect(opt.value),
|
|
3671
3922
|
icon: opt.icon,
|
|
3672
|
-
label: opt.label,
|
|
3673
|
-
description: opt.description
|
|
3923
|
+
label: S[opt.label],
|
|
3924
|
+
description: S[opt.description]
|
|
3674
3925
|
}
|
|
3675
3926
|
)));
|
|
3676
3927
|
}
|
|
@@ -3678,15 +3929,16 @@ function SeveritySelectionStep({
|
|
|
3678
3929
|
selected,
|
|
3679
3930
|
onSelect
|
|
3680
3931
|
}) {
|
|
3681
|
-
|
|
3932
|
+
const S = useTpkStrings();
|
|
3933
|
+
return /* @__PURE__ */ React7.createElement(View3, { style: styles3.cardList }, SEVERITIES.map((opt) => /* @__PURE__ */ React7.createElement(
|
|
3682
3934
|
SelectableCard,
|
|
3683
3935
|
{
|
|
3684
3936
|
key: opt.value,
|
|
3685
3937
|
active: selected === opt.value,
|
|
3686
3938
|
onPress: () => onSelect(opt.value),
|
|
3687
3939
|
dotColor: opt.color,
|
|
3688
|
-
label: opt.label,
|
|
3689
|
-
description: opt.description
|
|
3940
|
+
label: S[opt.label],
|
|
3941
|
+
description: S[opt.description]
|
|
3690
3942
|
}
|
|
3691
3943
|
)));
|
|
3692
3944
|
}
|
|
@@ -3704,46 +3956,47 @@ function DetailsStep({
|
|
|
3704
3956
|
onRemoveAttachment,
|
|
3705
3957
|
captureAvailable
|
|
3706
3958
|
}) {
|
|
3707
|
-
|
|
3959
|
+
const S = useTpkStrings();
|
|
3960
|
+
return /* @__PURE__ */ React7.createElement(View3, { style: styles3.detailsCol }, /* @__PURE__ */ React7.createElement(FieldLabel, { text: S.fieldTitle, required: true }), /* @__PURE__ */ React7.createElement(
|
|
3708
3961
|
TextInput,
|
|
3709
3962
|
{
|
|
3710
3963
|
autoFocus: true,
|
|
3711
3964
|
onChangeText: (title) => onPatch({ title }),
|
|
3712
|
-
placeholder:
|
|
3965
|
+
placeholder: S.fieldTitlePlaceholder,
|
|
3713
3966
|
style: styles3.input,
|
|
3714
3967
|
value: draft.title
|
|
3715
3968
|
}
|
|
3716
|
-
), /* @__PURE__ */
|
|
3969
|
+
), /* @__PURE__ */ React7.createElement(FieldLabel, { text: S.fieldDescription, required: true }), /* @__PURE__ */ React7.createElement(
|
|
3717
3970
|
TextInput,
|
|
3718
3971
|
{
|
|
3719
3972
|
multiline: true,
|
|
3720
3973
|
onChangeText: (description) => onPatch({ description }),
|
|
3721
|
-
placeholder:
|
|
3974
|
+
placeholder: S.fieldDescriptionPlaceholder,
|
|
3722
3975
|
style: [styles3.input, styles3.textarea],
|
|
3723
3976
|
textAlignVertical: "top",
|
|
3724
3977
|
value: draft.description
|
|
3725
3978
|
}
|
|
3726
|
-
), /* @__PURE__ */
|
|
3979
|
+
), /* @__PURE__ */ React7.createElement(FieldLabel, { text: S.fieldExpected }), /* @__PURE__ */ React7.createElement(
|
|
3727
3980
|
TextInput,
|
|
3728
3981
|
{
|
|
3729
3982
|
multiline: true,
|
|
3730
3983
|
onChangeText: (expectedBehavior) => onPatch({ expectedBehavior }),
|
|
3731
|
-
placeholder:
|
|
3984
|
+
placeholder: S.fieldExpectedPlaceholder,
|
|
3732
3985
|
style: [styles3.input, styles3.textareaSmall],
|
|
3733
3986
|
textAlignVertical: "top",
|
|
3734
3987
|
value: draft.expectedBehavior
|
|
3735
3988
|
}
|
|
3736
|
-
), /* @__PURE__ */
|
|
3989
|
+
), /* @__PURE__ */ React7.createElement(FieldLabel, { text: S.fieldActual }), /* @__PURE__ */ React7.createElement(
|
|
3737
3990
|
TextInput,
|
|
3738
3991
|
{
|
|
3739
3992
|
multiline: true,
|
|
3740
3993
|
onChangeText: (actualBehavior) => onPatch({ actualBehavior }),
|
|
3741
|
-
placeholder:
|
|
3994
|
+
placeholder: S.fieldActualPlaceholder,
|
|
3742
3995
|
style: [styles3.input, styles3.textareaSmall],
|
|
3743
3996
|
textAlignVertical: "top",
|
|
3744
3997
|
value: draft.actualBehavior
|
|
3745
3998
|
}
|
|
3746
|
-
), /* @__PURE__ */
|
|
3999
|
+
), /* @__PURE__ */ React7.createElement(FieldLabel, { text: S.fieldFrequency }), /* @__PURE__ */ React7.createElement(View3, { style: styles3.frequencyRow }, FREQUENCIES.map((f) => /* @__PURE__ */ React7.createElement(
|
|
3747
4000
|
Pressable3,
|
|
3748
4001
|
{
|
|
3749
4002
|
key: f.value,
|
|
@@ -3755,7 +4008,7 @@ function DetailsStep({
|
|
|
3755
4008
|
draft.frequency === f.value && styles3.chipActive
|
|
3756
4009
|
]
|
|
3757
4010
|
},
|
|
3758
|
-
/* @__PURE__ */
|
|
4011
|
+
/* @__PURE__ */ React7.createElement(
|
|
3759
4012
|
Text4,
|
|
3760
4013
|
{
|
|
3761
4014
|
style: [
|
|
@@ -3763,31 +4016,31 @@ function DetailsStep({
|
|
|
3763
4016
|
draft.frequency === f.value && styles3.chipLabelActive
|
|
3764
4017
|
]
|
|
3765
4018
|
},
|
|
3766
|
-
f.label
|
|
4019
|
+
S[f.label]
|
|
3767
4020
|
)
|
|
3768
|
-
))), /* @__PURE__ */
|
|
4021
|
+
))), /* @__PURE__ */ React7.createElement(FieldLabel, { text: S.fieldComponent }), /* @__PURE__ */ React7.createElement(
|
|
3769
4022
|
TextInput,
|
|
3770
4023
|
{
|
|
3771
4024
|
onChangeText: (affectedComponent) => onPatch({ affectedComponent }),
|
|
3772
|
-
placeholder:
|
|
4025
|
+
placeholder: S.fieldComponentPlaceholder,
|
|
3773
4026
|
style: styles3.input,
|
|
3774
4027
|
value: draft.affectedComponent ?? ""
|
|
3775
4028
|
}
|
|
3776
|
-
), /* @__PURE__ */
|
|
4029
|
+
), /* @__PURE__ */ React7.createElement(View3, { style: styles3.attachmentsHeader }, /* @__PURE__ */ React7.createElement(
|
|
3777
4030
|
FieldLabel,
|
|
3778
4031
|
{
|
|
3779
|
-
text:
|
|
4032
|
+
text: `${S.attachments} \xB7 ${attachments.length}/${maxAttachments} \xB7 ${totalSizeMB.toFixed(
|
|
3780
4033
|
1
|
|
3781
4034
|
)}/${maxTotalSizeMB} MB`
|
|
3782
4035
|
}
|
|
3783
|
-
)), /* @__PURE__ */
|
|
4036
|
+
)), /* @__PURE__ */ React7.createElement(View3, { style: styles3.captureRow }, captureAvailable && /* @__PURE__ */ React7.createElement(
|
|
3784
4037
|
CaptureButton,
|
|
3785
4038
|
{
|
|
3786
4039
|
icon: "camera",
|
|
3787
|
-
label:
|
|
4040
|
+
label: S.attachScreenshot,
|
|
3788
4041
|
onPress: onCaptureScreenshot
|
|
3789
4042
|
}
|
|
3790
|
-
), /* @__PURE__ */
|
|
4043
|
+
), /* @__PURE__ */ React7.createElement(CaptureButton, { icon: "image", label: S.attachImage, onPress: onPickImage }), /* @__PURE__ */ React7.createElement(CaptureButton, { icon: "attachment", label: S.attachFile, onPress: onPickFile })), attachmentError && /* @__PURE__ */ React7.createElement(Text4, { style: styles3.attachmentError }, attachmentError), attachments.length > 0 && /* @__PURE__ */ React7.createElement(View3, { style: styles3.attachmentList }, attachments.map((att) => /* @__PURE__ */ React7.createElement(
|
|
3791
4044
|
AttachmentRow,
|
|
3792
4045
|
{
|
|
3793
4046
|
key: att.id,
|
|
@@ -3812,6 +4065,7 @@ function ReproStepsStep({
|
|
|
3812
4065
|
onRemove,
|
|
3813
4066
|
onReorder
|
|
3814
4067
|
}) {
|
|
4068
|
+
const S = useTpkStrings();
|
|
3815
4069
|
const items = steps.map((text, index) => ({
|
|
3816
4070
|
// Index + text prefix → keys remain unique across reorders even
|
|
3817
4071
|
// when two steps share the same text.
|
|
@@ -3819,40 +4073,40 @@ function ReproStepsStep({
|
|
|
3819
4073
|
text,
|
|
3820
4074
|
index
|
|
3821
4075
|
}));
|
|
3822
|
-
const renderStep = (item, drag) => /* @__PURE__ */
|
|
4076
|
+
const renderStep = (item, drag) => /* @__PURE__ */ React7.createElement(View3, { style: styles3.stepRow }, drag && /* @__PURE__ */ React7.createElement(
|
|
3823
4077
|
Pressable3,
|
|
3824
4078
|
{
|
|
3825
4079
|
accessibilityRole: "button",
|
|
3826
|
-
accessibilityLabel:
|
|
4080
|
+
accessibilityLabel: S.stepsDragA11y(item.index + 1),
|
|
3827
4081
|
onLongPress: drag,
|
|
3828
4082
|
delayLongPress: 150,
|
|
3829
4083
|
style: styles3.stepDragHandle
|
|
3830
4084
|
},
|
|
3831
|
-
/* @__PURE__ */
|
|
3832
|
-
), /* @__PURE__ */
|
|
4085
|
+
/* @__PURE__ */ React7.createElement(Text4, { style: styles3.stepDragHandleGlyph }, "\u2261")
|
|
4086
|
+
), /* @__PURE__ */ React7.createElement(View3, { style: styles3.stepNumber }, /* @__PURE__ */ React7.createElement(Text4, { style: styles3.stepNumberLabel }, item.index + 1)), /* @__PURE__ */ React7.createElement(Text4, { style: [styles3.stepText, styles3.flex1] }, item.text), /* @__PURE__ */ React7.createElement(
|
|
3833
4087
|
Pressable3,
|
|
3834
4088
|
{
|
|
3835
4089
|
accessibilityRole: "button",
|
|
3836
|
-
accessibilityLabel:
|
|
4090
|
+
accessibilityLabel: S.stepsRemoveA11y(item.index + 1),
|
|
3837
4091
|
onPress: () => onRemove(item.index),
|
|
3838
4092
|
style: styles3.stepRemove
|
|
3839
4093
|
},
|
|
3840
|
-
/* @__PURE__ */
|
|
4094
|
+
/* @__PURE__ */ React7.createElement(TpkIcon, { name: "close", size: 16, color: "#64748B" })
|
|
3841
4095
|
));
|
|
3842
|
-
return /* @__PURE__ */
|
|
4096
|
+
return /* @__PURE__ */ React7.createElement(View3, { style: styles3.detailsCol }, /* @__PURE__ */ React7.createElement(FieldLabel, { text: S.stepsAdd }), /* @__PURE__ */ React7.createElement(View3, { style: styles3.stepInputRow }, /* @__PURE__ */ React7.createElement(
|
|
3843
4097
|
TextInput,
|
|
3844
4098
|
{
|
|
3845
4099
|
onChangeText: onStepInputChange,
|
|
3846
|
-
placeholder:
|
|
4100
|
+
placeholder: S.stepsPlaceholder,
|
|
3847
4101
|
style: [styles3.input, styles3.flex1],
|
|
3848
4102
|
value: stepInput,
|
|
3849
4103
|
onSubmitEditing: onAdd
|
|
3850
4104
|
}
|
|
3851
|
-
), /* @__PURE__ */
|
|
4105
|
+
), /* @__PURE__ */ React7.createElement(
|
|
3852
4106
|
Pressable3,
|
|
3853
4107
|
{
|
|
3854
4108
|
accessibilityRole: "button",
|
|
3855
|
-
accessibilityLabel:
|
|
4109
|
+
accessibilityLabel: S.stepsAddA11y,
|
|
3856
4110
|
onPress: onAdd,
|
|
3857
4111
|
disabled: !stepInput.trim(),
|
|
3858
4112
|
style: ({ pressed }) => [
|
|
@@ -3861,8 +4115,8 @@ function ReproStepsStep({
|
|
|
3861
4115
|
pressed && { opacity: 0.8 }
|
|
3862
4116
|
]
|
|
3863
4117
|
},
|
|
3864
|
-
/* @__PURE__ */
|
|
3865
|
-
)), steps.length === 0 ? /* @__PURE__ */
|
|
4118
|
+
/* @__PURE__ */ React7.createElement(Text4, { style: styles3.stepAddLabel }, "\uFF0B")
|
|
4119
|
+
)), steps.length === 0 ? /* @__PURE__ */ React7.createElement(Text4, { style: styles3.muted }, S.stepsEmpty) : DraggableFlatList ? /* @__PURE__ */ React7.createElement(
|
|
3866
4120
|
DraggableFlatList,
|
|
3867
4121
|
{
|
|
3868
4122
|
data: items,
|
|
@@ -3876,67 +4130,71 @@ function ReproStepsStep({
|
|
|
3876
4130
|
},
|
|
3877
4131
|
activationDistance: 8
|
|
3878
4132
|
}
|
|
3879
|
-
) : items.map((item) => /* @__PURE__ */
|
|
4133
|
+
) : items.map((item) => /* @__PURE__ */ React7.createElement(View3, { key: item.key }, renderStep(item))), DraggableFlatList && steps.length > 1 && /* @__PURE__ */ React7.createElement(Text4, { style: styles3.stepHint }, S.stepsReorderHint));
|
|
3880
4134
|
}
|
|
3881
4135
|
function ReviewStep({
|
|
3882
4136
|
draft
|
|
3883
4137
|
}) {
|
|
4138
|
+
const S = useTpkStrings();
|
|
3884
4139
|
const sev = SEVERITIES.find((s) => s.value === draft.severity);
|
|
3885
4140
|
const type = BUG_TYPES.find((t) => t.value === draft.type);
|
|
3886
|
-
return /* @__PURE__ */
|
|
4141
|
+
return /* @__PURE__ */ React7.createElement(View3, { style: styles3.detailsCol }, /* @__PURE__ */ React7.createElement(
|
|
3887
4142
|
ReviewLine,
|
|
3888
4143
|
{
|
|
3889
|
-
label:
|
|
3890
|
-
value: type
|
|
4144
|
+
label: S.reviewType,
|
|
4145
|
+
value: type ? S[type.label] : draft.type,
|
|
3891
4146
|
leadingIcon: type?.icon
|
|
3892
4147
|
}
|
|
3893
|
-
), /* @__PURE__ */
|
|
4148
|
+
), /* @__PURE__ */ React7.createElement(
|
|
3894
4149
|
ReviewLine,
|
|
3895
4150
|
{
|
|
3896
|
-
label:
|
|
3897
|
-
value: sev
|
|
4151
|
+
label: S.reviewSeverity,
|
|
4152
|
+
value: sev ? S[sev.label] : draft.severity,
|
|
3898
4153
|
valueColor: sev?.color
|
|
3899
4154
|
}
|
|
3900
|
-
), /* @__PURE__ */
|
|
4155
|
+
), /* @__PURE__ */ React7.createElement(ReviewLine, { label: S.reviewTitle, value: draft.title || S.reviewEmpty }), /* @__PURE__ */ React7.createElement(
|
|
3901
4156
|
ReviewLine,
|
|
3902
4157
|
{
|
|
3903
|
-
label:
|
|
3904
|
-
value: draft.description ||
|
|
4158
|
+
label: S.reviewDescription,
|
|
4159
|
+
value: draft.description || S.reviewEmpty,
|
|
3905
4160
|
multiline: true
|
|
3906
4161
|
}
|
|
3907
|
-
), draft.expectedBehavior.trim().length > 0 && /* @__PURE__ */
|
|
4162
|
+
), draft.expectedBehavior.trim().length > 0 && /* @__PURE__ */ React7.createElement(
|
|
3908
4163
|
ReviewLine,
|
|
3909
4164
|
{
|
|
3910
|
-
label:
|
|
4165
|
+
label: S.reviewExpected,
|
|
3911
4166
|
value: draft.expectedBehavior,
|
|
3912
4167
|
multiline: true
|
|
3913
4168
|
}
|
|
3914
|
-
), draft.actualBehavior.trim().length > 0 && /* @__PURE__ */
|
|
4169
|
+
), draft.actualBehavior.trim().length > 0 && /* @__PURE__ */ React7.createElement(
|
|
3915
4170
|
ReviewLine,
|
|
3916
4171
|
{
|
|
3917
|
-
label:
|
|
4172
|
+
label: S.reviewActual,
|
|
3918
4173
|
value: draft.actualBehavior,
|
|
3919
4174
|
multiline: true
|
|
3920
4175
|
}
|
|
3921
|
-
), draft.frequency && /* @__PURE__ */
|
|
4176
|
+
), draft.frequency && /* @__PURE__ */ React7.createElement(
|
|
3922
4177
|
ReviewLine,
|
|
3923
4178
|
{
|
|
3924
|
-
label:
|
|
3925
|
-
value:
|
|
4179
|
+
label: S.reviewFrequency,
|
|
4180
|
+
value: (() => {
|
|
4181
|
+
const f = FREQUENCIES.find((x) => x.value === draft.frequency);
|
|
4182
|
+
return f ? S[f.label] : draft.frequency;
|
|
4183
|
+
})()
|
|
3926
4184
|
}
|
|
3927
|
-
), !!draft.affectedComponent && /* @__PURE__ */
|
|
4185
|
+
), !!draft.affectedComponent && /* @__PURE__ */ React7.createElement(
|
|
3928
4186
|
ReviewLine,
|
|
3929
4187
|
{
|
|
3930
|
-
label:
|
|
4188
|
+
label: S.reviewComponent,
|
|
3931
4189
|
value: draft.affectedComponent
|
|
3932
4190
|
}
|
|
3933
|
-
), draft.reproductionSteps.length > 0 && /* @__PURE__ */
|
|
4191
|
+
), draft.reproductionSteps.length > 0 && /* @__PURE__ */ React7.createElement(View3, { style: { marginTop: 8 } }, /* @__PURE__ */ React7.createElement(Text4, { style: styles3.reviewLabel }, S.reviewSteps), draft.reproductionSteps.map((s, i) => /* @__PURE__ */ React7.createElement(Text4, { key: i, style: styles3.reviewValue }, i + 1, ". ", s))), draft.attachments.length > 0 && /* @__PURE__ */ React7.createElement(View3, { style: { marginTop: 8 } }, /* @__PURE__ */ React7.createElement(Text4, { style: styles3.reviewLabel }, S.reviewAttachments), draft.attachments.map((a) => /* @__PURE__ */ React7.createElement(Text4, { key: a.id, style: styles3.reviewValue }, "\xB7 ", a.name, " (", a.kind, ")"))));
|
|
3934
4192
|
}
|
|
3935
4193
|
function FieldLabel({
|
|
3936
4194
|
text,
|
|
3937
4195
|
required
|
|
3938
4196
|
}) {
|
|
3939
|
-
return /* @__PURE__ */
|
|
4197
|
+
return /* @__PURE__ */ React7.createElement(Text4, { style: styles3.fieldLabel }, text, required && /* @__PURE__ */ React7.createElement(Text4, { style: styles3.required }, " *"));
|
|
3940
4198
|
}
|
|
3941
4199
|
function SelectableCard({
|
|
3942
4200
|
active,
|
|
@@ -3946,7 +4204,7 @@ function SelectableCard({
|
|
|
3946
4204
|
label,
|
|
3947
4205
|
description
|
|
3948
4206
|
}) {
|
|
3949
|
-
return /* @__PURE__ */
|
|
4207
|
+
return /* @__PURE__ */ React7.createElement(
|
|
3950
4208
|
Pressable3,
|
|
3951
4209
|
{
|
|
3952
4210
|
accessibilityRole: "radio",
|
|
@@ -3958,8 +4216,8 @@ function SelectableCard({
|
|
|
3958
4216
|
pressed && { opacity: 0.85 }
|
|
3959
4217
|
]
|
|
3960
4218
|
},
|
|
3961
|
-
icon && /* @__PURE__ */
|
|
3962
|
-
dotColor && /* @__PURE__ */
|
|
4219
|
+
icon && /* @__PURE__ */ React7.createElement(View3, { style: styles3.selectableCardIconWrap }, /* @__PURE__ */ React7.createElement(TpkIcon, { name: icon, size: 22, color: "#0F172A" })),
|
|
4220
|
+
dotColor && /* @__PURE__ */ React7.createElement(
|
|
3963
4221
|
View3,
|
|
3964
4222
|
{
|
|
3965
4223
|
style: [
|
|
@@ -3968,8 +4226,8 @@ function SelectableCard({
|
|
|
3968
4226
|
]
|
|
3969
4227
|
}
|
|
3970
4228
|
),
|
|
3971
|
-
/* @__PURE__ */
|
|
3972
|
-
active && /* @__PURE__ */
|
|
4229
|
+
/* @__PURE__ */ React7.createElement(View3, { style: styles3.flex1 }, /* @__PURE__ */ React7.createElement(Text4, { style: styles3.selectableCardLabel }, label), /* @__PURE__ */ React7.createElement(Text4, { style: styles3.muted }, description)),
|
|
4230
|
+
active && /* @__PURE__ */ React7.createElement(TpkIcon, { name: "check", size: 18, color: "#16A34A" })
|
|
3973
4231
|
);
|
|
3974
4232
|
}
|
|
3975
4233
|
function CaptureButton({
|
|
@@ -3977,48 +4235,50 @@ function CaptureButton({
|
|
|
3977
4235
|
label,
|
|
3978
4236
|
onPress
|
|
3979
4237
|
}) {
|
|
3980
|
-
|
|
4238
|
+
const S = useTpkStrings();
|
|
4239
|
+
return /* @__PURE__ */ React7.createElement(
|
|
3981
4240
|
Pressable3,
|
|
3982
4241
|
{
|
|
3983
4242
|
accessibilityRole: "button",
|
|
3984
|
-
accessibilityLabel:
|
|
4243
|
+
accessibilityLabel: S.attachA11y(label),
|
|
3985
4244
|
onPress,
|
|
3986
4245
|
style: ({ pressed }) => [
|
|
3987
4246
|
styles3.captureButton,
|
|
3988
4247
|
pressed && { opacity: 0.85 }
|
|
3989
4248
|
]
|
|
3990
4249
|
},
|
|
3991
|
-
/* @__PURE__ */
|
|
3992
|
-
/* @__PURE__ */
|
|
4250
|
+
/* @__PURE__ */ React7.createElement(TpkIcon, { name: icon, size: 22, color: "#0F172A" }),
|
|
4251
|
+
/* @__PURE__ */ React7.createElement(Text4, { style: styles3.captureLabel }, label)
|
|
3993
4252
|
);
|
|
3994
4253
|
}
|
|
3995
4254
|
function AttachmentRow({
|
|
3996
4255
|
attachment,
|
|
3997
4256
|
onRemove
|
|
3998
4257
|
}) {
|
|
4258
|
+
const S = useTpkStrings();
|
|
3999
4259
|
const isImage = attachment.kind === "image" || attachment.kind === "screenshot";
|
|
4000
|
-
return /* @__PURE__ */
|
|
4260
|
+
return /* @__PURE__ */ React7.createElement(View3, { style: styles3.attachmentRow }, isImage ? /* @__PURE__ */ React7.createElement(
|
|
4001
4261
|
Image,
|
|
4002
4262
|
{
|
|
4003
4263
|
source: { uri: `data:${attachment.mimeType};base64,${attachment.base64}` },
|
|
4004
4264
|
style: styles3.attachmentThumb
|
|
4005
4265
|
}
|
|
4006
|
-
) : /* @__PURE__ */
|
|
4266
|
+
) : /* @__PURE__ */ React7.createElement(View3, { style: [styles3.attachmentThumb, styles3.attachmentThumbFallback] }, /* @__PURE__ */ React7.createElement(
|
|
4007
4267
|
TpkIcon,
|
|
4008
4268
|
{
|
|
4009
4269
|
name: attachment.kind === "audio" || attachment.kind === "screen-recording" ? "music_note" : "attachment",
|
|
4010
4270
|
size: 22,
|
|
4011
4271
|
color: "#475569"
|
|
4012
4272
|
}
|
|
4013
|
-
)), /* @__PURE__ */
|
|
4273
|
+
)), /* @__PURE__ */ React7.createElement(View3, { style: styles3.flex1 }, /* @__PURE__ */ React7.createElement(Text4, { style: styles3.attachmentName, numberOfLines: 1 }, attachment.name), /* @__PURE__ */ React7.createElement(Text4, { style: styles3.muted }, attachment.kind, attachment.byteLength != null ? ` \xB7 ${formatBytes(attachment.byteLength)}` : "")), /* @__PURE__ */ React7.createElement(
|
|
4014
4274
|
Pressable3,
|
|
4015
4275
|
{
|
|
4016
4276
|
accessibilityRole: "button",
|
|
4017
|
-
accessibilityLabel:
|
|
4277
|
+
accessibilityLabel: S.removeA11y(attachment.name),
|
|
4018
4278
|
onPress: onRemove,
|
|
4019
4279
|
style: styles3.attachmentRemove
|
|
4020
4280
|
},
|
|
4021
|
-
/* @__PURE__ */
|
|
4281
|
+
/* @__PURE__ */ React7.createElement(TpkIcon, { name: "close", size: 18, color: "#64748B" })
|
|
4022
4282
|
));
|
|
4023
4283
|
}
|
|
4024
4284
|
function ReviewLine({
|
|
@@ -4028,7 +4288,7 @@ function ReviewLine({
|
|
|
4028
4288
|
valueColor,
|
|
4029
4289
|
leadingIcon
|
|
4030
4290
|
}) {
|
|
4031
|
-
return /* @__PURE__ */
|
|
4291
|
+
return /* @__PURE__ */ React7.createElement(View3, { style: multiline ? styles3.reviewBlock : styles3.reviewRow }, /* @__PURE__ */ React7.createElement(Text4, { style: styles3.reviewLabel }, label), /* @__PURE__ */ React7.createElement(View3, { style: styles3.reviewValueRow }, leadingIcon && /* @__PURE__ */ React7.createElement(
|
|
4032
4292
|
TpkIcon,
|
|
4033
4293
|
{
|
|
4034
4294
|
name: leadingIcon,
|
|
@@ -4036,7 +4296,7 @@ function ReviewLine({
|
|
|
4036
4296
|
color: valueColor ?? "#0F172A",
|
|
4037
4297
|
style: { marginRight: 6 }
|
|
4038
4298
|
}
|
|
4039
|
-
), /* @__PURE__ */
|
|
4299
|
+
), /* @__PURE__ */ React7.createElement(
|
|
4040
4300
|
Text4,
|
|
4041
4301
|
{
|
|
4042
4302
|
style: [
|
|
@@ -4480,9 +4740,9 @@ var styles3 = StyleSheet3.create({
|
|
|
4480
4740
|
});
|
|
4481
4741
|
|
|
4482
4742
|
// src/sensitive.tsx
|
|
4483
|
-
import
|
|
4743
|
+
import React8, { useEffect as useEffect5, useRef as useRef5, useSyncExternalStore } from "react";
|
|
4484
4744
|
import {
|
|
4485
|
-
Platform as
|
|
4745
|
+
Platform as Platform4,
|
|
4486
4746
|
StyleSheet as StyleSheet4,
|
|
4487
4747
|
View as View4
|
|
4488
4748
|
} from "react-native";
|
|
@@ -4491,7 +4751,7 @@ var SkiaBackdropFilter = null;
|
|
|
4491
4751
|
var SkiaBlur = null;
|
|
4492
4752
|
var SkiaFill = null;
|
|
4493
4753
|
void (async () => {
|
|
4494
|
-
if (
|
|
4754
|
+
if (Platform4.OS === "web") return;
|
|
4495
4755
|
try {
|
|
4496
4756
|
const skia = await import("@shopify/react-native-skia");
|
|
4497
4757
|
SkiaCanvas = skia.Canvas;
|
|
@@ -4515,7 +4775,7 @@ function TpkSensitive({
|
|
|
4515
4775
|
getNativeCaptureMode
|
|
4516
4776
|
);
|
|
4517
4777
|
useEffect5(() => {
|
|
4518
|
-
if (
|
|
4778
|
+
if (Platform4.OS !== "web") return;
|
|
4519
4779
|
const node = ref.current;
|
|
4520
4780
|
if (!node) return;
|
|
4521
4781
|
if (enabled) {
|
|
@@ -4527,9 +4787,9 @@ function TpkSensitive({
|
|
|
4527
4787
|
node.removeAttribute("data-tpk-sensitive");
|
|
4528
4788
|
};
|
|
4529
4789
|
}, [mode, enabled]);
|
|
4530
|
-
const shouldRedactNative =
|
|
4790
|
+
const shouldRedactNative = Platform4.OS !== "web" && enabled && captureActive2;
|
|
4531
4791
|
const useSkiaBlur = shouldRedactNative && mode === "blur" && SkiaCanvas !== null && SkiaBackdropFilter !== null && SkiaBlur !== null && SkiaFill !== null;
|
|
4532
|
-
return /* @__PURE__ */
|
|
4792
|
+
return /* @__PURE__ */ React8.createElement(View4, { ref, style, testID }, children, shouldRedactNative && useSkiaBlur && /* @__PURE__ */ React8.createElement(SkiaCanvas, { style: StyleSheet4.absoluteFill, pointerEvents: "none" }, /* @__PURE__ */ React8.createElement(SkiaBackdropFilter, { filter: /* @__PURE__ */ React8.createElement(SkiaBlur, { blur: 12 }) }, /* @__PURE__ */ React8.createElement(SkiaFill, { color: "rgba(15, 23, 42, 0.10)" }))), shouldRedactNative && !useSkiaBlur && /* @__PURE__ */ React8.createElement(
|
|
4533
4793
|
View4,
|
|
4534
4794
|
{
|
|
4535
4795
|
pointerEvents: "none",
|
|
@@ -4614,7 +4874,7 @@ function useTpkDashboard(tpk) {
|
|
|
4614
4874
|
}
|
|
4615
4875
|
|
|
4616
4876
|
// src/TesterDashboard.tsx
|
|
4617
|
-
import
|
|
4877
|
+
import React9 from "react";
|
|
4618
4878
|
import {
|
|
4619
4879
|
ActivityIndicator as ActivityIndicator2,
|
|
4620
4880
|
Pressable as Pressable4,
|
|
@@ -4640,10 +4900,10 @@ function TesterDashboard({
|
|
|
4640
4900
|
const resolvedFixes = recentFixes ?? buildInfo?.recentFixes ?? [];
|
|
4641
4901
|
const sortedFocusAreas = (focusAreas ?? []).filter((a) => a.isActive !== false).slice().sort((a, b) => b.priority - a.priority);
|
|
4642
4902
|
if (loading && !data) {
|
|
4643
|
-
return /* @__PURE__ */
|
|
4903
|
+
return /* @__PURE__ */ React9.createElement(View5, { style: [styles5.center, style], testID: `${testID}-loading` }, /* @__PURE__ */ React9.createElement(ActivityIndicator2, null), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted }, "Loading dashboard\u2026"));
|
|
4644
4904
|
}
|
|
4645
4905
|
if (error && !data) {
|
|
4646
|
-
return /* @__PURE__ */
|
|
4906
|
+
return /* @__PURE__ */ React9.createElement(View5, { style: [styles5.center, style], testID: `${testID}-error` }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.errorTitle }, "Couldn't load your dashboard"), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted }, error.message), /* @__PURE__ */ React9.createElement(
|
|
4647
4907
|
Pressable4,
|
|
4648
4908
|
{
|
|
4649
4909
|
accessibilityRole: "button",
|
|
@@ -4652,11 +4912,11 @@ function TesterDashboard({
|
|
|
4652
4912
|
},
|
|
4653
4913
|
style: styles5.retryButton
|
|
4654
4914
|
},
|
|
4655
|
-
/* @__PURE__ */
|
|
4915
|
+
/* @__PURE__ */ React9.createElement(Text5, { style: styles5.retryLabel }, "Try again")
|
|
4656
4916
|
));
|
|
4657
4917
|
}
|
|
4658
4918
|
const today = formatToday(/* @__PURE__ */ new Date());
|
|
4659
|
-
return /* @__PURE__ */
|
|
4919
|
+
return /* @__PURE__ */ React9.createElement(
|
|
4660
4920
|
ScrollView3,
|
|
4661
4921
|
{
|
|
4662
4922
|
style,
|
|
@@ -4664,7 +4924,7 @@ function TesterDashboard({
|
|
|
4664
4924
|
testID,
|
|
4665
4925
|
refreshControl: void 0
|
|
4666
4926
|
},
|
|
4667
|
-
/* @__PURE__ */
|
|
4927
|
+
/* @__PURE__ */ React9.createElement(
|
|
4668
4928
|
HeaderCard,
|
|
4669
4929
|
{
|
|
4670
4930
|
greeting: resolveGreeting(greeting, data?.profile),
|
|
@@ -4675,19 +4935,19 @@ function TesterDashboard({
|
|
|
4675
4935
|
}
|
|
4676
4936
|
}
|
|
4677
4937
|
),
|
|
4678
|
-
data && data.partialFailures.length > 0 && /* @__PURE__ */
|
|
4679
|
-
data?.profile && /* @__PURE__ */
|
|
4680
|
-
data?.points && /* @__PURE__ */
|
|
4681
|
-
buildInfo && /* @__PURE__ */
|
|
4682
|
-
sortedFocusAreas.length > 0 && /* @__PURE__ */
|
|
4938
|
+
data && data.partialFailures.length > 0 && /* @__PURE__ */ React9.createElement(PartialFailureBanner, { failures: data.partialFailures }),
|
|
4939
|
+
data?.profile && /* @__PURE__ */ React9.createElement(ProfileCard, { profile: data.profile }),
|
|
4940
|
+
data?.points && /* @__PURE__ */ React9.createElement(PointsCard, { points: data.points }),
|
|
4941
|
+
buildInfo && /* @__PURE__ */ React9.createElement(BuildInfoCard, { buildInfo }),
|
|
4942
|
+
sortedFocusAreas.length > 0 && /* @__PURE__ */ React9.createElement(
|
|
4683
4943
|
FocusAreasCard,
|
|
4684
4944
|
{
|
|
4685
4945
|
areas: sortedFocusAreas,
|
|
4686
4946
|
onPress: onFocusAreaPress
|
|
4687
4947
|
}
|
|
4688
4948
|
),
|
|
4689
|
-
resolvedFixes.length > 0 && /* @__PURE__ */
|
|
4690
|
-
/* @__PURE__ */
|
|
4949
|
+
resolvedFixes.length > 0 && /* @__PURE__ */ React9.createElement(RecentFixesCard, { fixes: resolvedFixes, onVerify: onVerifyFix }),
|
|
4950
|
+
/* @__PURE__ */ React9.createElement(
|
|
4691
4951
|
TasksCard,
|
|
4692
4952
|
{
|
|
4693
4953
|
tasks: data?.tasks ?? [],
|
|
@@ -4695,7 +4955,7 @@ function TesterDashboard({
|
|
|
4695
4955
|
onTaskPress
|
|
4696
4956
|
}
|
|
4697
4957
|
),
|
|
4698
|
-
onStartTesting && /* @__PURE__ */
|
|
4958
|
+
onStartTesting && /* @__PURE__ */ React9.createElement(
|
|
4699
4959
|
Pressable4,
|
|
4700
4960
|
{
|
|
4701
4961
|
accessibilityRole: "button",
|
|
@@ -4703,7 +4963,7 @@ function TesterDashboard({
|
|
|
4703
4963
|
onPress: onStartTesting,
|
|
4704
4964
|
style: styles5.cta
|
|
4705
4965
|
},
|
|
4706
|
-
/* @__PURE__ */
|
|
4966
|
+
/* @__PURE__ */ React9.createElement(Text5, { style: styles5.ctaLabel }, "Start testing")
|
|
4707
4967
|
)
|
|
4708
4968
|
);
|
|
4709
4969
|
}
|
|
@@ -4713,7 +4973,7 @@ function HeaderCard({
|
|
|
4713
4973
|
loading,
|
|
4714
4974
|
onRefresh
|
|
4715
4975
|
}) {
|
|
4716
|
-
return /* @__PURE__ */
|
|
4976
|
+
return /* @__PURE__ */ React9.createElement(View5, { style: styles5.card }, /* @__PURE__ */ React9.createElement(View5, { style: styles5.headerRow }, /* @__PURE__ */ React9.createElement(View5, { style: styles5.flex1 }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.greeting }, greeting), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted }, today)), /* @__PURE__ */ React9.createElement(
|
|
4717
4977
|
Pressable4,
|
|
4718
4978
|
{
|
|
4719
4979
|
accessibilityRole: "button",
|
|
@@ -4721,7 +4981,7 @@ function HeaderCard({
|
|
|
4721
4981
|
onPress: onRefresh,
|
|
4722
4982
|
style: styles5.refreshButton
|
|
4723
4983
|
},
|
|
4724
|
-
loading ? /* @__PURE__ */
|
|
4984
|
+
loading ? /* @__PURE__ */ React9.createElement(ActivityIndicator2, null) : /* @__PURE__ */ React9.createElement(Text5, { style: styles5.refreshLabel }, "Refresh")
|
|
4725
4985
|
)));
|
|
4726
4986
|
}
|
|
4727
4987
|
function PartialFailureBanner({
|
|
@@ -4733,27 +4993,27 @@ function PartialFailureBanner({
|
|
|
4733
4993
|
points: "points"
|
|
4734
4994
|
};
|
|
4735
4995
|
const list = failures.map((f) => labels[f]).join(", ");
|
|
4736
|
-
return /* @__PURE__ */
|
|
4996
|
+
return /* @__PURE__ */ React9.createElement(View5, { style: styles5.bannerWarn }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.bannerWarnLabel }, "Some sections couldn't load (", list, "). Tap refresh to try again."));
|
|
4737
4997
|
}
|
|
4738
4998
|
function ProfileCard({
|
|
4739
4999
|
profile
|
|
4740
5000
|
}) {
|
|
4741
5001
|
const ratingPercent = typeof profile.rating === "number" && profile.rating > 0 ? `${Math.round(profile.rating * 20)}%` : null;
|
|
4742
|
-
return /* @__PURE__ */
|
|
5002
|
+
return /* @__PURE__ */ React9.createElement(View5, { style: styles5.card }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.cardTitle }, "Profile"), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.cardValue }, profile.handle ?? profile.fullName ?? profile.email ?? "You"), ratingPercent && /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted }, "Rating \xB7 ", ratingPercent), typeof profile.pointsTotal === "number" && /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted }, "Points \xB7 ", profile.pointsTotal));
|
|
4743
5003
|
}
|
|
4744
5004
|
function PointsCard({
|
|
4745
5005
|
points
|
|
4746
5006
|
}) {
|
|
4747
5007
|
const breakdown = points.breakdown ?? {};
|
|
4748
5008
|
const breakdownEntries = Object.entries(breakdown);
|
|
4749
|
-
return /* @__PURE__ */
|
|
5009
|
+
return /* @__PURE__ */ React9.createElement(View5, { style: styles5.card }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.cardTitle }, "Points balance"), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.cardValue }, points.total), breakdownEntries.length > 0 && /* @__PURE__ */ React9.createElement(View5, { style: styles5.breakdownRow }, breakdownEntries.map(([key, value]) => /* @__PURE__ */ React9.createElement(View5, { key, style: styles5.breakdownPill }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.breakdownLabel }, key, ": ", value)))));
|
|
4750
5010
|
}
|
|
4751
5011
|
function TasksCard({
|
|
4752
5012
|
tasks,
|
|
4753
5013
|
summary,
|
|
4754
5014
|
onTaskPress
|
|
4755
5015
|
}) {
|
|
4756
|
-
return /* @__PURE__ */
|
|
5016
|
+
return /* @__PURE__ */ React9.createElement(View5, { style: styles5.card }, /* @__PURE__ */ React9.createElement(View5, { style: styles5.headerRow }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.cardTitle }, "Today's tasks"), summary && /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted }, summary.pending, " pending \xB7 ", summary.inProgress, " in progress")), tasks.length === 0 ? /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted }, "No tasks assigned. New work shows up here as it's allocated.") : tasks.map((task) => /* @__PURE__ */ React9.createElement(
|
|
4757
5017
|
TaskRow,
|
|
4758
5018
|
{
|
|
4759
5019
|
key: task.assignmentId,
|
|
@@ -4766,9 +5026,9 @@ function TaskRow({
|
|
|
4766
5026
|
task,
|
|
4767
5027
|
onPress
|
|
4768
5028
|
}) {
|
|
4769
|
-
const inner = /* @__PURE__ */
|
|
5029
|
+
const inner = /* @__PURE__ */ React9.createElement(View5, { style: styles5.taskRow }, /* @__PURE__ */ React9.createElement(View5, { style: styles5.flex1 }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.taskTitle }, task.task.name), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted, numberOfLines: 2 }, task.task.description ?? "No description."), task.task.rewardAmount != null && /* @__PURE__ */ React9.createElement(Text5, { style: styles5.taskMeta }, "Reward \xB7 \u20AC", task.task.rewardAmount.toFixed(2))), /* @__PURE__ */ React9.createElement(StatusBadge, { status: task.status }));
|
|
4770
5030
|
if (onPress) {
|
|
4771
|
-
return /* @__PURE__ */
|
|
5031
|
+
return /* @__PURE__ */ React9.createElement(
|
|
4772
5032
|
Pressable4,
|
|
4773
5033
|
{
|
|
4774
5034
|
onPress,
|
|
@@ -4794,16 +5054,16 @@ function BuildInfoCard({
|
|
|
4794
5054
|
return buildInfo.releaseDate;
|
|
4795
5055
|
}
|
|
4796
5056
|
})();
|
|
4797
|
-
return /* @__PURE__ */
|
|
5057
|
+
return /* @__PURE__ */ React9.createElement(View5, { style: styles5.card }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.cardTitle }, "Build"), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.cardValue }, buildInfo.version, " ", /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted }, "\xB7 #", buildInfo.buildNumber)), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted }, "Released ", releaseDateLabel), buildInfo.changelog.length > 0 && /* @__PURE__ */ React9.createElement(View5, { style: styles5.subSection }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.subSectionTitle }, "What's new"), buildInfo.changelog.map((entry, i) => /* @__PURE__ */ React9.createElement(BulletRow, { key: `cl-${i}`, text: entry }))), buildInfo.knownIssues.length > 0 && /* @__PURE__ */ React9.createElement(View5, { style: styles5.subSection }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.subSectionTitle }, "Known issues"), buildInfo.knownIssues.map((entry, i) => /* @__PURE__ */ React9.createElement(BulletRow, { key: `ki-${i}`, text: entry, tone: "warn" }))));
|
|
4798
5058
|
}
|
|
4799
5059
|
function FocusAreasCard({
|
|
4800
5060
|
areas,
|
|
4801
5061
|
onPress
|
|
4802
5062
|
}) {
|
|
4803
|
-
return /* @__PURE__ */
|
|
4804
|
-
const inner = /* @__PURE__ */
|
|
5063
|
+
return /* @__PURE__ */ React9.createElement(View5, { style: styles5.card }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.cardTitle }, "Focus areas"), areas.map((area) => {
|
|
5064
|
+
const inner = /* @__PURE__ */ React9.createElement(View5, { style: styles5.focusRow }, /* @__PURE__ */ React9.createElement(View5, { style: styles5.focusPriority }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.focusPriorityLabel }, area.priority)), /* @__PURE__ */ React9.createElement(View5, { style: styles5.flex1 }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.rowTitle }, area.featureName), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted, numberOfLines: 2 }, area.reason), area.testingGuidance && /* @__PURE__ */ React9.createElement(Text5, { style: styles5.taskMeta }, area.testingGuidance), area.criticalPaths.length > 0 && /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted }, area.criticalPaths.length, " critical path", area.criticalPaths.length === 1 ? "" : "s")));
|
|
4805
5065
|
if (onPress) {
|
|
4806
|
-
return /* @__PURE__ */
|
|
5066
|
+
return /* @__PURE__ */ React9.createElement(
|
|
4807
5067
|
Pressable4,
|
|
4808
5068
|
{
|
|
4809
5069
|
key: area.id,
|
|
@@ -4814,14 +5074,14 @@ function FocusAreasCard({
|
|
|
4814
5074
|
inner
|
|
4815
5075
|
);
|
|
4816
5076
|
}
|
|
4817
|
-
return /* @__PURE__ */
|
|
5077
|
+
return /* @__PURE__ */ React9.createElement(View5, { key: area.id }, inner);
|
|
4818
5078
|
}));
|
|
4819
5079
|
}
|
|
4820
5080
|
function RecentFixesCard({
|
|
4821
5081
|
fixes,
|
|
4822
5082
|
onVerify
|
|
4823
5083
|
}) {
|
|
4824
|
-
return /* @__PURE__ */
|
|
5084
|
+
return /* @__PURE__ */ React9.createElement(View5, { style: styles5.card }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.cardTitle }, "Recent fixes"), fixes.map((fix) => {
|
|
4825
5085
|
const fixedLabel = (() => {
|
|
4826
5086
|
try {
|
|
4827
5087
|
return new Date(fix.fixedDate).toLocaleDateString(void 0, {
|
|
@@ -4832,7 +5092,7 @@ function RecentFixesCard({
|
|
|
4832
5092
|
return fix.fixedDate;
|
|
4833
5093
|
}
|
|
4834
5094
|
})();
|
|
4835
|
-
return /* @__PURE__ */
|
|
5095
|
+
return /* @__PURE__ */ React9.createElement(View5, { key: fix.bugId, style: styles5.fixRow }, /* @__PURE__ */ React9.createElement(View5, { style: styles5.flex1 }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.rowTitle }, fix.title), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.muted, numberOfLines: 2 }, fix.description), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.taskMeta }, "Fixed ", fixedLabel, fix.buildVersion ? ` \xB7 v${fix.buildVersion}` : "")), fix.requiresVerification && !fix.isVerified && onVerify && /* @__PURE__ */ React9.createElement(
|
|
4836
5096
|
Pressable4,
|
|
4837
5097
|
{
|
|
4838
5098
|
accessibilityRole: "button",
|
|
@@ -4840,21 +5100,21 @@ function RecentFixesCard({
|
|
|
4840
5100
|
onPress: () => onVerify(fix),
|
|
4841
5101
|
style: styles5.verifyButton
|
|
4842
5102
|
},
|
|
4843
|
-
/* @__PURE__ */
|
|
4844
|
-
), fix.isVerified && /* @__PURE__ */
|
|
5103
|
+
/* @__PURE__ */ React9.createElement(Text5, { style: styles5.verifyLabel }, "Verify")
|
|
5104
|
+
), fix.isVerified && /* @__PURE__ */ React9.createElement(View5, { style: styles5.verifiedBadge }, /* @__PURE__ */ React9.createElement(Text5, { style: styles5.verifiedLabel }, "\u2713 verified")));
|
|
4845
5105
|
}));
|
|
4846
5106
|
}
|
|
4847
5107
|
function BulletRow({
|
|
4848
5108
|
text,
|
|
4849
5109
|
tone
|
|
4850
5110
|
}) {
|
|
4851
|
-
return /* @__PURE__ */
|
|
5111
|
+
return /* @__PURE__ */ React9.createElement(View5, { style: styles5.bulletRow }, /* @__PURE__ */ React9.createElement(Text5, { style: tone === "warn" ? styles5.bulletWarn : styles5.bullet }, "\u2022"), /* @__PURE__ */ React9.createElement(Text5, { style: styles5.bulletText }, text));
|
|
4852
5112
|
}
|
|
4853
5113
|
function StatusBadge({
|
|
4854
5114
|
status
|
|
4855
5115
|
}) {
|
|
4856
5116
|
const palette = STATUS_PALETTE[status];
|
|
4857
|
-
return /* @__PURE__ */
|
|
5117
|
+
return /* @__PURE__ */ React9.createElement(
|
|
4858
5118
|
View5,
|
|
4859
5119
|
{
|
|
4860
5120
|
style: [
|
|
@@ -4862,7 +5122,7 @@ function StatusBadge({
|
|
|
4862
5122
|
{ backgroundColor: palette.bg, borderColor: palette.fg }
|
|
4863
5123
|
]
|
|
4864
5124
|
},
|
|
4865
|
-
/* @__PURE__ */
|
|
5125
|
+
/* @__PURE__ */ React9.createElement(Text5, { style: [styles5.statusLabel, { color: palette.fg }] }, palette.label)
|
|
4866
5126
|
);
|
|
4867
5127
|
}
|
|
4868
5128
|
function resolveGreeting(override, profile) {
|
|
@@ -5125,7 +5385,7 @@ var styles5 = StyleSheet5.create({
|
|
|
5125
5385
|
});
|
|
5126
5386
|
|
|
5127
5387
|
// src/WelcomeSheet.tsx
|
|
5128
|
-
import
|
|
5388
|
+
import React10, { useMemo as useMemo4, useState as useState6 } from "react";
|
|
5129
5389
|
import {
|
|
5130
5390
|
Modal as Modal3,
|
|
5131
5391
|
Pressable as Pressable5,
|
|
@@ -5179,7 +5439,7 @@ function TpkWelcomeSheet({
|
|
|
5179
5439
|
return next;
|
|
5180
5440
|
});
|
|
5181
5441
|
};
|
|
5182
|
-
return /* @__PURE__ */
|
|
5442
|
+
return /* @__PURE__ */ React10.createElement(
|
|
5183
5443
|
Modal3,
|
|
5184
5444
|
{
|
|
5185
5445
|
animationType: "slide",
|
|
@@ -5187,14 +5447,14 @@ function TpkWelcomeSheet({
|
|
|
5187
5447
|
transparent: true,
|
|
5188
5448
|
visible
|
|
5189
5449
|
},
|
|
5190
|
-
/* @__PURE__ */
|
|
5450
|
+
/* @__PURE__ */ React10.createElement(View6, { style: [styles6.backdrop, style] }, /* @__PURE__ */ React10.createElement(View6, { style: styles6.sheet }, /* @__PURE__ */ React10.createElement(View6, { style: styles6.header }, /* @__PURE__ */ React10.createElement(View6, { style: styles6.flex1 }, /* @__PURE__ */ React10.createElement(Text6, { style: styles6.version }, "Version ", brief.appVersion), /* @__PURE__ */ React10.createElement(Text6, { style: styles6.headerTitle }, productName, " \xB7 Tester briefing"))), /* @__PURE__ */ React10.createElement(
|
|
5191
5451
|
ScrollView4,
|
|
5192
5452
|
{
|
|
5193
5453
|
contentContainerStyle: styles6.scrollBody,
|
|
5194
5454
|
testID
|
|
5195
5455
|
},
|
|
5196
|
-
brief.releaseNotes.length > 0 && /* @__PURE__ */
|
|
5197
|
-
brief.tasks.length > 0 && /* @__PURE__ */
|
|
5456
|
+
brief.releaseNotes.length > 0 && /* @__PURE__ */ React10.createElement(View6, { style: styles6.section }, /* @__PURE__ */ React10.createElement(Text6, { style: styles6.sectionTitle }, "What's new"), brief.releaseNotes.map((note, i) => /* @__PURE__ */ React10.createElement(ReleaseNoteRow, { key: `${i}-${note.title}`, note }))),
|
|
5457
|
+
brief.tasks.length > 0 && /* @__PURE__ */ React10.createElement(View6, { style: styles6.section }, /* @__PURE__ */ React10.createElement(View6, { style: styles6.tasksHeader }, /* @__PURE__ */ React10.createElement(Text6, { style: styles6.sectionTitle }, "Tasks to exercise"), totalMinutes > 0 && /* @__PURE__ */ React10.createElement(Text6, { style: styles6.muted }, "~", totalMinutes, " min total")), brief.tasks.map((task) => /* @__PURE__ */ React10.createElement(
|
|
5198
5458
|
TaskRow2,
|
|
5199
5459
|
{
|
|
5200
5460
|
key: task.id,
|
|
@@ -5203,15 +5463,15 @@ function TpkWelcomeSheet({
|
|
|
5203
5463
|
onToggle: () => toggle(task.id)
|
|
5204
5464
|
}
|
|
5205
5465
|
)))
|
|
5206
|
-
), /* @__PURE__ */
|
|
5466
|
+
), /* @__PURE__ */ React10.createElement(View6, { style: styles6.footer }, onLater && /* @__PURE__ */ React10.createElement(
|
|
5207
5467
|
Pressable5,
|
|
5208
5468
|
{
|
|
5209
5469
|
accessibilityRole: "button",
|
|
5210
5470
|
onPress: onLater,
|
|
5211
5471
|
style: styles6.secondaryButton
|
|
5212
5472
|
},
|
|
5213
|
-
/* @__PURE__ */
|
|
5214
|
-
), /* @__PURE__ */
|
|
5473
|
+
/* @__PURE__ */ React10.createElement(Text6, { style: styles6.secondaryLabel }, "Later")
|
|
5474
|
+
), /* @__PURE__ */ React10.createElement(
|
|
5215
5475
|
Pressable5,
|
|
5216
5476
|
{
|
|
5217
5477
|
accessibilityRole: "button",
|
|
@@ -5219,19 +5479,19 @@ function TpkWelcomeSheet({
|
|
|
5219
5479
|
onPress: onStart,
|
|
5220
5480
|
style: styles6.primaryButton
|
|
5221
5481
|
},
|
|
5222
|
-
/* @__PURE__ */
|
|
5482
|
+
/* @__PURE__ */ React10.createElement(Text6, { style: styles6.primaryLabel }, "Start testing")
|
|
5223
5483
|
))))
|
|
5224
5484
|
);
|
|
5225
5485
|
}
|
|
5226
5486
|
function ReleaseNoteRow({ note }) {
|
|
5227
|
-
return /* @__PURE__ */
|
|
5487
|
+
return /* @__PURE__ */ React10.createElement(View6, { style: styles6.row }, /* @__PURE__ */ React10.createElement(Text6, { style: styles6.bullet }, "\u2022"), /* @__PURE__ */ React10.createElement(View6, { style: styles6.flex1 }, /* @__PURE__ */ React10.createElement(Text6, { style: styles6.rowTitle }, note.title), note.description && /* @__PURE__ */ React10.createElement(Text6, { style: styles6.muted }, note.description)));
|
|
5228
5488
|
}
|
|
5229
5489
|
function TaskRow2({
|
|
5230
5490
|
task,
|
|
5231
5491
|
checked,
|
|
5232
5492
|
onToggle
|
|
5233
5493
|
}) {
|
|
5234
|
-
return /* @__PURE__ */
|
|
5494
|
+
return /* @__PURE__ */ React10.createElement(
|
|
5235
5495
|
Pressable5,
|
|
5236
5496
|
{
|
|
5237
5497
|
accessibilityRole: "checkbox",
|
|
@@ -5240,7 +5500,7 @@ function TaskRow2({
|
|
|
5240
5500
|
onPress: onToggle,
|
|
5241
5501
|
style: styles6.row
|
|
5242
5502
|
},
|
|
5243
|
-
/* @__PURE__ */
|
|
5503
|
+
/* @__PURE__ */ React10.createElement(
|
|
5244
5504
|
View6,
|
|
5245
5505
|
{
|
|
5246
5506
|
style: [
|
|
@@ -5248,9 +5508,9 @@ function TaskRow2({
|
|
|
5248
5508
|
checked ? styles6.checkboxChecked : null
|
|
5249
5509
|
]
|
|
5250
5510
|
},
|
|
5251
|
-
checked && /* @__PURE__ */
|
|
5511
|
+
checked && /* @__PURE__ */ React10.createElement(Text6, { style: styles6.checkLabel }, "\u2713")
|
|
5252
5512
|
),
|
|
5253
|
-
/* @__PURE__ */
|
|
5513
|
+
/* @__PURE__ */ React10.createElement(View6, { style: styles6.flex1 }, /* @__PURE__ */ React10.createElement(
|
|
5254
5514
|
Text6,
|
|
5255
5515
|
{
|
|
5256
5516
|
style: [
|
|
@@ -5259,7 +5519,7 @@ function TaskRow2({
|
|
|
5259
5519
|
]
|
|
5260
5520
|
},
|
|
5261
5521
|
task.title
|
|
5262
|
-
), task.description && /* @__PURE__ */
|
|
5522
|
+
), task.description && /* @__PURE__ */ React10.createElement(Text6, { style: styles6.muted }, task.description), task.estimatedMinutes != null && /* @__PURE__ */ React10.createElement(Text6, { style: styles6.taskMeta }, "~", task.estimatedMinutes, " min"))
|
|
5263
5523
|
);
|
|
5264
5524
|
}
|
|
5265
5525
|
var styles6 = StyleSheet6.create({
|
|
@@ -5397,9 +5657,9 @@ var styles6 = StyleSheet6.create({
|
|
|
5397
5657
|
});
|
|
5398
5658
|
|
|
5399
5659
|
// src/Onboarding.tsx
|
|
5400
|
-
import
|
|
5660
|
+
import React11, { useState as useState7 } from "react";
|
|
5401
5661
|
import {
|
|
5402
|
-
Platform as
|
|
5662
|
+
Platform as Platform5,
|
|
5403
5663
|
Pressable as Pressable6,
|
|
5404
5664
|
ScrollView as ScrollView5,
|
|
5405
5665
|
StyleSheet as StyleSheet7,
|
|
@@ -5471,7 +5731,7 @@ function TpkOnboarding({
|
|
|
5471
5731
|
if (micGranted || micRequesting) return;
|
|
5472
5732
|
setMicRequesting(true);
|
|
5473
5733
|
try {
|
|
5474
|
-
if (
|
|
5734
|
+
if (Platform5.OS === "web") {
|
|
5475
5735
|
if (typeof navigator !== "undefined" && navigator.mediaDevices?.getUserMedia) {
|
|
5476
5736
|
const stream = await navigator.mediaDevices.getUserMedia({
|
|
5477
5737
|
audio: true
|
|
@@ -5497,43 +5757,43 @@ function TpkOnboarding({
|
|
|
5497
5757
|
}
|
|
5498
5758
|
};
|
|
5499
5759
|
const page = PAGES[pageIndex];
|
|
5500
|
-
return /* @__PURE__ */
|
|
5760
|
+
return /* @__PURE__ */ React11.createElement(View7, { style: [styles7.root, style], testID }, /* @__PURE__ */ React11.createElement(View7, { style: styles7.skipBar }, /* @__PURE__ */ React11.createElement(
|
|
5501
5761
|
Pressable6,
|
|
5502
5762
|
{
|
|
5503
5763
|
accessibilityRole: "button",
|
|
5504
5764
|
onPress: () => void finish(true),
|
|
5505
5765
|
style: styles7.skipButton
|
|
5506
5766
|
},
|
|
5507
|
-
/* @__PURE__ */
|
|
5508
|
-
)), /* @__PURE__ */
|
|
5767
|
+
/* @__PURE__ */ React11.createElement(Text7, { style: styles7.skipLabel }, "Skip")
|
|
5768
|
+
)), /* @__PURE__ */ React11.createElement(ScrollView5, { contentContainerStyle: styles7.pageBody }, page === "welcome" && /* @__PURE__ */ React11.createElement(
|
|
5509
5769
|
PageBody,
|
|
5510
5770
|
{
|
|
5511
5771
|
icon: "bug_report",
|
|
5512
5772
|
title: `You're testing ${product}`,
|
|
5513
5773
|
body: "TesterPayKit is the bug-report channel between you and the developer. When something feels off, shake the phone or tap the floating bug-button \u2014 a quick form ships your report (and a screenshot, if you want) straight to the developer."
|
|
5514
5774
|
}
|
|
5515
|
-
), page === "screenshot" && /* @__PURE__ */
|
|
5775
|
+
), page === "screenshot" && /* @__PURE__ */ React11.createElement(
|
|
5516
5776
|
PageBody,
|
|
5517
5777
|
{
|
|
5518
5778
|
icon: "camera",
|
|
5519
5779
|
title: "Screenshots in bug reports",
|
|
5520
5780
|
body: "Bug reports can include a screenshot of whatever was on your screen when you triggered the report. You see the screenshot before submitting \u2014 a blur tool covers private parts. Allow here so the form doesn't ask every time."
|
|
5521
5781
|
},
|
|
5522
|
-
/* @__PURE__ */
|
|
5782
|
+
/* @__PURE__ */ React11.createElement(View7, { style: styles7.consentRow }, /* @__PURE__ */ React11.createElement(View7, { style: styles7.flex1 }, /* @__PURE__ */ React11.createElement(Text7, { style: styles7.consentTitle }, "Include screenshots"), /* @__PURE__ */ React11.createElement(Text7, { style: styles7.muted }, "You can still send a text-only report any time.")), /* @__PURE__ */ React11.createElement(
|
|
5523
5783
|
Switch,
|
|
5524
5784
|
{
|
|
5525
5785
|
value: screenshotConsent,
|
|
5526
5786
|
onValueChange: setScreenshotConsent
|
|
5527
5787
|
}
|
|
5528
5788
|
))
|
|
5529
|
-
), page === "microphone" && /* @__PURE__ */
|
|
5789
|
+
), page === "microphone" && /* @__PURE__ */ React11.createElement(
|
|
5530
5790
|
PageBody,
|
|
5531
5791
|
{
|
|
5532
5792
|
icon: "voice",
|
|
5533
5793
|
title: "Voice notes (optional)",
|
|
5534
5794
|
body: "Sometimes typing what went wrong is slower than saying it. Bug reports support a short voice note. The phone has to ask for microphone access first \u2014 granting now means the recording starts instantly when you need it."
|
|
5535
5795
|
},
|
|
5536
|
-
/* @__PURE__ */
|
|
5796
|
+
/* @__PURE__ */ React11.createElement(
|
|
5537
5797
|
Pressable6,
|
|
5538
5798
|
{
|
|
5539
5799
|
accessibilityRole: "button",
|
|
@@ -5545,9 +5805,9 @@ function TpkOnboarding({
|
|
|
5545
5805
|
micGranted ? styles7.permissionButtonOk : null
|
|
5546
5806
|
]
|
|
5547
5807
|
},
|
|
5548
|
-
/* @__PURE__ */
|
|
5808
|
+
/* @__PURE__ */ React11.createElement(Text7, { style: styles7.permissionLabel }, micRequesting ? "Asking\u2026" : micGranted ? "\u2713 Microphone allowed" : "Allow microphone")
|
|
5549
5809
|
)
|
|
5550
|
-
), page === "done" && /* @__PURE__ */
|
|
5810
|
+
), page === "done" && /* @__PURE__ */ React11.createElement(
|
|
5551
5811
|
PageBody,
|
|
5552
5812
|
{
|
|
5553
5813
|
icon: "rocket",
|
|
@@ -5560,7 +5820,7 @@ function TpkOnboarding({
|
|
|
5560
5820
|
|
|
5561
5821
|
Crashes are reported automatically; you'll never see a dialog for those.`
|
|
5562
5822
|
}
|
|
5563
|
-
)), /* @__PURE__ */
|
|
5823
|
+
)), /* @__PURE__ */ React11.createElement(View7, { style: styles7.footer }, /* @__PURE__ */ React11.createElement(Dots, { active: pageIndex, count: PAGES.length }), /* @__PURE__ */ React11.createElement(View7, { style: styles7.flex1 }), /* @__PURE__ */ React11.createElement(
|
|
5564
5824
|
Pressable6,
|
|
5565
5825
|
{
|
|
5566
5826
|
accessibilityRole: "button",
|
|
@@ -5568,7 +5828,7 @@ Crashes are reported automatically; you'll never see a dialog for those.`
|
|
|
5568
5828
|
onPress: next,
|
|
5569
5829
|
style: styles7.primaryButton
|
|
5570
5830
|
},
|
|
5571
|
-
/* @__PURE__ */
|
|
5831
|
+
/* @__PURE__ */ React11.createElement(Text7, { style: styles7.primaryLabel }, pageIndex < PAGES.length - 1 ? "Continue" : "Get started")
|
|
5572
5832
|
)));
|
|
5573
5833
|
}
|
|
5574
5834
|
function PageBody({
|
|
@@ -5577,13 +5837,13 @@ function PageBody({
|
|
|
5577
5837
|
body,
|
|
5578
5838
|
children
|
|
5579
5839
|
}) {
|
|
5580
|
-
return /* @__PURE__ */
|
|
5840
|
+
return /* @__PURE__ */ React11.createElement(View7, { style: styles7.page }, /* @__PURE__ */ React11.createElement(View7, { style: styles7.pageIconWrap }, /* @__PURE__ */ React11.createElement(TpkIcon, { name: icon, size: 56, color: "#D83232" })), /* @__PURE__ */ React11.createElement(Text7, { style: styles7.pageTitle }, title), /* @__PURE__ */ React11.createElement(Text7, { style: styles7.pageText }, body), children);
|
|
5581
5841
|
}
|
|
5582
5842
|
function Dots({
|
|
5583
5843
|
active,
|
|
5584
5844
|
count
|
|
5585
5845
|
}) {
|
|
5586
|
-
return /* @__PURE__ */
|
|
5846
|
+
return /* @__PURE__ */ React11.createElement(View7, { style: styles7.dots }, Array.from({ length: count }).map((_, i) => /* @__PURE__ */ React11.createElement(
|
|
5587
5847
|
View7,
|
|
5588
5848
|
{
|
|
5589
5849
|
key: i,
|
|
@@ -5956,7 +6216,7 @@ _TpkTalker._instance = null;
|
|
|
5956
6216
|
var TpkTalker = _TpkTalker;
|
|
5957
6217
|
|
|
5958
6218
|
// src/widget-discovery.ts
|
|
5959
|
-
import { Platform as
|
|
6219
|
+
import { Platform as Platform6 } from "react-native";
|
|
5960
6220
|
var _WidgetDiscovery = class _WidgetDiscovery {
|
|
5961
6221
|
static get instance() {
|
|
5962
6222
|
if (!_WidgetDiscovery._instance)
|
|
@@ -5992,7 +6252,7 @@ var _WidgetDiscovery = class _WidgetDiscovery {
|
|
|
5992
6252
|
depth: 0
|
|
5993
6253
|
});
|
|
5994
6254
|
}
|
|
5995
|
-
if (
|
|
6255
|
+
if (Platform6.OS === "web" && typeof document !== "undefined") {
|
|
5996
6256
|
if (options.includeSensitive !== false) {
|
|
5997
6257
|
for (const el of document.querySelectorAll(
|
|
5998
6258
|
"[data-tpk-sensitive]"
|
|
@@ -6039,7 +6299,7 @@ _WidgetDiscovery._instance = null;
|
|
|
6039
6299
|
var WidgetDiscovery = _WidgetDiscovery;
|
|
6040
6300
|
function measureRef(ref) {
|
|
6041
6301
|
if (!ref.current) return null;
|
|
6042
|
-
if (
|
|
6302
|
+
if (Platform6.OS === "web" && typeof window !== "undefined") {
|
|
6043
6303
|
const node = ref.current;
|
|
6044
6304
|
if (typeof node.getBoundingClientRect === "function") {
|
|
6045
6305
|
const r = node.getBoundingClientRect();
|
|
@@ -6260,7 +6520,7 @@ function mockWidgets() {
|
|
|
6260
6520
|
}
|
|
6261
6521
|
|
|
6262
6522
|
// src/GeneralFeedbackDialog.tsx
|
|
6263
|
-
import
|
|
6523
|
+
import React12, { useEffect as useEffect7, useMemo as useMemo5, useState as useState8 } from "react";
|
|
6264
6524
|
import {
|
|
6265
6525
|
ActivityIndicator as ActivityIndicator3,
|
|
6266
6526
|
Modal as Modal4,
|
|
@@ -6341,7 +6601,7 @@ function GeneralFeedbackDialog({
|
|
|
6341
6601
|
setSubmitting(false);
|
|
6342
6602
|
}
|
|
6343
6603
|
};
|
|
6344
|
-
return /* @__PURE__ */
|
|
6604
|
+
return /* @__PURE__ */ React12.createElement(
|
|
6345
6605
|
Modal4,
|
|
6346
6606
|
{
|
|
6347
6607
|
animationType: "fade",
|
|
@@ -6349,7 +6609,7 @@ function GeneralFeedbackDialog({
|
|
|
6349
6609
|
transparent: true,
|
|
6350
6610
|
visible
|
|
6351
6611
|
},
|
|
6352
|
-
/* @__PURE__ */
|
|
6612
|
+
/* @__PURE__ */ React12.createElement(View8, { style: styles8.backdrop }, /* @__PURE__ */ React12.createElement(View8, { style: [styles8.card, style] }, /* @__PURE__ */ React12.createElement(View8, { style: styles8.header }, /* @__PURE__ */ React12.createElement(TpkIcon, { name: "feedback", size: 22, color: "#2563EB" }), /* @__PURE__ */ React12.createElement(Text8, { style: styles8.headerTitle }, "Share Your Feedback"), /* @__PURE__ */ React12.createElement(
|
|
6353
6613
|
Pressable7,
|
|
6354
6614
|
{
|
|
6355
6615
|
accessibilityRole: "button",
|
|
@@ -6357,15 +6617,15 @@ function GeneralFeedbackDialog({
|
|
|
6357
6617
|
onPress: onClose,
|
|
6358
6618
|
style: styles8.headerClose
|
|
6359
6619
|
},
|
|
6360
|
-
/* @__PURE__ */
|
|
6361
|
-
)), /* @__PURE__ */
|
|
6620
|
+
/* @__PURE__ */ React12.createElement(TpkIcon, { name: "close", size: 20, color: "#0F172A" })
|
|
6621
|
+
)), /* @__PURE__ */ React12.createElement(
|
|
6362
6622
|
ScrollView6,
|
|
6363
6623
|
{
|
|
6364
6624
|
contentContainerStyle: styles8.body,
|
|
6365
6625
|
keyboardShouldPersistTaps: "handled"
|
|
6366
6626
|
},
|
|
6367
|
-
/* @__PURE__ */
|
|
6368
|
-
/* @__PURE__ */
|
|
6627
|
+
/* @__PURE__ */ React12.createElement(Text8, { style: styles8.sectionLabel }, "How satisfied are you with the app?"),
|
|
6628
|
+
/* @__PURE__ */ React12.createElement(View8, { style: styles8.starRow }, [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ React12.createElement(
|
|
6369
6629
|
Pressable7,
|
|
6370
6630
|
{
|
|
6371
6631
|
key: i,
|
|
@@ -6378,7 +6638,7 @@ function GeneralFeedbackDialog({
|
|
|
6378
6638
|
pressed && { opacity: 0.7 }
|
|
6379
6639
|
]
|
|
6380
6640
|
},
|
|
6381
|
-
/* @__PURE__ */
|
|
6641
|
+
/* @__PURE__ */ React12.createElement(
|
|
6382
6642
|
TpkIcon,
|
|
6383
6643
|
{
|
|
6384
6644
|
name: i <= rating ? "star_filled" : "star_outline",
|
|
@@ -6387,8 +6647,8 @@ function GeneralFeedbackDialog({
|
|
|
6387
6647
|
}
|
|
6388
6648
|
)
|
|
6389
6649
|
))),
|
|
6390
|
-
/* @__PURE__ */
|
|
6391
|
-
/* @__PURE__ */
|
|
6650
|
+
/* @__PURE__ */ React12.createElement(Text8, { style: styles8.sectionLabel }, "Feedback type"),
|
|
6651
|
+
/* @__PURE__ */ React12.createElement(View8, { style: styles8.categoryRow }, CATEGORIES.map((c) => /* @__PURE__ */ React12.createElement(
|
|
6392
6652
|
Pressable7,
|
|
6393
6653
|
{
|
|
6394
6654
|
key: c.value,
|
|
@@ -6400,7 +6660,7 @@ function GeneralFeedbackDialog({
|
|
|
6400
6660
|
category === c.value && styles8.categoryChipActive
|
|
6401
6661
|
]
|
|
6402
6662
|
},
|
|
6403
|
-
/* @__PURE__ */
|
|
6663
|
+
/* @__PURE__ */ React12.createElement(
|
|
6404
6664
|
TpkIcon,
|
|
6405
6665
|
{
|
|
6406
6666
|
name: c.icon,
|
|
@@ -6408,7 +6668,7 @@ function GeneralFeedbackDialog({
|
|
|
6408
6668
|
color: category === c.value ? "#FFFFFF" : "#0F172A"
|
|
6409
6669
|
}
|
|
6410
6670
|
),
|
|
6411
|
-
/* @__PURE__ */
|
|
6671
|
+
/* @__PURE__ */ React12.createElement(
|
|
6412
6672
|
Text8,
|
|
6413
6673
|
{
|
|
6414
6674
|
style: [
|
|
@@ -6419,8 +6679,8 @@ function GeneralFeedbackDialog({
|
|
|
6419
6679
|
c.label
|
|
6420
6680
|
)
|
|
6421
6681
|
))),
|
|
6422
|
-
/* @__PURE__ */
|
|
6423
|
-
/* @__PURE__ */
|
|
6682
|
+
/* @__PURE__ */ React12.createElement(Text8, { style: styles8.sectionLabel }, "Summary", " ", /* @__PURE__ */ React12.createElement(Text8, { style: styles8.muted }, "(", title.trim().length, "/", TITLE_MAX, ")")),
|
|
6683
|
+
/* @__PURE__ */ React12.createElement(
|
|
6424
6684
|
TextInput2,
|
|
6425
6685
|
{
|
|
6426
6686
|
autoFocus: true,
|
|
@@ -6431,8 +6691,8 @@ function GeneralFeedbackDialog({
|
|
|
6431
6691
|
value: title
|
|
6432
6692
|
}
|
|
6433
6693
|
),
|
|
6434
|
-
/* @__PURE__ */
|
|
6435
|
-
/* @__PURE__ */
|
|
6694
|
+
/* @__PURE__ */ React12.createElement(Text8, { style: styles8.sectionLabel }, "Details", " ", /* @__PURE__ */ React12.createElement(Text8, { style: styles8.muted }, "(", details.trim().length, "/", DETAILS_MAX, ")")),
|
|
6695
|
+
/* @__PURE__ */ React12.createElement(
|
|
6436
6696
|
TextInput2,
|
|
6437
6697
|
{
|
|
6438
6698
|
maxLength: DETAILS_MAX,
|
|
@@ -6444,8 +6704,8 @@ function GeneralFeedbackDialog({
|
|
|
6444
6704
|
value: details
|
|
6445
6705
|
}
|
|
6446
6706
|
),
|
|
6447
|
-
(validationError || submitError) && /* @__PURE__ */
|
|
6448
|
-
), /* @__PURE__ */
|
|
6707
|
+
(validationError || submitError) && /* @__PURE__ */ React12.createElement(Text8, { style: styles8.errorLine }, submitError ?? validationError)
|
|
6708
|
+
), /* @__PURE__ */ React12.createElement(View8, { style: styles8.footer }, /* @__PURE__ */ React12.createElement(
|
|
6449
6709
|
Pressable7,
|
|
6450
6710
|
{
|
|
6451
6711
|
accessibilityRole: "button",
|
|
@@ -6456,8 +6716,8 @@ function GeneralFeedbackDialog({
|
|
|
6456
6716
|
pressed && { opacity: 0.85 }
|
|
6457
6717
|
]
|
|
6458
6718
|
},
|
|
6459
|
-
/* @__PURE__ */
|
|
6460
|
-
), /* @__PURE__ */
|
|
6719
|
+
/* @__PURE__ */ React12.createElement(Text8, { style: styles8.cancelLabel }, "Cancel")
|
|
6720
|
+
), /* @__PURE__ */ React12.createElement(
|
|
6461
6721
|
Pressable7,
|
|
6462
6722
|
{
|
|
6463
6723
|
accessibilityRole: "button",
|
|
@@ -6469,7 +6729,7 @@ function GeneralFeedbackDialog({
|
|
|
6469
6729
|
pressed && { opacity: 0.85 }
|
|
6470
6730
|
]
|
|
6471
6731
|
},
|
|
6472
|
-
submitting ? /* @__PURE__ */
|
|
6732
|
+
submitting ? /* @__PURE__ */ React12.createElement(ActivityIndicator3, { color: "#FAFAF7" }) : /* @__PURE__ */ React12.createElement(Text8, { style: styles8.submitLabel }, "Submit feedback")
|
|
6473
6733
|
))))
|
|
6474
6734
|
);
|
|
6475
6735
|
}
|
|
@@ -6627,7 +6887,7 @@ var styles8 = StyleSheet8.create({
|
|
|
6627
6887
|
});
|
|
6628
6888
|
|
|
6629
6889
|
// src/ScreenshotAnnotationEditor.tsx
|
|
6630
|
-
import
|
|
6890
|
+
import React14, { useCallback as useCallback6, useRef as useRef7, useState as useState10 } from "react";
|
|
6631
6891
|
import {
|
|
6632
6892
|
ActivityIndicator as ActivityIndicator4,
|
|
6633
6893
|
Modal as Modal5,
|
|
@@ -6640,7 +6900,7 @@ import {
|
|
|
6640
6900
|
} from "react-native";
|
|
6641
6901
|
|
|
6642
6902
|
// src/TpkAnnotationOverlay.tsx
|
|
6643
|
-
import
|
|
6903
|
+
import React13, {
|
|
6644
6904
|
forwardRef,
|
|
6645
6905
|
useCallback as useCallback5,
|
|
6646
6906
|
useImperativeHandle,
|
|
@@ -6780,7 +7040,7 @@ var TpkAnnotationOverlay = forwardRef(function TpkAnnotationOverlay2(props, ref)
|
|
|
6780
7040
|
const surfaceRef = useRef6(null);
|
|
6781
7041
|
const SvgModRef = useRef6(null);
|
|
6782
7042
|
const [svgReady, setSvgReady] = useState9(false);
|
|
6783
|
-
|
|
7043
|
+
React13.useEffect(() => {
|
|
6784
7044
|
import("react-native-svg").then((mod) => {
|
|
6785
7045
|
SvgModRef.current = mod;
|
|
6786
7046
|
setSvgReady(true);
|
|
@@ -6866,7 +7126,7 @@ var TpkAnnotationOverlay = forwardRef(function TpkAnnotationOverlay2(props, ref)
|
|
|
6866
7126
|
}),
|
|
6867
7127
|
[shapes, commitShapes]
|
|
6868
7128
|
);
|
|
6869
|
-
return /* @__PURE__ */
|
|
7129
|
+
return /* @__PURE__ */ React13.createElement(
|
|
6870
7130
|
View9,
|
|
6871
7131
|
{
|
|
6872
7132
|
ref: surfaceRef,
|
|
@@ -6874,7 +7134,7 @@ var TpkAnnotationOverlay = forwardRef(function TpkAnnotationOverlay2(props, ref)
|
|
|
6874
7134
|
onLayout,
|
|
6875
7135
|
...panResponder.panHandlers
|
|
6876
7136
|
},
|
|
6877
|
-
/* @__PURE__ */
|
|
7137
|
+
/* @__PURE__ */ React13.createElement(
|
|
6878
7138
|
Image2,
|
|
6879
7139
|
{
|
|
6880
7140
|
source: { uri: imageUri },
|
|
@@ -6882,13 +7142,13 @@ var TpkAnnotationOverlay = forwardRef(function TpkAnnotationOverlay2(props, ref)
|
|
|
6882
7142
|
resizeMode: "contain"
|
|
6883
7143
|
}
|
|
6884
7144
|
),
|
|
6885
|
-
svgReady && SvgModRef.current ? /* @__PURE__ */
|
|
7145
|
+
svgReady && SvgModRef.current ? /* @__PURE__ */ React13.createElement(ShapeLayer, { shapes, svgMod: SvgModRef.current, viewBox: `0 0 ${imageWidth} ${imageHeight}` }) : null
|
|
6886
7146
|
);
|
|
6887
7147
|
});
|
|
6888
7148
|
function ShapeLayer({ shapes, svgMod, viewBox }) {
|
|
6889
7149
|
const Svg = svgMod.default ?? svgMod.Svg;
|
|
6890
7150
|
const { Rect, Circle, Polygon, Path, Text: SvgText, Line: SvgLine, G } = svgMod;
|
|
6891
|
-
return /* @__PURE__ */
|
|
7151
|
+
return /* @__PURE__ */ React13.createElement(
|
|
6892
7152
|
Svg,
|
|
6893
7153
|
{
|
|
6894
7154
|
style: StyleSheet9.absoluteFill,
|
|
@@ -6901,7 +7161,7 @@ function ShapeLayer({ shapes, svgMod, viewBox }) {
|
|
|
6901
7161
|
const opacity = s.kind === "blur" ? 1 : s.style.opacity ?? 1;
|
|
6902
7162
|
switch (s.kind) {
|
|
6903
7163
|
case "rect":
|
|
6904
|
-
return /* @__PURE__ */
|
|
7164
|
+
return /* @__PURE__ */ React13.createElement(
|
|
6905
7165
|
Rect,
|
|
6906
7166
|
{
|
|
6907
7167
|
key: s.id,
|
|
@@ -6916,7 +7176,7 @@ function ShapeLayer({ shapes, svgMod, viewBox }) {
|
|
|
6916
7176
|
}
|
|
6917
7177
|
);
|
|
6918
7178
|
case "circle":
|
|
6919
|
-
return /* @__PURE__ */
|
|
7179
|
+
return /* @__PURE__ */ React13.createElement(
|
|
6920
7180
|
Circle,
|
|
6921
7181
|
{
|
|
6922
7182
|
key: s.id,
|
|
@@ -6931,7 +7191,7 @@ function ShapeLayer({ shapes, svgMod, viewBox }) {
|
|
|
6931
7191
|
);
|
|
6932
7192
|
case "arrow": {
|
|
6933
7193
|
const head = arrowHeadPoints(s);
|
|
6934
|
-
return /* @__PURE__ */
|
|
7194
|
+
return /* @__PURE__ */ React13.createElement(G, { key: s.id, opacity }, /* @__PURE__ */ React13.createElement(
|
|
6935
7195
|
SvgLine,
|
|
6936
7196
|
{
|
|
6937
7197
|
x1: s.from.x,
|
|
@@ -6941,7 +7201,7 @@ function ShapeLayer({ shapes, svgMod, viewBox }) {
|
|
|
6941
7201
|
stroke,
|
|
6942
7202
|
strokeWidth
|
|
6943
7203
|
}
|
|
6944
|
-
), /* @__PURE__ */
|
|
7204
|
+
), /* @__PURE__ */ React13.createElement(
|
|
6945
7205
|
Polygon,
|
|
6946
7206
|
{
|
|
6947
7207
|
points: head.map((p) => `${p.x},${p.y}`).join(" "),
|
|
@@ -6950,7 +7210,7 @@ function ShapeLayer({ shapes, svgMod, viewBox }) {
|
|
|
6950
7210
|
));
|
|
6951
7211
|
}
|
|
6952
7212
|
case "path":
|
|
6953
|
-
return /* @__PURE__ */
|
|
7213
|
+
return /* @__PURE__ */ React13.createElement(
|
|
6954
7214
|
Path,
|
|
6955
7215
|
{
|
|
6956
7216
|
key: s.id,
|
|
@@ -6962,7 +7222,7 @@ function ShapeLayer({ shapes, svgMod, viewBox }) {
|
|
|
6962
7222
|
}
|
|
6963
7223
|
);
|
|
6964
7224
|
case "text":
|
|
6965
|
-
return /* @__PURE__ */
|
|
7225
|
+
return /* @__PURE__ */ React13.createElement(
|
|
6966
7226
|
SvgText,
|
|
6967
7227
|
{
|
|
6968
7228
|
key: s.id,
|
|
@@ -6975,7 +7235,7 @@ function ShapeLayer({ shapes, svgMod, viewBox }) {
|
|
|
6975
7235
|
s.text
|
|
6976
7236
|
);
|
|
6977
7237
|
case "blur":
|
|
6978
|
-
return /* @__PURE__ */
|
|
7238
|
+
return /* @__PURE__ */ React13.createElement(
|
|
6979
7239
|
Rect,
|
|
6980
7240
|
{
|
|
6981
7241
|
key: s.id,
|
|
@@ -7141,7 +7401,7 @@ function ScreenshotAnnotationEditor({
|
|
|
7141
7401
|
const setStrokeWidth = useCallback6((strokeWidth) => {
|
|
7142
7402
|
setAnnotationStyle((cur) => ({ ...cur, strokeWidth }));
|
|
7143
7403
|
}, []);
|
|
7144
|
-
return /* @__PURE__ */
|
|
7404
|
+
return /* @__PURE__ */ React14.createElement(
|
|
7145
7405
|
Modal5,
|
|
7146
7406
|
{
|
|
7147
7407
|
animationType: "slide",
|
|
@@ -7149,7 +7409,7 @@ function ScreenshotAnnotationEditor({
|
|
|
7149
7409
|
transparent: false,
|
|
7150
7410
|
visible
|
|
7151
7411
|
},
|
|
7152
|
-
/* @__PURE__ */
|
|
7412
|
+
/* @__PURE__ */ React14.createElement(View10, { style: [styles10.root, style], testID }, /* @__PURE__ */ React14.createElement(
|
|
7153
7413
|
Header2,
|
|
7154
7414
|
{
|
|
7155
7415
|
onCancel,
|
|
@@ -7157,7 +7417,7 @@ function ScreenshotAnnotationEditor({
|
|
|
7157
7417
|
onUndo: () => editorRef.current?.undo(),
|
|
7158
7418
|
onClear: () => editorRef.current?.clear()
|
|
7159
7419
|
}
|
|
7160
|
-
), /* @__PURE__ */
|
|
7420
|
+
), /* @__PURE__ */ React14.createElement(
|
|
7161
7421
|
Toolbar,
|
|
7162
7422
|
{
|
|
7163
7423
|
tool,
|
|
@@ -7166,7 +7426,7 @@ function ScreenshotAnnotationEditor({
|
|
|
7166
7426
|
onColorChange: setColor,
|
|
7167
7427
|
onStrokeWidthChange: setStrokeWidth
|
|
7168
7428
|
}
|
|
7169
|
-
), tool === "text" && /* @__PURE__ */
|
|
7429
|
+
), tool === "text" && /* @__PURE__ */ React14.createElement(View10, { style: styles10.textInputRow }, /* @__PURE__ */ React14.createElement(
|
|
7170
7430
|
TextInput3,
|
|
7171
7431
|
{
|
|
7172
7432
|
autoFocus: true,
|
|
@@ -7176,7 +7436,7 @@ function ScreenshotAnnotationEditor({
|
|
|
7176
7436
|
value: textValue,
|
|
7177
7437
|
onChangeText: setTextValue
|
|
7178
7438
|
}
|
|
7179
|
-
)), /* @__PURE__ */
|
|
7439
|
+
)), /* @__PURE__ */ React14.createElement(View10, { style: styles10.canvasWrap }, /* @__PURE__ */ React14.createElement(
|
|
7180
7440
|
TpkAnnotationOverlay,
|
|
7181
7441
|
{
|
|
7182
7442
|
ref: editorRef,
|
|
@@ -7187,7 +7447,7 @@ function ScreenshotAnnotationEditor({
|
|
|
7187
7447
|
style: annotationStyle,
|
|
7188
7448
|
textValue
|
|
7189
7449
|
}
|
|
7190
|
-
)), error && /* @__PURE__ */
|
|
7450
|
+
)), error && /* @__PURE__ */ React14.createElement(View10, { style: styles10.errorBanner }, /* @__PURE__ */ React14.createElement(Text9, { style: styles10.errorLabel }, error)), /* @__PURE__ */ React14.createElement(
|
|
7191
7451
|
Footer2,
|
|
7192
7452
|
{
|
|
7193
7453
|
processing,
|
|
@@ -7203,7 +7463,7 @@ function Header2({
|
|
|
7203
7463
|
onUndo,
|
|
7204
7464
|
onClear
|
|
7205
7465
|
}) {
|
|
7206
|
-
return /* @__PURE__ */
|
|
7466
|
+
return /* @__PURE__ */ React14.createElement(View10, { style: [styles10.header, { paddingTop: 12 + getModalInsets().top }] }, /* @__PURE__ */ React14.createElement(
|
|
7207
7467
|
Pressable8,
|
|
7208
7468
|
{
|
|
7209
7469
|
accessibilityRole: "button",
|
|
@@ -7212,8 +7472,8 @@ function Header2({
|
|
|
7212
7472
|
onPress: onCancel,
|
|
7213
7473
|
style: styles10.headerIconButton
|
|
7214
7474
|
},
|
|
7215
|
-
/* @__PURE__ */
|
|
7216
|
-
), /* @__PURE__ */
|
|
7475
|
+
/* @__PURE__ */ React14.createElement(TpkIcon, { name: "close", size: 20, color: "#FAFAF7" })
|
|
7476
|
+
), /* @__PURE__ */ React14.createElement(View10, { style: styles10.headerTitleRow }, /* @__PURE__ */ React14.createElement(TpkIcon, { name: "edit_pen", size: 20, color: "#FAFAF7" }), /* @__PURE__ */ React14.createElement(Text9, { style: styles10.headerTitle }, "Annotate Screenshot")), /* @__PURE__ */ React14.createElement(
|
|
7217
7477
|
Pressable8,
|
|
7218
7478
|
{
|
|
7219
7479
|
accessibilityRole: "button",
|
|
@@ -7222,8 +7482,8 @@ function Header2({
|
|
|
7222
7482
|
onPress: onUndo,
|
|
7223
7483
|
style: styles10.headerIconButton
|
|
7224
7484
|
},
|
|
7225
|
-
/* @__PURE__ */
|
|
7226
|
-
), /* @__PURE__ */
|
|
7485
|
+
/* @__PURE__ */ React14.createElement(Text9, { style: styles10.headerIconLabel }, "\u21B6")
|
|
7486
|
+
), /* @__PURE__ */ React14.createElement(
|
|
7227
7487
|
Pressable8,
|
|
7228
7488
|
{
|
|
7229
7489
|
accessibilityRole: "button",
|
|
@@ -7232,7 +7492,7 @@ function Header2({
|
|
|
7232
7492
|
onPress: onClear,
|
|
7233
7493
|
style: styles10.headerIconButton
|
|
7234
7494
|
},
|
|
7235
|
-
/* @__PURE__ */
|
|
7495
|
+
/* @__PURE__ */ React14.createElement(Text9, { style: styles10.headerIconLabel }, "\u232B")
|
|
7236
7496
|
));
|
|
7237
7497
|
}
|
|
7238
7498
|
function Toolbar({
|
|
@@ -7242,7 +7502,7 @@ function Toolbar({
|
|
|
7242
7502
|
onColorChange,
|
|
7243
7503
|
onStrokeWidthChange
|
|
7244
7504
|
}) {
|
|
7245
|
-
return /* @__PURE__ */
|
|
7505
|
+
return /* @__PURE__ */ React14.createElement(View10, { style: styles10.toolbar }, /* @__PURE__ */ React14.createElement(
|
|
7246
7506
|
ScrollView7,
|
|
7247
7507
|
{
|
|
7248
7508
|
horizontal: true,
|
|
@@ -7251,7 +7511,7 @@ function Toolbar({
|
|
|
7251
7511
|
},
|
|
7252
7512
|
TOOLS.map((t) => {
|
|
7253
7513
|
const active = tool === t.value;
|
|
7254
|
-
return /* @__PURE__ */
|
|
7514
|
+
return /* @__PURE__ */ React14.createElement(
|
|
7255
7515
|
Pressable8,
|
|
7256
7516
|
{
|
|
7257
7517
|
key: t.value,
|
|
@@ -7264,7 +7524,7 @@ function Toolbar({
|
|
|
7264
7524
|
active && styles10.toolButtonActive
|
|
7265
7525
|
]
|
|
7266
7526
|
},
|
|
7267
|
-
/* @__PURE__ */
|
|
7527
|
+
/* @__PURE__ */ React14.createElement(
|
|
7268
7528
|
TpkIcon,
|
|
7269
7529
|
{
|
|
7270
7530
|
name: t.icon,
|
|
@@ -7272,7 +7532,7 @@ function Toolbar({
|
|
|
7272
7532
|
color: active ? "#FAFAF7" : "#94A3B8"
|
|
7273
7533
|
}
|
|
7274
7534
|
),
|
|
7275
|
-
/* @__PURE__ */
|
|
7535
|
+
/* @__PURE__ */ React14.createElement(
|
|
7276
7536
|
Text9,
|
|
7277
7537
|
{
|
|
7278
7538
|
style: [
|
|
@@ -7284,7 +7544,7 @@ function Toolbar({
|
|
|
7284
7544
|
)
|
|
7285
7545
|
);
|
|
7286
7546
|
})
|
|
7287
|
-
), /* @__PURE__ */
|
|
7547
|
+
), /* @__PURE__ */ React14.createElement(View10, { style: styles10.toolbarBottomRow }, /* @__PURE__ */ React14.createElement(View10, { style: styles10.swatchRow }, ANNOTATION_PALETTE.map((c) => /* @__PURE__ */ React14.createElement(
|
|
7288
7548
|
Pressable8,
|
|
7289
7549
|
{
|
|
7290
7550
|
key: c,
|
|
@@ -7297,7 +7557,7 @@ function Toolbar({
|
|
|
7297
7557
|
annotationStyle.color === c && styles10.swatchActive
|
|
7298
7558
|
]
|
|
7299
7559
|
}
|
|
7300
|
-
))), /* @__PURE__ */
|
|
7560
|
+
))), /* @__PURE__ */ React14.createElement(View10, { style: styles10.strokeRow }, STROKE_WIDTHS.map((w) => /* @__PURE__ */ React14.createElement(
|
|
7301
7561
|
Pressable8,
|
|
7302
7562
|
{
|
|
7303
7563
|
key: w,
|
|
@@ -7309,7 +7569,7 @@ function Toolbar({
|
|
|
7309
7569
|
annotationStyle.strokeWidth === w && styles10.strokeButtonActive
|
|
7310
7570
|
]
|
|
7311
7571
|
},
|
|
7312
|
-
/* @__PURE__ */
|
|
7572
|
+
/* @__PURE__ */ React14.createElement(
|
|
7313
7573
|
View10,
|
|
7314
7574
|
{
|
|
7315
7575
|
style: [
|
|
@@ -7328,33 +7588,43 @@ function Footer2({
|
|
|
7328
7588
|
onCancel,
|
|
7329
7589
|
onSave
|
|
7330
7590
|
}) {
|
|
7331
|
-
return /* @__PURE__ */
|
|
7332
|
-
|
|
7333
|
-
{
|
|
7334
|
-
accessibilityRole: "button",
|
|
7335
|
-
disabled: processing,
|
|
7336
|
-
onPress: onCancel,
|
|
7337
|
-
style: ({ pressed }) => [
|
|
7338
|
-
styles10.footerSecondary,
|
|
7339
|
-
pressed && { opacity: 0.7 }
|
|
7340
|
-
]
|
|
7341
|
-
},
|
|
7342
|
-
/* @__PURE__ */ React13.createElement(Text9, { style: styles10.footerSecondaryLabel }, "Cancel")
|
|
7343
|
-
), /* @__PURE__ */ React13.createElement(
|
|
7344
|
-
Pressable8,
|
|
7591
|
+
return /* @__PURE__ */ React14.createElement(
|
|
7592
|
+
View10,
|
|
7345
7593
|
{
|
|
7346
|
-
|
|
7347
|
-
|
|
7348
|
-
|
|
7349
|
-
onPress: onSave,
|
|
7350
|
-
style: ({ pressed }) => [
|
|
7351
|
-
styles10.footerPrimary,
|
|
7352
|
-
processing && styles10.footerPrimaryDisabled,
|
|
7353
|
-
pressed && { opacity: 0.85 }
|
|
7594
|
+
style: [
|
|
7595
|
+
styles10.footer,
|
|
7596
|
+
{ paddingBottom: Math.max(14, getModalInsets().bottom) }
|
|
7354
7597
|
]
|
|
7355
7598
|
},
|
|
7356
|
-
|
|
7357
|
-
|
|
7599
|
+
/* @__PURE__ */ React14.createElement(
|
|
7600
|
+
Pressable8,
|
|
7601
|
+
{
|
|
7602
|
+
accessibilityRole: "button",
|
|
7603
|
+
disabled: processing,
|
|
7604
|
+
onPress: onCancel,
|
|
7605
|
+
style: ({ pressed }) => [
|
|
7606
|
+
styles10.footerSecondary,
|
|
7607
|
+
pressed && { opacity: 0.7 }
|
|
7608
|
+
]
|
|
7609
|
+
},
|
|
7610
|
+
/* @__PURE__ */ React14.createElement(Text9, { style: styles10.footerSecondaryLabel }, "Cancel")
|
|
7611
|
+
),
|
|
7612
|
+
/* @__PURE__ */ React14.createElement(
|
|
7613
|
+
Pressable8,
|
|
7614
|
+
{
|
|
7615
|
+
accessibilityRole: "button",
|
|
7616
|
+
accessibilityLabel: "Save annotation",
|
|
7617
|
+
disabled: processing,
|
|
7618
|
+
onPress: onSave,
|
|
7619
|
+
style: ({ pressed }) => [
|
|
7620
|
+
styles10.footerPrimary,
|
|
7621
|
+
processing && styles10.footerPrimaryDisabled,
|
|
7622
|
+
pressed && { opacity: 0.85 }
|
|
7623
|
+
]
|
|
7624
|
+
},
|
|
7625
|
+
processing ? /* @__PURE__ */ React14.createElement(ActivityIndicator4, { color: "#FAFAF7" }) : /* @__PURE__ */ React14.createElement(Text9, { style: styles10.footerPrimaryLabel }, "Save annotation")
|
|
7626
|
+
)
|
|
7627
|
+
);
|
|
7358
7628
|
}
|
|
7359
7629
|
var styles10 = StyleSheet10.create({
|
|
7360
7630
|
root: {
|
|
@@ -7584,7 +7854,7 @@ async function readFileSize(uri) {
|
|
|
7584
7854
|
}
|
|
7585
7855
|
|
|
7586
7856
|
// src/VoiceBugInputSheet.tsx
|
|
7587
|
-
import
|
|
7857
|
+
import React15, {
|
|
7588
7858
|
useCallback as useCallback7,
|
|
7589
7859
|
useEffect as useEffect8,
|
|
7590
7860
|
useMemo as useMemo7,
|
|
@@ -7596,7 +7866,7 @@ import {
|
|
|
7596
7866
|
Animated as Animated2,
|
|
7597
7867
|
Easing as Easing2,
|
|
7598
7868
|
Modal as Modal6,
|
|
7599
|
-
Platform as
|
|
7869
|
+
Platform as Platform7,
|
|
7600
7870
|
Pressable as Pressable9,
|
|
7601
7871
|
ScrollView as ScrollView8,
|
|
7602
7872
|
StyleSheet as StyleSheet11,
|
|
@@ -7633,9 +7903,28 @@ async function extractVoiceBug(tpk, audio) {
|
|
|
7633
7903
|
sourceLanguage: audio.language ?? result.detectedLanguage
|
|
7634
7904
|
};
|
|
7635
7905
|
}
|
|
7906
|
+
async function quickDraftBug(tpk, input) {
|
|
7907
|
+
const client = tpk.api.client;
|
|
7908
|
+
if (!client) {
|
|
7909
|
+
throw new Error("TpkExpo client did not expose an axios instance.");
|
|
7910
|
+
}
|
|
7911
|
+
const response = await client.post("/v1/testers/me/bug-reports/quick-draft", {
|
|
7912
|
+
action: input.action,
|
|
7913
|
+
screenshot_base64: input.screenshotBase64,
|
|
7914
|
+
...input.screenName ? { screen_name: input.screenName } : {},
|
|
7915
|
+
...input.language ? { language: input.language } : {}
|
|
7916
|
+
});
|
|
7917
|
+
return {
|
|
7918
|
+
...response.data,
|
|
7919
|
+
transcript: "",
|
|
7920
|
+
transcriptConfidence: 1,
|
|
7921
|
+
lowConfidence: false,
|
|
7922
|
+
sourceLanguage: input.language
|
|
7923
|
+
};
|
|
7924
|
+
}
|
|
7636
7925
|
|
|
7637
7926
|
// src/VoiceBugInputSheet.tsx
|
|
7638
|
-
var
|
|
7927
|
+
var DEFAULT_STRINGS_DE = {
|
|
7639
7928
|
languagePickerLabel: "Auto-detect",
|
|
7640
7929
|
classificationBug: "Bug",
|
|
7641
7930
|
classificationFeature: "Feature",
|
|
@@ -7654,8 +7943,68 @@ var DEFAULT_STRINGS = {
|
|
|
7654
7943
|
cancel: "Abbrechen",
|
|
7655
7944
|
retry: "Nochmal versuchen",
|
|
7656
7945
|
useExtracted: "\xDCbernehmen \u2192",
|
|
7657
|
-
rerecord: "Nochmal aufnehmen"
|
|
7946
|
+
rerecord: "Nochmal aufnehmen",
|
|
7947
|
+
quickHint: "Oder mit einem Tipp \u2014 wir lesen den Screen:",
|
|
7948
|
+
quickBroken: "Geht nicht",
|
|
7949
|
+
quickConfusing: "Versteh ich nicht",
|
|
7950
|
+
quickLooksBroken: "Sieht kaputt aus",
|
|
7951
|
+
quickMissing: "Fehlt mir",
|
|
7952
|
+
quickProcessingDescription: "Die KI schaut sich den Screen an und schreibt einen Entwurf. ~3-5 Sekunden.",
|
|
7953
|
+
quickExtractedDescription: "Entwurf aus dem Screenshot \u2014 pr\xFCf jede Zeile, bevor du \xFCbernimmst. Nichts wird ohne dich gesendet.",
|
|
7954
|
+
quickNoScreenshot: "Vom Screen lie\xDF sich kein Bild aufnehmen.",
|
|
7955
|
+
back: "Zur\xFCck"
|
|
7956
|
+
};
|
|
7957
|
+
var DEFAULT_STRINGS_EN = {
|
|
7958
|
+
languagePickerLabel: "Auto-detect",
|
|
7959
|
+
classificationBug: "Bug",
|
|
7960
|
+
classificationFeature: "Feature",
|
|
7961
|
+
classificationIdea: "Idea",
|
|
7962
|
+
classificationIssue: "Problem",
|
|
7963
|
+
idleHeadline: "Speak the bug",
|
|
7964
|
+
idleDescription: "Describe in your own words what's wrong. We fill in title, description, expected/actual and frequency from it.",
|
|
7965
|
+
recordingHeadline: "Listening\u2026",
|
|
7966
|
+
recordingDescription: "Just talk \u2014 we transcribe when you tap stop.",
|
|
7967
|
+
processingHeadline: "Analysing\u2026",
|
|
7968
|
+
processingDescription: "Whisper transcribes + GPT extracts the fields. ~3-5 seconds.",
|
|
7969
|
+
errorHeadline: "Something went wrong",
|
|
7970
|
+
errorDescriptionFallback: "Unknown error.",
|
|
7971
|
+
extractedHeadline: "Here's what I understood",
|
|
7972
|
+
extractedDescription: 'Check the extracted fields. "Use" takes you to the bug report with them filled in.',
|
|
7973
|
+
cancel: "Cancel",
|
|
7974
|
+
retry: "Try again",
|
|
7975
|
+
useExtracted: "Use \u2192",
|
|
7976
|
+
rerecord: "Record again",
|
|
7977
|
+
quickHint: "Or with one tap \u2014 we read the screen:",
|
|
7978
|
+
quickBroken: "Doesn't work",
|
|
7979
|
+
quickConfusing: "Don't get it",
|
|
7980
|
+
quickLooksBroken: "Looks broken",
|
|
7981
|
+
quickMissing: "Something's missing",
|
|
7982
|
+
quickProcessingDescription: "The AI looks at the screen and writes a draft. ~3-5 seconds.",
|
|
7983
|
+
quickExtractedDescription: "Draft from the screenshot \u2014 check every line before you use it. Nothing is sent without you.",
|
|
7984
|
+
quickNoScreenshot: "Could not capture the screen.",
|
|
7985
|
+
back: "Back"
|
|
7658
7986
|
};
|
|
7987
|
+
var QUICK_ACTIONS = [
|
|
7988
|
+
{ kind: "broken", emoji: "\u{1F6AB}", label: "quickBroken", classification: "bug" },
|
|
7989
|
+
{
|
|
7990
|
+
kind: "confusing",
|
|
7991
|
+
emoji: "\u{1F914}",
|
|
7992
|
+
label: "quickConfusing",
|
|
7993
|
+
classification: "issue"
|
|
7994
|
+
},
|
|
7995
|
+
{
|
|
7996
|
+
kind: "looks_broken",
|
|
7997
|
+
emoji: "\u{1F9E9}",
|
|
7998
|
+
label: "quickLooksBroken",
|
|
7999
|
+
classification: "issue"
|
|
8000
|
+
},
|
|
8001
|
+
{
|
|
8002
|
+
kind: "missing",
|
|
8003
|
+
emoji: "\u2795",
|
|
8004
|
+
label: "quickMissing",
|
|
8005
|
+
classification: "featureRequest"
|
|
8006
|
+
}
|
|
8007
|
+
];
|
|
7659
8008
|
var CLASSIFICATIONS = [
|
|
7660
8009
|
"bug",
|
|
7661
8010
|
"featureRequest",
|
|
@@ -7672,18 +8021,25 @@ function VoiceBugInputSheet({
|
|
|
7672
8021
|
sheetOpacity = 1,
|
|
7673
8022
|
voiceLanguage,
|
|
7674
8023
|
strings,
|
|
8024
|
+
captureScreen,
|
|
8025
|
+
currentScreen,
|
|
7675
8026
|
style,
|
|
7676
8027
|
testID = "tpk-voice-bug-sheet"
|
|
7677
8028
|
}) {
|
|
8029
|
+
const uiLanguage = useTpkLanguage();
|
|
7678
8030
|
const S = useMemo7(
|
|
7679
|
-
() => ({
|
|
7680
|
-
|
|
8031
|
+
() => ({
|
|
8032
|
+
...uiLanguage === "de" ? DEFAULT_STRINGS_DE : DEFAULT_STRINGS_EN,
|
|
8033
|
+
...strings ?? {}
|
|
8034
|
+
}),
|
|
8035
|
+
[strings, uiLanguage]
|
|
7681
8036
|
);
|
|
7682
8037
|
const [phase, setPhase] = useState11("idle");
|
|
7683
8038
|
const [classification, setClassification] = useState11("bug");
|
|
7684
8039
|
const [seconds, setSeconds] = useState11(0);
|
|
7685
8040
|
const [error, setError] = useState11(null);
|
|
7686
8041
|
const [result, setResult] = useState11(null);
|
|
8042
|
+
const [quickMode, setQuickMode] = useState11(false);
|
|
7687
8043
|
const [language, setLanguage] = useState11(
|
|
7688
8044
|
voiceLanguage ?? "auto"
|
|
7689
8045
|
);
|
|
@@ -7827,10 +8183,37 @@ function VoiceBugInputSheet({
|
|
|
7827
8183
|
recorderRef.current = null;
|
|
7828
8184
|
onCancel();
|
|
7829
8185
|
}, [onCancel]);
|
|
8186
|
+
const runQuick = useCallback7(
|
|
8187
|
+
async (action) => {
|
|
8188
|
+
if (phase !== "idle" || !captureScreen) return;
|
|
8189
|
+
setQuickMode(true);
|
|
8190
|
+
setClassification(action.classification);
|
|
8191
|
+
setError(null);
|
|
8192
|
+
setPhase("uploading");
|
|
8193
|
+
try {
|
|
8194
|
+
const shot = await captureScreen();
|
|
8195
|
+
if (!shot) throw new Error(S.quickNoScreenshot);
|
|
8196
|
+
if (!tpk) throw new Error("SDK not ready \u2014 try again in a moment.");
|
|
8197
|
+
const draft = await quickDraftBug(tpk, {
|
|
8198
|
+
action: action.kind,
|
|
8199
|
+
screenshotBase64: shot,
|
|
8200
|
+
screenName: currentScreen,
|
|
8201
|
+
language: language === "auto" ? void 0 : language
|
|
8202
|
+
});
|
|
8203
|
+
setResult(draft);
|
|
8204
|
+
setPhase("extracted");
|
|
8205
|
+
} catch (e) {
|
|
8206
|
+
setPhase("error");
|
|
8207
|
+
setError(e instanceof Error ? e.message : String(e));
|
|
8208
|
+
}
|
|
8209
|
+
},
|
|
8210
|
+
[phase, captureScreen, tpk, currentScreen, language, S]
|
|
8211
|
+
);
|
|
7830
8212
|
const useResult = useCallback7(() => {
|
|
7831
8213
|
if (result) onExtracted(result, classification);
|
|
7832
8214
|
}, [result, classification, onExtracted]);
|
|
7833
8215
|
const retryFresh = useCallback7(() => {
|
|
8216
|
+
setQuickMode(false);
|
|
7834
8217
|
setResult(null);
|
|
7835
8218
|
setSeconds(0);
|
|
7836
8219
|
setError(null);
|
|
@@ -7857,13 +8240,13 @@ function VoiceBugInputSheet({
|
|
|
7857
8240
|
case "recording":
|
|
7858
8241
|
return S.recordingDescription;
|
|
7859
8242
|
case "uploading":
|
|
7860
|
-
return S.processingDescription;
|
|
8243
|
+
return quickMode ? S.quickProcessingDescription : S.processingDescription;
|
|
7861
8244
|
case "extracted":
|
|
7862
|
-
return S.extractedDescription;
|
|
8245
|
+
return quickMode ? S.quickExtractedDescription : S.extractedDescription;
|
|
7863
8246
|
case "error":
|
|
7864
8247
|
return error ?? S.errorDescriptionFallback;
|
|
7865
8248
|
}
|
|
7866
|
-
}, [phase, error, S]);
|
|
8249
|
+
}, [phase, error, S, quickMode]);
|
|
7867
8250
|
const classificationLabel = useCallback7(
|
|
7868
8251
|
(c) => {
|
|
7869
8252
|
switch (c) {
|
|
@@ -7900,7 +8283,7 @@ function VoiceBugInputSheet({
|
|
|
7900
8283
|
const opacity = Math.max(0, Math.min(1, sheetOpacity));
|
|
7901
8284
|
const backdropOverride = { backgroundColor: `rgba(0,0,0,${0.55 * opacity})` };
|
|
7902
8285
|
const sheetOverride = { backgroundColor: `rgba(17,24,39,${opacity})` };
|
|
7903
|
-
return /* @__PURE__ */
|
|
8286
|
+
return /* @__PURE__ */ React15.createElement(
|
|
7904
8287
|
Modal6,
|
|
7905
8288
|
{
|
|
7906
8289
|
animationType: "slide",
|
|
@@ -7908,7 +8291,7 @@ function VoiceBugInputSheet({
|
|
|
7908
8291
|
transparent: true,
|
|
7909
8292
|
visible
|
|
7910
8293
|
},
|
|
7911
|
-
/* @__PURE__ */
|
|
8294
|
+
/* @__PURE__ */ React15.createElement(View11, { style: [styles11.backdrop, backdropOverride, style], testID }, /* @__PURE__ */ React15.createElement(
|
|
7912
8295
|
Pressable9,
|
|
7913
8296
|
{
|
|
7914
8297
|
accessibilityRole: "button",
|
|
@@ -7917,13 +8300,13 @@ function VoiceBugInputSheet({
|
|
|
7917
8300
|
onPress: () => void cancel(),
|
|
7918
8301
|
style: styles11.backdropSpacer
|
|
7919
8302
|
}
|
|
7920
|
-
), /* @__PURE__ */
|
|
8303
|
+
), /* @__PURE__ */ React15.createElement(View11, { style: [styles11.sheet, sheetOverride] }, /* @__PURE__ */ React15.createElement(View11, { style: styles11.grabber }), /* @__PURE__ */ React15.createElement(
|
|
7921
8304
|
Animated2.View,
|
|
7922
8305
|
{
|
|
7923
8306
|
style: [styles11.dimmable, { opacity: dimAnim }],
|
|
7924
8307
|
pointerEvents: isRecording ? "none" : "auto"
|
|
7925
8308
|
},
|
|
7926
|
-
/* @__PURE__ */
|
|
8309
|
+
/* @__PURE__ */ React15.createElement(View11, { style: styles11.languagePickerRow }, /* @__PURE__ */ React15.createElement(
|
|
7927
8310
|
Pressable9,
|
|
7928
8311
|
{
|
|
7929
8312
|
accessibilityRole: "button",
|
|
@@ -7936,10 +8319,10 @@ function VoiceBugInputSheet({
|
|
|
7936
8319
|
},
|
|
7937
8320
|
style: [styles11.languageChip, !isIdle && { opacity: 0.5 }]
|
|
7938
8321
|
},
|
|
7939
|
-
/* @__PURE__ */
|
|
7940
|
-
/* @__PURE__ */
|
|
8322
|
+
/* @__PURE__ */ React15.createElement(TpkIcon, { name: "language", size: 14, color: "#475569" }),
|
|
8323
|
+
/* @__PURE__ */ React15.createElement(Text10, { style: styles11.languageChipLabel }, languageLabel(language, S))
|
|
7941
8324
|
)),
|
|
7942
|
-
/* @__PURE__ */
|
|
8325
|
+
/* @__PURE__ */ React15.createElement(
|
|
7943
8326
|
ScrollView8,
|
|
7944
8327
|
{
|
|
7945
8328
|
horizontal: true,
|
|
@@ -7948,7 +8331,7 @@ function VoiceBugInputSheet({
|
|
|
7948
8331
|
},
|
|
7949
8332
|
CLASSIFICATIONS.map((c) => {
|
|
7950
8333
|
const active = classification === c;
|
|
7951
|
-
return /* @__PURE__ */
|
|
8334
|
+
return /* @__PURE__ */ React15.createElement(
|
|
7952
8335
|
Pressable9,
|
|
7953
8336
|
{
|
|
7954
8337
|
key: c,
|
|
@@ -7966,7 +8349,7 @@ function VoiceBugInputSheet({
|
|
|
7966
8349
|
!isIdle && { opacity: 0.5 }
|
|
7967
8350
|
]
|
|
7968
8351
|
},
|
|
7969
|
-
active && /* @__PURE__ */
|
|
8352
|
+
active && /* @__PURE__ */ React15.createElement(
|
|
7970
8353
|
TpkIcon,
|
|
7971
8354
|
{
|
|
7972
8355
|
name: "check",
|
|
@@ -7975,7 +8358,7 @@ function VoiceBugInputSheet({
|
|
|
7975
8358
|
style: { marginRight: 4 }
|
|
7976
8359
|
}
|
|
7977
8360
|
),
|
|
7978
|
-
/* @__PURE__ */
|
|
8361
|
+
/* @__PURE__ */ React15.createElement(
|
|
7979
8362
|
Text10,
|
|
7980
8363
|
{
|
|
7981
8364
|
style: [
|
|
@@ -7988,9 +8371,9 @@ function VoiceBugInputSheet({
|
|
|
7988
8371
|
);
|
|
7989
8372
|
})
|
|
7990
8373
|
),
|
|
7991
|
-
/* @__PURE__ */
|
|
7992
|
-
/* @__PURE__ */
|
|
7993
|
-
), isRecording && /* @__PURE__ */
|
|
8374
|
+
/* @__PURE__ */ React15.createElement(Text10, { style: styles11.headline }, headline),
|
|
8375
|
+
/* @__PURE__ */ React15.createElement(Text10, { style: styles11.description }, description)
|
|
8376
|
+
), isRecording && /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(Text10, { style: [styles11.timer, { color: accentColor }] }, formatTime(seconds)), /* @__PURE__ */ React15.createElement(View11, { style: styles11.meterTrack }, /* @__PURE__ */ React15.createElement(
|
|
7994
8377
|
Animated2.View,
|
|
7995
8378
|
{
|
|
7996
8379
|
style: [
|
|
@@ -8008,37 +8391,52 @@ function VoiceBugInputSheet({
|
|
|
8008
8391
|
}
|
|
8009
8392
|
]
|
|
8010
8393
|
}
|
|
8011
|
-
))), isExtracted && result && /* @__PURE__ */
|
|
8394
|
+
))), isExtracted && result && /* @__PURE__ */ React15.createElement(
|
|
8012
8395
|
ScrollView8,
|
|
8013
8396
|
{
|
|
8014
8397
|
style: styles11.extractedScroll,
|
|
8015
8398
|
contentContainerStyle: styles11.extractedScrollContent
|
|
8016
8399
|
},
|
|
8017
|
-
/* @__PURE__ */
|
|
8018
|
-
/* @__PURE__ */
|
|
8019
|
-
/* @__PURE__ */
|
|
8400
|
+
quickMode ? null : /* @__PURE__ */ React15.createElement(View11, { style: styles11.transcriptCard }, /* @__PURE__ */ React15.createElement(Text10, { style: styles11.transcriptLabel }, "Transcript"), /* @__PURE__ */ React15.createElement(Text10, { style: styles11.transcriptText }, result.transcript || "(empty)")),
|
|
8401
|
+
/* @__PURE__ */ React15.createElement(ExtractField, { label: "Title", value: result.title }),
|
|
8402
|
+
/* @__PURE__ */ React15.createElement(
|
|
8020
8403
|
ExtractField,
|
|
8021
8404
|
{
|
|
8022
8405
|
label: "Description",
|
|
8023
8406
|
value: result.description
|
|
8024
8407
|
}
|
|
8025
8408
|
),
|
|
8026
|
-
/* @__PURE__ */
|
|
8409
|
+
/* @__PURE__ */ React15.createElement(
|
|
8027
8410
|
ExtractField,
|
|
8028
8411
|
{
|
|
8029
8412
|
label: "Expected",
|
|
8030
8413
|
value: result.expectedBehavior
|
|
8031
8414
|
}
|
|
8032
8415
|
),
|
|
8033
|
-
/* @__PURE__ */
|
|
8416
|
+
/* @__PURE__ */ React15.createElement(
|
|
8034
8417
|
ExtractField,
|
|
8035
8418
|
{
|
|
8036
8419
|
label: "Actual",
|
|
8037
8420
|
value: result.actualBehavior
|
|
8038
8421
|
}
|
|
8039
8422
|
),
|
|
8040
|
-
/* @__PURE__ */
|
|
8041
|
-
), /* @__PURE__ */
|
|
8423
|
+
/* @__PURE__ */ React15.createElement(ExtractField, { label: "Frequency", value: result.frequency })
|
|
8424
|
+
), isIdle && captureScreen ? /* @__PURE__ */ React15.createElement(View11, { style: styles11.quickBlock }, /* @__PURE__ */ React15.createElement(Text10, { style: styles11.quickHint }, S.quickHint), /* @__PURE__ */ React15.createElement(View11, { style: styles11.quickGrid }, QUICK_ACTIONS.map((a) => /* @__PURE__ */ React15.createElement(
|
|
8425
|
+
Pressable9,
|
|
8426
|
+
{
|
|
8427
|
+
key: a.kind,
|
|
8428
|
+
accessibilityRole: "button",
|
|
8429
|
+
accessibilityLabel: S[a.label],
|
|
8430
|
+
testID: `tpk-quick-${a.kind}`,
|
|
8431
|
+
onPress: () => void runQuick(a),
|
|
8432
|
+
style: ({ pressed }) => [
|
|
8433
|
+
styles11.quickButton,
|
|
8434
|
+
pressed && { opacity: 0.8 }
|
|
8435
|
+
]
|
|
8436
|
+
},
|
|
8437
|
+
/* @__PURE__ */ React15.createElement(Text10, { style: styles11.quickEmoji }, a.emoji),
|
|
8438
|
+
/* @__PURE__ */ React15.createElement(Text10, { style: styles11.quickLabel }, S[a.label])
|
|
8439
|
+
)))) : null, /* @__PURE__ */ React15.createElement(View11, { style: styles11.primaryRow }, isIdle && /* @__PURE__ */ React15.createElement(
|
|
8042
8440
|
Pressable9,
|
|
8043
8441
|
{
|
|
8044
8442
|
accessibilityRole: "button",
|
|
@@ -8049,8 +8447,8 @@ function VoiceBugInputSheet({
|
|
|
8049
8447
|
{ backgroundColor: accentColor, shadowColor: accentColor }
|
|
8050
8448
|
]
|
|
8051
8449
|
},
|
|
8052
|
-
/* @__PURE__ */
|
|
8053
|
-
), isRecording && /* @__PURE__ */
|
|
8450
|
+
/* @__PURE__ */ React15.createElement(TpkIcon, { name: "voice", size: 42, color: "#FFFFFF" })
|
|
8451
|
+
), isRecording && /* @__PURE__ */ React15.createElement(
|
|
8054
8452
|
Animated2.View,
|
|
8055
8453
|
{
|
|
8056
8454
|
style: [
|
|
@@ -8062,7 +8460,7 @@ function VoiceBugInputSheet({
|
|
|
8062
8460
|
}
|
|
8063
8461
|
]
|
|
8064
8462
|
},
|
|
8065
|
-
/* @__PURE__ */
|
|
8463
|
+
/* @__PURE__ */ React15.createElement(
|
|
8066
8464
|
Pressable9,
|
|
8067
8465
|
{
|
|
8068
8466
|
accessibilityRole: "button",
|
|
@@ -8070,9 +8468,9 @@ function VoiceBugInputSheet({
|
|
|
8070
8468
|
onPress: () => void stop(),
|
|
8071
8469
|
style: styles11.micPressable
|
|
8072
8470
|
},
|
|
8073
|
-
/* @__PURE__ */
|
|
8471
|
+
/* @__PURE__ */ React15.createElement(Text10, { style: styles11.micButtonStop }, "\u25A0")
|
|
8074
8472
|
)
|
|
8075
|
-
), isUploading && /* @__PURE__ */
|
|
8473
|
+
), isUploading && /* @__PURE__ */ React15.createElement(View11, { style: styles11.spinnerSlot }, /* @__PURE__ */ React15.createElement(ActivityIndicator5, { size: "large", color: accentColor })), (isExtracted || isError) && /* @__PURE__ */ React15.createElement(View11, { style: styles11.actionsRow }, /* @__PURE__ */ React15.createElement(
|
|
8076
8474
|
Pressable9,
|
|
8077
8475
|
{
|
|
8078
8476
|
accessibilityRole: "button",
|
|
@@ -8082,8 +8480,8 @@ function VoiceBugInputSheet({
|
|
|
8082
8480
|
pressed && { opacity: 0.85 }
|
|
8083
8481
|
]
|
|
8084
8482
|
},
|
|
8085
|
-
/* @__PURE__ */
|
|
8086
|
-
), isExtracted && /* @__PURE__ */
|
|
8483
|
+
/* @__PURE__ */ React15.createElement(Text10, { style: styles11.secondaryButtonLabel }, quickMode ? S.back : isError ? S.retry : S.rerecord)
|
|
8484
|
+
), isExtracted && /* @__PURE__ */ React15.createElement(
|
|
8087
8485
|
Pressable9,
|
|
8088
8486
|
{
|
|
8089
8487
|
accessibilityRole: "button",
|
|
@@ -8095,8 +8493,8 @@ function VoiceBugInputSheet({
|
|
|
8095
8493
|
pressed && { opacity: 0.85 }
|
|
8096
8494
|
]
|
|
8097
8495
|
},
|
|
8098
|
-
/* @__PURE__ */
|
|
8099
|
-
))), /* @__PURE__ */
|
|
8496
|
+
/* @__PURE__ */ React15.createElement(Text10, { style: styles11.primaryButtonLabel }, S.useExtracted)
|
|
8497
|
+
))), /* @__PURE__ */ React15.createElement(
|
|
8100
8498
|
Pressable9,
|
|
8101
8499
|
{
|
|
8102
8500
|
accessibilityRole: "button",
|
|
@@ -8104,7 +8502,7 @@ function VoiceBugInputSheet({
|
|
|
8104
8502
|
onPress: () => void cancel(),
|
|
8105
8503
|
style: styles11.cancelButton
|
|
8106
8504
|
},
|
|
8107
|
-
/* @__PURE__ */
|
|
8505
|
+
/* @__PURE__ */ React15.createElement(Text10, { style: [styles11.cancelLabel, { color: accentColor }] }, S.cancel)
|
|
8108
8506
|
)))
|
|
8109
8507
|
);
|
|
8110
8508
|
}
|
|
@@ -8112,20 +8510,20 @@ function ExtractField({
|
|
|
8112
8510
|
label,
|
|
8113
8511
|
value
|
|
8114
8512
|
}) {
|
|
8115
|
-
return /* @__PURE__ */
|
|
8513
|
+
return /* @__PURE__ */ React15.createElement(View11, { style: styles11.extractRow }, /* @__PURE__ */ React15.createElement(Text10, { style: styles11.extractLabel }, label), /* @__PURE__ */ React15.createElement(Text10, { style: styles11.extractValue }, value || "\u2014"));
|
|
8116
8514
|
}
|
|
8117
8515
|
async function startRecording(opts = {}) {
|
|
8118
|
-
if (
|
|
8516
|
+
if (Platform7.OS === "web") return startWebRecording(opts);
|
|
8119
8517
|
return startNativeRecording();
|
|
8120
8518
|
}
|
|
8121
8519
|
async function stopRecording(handle) {
|
|
8122
|
-
if (
|
|
8520
|
+
if (Platform7.OS === "web") return stopWebRecording(handle);
|
|
8123
8521
|
return stopNativeRecording(handle);
|
|
8124
8522
|
}
|
|
8125
8523
|
async function cleanupRecorder(handle) {
|
|
8126
8524
|
if (!handle) return;
|
|
8127
8525
|
try {
|
|
8128
|
-
if (
|
|
8526
|
+
if (Platform7.OS === "web") {
|
|
8129
8527
|
const w = handle;
|
|
8130
8528
|
w.stopMeter?.();
|
|
8131
8529
|
w.mediaRecorder.stream.getTracks().forEach((t) => t.stop());
|
|
@@ -8231,7 +8629,7 @@ async function startNativeRecording() {
|
|
|
8231
8629
|
});
|
|
8232
8630
|
} catch {
|
|
8233
8631
|
}
|
|
8234
|
-
const rec = new Recorder(nativeRecordingOptions(mod,
|
|
8632
|
+
const rec = new Recorder(nativeRecordingOptions(mod, Platform7.OS));
|
|
8235
8633
|
await rec.prepareToRecordAsync();
|
|
8236
8634
|
rec.record();
|
|
8237
8635
|
return rec;
|
|
@@ -8374,6 +8772,41 @@ var styles11 = StyleSheet11.create({
|
|
|
8374
8772
|
marginTop: 8,
|
|
8375
8773
|
lineHeight: 20
|
|
8376
8774
|
},
|
|
8775
|
+
quickBlock: {
|
|
8776
|
+
marginTop: 16
|
|
8777
|
+
},
|
|
8778
|
+
quickHint: {
|
|
8779
|
+
color: "#94A3B8",
|
|
8780
|
+
fontSize: 13,
|
|
8781
|
+
textAlign: "center",
|
|
8782
|
+
marginBottom: 8
|
|
8783
|
+
},
|
|
8784
|
+
quickGrid: {
|
|
8785
|
+
flexDirection: "row",
|
|
8786
|
+
flexWrap: "wrap",
|
|
8787
|
+
gap: 8
|
|
8788
|
+
},
|
|
8789
|
+
quickButton: {
|
|
8790
|
+
flexGrow: 1,
|
|
8791
|
+
flexBasis: "45%",
|
|
8792
|
+
flexDirection: "row",
|
|
8793
|
+
alignItems: "center",
|
|
8794
|
+
gap: 8,
|
|
8795
|
+
paddingHorizontal: 12,
|
|
8796
|
+
paddingVertical: 12,
|
|
8797
|
+
borderRadius: 12,
|
|
8798
|
+
backgroundColor: "rgba(255,255,255,0.08)",
|
|
8799
|
+
borderWidth: 1,
|
|
8800
|
+
borderColor: "rgba(255,255,255,0.15)"
|
|
8801
|
+
},
|
|
8802
|
+
quickEmoji: {
|
|
8803
|
+
fontSize: 18
|
|
8804
|
+
},
|
|
8805
|
+
quickLabel: {
|
|
8806
|
+
color: "#F1F5F9",
|
|
8807
|
+
fontSize: 14,
|
|
8808
|
+
fontWeight: "600"
|
|
8809
|
+
},
|
|
8377
8810
|
timer: {
|
|
8378
8811
|
fontSize: 40,
|
|
8379
8812
|
fontWeight: "700",
|
|
@@ -8522,7 +8955,7 @@ var styles11 = StyleSheet11.create({
|
|
|
8522
8955
|
});
|
|
8523
8956
|
|
|
8524
8957
|
// src/SessionEndDialog.tsx
|
|
8525
|
-
import
|
|
8958
|
+
import React16, { useCallback as useCallback8, useEffect as useEffect9, useMemo as useMemo8, useState as useState12 } from "react";
|
|
8526
8959
|
import {
|
|
8527
8960
|
ActivityIndicator as ActivityIndicator6,
|
|
8528
8961
|
Modal as Modal7,
|
|
@@ -8646,7 +9079,7 @@ function SessionEndDialog({
|
|
|
8646
9079
|
onClose,
|
|
8647
9080
|
onError
|
|
8648
9081
|
]);
|
|
8649
|
-
return /* @__PURE__ */
|
|
9082
|
+
return /* @__PURE__ */ React16.createElement(
|
|
8650
9083
|
Modal7,
|
|
8651
9084
|
{
|
|
8652
9085
|
animationType: "slide",
|
|
@@ -8654,25 +9087,33 @@ function SessionEndDialog({
|
|
|
8654
9087
|
transparent: false,
|
|
8655
9088
|
visible
|
|
8656
9089
|
},
|
|
8657
|
-
/* @__PURE__ */
|
|
8658
|
-
|
|
9090
|
+
/* @__PURE__ */ React16.createElement(View12, { style: [styles12.root, style] }, /* @__PURE__ */ React16.createElement(
|
|
9091
|
+
View12,
|
|
8659
9092
|
{
|
|
8660
|
-
|
|
8661
|
-
accessibilityLabel: "Cancel",
|
|
8662
|
-
disabled: submitting,
|
|
8663
|
-
onPress: onClose,
|
|
8664
|
-
style: styles12.headerClose
|
|
9093
|
+
style: [styles12.header, { paddingTop: 12 + getModalInsets().top }]
|
|
8665
9094
|
},
|
|
8666
|
-
/* @__PURE__ */
|
|
8667
|
-
|
|
9095
|
+
/* @__PURE__ */ React16.createElement(
|
|
9096
|
+
Pressable10,
|
|
9097
|
+
{
|
|
9098
|
+
accessibilityRole: "button",
|
|
9099
|
+
accessibilityLabel: "Cancel",
|
|
9100
|
+
disabled: submitting,
|
|
9101
|
+
onPress: onClose,
|
|
9102
|
+
style: styles12.headerClose
|
|
9103
|
+
},
|
|
9104
|
+
/* @__PURE__ */ React16.createElement(Text11, { style: styles12.headerCloseLabel }, "\xD7")
|
|
9105
|
+
),
|
|
9106
|
+
/* @__PURE__ */ React16.createElement(Text11, { style: styles12.headerTitle }, "\u23CF\uFE0F End session"),
|
|
9107
|
+
/* @__PURE__ */ React16.createElement(View12, { style: { width: 36 } })
|
|
9108
|
+
), /* @__PURE__ */ React16.createElement(
|
|
8668
9109
|
ScrollView9,
|
|
8669
9110
|
{
|
|
8670
9111
|
contentContainerStyle: styles12.body,
|
|
8671
9112
|
keyboardShouldPersistTaps: "handled"
|
|
8672
9113
|
},
|
|
8673
|
-
/* @__PURE__ */
|
|
8674
|
-
/* @__PURE__ */
|
|
8675
|
-
RATING_KEYS.map((k) => /* @__PURE__ */
|
|
9114
|
+
/* @__PURE__ */ React16.createElement(StatsSection, { stats }),
|
|
9115
|
+
/* @__PURE__ */ React16.createElement(SectionLabel, { text: "How was the session?" }),
|
|
9116
|
+
RATING_KEYS.map((k) => /* @__PURE__ */ React16.createElement(
|
|
8676
9117
|
RatingRow,
|
|
8677
9118
|
{
|
|
8678
9119
|
key: k,
|
|
@@ -8681,8 +9122,8 @@ function SessionEndDialog({
|
|
|
8681
9122
|
onChange: (v) => setRatings((cur) => ({ ...cur, [k]: v }))
|
|
8682
9123
|
}
|
|
8683
9124
|
)),
|
|
8684
|
-
/* @__PURE__ */
|
|
8685
|
-
ISSUE_KEYS.map((k) => /* @__PURE__ */
|
|
9125
|
+
/* @__PURE__ */ React16.createElement(SectionLabel, { text: "Did you encounter\u2026?" }),
|
|
9126
|
+
ISSUE_KEYS.map((k) => /* @__PURE__ */ React16.createElement(
|
|
8686
9127
|
IssueRow,
|
|
8687
9128
|
{
|
|
8688
9129
|
key: k,
|
|
@@ -8691,9 +9132,9 @@ function SessionEndDialog({
|
|
|
8691
9132
|
onChange: (v) => setIssues((cur) => ({ ...cur, [k]: v }))
|
|
8692
9133
|
}
|
|
8693
9134
|
)),
|
|
8694
|
-
/* @__PURE__ */
|
|
8695
|
-
/* @__PURE__ */
|
|
8696
|
-
/* @__PURE__ */
|
|
9135
|
+
/* @__PURE__ */ React16.createElement(SectionLabel, { text: "Comments (optional)" }),
|
|
9136
|
+
/* @__PURE__ */ React16.createElement(FieldLabel2, { text: "What worked well?" }),
|
|
9137
|
+
/* @__PURE__ */ React16.createElement(
|
|
8697
9138
|
TextInput4,
|
|
8698
9139
|
{
|
|
8699
9140
|
multiline: true,
|
|
@@ -8704,8 +9145,8 @@ function SessionEndDialog({
|
|
|
8704
9145
|
value: positive
|
|
8705
9146
|
}
|
|
8706
9147
|
),
|
|
8707
|
-
/* @__PURE__ */
|
|
8708
|
-
/* @__PURE__ */
|
|
9148
|
+
/* @__PURE__ */ React16.createElement(FieldLabel2, { text: "What didn't?" }),
|
|
9149
|
+
/* @__PURE__ */ React16.createElement(
|
|
8709
9150
|
TextInput4,
|
|
8710
9151
|
{
|
|
8711
9152
|
multiline: true,
|
|
@@ -8716,8 +9157,8 @@ function SessionEndDialog({
|
|
|
8716
9157
|
value: negative
|
|
8717
9158
|
}
|
|
8718
9159
|
),
|
|
8719
|
-
/* @__PURE__ */
|
|
8720
|
-
/* @__PURE__ */
|
|
9160
|
+
/* @__PURE__ */ React16.createElement(FieldLabel2, { text: "Suggestions" }),
|
|
9161
|
+
/* @__PURE__ */ React16.createElement(
|
|
8721
9162
|
TextInput4,
|
|
8722
9163
|
{
|
|
8723
9164
|
multiline: true,
|
|
@@ -8728,52 +9169,62 @@ function SessionEndDialog({
|
|
|
8728
9169
|
value: suggestions
|
|
8729
9170
|
}
|
|
8730
9171
|
),
|
|
8731
|
-
error && /* @__PURE__ */
|
|
8732
|
-
), /* @__PURE__ */
|
|
8733
|
-
|
|
8734
|
-
{
|
|
8735
|
-
accessibilityRole: "button",
|
|
8736
|
-
disabled: submitting,
|
|
8737
|
-
onPress: onClose,
|
|
8738
|
-
style: ({ pressed }) => [
|
|
8739
|
-
styles12.cancelButton,
|
|
8740
|
-
pressed && { opacity: 0.7 }
|
|
8741
|
-
]
|
|
8742
|
-
},
|
|
8743
|
-
/* @__PURE__ */ React15.createElement(Text11, { style: styles12.cancelLabel }, "Cancel")
|
|
8744
|
-
), /* @__PURE__ */ React15.createElement(
|
|
8745
|
-
Pressable10,
|
|
9172
|
+
error && /* @__PURE__ */ React16.createElement(View12, { style: styles12.errorBox }, /* @__PURE__ */ React16.createElement(Text11, { style: styles12.errorLabel }, error))
|
|
9173
|
+
), /* @__PURE__ */ React16.createElement(
|
|
9174
|
+
View12,
|
|
8746
9175
|
{
|
|
8747
|
-
|
|
8748
|
-
|
|
8749
|
-
|
|
8750
|
-
style: ({ pressed }) => [
|
|
8751
|
-
styles12.endButton,
|
|
8752
|
-
(!tpk || submitting) && styles12.endButtonDisabled,
|
|
8753
|
-
pressed && { opacity: 0.85 }
|
|
9176
|
+
style: [
|
|
9177
|
+
styles12.footer,
|
|
9178
|
+
{ paddingBottom: Math.max(14, getModalInsets().bottom) }
|
|
8754
9179
|
]
|
|
8755
9180
|
},
|
|
8756
|
-
|
|
8757
|
-
|
|
9181
|
+
/* @__PURE__ */ React16.createElement(
|
|
9182
|
+
Pressable10,
|
|
9183
|
+
{
|
|
9184
|
+
accessibilityRole: "button",
|
|
9185
|
+
disabled: submitting,
|
|
9186
|
+
onPress: onClose,
|
|
9187
|
+
style: ({ pressed }) => [
|
|
9188
|
+
styles12.cancelButton,
|
|
9189
|
+
pressed && { opacity: 0.7 }
|
|
9190
|
+
]
|
|
9191
|
+
},
|
|
9192
|
+
/* @__PURE__ */ React16.createElement(Text11, { style: styles12.cancelLabel }, "Cancel")
|
|
9193
|
+
),
|
|
9194
|
+
/* @__PURE__ */ React16.createElement(
|
|
9195
|
+
Pressable10,
|
|
9196
|
+
{
|
|
9197
|
+
accessibilityRole: "button",
|
|
9198
|
+
disabled: !tpk || submitting,
|
|
9199
|
+
onPress: () => void submit(),
|
|
9200
|
+
style: ({ pressed }) => [
|
|
9201
|
+
styles12.endButton,
|
|
9202
|
+
(!tpk || submitting) && styles12.endButtonDisabled,
|
|
9203
|
+
pressed && { opacity: 0.85 }
|
|
9204
|
+
]
|
|
9205
|
+
},
|
|
9206
|
+
submitting ? /* @__PURE__ */ React16.createElement(ActivityIndicator6, { color: "#FAFAF7" }) : /* @__PURE__ */ React16.createElement(Text11, { style: styles12.endLabel }, "End session")
|
|
9207
|
+
)
|
|
9208
|
+
))
|
|
8758
9209
|
);
|
|
8759
9210
|
}
|
|
8760
9211
|
function StatsSection({
|
|
8761
9212
|
stats
|
|
8762
9213
|
}) {
|
|
8763
9214
|
const duration = stats?.durationSeconds ?? 0;
|
|
8764
|
-
return /* @__PURE__ */
|
|
9215
|
+
return /* @__PURE__ */ React16.createElement(View12, { style: styles12.statsGrid }, /* @__PURE__ */ React16.createElement(StatTile, { label: "Duration", value: formatDuration(duration) }), /* @__PURE__ */ React16.createElement(
|
|
8765
9216
|
StatTile,
|
|
8766
9217
|
{
|
|
8767
9218
|
label: "Screens visited",
|
|
8768
9219
|
value: String(stats?.screensVisited ?? 0)
|
|
8769
9220
|
}
|
|
8770
|
-
), /* @__PURE__ */
|
|
9221
|
+
), /* @__PURE__ */ React16.createElement(
|
|
8771
9222
|
StatTile,
|
|
8772
9223
|
{
|
|
8773
9224
|
label: "Bugs reported",
|
|
8774
9225
|
value: String(stats?.bugsReported ?? 0)
|
|
8775
9226
|
}
|
|
8776
|
-
), /* @__PURE__ */
|
|
9227
|
+
), /* @__PURE__ */ React16.createElement(
|
|
8777
9228
|
StatTile,
|
|
8778
9229
|
{
|
|
8779
9230
|
label: "Tasks completed",
|
|
@@ -8785,20 +9236,20 @@ function StatTile({
|
|
|
8785
9236
|
label,
|
|
8786
9237
|
value
|
|
8787
9238
|
}) {
|
|
8788
|
-
return /* @__PURE__ */
|
|
9239
|
+
return /* @__PURE__ */ React16.createElement(View12, { style: styles12.statTile }, /* @__PURE__ */ React16.createElement(Text11, { style: styles12.statValue }, value), /* @__PURE__ */ React16.createElement(Text11, { style: styles12.statLabel }, label));
|
|
8789
9240
|
}
|
|
8790
9241
|
function SectionLabel({ text }) {
|
|
8791
|
-
return /* @__PURE__ */
|
|
9242
|
+
return /* @__PURE__ */ React16.createElement(Text11, { style: styles12.sectionLabel }, text);
|
|
8792
9243
|
}
|
|
8793
9244
|
function FieldLabel2({ text }) {
|
|
8794
|
-
return /* @__PURE__ */
|
|
9245
|
+
return /* @__PURE__ */ React16.createElement(Text11, { style: styles12.fieldLabel }, text);
|
|
8795
9246
|
}
|
|
8796
9247
|
function RatingRow({
|
|
8797
9248
|
label,
|
|
8798
9249
|
value,
|
|
8799
9250
|
onChange
|
|
8800
9251
|
}) {
|
|
8801
|
-
return /* @__PURE__ */
|
|
9252
|
+
return /* @__PURE__ */ React16.createElement(View12, { style: styles12.ratingRow }, /* @__PURE__ */ React16.createElement(Text11, { style: styles12.ratingLabel }, label), /* @__PURE__ */ React16.createElement(View12, { style: styles12.starRow }, [1, 2, 3, 4, 5].map((i) => /* @__PURE__ */ React16.createElement(
|
|
8802
9253
|
Pressable10,
|
|
8803
9254
|
{
|
|
8804
9255
|
key: i,
|
|
@@ -8811,7 +9262,7 @@ function RatingRow({
|
|
|
8811
9262
|
pressed && { opacity: 0.7 }
|
|
8812
9263
|
]
|
|
8813
9264
|
},
|
|
8814
|
-
/* @__PURE__ */
|
|
9265
|
+
/* @__PURE__ */ React16.createElement(
|
|
8815
9266
|
TpkIcon,
|
|
8816
9267
|
{
|
|
8817
9268
|
name: i <= value ? "star_filled" : "star_outline",
|
|
@@ -8826,7 +9277,7 @@ function IssueRow({
|
|
|
8826
9277
|
value,
|
|
8827
9278
|
onChange
|
|
8828
9279
|
}) {
|
|
8829
|
-
return /* @__PURE__ */
|
|
9280
|
+
return /* @__PURE__ */ React16.createElement(View12, { style: styles12.issueRow }, /* @__PURE__ */ React16.createElement(Text11, { style: styles12.issueLabel }, label), /* @__PURE__ */ React16.createElement(Switch2, { value, onValueChange: onChange }));
|
|
8830
9281
|
}
|
|
8831
9282
|
function formatDuration(seconds) {
|
|
8832
9283
|
if (seconds < 60) return `${seconds}s`;
|
|
@@ -9054,7 +9505,7 @@ var styles12 = StyleSheet12.create({
|
|
|
9054
9505
|
});
|
|
9055
9506
|
|
|
9056
9507
|
// src/MyBugsSheet.tsx
|
|
9057
|
-
import
|
|
9508
|
+
import React17, { useEffect as useEffect10, useState as useState13 } from "react";
|
|
9058
9509
|
import {
|
|
9059
9510
|
ActivityIndicator as ActivityIndicator7,
|
|
9060
9511
|
FlatList,
|
|
@@ -9134,7 +9585,7 @@ function MyBugsSheet({
|
|
|
9134
9585
|
cancelled = true;
|
|
9135
9586
|
};
|
|
9136
9587
|
}, [visible, tpk]);
|
|
9137
|
-
return /* @__PURE__ */
|
|
9588
|
+
return /* @__PURE__ */ React17.createElement(
|
|
9138
9589
|
Modal8,
|
|
9139
9590
|
{
|
|
9140
9591
|
visible,
|
|
@@ -9142,7 +9593,7 @@ function MyBugsSheet({
|
|
|
9142
9593
|
animationType: "slide",
|
|
9143
9594
|
onRequestClose: onClose
|
|
9144
9595
|
},
|
|
9145
|
-
/* @__PURE__ */
|
|
9596
|
+
/* @__PURE__ */ React17.createElement(View13, { style: styles13.backdrop }, /* @__PURE__ */ React17.createElement(View13, { style: [styles13.sheet, { backgroundColor: theme.surface }] }, /* @__PURE__ */ React17.createElement(View13, { style: styles13.header }, /* @__PURE__ */ React17.createElement(Text12, { style: [styles13.title, { color: theme.onSurface }] }, "Meine Bugs"), /* @__PURE__ */ React17.createElement(
|
|
9146
9597
|
Pressable11,
|
|
9147
9598
|
{
|
|
9148
9599
|
onPress: onClose,
|
|
@@ -9150,14 +9601,14 @@ function MyBugsSheet({
|
|
|
9150
9601
|
accessibilityLabel: "Schlie\xDFen",
|
|
9151
9602
|
testID: "tpk-my-bugs-close"
|
|
9152
9603
|
},
|
|
9153
|
-
/* @__PURE__ */
|
|
9154
|
-
)), loading ? /* @__PURE__ */
|
|
9604
|
+
/* @__PURE__ */ React17.createElement(TpkIcon, { name: "close", size: 24, color: theme.onSurface })
|
|
9605
|
+
)), loading ? /* @__PURE__ */ React17.createElement(View13, { style: styles13.center }, /* @__PURE__ */ React17.createElement(ActivityIndicator7, { color: theme.primary })) : error ? /* @__PURE__ */ React17.createElement(View13, { style: styles13.center }, /* @__PURE__ */ React17.createElement(Text12, { style: styles13.muted }, error)) : bugs.length === 0 ? /* @__PURE__ */ React17.createElement(View13, { style: styles13.center }, /* @__PURE__ */ React17.createElement(TpkIcon, { name: "check", size: 48, color: "#CBD5E1" }), /* @__PURE__ */ React17.createElement(Text12, { style: [styles13.empty, { marginTop: 12 }] }, "Noch keine Bugs gemeldet.", "\n", "Tippe auf das Widget und melde deinen ersten Bug \u2014 hier siehst du dann jederzeit seinen Status.")) : /* @__PURE__ */ React17.createElement(
|
|
9155
9606
|
FlatList,
|
|
9156
9607
|
{
|
|
9157
9608
|
data: bugs,
|
|
9158
9609
|
keyExtractor: (b) => b.id,
|
|
9159
9610
|
contentContainerStyle: styles13.listBody,
|
|
9160
|
-
renderItem: ({ item }) => /* @__PURE__ */
|
|
9611
|
+
renderItem: ({ item }) => /* @__PURE__ */ React17.createElement(
|
|
9161
9612
|
BugRow,
|
|
9162
9613
|
{
|
|
9163
9614
|
bug: item,
|
|
@@ -9167,7 +9618,7 @@ function MyBugsSheet({
|
|
|
9167
9618
|
)
|
|
9168
9619
|
}
|
|
9169
9620
|
))),
|
|
9170
|
-
/* @__PURE__ */
|
|
9621
|
+
/* @__PURE__ */ React17.createElement(
|
|
9171
9622
|
BugDetailModal,
|
|
9172
9623
|
{
|
|
9173
9624
|
bug: selected,
|
|
@@ -9180,7 +9631,7 @@ function MyBugsSheet({
|
|
|
9180
9631
|
}
|
|
9181
9632
|
function StatusBadge2({ status }) {
|
|
9182
9633
|
const { label, color } = bugStatusStyle(status);
|
|
9183
|
-
return /* @__PURE__ */
|
|
9634
|
+
return /* @__PURE__ */ React17.createElement(
|
|
9184
9635
|
View13,
|
|
9185
9636
|
{
|
|
9186
9637
|
style: [
|
|
@@ -9188,7 +9639,7 @@ function StatusBadge2({ status }) {
|
|
|
9188
9639
|
{ backgroundColor: `${color}1F`, borderColor: `${color}66` }
|
|
9189
9640
|
]
|
|
9190
9641
|
},
|
|
9191
|
-
/* @__PURE__ */
|
|
9642
|
+
/* @__PURE__ */ React17.createElement(Text12, { style: [styles13.badgeText, { color }] }, label)
|
|
9192
9643
|
);
|
|
9193
9644
|
}
|
|
9194
9645
|
function metaLine(bug) {
|
|
@@ -9204,15 +9655,15 @@ function BugRow({
|
|
|
9204
9655
|
textColor,
|
|
9205
9656
|
onPress
|
|
9206
9657
|
}) {
|
|
9207
|
-
return /* @__PURE__ */
|
|
9658
|
+
return /* @__PURE__ */ React17.createElement(
|
|
9208
9659
|
Pressable11,
|
|
9209
9660
|
{
|
|
9210
9661
|
style: styles13.row,
|
|
9211
9662
|
onPress,
|
|
9212
9663
|
testID: `tpk-my-bug-${bug.id}`
|
|
9213
9664
|
},
|
|
9214
|
-
/* @__PURE__ */
|
|
9215
|
-
/* @__PURE__ */
|
|
9665
|
+
/* @__PURE__ */ React17.createElement(View13, { style: styles13.rowMain }, /* @__PURE__ */ React17.createElement(Text12, { style: [styles13.rowTitle, { color: textColor }], numberOfLines: 2 }, bug.title), /* @__PURE__ */ React17.createElement(Text12, { style: styles13.muted }, metaLine(bug))),
|
|
9666
|
+
/* @__PURE__ */ React17.createElement(StatusBadge2, { status: bug.status })
|
|
9216
9667
|
);
|
|
9217
9668
|
}
|
|
9218
9669
|
function BugDetailModal({
|
|
@@ -9221,7 +9672,7 @@ function BugDetailModal({
|
|
|
9221
9672
|
surface,
|
|
9222
9673
|
textColor
|
|
9223
9674
|
}) {
|
|
9224
|
-
return /* @__PURE__ */
|
|
9675
|
+
return /* @__PURE__ */ React17.createElement(
|
|
9225
9676
|
Modal8,
|
|
9226
9677
|
{
|
|
9227
9678
|
visible: bug != null,
|
|
@@ -9229,13 +9680,13 @@ function BugDetailModal({
|
|
|
9229
9680
|
animationType: "fade",
|
|
9230
9681
|
onRequestClose: onClose
|
|
9231
9682
|
},
|
|
9232
|
-
/* @__PURE__ */
|
|
9683
|
+
/* @__PURE__ */ React17.createElement(Pressable11, { style: styles13.detailBackdrop, onPress: onClose }, /* @__PURE__ */ React17.createElement(
|
|
9233
9684
|
Pressable11,
|
|
9234
9685
|
{
|
|
9235
9686
|
style: [styles13.detailCard, { backgroundColor: surface }],
|
|
9236
9687
|
onPress: () => void 0
|
|
9237
9688
|
},
|
|
9238
|
-
bug ? /* @__PURE__ */
|
|
9689
|
+
bug ? /* @__PURE__ */ React17.createElement(ScrollView10, { contentContainerStyle: styles13.detailBody }, /* @__PURE__ */ React17.createElement(Text12, { style: [styles13.detailTitle, { color: textColor }] }, bug.title), /* @__PURE__ */ React17.createElement(View13, { style: styles13.detailBadgeRow }, /* @__PURE__ */ React17.createElement(StatusBadge2, { status: bug.status })), /* @__PURE__ */ React17.createElement(Text12, { style: styles13.muted }, metaLine(bug)), bug.description ? /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(Text12, { style: [styles13.detailLabel, { color: textColor }] }, "Beschreibung"), /* @__PURE__ */ React17.createElement(Text12, { style: [styles13.detailDesc, { color: textColor }] }, bug.description)) : null) : null
|
|
9239
9690
|
))
|
|
9240
9691
|
);
|
|
9241
9692
|
}
|
|
@@ -9296,7 +9747,7 @@ var styles13 = StyleSheet13.create({
|
|
|
9296
9747
|
});
|
|
9297
9748
|
|
|
9298
9749
|
// src/SessionDetailsSheet.tsx
|
|
9299
|
-
import
|
|
9750
|
+
import React18, { useEffect as useEffect11, useMemo as useMemo9, useState as useState14 } from "react";
|
|
9300
9751
|
import {
|
|
9301
9752
|
Modal as Modal9,
|
|
9302
9753
|
Pressable as Pressable12,
|
|
@@ -9351,7 +9802,7 @@ function SessionDetailsSheet({
|
|
|
9351
9802
|
}, [visible, tpk]);
|
|
9352
9803
|
const expected = earningsBaseAmount + data.paidMinutes * earningsPerMinuteRate;
|
|
9353
9804
|
const sym = currencySymbol2(earningsCurrency);
|
|
9354
|
-
return /* @__PURE__ */
|
|
9805
|
+
return /* @__PURE__ */ React18.createElement(
|
|
9355
9806
|
Modal9,
|
|
9356
9807
|
{
|
|
9357
9808
|
visible,
|
|
@@ -9359,7 +9810,7 @@ function SessionDetailsSheet({
|
|
|
9359
9810
|
animationType: "slide",
|
|
9360
9811
|
onRequestClose: onClose
|
|
9361
9812
|
},
|
|
9362
|
-
/* @__PURE__ */
|
|
9813
|
+
/* @__PURE__ */ React18.createElement(View14, { style: styles14.backdrop }, /* @__PURE__ */ React18.createElement(View14, { style: [styles14.sheet, { backgroundColor: theme.surface }] }, /* @__PURE__ */ React18.createElement(View14, { style: styles14.header }, /* @__PURE__ */ React18.createElement(Text13, { style: [styles14.title, { color: theme.onSurface }] }, "Session-Details"), /* @__PURE__ */ React18.createElement(
|
|
9363
9814
|
Pressable12,
|
|
9364
9815
|
{
|
|
9365
9816
|
onPress: onClose,
|
|
@@ -9367,17 +9818,17 @@ function SessionDetailsSheet({
|
|
|
9367
9818
|
accessibilityLabel: "Schlie\xDFen",
|
|
9368
9819
|
testID: "tpk-session-details-close"
|
|
9369
9820
|
},
|
|
9370
|
-
/* @__PURE__ */
|
|
9371
|
-
)), /* @__PURE__ */
|
|
9821
|
+
/* @__PURE__ */ React18.createElement(TpkIcon, { name: "close", size: 24, color: theme.onSurface })
|
|
9822
|
+
)), /* @__PURE__ */ React18.createElement(ScrollView11, { contentContainerStyle: styles14.body }, /* @__PURE__ */ React18.createElement(
|
|
9372
9823
|
View14,
|
|
9373
9824
|
{
|
|
9374
9825
|
style: [styles14.earnings, { borderColor: theme.primary }],
|
|
9375
9826
|
testID: "tpk-session-details-earnings"
|
|
9376
9827
|
},
|
|
9377
|
-
/* @__PURE__ */
|
|
9378
|
-
/* @__PURE__ */
|
|
9379
|
-
/* @__PURE__ */
|
|
9380
|
-
), /* @__PURE__ */
|
|
9828
|
+
/* @__PURE__ */ React18.createElement(Text13, { style: [styles14.earningsLabel, { color: theme.onSurface }] }, "Voraussichtlicher Verdienst"),
|
|
9829
|
+
/* @__PURE__ */ React18.createElement(Text13, { style: [styles14.earningsValue, { color: theme.primary }] }, sym, expected.toFixed(2)),
|
|
9830
|
+
/* @__PURE__ */ React18.createElement(Text13, { style: styles14.earningsHint }, "Basis ", sym, earningsBaseAmount.toFixed(2), " + ", data.paidMinutes, " bezahlte Min \xD7 ", sym, earningsPerMinuteRate.toFixed(2))
|
|
9831
|
+
), /* @__PURE__ */ React18.createElement(
|
|
9381
9832
|
Metric,
|
|
9382
9833
|
{
|
|
9383
9834
|
label: "Aktive Zeit",
|
|
@@ -9385,7 +9836,7 @@ function SessionDetailsSheet({
|
|
|
9385
9836
|
hint: "Vordergrund-Zeit",
|
|
9386
9837
|
color: theme.onSurface
|
|
9387
9838
|
}
|
|
9388
|
-
), /* @__PURE__ */
|
|
9839
|
+
), /* @__PURE__ */ React18.createElement(
|
|
9389
9840
|
Metric,
|
|
9390
9841
|
{
|
|
9391
9842
|
label: "Bezahlte Zeit",
|
|
@@ -9393,21 +9844,21 @@ function SessionDetailsSheet({
|
|
|
9393
9844
|
hint: "aktivit\xE4tsgewichtet (z\xE4hlt f\xFCr den Verdienst)",
|
|
9394
9845
|
color: theme.onSurface
|
|
9395
9846
|
}
|
|
9396
|
-
), /* @__PURE__ */
|
|
9847
|
+
), /* @__PURE__ */ React18.createElement(
|
|
9397
9848
|
Metric,
|
|
9398
9849
|
{
|
|
9399
9850
|
label: "Taps",
|
|
9400
9851
|
value: String(data.taps),
|
|
9401
9852
|
color: theme.onSurface
|
|
9402
9853
|
}
|
|
9403
|
-
), /* @__PURE__ */
|
|
9854
|
+
), /* @__PURE__ */ React18.createElement(
|
|
9404
9855
|
Metric,
|
|
9405
9856
|
{
|
|
9406
9857
|
label: "Bildschirme",
|
|
9407
9858
|
value: String(data.screenViews),
|
|
9408
9859
|
color: theme.onSurface
|
|
9409
9860
|
}
|
|
9410
|
-
), tasks?.hasTasks ? /* @__PURE__ */
|
|
9861
|
+
), tasks?.hasTasks ? /* @__PURE__ */ React18.createElement(
|
|
9411
9862
|
Metric,
|
|
9412
9863
|
{
|
|
9413
9864
|
label: "Aufgaben",
|
|
@@ -9423,7 +9874,7 @@ function Metric({
|
|
|
9423
9874
|
hint,
|
|
9424
9875
|
color
|
|
9425
9876
|
}) {
|
|
9426
|
-
return /* @__PURE__ */
|
|
9877
|
+
return /* @__PURE__ */ React18.createElement(View14, { style: styles14.metricRow }, /* @__PURE__ */ React18.createElement(View14, { style: styles14.metricLabelCol }, /* @__PURE__ */ React18.createElement(Text13, { style: [styles14.metricLabel, { color }] }, label), hint ? /* @__PURE__ */ React18.createElement(Text13, { style: styles14.metricHint }, hint) : null), /* @__PURE__ */ React18.createElement(Text13, { style: [styles14.metricValue, { color }] }, value));
|
|
9427
9878
|
}
|
|
9428
9879
|
var styles14 = StyleSheet14.create({
|
|
9429
9880
|
backdrop: {
|
|
@@ -9472,7 +9923,7 @@ var styles14 = StyleSheet14.create({
|
|
|
9472
9923
|
});
|
|
9473
9924
|
|
|
9474
9925
|
// src/NotificationsSheet.tsx
|
|
9475
|
-
import
|
|
9926
|
+
import React19, { useEffect as useEffect12, useState as useState15 } from "react";
|
|
9476
9927
|
import {
|
|
9477
9928
|
ActivityIndicator as ActivityIndicator8,
|
|
9478
9929
|
FlatList as FlatList2,
|
|
@@ -9533,7 +9984,7 @@ function NotificationsSheet({
|
|
|
9533
9984
|
tpk.markNotificationsRead().then((unread) => onUnreadChange?.(unread)).catch(() => void 0);
|
|
9534
9985
|
};
|
|
9535
9986
|
const hasUnread = items.some((x) => !x.isRead);
|
|
9536
|
-
return /* @__PURE__ */
|
|
9987
|
+
return /* @__PURE__ */ React19.createElement(
|
|
9537
9988
|
Modal10,
|
|
9538
9989
|
{
|
|
9539
9990
|
visible,
|
|
@@ -9541,15 +9992,15 @@ function NotificationsSheet({
|
|
|
9541
9992
|
animationType: "slide",
|
|
9542
9993
|
onRequestClose: onClose
|
|
9543
9994
|
},
|
|
9544
|
-
/* @__PURE__ */
|
|
9995
|
+
/* @__PURE__ */ React19.createElement(View15, { style: styles15.backdrop }, /* @__PURE__ */ React19.createElement(View15, { style: [styles15.sheet, { backgroundColor: theme.surface }] }, /* @__PURE__ */ React19.createElement(View15, { style: styles15.header }, /* @__PURE__ */ React19.createElement(Text14, { style: [styles15.title, { color: theme.onSurface }] }, "Nachrichten"), /* @__PURE__ */ React19.createElement(View15, { style: styles15.headerActions }, hasUnread ? /* @__PURE__ */ React19.createElement(
|
|
9545
9996
|
Pressable13,
|
|
9546
9997
|
{
|
|
9547
9998
|
onPress: markAll,
|
|
9548
9999
|
hitSlop: 8,
|
|
9549
10000
|
testID: "tpk-notifications-mark-all"
|
|
9550
10001
|
},
|
|
9551
|
-
/* @__PURE__ */
|
|
9552
|
-
) : null, /* @__PURE__ */
|
|
10002
|
+
/* @__PURE__ */ React19.createElement(Text14, { style: [styles15.markAll, { color: theme.primary }] }, "Alle gelesen")
|
|
10003
|
+
) : null, /* @__PURE__ */ React19.createElement(
|
|
9553
10004
|
Pressable13,
|
|
9554
10005
|
{
|
|
9555
10006
|
onPress: onClose,
|
|
@@ -9557,21 +10008,21 @@ function NotificationsSheet({
|
|
|
9557
10008
|
accessibilityLabel: "Schlie\xDFen",
|
|
9558
10009
|
testID: "tpk-notifications-close"
|
|
9559
10010
|
},
|
|
9560
|
-
/* @__PURE__ */
|
|
9561
|
-
))), loading ? /* @__PURE__ */
|
|
10011
|
+
/* @__PURE__ */ React19.createElement(TpkIcon, { name: "close", size: 24, color: theme.onSurface })
|
|
10012
|
+
))), loading ? /* @__PURE__ */ React19.createElement(View15, { style: styles15.center }, /* @__PURE__ */ React19.createElement(ActivityIndicator8, { color: theme.primary })) : error ? /* @__PURE__ */ React19.createElement(View15, { style: styles15.center }, /* @__PURE__ */ React19.createElement(Text14, { style: styles15.muted }, error)) : items.length === 0 ? /* @__PURE__ */ React19.createElement(View15, { style: styles15.center }, /* @__PURE__ */ React19.createElement(TpkIcon, { name: "feedback", size: 48, color: "#CBD5E1" }), /* @__PURE__ */ React19.createElement(Text14, { style: [styles15.empty, { marginTop: 12 }] }, "Keine Nachrichten.", "\n", "Updates zu deinen Bugs (angenommen, behoben, Belohnung) erscheinen hier.")) : /* @__PURE__ */ React19.createElement(
|
|
9562
10013
|
FlatList2,
|
|
9563
10014
|
{
|
|
9564
10015
|
data: items,
|
|
9565
10016
|
keyExtractor: (n) => n.id,
|
|
9566
10017
|
contentContainerStyle: styles15.listBody,
|
|
9567
|
-
renderItem: ({ item }) => /* @__PURE__ */
|
|
10018
|
+
renderItem: ({ item }) => /* @__PURE__ */ React19.createElement(
|
|
9568
10019
|
Pressable13,
|
|
9569
10020
|
{
|
|
9570
10021
|
style: styles15.row,
|
|
9571
10022
|
onPress: () => markOne(item),
|
|
9572
10023
|
testID: `tpk-notification-${item.id}`
|
|
9573
10024
|
},
|
|
9574
|
-
/* @__PURE__ */
|
|
10025
|
+
/* @__PURE__ */ React19.createElement(
|
|
9575
10026
|
View15,
|
|
9576
10027
|
{
|
|
9577
10028
|
style: [
|
|
@@ -9582,7 +10033,7 @@ function NotificationsSheet({
|
|
|
9582
10033
|
]
|
|
9583
10034
|
}
|
|
9584
10035
|
),
|
|
9585
|
-
/* @__PURE__ */
|
|
10036
|
+
/* @__PURE__ */ React19.createElement(View15, { style: styles15.rowMain }, /* @__PURE__ */ React19.createElement(
|
|
9586
10037
|
Text14,
|
|
9587
10038
|
{
|
|
9588
10039
|
style: [
|
|
@@ -9595,14 +10046,14 @@ function NotificationsSheet({
|
|
|
9595
10046
|
numberOfLines: 2
|
|
9596
10047
|
},
|
|
9597
10048
|
item.title
|
|
9598
|
-
), item.body ? /* @__PURE__ */
|
|
10049
|
+
), item.body ? /* @__PURE__ */ React19.createElement(
|
|
9599
10050
|
Text14,
|
|
9600
10051
|
{
|
|
9601
10052
|
style: [styles15.rowBody, { color: theme.onSurface }],
|
|
9602
10053
|
numberOfLines: 3
|
|
9603
10054
|
},
|
|
9604
10055
|
item.body
|
|
9605
|
-
) : null, /* @__PURE__ */
|
|
10056
|
+
) : null, /* @__PURE__ */ React19.createElement(Text14, { style: styles15.muted }, formatDate2(item.createdAt)))
|
|
9606
10057
|
)
|
|
9607
10058
|
}
|
|
9608
10059
|
)))
|
|
@@ -9649,12 +10100,12 @@ var styles15 = StyleSheet15.create({
|
|
|
9649
10100
|
});
|
|
9650
10101
|
|
|
9651
10102
|
// src/InviteCodeScreen.tsx
|
|
9652
|
-
import
|
|
10103
|
+
import React20, { useState as useState16 } from "react";
|
|
9653
10104
|
import {
|
|
9654
10105
|
ActivityIndicator as ActivityIndicator9,
|
|
9655
10106
|
KeyboardAvoidingView,
|
|
9656
10107
|
Modal as Modal11,
|
|
9657
|
-
Platform as
|
|
10108
|
+
Platform as Platform8,
|
|
9658
10109
|
Pressable as Pressable14,
|
|
9659
10110
|
StyleSheet as StyleSheet16,
|
|
9660
10111
|
Text as Text15,
|
|
@@ -9687,7 +10138,7 @@ function InviteCodeScreen({
|
|
|
9687
10138
|
setError("Code ung\xFCltig oder nicht erkannt. Bitte pr\xFCfe deine Eingabe.");
|
|
9688
10139
|
});
|
|
9689
10140
|
};
|
|
9690
|
-
return /* @__PURE__ */
|
|
10141
|
+
return /* @__PURE__ */ React20.createElement(
|
|
9691
10142
|
Modal11,
|
|
9692
10143
|
{
|
|
9693
10144
|
visible,
|
|
@@ -9695,13 +10146,13 @@ function InviteCodeScreen({
|
|
|
9695
10146
|
animationType: "fade",
|
|
9696
10147
|
onRequestClose: onClose
|
|
9697
10148
|
},
|
|
9698
|
-
/* @__PURE__ */
|
|
10149
|
+
/* @__PURE__ */ React20.createElement(
|
|
9699
10150
|
KeyboardAvoidingView,
|
|
9700
10151
|
{
|
|
9701
|
-
behavior:
|
|
10152
|
+
behavior: Platform8.OS === "ios" ? "padding" : void 0,
|
|
9702
10153
|
style: styles16.backdrop
|
|
9703
10154
|
},
|
|
9704
|
-
/* @__PURE__ */
|
|
10155
|
+
/* @__PURE__ */ React20.createElement(View16, { style: [styles16.card, { backgroundColor: theme.surface }] }, onClose ? /* @__PURE__ */ React20.createElement(
|
|
9705
10156
|
Pressable14,
|
|
9706
10157
|
{
|
|
9707
10158
|
onPress: onClose,
|
|
@@ -9710,8 +10161,8 @@ function InviteCodeScreen({
|
|
|
9710
10161
|
accessibilityLabel: "Schlie\xDFen",
|
|
9711
10162
|
testID: "tpk-invite-close"
|
|
9712
10163
|
},
|
|
9713
|
-
/* @__PURE__ */
|
|
9714
|
-
) : null, /* @__PURE__ */
|
|
10164
|
+
/* @__PURE__ */ React20.createElement(TpkIcon, { name: "close", size: 22, color: theme.onSurface })
|
|
10165
|
+
) : null, /* @__PURE__ */ React20.createElement(TpkIcon, { name: "rocket", size: 40, color: theme.primary }), /* @__PURE__ */ React20.createElement(Text15, { style: [styles16.title, { color: theme.onSurface }] }, projectName ? `${projectName} testen` : "Tester werden"), /* @__PURE__ */ React20.createElement(Text15, { style: styles16.subtitle }, "Gib den Einladungscode ein, den du erhalten hast, um loszulegen."), /* @__PURE__ */ React20.createElement(
|
|
9715
10166
|
TextInput5,
|
|
9716
10167
|
{
|
|
9717
10168
|
value: code,
|
|
@@ -9735,7 +10186,7 @@ function InviteCodeScreen({
|
|
|
9735
10186
|
],
|
|
9736
10187
|
testID: "tpk-invite-input"
|
|
9737
10188
|
}
|
|
9738
|
-
), error ? /* @__PURE__ */
|
|
10189
|
+
), error ? /* @__PURE__ */ React20.createElement(Text15, { style: [styles16.error, { color: theme.errorColour }] }, error) : null, /* @__PURE__ */ React20.createElement(
|
|
9739
10190
|
Pressable14,
|
|
9740
10191
|
{
|
|
9741
10192
|
onPress: submit,
|
|
@@ -9746,7 +10197,7 @@ function InviteCodeScreen({
|
|
|
9746
10197
|
],
|
|
9747
10198
|
testID: "tpk-invite-submit"
|
|
9748
10199
|
},
|
|
9749
|
-
loading ? /* @__PURE__ */
|
|
10200
|
+
loading ? /* @__PURE__ */ React20.createElement(ActivityIndicator9, { color: "#FFFFFF" }) : /* @__PURE__ */ React20.createElement(Text15, { style: styles16.buttonText }, "Loslegen")
|
|
9750
10201
|
))
|
|
9751
10202
|
)
|
|
9752
10203
|
);
|
|
@@ -9797,7 +10248,7 @@ var styles16 = StyleSheet16.create({
|
|
|
9797
10248
|
});
|
|
9798
10249
|
|
|
9799
10250
|
// src/TesterPayKitWrapper.tsx
|
|
9800
|
-
import
|
|
10251
|
+
import React22, {
|
|
9801
10252
|
useCallback as useCallback10,
|
|
9802
10253
|
useEffect as useEffect14,
|
|
9803
10254
|
useRef as useRef10,
|
|
@@ -9805,13 +10256,13 @@ import React21, {
|
|
|
9805
10256
|
} from "react";
|
|
9806
10257
|
import {
|
|
9807
10258
|
AppState as AppState3,
|
|
9808
|
-
Platform as
|
|
10259
|
+
Platform as Platform9,
|
|
9809
10260
|
StyleSheet as StyleSheet18,
|
|
9810
10261
|
View as View18
|
|
9811
10262
|
} from "react-native";
|
|
9812
10263
|
|
|
9813
10264
|
// src/ai-tester/AiRemoteControl.tsx
|
|
9814
|
-
import
|
|
10265
|
+
import React21, { useCallback as useCallback9, useEffect as useEffect13, useRef as useRef9, useState as useState17 } from "react";
|
|
9815
10266
|
import {
|
|
9816
10267
|
Modal as Modal12,
|
|
9817
10268
|
Pressable as Pressable15,
|
|
@@ -10036,7 +10487,7 @@ function AiRemoteControl({
|
|
|
10036
10487
|
onClose();
|
|
10037
10488
|
}, [_finishSession, onClose]);
|
|
10038
10489
|
if (!visible) return null;
|
|
10039
|
-
return /* @__PURE__ */
|
|
10490
|
+
return /* @__PURE__ */ React21.createElement(
|
|
10040
10491
|
Modal12,
|
|
10041
10492
|
{
|
|
10042
10493
|
animationType: "fade",
|
|
@@ -10044,13 +10495,13 @@ function AiRemoteControl({
|
|
|
10044
10495
|
transparent: true,
|
|
10045
10496
|
visible
|
|
10046
10497
|
},
|
|
10047
|
-
/* @__PURE__ */
|
|
10498
|
+
/* @__PURE__ */ React21.createElement(
|
|
10048
10499
|
View17,
|
|
10049
10500
|
{
|
|
10050
10501
|
style: [styles17.backdrop, style],
|
|
10051
10502
|
dataSet: { "tpk-ai-overlay": "true" }
|
|
10052
10503
|
},
|
|
10053
|
-
/* @__PURE__ */
|
|
10504
|
+
/* @__PURE__ */ React21.createElement(View17, { style: styles17.card }, /* @__PURE__ */ React21.createElement(View17, { style: styles17.header }, /* @__PURE__ */ React21.createElement(TpkIcon, { name: "sparkle", size: 28, color: "#7C3AED" }), /* @__PURE__ */ React21.createElement(Text16, { style: styles17.title }, status === "choosing" ? "Choose a tester" : "AI is testing")), status === "choosing" ? /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(Text16, { style: styles17.subtitle }, "Pick which AI persona should drive your app."), /* @__PURE__ */ React21.createElement(View17, { style: styles17.personaList }, (personas.length ? personas : [
|
|
10054
10505
|
{
|
|
10055
10506
|
slug: "junior_tester",
|
|
10056
10507
|
displayName: "Junior Tester",
|
|
@@ -10058,7 +10509,7 @@ function AiRemoteControl({
|
|
|
10058
10509
|
}
|
|
10059
10510
|
]).map((p) => {
|
|
10060
10511
|
const sel = p.slug === selectedPersona;
|
|
10061
|
-
return /* @__PURE__ */
|
|
10512
|
+
return /* @__PURE__ */ React21.createElement(
|
|
10062
10513
|
Pressable15,
|
|
10063
10514
|
{
|
|
10064
10515
|
key: p.slug,
|
|
@@ -10070,7 +10521,7 @@ function AiRemoteControl({
|
|
|
10070
10521
|
sel && styles17.personaChipSelected
|
|
10071
10522
|
]
|
|
10072
10523
|
},
|
|
10073
|
-
/* @__PURE__ */
|
|
10524
|
+
/* @__PURE__ */ React21.createElement(
|
|
10074
10525
|
Text16,
|
|
10075
10526
|
{
|
|
10076
10527
|
style: [
|
|
@@ -10081,30 +10532,30 @@ function AiRemoteControl({
|
|
|
10081
10532
|
p.displayName
|
|
10082
10533
|
)
|
|
10083
10534
|
);
|
|
10084
|
-
})), personas.find((p) => p.slug === selectedPersona)?.description ? /* @__PURE__ */
|
|
10535
|
+
})), personas.find((p) => p.slug === selectedPersona)?.description ? /* @__PURE__ */ React21.createElement(Text16, { style: styles17.personaDesc }, personas.find((p) => p.slug === selectedPersona)?.description) : null, /* @__PURE__ */ React21.createElement(View17, { style: styles17.choosingActions }, /* @__PURE__ */ React21.createElement(
|
|
10085
10536
|
Pressable15,
|
|
10086
10537
|
{
|
|
10087
10538
|
accessibilityRole: "button",
|
|
10088
10539
|
onPress: onClose,
|
|
10089
10540
|
style: styles17.cancelButton
|
|
10090
10541
|
},
|
|
10091
|
-
/* @__PURE__ */
|
|
10092
|
-
), /* @__PURE__ */
|
|
10542
|
+
/* @__PURE__ */ React21.createElement(Text16, { style: styles17.cancelText }, "Cancel")
|
|
10543
|
+
), /* @__PURE__ */ React21.createElement(
|
|
10093
10544
|
Pressable15,
|
|
10094
10545
|
{
|
|
10095
10546
|
accessibilityRole: "button",
|
|
10096
10547
|
onPress: _start,
|
|
10097
10548
|
style: styles17.startButton
|
|
10098
10549
|
},
|
|
10099
|
-
/* @__PURE__ */
|
|
10100
|
-
))) : /* @__PURE__ */
|
|
10550
|
+
/* @__PURE__ */ React21.createElement(Text16, { style: styles17.stopText }, "Start AI test")
|
|
10551
|
+
))) : /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(Text16, { style: styles17.subtitle }, status === "starting" && "Starting up\u2026", status === "running" && `Action ${actionCount} \u2014 exploring`, status === "paused" && "Paused (you took over)", status === "ended" && "Session ended", status === "error" && (errorMessage2 ?? "Error")), status === "running" || status === "paused" ? /* @__PURE__ */ React21.createElement(Text16, { style: styles17.hint }, "Tap anywhere outside to pause. Use Stop to end the session.") : null, /* @__PURE__ */ React21.createElement(
|
|
10101
10552
|
Pressable15,
|
|
10102
10553
|
{
|
|
10103
10554
|
accessibilityRole: "button",
|
|
10104
10555
|
onPress: onStopPress,
|
|
10105
10556
|
style: styles17.stopButton
|
|
10106
10557
|
},
|
|
10107
|
-
/* @__PURE__ */
|
|
10558
|
+
/* @__PURE__ */ React21.createElement(Text16, { style: styles17.stopText }, status === "ended" ? "Close" : "Stop")
|
|
10108
10559
|
)))
|
|
10109
10560
|
)
|
|
10110
10561
|
);
|
|
@@ -10240,6 +10691,7 @@ function TesterPayKitWrapper({
|
|
|
10240
10691
|
aiProjectId,
|
|
10241
10692
|
aiApiBaseUrl,
|
|
10242
10693
|
theme,
|
|
10694
|
+
language,
|
|
10243
10695
|
testID = "tpk-wrapper"
|
|
10244
10696
|
}) {
|
|
10245
10697
|
const rootRef = useRef10(null);
|
|
@@ -10315,7 +10767,7 @@ function TesterPayKitWrapper({
|
|
|
10315
10767
|
}, [tpk]);
|
|
10316
10768
|
useEffect14(() => {
|
|
10317
10769
|
if (!enableWrapper || !enableShake) return;
|
|
10318
|
-
if (
|
|
10770
|
+
if (Platform9.OS === "web") return;
|
|
10319
10771
|
let teardown = null;
|
|
10320
10772
|
let cancelled = false;
|
|
10321
10773
|
let lastShakeAt = 0;
|
|
@@ -10371,7 +10823,8 @@ function TesterPayKitWrapper({
|
|
|
10371
10823
|
// Voice-bug split (A2): the title/description above are the
|
|
10372
10824
|
// tester's O-Ton. Carry the transcript + language so submit
|
|
10373
10825
|
// stores the author view + derives the English enriched fields.
|
|
10374
|
-
|
|
10826
|
+
// Quick actions have no spoken O-Ton — leave it unset then.
|
|
10827
|
+
transcript: result.transcript || void 0,
|
|
10375
10828
|
sourceLanguage: result.sourceLanguage
|
|
10376
10829
|
});
|
|
10377
10830
|
setVoiceOpen(false);
|
|
@@ -10380,9 +10833,9 @@ function TesterPayKitWrapper({
|
|
|
10380
10833
|
[]
|
|
10381
10834
|
);
|
|
10382
10835
|
if (!enableWrapper) {
|
|
10383
|
-
return /* @__PURE__ */
|
|
10836
|
+
return /* @__PURE__ */ React22.createElement(React22.Fragment, null, children);
|
|
10384
10837
|
}
|
|
10385
|
-
return /* @__PURE__ */
|
|
10838
|
+
return /* @__PURE__ */ React22.createElement(TpkThemeProvider, { theme }, /* @__PURE__ */ React22.createElement(TpkLanguageProvider, { language }, /* @__PURE__ */ React22.createElement(
|
|
10386
10839
|
View18,
|
|
10387
10840
|
{
|
|
10388
10841
|
ref: rootRef,
|
|
@@ -10390,8 +10843,8 @@ function TesterPayKitWrapper({
|
|
|
10390
10843
|
testID,
|
|
10391
10844
|
collapsable: false
|
|
10392
10845
|
},
|
|
10393
|
-
/* @__PURE__ */
|
|
10394
|
-
/* @__PURE__ */
|
|
10846
|
+
/* @__PURE__ */ React22.createElement(View18, { style: styles18.content, onTouchStart: handleAutoTap }, children),
|
|
10847
|
+
/* @__PURE__ */ React22.createElement(
|
|
10395
10848
|
FloatingFeedbackButton,
|
|
10396
10849
|
{
|
|
10397
10850
|
position: buttonPosition,
|
|
@@ -10413,7 +10866,7 @@ function TesterPayKitWrapper({
|
|
|
10413
10866
|
sessionStartedAt: sessionAnchor.current ?? void 0
|
|
10414
10867
|
}
|
|
10415
10868
|
),
|
|
10416
|
-
(aiReady || remoteSession) && /* @__PURE__ */
|
|
10869
|
+
(aiReady || remoteSession) && /* @__PURE__ */ React22.createElement(
|
|
10417
10870
|
AiRemoteControl,
|
|
10418
10871
|
{
|
|
10419
10872
|
visible: aiOpen,
|
|
@@ -10434,7 +10887,7 @@ function TesterPayKitWrapper({
|
|
|
10434
10887
|
}
|
|
10435
10888
|
}
|
|
10436
10889
|
),
|
|
10437
|
-
/* @__PURE__ */
|
|
10890
|
+
/* @__PURE__ */ React22.createElement(
|
|
10438
10891
|
BugReportSheet,
|
|
10439
10892
|
{
|
|
10440
10893
|
visible: bugOpen,
|
|
@@ -10456,7 +10909,7 @@ function TesterPayKitWrapper({
|
|
|
10456
10909
|
}
|
|
10457
10910
|
}
|
|
10458
10911
|
),
|
|
10459
|
-
/* @__PURE__ */
|
|
10912
|
+
/* @__PURE__ */ React22.createElement(
|
|
10460
10913
|
GeneralFeedbackDialog,
|
|
10461
10914
|
{
|
|
10462
10915
|
visible: feedbackOpen,
|
|
@@ -10465,16 +10918,18 @@ function TesterPayKitWrapper({
|
|
|
10465
10918
|
onClose: () => setFeedbackOpen(false)
|
|
10466
10919
|
}
|
|
10467
10920
|
),
|
|
10468
|
-
/* @__PURE__ */
|
|
10921
|
+
/* @__PURE__ */ React22.createElement(
|
|
10469
10922
|
VoiceBugInputSheet,
|
|
10470
10923
|
{
|
|
10471
10924
|
visible: voiceOpen,
|
|
10472
10925
|
tpk,
|
|
10473
10926
|
onCancel: () => setVoiceOpen(false),
|
|
10474
|
-
onExtracted: handleVoiceExtracted
|
|
10927
|
+
onExtracted: handleVoiceExtracted,
|
|
10928
|
+
currentScreen: currentScreen ?? void 0,
|
|
10929
|
+
captureScreen: async () => (await captureView(rootRef))?.base64 ?? null
|
|
10475
10930
|
}
|
|
10476
10931
|
),
|
|
10477
|
-
/* @__PURE__ */
|
|
10932
|
+
/* @__PURE__ */ React22.createElement(
|
|
10478
10933
|
SessionEndDialog,
|
|
10479
10934
|
{
|
|
10480
10935
|
visible: sessionEndOpen,
|
|
@@ -10494,7 +10949,7 @@ function TesterPayKitWrapper({
|
|
|
10494
10949
|
}
|
|
10495
10950
|
}
|
|
10496
10951
|
),
|
|
10497
|
-
/* @__PURE__ */
|
|
10952
|
+
/* @__PURE__ */ React22.createElement(
|
|
10498
10953
|
MyBugsSheet,
|
|
10499
10954
|
{
|
|
10500
10955
|
visible: myBugsOpen,
|
|
@@ -10502,7 +10957,7 @@ function TesterPayKitWrapper({
|
|
|
10502
10957
|
onClose: () => setMyBugsOpen(false)
|
|
10503
10958
|
}
|
|
10504
10959
|
),
|
|
10505
|
-
/* @__PURE__ */
|
|
10960
|
+
/* @__PURE__ */ React22.createElement(
|
|
10506
10961
|
SessionDetailsSheet,
|
|
10507
10962
|
{
|
|
10508
10963
|
visible: sessionDetailsOpen,
|
|
@@ -10510,7 +10965,7 @@ function TesterPayKitWrapper({
|
|
|
10510
10965
|
onClose: () => setSessionDetailsOpen(false)
|
|
10511
10966
|
}
|
|
10512
10967
|
),
|
|
10513
|
-
/* @__PURE__ */
|
|
10968
|
+
/* @__PURE__ */ React22.createElement(
|
|
10514
10969
|
NotificationsSheet,
|
|
10515
10970
|
{
|
|
10516
10971
|
visible: messagesOpen,
|
|
@@ -10519,7 +10974,7 @@ function TesterPayKitWrapper({
|
|
|
10519
10974
|
onUnreadChange: setUnreadMessages
|
|
10520
10975
|
}
|
|
10521
10976
|
)
|
|
10522
|
-
));
|
|
10977
|
+
)));
|
|
10523
10978
|
}
|
|
10524
10979
|
var styles18 = StyleSheet18.create({
|
|
10525
10980
|
root: {
|
|
@@ -10930,6 +11385,7 @@ export {
|
|
|
10930
11385
|
SessionDetailsSheet,
|
|
10931
11386
|
SessionEndDialog,
|
|
10932
11387
|
SubmitQueue,
|
|
11388
|
+
TPK_STRINGS,
|
|
10933
11389
|
TaskAnnotationRegistry,
|
|
10934
11390
|
TesterDashboard,
|
|
10935
11391
|
TesterPayKitProvider,
|
|
@@ -10939,6 +11395,7 @@ export {
|
|
|
10939
11395
|
TpkExpo,
|
|
10940
11396
|
TpkIcon,
|
|
10941
11397
|
TpkIconsProvider,
|
|
11398
|
+
TpkLanguageProvider,
|
|
10942
11399
|
TpkOnboarding,
|
|
10943
11400
|
TpkSensitive,
|
|
10944
11401
|
TpkTalker,
|
|
@@ -10961,6 +11418,7 @@ export {
|
|
|
10961
11418
|
classificationToBugType,
|
|
10962
11419
|
createBugReportDraft,
|
|
10963
11420
|
deriveTaskProgress,
|
|
11421
|
+
detectDeviceLanguage,
|
|
10964
11422
|
emptyAnnotationDoc,
|
|
10965
11423
|
endNativeCapture,
|
|
10966
11424
|
engagedMinutes,
|
|
@@ -10989,6 +11447,7 @@ export {
|
|
|
10989
11447
|
mockWidgets,
|
|
10990
11448
|
parseVersionRange,
|
|
10991
11449
|
pathToSvgD,
|
|
11450
|
+
quickDraftBug,
|
|
10992
11451
|
resetOnboardingState,
|
|
10993
11452
|
resetWelcomeBriefAck,
|
|
10994
11453
|
resetWidgetTourSeen,
|
|
@@ -11001,6 +11460,8 @@ export {
|
|
|
11001
11460
|
useTesterPayKit,
|
|
11002
11461
|
useTpkDashboard,
|
|
11003
11462
|
useTpkEarnings,
|
|
11463
|
+
useTpkLanguage,
|
|
11464
|
+
useTpkStrings,
|
|
11004
11465
|
useTpkTheme,
|
|
11005
11466
|
versionSatisfies,
|
|
11006
11467
|
widgetDiscovery,
|