quick-bug-reporter-react 1.0.2 → 1.0.6
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/index.cjs +33 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +33 -26
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -970,24 +970,21 @@ var LinearIntegration = class {
|
|
|
970
970
|
return this.submitViaProxy(payload, onProgress);
|
|
971
971
|
}
|
|
972
972
|
const progress = onProgress ?? noop;
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
let recordingUrl = null;
|
|
979
|
-
if (payload.videoBlob) {
|
|
980
|
-
progress("Uploading recording\u2026");
|
|
981
|
-
recordingUrl = await this.uploadAsset(payload.videoBlob, "bug-recording.webm", "video/webm");
|
|
982
|
-
}
|
|
973
|
+
progress("Uploading media\u2026");
|
|
974
|
+
const [screenshotUrl, recordingUrl] = await Promise.all([
|
|
975
|
+
payload.screenshotBlob ? this.uploadAsset(payload.screenshotBlob, "bug-screenshot.png", "image/png") : Promise.resolve(null),
|
|
976
|
+
payload.videoBlob ? this.uploadAsset(payload.videoBlob, "bug-recording.webm", "video/webm") : Promise.resolve(null)
|
|
977
|
+
]);
|
|
983
978
|
progress("Creating Linear issue\u2026");
|
|
984
979
|
const description = buildCleanDescription(payload, { screenshotUrl, recordingUrl });
|
|
985
980
|
const issue = await this.createIssue(payload.title, description);
|
|
986
981
|
progress("Attaching logs\u2026");
|
|
987
982
|
const logsComment = "### Network Logs\n```text\n" + formatNetworkLogs(payload.networkLogs) + "\n```";
|
|
988
|
-
await this.addComment(issue.id, logsComment);
|
|
989
983
|
const metadataComment = "### Client Metadata\n```json\n" + JSON.stringify(payload.metadata, null, 2) + "\n```";
|
|
990
|
-
await
|
|
984
|
+
await Promise.all([
|
|
985
|
+
this.addComment(issue.id, logsComment),
|
|
986
|
+
this.addComment(issue.id, metadataComment)
|
|
987
|
+
]);
|
|
991
988
|
progress("Done!");
|
|
992
989
|
return {
|
|
993
990
|
provider: this.provider,
|
|
@@ -1310,19 +1307,19 @@ var JiraIntegration = class {
|
|
|
1310
1307
|
const progress = onProgress ?? noop2;
|
|
1311
1308
|
progress("Creating Jira issue\u2026");
|
|
1312
1309
|
const issue = await this.createIssue(payload);
|
|
1310
|
+
progress("Uploading attachments\u2026");
|
|
1311
|
+
const uploads = [];
|
|
1313
1312
|
if (payload.screenshotBlob) {
|
|
1314
|
-
|
|
1315
|
-
await this.uploadAttachment(issue.key, payload.screenshotBlob, "bug-screenshot.png", "image/png");
|
|
1313
|
+
uploads.push(this.uploadAttachment(issue.key, payload.screenshotBlob, "bug-screenshot.png", "image/png"));
|
|
1316
1314
|
}
|
|
1317
1315
|
if (payload.videoBlob) {
|
|
1318
|
-
|
|
1319
|
-
await this.uploadAttachment(issue.key, payload.videoBlob, "bug-recording.webm", "video/webm");
|
|
1316
|
+
uploads.push(this.uploadAttachment(issue.key, payload.videoBlob, "bug-recording.webm", "video/webm"));
|
|
1320
1317
|
}
|
|
1321
|
-
progress("Attaching logs\u2026");
|
|
1322
1318
|
const logsBlob = new Blob([formatNetworkLogs(payload.networkLogs)], { type: "text/plain" });
|
|
1323
|
-
|
|
1319
|
+
uploads.push(this.uploadAttachment(issue.key, logsBlob, "network-logs.txt", "text/plain"));
|
|
1324
1320
|
const metadataBlob = new Blob([JSON.stringify(payload.metadata, null, 2)], { type: "application/json" });
|
|
1325
|
-
|
|
1321
|
+
uploads.push(this.uploadAttachment(issue.key, metadataBlob, "client-metadata.json", "application/json"));
|
|
1322
|
+
await Promise.all(uploads);
|
|
1326
1323
|
progress("Done!");
|
|
1327
1324
|
return {
|
|
1328
1325
|
provider: this.provider,
|
|
@@ -2079,15 +2076,15 @@ function cn(...inputs) {
|
|
|
2079
2076
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
2080
2077
|
}
|
|
2081
2078
|
var buttonVariants = classVarianceAuthority.cva(
|
|
2082
|
-
"focus-visible:border-indigo-500 focus-visible:ring-indigo-500/50 aria-invalid:ring-red-500/20
|
|
2079
|
+
"focus-visible:border-indigo-500 focus-visible:ring-indigo-500/50 aria-invalid:ring-red-500/20 aria-invalid:border-red-500 rounded-4xl border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
|
|
2083
2080
|
{
|
|
2084
2081
|
variants: {
|
|
2085
2082
|
variant: {
|
|
2086
2083
|
default: "bg-gray-900 text-white hover:bg-gray-800",
|
|
2087
2084
|
outline: "border-gray-300 bg-gray-100/30 hover:bg-gray-200/50 hover:text-gray-900 aria-expanded:bg-gray-100 aria-expanded:text-gray-900",
|
|
2088
2085
|
secondary: "bg-gray-100 text-gray-900 hover:bg-gray-200 aria-expanded:bg-gray-100 aria-expanded:text-gray-900",
|
|
2089
|
-
ghost: "hover:bg-gray-100 hover:text-gray-900
|
|
2090
|
-
destructive: "bg-red-500/10 hover:bg-red-500/20 focus-visible:ring-red-500/20
|
|
2086
|
+
ghost: "text-gray-700 hover:bg-gray-100 hover:text-gray-900 aria-expanded:bg-gray-100 aria-expanded:text-gray-900",
|
|
2087
|
+
destructive: "bg-red-500/10 hover:bg-red-500/20 focus-visible:ring-red-500/20 text-red-600 focus-visible:border-red-500/40",
|
|
2091
2088
|
link: "text-gray-900 underline-offset-4 hover:underline"
|
|
2092
2089
|
},
|
|
2093
2090
|
size: {
|
|
@@ -2192,7 +2189,8 @@ function FloatingBugButton() {
|
|
|
2192
2189
|
"div",
|
|
2193
2190
|
{
|
|
2194
2191
|
ref: containerRef,
|
|
2195
|
-
|
|
2192
|
+
style: { position: "fixed", bottom: "1rem", right: "1rem", zIndex: 1100 },
|
|
2193
|
+
className: "flex flex-col items-end",
|
|
2196
2194
|
"data-bug-reporter-ui": "true",
|
|
2197
2195
|
children: isRecording ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
2198
2196
|
/* @__PURE__ */ jsxRuntime.jsxs(Button, { className: "h-11 gap-2 rounded-full px-4 shadow-lg shadow-black/20", type: "button", variant: "destructive", onClick: () => void handleStopRecording(), children: [
|
|
@@ -2315,6 +2313,7 @@ function DialogOverlay({
|
|
|
2315
2313
|
radixUi.Dialog.Overlay,
|
|
2316
2314
|
{
|
|
2317
2315
|
"data-slot": "dialog-overlay",
|
|
2316
|
+
"data-bug-reporter-ui": "true",
|
|
2318
2317
|
className: cn("data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 bg-black/60 duration-100 supports-backdrop-filter:backdrop-blur-sm fixed inset-0 isolate z-50", className),
|
|
2319
2318
|
...props
|
|
2320
2319
|
}
|
|
@@ -2332,8 +2331,16 @@ function DialogContent({
|
|
|
2332
2331
|
radixUi.Dialog.Content,
|
|
2333
2332
|
{
|
|
2334
2333
|
"data-slot": "dialog-content",
|
|
2334
|
+
"data-bug-reporter-ui": "true",
|
|
2335
|
+
style: {
|
|
2336
|
+
position: "fixed",
|
|
2337
|
+
top: "50%",
|
|
2338
|
+
left: "50%",
|
|
2339
|
+
transform: "translate(-50%, -50%)",
|
|
2340
|
+
translate: "none"
|
|
2341
|
+
},
|
|
2335
2342
|
className: cn(
|
|
2336
|
-
"bg-white text-gray-900 data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-gray-900/5 grid max-w-[calc(100%-2rem)] gap-6 rounded-4xl p-6 text-sm ring-1 shadow-xl duration-100 sm:max-w-md
|
|
2343
|
+
"bg-white text-gray-900 data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 ring-gray-900/5 grid max-w-[calc(100%-2rem)] gap-6 rounded-4xl p-6 text-sm ring-1 shadow-xl duration-100 sm:max-w-md z-50 w-full outline-none",
|
|
2337
2344
|
className
|
|
2338
2345
|
),
|
|
2339
2346
|
...props,
|
|
@@ -2413,7 +2420,7 @@ function Input({ className, type, ...props }) {
|
|
|
2413
2420
|
type,
|
|
2414
2421
|
"data-slot": "input",
|
|
2415
2422
|
className: cn(
|
|
2416
|
-
"bg-gray-100/30 border-gray-300 focus-visible:border-indigo-500 focus-visible:ring-indigo-500/50 aria-invalid:ring-red-500/20
|
|
2423
|
+
"bg-gray-100/30 border-gray-300 focus-visible:border-indigo-500 focus-visible:ring-indigo-500/50 aria-invalid:ring-red-500/20 aria-invalid:border-red-500 h-9 rounded-4xl border px-3 py-1 text-base text-gray-900 transition-colors file:h-7 file:text-sm file:font-medium focus-visible:ring-[3px] aria-invalid:ring-[3px] md:text-sm file:text-gray-900 placeholder:text-gray-400 w-full min-w-0 outline-none file:inline-flex file:border-0 file:bg-transparent disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
2417
2424
|
className
|
|
2418
2425
|
),
|
|
2419
2426
|
...props
|
|
@@ -2426,7 +2433,7 @@ function Textarea({ className, ...props }) {
|
|
|
2426
2433
|
{
|
|
2427
2434
|
"data-slot": "textarea",
|
|
2428
2435
|
className: cn(
|
|
2429
|
-
"border-gray-300 bg-gray-100/30 focus-visible:border-indigo-500 focus-visible:ring-indigo-500/50 aria-invalid:ring-red-500/20
|
|
2436
|
+
"border-gray-300 bg-gray-100/30 focus-visible:border-indigo-500 focus-visible:ring-indigo-500/50 aria-invalid:ring-red-500/20 aria-invalid:border-red-500 resize-none rounded-xl border px-3 py-3 text-base text-gray-900 transition-colors focus-visible:ring-[3px] aria-invalid:ring-[3px] md:text-sm placeholder:text-gray-400 flex field-sizing-content min-h-16 w-full outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
2430
2437
|
className
|
|
2431
2438
|
),
|
|
2432
2439
|
...props
|