@rithuu/bugblitz-sdk 1.0.0 → 1.0.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/dist/bugblitz.cjs.js +67 -16
- package/dist/bugblitz.esm.js +67 -16
- package/dist/bugblitz.js +67 -16
- package/package.json +1 -1
package/dist/bugblitz.cjs.js
CHANGED
|
@@ -44,10 +44,26 @@ const BugBlitz = {
|
|
|
44
44
|
},
|
|
45
45
|
|
|
46
46
|
|
|
47
|
+
loadGoogleFont() {
|
|
48
|
+
if (typeof document === "undefined") return;
|
|
49
|
+
if (document.getElementById("bugblitz-google-font")) return;
|
|
50
|
+
|
|
51
|
+
const style = document.createElement("style");
|
|
52
|
+
style.id = "bugblitz-google-font";
|
|
53
|
+
style.textContent = `
|
|
54
|
+
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');
|
|
55
|
+
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');
|
|
56
|
+
`;
|
|
57
|
+
|
|
58
|
+
document.head.appendChild(style);
|
|
59
|
+
},
|
|
60
|
+
|
|
47
61
|
openPopup() {
|
|
48
62
|
// Prevent multiple popups
|
|
49
63
|
if (document.getElementById("bugblitz-popup")) return;
|
|
50
64
|
|
|
65
|
+
this.loadGoogleFont();
|
|
66
|
+
|
|
51
67
|
const browserInfo = this.collectBrowserInfo();
|
|
52
68
|
console.log("BugBlitz: browser info collected", browserInfo);
|
|
53
69
|
|
|
@@ -69,52 +85,85 @@ const BugBlitz = {
|
|
|
69
85
|
position: fixed;
|
|
70
86
|
top: 50%; left: 50%;
|
|
71
87
|
transform: translate(-50%, -50%);
|
|
72
|
-
background:
|
|
88
|
+
background: #10121B;
|
|
73
89
|
padding: 24px;
|
|
74
90
|
border-radius: 12px;
|
|
75
91
|
z-index: 999999;
|
|
76
|
-
width:
|
|
77
|
-
font-family: sans-serif;
|
|
92
|
+
width: 340px;
|
|
93
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
94
|
+
color: #10121B;
|
|
78
95
|
box-shadow: 0 4px 24px rgba(0,0,0,0.2);
|
|
79
96
|
`;
|
|
80
97
|
|
|
98
|
+
const sdkLabel = document.createElement("div");
|
|
99
|
+
sdkLabel.innerText = "BUGBLITZ SDK";
|
|
100
|
+
sdkLabel.style.cssText = `
|
|
101
|
+
margin: 0 0 6px 0;
|
|
102
|
+
font-size: 10px;
|
|
103
|
+
color: #C4C0FF;
|
|
104
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
105
|
+
font-weight: 400;
|
|
106
|
+
letter-spacing: 0.08em;
|
|
107
|
+
text-transform: uppercase;
|
|
108
|
+
`;
|
|
109
|
+
|
|
81
110
|
// Title
|
|
82
111
|
const title = document.createElement("h3");
|
|
83
|
-
title.innerText = "Report a Bug
|
|
112
|
+
title.innerText = "Report a Bug ";
|
|
84
113
|
title.style.cssText = `
|
|
85
114
|
margin: 0 0 16px 0;
|
|
86
|
-
font-size:
|
|
87
|
-
color: #
|
|
115
|
+
font-size: 28px;
|
|
116
|
+
color: #E2E2F0;
|
|
117
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
118
|
+
font-weight: 700;
|
|
119
|
+
`;
|
|
120
|
+
|
|
121
|
+
const descriptionLabel = document.createElement("div");
|
|
122
|
+
descriptionLabel.innerText = "Description";
|
|
123
|
+
descriptionLabel.style.cssText = `
|
|
124
|
+
margin: 0 0 8px 0;
|
|
125
|
+
font-size: 12px;
|
|
126
|
+
color: #E2E2F0;
|
|
127
|
+
font-family: 'JetBrains Mono', monospace;
|
|
128
|
+
font-weight: 400;
|
|
88
129
|
`;
|
|
89
130
|
|
|
90
131
|
// Textarea
|
|
91
132
|
const textarea = document.createElement("textarea");
|
|
92
133
|
textarea.id = "bugblitz-description";
|
|
93
|
-
textarea.placeholder = "
|
|
134
|
+
textarea.placeholder = "Tell us what went Wrong";
|
|
94
135
|
textarea.style.cssText = `
|
|
95
136
|
width: 100%;
|
|
96
|
-
height:
|
|
137
|
+
height: 140px;
|
|
97
138
|
padding: 10px;
|
|
98
|
-
border: 1px solid #
|
|
139
|
+
border: 1px solid #4B4B63;
|
|
99
140
|
border-radius: 8px;
|
|
100
|
-
font-size:
|
|
141
|
+
font-size: 13px;
|
|
101
142
|
resize: none;
|
|
102
143
|
box-sizing: border-box;
|
|
144
|
+
background: #1E1E2A;
|
|
145
|
+
color: #E2E2F0;
|
|
146
|
+
font-family: 'JetBrains Mono', monospace;
|
|
147
|
+
font-weight: 400;
|
|
103
148
|
`;
|
|
104
149
|
|
|
105
150
|
// Submit button
|
|
106
151
|
const submitBtn = document.createElement("button");
|
|
107
|
-
submitBtn.innerText = "
|
|
152
|
+
submitBtn.innerText = "Send Report";
|
|
108
153
|
submitBtn.style.cssText = `
|
|
109
|
-
margin-top:
|
|
154
|
+
margin-top: 16px;
|
|
155
|
+
margin-bottom: 16px;
|
|
110
156
|
width: 100%;
|
|
111
|
-
padding:
|
|
112
|
-
background: #
|
|
113
|
-
color:
|
|
157
|
+
padding: 14px;
|
|
158
|
+
background: #C4C0FF;
|
|
159
|
+
color: #1C0291;
|
|
114
160
|
border: none;
|
|
115
161
|
border-radius: 8px;
|
|
116
162
|
font-size: 14px;
|
|
117
163
|
cursor: pointer;
|
|
164
|
+
font-family: 'JetBrains Mono', monospace;
|
|
165
|
+
font-weight: 500;
|
|
166
|
+
padding-bottom: 20px,
|
|
118
167
|
`;
|
|
119
168
|
|
|
120
169
|
// Close button
|
|
@@ -127,7 +176,7 @@ const BugBlitz = {
|
|
|
127
176
|
border: none;
|
|
128
177
|
font-size: 18px;
|
|
129
178
|
cursor: pointer;
|
|
130
|
-
color: #
|
|
179
|
+
color: #E2E2F0;
|
|
131
180
|
`;
|
|
132
181
|
|
|
133
182
|
// Close logic
|
|
@@ -191,7 +240,9 @@ const BugBlitz = {
|
|
|
191
240
|
// Assemble popup
|
|
192
241
|
popup.style.position = "fixed";
|
|
193
242
|
popup.appendChild(closeBtn);
|
|
243
|
+
popup.appendChild(sdkLabel);
|
|
194
244
|
popup.appendChild(title);
|
|
245
|
+
popup.appendChild(descriptionLabel);
|
|
195
246
|
popup.appendChild(textarea);
|
|
196
247
|
popup.appendChild(submitBtn);
|
|
197
248
|
|
package/dist/bugblitz.esm.js
CHANGED
|
@@ -42,10 +42,26 @@ const BugBlitz = {
|
|
|
42
42
|
},
|
|
43
43
|
|
|
44
44
|
|
|
45
|
+
loadGoogleFont() {
|
|
46
|
+
if (typeof document === "undefined") return;
|
|
47
|
+
if (document.getElementById("bugblitz-google-font")) return;
|
|
48
|
+
|
|
49
|
+
const style = document.createElement("style");
|
|
50
|
+
style.id = "bugblitz-google-font";
|
|
51
|
+
style.textContent = `
|
|
52
|
+
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');
|
|
53
|
+
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');
|
|
54
|
+
`;
|
|
55
|
+
|
|
56
|
+
document.head.appendChild(style);
|
|
57
|
+
},
|
|
58
|
+
|
|
45
59
|
openPopup() {
|
|
46
60
|
// Prevent multiple popups
|
|
47
61
|
if (document.getElementById("bugblitz-popup")) return;
|
|
48
62
|
|
|
63
|
+
this.loadGoogleFont();
|
|
64
|
+
|
|
49
65
|
const browserInfo = this.collectBrowserInfo();
|
|
50
66
|
console.log("BugBlitz: browser info collected", browserInfo);
|
|
51
67
|
|
|
@@ -67,52 +83,85 @@ const BugBlitz = {
|
|
|
67
83
|
position: fixed;
|
|
68
84
|
top: 50%; left: 50%;
|
|
69
85
|
transform: translate(-50%, -50%);
|
|
70
|
-
background:
|
|
86
|
+
background: #10121B;
|
|
71
87
|
padding: 24px;
|
|
72
88
|
border-radius: 12px;
|
|
73
89
|
z-index: 999999;
|
|
74
|
-
width:
|
|
75
|
-
font-family: sans-serif;
|
|
90
|
+
width: 340px;
|
|
91
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
92
|
+
color: #10121B;
|
|
76
93
|
box-shadow: 0 4px 24px rgba(0,0,0,0.2);
|
|
77
94
|
`;
|
|
78
95
|
|
|
96
|
+
const sdkLabel = document.createElement("div");
|
|
97
|
+
sdkLabel.innerText = "BUGBLITZ SDK";
|
|
98
|
+
sdkLabel.style.cssText = `
|
|
99
|
+
margin: 0 0 6px 0;
|
|
100
|
+
font-size: 10px;
|
|
101
|
+
color: #C4C0FF;
|
|
102
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
103
|
+
font-weight: 400;
|
|
104
|
+
letter-spacing: 0.08em;
|
|
105
|
+
text-transform: uppercase;
|
|
106
|
+
`;
|
|
107
|
+
|
|
79
108
|
// Title
|
|
80
109
|
const title = document.createElement("h3");
|
|
81
|
-
title.innerText = "Report a Bug
|
|
110
|
+
title.innerText = "Report a Bug ";
|
|
82
111
|
title.style.cssText = `
|
|
83
112
|
margin: 0 0 16px 0;
|
|
84
|
-
font-size:
|
|
85
|
-
color: #
|
|
113
|
+
font-size: 28px;
|
|
114
|
+
color: #E2E2F0;
|
|
115
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
116
|
+
font-weight: 700;
|
|
117
|
+
`;
|
|
118
|
+
|
|
119
|
+
const descriptionLabel = document.createElement("div");
|
|
120
|
+
descriptionLabel.innerText = "Description";
|
|
121
|
+
descriptionLabel.style.cssText = `
|
|
122
|
+
margin: 0 0 8px 0;
|
|
123
|
+
font-size: 12px;
|
|
124
|
+
color: #E2E2F0;
|
|
125
|
+
font-family: 'JetBrains Mono', monospace;
|
|
126
|
+
font-weight: 400;
|
|
86
127
|
`;
|
|
87
128
|
|
|
88
129
|
// Textarea
|
|
89
130
|
const textarea = document.createElement("textarea");
|
|
90
131
|
textarea.id = "bugblitz-description";
|
|
91
|
-
textarea.placeholder = "
|
|
132
|
+
textarea.placeholder = "Tell us what went Wrong";
|
|
92
133
|
textarea.style.cssText = `
|
|
93
134
|
width: 100%;
|
|
94
|
-
height:
|
|
135
|
+
height: 140px;
|
|
95
136
|
padding: 10px;
|
|
96
|
-
border: 1px solid #
|
|
137
|
+
border: 1px solid #4B4B63;
|
|
97
138
|
border-radius: 8px;
|
|
98
|
-
font-size:
|
|
139
|
+
font-size: 13px;
|
|
99
140
|
resize: none;
|
|
100
141
|
box-sizing: border-box;
|
|
142
|
+
background: #1E1E2A;
|
|
143
|
+
color: #E2E2F0;
|
|
144
|
+
font-family: 'JetBrains Mono', monospace;
|
|
145
|
+
font-weight: 400;
|
|
101
146
|
`;
|
|
102
147
|
|
|
103
148
|
// Submit button
|
|
104
149
|
const submitBtn = document.createElement("button");
|
|
105
|
-
submitBtn.innerText = "
|
|
150
|
+
submitBtn.innerText = "Send Report";
|
|
106
151
|
submitBtn.style.cssText = `
|
|
107
|
-
margin-top:
|
|
152
|
+
margin-top: 16px;
|
|
153
|
+
margin-bottom: 16px;
|
|
108
154
|
width: 100%;
|
|
109
|
-
padding:
|
|
110
|
-
background: #
|
|
111
|
-
color:
|
|
155
|
+
padding: 14px;
|
|
156
|
+
background: #C4C0FF;
|
|
157
|
+
color: #1C0291;
|
|
112
158
|
border: none;
|
|
113
159
|
border-radius: 8px;
|
|
114
160
|
font-size: 14px;
|
|
115
161
|
cursor: pointer;
|
|
162
|
+
font-family: 'JetBrains Mono', monospace;
|
|
163
|
+
font-weight: 500;
|
|
164
|
+
padding-bottom: 20px,
|
|
116
165
|
`;
|
|
117
166
|
|
|
118
167
|
// Close button
|
|
@@ -125,7 +174,7 @@ const BugBlitz = {
|
|
|
125
174
|
border: none;
|
|
126
175
|
font-size: 18px;
|
|
127
176
|
cursor: pointer;
|
|
128
|
-
color: #
|
|
177
|
+
color: #E2E2F0;
|
|
129
178
|
`;
|
|
130
179
|
|
|
131
180
|
// Close logic
|
|
@@ -189,7 +238,9 @@ const BugBlitz = {
|
|
|
189
238
|
// Assemble popup
|
|
190
239
|
popup.style.position = "fixed";
|
|
191
240
|
popup.appendChild(closeBtn);
|
|
241
|
+
popup.appendChild(sdkLabel);
|
|
192
242
|
popup.appendChild(title);
|
|
243
|
+
popup.appendChild(descriptionLabel);
|
|
193
244
|
popup.appendChild(textarea);
|
|
194
245
|
popup.appendChild(submitBtn);
|
|
195
246
|
|
package/dist/bugblitz.js
CHANGED
|
@@ -45,10 +45,26 @@ var BugBlitz = (function () {
|
|
|
45
45
|
},
|
|
46
46
|
|
|
47
47
|
|
|
48
|
+
loadGoogleFont() {
|
|
49
|
+
if (typeof document === "undefined") return;
|
|
50
|
+
if (document.getElementById("bugblitz-google-font")) return;
|
|
51
|
+
|
|
52
|
+
const style = document.createElement("style");
|
|
53
|
+
style.id = "bugblitz-google-font";
|
|
54
|
+
style.textContent = `
|
|
55
|
+
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300..700&display=swap');
|
|
56
|
+
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700&display=swap');
|
|
57
|
+
`;
|
|
58
|
+
|
|
59
|
+
document.head.appendChild(style);
|
|
60
|
+
},
|
|
61
|
+
|
|
48
62
|
openPopup() {
|
|
49
63
|
// Prevent multiple popups
|
|
50
64
|
if (document.getElementById("bugblitz-popup")) return;
|
|
51
65
|
|
|
66
|
+
this.loadGoogleFont();
|
|
67
|
+
|
|
52
68
|
const browserInfo = this.collectBrowserInfo();
|
|
53
69
|
console.log("BugBlitz: browser info collected", browserInfo);
|
|
54
70
|
|
|
@@ -70,52 +86,85 @@ var BugBlitz = (function () {
|
|
|
70
86
|
position: fixed;
|
|
71
87
|
top: 50%; left: 50%;
|
|
72
88
|
transform: translate(-50%, -50%);
|
|
73
|
-
background:
|
|
89
|
+
background: #10121B;
|
|
74
90
|
padding: 24px;
|
|
75
91
|
border-radius: 12px;
|
|
76
92
|
z-index: 999999;
|
|
77
|
-
width:
|
|
78
|
-
font-family: sans-serif;
|
|
93
|
+
width: 340px;
|
|
94
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
95
|
+
color: #10121B;
|
|
79
96
|
box-shadow: 0 4px 24px rgba(0,0,0,0.2);
|
|
80
97
|
`;
|
|
81
98
|
|
|
99
|
+
const sdkLabel = document.createElement("div");
|
|
100
|
+
sdkLabel.innerText = "BUGBLITZ SDK";
|
|
101
|
+
sdkLabel.style.cssText = `
|
|
102
|
+
margin: 0 0 6px 0;
|
|
103
|
+
font-size: 10px;
|
|
104
|
+
color: #C4C0FF;
|
|
105
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
106
|
+
font-weight: 400;
|
|
107
|
+
letter-spacing: 0.08em;
|
|
108
|
+
text-transform: uppercase;
|
|
109
|
+
`;
|
|
110
|
+
|
|
82
111
|
// Title
|
|
83
112
|
const title = document.createElement("h3");
|
|
84
|
-
title.innerText = "Report a Bug
|
|
113
|
+
title.innerText = "Report a Bug ";
|
|
85
114
|
title.style.cssText = `
|
|
86
115
|
margin: 0 0 16px 0;
|
|
87
|
-
font-size:
|
|
88
|
-
color: #
|
|
116
|
+
font-size: 28px;
|
|
117
|
+
color: #E2E2F0;
|
|
118
|
+
font-family: 'Space Grotesk', sans-serif;
|
|
119
|
+
font-weight: 700;
|
|
120
|
+
`;
|
|
121
|
+
|
|
122
|
+
const descriptionLabel = document.createElement("div");
|
|
123
|
+
descriptionLabel.innerText = "Description";
|
|
124
|
+
descriptionLabel.style.cssText = `
|
|
125
|
+
margin: 0 0 8px 0;
|
|
126
|
+
font-size: 12px;
|
|
127
|
+
color: #E2E2F0;
|
|
128
|
+
font-family: 'JetBrains Mono', monospace;
|
|
129
|
+
font-weight: 400;
|
|
89
130
|
`;
|
|
90
131
|
|
|
91
132
|
// Textarea
|
|
92
133
|
const textarea = document.createElement("textarea");
|
|
93
134
|
textarea.id = "bugblitz-description";
|
|
94
|
-
textarea.placeholder = "
|
|
135
|
+
textarea.placeholder = "Tell us what went Wrong";
|
|
95
136
|
textarea.style.cssText = `
|
|
96
137
|
width: 100%;
|
|
97
|
-
height:
|
|
138
|
+
height: 140px;
|
|
98
139
|
padding: 10px;
|
|
99
|
-
border: 1px solid #
|
|
140
|
+
border: 1px solid #4B4B63;
|
|
100
141
|
border-radius: 8px;
|
|
101
|
-
font-size:
|
|
142
|
+
font-size: 13px;
|
|
102
143
|
resize: none;
|
|
103
144
|
box-sizing: border-box;
|
|
145
|
+
background: #1E1E2A;
|
|
146
|
+
color: #E2E2F0;
|
|
147
|
+
font-family: 'JetBrains Mono', monospace;
|
|
148
|
+
font-weight: 400;
|
|
104
149
|
`;
|
|
105
150
|
|
|
106
151
|
// Submit button
|
|
107
152
|
const submitBtn = document.createElement("button");
|
|
108
|
-
submitBtn.innerText = "
|
|
153
|
+
submitBtn.innerText = "Send Report";
|
|
109
154
|
submitBtn.style.cssText = `
|
|
110
|
-
margin-top:
|
|
155
|
+
margin-top: 16px;
|
|
156
|
+
margin-bottom: 16px;
|
|
111
157
|
width: 100%;
|
|
112
|
-
padding:
|
|
113
|
-
background: #
|
|
114
|
-
color:
|
|
158
|
+
padding: 14px;
|
|
159
|
+
background: #C4C0FF;
|
|
160
|
+
color: #1C0291;
|
|
115
161
|
border: none;
|
|
116
162
|
border-radius: 8px;
|
|
117
163
|
font-size: 14px;
|
|
118
164
|
cursor: pointer;
|
|
165
|
+
font-family: 'JetBrains Mono', monospace;
|
|
166
|
+
font-weight: 500;
|
|
167
|
+
padding-bottom: 20px,
|
|
119
168
|
`;
|
|
120
169
|
|
|
121
170
|
// Close button
|
|
@@ -128,7 +177,7 @@ var BugBlitz = (function () {
|
|
|
128
177
|
border: none;
|
|
129
178
|
font-size: 18px;
|
|
130
179
|
cursor: pointer;
|
|
131
|
-
color: #
|
|
180
|
+
color: #E2E2F0;
|
|
132
181
|
`;
|
|
133
182
|
|
|
134
183
|
// Close logic
|
|
@@ -192,7 +241,9 @@ var BugBlitz = (function () {
|
|
|
192
241
|
// Assemble popup
|
|
193
242
|
popup.style.position = "fixed";
|
|
194
243
|
popup.appendChild(closeBtn);
|
|
244
|
+
popup.appendChild(sdkLabel);
|
|
195
245
|
popup.appendChild(title);
|
|
246
|
+
popup.appendChild(descriptionLabel);
|
|
196
247
|
popup.appendChild(textarea);
|
|
197
248
|
popup.appendChild(submitBtn);
|
|
198
249
|
|