@kubesense/kubesense-browser-rum 1.8.0 → 2.0.0-beta.1
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/LICENSE +1 -1
- package/README.md +23 -0
- package/bundle/chunks/kubesenseProfiler-4b8cfd8f889074788478-kubesense-rum.js +1 -0
- package/bundle/chunks/kubesenseRecorder-db948e96649585a2b3e9-kubesense-rum.js +1 -0
- package/bundle/kubesense-rum.js +1 -1
- package/cjs/boot/kubesenseRecorder.d.ts +6 -0
- package/cjs/boot/kubesenseRecorder.js +75 -0
- package/cjs/boot/kubesenseRecorder.js.map +1 -0
- package/cjs/boot/lazyLoadProfiler.d.ts +3 -4
- package/cjs/boot/lazyLoadProfiler.js +18 -50
- package/cjs/boot/lazyLoadProfiler.js.map +1 -1
- package/cjs/boot/lazyLoadRecorder.d.ts +3 -4
- package/cjs/boot/lazyLoadRecorder.js +18 -50
- package/cjs/boot/lazyLoadRecorder.js.map +1 -1
- package/cjs/boot/postStartStrategy.d.ts +4 -4
- package/cjs/boot/postStartStrategy.js +89 -110
- package/cjs/boot/postStartStrategy.js.map +1 -1
- package/cjs/boot/preStartStrategy.js +21 -21
- package/cjs/boot/preStartStrategy.js.map +1 -1
- package/cjs/boot/profilerApi.js +44 -50
- package/cjs/boot/profilerApi.js.map +1 -1
- package/cjs/boot/recorderApi.d.ts +1 -3
- package/cjs/boot/recorderApi.js +41 -71
- package/cjs/boot/recorderApi.js.map +1 -1
- package/cjs/domain/deflate/deflateEncoder.d.ts +1 -2
- package/cjs/domain/deflate/deflateEncoder.js +94 -108
- package/cjs/domain/deflate/deflateEncoder.js.map +1 -1
- package/cjs/domain/deflate/deflateWorker.d.ts +3 -4
- package/cjs/domain/deflate/deflateWorker.js +79 -90
- package/cjs/domain/deflate/deflateWorker.js.map +1 -1
- package/cjs/domain/deflate/index.d.ts +1 -1
- package/cjs/domain/deflate/index.js +5 -10
- package/cjs/domain/getSessionReplayLink.d.ts +3 -2
- package/cjs/domain/getSessionReplayLink.js +17 -31
- package/cjs/domain/getSessionReplayLink.js.map +1 -1
- package/cjs/domain/profiling/actionHistory.d.ts +10 -0
- package/cjs/domain/profiling/actionHistory.js +37 -0
- package/cjs/domain/profiling/actionHistory.js.map +1 -0
- package/cjs/domain/profiling/kubesenseProfiler.d.ts +6 -0
- package/cjs/domain/profiling/kubesenseProfiler.js +243 -0
- package/cjs/domain/profiling/kubesenseProfiler.js.map +1 -0
- package/cjs/domain/profiling/longTaskHistory.d.ts +11 -0
- package/cjs/domain/profiling/longTaskHistory.js +22 -0
- package/cjs/domain/profiling/longTaskHistory.js.map +1 -0
- package/cjs/domain/profiling/profilerDebugIds.d.ts +2 -0
- package/cjs/domain/profiling/profilerDebugIds.js +18 -0
- package/cjs/domain/profiling/profilerDebugIds.js.map +1 -0
- package/cjs/domain/profiling/profilingContext.js +20 -25
- package/cjs/domain/profiling/profilingContext.js.map +1 -1
- package/cjs/domain/profiling/profilingSupported.js +6 -8
- package/cjs/domain/profiling/profilingSupported.js.map +1 -1
- package/cjs/domain/profiling/quotaCheck.d.ts +9 -0
- package/cjs/domain/profiling/quotaCheck.js +66 -0
- package/cjs/domain/profiling/quotaCheck.js.map +1 -0
- package/cjs/domain/profiling/test-utils/mockedTrace.d.ts +1 -1
- package/cjs/domain/profiling/transport/buildProfileEvent.d.ts +38 -0
- package/cjs/domain/profiling/transport/buildProfileEvent.js +91 -0
- package/cjs/domain/profiling/transport/buildProfileEvent.js.map +1 -0
- package/cjs/domain/profiling/transport/formDataEmitter.d.ts +5 -0
- package/cjs/domain/profiling/transport/formDataEmitter.js +17 -0
- package/cjs/domain/profiling/transport/formDataEmitter.js.map +1 -0
- package/cjs/domain/profiling/transport/profilingBridge.d.ts +2 -0
- package/cjs/domain/profiling/transport/profilingBridge.js +12 -0
- package/cjs/domain/profiling/transport/profilingBridge.js.map +1 -0
- package/cjs/domain/profiling/{types/rumProfiler.types.d.ts → types.d.ts} +13 -24
- package/cjs/domain/profiling/utils/getCustomOrDefaultViewName.js +5 -5
- package/cjs/domain/profiling/utils/getCustomOrDefaultViewName.js.map +1 -1
- package/cjs/domain/profiling/utils/getDefaultViewName.js +6 -10
- package/cjs/domain/profiling/utils/getDefaultViewName.js.map +1 -1
- package/cjs/domain/profiling/vitalHistory.d.ts +13 -0
- package/cjs/domain/profiling/vitalHistory.js +56 -0
- package/cjs/domain/profiling/vitalHistory.js.map +1 -0
- package/cjs/domain/record/assembly.d.ts +2 -1
- package/cjs/domain/record/assembly.js +15 -14
- package/cjs/domain/record/assembly.js.map +1 -1
- package/cjs/domain/record/canvas/canvasHash.d.ts +2 -0
- package/cjs/domain/record/canvas/canvasHash.js +33 -0
- package/cjs/domain/record/canvas/canvasHash.js.map +1 -0
- package/cjs/domain/record/canvas/canvasManager.d.ts +42 -0
- package/cjs/domain/record/canvas/canvasManager.js +99 -0
- package/cjs/domain/record/canvas/canvasManager.js.map +1 -0
- package/cjs/domain/record/canvas/canvasSnapshot.d.ts +8 -0
- package/cjs/domain/record/canvas/canvasSnapshot.js +40 -0
- package/cjs/domain/record/canvas/canvasSnapshot.js.map +1 -0
- package/cjs/domain/record/canvas/canvasUtils.d.ts +2 -0
- package/cjs/domain/record/canvas/canvasUtils.js +14 -0
- package/cjs/domain/record/canvas/canvasUtils.js.map +1 -0
- package/cjs/domain/record/elementsScrollPositions.js +17 -20
- package/cjs/domain/record/elementsScrollPositions.js.map +1 -1
- package/cjs/domain/record/encoding/changeDecoder.d.ts +39 -0
- package/cjs/domain/record/encoding/changeDecoder.js +152 -0
- package/cjs/domain/record/encoding/changeDecoder.js.map +1 -0
- package/cjs/domain/record/encoding/changeEncoder.d.ts +39 -0
- package/cjs/domain/record/encoding/changeEncoder.js +146 -0
- package/cjs/domain/record/encoding/changeEncoder.js.map +1 -0
- package/cjs/domain/record/encoding/index.d.ts +10 -0
- package/cjs/domain/record/encoding/itemIds.d.ts +32 -0
- package/cjs/domain/record/encoding/itemIds.js +49 -0
- package/cjs/domain/record/encoding/itemIds.js.map +1 -0
- package/cjs/domain/record/encoding/roles.d.ts +52 -0
- package/cjs/domain/record/encoding/roles.js +66 -0
- package/cjs/domain/record/encoding/roles.js.map +1 -0
- package/cjs/domain/record/encoding/stringIds.d.ts +15 -0
- package/cjs/domain/record/encoding/stringIds.js +47 -0
- package/cjs/domain/record/encoding/stringIds.js.map +1 -0
- package/cjs/domain/record/encoding/stringTable.d.ts +15 -0
- package/cjs/domain/record/encoding/stringTable.js +38 -0
- package/cjs/domain/record/encoding/stringTable.js.map +1 -0
- package/cjs/domain/record/eventsUtils.js +9 -10
- package/cjs/domain/record/eventsUtils.js.map +1 -1
- package/cjs/domain/record/index.d.ts +5 -2
- package/cjs/domain/record/index.js +13 -17
- package/cjs/domain/record/internalApi.d.ts +6 -6
- package/cjs/domain/record/internalApi.js +55 -49
- package/cjs/domain/record/internalApi.js.map +1 -1
- package/cjs/domain/record/mutationBatch.d.ts +1 -0
- package/cjs/domain/record/mutationBatch.js +38 -39
- package/cjs/domain/record/mutationBatch.js.map +1 -1
- package/cjs/domain/record/record.d.ts +7 -1
- package/cjs/domain/record/record.js +76 -87
- package/cjs/domain/record/record.js.map +1 -1
- package/cjs/domain/record/record.types.d.ts +1 -0
- package/cjs/domain/record/recordingScope.d.ts +7 -3
- package/cjs/domain/record/recordingScope.js +25 -11
- package/cjs/domain/record/recordingScope.js.map +1 -1
- package/cjs/domain/record/serialization/index.d.ts +4 -2
- package/cjs/domain/record/serialization/index.js +16 -18
- package/cjs/domain/record/serialization/insertionCursor.d.ts +57 -0
- package/cjs/domain/record/serialization/insertionCursor.js +55 -0
- package/cjs/domain/record/serialization/insertionCursor.js.map +1 -0
- package/cjs/domain/record/serialization/serialization.types.d.ts +0 -6
- package/cjs/domain/record/serialization/serializationStats.js +26 -25
- package/cjs/domain/record/serialization/serializationStats.js.map +1 -1
- package/cjs/domain/record/serialization/serializationTransaction.d.ts +44 -22
- package/cjs/domain/record/serialization/serializationTransaction.js +90 -36
- package/cjs/domain/record/serialization/serializationTransaction.js.map +1 -1
- package/cjs/domain/record/serialization/serializationUtils.d.ts +0 -1
- package/cjs/domain/record/serialization/serializationUtils.js +46 -75
- package/cjs/domain/record/serialization/serializationUtils.js.map +1 -1
- package/cjs/domain/record/serialization/serializeAttribute.js +24 -39
- package/cjs/domain/record/serialization/serializeAttribute.js.map +1 -1
- package/cjs/domain/record/serialization/serializeAttributes.d.ts +2 -2
- package/cjs/domain/record/serialization/serializeAttributes.js +100 -152
- package/cjs/domain/record/serialization/serializeAttributes.js.map +1 -1
- package/cjs/domain/record/serialization/serializeFullSnapshot.d.ts +5 -0
- package/cjs/domain/record/serialization/serializeFullSnapshot.js +14 -0
- package/cjs/domain/record/serialization/serializeFullSnapshot.js.map +1 -0
- package/cjs/domain/record/serialization/serializeMutations.d.ts +5 -0
- package/cjs/domain/record/serialization/serializeMutations.js +152 -0
- package/cjs/domain/record/serialization/serializeMutations.js.map +1 -0
- package/cjs/domain/record/serialization/serializeNode.d.ts +3 -6
- package/cjs/domain/record/serialization/serializeNode.js +116 -144
- package/cjs/domain/record/serialization/serializeNode.js.map +1 -1
- package/cjs/domain/record/shadowRootsController.d.ts +2 -2
- package/cjs/domain/record/shadowRootsController.js +37 -42
- package/cjs/domain/record/shadowRootsController.js.map +1 -1
- package/cjs/domain/record/startFullSnapshots.d.ts +1 -1
- package/cjs/domain/record/startFullSnapshots.js +38 -54
- package/cjs/domain/record/startFullSnapshots.js.map +1 -1
- package/cjs/domain/record/trackers/index.d.ts +2 -1
- package/cjs/domain/record/trackers/index.js +25 -27
- package/cjs/domain/record/trackers/trackCanvasCapture.d.ts +3 -0
- package/cjs/domain/record/trackers/trackCanvasCapture.js +102 -0
- package/cjs/domain/record/trackers/trackCanvasCapture.js.map +1 -0
- package/cjs/domain/record/trackers/trackCanvasContent.d.ts +3 -0
- package/cjs/domain/record/trackers/trackCanvasContent.js +31 -0
- package/cjs/domain/record/trackers/trackCanvasContent.js.map +1 -0
- package/cjs/domain/record/trackers/trackFocus.d.ts +1 -2
- package/cjs/domain/record/trackers/trackFocus.js +15 -13
- package/cjs/domain/record/trackers/trackFocus.js.map +1 -1
- package/cjs/domain/record/trackers/trackInput.d.ts +2 -2
- package/cjs/domain/record/trackers/trackInput.js +129 -102
- package/cjs/domain/record/trackers/trackInput.js.map +1 -1
- package/cjs/domain/record/trackers/trackMediaInteraction.js +22 -26
- package/cjs/domain/record/trackers/trackMediaInteraction.js.map +1 -1
- package/cjs/domain/record/trackers/trackMouseInteraction.js +47 -54
- package/cjs/domain/record/trackers/trackMouseInteraction.js.map +1 -1
- package/cjs/domain/record/trackers/trackMove.js +43 -49
- package/cjs/domain/record/trackers/trackMove.js.map +1 -1
- package/cjs/domain/record/trackers/trackMutation.d.ts +3 -3
- package/cjs/domain/record/trackers/trackMutation.js +42 -267
- package/cjs/domain/record/trackers/trackMutation.js.map +1 -1
- package/cjs/domain/record/trackers/trackScroll.js +36 -44
- package/cjs/domain/record/trackers/trackScroll.js.map +1 -1
- package/cjs/domain/record/trackers/trackStyleSheet.js +75 -84
- package/cjs/domain/record/trackers/trackStyleSheet.js.map +1 -1
- package/cjs/domain/record/trackers/trackViewEnd.js +17 -17
- package/cjs/domain/record/trackers/trackViewEnd.js.map +1 -1
- package/cjs/domain/record/trackers/trackViewportResize.d.ts +2 -3
- package/cjs/domain/record/trackers/trackViewportResize.js +36 -42
- package/cjs/domain/record/trackers/trackViewportResize.js.map +1 -1
- package/cjs/domain/record/viewports.js +32 -50
- package/cjs/domain/record/viewports.js.map +1 -1
- package/cjs/domain/replayStats.d.ts +1 -0
- package/cjs/domain/replayStats.js +36 -44
- package/cjs/domain/replayStats.js.map +1 -1
- package/cjs/domain/scriptLoadingError.js +15 -22
- package/cjs/domain/scriptLoadingError.js.map +1 -1
- package/cjs/domain/segmentCollection/buildReplayPayload.js +22 -23
- package/cjs/domain/segmentCollection/buildReplayPayload.js.map +1 -1
- package/cjs/domain/segmentCollection/buildResourcePayload.d.ts +5 -0
- package/cjs/domain/segmentCollection/buildResourcePayload.js +19 -0
- package/cjs/domain/segmentCollection/buildResourcePayload.js.map +1 -0
- package/cjs/domain/segmentCollection/index.d.ts +3 -0
- package/cjs/domain/segmentCollection/index.js +14 -11
- package/cjs/domain/segmentCollection/replayResourceCollection.d.ts +10 -0
- package/cjs/domain/segmentCollection/replayResourceCollection.js +52 -0
- package/cjs/domain/segmentCollection/replayResourceCollection.js.map +1 -0
- package/cjs/domain/segmentCollection/segment.js +50 -80
- package/cjs/domain/segmentCollection/segment.js.map +1 -1
- package/cjs/domain/segmentCollection/segmentCollection.d.ts +4 -4
- package/cjs/domain/segmentCollection/segmentCollection.js +87 -105
- package/cjs/domain/segmentCollection/segmentCollection.js.map +1 -1
- package/cjs/domain/segmentCollection/startDroppedSegmentRecovery.d.ts +16 -0
- package/cjs/domain/segmentCollection/startDroppedSegmentRecovery.js +29 -0
- package/cjs/domain/segmentCollection/startDroppedSegmentRecovery.js.map +1 -0
- package/cjs/domain/segmentCollection/startSegmentTelemetry.js +40 -42
- package/cjs/domain/segmentCollection/startSegmentTelemetry.js.map +1 -1
- package/cjs/domain/startRecordBridge.js +10 -14
- package/cjs/domain/startRecordBridge.js.map +1 -1
- package/cjs/domain/startRecorderInitTelemetry.js +42 -50
- package/cjs/domain/startRecorderInitTelemetry.js.map +1 -1
- package/cjs/entries/internal.d.ts +11 -2
- package/cjs/entries/internal.js +47 -28
- package/cjs/entries/internalSynthetics.js +26 -24
- package/cjs/entries/internalSynthetics.js.map +1 -1
- package/cjs/entries/main.d.ts +5 -3
- package/cjs/entries/main.js +50 -31
- package/cjs/entries/main.js.map +1 -1
- package/cjs/types/index.d.ts +1 -0
- package/cjs/types/profiling.d.ts +313 -0
- package/cjs/types/sessionReplay.d.ts +381 -3
- package/cjs/types/sessionReplayConstants.d.ts +57 -0
- package/cjs/types/sessionReplayConstants.js +104 -47
- package/cjs/types/sessionReplayConstants.js.map +1 -1
- package/esm/boot/kubesenseRecorder.mjs +75 -0
- package/esm/boot/kubesenseRecorder.mjs.map +1 -0
- package/esm/boot/lazyLoadProfiler.mjs +24 -0
- package/esm/boot/lazyLoadProfiler.mjs.map +1 -0
- package/esm/boot/lazyLoadRecorder.mjs +24 -0
- package/esm/boot/lazyLoadRecorder.mjs.map +1 -0
- package/esm/boot/postStartStrategy.mjs +97 -0
- package/esm/boot/postStartStrategy.mjs.map +1 -0
- package/esm/boot/preStartStrategy.mjs +24 -0
- package/esm/boot/preStartStrategy.mjs.map +1 -0
- package/esm/boot/profilerApi.mjs +47 -0
- package/esm/boot/profilerApi.mjs.map +1 -0
- package/esm/boot/recorderApi.mjs +43 -0
- package/esm/boot/recorderApi.mjs.map +1 -0
- package/esm/domain/deflate/deflateEncoder.mjs +96 -0
- package/esm/domain/deflate/deflateEncoder.mjs.map +1 -0
- package/esm/domain/deflate/deflateWorker.mjs +90 -0
- package/esm/domain/deflate/deflateWorker.mjs.map +1 -0
- package/esm/domain/deflate/index.mjs +3 -0
- package/esm/domain/getSessionReplayLink.mjs +21 -0
- package/esm/domain/getSessionReplayLink.mjs.map +1 -0
- package/esm/domain/profiling/actionHistory.mjs +36 -0
- package/esm/domain/profiling/actionHistory.mjs.map +1 -0
- package/esm/domain/profiling/kubesenseProfiler.mjs +242 -0
- package/esm/domain/profiling/kubesenseProfiler.mjs.map +1 -0
- package/esm/domain/profiling/longTaskHistory.mjs +21 -0
- package/esm/domain/profiling/longTaskHistory.mjs.map +1 -0
- package/esm/domain/profiling/profilerDebugIds.mjs +18 -0
- package/esm/domain/profiling/profilerDebugIds.mjs.map +1 -0
- package/esm/domain/profiling/profilingContext.mjs +23 -0
- package/esm/domain/profiling/profilingContext.mjs.map +1 -0
- package/esm/domain/profiling/profilingSupported.mjs +9 -0
- package/esm/domain/profiling/profilingSupported.mjs.map +1 -0
- package/esm/domain/profiling/quotaCheck.mjs +66 -0
- package/esm/domain/profiling/quotaCheck.mjs.map +1 -0
- package/esm/domain/profiling/transport/buildProfileEvent.mjs +90 -0
- package/esm/domain/profiling/transport/buildProfileEvent.mjs.map +1 -0
- package/esm/domain/profiling/transport/formDataEmitter.mjs +17 -0
- package/esm/domain/profiling/transport/formDataEmitter.mjs.map +1 -0
- package/esm/domain/profiling/transport/profilingBridge.mjs +12 -0
- package/esm/domain/profiling/transport/profilingBridge.mjs.map +1 -0
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.mjs +7 -0
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.mjs.map +1 -0
- package/esm/domain/profiling/utils/getDefaultViewName.mjs +10 -0
- package/esm/domain/profiling/utils/getDefaultViewName.mjs.map +1 -0
- package/esm/domain/profiling/vitalHistory.mjs +55 -0
- package/esm/domain/profiling/vitalHistory.mjs.map +1 -0
- package/esm/domain/record/assembly.mjs +17 -0
- package/esm/domain/record/assembly.mjs.map +1 -0
- package/esm/domain/record/canvas/canvasHash.mjs +33 -0
- package/esm/domain/record/canvas/canvasHash.mjs.map +1 -0
- package/esm/domain/record/canvas/canvasManager.mjs +99 -0
- package/esm/domain/record/canvas/canvasManager.mjs.map +1 -0
- package/esm/domain/record/canvas/canvasSnapshot.mjs +38 -0
- package/esm/domain/record/canvas/canvasSnapshot.mjs.map +1 -0
- package/esm/domain/record/canvas/canvasUtils.mjs +13 -0
- package/esm/domain/record/canvas/canvasUtils.mjs.map +1 -0
- package/esm/domain/record/elementsScrollPositions.mjs +20 -0
- package/esm/domain/record/elementsScrollPositions.mjs.map +1 -0
- package/esm/domain/record/encoding/changeDecoder.mjs +152 -0
- package/esm/domain/record/encoding/changeDecoder.mjs.map +1 -0
- package/esm/domain/record/encoding/changeEncoder.mjs +146 -0
- package/esm/domain/record/encoding/changeEncoder.mjs.map +1 -0
- package/esm/domain/record/encoding/itemIds.mjs +47 -0
- package/esm/domain/record/encoding/itemIds.mjs.map +1 -0
- package/esm/domain/record/encoding/roles.mjs +64 -0
- package/esm/domain/record/encoding/roles.mjs.map +1 -0
- package/esm/domain/record/encoding/stringIds.mjs +47 -0
- package/esm/domain/record/encoding/stringIds.mjs.map +1 -0
- package/esm/domain/record/encoding/stringTable.mjs +38 -0
- package/esm/domain/record/encoding/stringTable.mjs.map +1 -0
- package/esm/domain/record/eventsUtils.mjs +13 -0
- package/esm/domain/record/eventsUtils.mjs.map +1 -0
- package/esm/domain/record/index.mjs +8 -0
- package/esm/domain/record/internalApi.mjs +62 -0
- package/esm/domain/record/internalApi.mjs.map +1 -0
- package/esm/domain/record/mutationBatch.mjs +43 -0
- package/esm/domain/record/mutationBatch.mjs.map +1 -0
- package/esm/domain/record/record.mjs +79 -0
- package/esm/domain/record/record.mjs.map +1 -0
- package/esm/domain/record/recordingScope.mjs +27 -0
- package/esm/domain/record/recordingScope.mjs.map +1 -0
- package/esm/domain/record/serialization/index.mjs +9 -0
- package/esm/domain/record/serialization/insertionCursor.mjs +54 -0
- package/esm/domain/record/serialization/insertionCursor.mjs.map +1 -0
- package/esm/domain/record/serialization/serializationStats.mjs +31 -0
- package/esm/domain/record/serialization/serializationStats.mjs.map +1 -0
- package/esm/domain/record/serialization/serializationTransaction.mjs +92 -0
- package/esm/domain/record/serialization/serializationTransaction.mjs.map +1 -0
- package/esm/domain/record/serialization/serializationUtils.mjs +53 -0
- package/esm/domain/record/serialization/serializationUtils.mjs.map +1 -0
- package/esm/domain/record/serialization/serializeAttribute.mjs +26 -0
- package/esm/domain/record/serialization/serializeAttribute.mjs.map +1 -0
- package/esm/domain/record/serialization/serializeAttributes.mjs +113 -0
- package/esm/domain/record/serialization/serializeAttributes.mjs.map +1 -0
- package/esm/domain/record/serialization/serializeFullSnapshot.mjs +14 -0
- package/esm/domain/record/serialization/serializeFullSnapshot.mjs.map +1 -0
- package/esm/domain/record/serialization/serializeMutations.mjs +152 -0
- package/esm/domain/record/serialization/serializeMutations.mjs.map +1 -0
- package/esm/domain/record/serialization/serializeNode.mjs +126 -0
- package/esm/domain/record/serialization/serializeNode.mjs.map +1 -0
- package/esm/domain/record/shadowRootsController.mjs +40 -0
- package/esm/domain/record/shadowRootsController.mjs.map +1 -0
- package/esm/domain/record/startFullSnapshots.mjs +42 -0
- package/esm/domain/record/startFullSnapshots.mjs.map +1 -0
- package/esm/domain/record/trackers/index.mjs +13 -0
- package/esm/domain/record/trackers/trackCanvasCapture.mjs +102 -0
- package/esm/domain/record/trackers/trackCanvasCapture.mjs.map +1 -0
- package/esm/domain/record/trackers/trackCanvasContent.mjs +31 -0
- package/esm/domain/record/trackers/trackCanvasContent.mjs.map +1 -0
- package/esm/domain/record/trackers/trackFocus.mjs +17 -0
- package/esm/domain/record/trackers/trackFocus.mjs.map +1 -0
- package/esm/domain/record/trackers/trackInput.mjs +131 -0
- package/esm/domain/record/trackers/trackInput.mjs.map +1 -0
- package/esm/domain/record/trackers/trackMediaInteraction.mjs +25 -0
- package/esm/domain/record/trackers/trackMediaInteraction.mjs.map +1 -0
- package/esm/domain/record/trackers/trackMouseInteraction.mjs +52 -0
- package/esm/domain/record/trackers/trackMouseInteraction.mjs.map +1 -0
- package/esm/domain/record/trackers/trackMove.mjs +48 -0
- package/esm/domain/record/trackers/trackMove.mjs.map +1 -0
- package/esm/domain/record/trackers/trackMutation.mjs +45 -0
- package/esm/domain/record/trackers/trackMutation.mjs.map +1 -0
- package/esm/domain/record/trackers/trackScroll.mjs +40 -0
- package/esm/domain/record/trackers/trackScroll.mjs.map +1 -0
- package/esm/domain/record/trackers/trackStyleSheet.mjs +79 -0
- package/esm/domain/record/trackers/trackStyleSheet.mjs.map +1 -0
- package/esm/domain/record/trackers/trackViewEnd.mjs +20 -0
- package/esm/domain/record/trackers/trackViewEnd.mjs.map +1 -0
- package/esm/domain/record/trackers/trackViewportResize.mjs +39 -0
- package/esm/domain/record/trackers/trackViewportResize.mjs.map +1 -0
- package/esm/domain/record/viewports.mjs +41 -0
- package/esm/domain/record/viewports.mjs.map +1 -0
- package/esm/domain/replayStats.mjs +46 -0
- package/esm/domain/replayStats.mjs.map +1 -0
- package/esm/domain/scriptLoadingError.mjs +19 -0
- package/esm/domain/scriptLoadingError.mjs.map +1 -0
- package/esm/domain/segmentCollection/buildReplayPayload.mjs +25 -0
- package/esm/domain/segmentCollection/buildReplayPayload.mjs.map +1 -0
- package/esm/domain/segmentCollection/buildResourcePayload.mjs +19 -0
- package/esm/domain/segmentCollection/buildResourcePayload.mjs.map +1 -0
- package/esm/domain/segmentCollection/index.mjs +5 -0
- package/esm/domain/segmentCollection/replayResourceCollection.mjs +52 -0
- package/esm/domain/segmentCollection/replayResourceCollection.mjs.map +1 -0
- package/esm/domain/segmentCollection/segment.mjs +52 -0
- package/esm/domain/segmentCollection/segment.mjs.map +1 -0
- package/esm/domain/segmentCollection/segmentCollection.mjs +87 -0
- package/esm/domain/segmentCollection/segmentCollection.mjs.map +1 -0
- package/esm/domain/segmentCollection/startDroppedSegmentRecovery.mjs +28 -0
- package/esm/domain/segmentCollection/startDroppedSegmentRecovery.mjs.map +1 -0
- package/esm/domain/segmentCollection/startSegmentTelemetry.mjs +45 -0
- package/esm/domain/segmentCollection/startSegmentTelemetry.mjs.map +1 -0
- package/esm/domain/startRecordBridge.mjs +13 -0
- package/esm/domain/startRecordBridge.mjs.map +1 -0
- package/esm/domain/startRecorderInitTelemetry.mjs +47 -0
- package/esm/domain/startRecorderInitTelemetry.mjs.map +1 -0
- package/esm/entries/internal.mjs +8 -0
- package/esm/entries/internalSynthetics.mjs +22 -0
- package/esm/entries/internalSynthetics.mjs.map +1 -0
- package/esm/entries/main.mjs +35 -0
- package/esm/entries/main.mjs.map +1 -0
- package/esm/types/sessionReplayConstants.mjs +97 -0
- package/esm/types/sessionReplayConstants.mjs.map +1 -0
- package/internal/package.json +1 -1
- package/internal-synthetics/package.json +1 -1
- package/package.json +26 -15
- package/src/boot/kubesenseRecorder.ts +134 -0
- package/src/boot/lazyLoadProfiler.ts +6 -7
- package/src/boot/lazyLoadRecorder.ts +6 -7
- package/src/boot/postStartStrategy.ts +18 -16
- package/src/boot/profilerApi.ts +29 -19
- package/src/boot/recorderApi.ts +6 -21
- package/src/domain/deflate/deflateEncoder.ts +3 -8
- package/src/domain/deflate/deflateWorker.ts +8 -13
- package/src/domain/deflate/index.ts +1 -0
- package/src/domain/getSessionReplayLink.ts +15 -11
- package/src/domain/profiling/actionHistory.ts +66 -0
- package/src/domain/profiling/{profiler.ts → kubesenseProfiler.ts} +166 -79
- package/src/domain/profiling/longTaskHistory.ts +45 -0
- package/src/domain/profiling/profilerDebugIds.ts +17 -0
- package/src/domain/profiling/profilingContext.ts +8 -3
- package/src/domain/profiling/profilingSupported.ts +2 -7
- package/src/domain/profiling/quotaCheck.ts +89 -0
- package/src/domain/profiling/test-utils/mockedTrace.ts +1 -2
- package/src/domain/profiling/transport/buildProfileEvent.ts +143 -0
- package/src/domain/profiling/transport/formDataEmitter.ts +17 -0
- package/src/domain/profiling/transport/profilingBridge.ts +9 -0
- package/src/domain/profiling/{types/rumProfiler.types.ts → types.ts} +14 -26
- package/src/domain/profiling/vitalHistory.ts +106 -0
- package/src/domain/record/assembly.ts +5 -3
- package/src/domain/record/canvas/canvasHash.ts +54 -0
- package/src/domain/record/canvas/canvasManager.ts +175 -0
- package/src/domain/record/canvas/canvasSnapshot.ts +52 -0
- package/src/domain/record/canvas/canvasUtils.ts +11 -0
- package/src/domain/record/encoding/changeDecoder.ts +287 -0
- package/src/domain/record/encoding/changeEncoder.ts +327 -0
- package/src/domain/record/encoding/index.ts +19 -0
- package/src/domain/record/encoding/itemIds.ts +84 -0
- package/src/domain/record/encoding/roles.ts +136 -0
- package/src/domain/record/encoding/stringIds.ts +70 -0
- package/src/domain/record/encoding/stringTable.ts +68 -0
- package/src/domain/record/index.ts +5 -2
- package/src/domain/record/internalApi.ts +21 -18
- package/src/domain/record/mutationBatch.ts +14 -3
- package/src/domain/record/record.ts +35 -16
- package/src/domain/record/record.types.ts +1 -0
- package/src/domain/record/recordingScope.ts +28 -5
- package/src/domain/record/serialization/index.ts +4 -2
- package/src/domain/record/serialization/insertionCursor.ts +131 -0
- package/src/domain/record/serialization/serialization.types.ts +0 -16
- package/src/domain/record/serialization/serializationTransaction.ts +191 -37
- package/src/domain/record/serialization/serializationUtils.ts +1 -15
- package/src/domain/record/serialization/serializeAttributes.ts +36 -32
- package/src/domain/record/serialization/serializeFullSnapshot.ts +26 -0
- package/src/domain/record/serialization/serializeMutations.ts +357 -0
- package/src/domain/record/serialization/serializeNode.ts +200 -164
- package/src/domain/record/shadowRootsController.ts +4 -3
- package/src/domain/record/startFullSnapshots.ts +28 -41
- package/src/domain/record/trackers/index.ts +2 -1
- package/src/domain/record/trackers/trackCanvasCapture.ts +137 -0
- package/src/domain/record/trackers/trackCanvasContent.ts +46 -0
- package/src/domain/record/trackers/trackFocus.ts +4 -4
- package/src/domain/record/trackers/trackInput.ts +146 -41
- package/src/domain/record/trackers/trackMediaInteraction.ts +0 -1
- package/src/domain/record/trackers/trackMouseInteraction.ts +1 -2
- package/src/domain/record/trackers/trackMove.ts +0 -1
- package/src/domain/record/trackers/trackMutation.ts +17 -355
- package/src/domain/record/trackers/trackScroll.ts +1 -1
- package/src/domain/record/trackers/trackStyleSheet.ts +1 -1
- package/src/domain/record/trackers/trackViewEnd.ts +1 -1
- package/src/domain/record/trackers/trackViewportResize.ts +7 -16
- package/src/domain/record/trackers/tracker.types.ts +1 -1
- package/src/domain/replayStats.ts +5 -0
- package/src/domain/scriptLoadingError.ts +2 -1
- package/src/domain/segmentCollection/buildResourcePayload.ts +20 -0
- package/src/domain/segmentCollection/index.ts +3 -0
- package/src/domain/segmentCollection/replayResourceCollection.ts +79 -0
- package/src/domain/segmentCollection/segment.ts +2 -1
- package/src/domain/segmentCollection/segmentCollection.ts +14 -13
- package/src/domain/segmentCollection/startDroppedSegmentRecovery.ts +37 -0
- package/src/domain/segmentCollection/startSegmentTelemetry.ts +16 -2
- package/src/domain/startRecorderInitTelemetry.ts +5 -3
- package/src/entries/internal.ts +13 -2
- package/src/entries/internalSynthetics.ts +3 -4
- package/src/entries/main.ts +23 -14
- package/src/types/index.ts +1 -0
- package/src/types/profiling.ts +315 -0
- package/src/types/sessionReplay.ts +395 -3
- package/src/types/sessionReplayConstants.ts +109 -0
- package/bundle/chunks/profiler-6f621c66a29d9f39a9bd-kubesense-rum.js +0 -1
- package/bundle/chunks/recorder-c73b8d42b98d4a01f120-kubesense-rum.js +0 -1
- package/cjs/boot/isBrowserSupported.d.ts +0 -4
- package/cjs/boot/isBrowserSupported.js +0 -17
- package/cjs/boot/isBrowserSupported.js.map +0 -1
- package/cjs/boot/startRecording.d.ts +0 -6
- package/cjs/boot/startRecording.js +0 -45
- package/cjs/boot/startRecording.js.map +0 -1
- package/cjs/domain/deflate/index.js.map +0 -1
- package/cjs/domain/profiling/profiler.d.ts +0 -7
- package/cjs/domain/profiling/profiler.js +0 -244
- package/cjs/domain/profiling/profiler.js.map +0 -1
- package/cjs/domain/profiling/test-utils/mockedTrace.js +0 -57
- package/cjs/domain/profiling/test-utils/mockedTrace.js.map +0 -1
- package/cjs/domain/profiling/transport/assembly.d.ts +0 -21
- package/cjs/domain/profiling/transport/assembly.js +0 -45
- package/cjs/domain/profiling/transport/assembly.js.map +0 -1
- package/cjs/domain/profiling/transport/buildProfileEventAttributes.d.ts +0 -25
- package/cjs/domain/profiling/transport/buildProfileEventAttributes.js +0 -50
- package/cjs/domain/profiling/transport/buildProfileEventAttributes.js.map +0 -1
- package/cjs/domain/profiling/types/index.d.ts +0 -2
- package/cjs/domain/profiling/types/index.js +0 -3
- package/cjs/domain/profiling/types/index.js.map +0 -1
- package/cjs/domain/profiling/types/profilerApi.types.d.ts +0 -58
- package/cjs/domain/profiling/types/profilerApi.types.js +0 -5
- package/cjs/domain/profiling/types/profilerApi.types.js.map +0 -1
- package/cjs/domain/profiling/types/rumProfiler.types.js +0 -3
- package/cjs/domain/profiling/types/rumProfiler.types.js.map +0 -1
- package/cjs/domain/profiling/utils/getNumberOfSamples.d.ts +0 -7
- package/cjs/domain/profiling/utils/getNumberOfSamples.js +0 -18
- package/cjs/domain/profiling/utils/getNumberOfSamples.js.map +0 -1
- package/cjs/domain/record/eventIds.d.ts +0 -4
- package/cjs/domain/record/eventIds.js +0 -16
- package/cjs/domain/record/eventIds.js.map +0 -1
- package/cjs/domain/record/index.js.map +0 -1
- package/cjs/domain/record/nodeIds.d.ts +0 -15
- package/cjs/domain/record/nodeIds.js +0 -32
- package/cjs/domain/record/nodeIds.js.map +0 -1
- package/cjs/domain/record/record.types.js +0 -3
- package/cjs/domain/record/record.types.js.map +0 -1
- package/cjs/domain/record/serialization/index.js.map +0 -1
- package/cjs/domain/record/serialization/serialization.types.js +0 -3
- package/cjs/domain/record/serialization/serialization.types.js.map +0 -1
- package/cjs/domain/record/serialization/serializeDocument.d.ts +0 -3
- package/cjs/domain/record/serialization/serializeDocument.js +0 -11
- package/cjs/domain/record/serialization/serializeDocument.js.map +0 -1
- package/cjs/domain/record/serialization/serializeStyleSheets.d.ts +0 -2
- package/cjs/domain/record/serialization/serializeStyleSheets.js +0 -19
- package/cjs/domain/record/serialization/serializeStyleSheets.js.map +0 -1
- package/cjs/domain/record/trackers/index.js.map +0 -1
- package/cjs/domain/record/trackers/trackFrustration.d.ts +0 -7
- package/cjs/domain/record/trackers/trackFrustration.js +0 -31
- package/cjs/domain/record/trackers/trackFrustration.js.map +0 -1
- package/cjs/domain/record/trackers/tracker.types.js +0 -3
- package/cjs/domain/record/trackers/tracker.types.js.map +0 -1
- package/cjs/domain/segmentCollection/index.js.map +0 -1
- package/cjs/entries/internal.js.map +0 -1
- package/cjs/types/index.js +0 -18
- package/cjs/types/index.js.map +0 -1
- package/cjs/types/sessionReplay.js +0 -7
- package/cjs/types/sessionReplay.js.map +0 -1
- package/esm/boot/isBrowserSupported.d.ts +0 -4
- package/esm/boot/isBrowserSupported.js +0 -14
- package/esm/boot/isBrowserSupported.js.map +0 -1
- package/esm/boot/lazyLoadProfiler.d.ts +0 -4
- package/esm/boot/lazyLoadProfiler.js +0 -18
- package/esm/boot/lazyLoadProfiler.js.map +0 -1
- package/esm/boot/lazyLoadRecorder.d.ts +0 -4
- package/esm/boot/lazyLoadRecorder.js +0 -18
- package/esm/boot/lazyLoadRecorder.js.map +0 -1
- package/esm/boot/postStartStrategy.d.ts +0 -33
- package/esm/boot/postStartStrategy.js +0 -115
- package/esm/boot/postStartStrategy.js.map +0 -1
- package/esm/boot/preStartStrategy.d.ts +0 -6
- package/esm/boot/preStartStrategy.js +0 -21
- package/esm/boot/preStartStrategy.js.map +0 -1
- package/esm/boot/profilerApi.d.ts +0 -2
- package/esm/boot/profilerApi.js +0 -50
- package/esm/boot/profilerApi.js.map +0 -1
- package/esm/boot/recorderApi.d.ts +0 -4
- package/esm/boot/recorderApi.js +0 -70
- package/esm/boot/recorderApi.js.map +0 -1
- package/esm/boot/startRecording.d.ts +0 -6
- package/esm/boot/startRecording.js +0 -42
- package/esm/boot/startRecording.js.map +0 -1
- package/esm/domain/deflate/deflateEncoder.d.ts +0 -3
- package/esm/domain/deflate/deflateEncoder.js +0 -107
- package/esm/domain/deflate/deflateEncoder.js.map +0 -1
- package/esm/domain/deflate/deflateWorker.d.ts +0 -30
- package/esm/domain/deflate/deflateWorker.js +0 -97
- package/esm/domain/deflate/deflateWorker.js.map +0 -1
- package/esm/domain/deflate/index.d.ts +0 -3
- package/esm/domain/deflate/index.js +0 -3
- package/esm/domain/deflate/index.js.map +0 -1
- package/esm/domain/getSessionReplayLink.d.ts +0 -2
- package/esm/domain/getSessionReplayLink.js +0 -32
- package/esm/domain/getSessionReplayLink.js.map +0 -1
- package/esm/domain/profiling/profiler.d.ts +0 -7
- package/esm/domain/profiling/profiler.js +0 -240
- package/esm/domain/profiling/profiler.js.map +0 -1
- package/esm/domain/profiling/profilingContext.d.ts +0 -6
- package/esm/domain/profiling/profilingContext.js +0 -25
- package/esm/domain/profiling/profilingContext.js.map +0 -1
- package/esm/domain/profiling/profilingSupported.d.ts +0 -1
- package/esm/domain/profiling/profilingSupported.js +0 -8
- package/esm/domain/profiling/profilingSupported.js.map +0 -1
- package/esm/domain/profiling/test-utils/mockedTrace.d.ts +0 -3
- package/esm/domain/profiling/test-utils/mockedTrace.js +0 -54
- package/esm/domain/profiling/test-utils/mockedTrace.js.map +0 -1
- package/esm/domain/profiling/transport/assembly.d.ts +0 -21
- package/esm/domain/profiling/transport/assembly.js +0 -42
- package/esm/domain/profiling/transport/assembly.js.map +0 -1
- package/esm/domain/profiling/transport/buildProfileEventAttributes.d.ts +0 -25
- package/esm/domain/profiling/transport/buildProfileEventAttributes.js +0 -47
- package/esm/domain/profiling/transport/buildProfileEventAttributes.js.map +0 -1
- package/esm/domain/profiling/types/index.d.ts +0 -2
- package/esm/domain/profiling/types/index.js +0 -2
- package/esm/domain/profiling/types/index.js.map +0 -1
- package/esm/domain/profiling/types/profilerApi.types.d.ts +0 -58
- package/esm/domain/profiling/types/profilerApi.types.js +0 -4
- package/esm/domain/profiling/types/profilerApi.types.js.map +0 -1
- package/esm/domain/profiling/types/rumProfiler.types.d.ts +0 -72
- package/esm/domain/profiling/types/rumProfiler.types.js +0 -2
- package/esm/domain/profiling/types/rumProfiler.types.js.map +0 -1
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.d.ts +0 -1
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.js +0 -3
- package/esm/domain/profiling/utils/getCustomOrDefaultViewName.js.map +0 -1
- package/esm/domain/profiling/utils/getDefaultViewName.d.ts +0 -1
- package/esm/domain/profiling/utils/getDefaultViewName.js +0 -11
- package/esm/domain/profiling/utils/getDefaultViewName.js.map +0 -1
- package/esm/domain/profiling/utils/getNumberOfSamples.d.ts +0 -7
- package/esm/domain/profiling/utils/getNumberOfSamples.js +0 -15
- package/esm/domain/profiling/utils/getNumberOfSamples.js.map +0 -1
- package/esm/domain/record/assembly.d.ts +0 -2
- package/esm/domain/record/assembly.js +0 -13
- package/esm/domain/record/assembly.js.map +0 -1
- package/esm/domain/record/elementsScrollPositions.d.ts +0 -10
- package/esm/domain/record/elementsScrollPositions.js +0 -20
- package/esm/domain/record/elementsScrollPositions.js.map +0 -1
- package/esm/domain/record/eventIds.d.ts +0 -4
- package/esm/domain/record/eventIds.js +0 -13
- package/esm/domain/record/eventIds.js.map +0 -1
- package/esm/domain/record/eventsUtils.d.ts +0 -2
- package/esm/domain/record/eventsUtils.js +0 -11
- package/esm/domain/record/eventsUtils.js.map +0 -1
- package/esm/domain/record/index.d.ts +0 -7
- package/esm/domain/record/index.js +0 -6
- package/esm/domain/record/index.js.map +0 -1
- package/esm/domain/record/internalApi.d.ts +0 -22
- package/esm/domain/record/internalApi.js +0 -53
- package/esm/domain/record/internalApi.js.map +0 -1
- package/esm/domain/record/mutationBatch.d.ts +0 -12
- package/esm/domain/record/mutationBatch.js +0 -40
- package/esm/domain/record/mutationBatch.js.map +0 -1
- package/esm/domain/record/nodeIds.d.ts +0 -15
- package/esm/domain/record/nodeIds.js +0 -29
- package/esm/domain/record/nodeIds.js.map +0 -1
- package/esm/domain/record/record.d.ts +0 -16
- package/esm/domain/record/record.js +0 -54
- package/esm/domain/record/record.js.map +0 -1
- package/esm/domain/record/record.types.d.ts +0 -4
- package/esm/domain/record/record.types.js +0 -2
- package/esm/domain/record/record.types.js.map +0 -1
- package/esm/domain/record/recordingScope.d.ts +0 -19
- package/esm/domain/record/recordingScope.js +0 -10
- package/esm/domain/record/recordingScope.js.map +0 -1
- package/esm/domain/record/serialization/index.d.ts +0 -8
- package/esm/domain/record/serialization/index.js +0 -7
- package/esm/domain/record/serialization/index.js.map +0 -1
- package/esm/domain/record/serialization/serialization.types.d.ts +0 -28
- package/esm/domain/record/serialization/serialization.types.js +0 -2
- package/esm/domain/record/serialization/serialization.types.js.map +0 -1
- package/esm/domain/record/serialization/serializationStats.d.ts +0 -12
- package/esm/domain/record/serialization/serializationStats.js +0 -27
- package/esm/domain/record/serialization/serializationStats.js.map +0 -1
- package/esm/domain/record/serialization/serializationTransaction.d.ts +0 -45
- package/esm/domain/record/serialization/serializationTransaction.js +0 -35
- package/esm/domain/record/serialization/serializationTransaction.js.map +0 -1
- package/esm/domain/record/serialization/serializationUtils.d.ts +0 -18
- package/esm/domain/record/serialization/serializationUtils.js +0 -80
- package/esm/domain/record/serialization/serializationUtils.js.map +0 -1
- package/esm/domain/record/serialization/serializeAttribute.d.ts +0 -4
- package/esm/domain/record/serialization/serializeAttribute.js +0 -38
- package/esm/domain/record/serialization/serializeAttribute.js.map +0 -1
- package/esm/domain/record/serialization/serializeAttributes.d.ts +0 -7
- package/esm/domain/record/serialization/serializeAttributes.js +0 -161
- package/esm/domain/record/serialization/serializeAttributes.js.map +0 -1
- package/esm/domain/record/serialization/serializeDocument.d.ts +0 -3
- package/esm/domain/record/serialization/serializeDocument.js +0 -8
- package/esm/domain/record/serialization/serializeDocument.js.map +0 -1
- package/esm/domain/record/serialization/serializeNode.d.ts +0 -7
- package/esm/domain/record/serialization/serializeNode.js +0 -149
- package/esm/domain/record/serialization/serializeNode.js.map +0 -1
- package/esm/domain/record/serialization/serializeStyleSheets.d.ts +0 -2
- package/esm/domain/record/serialization/serializeStyleSheets.js +0 -16
- package/esm/domain/record/serialization/serializeStyleSheets.js.map +0 -1
- package/esm/domain/record/shadowRootsController.d.ts +0 -11
- package/esm/domain/record/shadowRootsController.js +0 -41
- package/esm/domain/record/shadowRootsController.js.map +0 -1
- package/esm/domain/record/startFullSnapshots.d.ts +0 -9
- package/esm/domain/record/startFullSnapshots.js +0 -55
- package/esm/domain/record/startFullSnapshots.js.map +0 -1
- package/esm/domain/record/trackers/index.d.ts +0 -12
- package/esm/domain/record/trackers/index.js +0 -12
- package/esm/domain/record/trackers/index.js.map +0 -1
- package/esm/domain/record/trackers/trackFocus.d.ts +0 -5
- package/esm/domain/record/trackers/trackFocus.js +0 -12
- package/esm/domain/record/trackers/trackFocus.js.map +0 -1
- package/esm/domain/record/trackers/trackFrustration.d.ts +0 -7
- package/esm/domain/record/trackers/trackFrustration.js +0 -28
- package/esm/domain/record/trackers/trackFrustration.js.map +0 -1
- package/esm/domain/record/trackers/trackInput.d.ts +0 -4
- package/esm/domain/record/trackers/trackInput.js +0 -101
- package/esm/domain/record/trackers/trackInput.js.map +0 -1
- package/esm/domain/record/trackers/trackMediaInteraction.d.ts +0 -5
- package/esm/domain/record/trackers/trackMediaInteraction.js +0 -26
- package/esm/domain/record/trackers/trackMediaInteraction.js.map +0 -1
- package/esm/domain/record/trackers/trackMouseInteraction.d.ts +0 -5
- package/esm/domain/record/trackers/trackMouseInteraction.js +0 -56
- package/esm/domain/record/trackers/trackMouseInteraction.js.map +0 -1
- package/esm/domain/record/trackers/trackMove.d.ts +0 -9
- package/esm/domain/record/trackers/trackMove.js +0 -51
- package/esm/domain/record/trackers/trackMove.js.map +0 -1
- package/esm/domain/record/trackers/trackMutation.d.ts +0 -11
- package/esm/domain/record/trackers/trackMutation.js +0 -266
- package/esm/domain/record/trackers/trackMutation.js.map +0 -1
- package/esm/domain/record/trackers/trackScroll.d.ts +0 -5
- package/esm/domain/record/trackers/trackScroll.js +0 -45
- package/esm/domain/record/trackers/trackScroll.js.map +0 -1
- package/esm/domain/record/trackers/trackStyleSheet.d.ts +0 -6
- package/esm/domain/record/trackers/trackStyleSheet.js +0 -85
- package/esm/domain/record/trackers/trackStyleSheet.js.map +0 -1
- package/esm/domain/record/trackers/trackViewEnd.d.ts +0 -5
- package/esm/domain/record/trackers/trackViewEnd.js +0 -17
- package/esm/domain/record/trackers/trackViewEnd.js.map +0 -1
- package/esm/domain/record/trackers/trackViewportResize.d.ts +0 -6
- package/esm/domain/record/trackers/trackViewportResize.js +0 -42
- package/esm/domain/record/trackers/trackViewportResize.js.map +0 -1
- package/esm/domain/record/trackers/tracker.types.d.ts +0 -3
- package/esm/domain/record/trackers/tracker.types.js +0 -2
- package/esm/domain/record/trackers/tracker.types.js.map +0 -1
- package/esm/domain/record/viewports.d.ts +0 -20
- package/esm/domain/record/viewports.js +0 -55
- package/esm/domain/record/viewports.js.map +0 -1
- package/esm/domain/replayStats.d.ts +0 -8
- package/esm/domain/replayStats.js +0 -51
- package/esm/domain/replayStats.js.map +0 -1
- package/esm/domain/scriptLoadingError.d.ts +0 -6
- package/esm/domain/scriptLoadingError.js +0 -23
- package/esm/domain/scriptLoadingError.js.map +0 -1
- package/esm/domain/segmentCollection/buildReplayPayload.d.ts +0 -15
- package/esm/domain/segmentCollection/buildReplayPayload.js +0 -23
- package/esm/domain/segmentCollection/buildReplayPayload.js.map +0 -1
- package/esm/domain/segmentCollection/index.d.ts +0 -4
- package/esm/domain/segmentCollection/index.js +0 -4
- package/esm/domain/segmentCollection/index.js.map +0 -1
- package/esm/domain/segmentCollection/segment.d.ts +0 -16
- package/esm/domain/segmentCollection/segment.js +0 -46
- package/esm/domain/segmentCollection/segment.js.map +0 -1
- package/esm/domain/segmentCollection/segmentCollection.d.ts +0 -31
- package/esm/domain/segmentCollection/segmentCollection.js +0 -106
- package/esm/domain/segmentCollection/segmentCollection.js.map +0 -1
- package/esm/domain/segmentCollection/startSegmentTelemetry.d.ts +0 -6
- package/esm/domain/segmentCollection/startSegmentTelemetry.js +0 -44
- package/esm/domain/segmentCollection/startSegmentTelemetry.js.map +0 -1
- package/esm/domain/startRecordBridge.d.ts +0 -5
- package/esm/domain/startRecordBridge.js +0 -14
- package/esm/domain/startRecordBridge.js.map +0 -1
- package/esm/domain/startRecorderInitTelemetry.d.ts +0 -15
- package/esm/domain/startRecorderInitTelemetry.js +0 -52
- package/esm/domain/startRecorderInitTelemetry.js.map +0 -1
- package/esm/entries/internal.d.ts +0 -11
- package/esm/entries/internal.js +0 -4
- package/esm/entries/internal.js.map +0 -1
- package/esm/entries/internalSynthetics.d.ts +0 -2
- package/esm/entries/internalSynthetics.js +0 -23
- package/esm/entries/internalSynthetics.js.map +0 -1
- package/esm/entries/main.d.ts +0 -23
- package/esm/entries/main.js +0 -31
- package/esm/entries/main.js.map +0 -1
- package/esm/types/index.d.ts +0 -2
- package/esm/types/index.js +0 -2
- package/esm/types/index.js.map +0 -1
- package/esm/types/sessionReplay.d.ts +0 -703
- package/esm/types/sessionReplay.js +0 -6
- package/esm/types/sessionReplay.js.map +0 -1
- package/esm/types/sessionReplayConstants.d.ts +0 -49
- package/esm/types/sessionReplayConstants.js +0 -46
- package/esm/types/sessionReplayConstants.js.map +0 -1
- package/src/boot/isBrowserSupported.ts +0 -14
- package/src/boot/startRecording.ts +0 -70
- package/src/domain/profiling/transport/assembly.ts +0 -78
- package/src/domain/profiling/transport/buildProfileEventAttributes.ts +0 -66
- package/src/domain/profiling/types/index.ts +0 -2
- package/src/domain/profiling/types/profilerApi.types.ts +0 -87
- package/src/domain/profiling/utils/getNumberOfSamples.ts +0 -16
- package/src/domain/record/eventIds.ts +0 -17
- package/src/domain/record/nodeIds.ts +0 -46
- package/src/domain/record/serialization/serializeDocument.ts +0 -13
- package/src/domain/record/serialization/serializeStyleSheets.ts +0 -18
- package/src/domain/record/trackers/trackFrustration.ts +0 -41
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
//#region src/domain/record/encoding/itemIds.ts
|
|
2
|
+
function createEventIds() {
|
|
3
|
+
return createWeakIdMap(1);
|
|
4
|
+
}
|
|
5
|
+
function createNodeIds() {
|
|
6
|
+
return createWeakIdMap(0);
|
|
7
|
+
}
|
|
8
|
+
function createStyleSheetIds() {
|
|
9
|
+
return createWeakIdMap(0);
|
|
10
|
+
}
|
|
11
|
+
function createWeakIdMap(firstId) {
|
|
12
|
+
return createItemIds(() => /* @__PURE__ */ new WeakMap(), firstId);
|
|
13
|
+
}
|
|
14
|
+
function createItemIds(createMap, firstId) {
|
|
15
|
+
let map = createMap();
|
|
16
|
+
let nextId = firstId;
|
|
17
|
+
const get = (object) => map.get(object);
|
|
18
|
+
return {
|
|
19
|
+
clear() {
|
|
20
|
+
if (nextId === firstId) return;
|
|
21
|
+
map = createMap();
|
|
22
|
+
nextId = firstId;
|
|
23
|
+
},
|
|
24
|
+
delete(object) {
|
|
25
|
+
map.delete(object);
|
|
26
|
+
},
|
|
27
|
+
get,
|
|
28
|
+
getOrInsert(object) {
|
|
29
|
+
let id = get(object);
|
|
30
|
+
if (id === void 0) {
|
|
31
|
+
id = nextId++;
|
|
32
|
+
map.set(object, id);
|
|
33
|
+
}
|
|
34
|
+
return id;
|
|
35
|
+
},
|
|
36
|
+
get nextId() {
|
|
37
|
+
return nextId;
|
|
38
|
+
},
|
|
39
|
+
get size() {
|
|
40
|
+
return nextId - firstId;
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
exports.createEventIds = createEventIds;
|
|
46
|
+
exports.createNodeIds = createNodeIds;
|
|
47
|
+
exports.createStyleSheetIds = createStyleSheetIds;
|
|
48
|
+
|
|
49
|
+
//# sourceMappingURL=itemIds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"itemIds.js","names":[],"sources":["../../../../src/domain/record/encoding/itemIds.ts"],"sourcesContent":["export type EventId = number & { __brand: 'EventId' }\nexport type EventIds = ItemIds<Event, EventId>\nexport const enum EventIdConstants {\n FIRST_ID = 1,\n}\nexport function createEventIds(): EventIds {\n return createWeakIdMap(EventIdConstants.FIRST_ID as EventId)\n}\n\nexport type NodeId = number & { __brand: 'NodeId' }\nexport type NodeIds = ItemIds<Node, NodeId>\nexport const enum NodeIdConstants {\n FIRST_ID = 0,\n}\nexport function createNodeIds(): NodeIds {\n return createWeakIdMap(NodeIdConstants.FIRST_ID as NodeId)\n}\n\nexport type StyleSheetId = number & { __brand: 'StyleSheetId' }\nexport type StyleSheetIds = ItemIds<CSSStyleSheet, StyleSheetId>\nexport const enum StyleSheetIdConstants {\n FIRST_ID = 0,\n}\nexport function createStyleSheetIds(): StyleSheetIds {\n return createWeakIdMap(StyleSheetIdConstants.FIRST_ID as StyleSheetId)\n}\n\nexport interface ItemIds<ItemType, ItemId extends number> {\n clear(this: void): void\n delete(this: void, item: ItemType): void\n get(this: void, item: ItemType): ItemId | undefined\n getOrInsert(this: void, item: ItemType): ItemId\n get nextId(): ItemId\n get size(): number\n}\n\nfunction createWeakIdMap<ItemType extends object, ItemId extends number>(firstId: ItemId): ItemIds<ItemType, ItemId> {\n return createItemIds(() => new WeakMap<ItemType, ItemId>(), firstId)\n}\n\ninterface MapLike<Key, Value> {\n delete(key: Key): void\n get(key: Key): Value | undefined\n set(key: Key, value: Value): void\n}\n\nfunction createItemIds<ItemType, ItemId extends number>(\n createMap: () => MapLike<ItemType, ItemId>,\n firstId: ItemId\n): ItemIds<ItemType, ItemId> {\n let map = createMap()\n let nextId = firstId\n\n const get = (object: ItemType): ItemId | undefined => map.get(object)\n\n return {\n clear(): void {\n if (nextId === firstId) {\n return\n }\n map = createMap()\n nextId = firstId\n },\n delete(object: ItemType): void {\n map.delete(object)\n },\n get,\n getOrInsert(object: ItemType): ItemId {\n // Try to reuse any existing id.\n let id = get(object)\n if (id === undefined) {\n id = nextId++ as ItemId\n map.set(object, id)\n }\n return id\n },\n get nextId(): ItemId {\n return nextId\n },\n get size(): number {\n return nextId - firstId\n },\n }\n}\n"],"mappings":";AAKA,SAAgB,iBAA2B;CACzC,OAAO,gBAAA,CAAoD;AAC7D;AAOA,SAAgB,gBAAyB;CACvC,OAAO,gBAAA,CAAkD;AAC3D;AAOA,SAAgB,sBAAqC;CACnD,OAAO,gBAAA,CAA8D;AACvE;AAWA,SAAS,gBAAgE,SAA4C;CACnH,OAAO,oCAAoB,IAAI,QAA0B,GAAG,OAAO;AACrE;AAQA,SAAS,cACP,WACA,SAC2B;CAC3B,IAAI,MAAM,UAAU;CACpB,IAAI,SAAS;CAEb,MAAM,OAAO,WAAyC,IAAI,IAAI,MAAM;CAEpE,OAAO;EACL,QAAc;GACZ,IAAI,WAAW,SACb;GAEF,MAAM,UAAU;GAChB,SAAS;EACX;EACA,OAAO,QAAwB;GAC7B,IAAI,OAAO,MAAM;EACnB;EACA;EACA,YAAY,QAA0B;GAEpC,IAAI,KAAK,IAAI,MAAM;GACnB,IAAI,OAAO,KAAA,GAAW;IACpB,KAAK;IACL,IAAI,IAAI,QAAQ,EAAE;GACpB;GACA,OAAO;EACT;EACA,IAAI,SAAiB;GACnB,OAAO;EACT;EACA,IAAI,OAAe;GACjB,OAAO,SAAS;EAClB;CACF;AACF"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { AddNodeChange, RoleAnnotatedStringLiteral, StringLiteral, StringOrStringReference, StringReference } from '../../../types';
|
|
2
|
+
import { StringRole } from '../../../types';
|
|
3
|
+
import type { NodeId } from './itemIds';
|
|
4
|
+
/** The node name of an AddNode change operation, in its role-annotated form. */
|
|
5
|
+
export type RoleAnnotatedAddNodeName<NodeChange extends AddNodeChange> = Exclude<NodeChange[1], StringLiteral | StringReference>;
|
|
6
|
+
/**
|
|
7
|
+
* The node-type-specific parameters of an AddNode change operation, with every string
|
|
8
|
+
* in its role-annotated form.
|
|
9
|
+
*/
|
|
10
|
+
export type RoleAnnotatedAddNodeParams<NodeChange extends AddNodeChange> = NodeChange extends [
|
|
11
|
+
any,
|
|
12
|
+
any,
|
|
13
|
+
...infer Params
|
|
14
|
+
] ? RoleAnnotatedParams<Params> : never;
|
|
15
|
+
type RoleAnnotatedParams<Params> = {
|
|
16
|
+
[Index in keyof Params]: RoleAnnotatedParam<Params[Index]>;
|
|
17
|
+
};
|
|
18
|
+
type RoleAnnotatedParam<Param> = Param extends StringOrStringReference ? RoleAnnotatedStringLiteral : RoleAnnotatedParams<Param>;
|
|
19
|
+
/**
|
|
20
|
+
* An attribute change whose strings are all annotated with their roles. The node id is a number
|
|
21
|
+
* rather than a string, so it is unaffected.
|
|
22
|
+
*/
|
|
23
|
+
export type RoleAnnotatedAttributeChange = [NodeId, ...RoleAnnotatedAttributeAssignmentOrDeletion[]];
|
|
24
|
+
/** An attribute assignment, annotated with string roles. */
|
|
25
|
+
export type RoleAnnotatedAttributeAssignment = [RoleAnnotatedStringLiteral, RoleAnnotatedStringLiteral];
|
|
26
|
+
/** An attribute assignment or deletion, annotated with string roles. */
|
|
27
|
+
export type RoleAnnotatedAttributeAssignmentOrDeletion = [
|
|
28
|
+
RoleAnnotatedStringLiteral,
|
|
29
|
+
RoleAnnotatedStringLiteral
|
|
30
|
+
] | [RoleAnnotatedStringLiteral];
|
|
31
|
+
/** The string literal portion of a role-annotated string literal type. */
|
|
32
|
+
export type RoleAnnotatedStringLiteralValue<Literal> = Literal extends RoleAnnotatedStringLiteral ? Literal['string'] : never;
|
|
33
|
+
/** The rules of a stylesheet, annotated with their roles. */
|
|
34
|
+
export type RoleAnnotatedStyleSheetRules = RoleAnnotatedStringLiteral | RoleAnnotatedStringLiteral[];
|
|
35
|
+
/** The media list of a stylesheet, annotated with their roles. */
|
|
36
|
+
export type RoleAnnotatedStyleSheetMediaList = RoleAnnotatedStringLiteral[];
|
|
37
|
+
/** Create a serialized string literal annotated with the given role. */
|
|
38
|
+
export declare function createString<Role extends StringRole, Literal extends string>(role: Role, string: Literal): RoleAnnotatedStringLiteral & {
|
|
39
|
+
role: Role;
|
|
40
|
+
string: Literal;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Given a normalized tag name, an attribute name, and an attribute value, returns a
|
|
44
|
+
* serialized attribute assignment annotated with the appropriate roles.
|
|
45
|
+
*/
|
|
46
|
+
export declare function createAttributeAssignment(tagName: string, attributeName: string, attributeValue: string): RoleAnnotatedAttributeAssignment;
|
|
47
|
+
/**
|
|
48
|
+
* Given a normalized tag name, an attribute name, and an attribute value, returns a
|
|
49
|
+
* serialized attribute assignment or deletion annotated with the appropriate roles.
|
|
50
|
+
*/
|
|
51
|
+
export declare function createAttributeAssignmentOrDeletion(tagName: string, attributeName: string, attributeValue: string | null): RoleAnnotatedAttributeAssignmentOrDeletion;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
const require_sessionReplayConstants = require("../../../types/sessionReplayConstants.js");
|
|
2
|
+
//#region src/domain/record/encoding/roles.ts
|
|
3
|
+
/** Create a serialized string literal annotated with the given role. */
|
|
4
|
+
function createString(role, string) {
|
|
5
|
+
return {
|
|
6
|
+
role,
|
|
7
|
+
string
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Given a normalized tag name, an attribute name, and an attribute value, returns a
|
|
12
|
+
* serialized attribute assignment annotated with the appropriate roles.
|
|
13
|
+
*/
|
|
14
|
+
function createAttributeAssignment(tagName, attributeName, attributeValue) {
|
|
15
|
+
return [createString(require_sessionReplayConstants.StringRole.AttributeName, attributeName), createString(attributeValueRole(tagName, attributeName), attributeValue)];
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Given a normalized tag name, an attribute name, and an attribute value, returns a
|
|
19
|
+
* serialized attribute assignment or deletion annotated with the appropriate roles.
|
|
20
|
+
*/
|
|
21
|
+
function createAttributeAssignmentOrDeletion(tagName, attributeName, attributeValue) {
|
|
22
|
+
const name = createString(require_sessionReplayConstants.StringRole.AttributeName, attributeName);
|
|
23
|
+
if (attributeValue === null) return [name];
|
|
24
|
+
return [name, createString(attributeValueRole(tagName, attributeName), attributeValue)];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Elements whose `value` attribute holds form input. Every other element that carries a `value`
|
|
28
|
+
* attribute — `<li>`, `<button>`, `<meter>`, `<param>`, and the rest — holds an ordinary attribute
|
|
29
|
+
* value there, and masking it would change how the page renders rather than hide anything private.
|
|
30
|
+
*/
|
|
31
|
+
const FORM_ELEMENT_NAMES = /* @__PURE__ */ new Set([
|
|
32
|
+
"input",
|
|
33
|
+
"option",
|
|
34
|
+
"select",
|
|
35
|
+
"textarea"
|
|
36
|
+
]);
|
|
37
|
+
/** Attributes whose value is a URL or a list of URLs. */
|
|
38
|
+
const URL_ATTRIBUTE_NAMES = /* @__PURE__ */ new Set([
|
|
39
|
+
"action",
|
|
40
|
+
"background",
|
|
41
|
+
"cite",
|
|
42
|
+
"data",
|
|
43
|
+
"formaction",
|
|
44
|
+
"href",
|
|
45
|
+
"longdesc",
|
|
46
|
+
"manifest",
|
|
47
|
+
"ping",
|
|
48
|
+
"poster",
|
|
49
|
+
"src",
|
|
50
|
+
"srcset",
|
|
51
|
+
"xlink:href"
|
|
52
|
+
]);
|
|
53
|
+
/** The role that the value of the given attribute plays on the given element. */
|
|
54
|
+
function attributeValueRole(tagName, attributeName) {
|
|
55
|
+
switch (attributeName) {
|
|
56
|
+
case "value": return FORM_ELEMENT_NAMES.has(tagName) ? require_sessionReplayConstants.StringRole.FormInput : require_sessionReplayConstants.StringRole.AttributeValue;
|
|
57
|
+
case "style": return require_sessionReplayConstants.StringRole.Css;
|
|
58
|
+
default: return URL_ATTRIBUTE_NAMES.has(attributeName) ? require_sessionReplayConstants.StringRole.Url : require_sessionReplayConstants.StringRole.AttributeValue;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//#endregion
|
|
62
|
+
exports.createAttributeAssignment = createAttributeAssignment;
|
|
63
|
+
exports.createAttributeAssignmentOrDeletion = createAttributeAssignmentOrDeletion;
|
|
64
|
+
exports.createString = createString;
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=roles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"roles.js","names":["StringRole"],"sources":["../../../../src/domain/record/encoding/roles.ts"],"sourcesContent":["/* eslint-disable id-denylist */\n\nimport type {\n AddNodeChange,\n RoleAnnotatedStringLiteral,\n StringLiteral,\n StringOrStringReference,\n StringReference,\n} from '../../../types'\nimport { StringRole } from '../../../types'\nimport type { NodeId } from './itemIds'\n\n/** The node name of an AddNode change operation, in its role-annotated form. */\nexport type RoleAnnotatedAddNodeName<NodeChange extends AddNodeChange> = Exclude<\n NodeChange[1],\n StringLiteral | StringReference\n>\n\n/**\n * The node-type-specific parameters of an AddNode change operation, with every string\n * in its role-annotated form.\n */\nexport type RoleAnnotatedAddNodeParams<NodeChange extends AddNodeChange> = NodeChange extends [\n any,\n any,\n ...infer Params,\n]\n ? RoleAnnotatedParams<Params>\n : never\n\ntype RoleAnnotatedParams<Params> = { [Index in keyof Params]: RoleAnnotatedParam<Params[Index]> }\n\ntype RoleAnnotatedParam<Param> = Param extends StringOrStringReference\n ? RoleAnnotatedStringLiteral\n : RoleAnnotatedParams<Param>\n\n/**\n * An attribute change whose strings are all annotated with their roles. The node id is a number\n * rather than a string, so it is unaffected.\n */\nexport type RoleAnnotatedAttributeChange = [NodeId, ...RoleAnnotatedAttributeAssignmentOrDeletion[]]\n\n/** An attribute assignment, annotated with string roles. */\nexport type RoleAnnotatedAttributeAssignment = [RoleAnnotatedStringLiteral, RoleAnnotatedStringLiteral]\n\n/** An attribute assignment or deletion, annotated with string roles. */\nexport type RoleAnnotatedAttributeAssignmentOrDeletion =\n [RoleAnnotatedStringLiteral, RoleAnnotatedStringLiteral] | [RoleAnnotatedStringLiteral]\n\n/** The string literal portion of a role-annotated string literal type. */\nexport type RoleAnnotatedStringLiteralValue<Literal> = Literal extends RoleAnnotatedStringLiteral\n ? Literal['string']\n : never\n\n/** The rules of a stylesheet, annotated with their roles. */\nexport type RoleAnnotatedStyleSheetRules = RoleAnnotatedStringLiteral | RoleAnnotatedStringLiteral[]\n\n/** The media list of a stylesheet, annotated with their roles. */\nexport type RoleAnnotatedStyleSheetMediaList = RoleAnnotatedStringLiteral[]\n\n/** Create a serialized string literal annotated with the given role. */\nexport function createString<Role extends StringRole, Literal extends string>(\n role: Role,\n string: Literal\n): RoleAnnotatedStringLiteral & { role: Role; string: Literal } {\n return { role, string }\n}\n\n/**\n * Given a normalized tag name, an attribute name, and an attribute value, returns a\n * serialized attribute assignment annotated with the appropriate roles.\n */\nexport function createAttributeAssignment(\n tagName: string,\n attributeName: string,\n attributeValue: string\n): RoleAnnotatedAttributeAssignment {\n return [\n createString(StringRole.AttributeName, attributeName),\n createString(attributeValueRole(tagName, attributeName), attributeValue),\n ]\n}\n\n/**\n * Given a normalized tag name, an attribute name, and an attribute value, returns a\n * serialized attribute assignment or deletion annotated with the appropriate roles.\n */\nexport function createAttributeAssignmentOrDeletion(\n tagName: string,\n attributeName: string,\n attributeValue: string | null\n): RoleAnnotatedAttributeAssignmentOrDeletion {\n const name = createString(StringRole.AttributeName, attributeName)\n\n if (attributeValue === null) {\n return [name]\n }\n\n return [name, createString(attributeValueRole(tagName, attributeName), attributeValue)]\n}\n\n/**\n * Elements whose `value` attribute holds form input. Every other element that carries a `value`\n * attribute — `<li>`, `<button>`, `<meter>`, `<param>`, and the rest — holds an ordinary attribute\n * value there, and masking it would change how the page renders rather than hide anything private.\n */\nconst FORM_ELEMENT_NAMES = new Set(['input', 'option', 'select', 'textarea'])\n\n/** Attributes whose value is a URL or a list of URLs. */\nconst URL_ATTRIBUTE_NAMES = new Set([\n 'action',\n 'background',\n 'cite',\n 'data',\n 'formaction',\n 'href',\n 'longdesc',\n 'manifest',\n 'ping',\n 'poster',\n 'src',\n 'srcset',\n 'xlink:href',\n])\n\n/** The role that the value of the given attribute plays on the given element. */\nfunction attributeValueRole(tagName: string, attributeName: string): StringRole {\n switch (attributeName) {\n case 'value':\n return FORM_ELEMENT_NAMES.has(tagName) ? StringRole.FormInput : StringRole.AttributeValue\n case 'style':\n return StringRole.Css\n default:\n return URL_ATTRIBUTE_NAMES.has(attributeName) ? StringRole.Url : StringRole.AttributeValue\n }\n}\n"],"mappings":";;;AA6DA,SAAgB,aACd,MACA,QAC8D;CAC9D,OAAO;EAAE;EAAM;CAAO;AACxB;;;;;AAMA,SAAgB,0BACd,SACA,eACA,gBACkC;CAClC,OAAO,CACL,aAAaA,+BAAAA,WAAW,eAAe,aAAa,GACpD,aAAa,mBAAmB,SAAS,aAAa,GAAG,cAAc,CACzE;AACF;;;;;AAMA,SAAgB,oCACd,SACA,eACA,gBAC4C;CAC5C,MAAM,OAAO,aAAaA,+BAAAA,WAAW,eAAe,aAAa;CAEjE,IAAI,mBAAmB,MACrB,OAAO,CAAC,IAAI;CAGd,OAAO,CAAC,MAAM,aAAa,mBAAmB,SAAS,aAAa,GAAG,cAAc,CAAC;AACxF;;;;;;AAOA,MAAM,qCAAqB,IAAI,IAAI;CAAC;CAAS;CAAU;CAAU;AAAU,CAAC;;AAG5E,MAAM,sCAAsB,IAAI,IAAI;CAClC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAGD,SAAS,mBAAmB,SAAiB,eAAmC;CAC9E,QAAQ,eAAR;EACE,KAAK,SACH,OAAO,mBAAmB,IAAI,OAAO,IAAIA,+BAAAA,WAAW,YAAYA,+BAAAA,WAAW;EAC7E,KAAK,SACH,OAAOA,+BAAAA,WAAW;EACpB,SACE,OAAO,oBAAoB,IAAI,aAAa,IAAIA,+BAAAA,WAAW,MAAMA,+BAAAA,WAAW;CAChF;AACF"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RoleAnnotatedStringLiteral } from '../../../types';
|
|
2
|
+
export type StringId = number & {
|
|
3
|
+
__brand: 'StringId';
|
|
4
|
+
};
|
|
5
|
+
export interface StringIds {
|
|
6
|
+
clear(this: void): void;
|
|
7
|
+
get(this: void, literal: RoleAnnotatedStringLiteral): StringId | undefined;
|
|
8
|
+
getOrInsert(this: void, literal: RoleAnnotatedStringLiteral): StringId;
|
|
9
|
+
get size(): number;
|
|
10
|
+
}
|
|
11
|
+
export declare const enum StringIdConstants {
|
|
12
|
+
FIRST_ID = 0,
|
|
13
|
+
SOFT_MAX_SIZE = 1000000
|
|
14
|
+
}
|
|
15
|
+
export declare function createStringIds(): StringIds;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
const require_sessionReplayConstants = require("../../../types/sessionReplayConstants.js");
|
|
2
|
+
//#region src/domain/record/encoding/stringIds.ts
|
|
3
|
+
function createStringIds() {
|
|
4
|
+
const firstId = 0;
|
|
5
|
+
let nextId = firstId;
|
|
6
|
+
let mapsByRole = createMapsByRole();
|
|
7
|
+
const get = (literal) => mapsByRole[literal.role][literal.string];
|
|
8
|
+
return {
|
|
9
|
+
clear() {
|
|
10
|
+
if (nextId === firstId) return;
|
|
11
|
+
mapsByRole = createMapsByRole();
|
|
12
|
+
nextId = firstId;
|
|
13
|
+
},
|
|
14
|
+
get,
|
|
15
|
+
getOrInsert(literal) {
|
|
16
|
+
let id = get(literal);
|
|
17
|
+
if (id === void 0) {
|
|
18
|
+
id = nextId++;
|
|
19
|
+
mapsByRole[literal.role][literal.string] = id;
|
|
20
|
+
}
|
|
21
|
+
return id;
|
|
22
|
+
},
|
|
23
|
+
get size() {
|
|
24
|
+
return nextId - firstId;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
function createMapsByRole() {
|
|
29
|
+
return {
|
|
30
|
+
[require_sessionReplayConstants.StringRole.Default]: createStringIdMap(),
|
|
31
|
+
[require_sessionReplayConstants.StringRole.NodeName]: createStringIdMap(),
|
|
32
|
+
[require_sessionReplayConstants.StringRole.AttributeName]: createStringIdMap(),
|
|
33
|
+
[require_sessionReplayConstants.StringRole.AttributeValue]: createStringIdMap(),
|
|
34
|
+
[require_sessionReplayConstants.StringRole.TextContent]: createStringIdMap(),
|
|
35
|
+
[require_sessionReplayConstants.StringRole.FormInput]: createStringIdMap(),
|
|
36
|
+
[require_sessionReplayConstants.StringRole.Css]: createStringIdMap(),
|
|
37
|
+
[require_sessionReplayConstants.StringRole.Url]: createStringIdMap(),
|
|
38
|
+
[require_sessionReplayConstants.StringRole.ResourceId]: createStringIdMap()
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function createStringIdMap() {
|
|
42
|
+
return Object.create(null);
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
exports.createStringIds = createStringIds;
|
|
46
|
+
|
|
47
|
+
//# sourceMappingURL=stringIds.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringIds.js","names":["StringRole"],"sources":["../../../../src/domain/record/encoding/stringIds.ts"],"sourcesContent":["import type { RoleAnnotatedStringLiteral } from '../../../types'\nimport { StringRole } from '../../../types'\n\nexport type StringId = number & { __brand: 'StringId' }\n\nexport interface StringIds {\n clear(this: void): void\n get(this: void, literal: RoleAnnotatedStringLiteral): StringId | undefined\n getOrInsert(this: void, literal: RoleAnnotatedStringLiteral): StringId\n get size(): number\n}\n\nexport const enum StringIdConstants {\n FIRST_ID = 0,\n\n // An arbitrarily-chosen soft limit on the maximum size of the string id map.\n SOFT_MAX_SIZE = 1000000,\n}\n\ntype StringIdMap = Record<string, StringId | undefined>\ntype StringIdMapsByRole = Record<StringRole, StringIdMap>\n\nexport function createStringIds(): StringIds {\n const firstId = StringIdConstants.FIRST_ID as StringId\n let nextId = firstId\n let mapsByRole = createMapsByRole()\n\n const get = (literal: RoleAnnotatedStringLiteral): StringId | undefined => mapsByRole[literal.role][literal.string]\n\n return {\n clear(): void {\n if (nextId === firstId) {\n return\n }\n mapsByRole = createMapsByRole()\n nextId = firstId\n },\n get,\n getOrInsert(literal: RoleAnnotatedStringLiteral): StringId {\n // Try to reuse any existing id.\n let id = get(literal)\n if (id === undefined) {\n id = nextId++ as StringId\n mapsByRole[literal.role][literal.string] = id\n }\n return id\n },\n get size(): number {\n return nextId - firstId\n },\n }\n}\n\nfunction createMapsByRole(): StringIdMapsByRole {\n return {\n [StringRole.Default]: createStringIdMap(),\n [StringRole.NodeName]: createStringIdMap(),\n [StringRole.AttributeName]: createStringIdMap(),\n [StringRole.AttributeValue]: createStringIdMap(),\n [StringRole.TextContent]: createStringIdMap(),\n [StringRole.FormInput]: createStringIdMap(),\n [StringRole.Css]: createStringIdMap(),\n [StringRole.Url]: createStringIdMap(),\n [StringRole.ResourceId]: createStringIdMap(),\n }\n}\n\nfunction createStringIdMap(): StringIdMap {\n return Object.create(null) as StringIdMap\n}\n"],"mappings":";;AAsBA,SAAgB,kBAA6B;CAC3C,MAAM,UAAA;CACN,IAAI,SAAS;CACb,IAAI,aAAa,iBAAiB;CAElC,MAAM,OAAO,YAA8D,WAAW,QAAQ,KAAK,CAAC,QAAQ;CAE5G,OAAO;EACL,QAAc;GACZ,IAAI,WAAW,SACb;GAEF,aAAa,iBAAiB;GAC9B,SAAS;EACX;EACA;EACA,YAAY,SAA+C;GAEzD,IAAI,KAAK,IAAI,OAAO;GACpB,IAAI,OAAO,KAAA,GAAW;IACpB,KAAK;IACL,WAAW,QAAQ,KAAK,CAAC,QAAQ,UAAU;GAC7C;GACA,OAAO;EACT;EACA,IAAI,OAAe;GACjB,OAAO,SAAS;EAClB;CACF;AACF;AAEA,SAAS,mBAAuC;CAC9C,OAAO;GACJA,+BAAAA,WAAW,UAAU,kBAAkB;GACvCA,+BAAAA,WAAW,WAAW,kBAAkB;GACxCA,+BAAAA,WAAW,gBAAgB,kBAAkB;GAC7CA,+BAAAA,WAAW,iBAAiB,kBAAkB;GAC9CA,+BAAAA,WAAW,cAAc,kBAAkB;GAC3CA,+BAAAA,WAAW,YAAY,kBAAkB;GACzCA,+BAAAA,WAAW,MAAM,kBAAkB;GACnCA,+BAAAA,WAAW,MAAM,kBAAkB;GACnCA,+BAAAA,WAAW,aAAa,kBAAkB;CAC7C;AACF;AAEA,SAAS,oBAAiC;CACxC,OAAO,OAAO,OAAO,IAAI;AAC3B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RoleAnnotatedStringLiteral, StringLiteral, StringOrStringReference } from '../../../types';
|
|
2
|
+
import { StringRole } from '../../../types';
|
|
3
|
+
export interface StringTable {
|
|
4
|
+
add(newString: string, role: StringRole): void;
|
|
5
|
+
/** Remove every string from the table, so that the next string added gets the first id. */
|
|
6
|
+
clear(): void;
|
|
7
|
+
/** The string that the given value holds, whichever form it takes. */
|
|
8
|
+
decode(value: StringOrStringReference): string;
|
|
9
|
+
/**
|
|
10
|
+
* The given value in the form the decoded record should carry it: the string on its own, or the
|
|
11
|
+
* string together with the role it was defined in, depending on how the table was created.
|
|
12
|
+
*/
|
|
13
|
+
decodeAnnotated(value: StringOrStringReference): StringLiteral | RoleAnnotatedStringLiteral;
|
|
14
|
+
}
|
|
15
|
+
export declare function createStringTable(allowObsoleteStringRepresentations?: boolean, keepRoles?: boolean): StringTable;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
const require_sessionReplayConstants = require("../../../types/sessionReplayConstants.js");
|
|
2
|
+
const require_roles = require("./roles.js");
|
|
3
|
+
//#region src/domain/record/encoding/stringTable.ts
|
|
4
|
+
function createStringTable(allowObsoleteStringRepresentations = false, keepRoles = false) {
|
|
5
|
+
const strings = /* @__PURE__ */ new Map();
|
|
6
|
+
const literalOf = (value) => {
|
|
7
|
+
if (typeof value === "string") {
|
|
8
|
+
if (!allowObsoleteStringRepresentations) throw new Error(`Obsolete untagged string literal: ${value}`);
|
|
9
|
+
return require_roles.createString(require_sessionReplayConstants.StringRole.Default, value);
|
|
10
|
+
}
|
|
11
|
+
if (typeof value === "object") {
|
|
12
|
+
if (!allowObsoleteStringRepresentations) throw new Error(`Obsolete string literal outside the string table: ${value.string}`);
|
|
13
|
+
return value;
|
|
14
|
+
}
|
|
15
|
+
const referencedString = strings.get(value);
|
|
16
|
+
if (referencedString === void 0) throw new Error(`Reference to unknown string: ${value}`);
|
|
17
|
+
return referencedString;
|
|
18
|
+
};
|
|
19
|
+
return {
|
|
20
|
+
add(newString, role) {
|
|
21
|
+
strings.set(strings.size, require_roles.createString(role, newString));
|
|
22
|
+
},
|
|
23
|
+
clear() {
|
|
24
|
+
strings.clear();
|
|
25
|
+
},
|
|
26
|
+
decode(value) {
|
|
27
|
+
return literalOf(value).string;
|
|
28
|
+
},
|
|
29
|
+
decodeAnnotated(value) {
|
|
30
|
+
const literal = literalOf(value);
|
|
31
|
+
return keepRoles ? literal : literal.string;
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
exports.createStringTable = createStringTable;
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=stringTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringTable.js","names":["createString","StringRole"],"sources":["../../../../src/domain/record/encoding/stringTable.ts"],"sourcesContent":["import type { RoleAnnotatedStringLiteral, StringLiteral, StringOrStringReference } from '../../../types'\nimport { StringRole } from '../../../types'\nimport { createString } from './roles'\nimport type { StringId } from './stringIds'\n\nexport interface StringTable {\n add(newString: string, role: StringRole): void\n\n /** Remove every string from the table, so that the next string added gets the first id. */\n clear(): void\n\n /** The string that the given value holds, whichever form it takes. */\n decode(value: StringOrStringReference): string\n\n /**\n * The given value in the form the decoded record should carry it: the string on its own, or the\n * string together with the role it was defined in, depending on how the table was created.\n */\n decodeAnnotated(value: StringOrStringReference): StringLiteral | RoleAnnotatedStringLiteral\n}\n\nexport function createStringTable(allowObsoleteStringRepresentations = false, keepRoles = false): StringTable {\n const strings = new Map<StringId, RoleAnnotatedStringLiteral>()\n\n // The string the given value holds, along with the role it holds it in.\n const literalOf = (value: StringOrStringReference): RoleAnnotatedStringLiteral => {\n if (typeof value === 'string') {\n // A plain string literal. The encoder tags every literal it emits with a role, so one\n // without a role means something built this change data outside the encoder.\n if (!allowObsoleteStringRepresentations) {\n throw new Error(`Obsolete untagged string literal: ${value}`)\n }\n // An untagged literal says nothing about what it holds, which is the default role.\n return createString(StringRole.Default, value)\n }\n\n if (typeof value === 'object') {\n // A role-annotated string literal. The encoder gives every string an entry in the\n // string table, so something must have built this change data outside the encoder.\n if (!allowObsoleteStringRepresentations) {\n throw new Error(`Obsolete string literal outside the string table: ${value.string}`)\n }\n return value\n }\n\n const referencedString = strings.get(value as StringId)\n if (referencedString === undefined) {\n throw new Error(`Reference to unknown string: ${value}`)\n }\n return referencedString\n }\n\n return {\n add(newString: string, role: StringRole): void {\n strings.set(strings.size as StringId, createString(role, newString))\n },\n clear(): void {\n strings.clear()\n },\n decode(value: StringOrStringReference): string {\n return literalOf(value).string\n },\n decodeAnnotated(value: StringOrStringReference): StringLiteral | RoleAnnotatedStringLiteral {\n const literal = literalOf(value)\n return keepRoles ? literal : literal.string\n },\n }\n}\n"],"mappings":";;;AAqBA,SAAgB,kBAAkB,qCAAqC,OAAO,YAAY,OAAoB;CAC5G,MAAM,0BAAU,IAAI,IAA0C;CAG9D,MAAM,aAAa,UAA+D;EAChF,IAAI,OAAO,UAAU,UAAU;GAG7B,IAAI,CAAC,oCACH,MAAM,IAAI,MAAM,qCAAqC,OAAO;GAG9D,OAAOA,cAAAA,aAAaC,+BAAAA,WAAW,SAAS,KAAK;EAC/C;EAEA,IAAI,OAAO,UAAU,UAAU;GAG7B,IAAI,CAAC,oCACH,MAAM,IAAI,MAAM,qDAAqD,MAAM,QAAQ;GAErF,OAAO;EACT;EAEA,MAAM,mBAAmB,QAAQ,IAAI,KAAiB;EACtD,IAAI,qBAAqB,KAAA,GACvB,MAAM,IAAI,MAAM,gCAAgC,OAAO;EAEzD,OAAO;CACT;CAEA,OAAO;EACL,IAAI,WAAmB,MAAwB;GAC7C,QAAQ,IAAI,QAAQ,MAAkBD,cAAAA,aAAa,MAAM,SAAS,CAAC;EACrE;EACA,QAAc;GACZ,QAAQ,MAAM;EAChB;EACA,OAAO,OAAwC;GAC7C,OAAO,UAAU,KAAK,CAAC,CAAC;EAC1B;EACA,gBAAgB,OAA4E;GAC1F,MAAM,UAAU,UAAU,KAAK;GAC/B,OAAO,YAAY,UAAU,QAAQ;EACvC;CACF;AACF"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.isTouchEvent = isTouchEvent;
|
|
4
|
-
exports.getEventTarget = getEventTarget;
|
|
5
|
-
const kubesense_browser_rum_core_1 = require("@kubesense/kubesense-browser-rum-core");
|
|
1
|
+
let _kubesense_kubesense_browser_rum_core = require("@kubesense/kubesense-browser-rum-core");
|
|
2
|
+
//#region src/domain/record/eventsUtils.ts
|
|
6
3
|
function isTouchEvent(event) {
|
|
7
|
-
|
|
4
|
+
return Boolean(event.changedTouches);
|
|
8
5
|
}
|
|
9
6
|
function getEventTarget(event) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
return event.target;
|
|
7
|
+
if (event.composed === true && (0, _kubesense_kubesense_browser_rum_core.isNodeShadowHost)(event.target)) return event.composedPath()[0];
|
|
8
|
+
return event.target;
|
|
14
9
|
}
|
|
10
|
+
//#endregion
|
|
11
|
+
exports.getEventTarget = getEventTarget;
|
|
12
|
+
exports.isTouchEvent = isTouchEvent;
|
|
13
|
+
|
|
15
14
|
//# sourceMappingURL=eventsUtils.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"eventsUtils.js","
|
|
1
|
+
{"version":3,"file":"eventsUtils.js","names":["isNodeShadowHost"],"sources":["../../../src/domain/record/eventsUtils.ts"],"sourcesContent":["import { isNodeShadowHost } from '@kubesense/kubesense-browser-rum-core'\n\nexport function isTouchEvent(event: MouseEvent | TouchEvent): event is TouchEvent {\n return Boolean((event as TouchEvent).changedTouches)\n}\n\nexport function getEventTarget(event: Event): Node {\n if (event.composed === true && isNodeShadowHost(event.target as Node)) {\n return event.composedPath()[0] as Node\n }\n return event.target as Node\n}\n"],"mappings":";;AAEA,SAAgB,aAAa,OAAqD;CAChF,OAAO,QAAS,MAAqB,cAAc;AACrD;AAEA,SAAgB,eAAe,OAAoB;CACjD,IAAI,MAAM,aAAa,SAAA,GAAQA,sCAAAA,iBAAAA,CAAiB,MAAM,MAAc,GAClE,OAAO,MAAM,aAAa,CAAC,CAAC;CAE9B,OAAO,MAAM;AACf"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
export { MUTATION_PROCESS_MIN_DELAY } from './mutationBatch';
|
|
2
|
+
export type { EmitResourceCallback } from './record.types';
|
|
1
3
|
export { takeFullSnapshot, takeNodeSnapshot } from './internalApi';
|
|
2
4
|
export { record } from './record';
|
|
5
|
+
export type { ChangeDecoder, ChangeDecoderOptions } from './encoding';
|
|
6
|
+
export { createChangeDecoder } from './encoding';
|
|
3
7
|
export type { SerializationMetric, SerializationStats } from './serialization';
|
|
4
|
-
export {
|
|
5
|
-
export { serializeNode, serializeDocument } from './serialization';
|
|
8
|
+
export { aggregateSerializationStats, createSerializationStats } from './serialization';
|
|
6
9
|
export { createElementsScrollPositions } from './elementsScrollPositions';
|
|
7
10
|
export type { ShadowRootsController } from './shadowRootsController';
|
|
@@ -1,17 +1,13 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
Object.defineProperty(exports, "serializeDocument", { enumerable: true, get: function () { return serialization_2.serializeDocument; } });
|
|
15
|
-
var elementsScrollPositions_1 = require("./elementsScrollPositions");
|
|
16
|
-
Object.defineProperty(exports, "createElementsScrollPositions", { enumerable: true, get: function () { return elementsScrollPositions_1.createElementsScrollPositions; } });
|
|
17
|
-
//# sourceMappingURL=index.js.map
|
|
1
|
+
require("./mutationBatch.js");
|
|
2
|
+
const require_changeDecoder = require("./encoding/changeDecoder.js");
|
|
3
|
+
const require_serializationStats = require("./serialization/serializationStats.js");
|
|
4
|
+
require("./serialization/index.js");
|
|
5
|
+
require("./elementsScrollPositions.js");
|
|
6
|
+
const require_internalApi = require("./internalApi.js");
|
|
7
|
+
const require_record = require("./record.js");
|
|
8
|
+
exports.aggregateSerializationStats = require_serializationStats.aggregateSerializationStats;
|
|
9
|
+
exports.createChangeDecoder = require_changeDecoder.createChangeDecoder;
|
|
10
|
+
exports.createSerializationStats = require_serializationStats.createSerializationStats;
|
|
11
|
+
exports.record = require_record.record;
|
|
12
|
+
exports.takeFullSnapshot = require_internalApi.takeFullSnapshot;
|
|
13
|
+
exports.takeNodeSnapshot = require_internalApi.takeNodeSnapshot;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { RumConfiguration } from '@kubesense/kubesense-browser-rum-core';
|
|
2
|
-
import type { BrowserRecord
|
|
2
|
+
import type { BrowserRecord } from '../../types';
|
|
3
3
|
/**
|
|
4
|
-
* Take a full snapshot of the document, generating the same records that the
|
|
4
|
+
* Take a full snapshot of the document, generating the same records that the browser SDK
|
|
5
5
|
* would generate.
|
|
6
6
|
*
|
|
7
|
-
* This is an internal API function. Be sure to update
|
|
7
|
+
* This is an internal API function. Be sure to update KubeSense-internal callers if you
|
|
8
8
|
* change its signature or behavior.
|
|
9
9
|
*/
|
|
10
10
|
export declare function takeFullSnapshot({ configuration, }?: {
|
|
@@ -12,11 +12,11 @@ export declare function takeFullSnapshot({ configuration, }?: {
|
|
|
12
12
|
}): BrowserRecord[];
|
|
13
13
|
/**
|
|
14
14
|
* Take a snapshot of a DOM node, generating the serialized representation that the
|
|
15
|
-
*
|
|
15
|
+
* browser SDK would generate.
|
|
16
16
|
*
|
|
17
|
-
* This is an internal API function. Be sure to update
|
|
17
|
+
* This is an internal API function. Be sure to update KubeSense-internal callers if you
|
|
18
18
|
* change its signature or behavior.
|
|
19
19
|
*/
|
|
20
20
|
export declare function takeNodeSnapshot(node: Node, { configuration }?: {
|
|
21
21
|
configuration?: Partial<RumConfiguration>;
|
|
22
|
-
}):
|
|
22
|
+
}): BrowserRecord | undefined;
|
|
@@ -1,57 +1,63 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
const require_insertionCursor = require("./serialization/insertionCursor.js");
|
|
2
|
+
const require_serializationTransaction = require("./serialization/serializationTransaction.js");
|
|
3
|
+
const require_canvasManager = require("./canvas/canvasManager.js");
|
|
4
|
+
const require_serializeNode = require("./serialization/serializeNode.js");
|
|
5
|
+
require("./serialization/index.js");
|
|
6
|
+
const require_startFullSnapshots = require("./startFullSnapshots.js");
|
|
7
|
+
const require_recordingScope = require("./recordingScope.js");
|
|
8
|
+
const require_elementsScrollPositions = require("./elementsScrollPositions.js");
|
|
9
|
+
let _kubesense_kubesense_browser_rum_core = require("@kubesense/kubesense-browser-rum-core");
|
|
10
|
+
let _kubesense_kubesense_browser_core = require("@kubesense/kubesense-browser-core");
|
|
11
|
+
let _kubesense_kubesense_js_core_time = require("@kubesense/kubesense-js-core/time");
|
|
12
|
+
//#region src/domain/record/internalApi.ts
|
|
13
13
|
/**
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
function takeFullSnapshot({ configuration
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
14
|
+
* Take a full snapshot of the document, generating the same records that the browser SDK
|
|
15
|
+
* would generate.
|
|
16
|
+
*
|
|
17
|
+
* This is an internal API function. Be sure to update KubeSense-internal callers if you
|
|
18
|
+
* change its signature or behavior.
|
|
19
|
+
*/
|
|
20
|
+
function takeFullSnapshot({ configuration } = {}) {
|
|
21
|
+
const records = [];
|
|
22
|
+
const emitRecord = (record) => {
|
|
23
|
+
records.push(record);
|
|
24
|
+
};
|
|
25
|
+
require_startFullSnapshots.takeFullSnapshot((0, _kubesense_kubesense_js_core_time.timeStampNow)(), 0, emitRecord, _kubesense_kubesense_browser_core.noop, createTemporaryRecordingScope(configuration));
|
|
26
|
+
return records;
|
|
27
27
|
}
|
|
28
28
|
/**
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
* Take a snapshot of a DOM node, generating the serialized representation that the
|
|
30
|
+
* browser SDK would generate.
|
|
31
|
+
*
|
|
32
|
+
* This is an internal API function. Be sure to update KubeSense-internal callers if you
|
|
33
|
+
* change its signature or behavior.
|
|
34
|
+
*/
|
|
35
35
|
function takeNodeSnapshot(node, { configuration } = {}) {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
36
|
+
let nodeSnapshotRecord;
|
|
37
|
+
const emitRecord = (record) => {
|
|
38
|
+
nodeSnapshotRecord = record;
|
|
39
|
+
};
|
|
40
|
+
require_serializationTransaction.serializeInTransaction(0, emitRecord, _kubesense_kubesense_browser_core.noop, createTemporaryRecordingScope(configuration), (0, _kubesense_kubesense_js_core_time.timeStampNow)(), (transaction) => {
|
|
41
|
+
const privacyLevel = (0, _kubesense_kubesense_browser_rum_core.getNodePrivacyLevel)(node, transaction.scope.configuration.defaultPrivacyLevel);
|
|
42
|
+
if (privacyLevel === _kubesense_kubesense_browser_rum_core.NodePrivacyLevel.HIDDEN || privacyLevel === _kubesense_kubesense_browser_rum_core.NodePrivacyLevel.IGNORE) return;
|
|
43
|
+
const cursor = require_insertionCursor.createRootInsertionCursor(transaction.scope.nodeIds);
|
|
44
|
+
require_serializeNode.serializeNode(cursor, node, privacyLevel, transaction);
|
|
45
|
+
});
|
|
46
|
+
return nodeSnapshotRecord;
|
|
45
47
|
}
|
|
46
48
|
function createTemporaryRecordingScope(configuration) {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
49
|
+
return require_recordingScope.createRecordingScope(require_canvasManager.createCanvasManager(), {
|
|
50
|
+
defaultPrivacyLevel: _kubesense_kubesense_browser_rum_core.NodePrivacyLevel.ALLOW,
|
|
51
|
+
...configuration
|
|
52
|
+
}, require_elementsScrollPositions.createElementsScrollPositions(), {
|
|
53
|
+
addShadowRoot: _kubesense_kubesense_browser_core.noop,
|
|
54
|
+
removeShadowRoot: _kubesense_kubesense_browser_core.noop,
|
|
55
|
+
flush: _kubesense_kubesense_browser_core.noop,
|
|
56
|
+
stop: _kubesense_kubesense_browser_core.noop
|
|
57
|
+
});
|
|
56
58
|
}
|
|
59
|
+
//#endregion
|
|
60
|
+
exports.takeFullSnapshot = takeFullSnapshot;
|
|
61
|
+
exports.takeNodeSnapshot = takeNodeSnapshot;
|
|
62
|
+
|
|
57
63
|
//# sourceMappingURL=internalApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internalApi.js","
|
|
1
|
+
{"version":3,"file":"internalApi.js","names":["timeStampNow","noop","getNodePrivacyLevel","NodePrivacyLevel","createRootInsertionCursor","createRecordingScope","createCanvasManager","createElementsScrollPositions"],"sources":["../../../src/domain/record/internalApi.ts"],"sourcesContent":["import { noop } from '@kubesense/kubesense-browser-core'\nimport { timeStampNow } from '@kubesense/kubesense-js-core/time'\nimport type { RumConfiguration } from '@kubesense/kubesense-browser-rum-core'\nimport { getNodePrivacyLevel, NodePrivacyLevel } from '@kubesense/kubesense-browser-rum-core'\nimport type { BrowserRecord } from '../../types'\nimport { takeFullSnapshot as doTakeFullSnapshot } from './startFullSnapshots'\nimport type { RecordingScope } from './recordingScope'\nimport { createRecordingScope } from './recordingScope'\nimport { createElementsScrollPositions } from './elementsScrollPositions'\nimport type { EmitRecordCallback } from './record.types'\nimport type { SerializationTransaction } from './serialization'\nimport { createRootInsertionCursor, SerializationKind, serializeInTransaction, serializeNode } from './serialization'\nimport { createCanvasManager } from './canvas/canvasManager'\n\n/**\n * Take a full snapshot of the document, generating the same records that the browser SDK\n * would generate.\n *\n * This is an internal API function. Be sure to update KubeSense-internal callers if you\n * change its signature or behavior.\n */\nexport function takeFullSnapshot({\n configuration,\n}: { configuration?: Partial<RumConfiguration> } = {}): BrowserRecord[] {\n const records: BrowserRecord[] = []\n const emitRecord: EmitRecordCallback = (record: BrowserRecord) => {\n records.push(record)\n }\n\n doTakeFullSnapshot(\n timeStampNow(),\n SerializationKind.INITIAL_FULL_SNAPSHOT,\n emitRecord,\n noop,\n createTemporaryRecordingScope(configuration)\n )\n\n return records\n}\n\n/**\n * Take a snapshot of a DOM node, generating the serialized representation that the\n * browser SDK would generate.\n *\n * This is an internal API function. Be sure to update KubeSense-internal callers if you\n * change its signature or behavior.\n */\nexport function takeNodeSnapshot(\n node: Node,\n { configuration }: { configuration?: Partial<RumConfiguration> } = {}\n): BrowserRecord | undefined {\n let nodeSnapshotRecord: BrowserRecord | undefined\n const emitRecord = (record: BrowserRecord) => {\n nodeSnapshotRecord = record\n }\n\n serializeInTransaction(\n SerializationKind.INITIAL_FULL_SNAPSHOT,\n emitRecord,\n noop,\n createTemporaryRecordingScope(configuration),\n timeStampNow(),\n (transaction: SerializationTransaction): void => {\n const privacyLevel = getNodePrivacyLevel(node, transaction.scope.configuration.defaultPrivacyLevel)\n if (privacyLevel === NodePrivacyLevel.HIDDEN || privacyLevel === NodePrivacyLevel.IGNORE) {\n return\n }\n const cursor = createRootInsertionCursor(transaction.scope.nodeIds)\n serializeNode(cursor, node, privacyLevel, transaction)\n }\n )\n\n return nodeSnapshotRecord\n}\n\nfunction createTemporaryRecordingScope(configuration?: Partial<RumConfiguration>): RecordingScope {\n return createRecordingScope(\n createCanvasManager(),\n {\n defaultPrivacyLevel: NodePrivacyLevel.ALLOW,\n ...configuration,\n } as RumConfiguration,\n createElementsScrollPositions(),\n {\n addShadowRoot: noop,\n removeShadowRoot: noop,\n flush: noop,\n stop: noop,\n }\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAqBA,SAAgB,iBAAiB,EAC/B,kBACiD,CAAC,GAAoB;CACtE,MAAM,UAA2B,CAAC;CAClC,MAAM,cAAkC,WAA0B;EAChE,QAAQ,KAAK,MAAM;CACrB;CAEA,2BAAA,kBAAA,GACEA,kCAAAA,aAAAA,CAAa,GAAA,GAEb,YACAC,kCAAAA,MACA,8BAA8B,aAAa,CAC7C;CAEA,OAAO;AACT;;;;;;;;AASA,SAAgB,iBACd,MACA,EAAE,kBAAiE,CAAC,GACzC;CAC3B,IAAI;CACJ,MAAM,cAAc,WAA0B;EAC5C,qBAAqB;CACvB;CAEA,iCAAA,uBAAA,GAEE,YACAA,kCAAAA,MACA,8BAA8B,aAAa,IAAA,GAC3CD,kCAAAA,aAAAA,CAAa,IACZ,gBAAgD;EAC/C,MAAM,gBAAA,GAAeE,sCAAAA,oBAAAA,CAAoB,MAAM,YAAY,MAAM,cAAc,mBAAmB;EAClG,IAAI,iBAAiBC,sCAAAA,iBAAiB,UAAU,iBAAiBA,sCAAAA,iBAAiB,QAChF;EAEF,MAAM,SAASC,wBAAAA,0BAA0B,YAAY,MAAM,OAAO;EAClE,sBAAA,cAAc,QAAQ,MAAM,cAAc,WAAW;CACvD,CACF;CAEA,OAAO;AACT;AAEA,SAAS,8BAA8B,eAA2D;CAChG,OAAOC,uBAAAA,qBACLC,sBAAAA,oBAAoB,GACpB;EACE,qBAAqBH,sCAAAA,iBAAiB;EACtC,GAAG;CACL,GACAI,gCAAAA,8BAA8B,GAC9B;EACE,eAAeN,kCAAAA;EACf,kBAAkBA,kCAAAA;EAClB,OAAOA,kCAAAA;EACP,MAAMA,kCAAAA;CACR,CACF;AACF"}
|
|
@@ -7,6 +7,7 @@ import type { RumMutationRecord } from '@kubesense/kubesense-browser-rum-core';
|
|
|
7
7
|
export declare const MUTATION_PROCESS_MIN_DELAY = 16;
|
|
8
8
|
export declare function createMutationBatch(processMutationBatch: (mutations: RumMutationRecord[]) => void): {
|
|
9
9
|
addMutations: (mutations: RumMutationRecord[]) => void;
|
|
10
|
+
notifyContentMutated: () => void;
|
|
10
11
|
flush: () => void;
|
|
11
12
|
stop: () => void;
|
|
12
13
|
};
|