glitchgrab 1.39.0 → 1.41.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/README.md +3 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +648 -188
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +648 -188
- package/dist/index.mjs.map +1 -1
- package/dist/server.d.mts +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/{types-DxH3oAL9.d.mts → types-YpA_jHFp.d.mts} +6 -1
- package/dist/{types-DxH3oAL9.d.ts → types-YpA_jHFp.d.ts} +6 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -727,7 +727,8 @@ reportServerError(error: unknown, options?: {
|
|
|
727
727
|
context?: string; // "cron/daily-digest" — the grouping key
|
|
728
728
|
description?: string; // what the job was doing
|
|
729
729
|
type?: ReportType; // default "BUG"
|
|
730
|
-
severity?: ReportSeverity; // becomes a severity:<value> label
|
|
730
|
+
severity?: ReportSeverity; // "low" | "medium" | "high" | "critical" — becomes a severity:<value> label
|
|
731
|
+
// anything else is rejected 400 by the API
|
|
731
732
|
pageUrl?: string; // a real request URL, when there is one
|
|
732
733
|
metadata?: Record<string, string>;
|
|
733
734
|
reporter?: { id?: string; name?: string; email?: string; phone?: string };
|
|
@@ -831,7 +832,7 @@ response.headers.set(
|
|
|
831
832
|
|
|
832
833
|
- `connect-src https://glitchgrab.dev` — required for `sendReport`, `enhanceText`, `transcribeAudio`, and the report-fetching hooks/REST calls. All SDK requests go to this single host by default.
|
|
833
834
|
- If you pass a custom `baseUrl` prop, allow that host instead (self-hosted or proxied deployments).
|
|
834
|
-
- Screenshot capture
|
|
835
|
+
- Screenshot capture runs entirely client-side — no network request, no extra `img-src`/`connect-src` needed for it. In Chrome and Edge the browser asks "Allow this site to see this tab?" when the dialog opens, and the screenshot is the tab's real pixels (the share stops after one frame). If the reporter clicks Cancel, or in Safari/Firefox, it falls back to re-drawing `document.body` with `html2canvas-pro`, which needs no permission but can drift from the real UI. If the SDK runs inside an iframe, the frame needs `allow="display-capture"` for the real-pixel path.
|
|
835
836
|
- `img-src` only matters if your `session` carries an avatar URL — the report dialog renders it. If your CSP blocks that host the dialog falls back to the reporter's initials, so it degrades rather than breaking.
|
|
836
837
|
- No `script-src`, `style-src`, or `frame-src` allowances are required — the SDK doesn't load remote scripts, styles, or iframes.
|
|
837
838
|
|
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-
|
|
3
|
-
export { G as GlitchgrabConfig, j as ReportSeverity, k as ReportType, l as RuntimeInfo } from './types-
|
|
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-YpA_jHFp.mjs';
|
|
3
|
+
export { G as GlitchgrabConfig, j as ReportSeverity, k as ReportType, l as RuntimeInfo } from './types-YpA_jHFp.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-
|
|
3
|
-
export { G as GlitchgrabConfig, j as ReportSeverity, k as ReportType, l as RuntimeInfo } from './types-
|
|
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-YpA_jHFp.js';
|
|
3
|
+
export { G as GlitchgrabConfig, j as ReportSeverity, k as ReportType, l as RuntimeInfo } from './types-YpA_jHFp.js';
|
|
4
4
|
import * as React from 'react';
|
|
5
5
|
import { ReactNode } from 'react';
|
|
6
6
|
|