glitchgrab 1.11.0 → 1.12.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 +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +611 -224
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +611 -224
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -14,6 +14,7 @@ interface GlitchgrabConfig {
|
|
|
14
14
|
maxBreadcrumbs?: number;
|
|
15
15
|
}
|
|
16
16
|
type ReportType = "BUG" | "FEATURE_REQUEST" | "QUESTION" | "OTHER";
|
|
17
|
+
type ReportSeverity = "low" | "medium" | "high";
|
|
17
18
|
interface ReportPayload {
|
|
18
19
|
token: string;
|
|
19
20
|
source: "SDK_AUTO" | "SDK_USER_REPORT";
|
|
@@ -93,6 +94,10 @@ interface ReportButtonProps {
|
|
|
93
94
|
className?: string;
|
|
94
95
|
/** Allow reporting feature requests, questions, not just bugs */
|
|
95
96
|
types?: ReportType[];
|
|
97
|
+
/** Dialog variant: "classic" (single screen) or "stepper" (3-step wizard). Default: "classic" */
|
|
98
|
+
variant?: "classic" | "stepper";
|
|
99
|
+
/** Show severity picker in stepper mode for BUG type. Default: true */
|
|
100
|
+
showSeverity?: boolean;
|
|
96
101
|
}
|
|
97
102
|
interface UseGlitchgrabReturn {
|
|
98
103
|
/** Report a bug programmatically */
|
|
@@ -104,6 +109,7 @@ interface UseGlitchgrabReturn {
|
|
|
104
109
|
/** Open the ReportButton modal programmatically (captures screenshot + shows dialog) */
|
|
105
110
|
openReportDialog: (options?: {
|
|
106
111
|
description?: string;
|
|
112
|
+
type?: ReportType;
|
|
107
113
|
}) => void;
|
|
108
114
|
/** The token being used */
|
|
109
115
|
token: string;
|
|
@@ -131,7 +137,7 @@ interface UseGlitchgrabReturn {
|
|
|
131
137
|
declare function useGlitchgrab(): UseGlitchgrabReturn;
|
|
132
138
|
declare function GlitchgrabProvider(props: GlitchgrabProviderProps): react_jsx_runtime.JSX.Element;
|
|
133
139
|
|
|
134
|
-
declare function ReportButton({ position, label, className, children, }: ReportButtonProps & {
|
|
140
|
+
declare function ReportButton({ position, label, className, variant, showSeverity, types, children, }: ReportButtonProps & {
|
|
135
141
|
/** Render prop — receives { onClick, capturing } so you can use your own trigger button */
|
|
136
142
|
children?: (props: {
|
|
137
143
|
onClick: () => void;
|
|
@@ -168,6 +174,8 @@ interface GlitchgrabReport {
|
|
|
168
174
|
reporterPhone: string | null;
|
|
169
175
|
pageUrl: string | null;
|
|
170
176
|
createdAt: string;
|
|
177
|
+
/** Number of comments on the linked GitHub issue (0 if no issue) */
|
|
178
|
+
commentCount: number;
|
|
171
179
|
issue: {
|
|
172
180
|
githubNumber: number;
|
|
173
181
|
githubUrl: string;
|
|
@@ -261,4 +269,4 @@ declare function captureContext(visitedPages: string[]): CapturedContext;
|
|
|
261
269
|
*/
|
|
262
270
|
declare function sendReport(payload: ReportPayload, baseUrl?: string): Promise<ReportResult | null>;
|
|
263
271
|
|
|
264
|
-
export { type Breadcrumb, type BreadcrumbType, type CapturedContext, type DeviceInfo, type GlitchgrabConfig, GlitchgrabErrorBoundary, GlitchgrabProvider, type GlitchgrabProviderProps, type GlitchgrabSession, ReportButton, type ReportButtonProps, type ReportPayload, type ReportResult, type ReportType, type UseGlitchgrabReturn, addBreadcrumb, captureContext, captureDeviceInfo, clearBreadcrumbs, fetchGlitchgrabReports, getBreadcrumbs, initBreadcrumbs, sanitizeUrl, sendReport, useGlitchgrab, useGlitchgrabActions, useGlitchgrabReports };
|
|
272
|
+
export { type Breadcrumb, type BreadcrumbType, type CapturedContext, type DeviceInfo, type GlitchgrabConfig, GlitchgrabErrorBoundary, GlitchgrabProvider, type GlitchgrabProviderProps, type GlitchgrabReport, type GlitchgrabSession, ReportButton, type ReportButtonProps, type ReportPayload, type ReportResult, type ReportSeverity, type ReportType, type UseGlitchgrabReturn, addBreadcrumb, captureContext, captureDeviceInfo, clearBreadcrumbs, fetchGlitchgrabReports, getBreadcrumbs, initBreadcrumbs, sanitizeUrl, sendReport, useGlitchgrab, useGlitchgrabActions, useGlitchgrabReports };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ interface GlitchgrabConfig {
|
|
|
14
14
|
maxBreadcrumbs?: number;
|
|
15
15
|
}
|
|
16
16
|
type ReportType = "BUG" | "FEATURE_REQUEST" | "QUESTION" | "OTHER";
|
|
17
|
+
type ReportSeverity = "low" | "medium" | "high";
|
|
17
18
|
interface ReportPayload {
|
|
18
19
|
token: string;
|
|
19
20
|
source: "SDK_AUTO" | "SDK_USER_REPORT";
|
|
@@ -93,6 +94,10 @@ interface ReportButtonProps {
|
|
|
93
94
|
className?: string;
|
|
94
95
|
/** Allow reporting feature requests, questions, not just bugs */
|
|
95
96
|
types?: ReportType[];
|
|
97
|
+
/** Dialog variant: "classic" (single screen) or "stepper" (3-step wizard). Default: "classic" */
|
|
98
|
+
variant?: "classic" | "stepper";
|
|
99
|
+
/** Show severity picker in stepper mode for BUG type. Default: true */
|
|
100
|
+
showSeverity?: boolean;
|
|
96
101
|
}
|
|
97
102
|
interface UseGlitchgrabReturn {
|
|
98
103
|
/** Report a bug programmatically */
|
|
@@ -104,6 +109,7 @@ interface UseGlitchgrabReturn {
|
|
|
104
109
|
/** Open the ReportButton modal programmatically (captures screenshot + shows dialog) */
|
|
105
110
|
openReportDialog: (options?: {
|
|
106
111
|
description?: string;
|
|
112
|
+
type?: ReportType;
|
|
107
113
|
}) => void;
|
|
108
114
|
/** The token being used */
|
|
109
115
|
token: string;
|
|
@@ -131,7 +137,7 @@ interface UseGlitchgrabReturn {
|
|
|
131
137
|
declare function useGlitchgrab(): UseGlitchgrabReturn;
|
|
132
138
|
declare function GlitchgrabProvider(props: GlitchgrabProviderProps): react_jsx_runtime.JSX.Element;
|
|
133
139
|
|
|
134
|
-
declare function ReportButton({ position, label, className, children, }: ReportButtonProps & {
|
|
140
|
+
declare function ReportButton({ position, label, className, variant, showSeverity, types, children, }: ReportButtonProps & {
|
|
135
141
|
/** Render prop — receives { onClick, capturing } so you can use your own trigger button */
|
|
136
142
|
children?: (props: {
|
|
137
143
|
onClick: () => void;
|
|
@@ -168,6 +174,8 @@ interface GlitchgrabReport {
|
|
|
168
174
|
reporterPhone: string | null;
|
|
169
175
|
pageUrl: string | null;
|
|
170
176
|
createdAt: string;
|
|
177
|
+
/** Number of comments on the linked GitHub issue (0 if no issue) */
|
|
178
|
+
commentCount: number;
|
|
171
179
|
issue: {
|
|
172
180
|
githubNumber: number;
|
|
173
181
|
githubUrl: string;
|
|
@@ -261,4 +269,4 @@ declare function captureContext(visitedPages: string[]): CapturedContext;
|
|
|
261
269
|
*/
|
|
262
270
|
declare function sendReport(payload: ReportPayload, baseUrl?: string): Promise<ReportResult | null>;
|
|
263
271
|
|
|
264
|
-
export { type Breadcrumb, type BreadcrumbType, type CapturedContext, type DeviceInfo, type GlitchgrabConfig, GlitchgrabErrorBoundary, GlitchgrabProvider, type GlitchgrabProviderProps, type GlitchgrabSession, ReportButton, type ReportButtonProps, type ReportPayload, type ReportResult, type ReportType, type UseGlitchgrabReturn, addBreadcrumb, captureContext, captureDeviceInfo, clearBreadcrumbs, fetchGlitchgrabReports, getBreadcrumbs, initBreadcrumbs, sanitizeUrl, sendReport, useGlitchgrab, useGlitchgrabActions, useGlitchgrabReports };
|
|
272
|
+
export { type Breadcrumb, type BreadcrumbType, type CapturedContext, type DeviceInfo, type GlitchgrabConfig, GlitchgrabErrorBoundary, GlitchgrabProvider, type GlitchgrabProviderProps, type GlitchgrabReport, type GlitchgrabSession, ReportButton, type ReportButtonProps, type ReportPayload, type ReportResult, type ReportSeverity, type ReportType, type UseGlitchgrabReturn, addBreadcrumb, captureContext, captureDeviceInfo, clearBreadcrumbs, fetchGlitchgrabReports, getBreadcrumbs, initBreadcrumbs, sanitizeUrl, sendReport, useGlitchgrab, useGlitchgrabActions, useGlitchgrabReports };
|