@vitrinka/web 0.6.0 → 0.7.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.
Files changed (60) hide show
  1. package/CHANGELOG.md +71 -0
  2. package/README.md +124 -4
  3. package/build/hud.iife.js +7 -7
  4. package/build/index.d.ts +1 -0
  5. package/build/recorder/RecorderProvider.js +5 -18
  6. package/build/recorder/api.d.ts +20 -0
  7. package/build/recorder/api.js +21 -9
  8. package/build/recorder/capture/console.d.ts +6 -1
  9. package/build/recorder/capture/console.js +28 -5
  10. package/build/recorder/capture/net.d.ts +10 -1
  11. package/build/recorder/capture/net.js +14 -1
  12. package/build/recorder/capture/redact.d.ts +1 -0
  13. package/build/recorder/capture/redact.js +6 -1
  14. package/build/recorder/capture/rrweb-lane.d.ts +19 -0
  15. package/build/recorder/capture/rrweb-lane.js +109 -0
  16. package/build/recorder/capture/rrweb.d.ts +2 -9
  17. package/build/recorder/capture/rrweb.js +11 -86
  18. package/build/recorder/config.d.ts +3 -1
  19. package/build/recorder/config.js +15 -2
  20. package/build/recorder/flight.d.ts +141 -22
  21. package/build/recorder/flight.js +312 -27
  22. package/build/recorder/hud/host-style.d.ts +14 -0
  23. package/build/recorder/hud/host-style.js +15 -0
  24. package/build/recorder/hud/host.js +1 -1
  25. package/build/recorder/hud/styles.d.ts +1 -11
  26. package/build/recorder/hud/styles.js +1 -12
  27. package/build/recorder/state.d.ts +18 -1
  28. package/build/recorder/state.js +40 -1
  29. package/build/recorder/storage/capture.d.ts +44 -0
  30. package/build/recorder/storage/capture.js +136 -0
  31. package/build/recorder/version.d.ts +2 -2
  32. package/build/recorder/version.js +1 -1
  33. package/build/report/bundle.d.ts +4 -0
  34. package/build/report/bundle.js +30 -0
  35. package/build/report/element.d.ts +86 -0
  36. package/build/report/element.js +146 -0
  37. package/build/report/engine.d.ts +144 -0
  38. package/build/report/engine.js +402 -0
  39. package/build/report/i18n.d.ts +78 -0
  40. package/build/report/i18n.js +151 -0
  41. package/build/report/identity.d.ts +26 -0
  42. package/build/report/identity.js +36 -0
  43. package/build/report/index.d.ts +12 -0
  44. package/build/report/index.js +15 -0
  45. package/build/report/keybind.d.ts +29 -0
  46. package/build/report/keybind.js +99 -0
  47. package/build/report/markers.d.ts +77 -0
  48. package/build/report/markers.js +162 -0
  49. package/build/report/profile.d.ts +62 -0
  50. package/build/report/profile.js +115 -0
  51. package/build/report/recorder-face.d.ts +2 -0
  52. package/build/report/recorder-face.js +20 -0
  53. package/build/report/styles.d.ts +7 -0
  54. package/build/report/styles.js +226 -0
  55. package/build/report/widget.d.ts +109 -0
  56. package/build/report/widget.js +907 -0
  57. package/build/report/wire.d.ts +68 -0
  58. package/build/report/wire.js +96 -0
  59. package/build/report-widget.mjs +229 -0
  60. package/package.json +11 -4
@@ -0,0 +1,109 @@
1
+ import { type RecordLoader } from './engine';
2
+ import { type Locale } from './i18n';
3
+ import { type IdentifyInput } from './identity';
4
+ import type { CaptureNarrowing } from './profile';
5
+ export interface WidgetOptions {
6
+ base: string;
7
+ key: string;
8
+ /** null/absent = the browser's language. */
9
+ locale?: Locale | null;
10
+ /** The floating button; `false` = the host opens the card itself. */
11
+ button: boolean;
12
+ /** CSS selector of the host's own control(s) that open the card. */
13
+ openSelector?: string | null;
14
+ identity?: IdentifyInput;
15
+ appVersion?: string;
16
+ capture?: CaptureNarrowing;
17
+ sanitizeUrl?: (url: string) => string;
18
+ loadRecord: RecordLoader;
19
+ }
20
+ export declare class ReportWidget {
21
+ private readonly opts;
22
+ private readonly hud;
23
+ private readonly engine;
24
+ private config;
25
+ private locale;
26
+ private s;
27
+ private button;
28
+ private openSelector;
29
+ /** This widget's own word: undefined defers to the page-wide identity; null is anonymous. */
30
+ private identity;
31
+ private keybind;
32
+ private isOpen;
33
+ private view;
34
+ private marking;
35
+ private markers;
36
+ private nextKey;
37
+ private tool;
38
+ private frozen;
39
+ private job;
40
+ private sending;
41
+ private error;
42
+ private result;
43
+ private notify;
44
+ private sentNotify;
45
+ private includedOpen;
46
+ private recordingBind;
47
+ private bindRefused;
48
+ /** The note input the reporter is in (or just drew); others with no text fold away. */
49
+ private noteOpen;
50
+ private drawing;
51
+ private readonly offs;
52
+ private readonly pins;
53
+ /** Per hide mark: the page nodes it covered when drawn (they are blanked in the capture). */
54
+ private readonly hideIds;
55
+ /** Native dialogs in the order they opened (seeded with those already open, in DOM order). */
56
+ private dialogOrder;
57
+ /**
58
+ * Where the report must live: the modal shown last (only the top modal is
59
+ * not inert), else the dialog opened last, else the recorder's rule
60
+ * (`sheetTarget`: ARIA dialogs included).
61
+ */
62
+ private activeDialog;
63
+ /** The open dialog the report lives in while one is up (a modal makes everything outside it inert). */
64
+ private sheet;
65
+ private readonly e;
66
+ constructor(opts: WidgetOptions);
67
+ /**
68
+ * Live inside the topmost open dialog while there is one (the recorder's
69
+ * sheet path, hud/host.ts): a modal makes everything outside it inert and
70
+ * its focus trap pulls focus back. The one DOM tree moves, so the draft,
71
+ * the marks and their notes go along; focus is restored after the move.
72
+ */
73
+ private followDialog;
74
+ open(): void;
75
+ close(): void;
76
+ setLocale(raw: string | null | undefined): void;
77
+ setButton(on: boolean): void;
78
+ setOpenSelector(sel: string | null): void;
79
+ identify(input: IdentifyInput): void;
80
+ unmount(): void;
81
+ private bind;
82
+ private show;
83
+ private who;
84
+ private stopBindListener;
85
+ private startRecordingBind;
86
+ private stopRecordingBind;
87
+ private startMarking;
88
+ private endMarking;
89
+ private onChrome;
90
+ private pointerDown;
91
+ private pointerMove;
92
+ private pointerUp;
93
+ /** A new numbered mark; a hide also names the page nodes under it now, while the page sits frozen. */
94
+ private addMarker;
95
+ private cancelDraft;
96
+ private kbDraft;
97
+ private markKey;
98
+ private renderKbDraft;
99
+ /** The coach rides beside the pointer, inside the viewport. */
100
+ private placeCoach;
101
+ private shapeNodes;
102
+ private renderMarks;
103
+ /** Pin numbers, positions and which notes show; text in place (the locale may have changed). */
104
+ private renderPins;
105
+ private envelope;
106
+ private send;
107
+ private includedItems;
108
+ private paint;
109
+ }