@leanbase.com/js 0.2.2-alpha.0 → 0.2.2

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 (71) hide show
  1. package/dist/leanbase.d.ts +0 -3
  2. package/dist/leanbase.iife.js +1 -1
  3. package/dist/leanbase.iife.js.map +1 -1
  4. package/dist/main.js +1 -1
  5. package/dist/main.js.map +1 -1
  6. package/dist/module.d.ts +0 -708
  7. package/dist/module.js +1 -1
  8. package/dist/module.js.map +1 -1
  9. package/dist/types.d.ts +0 -135
  10. package/dist/version.d.ts +1 -1
  11. package/lib/leanbase.d.ts +0 -3
  12. package/lib/leanbase.js +0 -25
  13. package/lib/leanbase.js.map +1 -1
  14. package/lib/types.d.ts +0 -135
  15. package/lib/types.js.map +1 -1
  16. package/lib/version.d.ts +1 -1
  17. package/lib/version.js +1 -1
  18. package/lib/version.js.map +1 -1
  19. package/package.json +1 -6
  20. package/dist/extensions/replay/external/config.d.ts +0 -9
  21. package/dist/extensions/replay/external/denylist.d.ts +0 -5
  22. package/dist/extensions/replay/external/lazy-loaded-session-recorder.d.ts +0 -153
  23. package/dist/extensions/replay/external/mutation-throttler.d.ts +0 -20
  24. package/dist/extensions/replay/external/network-plugin.d.ts +0 -15
  25. package/dist/extensions/replay/external/sessionrecording-utils.d.ts +0 -19
  26. package/dist/extensions/replay/external/triggerMatching.d.ts +0 -102
  27. package/dist/extensions/replay/rrweb-plugins/patch.d.ts +0 -3
  28. package/dist/extensions/replay/session-recording.d.ts +0 -75
  29. package/dist/extensions/replay/types/rrweb-types.d.ts +0 -439
  30. package/dist/extensions/replay/types/rrweb.d.ts +0 -82
  31. package/dist/extensions/sampling.d.ts +0 -4
  32. package/dist/utils/logger.d.ts +0 -10
  33. package/lib/extensions/replay/external/config.d.ts +0 -9
  34. package/lib/extensions/replay/external/config.js +0 -221
  35. package/lib/extensions/replay/external/config.js.map +0 -1
  36. package/lib/extensions/replay/external/denylist.d.ts +0 -5
  37. package/lib/extensions/replay/external/denylist.js +0 -28
  38. package/lib/extensions/replay/external/denylist.js.map +0 -1
  39. package/lib/extensions/replay/external/lazy-loaded-session-recorder.d.ts +0 -153
  40. package/lib/extensions/replay/external/lazy-loaded-session-recorder.js +0 -1042
  41. package/lib/extensions/replay/external/lazy-loaded-session-recorder.js.map +0 -1
  42. package/lib/extensions/replay/external/mutation-throttler.d.ts +0 -20
  43. package/lib/extensions/replay/external/mutation-throttler.js +0 -77
  44. package/lib/extensions/replay/external/mutation-throttler.js.map +0 -1
  45. package/lib/extensions/replay/external/network-plugin.d.ts +0 -15
  46. package/lib/extensions/replay/external/network-plugin.js +0 -503
  47. package/lib/extensions/replay/external/network-plugin.js.map +0 -1
  48. package/lib/extensions/replay/external/sessionrecording-utils.d.ts +0 -19
  49. package/lib/extensions/replay/external/sessionrecording-utils.js +0 -125
  50. package/lib/extensions/replay/external/sessionrecording-utils.js.map +0 -1
  51. package/lib/extensions/replay/external/triggerMatching.d.ts +0 -102
  52. package/lib/extensions/replay/external/triggerMatching.js +0 -342
  53. package/lib/extensions/replay/external/triggerMatching.js.map +0 -1
  54. package/lib/extensions/replay/rrweb-plugins/patch.d.ts +0 -3
  55. package/lib/extensions/replay/rrweb-plugins/patch.js +0 -32
  56. package/lib/extensions/replay/rrweb-plugins/patch.js.map +0 -1
  57. package/lib/extensions/replay/session-recording.d.ts +0 -75
  58. package/lib/extensions/replay/session-recording.js +0 -279
  59. package/lib/extensions/replay/session-recording.js.map +0 -1
  60. package/lib/extensions/replay/types/rrweb-types.d.ts +0 -439
  61. package/lib/extensions/replay/types/rrweb-types.js +0 -83
  62. package/lib/extensions/replay/types/rrweb-types.js.map +0 -1
  63. package/lib/extensions/replay/types/rrweb.d.ts +0 -82
  64. package/lib/extensions/replay/types/rrweb.js +0 -9
  65. package/lib/extensions/replay/types/rrweb.js.map +0 -1
  66. package/lib/extensions/sampling.d.ts +0 -4
  67. package/lib/extensions/sampling.js +0 -23
  68. package/lib/extensions/sampling.js.map +0 -1
  69. package/lib/utils/logger.d.ts +0 -10
  70. package/lib/utils/logger.js +0 -15
  71. package/lib/utils/logger.js.map +0 -1
@@ -1,439 +0,0 @@
1
- export type DataURLOptions = Partial<{
2
- type: string;
3
- quality: number;
4
- }>;
5
- export interface INode extends Node {
6
- __sn: serializedNodeWithId;
7
- }
8
- export interface IMirror<TNode> {
9
- getId(n: TNode | undefined | null): number;
10
- getNode(id: number): TNode | null;
11
- getIds(): number[];
12
- getMeta(n: TNode): serializedNodeWithId | null;
13
- removeNodeFromMap(n: TNode): void;
14
- has(id: number): boolean;
15
- hasNode(node: TNode): boolean;
16
- add(n: TNode, meta: serializedNodeWithId): void;
17
- replace(id: number, n: TNode): void;
18
- reset(): void;
19
- }
20
- export declare class Mirror implements IMirror<Node> {
21
- private idNodeMap;
22
- private nodeMetaMap;
23
- getId(n: Node | undefined | null): number;
24
- getNode(id: number): Node | null;
25
- getIds(): number[];
26
- getMeta(n: Node): serializedNodeWithId | null;
27
- removeNodeFromMap(n: Node): void;
28
- has(id: number): boolean;
29
- hasNode(node: Node): boolean;
30
- add(n: Node, meta: serializedNodeWithId): void;
31
- replace(id: number, n: Node): void;
32
- reset(): void;
33
- }
34
- export type attributes = {
35
- [key: string]: string | number | true | null;
36
- };
37
- export declare enum NodeType {
38
- Document = 0,
39
- DocumentType = 1,
40
- Element = 2,
41
- Text = 3,
42
- CDATA = 4,
43
- Comment = 5
44
- }
45
- export type documentNode = {
46
- type: NodeType.Document;
47
- childNodes: serializedNodeWithId[];
48
- compatMode?: string;
49
- };
50
- export type documentTypeNode = {
51
- type: NodeType.DocumentType;
52
- name: string;
53
- publicId: string;
54
- systemId: string;
55
- };
56
- export type elementNode = {
57
- type: NodeType.Element;
58
- tagName: string;
59
- attributes: attributes;
60
- childNodes: serializedNodeWithId[];
61
- isSVG?: true;
62
- needBlock?: boolean;
63
- isCustom?: true;
64
- };
65
- export type textNode = {
66
- type: NodeType.Text;
67
- textContent: string;
68
- isStyle?: true;
69
- };
70
- export type cdataNode = {
71
- type: NodeType.CDATA;
72
- textContent: '';
73
- };
74
- export type commentNode = {
75
- type: NodeType.Comment;
76
- textContent: string;
77
- };
78
- export type serializedNode = (documentNode | documentTypeNode | elementNode | textNode | cdataNode | commentNode) & {
79
- rootId?: number;
80
- isShadowHost?: boolean;
81
- isShadow?: boolean;
82
- };
83
- export type serializedNodeWithId = serializedNode & {
84
- id: number;
85
- };
86
- export type blockClass = string | RegExp;
87
- export type maskTextClass = string | RegExp;
88
- export type IWindow = Window & typeof globalThis;
89
- export type listenerHandler = () => void;
90
- export type KeepIframeSrcFn = (src: string) => boolean;
91
- export type PackFn = (event: eventWithTime) => string;
92
- export declare enum EventType {
93
- DomContentLoaded = 0,
94
- Load = 1,
95
- FullSnapshot = 2,
96
- IncrementalSnapshot = 3,
97
- Meta = 4,
98
- Custom = 5,
99
- Plugin = 6
100
- }
101
- export declare enum IncrementalSource {
102
- Mutation = 0,
103
- MouseMove = 1,
104
- MouseInteraction = 2,
105
- Scroll = 3,
106
- ViewportResize = 4,
107
- Input = 5,
108
- TouchMove = 6,
109
- MediaInteraction = 7,
110
- StyleSheetRule = 8,
111
- CanvasMutation = 9,
112
- Font = 10,
113
- Log = 11,
114
- Drag = 12,
115
- StyleDeclaration = 13,
116
- Selection = 14,
117
- AdoptedStyleSheet = 15,
118
- CustomElement = 16
119
- }
120
- export type domContentLoadedEvent = {
121
- type: EventType.DomContentLoaded;
122
- data: unknown;
123
- };
124
- export type loadedEvent = {
125
- type: EventType.Load;
126
- data: unknown;
127
- };
128
- export type fullSnapshotEvent = {
129
- type: EventType.FullSnapshot;
130
- data: {
131
- node: serializedNodeWithId;
132
- initialOffset: {
133
- top: number;
134
- left: number;
135
- };
136
- };
137
- };
138
- export type metaEvent = {
139
- type: EventType.Meta;
140
- data: {
141
- href: string;
142
- width: number;
143
- height: number;
144
- };
145
- };
146
- export type customEvent<T = unknown> = {
147
- type: EventType.Custom;
148
- data: {
149
- tag: string;
150
- payload: T;
151
- };
152
- };
153
- export type pluginEvent<T = unknown> = {
154
- type: EventType.Plugin;
155
- data: {
156
- plugin: string;
157
- payload: T;
158
- };
159
- };
160
- export type styleOMValue = {
161
- [key: string]: styleValueWithPriority | string | false;
162
- };
163
- export type styleValueWithPriority = [string, string];
164
- export type textMutation = {
165
- id: number;
166
- value: string | null;
167
- };
168
- export type attributeMutation = {
169
- id: number;
170
- attributes: {
171
- [key: string]: string | styleOMValue | null;
172
- };
173
- };
174
- export type removedNodeMutation = {
175
- parentId: number;
176
- id: number;
177
- isShadow?: boolean;
178
- };
179
- export type addedNodeMutation = {
180
- parentId: number;
181
- previousId?: number | null;
182
- nextId: number | null;
183
- node: serializedNodeWithId;
184
- };
185
- export type mutationCallbackParam = {
186
- texts: textMutation[];
187
- attributes: attributeMutation[];
188
- removes: removedNodeMutation[];
189
- adds: addedNodeMutation[];
190
- isAttachIframe?: true;
191
- };
192
- export type mutationData = {
193
- source: IncrementalSource.Mutation;
194
- } & mutationCallbackParam;
195
- export type mousePosition = {
196
- x: number;
197
- y: number;
198
- id: number;
199
- timeOffset: number;
200
- };
201
- export declare enum MouseInteractions {
202
- MouseUp = 0,
203
- MouseDown = 1,
204
- Click = 2,
205
- ContextMenu = 3,
206
- DblClick = 4,
207
- Focus = 5,
208
- Blur = 6,
209
- TouchStart = 7,
210
- TouchMove_Departed = 8,
211
- TouchEnd = 9,
212
- TouchCancel = 10
213
- }
214
- export declare enum PointerTypes {
215
- Mouse = 0,
216
- Pen = 1,
217
- Touch = 2
218
- }
219
- type mouseInteractionParam = {
220
- type: MouseInteractions;
221
- id: number;
222
- x?: number;
223
- y?: number;
224
- pointerType?: PointerTypes;
225
- };
226
- export type mouseInteractionData = {
227
- source: IncrementalSource.MouseInteraction;
228
- } & mouseInteractionParam;
229
- export type mousemoveData = {
230
- source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag;
231
- positions: mousePosition[];
232
- };
233
- export type scrollPosition = {
234
- id: number;
235
- x: number;
236
- y: number;
237
- };
238
- export type scrollData = {
239
- source: IncrementalSource.Scroll;
240
- } & scrollPosition;
241
- export type viewportResizeDimension = {
242
- width: number;
243
- height: number;
244
- };
245
- export type viewportResizeData = {
246
- source: IncrementalSource.ViewportResize;
247
- } & viewportResizeDimension;
248
- export type inputValue = {
249
- text: string;
250
- isChecked: boolean;
251
- userTriggered?: boolean;
252
- };
253
- export type inputData = {
254
- source: IncrementalSource.Input;
255
- id: number;
256
- } & inputValue;
257
- export declare enum MediaInteractions {
258
- Play = 0,
259
- Pause = 1,
260
- Seeked = 2,
261
- VolumeChange = 3,
262
- RateChange = 4
263
- }
264
- export type mediaInteractionParam = {
265
- type: MediaInteractions;
266
- id: number;
267
- currentTime?: number;
268
- volume?: number;
269
- muted?: boolean;
270
- loop?: boolean;
271
- playbackRate?: number;
272
- };
273
- export type mediaInteractionData = {
274
- source: IncrementalSource.MediaInteraction;
275
- } & mediaInteractionParam;
276
- export type styleSheetAddRule = {
277
- rule: string;
278
- index?: number | number[];
279
- };
280
- export type styleSheetDeleteRule = {
281
- index: number | number[];
282
- };
283
- export type styleSheetRuleParam = {
284
- id?: number;
285
- styleId?: number;
286
- removes?: styleSheetDeleteRule[];
287
- adds?: styleSheetAddRule[];
288
- replace?: string;
289
- replaceSync?: string;
290
- };
291
- export type styleSheetRuleData = {
292
- source: IncrementalSource.StyleSheetRule;
293
- } & styleSheetRuleParam;
294
- export declare enum CanvasContext {
295
- '2D' = 0,
296
- WebGL = 1,
297
- WebGL2 = 2
298
- }
299
- export type canvasMutationCommand = {
300
- property: string;
301
- args: Array<unknown>;
302
- setter?: true;
303
- };
304
- export type canvasMutationParam = {
305
- id: number;
306
- type: CanvasContext;
307
- commands: canvasMutationCommand[];
308
- } | ({
309
- id: number;
310
- type: CanvasContext;
311
- } & canvasMutationCommand);
312
- export type canvasMutationData = {
313
- source: IncrementalSource.CanvasMutation;
314
- } & canvasMutationParam;
315
- export type fontParam = {
316
- family: string;
317
- fontSource: string;
318
- buffer: boolean;
319
- descriptors?: FontFaceDescriptors;
320
- };
321
- export type fontData = {
322
- source: IncrementalSource.Font;
323
- } & fontParam;
324
- export type SelectionRange = {
325
- start: number;
326
- startOffset: number;
327
- end: number;
328
- endOffset: number;
329
- };
330
- export type selectionParam = {
331
- ranges: Array<SelectionRange>;
332
- };
333
- export type selectionData = {
334
- source: IncrementalSource.Selection;
335
- } & selectionParam;
336
- export type styleDeclarationParam = {
337
- id?: number;
338
- styleId?: number;
339
- index: number[];
340
- set?: {
341
- property: string;
342
- value: string | null;
343
- priority: string | undefined;
344
- };
345
- remove?: {
346
- property: string;
347
- };
348
- };
349
- export type styleDeclarationData = {
350
- source: IncrementalSource.StyleDeclaration;
351
- } & styleDeclarationParam;
352
- export type adoptedStyleSheetParam = {
353
- id: number;
354
- styles?: {
355
- styleId: number;
356
- rules: styleSheetAddRule[];
357
- }[];
358
- styleIds: number[];
359
- };
360
- export type adoptedStyleSheetData = {
361
- source: IncrementalSource.AdoptedStyleSheet;
362
- } & adoptedStyleSheetParam;
363
- export type customElementParam = {
364
- define?: {
365
- name: string;
366
- };
367
- };
368
- export type customElementData = {
369
- source: IncrementalSource.CustomElement;
370
- } & customElementParam;
371
- export type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData | selectionData | styleDeclarationData | adoptedStyleSheetData | customElementData;
372
- export type incrementalSnapshotEvent = {
373
- type: EventType.IncrementalSnapshot;
374
- data: incrementalData;
375
- };
376
- export type eventWithoutTime = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent | pluginEvent;
377
- export type eventWithTime = eventWithoutTime & {
378
- timestamp: number;
379
- delay?: number;
380
- };
381
- export type mutationCallBack = (m: mutationCallbackParam) => void;
382
- export type mousemoveCallBack = (p: mousePosition[], source: IncrementalSource.MouseMove | IncrementalSource.TouchMove | IncrementalSource.Drag) => void;
383
- export type mouseInteractionCallBack = (d: mouseInteractionParam) => void;
384
- export type scrollCallback = (p: scrollPosition) => void;
385
- export type viewportResizeCallback = (d: viewportResizeDimension) => void;
386
- export type inputCallback = (v: inputValue & {
387
- id: number;
388
- }) => void;
389
- export type mediaInteractionCallback = (p: mediaInteractionParam) => void;
390
- export type styleSheetRuleCallback = (s: styleSheetRuleParam) => void;
391
- export type styleDeclarationCallback = (s: styleDeclarationParam) => void;
392
- export type canvasMutationCallback = (p: canvasMutationParam) => void;
393
- export type fontCallback = (p: fontParam) => void;
394
- export type selectionCallback = (p: selectionParam) => void;
395
- export type customElementCallback = (c: customElementParam) => void;
396
- export type adoptedStyleSheetCallback = (a: adoptedStyleSheetParam) => void;
397
- export type hooksParam = {
398
- mutation?: mutationCallBack;
399
- mousemove?: mousemoveCallBack;
400
- mouseInteraction?: mouseInteractionCallBack;
401
- scroll?: scrollCallback;
402
- viewportResize?: viewportResizeCallback;
403
- input?: inputCallback;
404
- mediaInteaction?: mediaInteractionCallback;
405
- styleSheetRule?: styleSheetRuleCallback;
406
- styleDeclaration?: styleDeclarationCallback;
407
- canvasMutation?: canvasMutationCallback;
408
- font?: fontCallback;
409
- selection?: selectionCallback;
410
- customElement?: customElementCallback;
411
- };
412
- export type SamplingStrategy = Partial<{
413
- mousemove: boolean | number;
414
- mousemoveCallback: number;
415
- mouseInteraction: boolean | Record<string, boolean | undefined>;
416
- scroll: number;
417
- media: number;
418
- input: 'all' | 'last';
419
- canvas: 'all' | number;
420
- }>;
421
- export interface ICrossOriginIframeMirror {
422
- getId(iframe: HTMLIFrameElement, remoteId: number, parentToRemoteMap?: Map<number, number>, remoteToParentMap?: Map<number, number>): number;
423
- getIds(iframe: HTMLIFrameElement, remoteId: number[]): number[];
424
- getRemoteId(iframe: HTMLIFrameElement, parentId: number, map?: Map<number, number>): number;
425
- getRemoteIds(iframe: HTMLIFrameElement, parentId: number[]): number[];
426
- reset(iframe?: HTMLIFrameElement): void;
427
- }
428
- export type RecordPlugin<TOptions = unknown> = {
429
- name: string;
430
- observer?: (cb: (...args: Array<unknown>) => void, win: IWindow, options: TOptions) => listenerHandler;
431
- eventProcessor?: <TExtend>(event: eventWithTime) => eventWithTime & TExtend;
432
- getMirror?: (mirrors: {
433
- nodeMirror: Mirror;
434
- crossOriginIframeMirror: ICrossOriginIframeMirror;
435
- crossOriginIframeStyleMirror: ICrossOriginIframeMirror;
436
- }) => void;
437
- options: TOptions;
438
- };
439
- export {};
@@ -1,83 +0,0 @@
1
- // Type definitions copied from @rrweb/types@2.0.0-alpha.17 and rrweb-snapshot@2.0.0-alpha.17
2
- // Both packages are MIT licensed: https://github.com/rrweb-io/rrweb
3
- //
4
- // These types are copied here to avoid requiring users to install peer dependencies
5
- // solely for TypeScript type information.
6
- //
7
- // Original sources:
8
- // - @rrweb/types: https://github.com/rrweb-io/rrweb/tree/main/packages/@rrweb/types
9
- // - rrweb-snapshot: https://github.com/rrweb-io/rrweb/tree/main/packages/rrweb-snapshot
10
- export var NodeType;
11
- (function (NodeType) {
12
- NodeType[NodeType["Document"] = 0] = "Document";
13
- NodeType[NodeType["DocumentType"] = 1] = "DocumentType";
14
- NodeType[NodeType["Element"] = 2] = "Element";
15
- NodeType[NodeType["Text"] = 3] = "Text";
16
- NodeType[NodeType["CDATA"] = 4] = "CDATA";
17
- NodeType[NodeType["Comment"] = 5] = "Comment";
18
- })(NodeType || (NodeType = {}));
19
- export var EventType;
20
- (function (EventType) {
21
- EventType[EventType["DomContentLoaded"] = 0] = "DomContentLoaded";
22
- EventType[EventType["Load"] = 1] = "Load";
23
- EventType[EventType["FullSnapshot"] = 2] = "FullSnapshot";
24
- EventType[EventType["IncrementalSnapshot"] = 3] = "IncrementalSnapshot";
25
- EventType[EventType["Meta"] = 4] = "Meta";
26
- EventType[EventType["Custom"] = 5] = "Custom";
27
- EventType[EventType["Plugin"] = 6] = "Plugin";
28
- })(EventType || (EventType = {}));
29
- export var IncrementalSource;
30
- (function (IncrementalSource) {
31
- IncrementalSource[IncrementalSource["Mutation"] = 0] = "Mutation";
32
- IncrementalSource[IncrementalSource["MouseMove"] = 1] = "MouseMove";
33
- IncrementalSource[IncrementalSource["MouseInteraction"] = 2] = "MouseInteraction";
34
- IncrementalSource[IncrementalSource["Scroll"] = 3] = "Scroll";
35
- IncrementalSource[IncrementalSource["ViewportResize"] = 4] = "ViewportResize";
36
- IncrementalSource[IncrementalSource["Input"] = 5] = "Input";
37
- IncrementalSource[IncrementalSource["TouchMove"] = 6] = "TouchMove";
38
- IncrementalSource[IncrementalSource["MediaInteraction"] = 7] = "MediaInteraction";
39
- IncrementalSource[IncrementalSource["StyleSheetRule"] = 8] = "StyleSheetRule";
40
- IncrementalSource[IncrementalSource["CanvasMutation"] = 9] = "CanvasMutation";
41
- IncrementalSource[IncrementalSource["Font"] = 10] = "Font";
42
- IncrementalSource[IncrementalSource["Log"] = 11] = "Log";
43
- IncrementalSource[IncrementalSource["Drag"] = 12] = "Drag";
44
- IncrementalSource[IncrementalSource["StyleDeclaration"] = 13] = "StyleDeclaration";
45
- IncrementalSource[IncrementalSource["Selection"] = 14] = "Selection";
46
- IncrementalSource[IncrementalSource["AdoptedStyleSheet"] = 15] = "AdoptedStyleSheet";
47
- IncrementalSource[IncrementalSource["CustomElement"] = 16] = "CustomElement";
48
- })(IncrementalSource || (IncrementalSource = {}));
49
- export var MouseInteractions;
50
- (function (MouseInteractions) {
51
- MouseInteractions[MouseInteractions["MouseUp"] = 0] = "MouseUp";
52
- MouseInteractions[MouseInteractions["MouseDown"] = 1] = "MouseDown";
53
- MouseInteractions[MouseInteractions["Click"] = 2] = "Click";
54
- MouseInteractions[MouseInteractions["ContextMenu"] = 3] = "ContextMenu";
55
- MouseInteractions[MouseInteractions["DblClick"] = 4] = "DblClick";
56
- MouseInteractions[MouseInteractions["Focus"] = 5] = "Focus";
57
- MouseInteractions[MouseInteractions["Blur"] = 6] = "Blur";
58
- MouseInteractions[MouseInteractions["TouchStart"] = 7] = "TouchStart";
59
- MouseInteractions[MouseInteractions["TouchMove_Departed"] = 8] = "TouchMove_Departed";
60
- MouseInteractions[MouseInteractions["TouchEnd"] = 9] = "TouchEnd";
61
- MouseInteractions[MouseInteractions["TouchCancel"] = 10] = "TouchCancel";
62
- })(MouseInteractions || (MouseInteractions = {}));
63
- export var PointerTypes;
64
- (function (PointerTypes) {
65
- PointerTypes[PointerTypes["Mouse"] = 0] = "Mouse";
66
- PointerTypes[PointerTypes["Pen"] = 1] = "Pen";
67
- PointerTypes[PointerTypes["Touch"] = 2] = "Touch";
68
- })(PointerTypes || (PointerTypes = {}));
69
- export var MediaInteractions;
70
- (function (MediaInteractions) {
71
- MediaInteractions[MediaInteractions["Play"] = 0] = "Play";
72
- MediaInteractions[MediaInteractions["Pause"] = 1] = "Pause";
73
- MediaInteractions[MediaInteractions["Seeked"] = 2] = "Seeked";
74
- MediaInteractions[MediaInteractions["VolumeChange"] = 3] = "VolumeChange";
75
- MediaInteractions[MediaInteractions["RateChange"] = 4] = "RateChange";
76
- })(MediaInteractions || (MediaInteractions = {}));
77
- export var CanvasContext;
78
- (function (CanvasContext) {
79
- CanvasContext[CanvasContext["2D"] = 0] = "2D";
80
- CanvasContext[CanvasContext["WebGL"] = 1] = "WebGL";
81
- CanvasContext[CanvasContext["WebGL2"] = 2] = "WebGL2";
82
- })(CanvasContext || (CanvasContext = {}));
83
- //# sourceMappingURL=rrweb-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rrweb-types.js","sourceRoot":"","sources":["../../../../src/extensions/replay/types/rrweb-types.ts"],"names":[],"mappings":"AAAA,6FAA6F;AAC7F,oEAAoE;AACpE,EAAE;AACF,oFAAoF;AACpF,0CAA0C;AAC1C,EAAE;AACF,oBAAoB;AACpB,oFAAoF;AACpF,wFAAwF;AAgDxF,MAAM,CAAN,IAAY,QAOX;AAPD,WAAY,QAAQ;IAChB,+CAAY,CAAA;IACZ,uDAAgB,CAAA;IAChB,6CAAW,CAAA;IACX,uCAAQ,CAAA;IACR,yCAAS,CAAA;IACT,6CAAW,CAAA;AACf,CAAC,EAPW,QAAQ,KAAR,QAAQ,QAOnB;AAiED,MAAM,CAAN,IAAY,SAQX;AARD,WAAY,SAAS;IACjB,iEAAoB,CAAA;IACpB,yCAAQ,CAAA;IACR,yDAAgB,CAAA;IAChB,uEAAuB,CAAA;IACvB,yCAAQ,CAAA;IACR,6CAAU,CAAA;IACV,6CAAU,CAAA;AACd,CAAC,EARW,SAAS,KAAT,SAAS,QAQpB;AAED,MAAM,CAAN,IAAY,iBAkBX;AAlBD,WAAY,iBAAiB;IACzB,iEAAY,CAAA;IACZ,mEAAa,CAAA;IACb,iFAAoB,CAAA;IACpB,6DAAU,CAAA;IACV,6EAAkB,CAAA;IAClB,2DAAS,CAAA;IACT,mEAAa,CAAA;IACb,iFAAoB,CAAA;IACpB,6EAAkB,CAAA;IAClB,6EAAkB,CAAA;IAClB,0DAAS,CAAA;IACT,wDAAQ,CAAA;IACR,0DAAS,CAAA;IACT,kFAAqB,CAAA;IACrB,oEAAc,CAAA;IACd,oFAAsB,CAAA;IACtB,4EAAkB,CAAA;AACtB,CAAC,EAlBW,iBAAiB,KAAjB,iBAAiB,QAkB5B;AAkGD,MAAM,CAAN,IAAY,iBAYX;AAZD,WAAY,iBAAiB;IACzB,+DAAW,CAAA;IACX,mEAAa,CAAA;IACb,2DAAS,CAAA;IACT,uEAAe,CAAA;IACf,iEAAY,CAAA;IACZ,2DAAS,CAAA;IACT,yDAAQ,CAAA;IACR,qEAAc,CAAA;IACd,qFAAsB,CAAA;IACtB,iEAAY,CAAA;IACZ,wEAAgB,CAAA;AACpB,CAAC,EAZW,iBAAiB,KAAjB,iBAAiB,QAY5B;AAED,MAAM,CAAN,IAAY,YAIX;AAJD,WAAY,YAAY;IACpB,iDAAS,CAAA;IACT,6CAAO,CAAA;IACP,iDAAS,CAAA;AACb,CAAC,EAJW,YAAY,KAAZ,YAAY,QAIvB;AAiDD,MAAM,CAAN,IAAY,iBAMX;AAND,WAAY,iBAAiB;IACzB,yDAAQ,CAAA;IACR,2DAAS,CAAA;IACT,6DAAU,CAAA;IACV,yEAAgB,CAAA;IAChB,qEAAc,CAAA;AAClB,CAAC,EANW,iBAAiB,KAAjB,iBAAiB,QAM5B;AAsCD,MAAM,CAAN,IAAY,aAIX;AAJD,WAAY,aAAa;IACrB,6CAAQ,CAAA;IACR,mDAAS,CAAA;IACT,qDAAU,CAAA;AACd,CAAC,EAJW,aAAa,KAAb,aAAa,QAIxB"}
@@ -1,82 +0,0 @@
1
- import type { blockClass, eventWithTime, hooksParam, KeepIframeSrcFn, maskTextClass, PackFn, RecordPlugin, SamplingStrategy } from './rrweb-types';
2
- type MaskInputOptions = Partial<{
3
- color: boolean;
4
- date: boolean;
5
- 'datetime-local': boolean;
6
- email: boolean;
7
- month: boolean;
8
- number: boolean;
9
- range: boolean;
10
- search: boolean;
11
- tel: boolean;
12
- text: boolean;
13
- time: boolean;
14
- url: boolean;
15
- week: boolean;
16
- textarea: boolean;
17
- select: boolean;
18
- password: boolean;
19
- }>;
20
- type MaskInputFn = (text: string, element: HTMLElement) => string;
21
- type MaskTextFn = (text: string, element: HTMLElement | null) => string;
22
- type SlimDOMOptions = Partial<{
23
- script: boolean;
24
- comment: boolean;
25
- headFavicon: boolean;
26
- headWhitespace: boolean;
27
- headMetaDescKeywords: boolean;
28
- headMetaSocial: boolean;
29
- headMetaRobots: boolean;
30
- headMetaHttpEquiv: boolean;
31
- headMetaAuthorship: boolean;
32
- headMetaVerification: boolean;
33
- headTitleMutations: boolean;
34
- }>;
35
- type DataURLOptions = Partial<{
36
- type: string;
37
- quality: number;
38
- }>;
39
- type ErrorHandler = (error: unknown) => void | boolean;
40
- export type recordOptions = {
41
- emit?: (e: eventWithTime, isCheckout?: boolean) => void;
42
- checkoutEveryNth?: number;
43
- checkoutEveryNms?: number;
44
- blockClass?: blockClass;
45
- blockSelector?: string;
46
- ignoreClass?: string;
47
- ignoreSelector?: string;
48
- maskTextClass?: maskTextClass;
49
- maskTextSelector?: string;
50
- maskAllInputs?: boolean;
51
- maskInputOptions?: MaskInputOptions;
52
- maskInputFn?: MaskInputFn;
53
- maskTextFn?: MaskTextFn;
54
- slimDOMOptions?: SlimDOMOptions | 'all' | true;
55
- ignoreCSSAttributes?: Set<string>;
56
- inlineStylesheet?: boolean;
57
- hooks?: hooksParam;
58
- packFn?: PackFn;
59
- sampling?: SamplingStrategy;
60
- dataURLOptions?: DataURLOptions;
61
- recordDOM?: boolean;
62
- recordCanvas?: boolean;
63
- recordCrossOriginIframes?: boolean;
64
- recordAfter?: 'DOMContentLoaded' | 'load';
65
- userTriggeredOnInput?: boolean;
66
- collectFonts?: boolean;
67
- inlineImages?: boolean;
68
- plugins?: RecordPlugin[];
69
- mousemoveWait?: number;
70
- keepIframeSrcFn?: KeepIframeSrcFn;
71
- errorHandler?: ErrorHandler;
72
- };
73
- export type rrwebRecord = {
74
- (options: recordOptions): () => void;
75
- addCustomEvent: (tag: string, payload: any) => void;
76
- takeFullSnapshot: () => void;
77
- mirror: {
78
- getId(n: Node | undefined | null): number;
79
- getNode(id: number): Node | null;
80
- };
81
- };
82
- export {};
@@ -1,9 +0,0 @@
1
- // This file is supposed to replicate some of the types hidden inside `@rrweb/record`
2
- // to guarantee that our users can use this library - and validate types - without
3
- // having to install `@rrweb/record`
4
- //
5
- // NOTE: This file should be updated and kept in sync with `@rrweb/record` if we ever update it.
6
- // NOTE²: The initial types are not exported, we're only exporting the two types at the bottom.
7
- // They're only here to allow the bottom types to be more easily defined.
8
- export {};
9
- //# sourceMappingURL=rrweb.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rrweb.js","sourceRoot":"","sources":["../../../../src/extensions/replay/types/rrweb.ts"],"names":[],"mappings":"AAAA,qFAAqF;AACrF,kFAAkF;AAClF,oCAAoC;AACpC,EAAE;AACF,gGAAgG;AAChG,+FAA+F;AAC/F,gFAAgF"}
@@ -1,4 +0,0 @@
1
- export declare function appendArray(currentValue: string[] | undefined, sampleType: string | string[]): string[];
2
- export declare function updateThreshold(currentValue: number | undefined, percent: number): number;
3
- export declare function simpleHash(str: string): number;
4
- export declare function sampleOnProperty(prop: string, percent: number): boolean;
@@ -1,23 +0,0 @@
1
- import { isArray, isUndefined, clampToRange } from '@posthog/core';
2
- import { logger } from '../utils/logger';
3
- export function appendArray(currentValue, sampleType) {
4
- return [...(currentValue ? currentValue : []), ...(isArray(sampleType) ? sampleType : [sampleType])];
5
- }
6
- export function updateThreshold(currentValue, percent) {
7
- return (isUndefined(currentValue) ? 1 : currentValue) * percent;
8
- }
9
- export function simpleHash(str) {
10
- let hash = 0;
11
- for (let i = 0; i < str.length; i++) {
12
- hash = (hash << 5) - hash + str.charCodeAt(i); // (hash * 31) + char code
13
- hash |= 0; // Convert to 32bit integer
14
- }
15
- return Math.abs(hash);
16
- }
17
- /*
18
- * receives percent as a number between 0 and 1
19
- */
20
- export function sampleOnProperty(prop, percent) {
21
- return simpleHash(prop) % 100 < clampToRange(percent * 100, 0, 100, logger);
22
- }
23
- //# sourceMappingURL=sampling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sampling.js","sourceRoot":"","sources":["../../src/extensions/sampling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAA;AAExC,MAAM,UAAU,WAAW,CAAC,YAAkC,EAAE,UAA6B;IACzF,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;AACxG,CAAC;AAED,MAAM,UAAU,eAAe,CAAC,YAAgC,EAAE,OAAe;IAC7E,OAAO,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,GAAG,OAAO,CAAA;AACnE,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,GAAW;IAClC,IAAI,IAAI,GAAG,CAAC,CAAA;IACZ,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,IAAI,GAAG,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,IAAI,GAAG,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA,CAAC,0BAA0B;QACxE,IAAI,IAAI,CAAC,CAAA,CAAC,2BAA2B;IACzC,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,IAAY,EAAE,OAAe;IAC1D,OAAO,UAAU,CAAC,IAAI,CAAC,GAAG,GAAG,GAAG,YAAY,CAAC,OAAO,GAAG,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,MAAM,CAAC,CAAA;AAC/E,CAAC"}
@@ -1,10 +0,0 @@
1
- export type PosthogJsLogger = {
2
- info: (...args: any[]) => void;
3
- warn: (...args: any[]) => void;
4
- error: (...args: any[]) => void;
5
- critical: (...args: any[]) => void;
6
- uninitializedWarning: (methodName: string) => void;
7
- createLogger: (prefix: string) => PosthogJsLogger;
8
- };
9
- export declare const logger: PosthogJsLogger;
10
- export declare const createLogger: (prefix: string) => PosthogJsLogger;
@@ -1,15 +0,0 @@
1
- const _createLogger = (prefix) => {
2
- return {
3
- info: (...args) => logger.info(prefix, ...args),
4
- warn: (...args) => logger.warn(prefix, ...args),
5
- error: (...args) => logger.error(prefix, ...args),
6
- critical: (...args) => logger.critical(prefix, ...args),
7
- uninitializedWarning: (methodName) => {
8
- logger.error(prefix, `You must initialize Leanbase before calling ${methodName}`);
9
- },
10
- createLogger: (additionalPrefix) => _createLogger(`${prefix} ${additionalPrefix}`),
11
- };
12
- };
13
- export const logger = _createLogger('[Leanbase]');
14
- export const createLogger = _createLogger;
15
- //# sourceMappingURL=logger.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AASA,MAAM,aAAa,GAAG,CAAC,MAAc,EAAmB,EAAE;IACtD,OAAO;QACH,IAAI,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;QACtD,IAAI,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;QACtD,KAAK,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;QACxD,QAAQ,EAAE,CAAC,GAAG,IAAW,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;QAC9D,oBAAoB,EAAE,CAAC,UAAkB,EAAE,EAAE;YACzC,MAAM,CAAC,KAAK,CAAC,MAAM,EAAE,+CAA+C,UAAU,EAAE,CAAC,CAAA;QACrF,CAAC;QACD,YAAY,EAAE,CAAC,gBAAwB,EAAE,EAAE,CAAC,aAAa,CAAC,GAAG,MAAM,IAAI,gBAAgB,EAAE,CAAC;KAC7F,CAAA;AACL,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,aAAa,CAAC,YAAY,CAAC,CAAA;AACjD,MAAM,CAAC,MAAM,YAAY,GAAG,aAAa,CAAA"}