@uxbertlabs/reportly 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,162 @@
1
+ # Reportly
2
+
3
+ A simple JavaScript plugin that enables QA teams to report UI issues directly from any webpage with screenshots and annotations.
4
+
5
+ ## Features
6
+
7
+ - **🐛 Floating Action Button** - Always accessible, non-intrusive
8
+ - **📸 Auto Screenshot** - Captures the current page instantly
9
+ - **✏️ Annotation Tools** - Draw, add arrows, and rectangles
10
+ - **📱 Device Context** - Auto-captures browser, OS, and screen info
11
+ - **📥 JSON Export** - Download complete issue reports locally
12
+
13
+ ## Quick Start
14
+
15
+ ### 1. Install Dependencies
16
+
17
+ ```bash
18
+ npm install @uxbertlabs/reportly
19
+ ```
20
+
21
+ ### 2. Build the Plugin
22
+
23
+ ```bash
24
+ npm run build
25
+ ```
26
+
27
+ This creates `dist/reportly.js` and `dist/reportly.min.js`
28
+
29
+ ### 3. Try the Demo
30
+
31
+ Open `demo.html` in your browser to see it in action!
32
+
33
+ ## Installation
34
+
35
+ ### Method 1: Script Tag (Recommended)
36
+
37
+ ```html
38
+ <script src="dist/reportly.min.js"></script>
39
+ <script>
40
+ Reportly.init({
41
+ ui: {
42
+ position: "bottom-right",
43
+ theme: "light",
44
+ },
45
+ });
46
+ </script>
47
+ ```
48
+
49
+ ### Method 2: ES Module
50
+
51
+ ```javascript
52
+ import Reportly from "./dist/reportly.js";
53
+
54
+ Reportly.init();
55
+ ```
56
+
57
+ ## Configuration
58
+
59
+ ```javascript
60
+ Reportly.init({
61
+ ui: {
62
+ position: "bottom-right", // 'bottom-left', 'top-right', 'top-left'
63
+ theme: "light", // or 'dark'
64
+ },
65
+ features: {
66
+ annotation: true,
67
+ deviceInfo: true,
68
+ },
69
+ });
70
+ ```
71
+
72
+ ## API Reference
73
+
74
+ ```javascript
75
+ // Open issue reporter manually
76
+ Reportly.open();
77
+
78
+ // Close issue reporter
79
+ Reportly.close();
80
+
81
+ // Update configuration
82
+ Reportly.updateConfig({ ui: { theme: "dark" } });
83
+
84
+ // Get saved issues
85
+ const issues = Reportly.getSavedIssues();
86
+
87
+ // Clear saved issues
88
+ Reportly.clearSavedIssues();
89
+
90
+ // Export all saved issues
91
+ Reportly.exportAllIssues();
92
+
93
+ // Listen to events
94
+ Reportly.on("issue:created", (issue) => {
95
+ console.log("New issue:", issue);
96
+ });
97
+
98
+ // Destroy instance
99
+ Reportly.destroy();
100
+ ```
101
+
102
+ ## Exported JSON Format
103
+
104
+ ```json
105
+ {
106
+ "title": "Button alignment issue",
107
+ "description": "The submit button is cut off on mobile",
108
+ "priority": "High",
109
+ "screenshot": "data:image/png;base64,...",
110
+ "deviceInfo": {
111
+ "browser": "Chrome 120.0",
112
+ "os": "macOS",
113
+ "screenResolution": "1920x1080",
114
+ "viewport": "1440x900",
115
+ "url": "https://example.com",
116
+ "timestamp": "2025-10-12T10:30:00Z",
117
+ "userAgent": "Mozilla/5.0..."
118
+ },
119
+ "createdAt": "2025-10-12T10:30:00Z"
120
+ }
121
+ ```
122
+
123
+ ## Development
124
+
125
+ ### Project Structure
126
+
127
+ ```
128
+ reportly/
129
+ ├── src/
130
+ │ ├── core/ # Core functionality
131
+ │ ├── ui/ # UI components
132
+ │ ├── features/ # Features (screenshot, annotation, etc.)
133
+ │ └── utils/ # Utility functions
134
+ ├── dist/ # Built files
135
+ ├── demo.html # Demo page
136
+ └── package.json
137
+ ```
138
+
139
+ ### Build Commands
140
+
141
+ ```bash
142
+ # Development mode (watch for changes)
143
+ npm run dev
144
+
145
+ # Production build
146
+ npm run build
147
+ ```
148
+
149
+ ## Browser Support
150
+
151
+ - Chrome (latest)
152
+ - Firefox (latest)
153
+ - Safari (latest)
154
+ - Edge (latest)
155
+
156
+ ## License
157
+
158
+ MIT
159
+
160
+ ## Contributing
161
+
162
+ Contributions are welcome! Please feel free to submit a Pull Request.