glitchgrab 1.18.0 → 1.19.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 +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +9 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -167,6 +167,7 @@ declare function ReportButton({ position, label, className, children, }: ReportB
|
|
|
167
167
|
interface ErrorBoundaryProps {
|
|
168
168
|
token: string;
|
|
169
169
|
baseUrl?: string;
|
|
170
|
+
session?: GlitchgrabSession | null;
|
|
170
171
|
onError?: (error: Error) => void;
|
|
171
172
|
fallback?: React.ReactNode;
|
|
172
173
|
visitedPages: string[];
|
package/dist/index.d.ts
CHANGED
|
@@ -167,6 +167,7 @@ declare function ReportButton({ position, label, className, children, }: ReportB
|
|
|
167
167
|
interface ErrorBoundaryProps {
|
|
168
168
|
token: string;
|
|
169
169
|
baseUrl?: string;
|
|
170
|
+
session?: GlitchgrabSession | null;
|
|
170
171
|
onError?: (error: Error) => void;
|
|
171
172
|
fallback?: React.ReactNode;
|
|
172
173
|
visitedPages: string[];
|
package/dist/index.js
CHANGED
|
@@ -405,6 +405,7 @@ var GlitchgrabErrorBoundary = class extends React.Component {
|
|
|
405
405
|
if (this.props.onError) this.props.onError(error);
|
|
406
406
|
return;
|
|
407
407
|
}
|
|
408
|
+
const session = this.props.session;
|
|
408
409
|
const payload = {
|
|
409
410
|
token: this.props.token,
|
|
410
411
|
source: "SDK_AUTO",
|
|
@@ -418,7 +419,11 @@ var GlitchgrabErrorBoundary = class extends React.Component {
|
|
|
418
419
|
deviceInfo: (_b = context.deviceInfo) != null ? _b : void 0,
|
|
419
420
|
metadata: {
|
|
420
421
|
timestamp: context.timestamp,
|
|
421
|
-
visitedPages: JSON.stringify(context.visitedPages)
|
|
422
|
+
visitedPages: JSON.stringify(context.visitedPages),
|
|
423
|
+
...(session == null ? void 0 : session.userId) ? { sessionUserId: session.userId } : {},
|
|
424
|
+
...(session == null ? void 0 : session.name) ? { sessionUserName: String(session.name) } : {},
|
|
425
|
+
...(session == null ? void 0 : session.email) ? { sessionUserEmail: String(session.email) } : {},
|
|
426
|
+
...(session == null ? void 0 : session.phone) ? { sessionUserPhone: String(session.phone) } : {}
|
|
422
427
|
}
|
|
423
428
|
};
|
|
424
429
|
sendReport(payload, this.props.baseUrl);
|
|
@@ -747,6 +752,7 @@ function ReportDialog({
|
|
|
747
752
|
position: "fixed",
|
|
748
753
|
inset: 0,
|
|
749
754
|
zIndex: 2147483647,
|
|
755
|
+
pointerEvents: "auto",
|
|
750
756
|
display: "flex",
|
|
751
757
|
alignItems: "center",
|
|
752
758
|
justifyContent: "center",
|
|
@@ -756,6 +762,7 @@ function ReportDialog({
|
|
|
756
762
|
onClick: () => {
|
|
757
763
|
if (!previewOpen) handleClose();
|
|
758
764
|
},
|
|
765
|
+
onPointerDown: (e) => e.stopPropagation(),
|
|
759
766
|
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
760
767
|
"div",
|
|
761
768
|
{
|
|
@@ -1530,6 +1537,7 @@ function GlitchgrabProviderInner({
|
|
|
1530
1537
|
{
|
|
1531
1538
|
token,
|
|
1532
1539
|
baseUrl,
|
|
1540
|
+
session,
|
|
1533
1541
|
onError,
|
|
1534
1542
|
fallback,
|
|
1535
1543
|
visitedPages: visitedPagesRef.current,
|