glitchgrab 1.45.0 → 1.46.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/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { f as GlitchgrabProviderProps, U as UseGlitchgrabReturn, R as ReportButtonProps, F as FeedbackButtonProps, g as GlitchgrabSession, C as CaptureErrorOptions, e as GlitchgrabFeedback, a as BreadcrumbType, B as Breadcrumb, b as CapturedContext, D as DeviceInfo, c as FeedbackPayload, d as FeedbackResult, h as ReportPayload, i as ReportResult } from './types-Lldp5noh.mjs';
3
- export { G as GlitchgrabConfig, j as ReportSeverity, k as ReportType, l as RuntimeInfo } from './types-Lldp5noh.mjs';
2
+ import { f as GlitchgrabProviderProps, U as UseGlitchgrabReturn, R as ReportButtonProps, F as FeedbackButtonProps, g as GlitchgrabSession, C as CaptureErrorOptions, e as GlitchgrabFeedback, a as BreadcrumbType, B as Breadcrumb, b as CapturedContext, D as DeviceInfo, c as FeedbackPayload, d as FeedbackResult, h as ReportPayload, i as ReportResult } from './types-DcDF1mXc.mjs';
3
+ export { G as GlitchgrabConfig, j as ReportSeverity, k as ReportType, l as RuntimeInfo } from './types-DcDF1mXc.mjs';
4
4
  import * as React from 'react';
5
5
  import { ReactNode } from 'react';
6
6
 
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { f as GlitchgrabProviderProps, U as UseGlitchgrabReturn, R as ReportButtonProps, F as FeedbackButtonProps, g as GlitchgrabSession, C as CaptureErrorOptions, e as GlitchgrabFeedback, a as BreadcrumbType, B as Breadcrumb, b as CapturedContext, D as DeviceInfo, c as FeedbackPayload, d as FeedbackResult, h as ReportPayload, i as ReportResult } from './types-Lldp5noh.js';
3
- export { G as GlitchgrabConfig, j as ReportSeverity, k as ReportType, l as RuntimeInfo } from './types-Lldp5noh.js';
2
+ import { f as GlitchgrabProviderProps, U as UseGlitchgrabReturn, R as ReportButtonProps, F as FeedbackButtonProps, g as GlitchgrabSession, C as CaptureErrorOptions, e as GlitchgrabFeedback, a as BreadcrumbType, B as Breadcrumb, b as CapturedContext, D as DeviceInfo, c as FeedbackPayload, d as FeedbackResult, h as ReportPayload, i as ReportResult } from './types-DcDF1mXc.js';
3
+ export { G as GlitchgrabConfig, j as ReportSeverity, k as ReportType, l as RuntimeInfo } from './types-DcDF1mXc.js';
4
4
  import * as React from 'react';
5
5
  import { ReactNode } from 'react';
6
6
 
package/dist/index.js CHANGED
@@ -1859,6 +1859,7 @@ function AssistSheet({
1859
1859
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1860
1860
  "div",
1861
1861
  {
1862
+ "data-gg-sheet-header": "",
1862
1863
  style: {
1863
1864
  flexShrink: 0,
1864
1865
  padding: "14px 16px",
@@ -1870,7 +1871,7 @@ function AssistSheet({
1870
1871
  minWidth: 0
1871
1872
  },
1872
1873
  children: [
1873
- /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { minWidth: 0, overflow: "hidden" }, children: [
1874
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)("div", { style: { minWidth: 0 }, children: [
1874
1875
  /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
1875
1876
  "div",
1876
1877
  {
@@ -4021,6 +4022,7 @@ function ReportDialog({
4021
4022
  const [description, setDescription] = (0, import_react.useState)("");
4022
4023
  const [isSubmitting, setIsSubmitting] = (0, import_react.useState)(false);
4023
4024
  const [submitted, setSubmitted] = (0, import_react.useState)(false);
4025
+ const [queuedMessage, setQueuedMessage] = (0, import_react.useState)(null);
4024
4026
  const [screenshots, setScreenshots] = (0, import_react.useState)([]);
4025
4027
  const [pageShot, setPageShot] = (0, import_react.useState)(null);
4026
4028
  const [shotPending, setShotPending] = (0, import_react.useState)(false);
@@ -4626,7 +4628,7 @@ function ReportDialog({
4626
4628
  }
4627
4629
  };
4628
4630
  const handleSubmit = async (opts) => {
4629
- var _a2;
4631
+ var _a2, _b;
4630
4632
  try {
4631
4633
  if (isSubmitting) return;
4632
4634
  if (isRating) {
@@ -4712,6 +4714,8 @@ function ReportDialog({
4712
4714
  );
4713
4715
  if (result) {
4714
4716
  setAddedToIssue(duplicateOf && result.issueNumber === duplicateOf ? duplicateOf : null);
4717
+ const queued = result.status === "QUEUED" && !!result.message;
4718
+ setQueuedMessage(queued ? (_b = result.message) != null ? _b : null : null);
4715
4719
  setSubmitted(true);
4716
4720
  setDescription("");
4717
4721
  setScreenshots([]);
@@ -4722,8 +4726,9 @@ function ReportDialog({
4722
4726
  setPickedSimilar(null);
4723
4727
  setTimeout(() => {
4724
4728
  setSubmitted(false);
4729
+ setQueuedMessage(null);
4725
4730
  handleClose();
4726
- }, 2e3);
4731
+ }, queued ? 6e3 : 2e3);
4727
4732
  }
4728
4733
  setIsSubmitting(false);
4729
4734
  setAttachingTo(null);
@@ -5033,7 +5038,18 @@ function ReportDialog({
5033
5038
  fontSize: "14px",
5034
5039
  fontWeight: 500
5035
5040
  },
5036
- children: addedToIssue ? `Added to #${addedToIssue}. Thank you!` : `${getTypeLabel(reportType)} sent. Thank you!`
5041
+ children: queuedMessage ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
5042
+ "span",
5043
+ {
5044
+ style: {
5045
+ // amber-500 reads on the dark panel, amber-700 on the light one
5046
+ color: isDark ? "#f59e0b" : "#b45309",
5047
+ fontWeight: 400,
5048
+ lineHeight: 1.5
5049
+ },
5050
+ children: queuedMessage
5051
+ }
5052
+ ) : addedToIssue ? `Added to #${addedToIssue}. Thank you!` : `${getTypeLabel(reportType)} sent. Thank you!`
5037
5053
  }
5038
5054
  ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
5039
5055
  step === 1 && headerSlot ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { style: { marginBottom: "14px" }, children: headerSlot }) : null,