yaver-feedback-react-native 0.9.9 → 0.9.11
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/app.plugin.js +24 -10
- package/dist/DogfoodRuntime.d.ts +32 -1
- package/dist/DogfoodRuntime.js +94 -14
- package/dist/DogfoodSessionUi.d.ts +2 -0
- package/dist/DogfoodSessionUi.js +8 -4
- package/dist/FeedbackModal.js +263 -278
- package/dist/FeedbackModalTheme.d.ts +5 -0
- package/dist/FeedbackModalTheme.js +29 -0
- package/dist/P2PClient.d.ts +2 -0
- package/dist/P2PClient.js +1 -1
- package/dist/P2PDogfoodDriver.js +17 -0
- package/dist/__tests__/DogfoodRuntime.test.js +59 -0
- package/dist/__tests__/FeedbackModalContract.test.d.ts +1 -0
- package/dist/__tests__/FeedbackModalContract.test.js +77 -0
- package/dist/__tests__/NativeDogfoodShortcut.test.js +23 -0
- package/dist/__tests__/P2PDogfoodDriver.test.js +4 -1
- package/dist/index.d.ts +6 -7
- package/dist/index.js +7 -7
- package/ios/YaverHotReload.swift +3 -4
- package/package.json +1 -1
- package/src/DogfoodRuntime.ts +129 -15
- package/src/DogfoodSessionUi.tsx +10 -4
- package/src/FeedbackModal.tsx +335 -372
- package/src/FeedbackModalTheme.ts +29 -0
- package/src/P2PClient.ts +3 -1
- package/src/P2PDogfoodDriver.ts +17 -0
- package/src/__tests__/DogfoodRuntime.test.ts +66 -0
- package/src/__tests__/FeedbackModalContract.test.ts +88 -0
- package/src/__tests__/NativeDogfoodShortcut.test.ts +25 -0
- package/src/__tests__/P2PDogfoodDriver.test.ts +4 -0
- package/src/index.ts +6 -5
package/src/DogfoodSessionUi.tsx
CHANGED
|
@@ -101,10 +101,11 @@ export const DogfoodStatusRail: React.FC<{
|
|
|
101
101
|
export const DogfoodLanePicker: React.FC<{
|
|
102
102
|
options: readonly DogfoodLaneOption[];
|
|
103
103
|
selected: DogfoodLane;
|
|
104
|
+
fallbackLane?: DogfoodLane;
|
|
104
105
|
onSelect: (lane: DogfoodLane) => void;
|
|
105
106
|
colors?: Partial<DogfoodUiColors>;
|
|
106
107
|
showUnsupportedReasons?: boolean;
|
|
107
|
-
}> = ({ options, selected, onSelect, colors: colorOverrides, showUnsupportedReasons = true }) => {
|
|
108
|
+
}> = ({ options, selected, fallbackLane, onSelect, colors: colorOverrides, showUnsupportedReasons = true }) => {
|
|
108
109
|
const colors = resolvedColors(colorOverrides);
|
|
109
110
|
return (
|
|
110
111
|
<View accessibilityRole="radiogroup" accessibilityLabel="Dogfood runtime lane">
|
|
@@ -128,7 +129,8 @@ export const DogfoodLanePicker: React.FC<{
|
|
|
128
129
|
]}
|
|
129
130
|
>
|
|
130
131
|
<Text style={[styles.choiceText, { color: colors.text }, active && styles.choiceTextActive]}>
|
|
131
|
-
{option.label}
|
|
132
|
+
{option.label}
|
|
133
|
+
{active ? ' · preferred' : fallbackLane === option.lane ? ' · automatic fallback' : option.default ? ' · default' : ''}
|
|
132
134
|
</Text>
|
|
133
135
|
</Pressable>
|
|
134
136
|
);
|
|
@@ -154,6 +156,7 @@ function runtimeTone(phase: DogfoodPhase, colors: DogfoodUiColors): string {
|
|
|
154
156
|
* Logs; Hermes/WebRTC use the same lifecycle and failure/remedy treatment. */
|
|
155
157
|
export const DogfoodLiveConsole: React.FC<{
|
|
156
158
|
lane: DogfoodLane;
|
|
159
|
+
sourceLabel?: string;
|
|
157
160
|
phase: DogfoodPhase;
|
|
158
161
|
message: string;
|
|
159
162
|
logs: readonly DogfoodLogLine[];
|
|
@@ -161,16 +164,18 @@ export const DogfoodLiveConsole: React.FC<{
|
|
|
161
164
|
maxLines?: number;
|
|
162
165
|
colors?: Partial<DogfoodUiColors>;
|
|
163
166
|
renderText?: (text: string) => React.ReactNode;
|
|
164
|
-
}> = ({ lane, phase, message, logs, failure, maxLines = 80, colors: colorOverrides, renderText }) => {
|
|
167
|
+
}> = ({ lane, sourceLabel, phase, message, logs, failure, maxLines = 80, colors: colorOverrides, renderText }) => {
|
|
165
168
|
const colors = resolvedColors(colorOverrides);
|
|
166
169
|
const text = logs.slice(-maxLines).map((line) => line.text).join('\n');
|
|
167
170
|
const title = lane === 'browser' ? 'Browser Logs' : lane === 'hermes' ? 'Hermes Logs' : 'WebRTC Logs';
|
|
171
|
+
const accessibleTitle = sourceLabel ? `${title} · ${sourceLabel}` : title;
|
|
168
172
|
return (
|
|
169
|
-
<View style={[styles.console, { backgroundColor: colors.console, borderColor: colors.border }]} accessibilityLabel={
|
|
173
|
+
<View style={[styles.console, { backgroundColor: colors.console, borderColor: colors.border }]} accessibilityLabel={accessibleTitle}>
|
|
170
174
|
<View style={styles.consoleHeader}>
|
|
171
175
|
<View style={[styles.statusDot, { backgroundColor: runtimeTone(phase, colors) }]} />
|
|
172
176
|
<Text style={[styles.consoleTitle, { color: colors.text }]}>{title}</Text>
|
|
173
177
|
</View>
|
|
178
|
+
{sourceLabel ? <Text style={[styles.consoleSource, { color: colors.muted }]}>Source · {sourceLabel}</Text> : null}
|
|
174
179
|
<Text style={[styles.consoleStatus, { color: colors.muted }]}>{message}</Text>
|
|
175
180
|
{text ? (
|
|
176
181
|
renderText ? renderText(text) : <Text selectable style={[styles.consoleText, { color: colors.text }]}>{text}</Text>
|
|
@@ -204,6 +209,7 @@ const styles = StyleSheet.create({
|
|
|
204
209
|
console: { width: '100%', maxHeight: 320, overflow: 'hidden', marginTop: 10, borderWidth: 1, borderRadius: 10, padding: 11, gap: 7 },
|
|
205
210
|
consoleHeader: { flexDirection: 'row', alignItems: 'center', gap: 7 },
|
|
206
211
|
consoleTitle: { fontSize: 12, fontWeight: '800' },
|
|
212
|
+
consoleSource: { fontSize: 10, lineHeight: 14 },
|
|
207
213
|
consoleStatus: { fontSize: 11, lineHeight: 16 },
|
|
208
214
|
consoleText: { fontFamily: 'monospace', fontSize: 10, lineHeight: 15 },
|
|
209
215
|
consoleEmpty: { fontSize: 10, fontStyle: 'italic' },
|