Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 37 additions & 4 deletions lib/cjs/generated/browserSessionReplay.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ export type SnapshotFormatChange = 1;
/**
* Browser-specific. Schema representing an individual change within a BrowserChangeData collection.
*/
export type Change = [0, ...AddStringChange[]] | [1, ...AddNodeChange[]] | [2, ...RemoveNodeChange[]] | [3, ...AttributeChange[]] | [4, ...TextChange[]] | [5, ...SizeChange[]] | [6, ...ScrollPositionChange[]] | [7, ...AddStyleSheetChange[]] | [8, ...AttachedStyleSheetsChange[]] | [9, ...MediaPlaybackStateChange[]] | [10, ...VisualViewportChange[]];
export type Change = [0, ...AddStringChange[]] | [1, ...AddNodeChange[]] | [2, ...RemoveNodeChange[]] | [3, ...AttributeChange[]] | [4, ...TextChange[]] | [5, ...SizeChange[]] | [6, ...ScrollPositionChange[]] | [7, ...AddStyleSheetChange[]] | [8, ...AttachedStyleSheetsChange[]] | [9, ...MediaPlaybackStateChange[]] | [10, ...VisualViewportChange[]] | [11, ...AddStringNamespaceChange[]] | [12, ...AddNamespacedStringChange[]];
/**
* Browser-specific. Schema representing the addition of a string to the string table.
* Browser-specific. Schema representing the addition of a string to the default string namespace.
*/
export type AddStringChange = string;
/**
Expand Down Expand Up @@ -136,9 +136,25 @@ export type AddDocTypeNodeChange = [
StringOrStringReference
];
/**
* Browser-specific. Schema representing a string, either expressed as a literal or as an index into the string table.
* Browser-specific. Schema representing a string, either expressed as a literal, as a literal with an associated string namespace, or as an index into the string table.
*/
export type StringOrStringReference = string | StringReference;
export type StringOrStringReference = StringLiteral | NamespacedStringLiteral | StringReference;
/**
* Browser-specific. Schema representing a string, expressed as a literal.
*/
export type StringLiteral = string;
/**
* Browser-specific. Schema representing a string namespace, either expressed as a literal name or as a numeric reference.
*/
export type StringNamespaceOrStringNamespaceReference = StringNamespaceName | StringNamespaceReference;
/**
* Browser-specific. Schema representing a string namespace, expressed as a literal name.
*/
export type StringNamespaceName = string;
/**
* Browser-specific. Schema representing a string namespace, expressed as a numeric reference. The reference 0 refers to the default string namespace; higher values refer to each additional string namespace, in the order they were created.
*/
export type StringNamespaceReference = number;
/**
* Schema representing the addition of a new #document node.
*
Expand Down Expand Up @@ -303,6 +319,16 @@ export type VisualViewportHeight = number;
* The pinch-zoom scaling factor applied to the visual viewport.
*/
export type VisualViewportScale = number;
/**
* Browser-specific. Schema representing the addition of a new string namespace, identified by name.
*/
export type AddStringNamespaceChange = StringNamespaceName;
/**
* Browser-specific. Schema representing the addition of a sequence of strings to a string namespace.
*
* @minItems 1
*/
export type AddNamespacedStringChange = [StringNamespaceOrStringNamespaceReference, ...StringLiteral[]];
/**
* Browser-specific. Schema of a Record type which contains mutations of a screen.
*/
Expand Down Expand Up @@ -764,6 +790,13 @@ export interface CDataNode {
readonly type: 4;
textContent: '';
}
/**
* Browser-specific. Schema representing a string literal with an associated string namespace.
*/
export interface NamespacedStringLiteral {
namespace: StringNamespaceOrStringNamespaceReference;
string: StringLiteral;
}
/**
* Schema of an AddedNodeMutation.
*/
Expand Down
41 changes: 37 additions & 4 deletions lib/cjs/generated/sessionReplay.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ export type SnapshotFormatChange = 1;
/**
* Browser-specific. Schema representing an individual change within a BrowserChangeData collection.
*/
export type Change = [0, ...AddStringChange[]] | [1, ...AddNodeChange[]] | [2, ...RemoveNodeChange[]] | [3, ...AttributeChange[]] | [4, ...TextChange[]] | [5, ...SizeChange[]] | [6, ...ScrollPositionChange[]] | [7, ...AddStyleSheetChange[]] | [8, ...AttachedStyleSheetsChange[]] | [9, ...MediaPlaybackStateChange[]] | [10, ...VisualViewportChange[]];
export type Change = [0, ...AddStringChange[]] | [1, ...AddNodeChange[]] | [2, ...RemoveNodeChange[]] | [3, ...AttributeChange[]] | [4, ...TextChange[]] | [5, ...SizeChange[]] | [6, ...ScrollPositionChange[]] | [7, ...AddStyleSheetChange[]] | [8, ...AttachedStyleSheetsChange[]] | [9, ...MediaPlaybackStateChange[]] | [10, ...VisualViewportChange[]] | [11, ...AddStringNamespaceChange[]] | [12, ...AddNamespacedStringChange[]];
/**
* Browser-specific. Schema representing the addition of a string to the string table.
* Browser-specific. Schema representing the addition of a string to the default string namespace.
*/
export type AddStringChange = string;
/**
Expand Down Expand Up @@ -144,9 +144,25 @@ export type AddDocTypeNodeChange = [
StringOrStringReference
];
/**
* Browser-specific. Schema representing a string, either expressed as a literal or as an index into the string table.
* Browser-specific. Schema representing a string, either expressed as a literal, as a literal with an associated string namespace, or as an index into the string table.
*/
export type StringOrStringReference = string | StringReference;
export type StringOrStringReference = StringLiteral | NamespacedStringLiteral | StringReference;
/**
* Browser-specific. Schema representing a string, expressed as a literal.
*/
export type StringLiteral = string;
/**
* Browser-specific. Schema representing a string namespace, either expressed as a literal name or as a numeric reference.
*/
export type StringNamespaceOrStringNamespaceReference = StringNamespaceName | StringNamespaceReference;
/**
* Browser-specific. Schema representing a string namespace, expressed as a literal name.
*/
export type StringNamespaceName = string;
/**
* Browser-specific. Schema representing a string namespace, expressed as a numeric reference. The reference 0 refers to the default string namespace; higher values refer to each additional string namespace, in the order they were created.
*/
export type StringNamespaceReference = number;
/**
* Schema representing the addition of a new #document node.
*
Expand Down Expand Up @@ -311,6 +327,16 @@ export type VisualViewportHeight = number;
* The pinch-zoom scaling factor applied to the visual viewport.
*/
export type VisualViewportScale = number;
/**
* Browser-specific. Schema representing the addition of a new string namespace, identified by name.
*/
export type AddStringNamespaceChange = StringNamespaceName;
/**
* Browser-specific. Schema representing the addition of a sequence of strings to a string namespace.
*
* @minItems 1
*/
export type AddNamespacedStringChange = [StringNamespaceOrStringNamespaceReference, ...StringLiteral[]];
/**
* Browser-specific. Schema of a Record type which contains mutations of a screen.
*/
Expand Down Expand Up @@ -1233,6 +1259,13 @@ export interface CDataNode {
readonly type: 4;
textContent: '';
}
/**
* Browser-specific. Schema representing a string literal with an associated string namespace.
*/
export interface NamespacedStringLiteral {
namespace: StringNamespaceOrStringNamespaceReference;
string: StringLiteral;
}
/**
* Schema of an AddedNodeMutation.
*/
Expand Down
2 changes: 2 additions & 0 deletions lib/cjs/src/session-replay-browser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export declare const ChangeType: {
AttachedStyleSheets: ChangeTypeId<8, SessionReplay.AttachedStyleSheetsChange>;
MediaPlaybackState: ChangeTypeId<9, SessionReplay.MediaPlaybackStateChange>;
VisualViewport: ChangeTypeId<10, SessionReplay.VisualViewportChange>;
AddStringNamespace: ChangeTypeId<11, SessionReplay.AddStringNamespaceChange>;
AddNamespacedString: ChangeTypeId<12, SessionReplay.AddNamespacedStringChange>;
};
export type ChangeType = (typeof ChangeType)[keyof typeof ChangeType];
export declare const PlaybackState: {
Expand Down
2 changes: 2 additions & 0 deletions lib/cjs/src/session-replay-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ exports.ChangeType = {
AttachedStyleSheets: 8,
MediaPlaybackState: 9,
VisualViewport: 10,
AddStringNamespace: 11,
AddNamespacedString: 12,
};
exports.PlaybackState = {
Playing: 0,
Expand Down
3 changes: 3 additions & 0 deletions lib/cjs/src/session-replay.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export type NodeId = number & {
export type StringId = number & {
__brand: 'StringId';
};
export type StringNamespaceId = number & {
__brand: 'StringNamespaceId';
};
export type StyleSheetId = number & {
__brand: 'StyleSheetId';
};
41 changes: 37 additions & 4 deletions lib/esm/generated/browserSessionReplay.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ export type SnapshotFormatChange = 1;
/**
* Browser-specific. Schema representing an individual change within a BrowserChangeData collection.
*/
export type Change = [0, ...AddStringChange[]] | [1, ...AddNodeChange[]] | [2, ...RemoveNodeChange[]] | [3, ...AttributeChange[]] | [4, ...TextChange[]] | [5, ...SizeChange[]] | [6, ...ScrollPositionChange[]] | [7, ...AddStyleSheetChange[]] | [8, ...AttachedStyleSheetsChange[]] | [9, ...MediaPlaybackStateChange[]] | [10, ...VisualViewportChange[]];
export type Change = [0, ...AddStringChange[]] | [1, ...AddNodeChange[]] | [2, ...RemoveNodeChange[]] | [3, ...AttributeChange[]] | [4, ...TextChange[]] | [5, ...SizeChange[]] | [6, ...ScrollPositionChange[]] | [7, ...AddStyleSheetChange[]] | [8, ...AttachedStyleSheetsChange[]] | [9, ...MediaPlaybackStateChange[]] | [10, ...VisualViewportChange[]] | [11, ...AddStringNamespaceChange[]] | [12, ...AddNamespacedStringChange[]];
/**
* Browser-specific. Schema representing the addition of a string to the string table.
* Browser-specific. Schema representing the addition of a string to the default string namespace.
*/
export type AddStringChange = string;
/**
Expand Down Expand Up @@ -136,9 +136,25 @@ export type AddDocTypeNodeChange = [
StringOrStringReference
];
/**
* Browser-specific. Schema representing a string, either expressed as a literal or as an index into the string table.
* Browser-specific. Schema representing a string, either expressed as a literal, as a literal with an associated string namespace, or as an index into the string table.
*/
export type StringOrStringReference = string | StringReference;
export type StringOrStringReference = StringLiteral | NamespacedStringLiteral | StringReference;
/**
* Browser-specific. Schema representing a string, expressed as a literal.
*/
export type StringLiteral = string;
/**
* Browser-specific. Schema representing a string namespace, either expressed as a literal name or as a numeric reference.
*/
export type StringNamespaceOrStringNamespaceReference = StringNamespaceName | StringNamespaceReference;
/**
* Browser-specific. Schema representing a string namespace, expressed as a literal name.
*/
export type StringNamespaceName = string;
/**
* Browser-specific. Schema representing a string namespace, expressed as a numeric reference. The reference 0 refers to the default string namespace; higher values refer to each additional string namespace, in the order they were created.
*/
export type StringNamespaceReference = number;
/**
* Schema representing the addition of a new #document node.
*
Expand Down Expand Up @@ -303,6 +319,16 @@ export type VisualViewportHeight = number;
* The pinch-zoom scaling factor applied to the visual viewport.
*/
export type VisualViewportScale = number;
/**
* Browser-specific. Schema representing the addition of a new string namespace, identified by name.
*/
export type AddStringNamespaceChange = StringNamespaceName;
/**
* Browser-specific. Schema representing the addition of a sequence of strings to a string namespace.
*
* @minItems 1
*/
export type AddNamespacedStringChange = [StringNamespaceOrStringNamespaceReference, ...StringLiteral[]];
/**
* Browser-specific. Schema of a Record type which contains mutations of a screen.
*/
Expand Down Expand Up @@ -764,6 +790,13 @@ export interface CDataNode {
readonly type: 4;
textContent: '';
}
/**
* Browser-specific. Schema representing a string literal with an associated string namespace.
*/
export interface NamespacedStringLiteral {
namespace: StringNamespaceOrStringNamespaceReference;
string: StringLiteral;
}
/**
* Schema of an AddedNodeMutation.
*/
Expand Down
41 changes: 37 additions & 4 deletions lib/esm/generated/sessionReplay.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ export type SnapshotFormatChange = 1;
/**
* Browser-specific. Schema representing an individual change within a BrowserChangeData collection.
*/
export type Change = [0, ...AddStringChange[]] | [1, ...AddNodeChange[]] | [2, ...RemoveNodeChange[]] | [3, ...AttributeChange[]] | [4, ...TextChange[]] | [5, ...SizeChange[]] | [6, ...ScrollPositionChange[]] | [7, ...AddStyleSheetChange[]] | [8, ...AttachedStyleSheetsChange[]] | [9, ...MediaPlaybackStateChange[]] | [10, ...VisualViewportChange[]];
export type Change = [0, ...AddStringChange[]] | [1, ...AddNodeChange[]] | [2, ...RemoveNodeChange[]] | [3, ...AttributeChange[]] | [4, ...TextChange[]] | [5, ...SizeChange[]] | [6, ...ScrollPositionChange[]] | [7, ...AddStyleSheetChange[]] | [8, ...AttachedStyleSheetsChange[]] | [9, ...MediaPlaybackStateChange[]] | [10, ...VisualViewportChange[]] | [11, ...AddStringNamespaceChange[]] | [12, ...AddNamespacedStringChange[]];
/**
* Browser-specific. Schema representing the addition of a string to the string table.
* Browser-specific. Schema representing the addition of a string to the default string namespace.
*/
export type AddStringChange = string;
/**
Expand Down Expand Up @@ -144,9 +144,25 @@ export type AddDocTypeNodeChange = [
StringOrStringReference
];
/**
* Browser-specific. Schema representing a string, either expressed as a literal or as an index into the string table.
* Browser-specific. Schema representing a string, either expressed as a literal, as a literal with an associated string namespace, or as an index into the string table.
*/
export type StringOrStringReference = string | StringReference;
export type StringOrStringReference = StringLiteral | NamespacedStringLiteral | StringReference;
/**
* Browser-specific. Schema representing a string, expressed as a literal.
*/
export type StringLiteral = string;
/**
* Browser-specific. Schema representing a string namespace, either expressed as a literal name or as a numeric reference.
*/
export type StringNamespaceOrStringNamespaceReference = StringNamespaceName | StringNamespaceReference;
/**
* Browser-specific. Schema representing a string namespace, expressed as a literal name.
*/
export type StringNamespaceName = string;
/**
* Browser-specific. Schema representing a string namespace, expressed as a numeric reference. The reference 0 refers to the default string namespace; higher values refer to each additional string namespace, in the order they were created.
*/
export type StringNamespaceReference = number;
/**
* Schema representing the addition of a new #document node.
*
Expand Down Expand Up @@ -311,6 +327,16 @@ export type VisualViewportHeight = number;
* The pinch-zoom scaling factor applied to the visual viewport.
*/
export type VisualViewportScale = number;
/**
* Browser-specific. Schema representing the addition of a new string namespace, identified by name.
*/
export type AddStringNamespaceChange = StringNamespaceName;
/**
* Browser-specific. Schema representing the addition of a sequence of strings to a string namespace.
*
* @minItems 1
*/
export type AddNamespacedStringChange = [StringNamespaceOrStringNamespaceReference, ...StringLiteral[]];
/**
* Browser-specific. Schema of a Record type which contains mutations of a screen.
*/
Expand Down Expand Up @@ -1233,6 +1259,13 @@ export interface CDataNode {
readonly type: 4;
textContent: '';
}
/**
* Browser-specific. Schema representing a string literal with an associated string namespace.
*/
export interface NamespacedStringLiteral {
namespace: StringNamespaceOrStringNamespaceReference;
string: StringLiteral;
}
/**
* Schema of an AddedNodeMutation.
*/
Expand Down
2 changes: 2 additions & 0 deletions lib/esm/src/session-replay-browser.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ export declare const ChangeType: {
AttachedStyleSheets: ChangeTypeId<8, SessionReplay.AttachedStyleSheetsChange>;
MediaPlaybackState: ChangeTypeId<9, SessionReplay.MediaPlaybackStateChange>;
VisualViewport: ChangeTypeId<10, SessionReplay.VisualViewportChange>;
AddStringNamespace: ChangeTypeId<11, SessionReplay.AddStringNamespaceChange>;
AddNamespacedString: ChangeTypeId<12, SessionReplay.AddNamespacedStringChange>;
};
export type ChangeType = (typeof ChangeType)[keyof typeof ChangeType];
export declare const PlaybackState: {
Expand Down
2 changes: 2 additions & 0 deletions lib/esm/src/session-replay-browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ export var ChangeType = {
AttachedStyleSheets: 8,
MediaPlaybackState: 9,
VisualViewport: 10,
AddStringNamespace: 11,
AddNamespacedString: 12,
};
export var PlaybackState = {
Playing: 0,
Expand Down
3 changes: 3 additions & 0 deletions lib/esm/src/session-replay.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ export type NodeId = number & {
export type StringId = number & {
__brand: 'StringId';
};
export type StringNamespaceId = number & {
__brand: 'StringNamespaceId';
};
export type StyleSheetId = number & {
__brand: 'StyleSheetId';
};
4 changes: 4 additions & 0 deletions lib/src/session-replay-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ export const ChangeType: {
AttachedStyleSheets: ChangeTypeId<8, SessionReplay.AttachedStyleSheetsChange>
MediaPlaybackState: ChangeTypeId<9, SessionReplay.MediaPlaybackStateChange>
VisualViewport: ChangeTypeId<10, SessionReplay.VisualViewportChange>
AddStringNamespace: ChangeTypeId<11, SessionReplay.AddStringNamespaceChange>
AddNamespacedString: ChangeTypeId<12, SessionReplay.AddNamespacedStringChange>
} = {
AddString: 0,
AddNode: 1,
Expand All @@ -127,6 +129,8 @@ export const ChangeType: {
AttachedStyleSheets: 8,
MediaPlaybackState: 9,
VisualViewport: 10,
AddStringNamespace: 11,
AddNamespacedString: 12,
} as const

export type ChangeType = (typeof ChangeType)[keyof typeof ChangeType]
Expand Down
1 change: 1 addition & 0 deletions lib/src/session-replay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,5 @@ export type PointerType = (typeof PointerType)[keyof typeof PointerType]

export type NodeId = number & { __brand: 'NodeId' }
export type StringId = number & { __brand: 'StringId' }
export type StringNamespaceId = number & { __brand: 'StringNamespaceId' }
export type StyleSheetId = number & { __brand: 'StyleSheetId' }
9 changes: 8 additions & 1 deletion samples/session-replay/browser/record/change-record.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,13 @@
[8, [11, 0, 1]],
[9, [15, 0]],
[9, [15, 1]],
[10, [30, 30, 15, 15, 1024, 768, 2]]
[10, [30, 30, 15, 15, 1024, 768, 2]],
[11, "dom", "css", "user-text"],
[11, "svg"],
[12, ["dom", "div", "span"], ["css", "div { color: blue }"], ["user-text", "Hello"]],
[12, [1, "div", "span"], [2, "div { color: blue }"], [3, "Hello"]],
[12, [4, "circle"]],
[4, [6, { "namespace": "user-text", "string": "Goodbye" }]],
[4, [6, { "namespace": 3, "string": "Goodbye" }]]
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@
[8, [11, 0, 1]],
[9, [15, 0]],
[9, [15, 1]],
[10, [30, 30, 15, 15, 1024, 768, 2]]
[10, [30, 30, 15, 15, 1024, 768, 2]],
[11, "dom", "css", "user-text"],
[11, "svg"],
[12, ["dom", "div", "span"], ["css", "div { color: blue }"], ["user-text", "Hello"]],
[12, [1, "div", "span"], [2, "div { color: blue }"], [3, "Hello"]],
[12, [4, "circle"]],
[4, [6, { "namespace": "user-text", "string": "Goodbye" }]],
[4, [6, { "namespace": 3, "string": "Goodbye" }]]
]
}
Loading
Loading