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.js
CHANGED
|
@@ -964,24 +964,21 @@ var LinearIntegration = class {
|
|
|
964
964
|
return this.submitViaProxy(payload, onProgress);
|
|
965
965
|
}
|
|
966
966
|
const progress = onProgress ?? noop;
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
let recordingUrl = null;
|
|
973
|
-
if (payload.videoBlob) {
|
|
974
|
-
progress("Uploading recording\u2026");
|
|
975
|
-
recordingUrl = await this.uploadAsset(payload.videoBlob, "bug-recording.webm", "video/webm");
|
|
976
|
-
}
|
|
967
|
+
progress("Uploading media\u2026");
|
|
968
|
+
const [screenshotUrl, recordingUrl] = await Promise.all([
|
|
969
|
+
payload.screenshotBlob ? this.uploadAsset(payload.screenshotBlob, "bug-screenshot.png", "image/png") : Promise.resolve(null),
|
|
970
|
+
payload.videoBlob ? this.uploadAsset(payload.videoBlob, "bug-recording.webm", "video/webm") : Promise.resolve(null)
|
|
971
|
+
]);
|
|
977
972
|
progress("Creating Linear issue\u2026");
|
|
978
973
|
const description = buildCleanDescription(payload, { screenshotUrl, recordingUrl });
|
|
979
974
|
const issue = await this.createIssue(payload.title, description);
|
|
980
975
|
progress("Attaching logs\u2026");
|
|
981
976
|
const logsComment = "### Network Logs\n```text\n" + formatNetworkLogs(payload.networkLogs) + "\n```";
|
|
982
|
-
await this.addComment(issue.id, logsComment);
|
|
983
977
|
const metadataComment = "### Client Metadata\n```json\n" + JSON.stringify(payload.metadata, null, 2) + "\n```";
|
|
984
|
-
await
|
|
978
|
+
await Promise.all([
|
|
979
|
+
this.addComment(issue.id, logsComment),
|
|
980
|
+
this.addComment(issue.id, metadataComment)
|
|
981
|
+
]);
|
|
985
982
|
progress("Done!");
|
|
986
983
|
return {
|
|
987
984
|
provider: this.provider,
|
|
@@ -1304,19 +1301,19 @@ var JiraIntegration = class {
|
|
|
1304
1301
|
const progress = onProgress ?? noop2;
|
|
1305
1302
|
progress("Creating Jira issue\u2026");
|
|
1306
1303
|
const issue = await this.createIssue(payload);
|
|
1304
|
+
progress("Uploading attachments\u2026");
|
|
1305
|
+
const uploads = [];
|
|
1307
1306
|
if (payload.screenshotBlob) {
|
|
1308
|
-
|
|
1309
|
-
await this.uploadAttachment(issue.key, payload.screenshotBlob, "bug-screenshot.png", "image/png");
|
|
1307
|
+
uploads.push(this.uploadAttachment(issue.key, payload.screenshotBlob, "bug-screenshot.png", "image/png"));
|
|
1310
1308
|
}
|
|
1311
1309
|
if (payload.videoBlob) {
|
|
1312
|
-
|
|
1313
|
-
await this.uploadAttachment(issue.key, payload.videoBlob, "bug-recording.webm", "video/webm");
|
|
1310
|
+
uploads.push(this.uploadAttachment(issue.key, payload.videoBlob, "bug-recording.webm", "video/webm"));
|
|
1314
1311
|
}
|
|
1315
|
-
progress("Attaching logs\u2026");
|
|
1316
1312
|
const logsBlob = new Blob([formatNetworkLogs(payload.networkLogs)], { type: "text/plain" });
|
|
1317
|
-
|
|
1313
|
+
uploads.push(this.uploadAttachment(issue.key, logsBlob, "network-logs.txt", "text/plain"));
|
|
1318
1314
|
const metadataBlob = new Blob([JSON.stringify(payload.metadata, null, 2)], { type: "application/json" });
|
|
1319
|
-
|
|
1315
|
+
uploads.push(this.uploadAttachment(issue.key, metadataBlob, "client-metadata.json", "application/json"));
|
|
1316
|
+
await Promise.all(uploads);
|
|
1320
1317
|
progress("Done!");
|
|
1321
1318
|
return {
|
|
1322
1319
|
provider: this.provider,
|
|
@@ -2073,15 +2070,15 @@ function cn(...inputs) {
|
|
|
2073
2070
|
return twMerge(clsx(inputs));
|
|
2074
2071
|
}
|
|
2075
2072
|
var buttonVariants = cva(
|
|
2076
|
-
"focus-visible:border-indigo-500 focus-visible:ring-indigo-500/50 aria-invalid:ring-red-500/20
|
|
2073
|
+
"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",
|
|
2077
2074
|
{
|
|
2078
2075
|
variants: {
|
|
2079
2076
|
variant: {
|
|
2080
2077
|
default: "bg-gray-900 text-white hover:bg-gray-800",
|
|
2081
2078
|
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",
|
|
2082
2079
|
secondary: "bg-gray-100 text-gray-900 hover:bg-gray-200 aria-expanded:bg-gray-100 aria-expanded:text-gray-900",
|
|
2083
|
-
ghost: "hover:bg-gray-100 hover:text-gray-900
|
|
2084
|
-
destructive: "bg-red-500/10 hover:bg-red-500/20 focus-visible:ring-red-500/20
|
|
2080
|
+
ghost: "text-gray-700 hover:bg-gray-100 hover:text-gray-900 aria-expanded:bg-gray-100 aria-expanded:text-gray-900",
|
|
2081
|
+
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",
|
|
2085
2082
|
link: "text-gray-900 underline-offset-4 hover:underline"
|
|
2086
2083
|
},
|
|
2087
2084
|
size: {
|
|
@@ -2186,7 +2183,8 @@ function FloatingBugButton() {
|
|
|
2186
2183
|
"div",
|
|
2187
2184
|
{
|
|
2188
2185
|
ref: containerRef,
|
|
2189
|
-
|
|
2186
|
+
style: { position: "fixed", bottom: "1rem", right: "1rem", zIndex: 1100 },
|
|
2187
|
+
className: "flex flex-col items-end",
|
|
2190
2188
|
"data-bug-reporter-ui": "true",
|
|
2191
2189
|
children: isRecording ? /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
2192
2190
|
/* @__PURE__ */ jsxs(Button, { className: "h-11 gap-2 rounded-full px-4 shadow-lg shadow-black/20", type: "button", variant: "destructive", onClick: () => void handleStopRecording(), children: [
|
|
@@ -2309,6 +2307,7 @@ function DialogOverlay({
|
|
|
2309
2307
|
Dialog$1.Overlay,
|
|
2310
2308
|
{
|
|
2311
2309
|
"data-slot": "dialog-overlay",
|
|
2310
|
+
"data-bug-reporter-ui": "true",
|
|
2312
2311
|
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),
|
|
2313
2312
|
...props
|
|
2314
2313
|
}
|
|
@@ -2326,8 +2325,16 @@ function DialogContent({
|
|
|
2326
2325
|
Dialog$1.Content,
|
|
2327
2326
|
{
|
|
2328
2327
|
"data-slot": "dialog-content",
|
|
2328
|
+
"data-bug-reporter-ui": "true",
|
|
2329
|
+
style: {
|
|
2330
|
+
position: "fixed",
|
|
2331
|
+
top: "50%",
|
|
2332
|
+
left: "50%",
|
|
2333
|
+
transform: "translate(-50%, -50%)",
|
|
2334
|
+
translate: "none"
|
|
2335
|
+
},
|
|
2329
2336
|
className: cn(
|
|
2330
|
-
"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
|
|
2337
|
+
"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",
|
|
2331
2338
|
className
|
|
2332
2339
|
),
|
|
2333
2340
|
...props,
|
|
@@ -2407,7 +2414,7 @@ function Input({ className, type, ...props }) {
|
|
|
2407
2414
|
type,
|
|
2408
2415
|
"data-slot": "input",
|
|
2409
2416
|
className: cn(
|
|
2410
|
-
"bg-gray-100/30 border-gray-300 focus-visible:border-indigo-500 focus-visible:ring-indigo-500/50 aria-invalid:ring-red-500/20
|
|
2417
|
+
"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",
|
|
2411
2418
|
className
|
|
2412
2419
|
),
|
|
2413
2420
|
...props
|
|
@@ -2420,7 +2427,7 @@ function Textarea({ className, ...props }) {
|
|
|
2420
2427
|
{
|
|
2421
2428
|
"data-slot": "textarea",
|
|
2422
2429
|
className: cn(
|
|
2423
|
-
"border-gray-300 bg-gray-100/30 focus-visible:border-indigo-500 focus-visible:ring-indigo-500/50 aria-invalid:ring-red-500/20
|
|
2430
|
+
"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",
|
|
2424
2431
|
className
|
|
2425
2432
|
),
|
|
2426
2433
|
...props
|