yaver-feedback-react-native 0.8.0 → 0.8.2
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/README.md +40 -6
- package/dist/AuthOverlay.js +1 -1
- package/dist/FeedbackModal.js +475 -265
- package/dist/P2PClient.d.ts +9 -3
- package/dist/P2PClient.js +30 -2
- package/dist/QuickActionIcon.d.ts +10 -2
- package/dist/QuickActionIcon.js +49 -12
- package/dist/YaverFeedback.d.ts +5 -0
- package/dist/YaverFeedback.js +24 -0
- package/dist/__tests__/P2PClient.test.js +30 -0
- package/dist/__tests__/YaverFeedback.test.js +39 -0
- package/dist/capture.d.ts +11 -0
- package/dist/capture.js +59 -0
- package/dist/index.d.ts +8 -7
- package/dist/index.js +9 -7
- package/dist/preferences.d.ts +11 -0
- package/dist/preferences.js +82 -0
- package/dist/types.d.ts +29 -4
- package/dist/upload.d.ts +1 -0
- package/dist/upload.js +8 -0
- package/package.json +11 -5
- package/src/AuthOverlay.tsx +1 -0
- package/src/FeedbackModal.tsx +561 -319
- package/src/P2PClient.ts +44 -3
- package/src/QuickActionIcon.tsx +76 -13
- package/src/YaverFeedback.ts +31 -0
- package/src/__tests__/P2PClient.test.ts +40 -0
- package/src/__tests__/YaverFeedback.test.ts +42 -0
- package/src/capture.ts +74 -0
- package/src/index.ts +8 -6
- package/src/preferences.ts +96 -0
- package/src/types.ts +29 -4
- package/src/upload.ts +9 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# yaver-feedback-react-native
|
|
2
2
|
|
|
3
|
-
Visual feedback SDK for Yaver. Lets testers and developers shake their phone
|
|
3
|
+
Visual feedback SDK for Yaver. Lets testers and developers shake their phone and then keep a small quick-access icon on screen for hot reload, vibing, and screenshot & fix flows straight to a Yaver agent running on a dev machine.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -32,8 +32,8 @@ npm install @react-native-async-storage/async-storage
|
|
|
32
32
|
# Screenshots
|
|
33
33
|
npm install react-native-view-shot
|
|
34
34
|
|
|
35
|
-
#
|
|
36
|
-
|
|
35
|
+
# Optional file upload
|
|
36
|
+
npx expo install expo-document-picker
|
|
37
37
|
```
|
|
38
38
|
|
|
39
39
|
`expo-apple-authentication` is optional — if it's missing, "Continue with Apple" falls through to in-app browser OAuth on Android. iOS hosts that want true native Apple Sign-In must also enable the **Sign in with Apple** capability in Xcode.
|
|
@@ -85,7 +85,41 @@ function App() {
|
|
|
85
85
|
}
|
|
86
86
|
```
|
|
87
87
|
|
|
88
|
-
Shake your phone to open the feedback modal.
|
|
88
|
+
Shake your phone to open the feedback modal. On mobile the quick-access icon stays hidden until that first shake, then remains tappable for the rest of the session unless the user hides it. For launch, the sheet exposes three actions only: hot reload, vibing, and screenshot & fix.
|
|
89
|
+
|
|
90
|
+
### Quick Icon Styling
|
|
91
|
+
|
|
92
|
+
The quick icon is configurable at compile time through `YaverFeedback.init(...)`, with render-time overrides still available through `<QuickActionIcon />` props when needed. If you do nothing, the SDK uses a high-visibility orange bubble by default so it stays distinct from the blue/indigo FAB styling many mobile apps already have.
|
|
93
|
+
|
|
94
|
+
```tsx
|
|
95
|
+
YaverFeedback.init({
|
|
96
|
+
trigger: 'shake',
|
|
97
|
+
quickIcon: 'after-shake',
|
|
98
|
+
quickIconBackgroundColor: '#0f766e',
|
|
99
|
+
quickIconForegroundColor: '#f8fafc',
|
|
100
|
+
quickIconBorderColor: 'rgba(255,255,255,0.85)',
|
|
101
|
+
quickIconShadowColor: '#000000',
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Available options:
|
|
106
|
+
|
|
107
|
+
- `quickIconBackgroundColor`: bubble fill color.
|
|
108
|
+
- `quickIconForegroundColor`: the `y` label color.
|
|
109
|
+
- `quickIconBorderColor`: outer ring color.
|
|
110
|
+
- `quickIconShadowColor`: shadow tint.
|
|
111
|
+
- `quickIconColor`: deprecated alias for `quickIconBackgroundColor`.
|
|
112
|
+
- `quickIconInitialPosition`: initial top-left position in pixels.
|
|
113
|
+
|
|
114
|
+
If you need a one-off local override instead of global SDK config:
|
|
115
|
+
|
|
116
|
+
```tsx
|
|
117
|
+
<QuickActionIcon
|
|
118
|
+
backgroundColor="#111827"
|
|
119
|
+
foregroundColor="#f9fafb"
|
|
120
|
+
borderColor="#f59e0b"
|
|
121
|
+
/>
|
|
122
|
+
```
|
|
89
123
|
|
|
90
124
|
### Opt-out: bring-your-own auth (pre-0.5 behavior)
|
|
91
125
|
|
|
@@ -728,7 +762,7 @@ YaverFeedback.setEnabled(false);
|
|
|
728
762
|
- Yaver CLI running on your dev machine (`yaver serve`)
|
|
729
763
|
- Optional: `@react-native-async-storage/async-storage` for device discovery persistence
|
|
730
764
|
- Optional: `react-native-view-shot` for screenshots
|
|
731
|
-
- Optional: `
|
|
765
|
+
- Optional: `expo-document-picker` for file uploads
|
|
732
766
|
|
|
733
767
|
## API Reference
|
|
734
768
|
|
|
@@ -805,7 +839,7 @@ YaverFeedback.setEnabled(false);
|
|
|
805
839
|
|
|
806
840
|
| Component | Description |
|
|
807
841
|
|-----------|-------------|
|
|
808
|
-
| `FeedbackModal` | Modal with
|
|
842
|
+
| `FeedbackModal` | Modal with hot reload, vibing, screenshot or upload, and recording |
|
|
809
843
|
| `FloatingButton` | Draggable overlay button to trigger feedback |
|
|
810
844
|
| `YaverConnectionScreen` | Full-screen device discovery and connection UI |
|
|
811
845
|
|
package/dist/AuthOverlay.js
CHANGED
|
@@ -97,7 +97,7 @@ const AuthOverlay = () => {
|
|
|
97
97
|
</react_native_1.Modal>
|
|
98
98
|
|
|
99
99
|
<react_native_1.Modal visible={pickerVisible && !!token} animationType="slide" presentationStyle="fullScreen" onRequestClose={() => setPickerVisible(false)}>
|
|
100
|
-
{token && (<MachinePickerScreen_1.YaverMachinePickerScreen token={token} onPick={handleDevicePicked} onCancel={() => setPickerVisible(false)}/>)}
|
|
100
|
+
{token && (<MachinePickerScreen_1.YaverMachinePickerScreen token={token} currentDeviceId={YaverFeedback_1.YaverFeedback.getConfig()?.preferredDeviceId} onPick={handleDevicePicked} onCancel={() => setPickerVisible(false)}/>)}
|
|
101
101
|
</react_native_1.Modal>
|
|
102
102
|
</>);
|
|
103
103
|
};
|