@tra-bilisim/report-issue 0.1.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/core.d.ts ADDED
@@ -0,0 +1,16 @@
1
+ export { C as CONSENT_VERSION, a as CaptureType, b as ConsoleEntry, N as NetworkEntry, P as PageOption, R as RecorderStartResult, c as RecordingConsent, d as ReportCategoryOption, e as ReportIssueAdapter, f as ReportIssueToast, g as ReportMetadata, h as ReportSubmitPayload, i as ReportSubmitResult, V as VideoRecorderCallbacks, j as VideoRecorderController, k as beginNetworkRequest, l as completeNetworkRequest, m as createConsent, n as createVideoRecorder, o as failNetworkRequest, p as getConsoleLogs, q as getNetworkLogs, r as patchConsole, s as pushConsoleLog } from './consent-DmS4DxOf.js';
2
+
3
+ declare function applyInputMask(targetDoc?: Document): void;
4
+ declare function applyMask(): void;
5
+ declare function removeMask(): void;
6
+ declare function toggleVideoMask(enable: boolean): void;
7
+
8
+ /**
9
+ * Captures a masked PNG screenshot of the whole document body and returns a
10
+ * data URL. Applies KVKK text/input masking and hides any element marked with
11
+ * `data-report-ignore-capture` (the dialog itself) during the capture, then
12
+ * restores everything before resolving. Framework-agnostic.
13
+ */
14
+ declare function captureMaskedScreenshot(): Promise<string>;
15
+
16
+ export { applyInputMask, applyMask, captureMaskedScreenshot, removeMask, toggleVideoMask };
package/dist/core.js ADDED
@@ -0,0 +1,4 @@
1
+ export { CONSENT_VERSION, createConsent, createVideoRecorder } from './chunk-5S66KGBW.js';
2
+ export { beginNetworkRequest, completeNetworkRequest, failNetworkRequest, getConsoleLogs, getNetworkLogs, patchConsole, pushConsoleLog } from './chunk-EXDFVVYA.js';
3
+ export { captureMaskedScreenshot } from './chunk-KY2IRP36.js';
4
+ export { applyInputMask, applyMask, removeMask, toggleVideoMask } from './chunk-ZYF6UFBB.js';
package/dist/index.css ADDED
@@ -0,0 +1,594 @@
1
+ /* src/react/ui/styles.css */
2
+ :root {
3
+ --rpi-primary: #2563eb;
4
+ --rpi-primary-fg: #ffffff;
5
+ --rpi-error: #dc2626;
6
+ --rpi-error-fg: #ffffff;
7
+ --rpi-warning: #f59e0b;
8
+ --rpi-bg: #ffffff;
9
+ --rpi-fg: #0f172a;
10
+ --rpi-muted-bg: #f1f5f9;
11
+ --rpi-muted-fg: #64748b;
12
+ --rpi-border: #e2e8f0;
13
+ --rpi-accent-bg: #f1f5f9;
14
+ --rpi-overlay: rgba(0, 0, 0, 0.5);
15
+ --rpi-radius: 8px;
16
+ --rpi-radius-sm: 6px;
17
+ --rpi-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.35);
18
+ --rpi-font:
19
+ -apple-system,
20
+ BlinkMacSystemFont,
21
+ "Segoe UI",
22
+ Roboto,
23
+ Helvetica,
24
+ Arial,
25
+ sans-serif;
26
+ --rpi-z: 2147483000;
27
+ }
28
+ @media (prefers-color-scheme: dark) {
29
+ :root:not(.light) {
30
+ --rpi-bg: #0f172a;
31
+ --rpi-fg: #f1f5f9;
32
+ --rpi-muted-bg: #1e293b;
33
+ --rpi-muted-fg: #94a3b8;
34
+ --rpi-border: #334155;
35
+ --rpi-accent-bg: #1e293b;
36
+ --rpi-overlay: rgba(0, 0, 0, 0.65);
37
+ }
38
+ }
39
+ .dark {
40
+ --rpi-bg: #0f172a;
41
+ --rpi-fg: #f1f5f9;
42
+ --rpi-muted-bg: #1e293b;
43
+ --rpi-muted-fg: #94a3b8;
44
+ --rpi-border: #334155;
45
+ --rpi-accent-bg: #1e293b;
46
+ --rpi-overlay: rgba(0, 0, 0, 0.65);
47
+ }
48
+ .report-hide-dialog [data-report-ignore-capture],
49
+ .report-hide-dialog [data-slot=dialog-overlay] {
50
+ opacity: 0 !important;
51
+ pointer-events: none !important;
52
+ }
53
+ .rpi-root,
54
+ .rpi-root *,
55
+ .rpi-root *::before,
56
+ .rpi-root *::after {
57
+ box-sizing: border-box;
58
+ }
59
+ .rpi-root {
60
+ font-family: var(--rpi-font);
61
+ color: var(--rpi-fg);
62
+ font-size: 14px;
63
+ line-height: 1.5;
64
+ }
65
+ @keyframes rpi-overlay-in {
66
+ from {
67
+ opacity: 0;
68
+ }
69
+ to {
70
+ opacity: 1;
71
+ }
72
+ }
73
+ @keyframes rpi-content-in {
74
+ from {
75
+ opacity: 0;
76
+ transform: translate(-50%, -48%) scale(0.96);
77
+ }
78
+ to {
79
+ opacity: 1;
80
+ transform: translate(-50%, -50%) scale(1);
81
+ }
82
+ }
83
+ .rpi-dialog__overlay {
84
+ position: fixed;
85
+ inset: 0;
86
+ z-index: var(--rpi-z);
87
+ background: var(--rpi-overlay);
88
+ animation: rpi-overlay-in 150ms ease-out;
89
+ }
90
+ .rpi-dialog__content {
91
+ position: fixed;
92
+ top: 50%;
93
+ left: 50%;
94
+ transform: translate(-50%, -50%);
95
+ z-index: calc(var(--rpi-z) + 1);
96
+ display: flex;
97
+ flex-direction: column;
98
+ gap: 16px;
99
+ width: 100%;
100
+ max-width: 32rem;
101
+ max-height: 90vh;
102
+ padding: 24px;
103
+ background: var(--rpi-bg);
104
+ color: var(--rpi-fg);
105
+ border: 1px solid var(--rpi-border);
106
+ border-radius: var(--rpi-radius);
107
+ box-shadow: var(--rpi-shadow);
108
+ animation: rpi-content-in 160ms ease-out;
109
+ }
110
+ .rpi-dialog__content.rpi-dialog__content--lg {
111
+ max-width: 36rem;
112
+ }
113
+ .rpi-dialog__content.rpi-dialog__content--xl {
114
+ max-width: 40rem;
115
+ }
116
+ .rpi-dialog__close {
117
+ position: absolute;
118
+ top: 12px;
119
+ right: 12px;
120
+ display: inline-flex;
121
+ align-items: center;
122
+ justify-content: center;
123
+ width: 28px;
124
+ height: 28px;
125
+ border: none;
126
+ border-radius: var(--rpi-radius-sm);
127
+ background: transparent;
128
+ color: var(--rpi-muted-fg);
129
+ cursor: pointer;
130
+ }
131
+ .rpi-dialog__close:hover {
132
+ background: var(--rpi-accent-bg);
133
+ color: var(--rpi-fg);
134
+ }
135
+ .rpi-dialog__header {
136
+ display: flex;
137
+ flex-direction: column;
138
+ gap: 6px;
139
+ }
140
+ .rpi-dialog__title {
141
+ margin: 0;
142
+ font-size: 18px;
143
+ font-weight: 600;
144
+ display: flex;
145
+ align-items: center;
146
+ gap: 8px;
147
+ }
148
+ .rpi-dialog__desc {
149
+ margin: 0;
150
+ font-size: 14px;
151
+ color: var(--rpi-muted-fg);
152
+ }
153
+ .rpi-dialog__footer {
154
+ display: flex;
155
+ justify-content: flex-end;
156
+ gap: 8px;
157
+ flex-wrap: wrap;
158
+ }
159
+ .rpi-btn {
160
+ display: inline-flex;
161
+ align-items: center;
162
+ justify-content: center;
163
+ gap: 6px;
164
+ height: 38px;
165
+ padding: 0 16px;
166
+ font-family: inherit;
167
+ font-size: 14px;
168
+ font-weight: 500;
169
+ line-height: 1;
170
+ border: 1px solid transparent;
171
+ border-radius: var(--rpi-radius-sm);
172
+ background: var(--rpi-primary);
173
+ color: var(--rpi-primary-fg);
174
+ cursor: pointer;
175
+ white-space: nowrap;
176
+ transition: background 120ms ease, opacity 120ms ease;
177
+ }
178
+ .rpi-btn:hover:not(:disabled) {
179
+ opacity: 0.9;
180
+ }
181
+ .rpi-btn:disabled {
182
+ opacity: 0.5;
183
+ cursor: not-allowed;
184
+ }
185
+ .rpi-btn--outline {
186
+ background: var(--rpi-bg);
187
+ color: var(--rpi-fg);
188
+ border-color: var(--rpi-border);
189
+ }
190
+ .rpi-btn--outline:hover:not(:disabled) {
191
+ background: var(--rpi-accent-bg);
192
+ opacity: 1;
193
+ }
194
+ .rpi-btn--error {
195
+ background: var(--rpi-error);
196
+ color: var(--rpi-error-fg);
197
+ }
198
+ .rpi-btn--sm {
199
+ height: 32px;
200
+ padding: 0 12px;
201
+ font-size: 13px;
202
+ }
203
+ .rpi-btn--icon {
204
+ width: 38px;
205
+ height: 38px;
206
+ padding: 0;
207
+ }
208
+ .rpi-btn__spinner {
209
+ width: 15px;
210
+ height: 15px;
211
+ border: 2px solid currentColor;
212
+ border-right-color: transparent;
213
+ border-radius: 50%;
214
+ animation: rpi-spin 0.6s linear infinite;
215
+ }
216
+ @keyframes rpi-spin {
217
+ to {
218
+ transform: rotate(360deg);
219
+ }
220
+ }
221
+ .rpi-check {
222
+ display: flex;
223
+ align-items: flex-start;
224
+ gap: 8px;
225
+ cursor: pointer;
226
+ }
227
+ .rpi-check__box {
228
+ flex-shrink: 0;
229
+ display: inline-flex;
230
+ align-items: center;
231
+ justify-content: center;
232
+ width: 18px;
233
+ height: 18px;
234
+ margin-top: 1px;
235
+ border: 1px solid var(--rpi-border);
236
+ border-radius: 4px;
237
+ background: var(--rpi-bg);
238
+ color: var(--rpi-primary-fg);
239
+ }
240
+ .rpi-check__box[data-state=checked] {
241
+ background: var(--rpi-primary);
242
+ border-color: var(--rpi-primary);
243
+ }
244
+ .rpi-check__label {
245
+ font-size: 14px;
246
+ color: var(--rpi-fg);
247
+ }
248
+ .rpi-muted {
249
+ color: var(--rpi-muted-fg);
250
+ }
251
+ .rpi-field-label {
252
+ font-size: 14px;
253
+ font-weight: 500;
254
+ }
255
+ .rpi-consent__body {
256
+ display: flex;
257
+ flex-direction: column;
258
+ gap: 12px;
259
+ font-size: 14px;
260
+ max-height: 50vh;
261
+ overflow-y: auto;
262
+ padding-right: 4px;
263
+ }
264
+ .rpi-consent__body p {
265
+ margin: 0;
266
+ }
267
+ .rpi-consent__list {
268
+ margin: 4px 0 0;
269
+ padding-left: 20px;
270
+ color: var(--rpi-muted-fg);
271
+ display: flex;
272
+ flex-direction: column;
273
+ gap: 2px;
274
+ }
275
+ .rpi-consent__group {
276
+ display: flex;
277
+ flex-direction: column;
278
+ gap: 4px;
279
+ }
280
+ .rpi-icon-primary {
281
+ color: var(--rpi-primary);
282
+ }
283
+ .rpi-input,
284
+ .rpi-textarea {
285
+ width: 100%;
286
+ padding: 8px 12px;
287
+ font-family: inherit;
288
+ font-size: 14px;
289
+ color: var(--rpi-fg);
290
+ background: var(--rpi-bg);
291
+ border: 1px solid var(--rpi-border);
292
+ border-radius: var(--rpi-radius-sm);
293
+ outline: none;
294
+ }
295
+ .rpi-input:focus,
296
+ .rpi-textarea:focus {
297
+ border-color: var(--rpi-primary);
298
+ }
299
+ .rpi-textarea {
300
+ resize: vertical;
301
+ min-height: 64px;
302
+ }
303
+ .rpi-input::placeholder,
304
+ .rpi-textarea::placeholder {
305
+ color: var(--rpi-muted-fg);
306
+ }
307
+ .rpi-select__trigger {
308
+ display: flex;
309
+ align-items: center;
310
+ justify-content: space-between;
311
+ gap: 8px;
312
+ width: 100%;
313
+ padding: 8px 12px;
314
+ font-family: inherit;
315
+ font-size: 14px;
316
+ text-align: left;
317
+ color: var(--rpi-fg);
318
+ background: var(--rpi-bg);
319
+ border: 1px solid var(--rpi-border);
320
+ border-radius: var(--rpi-radius-sm);
321
+ cursor: pointer;
322
+ }
323
+ .rpi-select__trigger:disabled {
324
+ opacity: 0.5;
325
+ cursor: not-allowed;
326
+ }
327
+ .rpi-select__trigger[data-placeholder=true] {
328
+ color: var(--rpi-muted-fg);
329
+ }
330
+ .rpi-select__panel {
331
+ z-index: calc(var(--rpi-z) + 2);
332
+ display: flex;
333
+ flex-direction: column;
334
+ min-width: var(--radix-popover-trigger-width, 12rem);
335
+ max-height: 16rem;
336
+ background: var(--rpi-bg);
337
+ border: 1px solid var(--rpi-border);
338
+ border-radius: var(--rpi-radius-sm);
339
+ box-shadow: var(--rpi-shadow);
340
+ overflow: hidden;
341
+ }
342
+ .rpi-select__search {
343
+ margin: 6px;
344
+ padding: 6px 8px;
345
+ font-family: inherit;
346
+ font-size: 14px;
347
+ color: var(--rpi-fg);
348
+ background: var(--rpi-bg);
349
+ border: 1px solid var(--rpi-border);
350
+ border-radius: var(--rpi-radius-sm);
351
+ outline: none;
352
+ }
353
+ .rpi-select__list {
354
+ overflow-y: auto;
355
+ padding: 4px;
356
+ }
357
+ .rpi-select__option {
358
+ display: flex;
359
+ align-items: center;
360
+ width: 100%;
361
+ padding: 7px 10px;
362
+ font-size: 14px;
363
+ text-align: left;
364
+ color: var(--rpi-fg);
365
+ background: transparent;
366
+ border: none;
367
+ border-radius: var(--rpi-radius-sm);
368
+ cursor: pointer;
369
+ }
370
+ .rpi-select__option:hover,
371
+ .rpi-select__option[data-active=true] {
372
+ background: var(--rpi-accent-bg);
373
+ }
374
+ .rpi-select__option[data-selected=true] {
375
+ color: var(--rpi-primary);
376
+ font-weight: 500;
377
+ }
378
+ .rpi-select__empty {
379
+ padding: 10px;
380
+ font-size: 14px;
381
+ color: var(--rpi-muted-fg);
382
+ text-align: center;
383
+ }
384
+ .rpi-col {
385
+ display: flex;
386
+ flex-direction: column;
387
+ gap: 8px;
388
+ }
389
+ .rpi-form-body {
390
+ display: flex;
391
+ flex-direction: column;
392
+ gap: 16px;
393
+ max-height: 60vh;
394
+ overflow-y: auto;
395
+ padding-right: 4px;
396
+ }
397
+ .rpi-row-wrap {
398
+ display: flex;
399
+ gap: 8px;
400
+ flex-wrap: wrap;
401
+ }
402
+ .rpi-attach {
403
+ position: relative;
404
+ width: 80px;
405
+ height: 80px;
406
+ border-radius: var(--rpi-radius-sm);
407
+ border: 1px solid var(--rpi-border);
408
+ overflow: hidden;
409
+ background: var(--rpi-muted-bg);
410
+ display: flex;
411
+ align-items: center;
412
+ justify-content: center;
413
+ }
414
+ .rpi-attach img,
415
+ .rpi-attach video {
416
+ width: 100%;
417
+ height: 100%;
418
+ object-fit: cover;
419
+ }
420
+ .rpi-attach__badge {
421
+ position: absolute;
422
+ color: #fff;
423
+ filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.6));
424
+ }
425
+ .rpi-attach__remove {
426
+ position: absolute;
427
+ top: 2px;
428
+ right: 2px;
429
+ display: inline-flex;
430
+ padding: 2px;
431
+ border: none;
432
+ border-radius: 999px;
433
+ background: rgba(0, 0, 0, 0.6);
434
+ color: #fff;
435
+ cursor: pointer;
436
+ }
437
+ .rpi-attach__remove:hover {
438
+ background: rgba(0, 0, 0, 0.8);
439
+ }
440
+ .rpi-fab {
441
+ position: fixed;
442
+ top: 8px;
443
+ right: 24px;
444
+ z-index: var(--rpi-z);
445
+ pointer-events: auto;
446
+ }
447
+ .rpi-fab__dot {
448
+ position: absolute;
449
+ top: -4px;
450
+ right: -4px;
451
+ width: 10px;
452
+ height: 10px;
453
+ border-radius: 999px;
454
+ background: var(--rpi-warning);
455
+ border: 2px solid var(--rpi-bg);
456
+ animation: rpi-pulse 1.6s ease-in-out infinite;
457
+ }
458
+ @keyframes rpi-pulse {
459
+ 0%, 100% {
460
+ opacity: 1;
461
+ }
462
+ 50% {
463
+ opacity: 0.4;
464
+ }
465
+ }
466
+ .rpi-rec {
467
+ position: fixed;
468
+ top: 12px;
469
+ right: 12px;
470
+ z-index: calc(var(--rpi-z) + 3);
471
+ display: flex;
472
+ flex-direction: column;
473
+ align-items: flex-end;
474
+ gap: 12px;
475
+ padding: 8px 16px;
476
+ border-radius: var(--rpi-radius);
477
+ background: var(--rpi-bg);
478
+ border: 1px solid var(--rpi-error);
479
+ box-shadow: var(--rpi-shadow);
480
+ }
481
+ .rpi-rec__row {
482
+ display: flex;
483
+ align-items: center;
484
+ gap: 12px;
485
+ }
486
+ .rpi-rec__label {
487
+ display: flex;
488
+ align-items: center;
489
+ gap: 6px;
490
+ color: var(--rpi-error);
491
+ font-weight: 500;
492
+ font-size: 14px;
493
+ }
494
+ .rpi-rec__dot {
495
+ color: var(--rpi-error);
496
+ fill: var(--rpi-error);
497
+ animation: rpi-pulse 1.2s ease-in-out infinite;
498
+ }
499
+ .rpi-rec__time {
500
+ font-size: 14px;
501
+ font-variant-numeric: tabular-nums;
502
+ font-family: ui-monospace, monospace;
503
+ }
504
+ .rpi-editor {
505
+ display: flex;
506
+ flex-direction: column;
507
+ gap: 12px;
508
+ flex: 1;
509
+ min-height: 0;
510
+ }
511
+ .rpi-editor__stage {
512
+ display: flex;
513
+ gap: 12px;
514
+ flex: 1;
515
+ min-height: 0;
516
+ }
517
+ .rpi-editor__tools {
518
+ display: flex;
519
+ flex-direction: column;
520
+ gap: 4px;
521
+ flex-shrink: 0;
522
+ }
523
+ .rpi-editor__tool {
524
+ display: inline-flex;
525
+ align-items: center;
526
+ justify-content: center;
527
+ width: 36px;
528
+ height: 36px;
529
+ border: 1px solid var(--rpi-border);
530
+ border-radius: var(--rpi-radius-sm);
531
+ background: var(--rpi-bg);
532
+ color: var(--rpi-fg);
533
+ cursor: pointer;
534
+ }
535
+ .rpi-editor__tool:hover {
536
+ background: var(--rpi-accent-bg);
537
+ }
538
+ .rpi-editor__tool[data-active=true] {
539
+ background: var(--rpi-primary);
540
+ color: var(--rpi-primary-fg);
541
+ border-color: var(--rpi-primary);
542
+ }
543
+ .rpi-editor__canvas-wrap {
544
+ flex: 1;
545
+ min-height: 0;
546
+ display: flex;
547
+ align-items: center;
548
+ justify-content: center;
549
+ background: var(--rpi-muted-bg);
550
+ border-radius: var(--rpi-radius);
551
+ overflow: hidden;
552
+ }
553
+ .rpi-editor__footer {
554
+ display: flex;
555
+ align-items: center;
556
+ justify-content: space-between;
557
+ gap: 16px;
558
+ flex-wrap: wrap;
559
+ }
560
+ .rpi-editor__controls {
561
+ display: flex;
562
+ align-items: center;
563
+ gap: 12px;
564
+ }
565
+ .rpi-editor__swatches {
566
+ display: flex;
567
+ align-items: center;
568
+ gap: 4px;
569
+ }
570
+ .rpi-editor__swatch {
571
+ width: 24px;
572
+ height: 24px;
573
+ border-radius: 999px;
574
+ border: 1px solid var(--rpi-border);
575
+ cursor: pointer;
576
+ padding: 0;
577
+ }
578
+ .rpi-editor__swatch[data-active=true] {
579
+ outline: 2px solid var(--rpi-primary);
580
+ outline-offset: 1px;
581
+ }
582
+ .rpi-dialog__content--editor {
583
+ top: 32px;
584
+ left: 0;
585
+ transform: none;
586
+ width: 100vw;
587
+ max-width: none;
588
+ height: calc(100vh - 64px);
589
+ max-height: none;
590
+ border-radius: 0;
591
+ border: 0;
592
+ padding: 16px;
593
+ gap: 0;
594
+ }
@@ -0,0 +1,77 @@
1
+ import * as react from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { e as ReportIssueAdapter, f as ReportIssueToast, a as CaptureType, c as RecordingConsent, b as ConsoleEntry, N as NetworkEntry, R as RecorderStartResult } from './consent-DmS4DxOf.js';
4
+ export { C as CONSENT_VERSION, P as PageOption, d as ReportCategoryOption, g as ReportMetadata, h as ReportSubmitPayload, i as ReportSubmitResult, p as getConsoleLogs, q as getNetworkLogs, r as patchConsole } from './consent-DmS4DxOf.js';
5
+
6
+ /** Adapter with every optional field filled in — what components actually read. */
7
+ interface ResolvedConfig {
8
+ adapter: ReportIssueAdapter;
9
+ t: (key: string, options?: Record<string, unknown>) => string;
10
+ locale?: string;
11
+ toast: ReportIssueToast;
12
+ environmentResolver: (url: string) => string;
13
+ getCurrentUrl: () => string;
14
+ maxFiles: number;
15
+ maxFileSizeBytes: number;
16
+ maxRecordingSeconds: number;
17
+ }
18
+ interface ReportIssueContextValue {
19
+ config: ResolvedConfig;
20
+ isCapturing: boolean;
21
+ setIsCapturing: (v: boolean) => void;
22
+ isRecording: boolean;
23
+ setIsRecording: (v: boolean) => void;
24
+ isVideoMaskEnabled: boolean;
25
+ setIsVideoMaskEnabled: (v: boolean) => void;
26
+ isReportOpen: boolean;
27
+ setIsReportOpen: (v: boolean) => void;
28
+ captureMode: boolean;
29
+ }
30
+ interface ReportIssueProviderProps {
31
+ config: ReportIssueAdapter;
32
+ children: ReactNode;
33
+ }
34
+ declare const ReportIssueProvider: ({ config, children }: ReportIssueProviderProps) => react.JSX.Element;
35
+ declare const useReportIssue: () => ReportIssueContextValue;
36
+ declare const useReportIssueConfig: () => ResolvedConfig;
37
+
38
+ declare const FloatingReportButton: () => react.ReactPortal;
39
+
40
+ interface ReportIssueDialogProps {
41
+ open: boolean;
42
+ onOpenChange: (open: boolean) => void;
43
+ }
44
+ declare const ReportIssueDialog: ({ open, onOpenChange }: ReportIssueDialogProps) => react.JSX.Element;
45
+
46
+ interface RecordingConsentDialogProps {
47
+ open: boolean;
48
+ captureType?: CaptureType;
49
+ onOpenChange: (open: boolean) => void;
50
+ onAccept: (consent: RecordingConsent) => void;
51
+ }
52
+ declare const RecordingConsentDialog: ({ open, captureType, onOpenChange, onAccept }: RecordingConsentDialogProps) => react.JSX.Element;
53
+
54
+ /**
55
+ * Exposes snapshots of the captured console/network logs. Console patching is
56
+ * enabled by the provider (opt-in), not as an import-time side effect.
57
+ */
58
+ declare function useReportIssueCapture(): {
59
+ collectConsoleLogs: () => ConsoleEntry[];
60
+ collectNetworkLogs: () => NetworkEntry[];
61
+ };
62
+
63
+ interface UseVideoRecorderOptions {
64
+ onComplete: (file: File) => void;
65
+ onRecordingChange?: (isRecording: boolean) => void;
66
+ maxDurationMs?: number;
67
+ }
68
+ /** Thin React wrapper over the headless `createVideoRecorder` controller. */
69
+ declare function useVideoRecorder({ onComplete, onRecordingChange, maxDurationMs }: UseVideoRecorderOptions): {
70
+ isRecording: boolean;
71
+ elapsed: number;
72
+ maxDuration: number;
73
+ start: () => Promise<RecorderStartResult>;
74
+ stop: () => void;
75
+ };
76
+
77
+ export { CaptureType, ConsoleEntry, FloatingReportButton, NetworkEntry, RecordingConsent, RecordingConsentDialog, ReportIssueAdapter, ReportIssueDialog, ReportIssueProvider, type ReportIssueProviderProps, ReportIssueToast, type ResolvedConfig, useReportIssue, useReportIssueCapture, useReportIssueConfig, useVideoRecorder };