Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/alpha 21 #1573

Closed
wants to merge 40 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
4a704ec
support recording canvas in iframe and shadow dom
p-mazhnik Mar 15, 2024
9cf2b7d
Apply formatting changes
p-mazhnik Mar 15, 2024
b817c82
add changeset
p-mazhnik Mar 15, 2024
d3f29e6
Merge remote-tracking branch 'pavel/rrweb-canvas' into rrweb-canvas
p-mazhnik Mar 15, 2024
498be36
strip base64 from snapshots
p-mazhnik Mar 15, 2024
81797e9
Apply formatting changes
p-mazhnik Mar 15, 2024
353f6a7
strip base64 from snapshots
p-mazhnik Mar 15, 2024
3ebf87c
cleanup
p-mazhnik Mar 15, 2024
db60778
Merge branch 'master' into rrweb-canvas
p-mazhnik Apr 5, 2024
eba4978
Merge branch 'master' into rrweb-canvas
dengelke Apr 23, 2024
31bb274
Remove worker
dengelke Apr 26, 2024
f3a169d
Update types package
dengelke Apr 26, 2024
61c7b17
Update rrdom-nodejs
dengelke Apr 26, 2024
f5deb5c
Update rrdom
dengelke Apr 26, 2024
51b773d
Update rrvideo
dengelke Apr 26, 2024
70ec791
Update rrweb-snapshot
dengelke Apr 26, 2024
1685ae8
Update web extension
dengelke Apr 26, 2024
0fddd5c
Update rrweb-player
dengelke Apr 26, 2024
f775e09
Update player
dengelke Apr 26, 2024
7bb3645
Update outputs
dengelke Apr 26, 2024
7decfcc
Create 14 release
dengelke Apr 26, 2024
e104cbc
Merge commit '26c331b3b7e1a45091904fd1a6a875e16c9b777f' into feature/…
dengelke May 14, 2024
1ff674d
Calculate x and y offsets
dengelke May 14, 2024
f6ec5e8
Bump version
dengelke May 14, 2024
5587b4b
Update changelog
dengelke May 14, 2024
42399ca
Fixes to ensure publishing works
dengelke May 14, 2024
65c2f44
Use createRange for non elements
dengelke May 15, 2024
f75d663
Add semicolons
dengelke May 15, 2024
7b70a26
Merge pull request #3 from gtubrainstormingorg/feature/updated-dom-re…
dengelke May 15, 2024
f107efa
Initial commit
dengelke May 15, 2024
91764d3
Release changes
dengelke May 15, 2024
557eddd
Fix and test for bug #1457 (Uncaught SyntaxError: Regular expression …
eoghanmurray May 20, 2024
46b97f7
Apply formatting changes
eoghanmurray May 20, 2024
a88db42
Create fair-ducks-clean.md
eoghanmurray May 20, 2024
5629d43
Merge commit 'a88db42c48053d3de51a225ddd8258ce9894ecb2' into feature/…
dengelke May 21, 2024
b702c8f
Bump version
dengelke May 21, 2024
b7129eb
Release alpha 18
dengelke Jul 1, 2024
fd0a14e
Disable scroll mutations with override
dengelke Jul 2, 2024
bad0f3b
Bump version numbers
dengelke Jul 2, 2024
9b77986
fix for hover class failreu
bruint Sep 24, 2024
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
16 changes: 8 additions & 8 deletions .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
"commit": false,
"fixed": [
[
"rrweb",
"rrweb-snapshot",
"rrdom",
"rrdom-nodejs",
"rrweb-player",
"@rrweb/types",
"@rrweb/web-extension",
"rrvideo"
"howdygo-rrweb",
"howdygo-rrweb-snapshot",
"howdygo-rrdom",
"howdygo-rrdom-nodejs",
"howdygo-rrweb-player",
"howdygo-rrweb-types",
"howdygo-rrweb-web-extension",
"howdygo-rrvideo"
]
],
"linked": [],
Expand Down
4 changes: 2 additions & 2 deletions .changeset/eleven-bobcats-peel.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'rrweb-snapshot': patch
'rrweb': patch
"rrweb-snapshot": patch
"rrweb": patch
---

better support for coexistence with older libraries (e.g. MooTools & Prototype.js) which modify the in-built `Array.from` function
6 changes: 6 additions & 0 deletions .changeset/fair-ducks-clean.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"rrweb-snapshot": patch
"rrweb": patch
---

Fix and test for bug #1457 which was affecting replay of complex tailwind css
5 changes: 5 additions & 0 deletions .changeset/friendly-zebras-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'rrweb': patch
---

Support recording canvas in iframe and shadow dom
2 changes: 1 addition & 1 deletion .changeset/nervous-poets-grin.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'rrdom': patch
'rrdom-nodejs': patch
'howdygo-rrdom-nodejs': patch
'rrweb': patch
'rrweb-player': patch
'rrweb-snapshot': patch
Expand Down
4 changes: 2 additions & 2 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
"tag": "alpha",
"initialVersions": {
"rrdom": "0.1.7",
"rrdom-nodejs": "0.1.7",
"howdygo-rrdom-nodejs": "0.1.7",
"rrweb": "2.0.0-alpha.4",
"rrweb-player": "1.0.0-alpha.4",
"rrweb-snapshot": "2.0.0-alpha.4",
"@rrweb/types": "2.0.0-alpha.4",
"howdygo-rrweb-types": "2.0.0-alpha.4",
"@rrweb/web-extension": "2.0.0-alpha.4",
"rrvideo": "2.0.0-alpha.6"
},
Expand Down
2 changes: 1 addition & 1 deletion .changeset/serious-ants-juggle.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
'rrdom': major
'rrdom-nodejs': major
'howdygo-rrdom-nodejs': major
'rrweb': patch
---

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"url": "git+ssh://[email protected]/rrweb-io/rrweb.git"
},
"keywords": [
"rrweb"
"howdygo-rrweb"
],
"author": "[email protected]",
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions packages/rrdom-nodejs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# rrdom-nodejs
# howdygo-rrdom-nodejs

## 2.0.0-alpha.13
## 2.0.0-alpha.19

### Patch Changes

- Updated dependencies [[`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`f7c6973`](https://github.com/rrweb-io/rrweb/commit/f7c6973ae9c21b9ea014bdef7101f976f04d9356)]:
- [email protected].13
- [email protected].13
- [email protected].19
- [email protected].19

## 2.0.0-alpha.12

Expand Down
16 changes: 8 additions & 8 deletions packages/rrdom-nodejs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rrdom-nodejs",
"version": "2.0.0-alpha.13",
"name": "howdygo-rrdom-nodejs",
"version": "2.0.0-alpha.19",
"scripts": {
"dev": "rollup -c -w",
"bundle": "rollup --config",
Expand All @@ -11,12 +11,12 @@
"lint": "yarn eslint src/**/*.ts"
},
"keywords": [
"rrweb",
"rrdom-nodejs"
"howdygo-rrweb",
"howdygo-rrdom-nodejs"
],
"license": "MIT",
"main": "lib/rrdom-nodejs.cjs",
"module": "es/rrdom-nodejs.js",
"main": "lib/howdygo-rrdom-nodejs.cjs",
"module": "es/howdygo-rrdom-nodejs.js",
"typings": "es",
"files": [
"dist",
Expand Down Expand Up @@ -48,8 +48,8 @@
"cssom": "^0.5.0",
"cssstyle": "^2.3.0",
"nwsapi": "^2.2.0",
"rrdom": "^2.0.0-alpha.13",
"rrweb-snapshot": "^2.0.0-alpha.13"
"howdygo-rrdom": "^2.0.0-alpha.19",
"howdygo-rrweb-snapshot": "^2.0.0-alpha.19"
},
"browserslist": [
"supports es6-class"
Expand Down
4 changes: 2 additions & 2 deletions packages/rrdom-nodejs/src/document-nodejs.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-unsafe-assignment */
import { NodeType as RRNodeType } from 'rrweb-snapshot';
import { NodeType as RRNodeType } from 'howdygo-rrweb-snapshot';
import type { NWSAPI } from 'nwsapi';
import type { CSSStyleDeclaration as CSSStyleDeclarationType } from 'cssstyle';
import {
Expand All @@ -14,7 +14,7 @@ import {
ClassList,
IRRDocument,
CSSStyleDeclaration,
} from 'rrdom';
} from 'howdygo-rrdom';
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
const nwsapi = require('nwsapi');
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment, @typescript-eslint/no-var-requires
Expand Down
4 changes: 2 additions & 2 deletions packages/rrdom-nodejs/test/document-nodejs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
import * as fs from 'fs';
import * as path from 'path';
import { NodeType as RRNodeType } from 'rrweb-snapshot';
import { NodeType as RRNodeType } from 'howdygo-rrweb-snapshot';
import {
RRCanvasElement,
RRCDATASection,
Expand All @@ -16,7 +16,7 @@ import {
RRStyleElement,
RRText,
} from '../src/document-nodejs';
import { buildFromDom } from 'rrdom';
import { buildFromDom } from 'howdygo-rrdom';

describe('RRDocument for nodejs environment', () => {
describe('RRDocument API', () => {
Expand Down
4 changes: 2 additions & 2 deletions packages/rrdom/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# rrdom

## 2.0.0-alpha.13
## 2.0.0-alpha.19

### Patch Changes

- [#1432](https://github.com/rrweb-io/rrweb/pull/1432) [`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961) Thanks [@Juice10](https://github.com/Juice10)! - Support `loop` in `RRMediaElement`

- Updated dependencies [[`123a81e`](https://github.com/rrweb-io/rrweb/commit/123a81e12d072cd95d701231176d7eb2d03b3961), [`f7c6973`](https://github.com/rrweb-io/rrweb/commit/f7c6973ae9c21b9ea014bdef7101f976f04d9356)]:
- [email protected].13
- [email protected].19

## 2.0.0-alpha.12

Expand Down
14 changes: 7 additions & 7 deletions packages/rrdom/package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"name": "rrdom",
"version": "2.0.0-alpha.13",
"name": "howdygo-rrdom",
"version": "2.0.0-alpha.19",
"homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/rrdom#readme",
"license": "MIT",
"main": "lib/rrdom.cjs",
"module": "es/rrdom.js",
"main": "lib/howdygo-rrdom.cjs",
"module": "es/howdygo-rrdom.js",
"typings": "es",
"unpkg": "dist/rrdom.js",
"unpkg": "dist/howdygo-rrdom.js",
"files": [
"dist",
"lib",
Expand All @@ -32,7 +32,7 @@
},
"devDependencies": {
"@rollup/plugin-commonjs": "^20.0.0",
"@rrweb/types": "^2.0.0-alpha.13",
"howdygo-rrweb-types": "^2.0.0-alpha.19",
"@types/jest": "^27.4.1",
"@types/puppeteer": "^5.4.4",
"@typescript-eslint/eslint-plugin": "^5.23.0",
Expand All @@ -47,6 +47,6 @@
"ts-jest": "^27.1.3"
},
"dependencies": {
"rrweb-snapshot": "^2.0.0-alpha.13"
"howdygo-rrweb-snapshot": "^2.0.0-alpha.19"
}
}
3 changes: 3 additions & 0 deletions packages/rrdom/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ for (let config of baseConfigs) {
name: config.name,
format: 'iife',
file: pkg.unpkg.replace(pkg.name, config.path),
extend: true,
},
],
},
Expand All @@ -67,6 +68,7 @@ for (let config of baseConfigs) {
format: 'iife',
file: toMinPath(pkg.unpkg).replace(pkg.name, config.path),
sourcemap: true,
extend: true,
},
],
},
Expand All @@ -78,6 +80,7 @@ for (let config of baseConfigs) {
{
format: 'cjs',
file: pkg.main.replace(pkg.name, config.path),
extend: true,
},
],
},
Expand Down
14 changes: 7 additions & 7 deletions packages/rrdom/src/diff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import {
NodeType as RRNodeType,
Mirror as NodeMirror,
elementNode,
} from 'rrweb-snapshot';
} from 'howdygo-rrweb-snapshot';
import type {
canvasMutationData,
canvasEventWithTime,
inputData,
scrollData,
styleDeclarationData,
styleSheetRuleData,
} from '@rrweb/types';
} from 'howdygo-rrweb-types';
import type {
IRRCDATASection,
IRRComment,
Expand Down Expand Up @@ -83,16 +83,16 @@ export type ReplayerHandler = {
target: HTMLCanvasElement,
) => void;
applyInput: (data: inputData) => void;
applyScroll: (data: scrollData, isSync: boolean) => void;
applyScroll: (data: scrollData, isSync: boolean, forceScroll: boolean | undefined) => void;
applyStyleSheetMutation: (
data: styleDeclarationData | styleSheetRuleData,
styleSheet: CSSStyleSheet,
) => void;
// Similar to the `afterAppend` callback in the `rrweb-snapshot` package. It's a postorder traversal of the newly appended nodes.
// Similar to the `afterAppend` callback in the `howdygo-rrweb-snapshot` package. It's a postorder traversal of the newly appended nodes.
afterAppend?(node: Node, id: number): void;
};

// A set contains newly appended nodes. It's used to make sure the afterAppend callback can iterate newly appended nodes in the same traversal order as that in the `rrweb-snapshot` package.
// A set contains newly appended nodes. It's used to make sure the afterAppend callback can iterate newly appended nodes in the same traversal order as that in the `howdygo-rrweb-snapshot` package.
let createdNodeSet: WeakSet<Node> | null = null;

/**
Expand Down Expand Up @@ -220,14 +220,14 @@ function diffAfterUpdatingChildren(
switch (newTree.RRNodeType) {
case RRNodeType.Document: {
const scrollData = (newTree as RRDocument).scrollData;
scrollData && replayer.applyScroll(scrollData, true);
scrollData && replayer.applyScroll(scrollData, true, true);
break;
}
case RRNodeType.Element: {
const oldElement = oldTree as HTMLElement;
const newRRElement = newTree as RRElement;
newRRElement.scrollData &&
replayer.applyScroll(newRRElement.scrollData, true);
replayer.applyScroll(newRRElement.scrollData, true, true);
/**
* Input data need to get applied after all children of this node are updated.
* Otherwise when we set a value for a select element whose options are empty, the value won't actually update.
Expand Down
4 changes: 2 additions & 2 deletions packages/rrdom/src/document.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { NodeType as RRNodeType } from 'rrweb-snapshot';
import { NodeType as RRNodeType } from 'howdygo-rrweb-snapshot';
import { parseCSSText, camelize, toCSSText } from './style';
export interface IRRNode {
parentElement: IRRNode | null;
Expand Down Expand Up @@ -308,7 +308,7 @@ export function BaseRRDocumentImpl<
}

/**
* Adhoc implementation for setting xhtml namespace in rebuilt.ts (rrweb-snapshot).
* Adhoc implementation for setting xhtml namespace in rebuilt.ts (howdygo-rrweb-snapshot).
* There are two lines used this function:
* 1. doc.write('\<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""\>')
* 2. doc.write('\<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" ""\>')
Expand Down
10 changes: 5 additions & 5 deletions packages/rrdom/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
import {
NodeType as RRNodeType,
createMirror as createNodeMirror,
} from 'rrweb-snapshot';
} from 'howdygo-rrweb-snapshot';
import type {
Mirror as NodeMirror,
IMirror,
serializedNodeWithId,
} from 'rrweb-snapshot';
} from 'howdygo-rrweb-snapshot';
import type {
canvasMutationData,
canvasEventWithTime,
inputData,
scrollData,
styleSheetRuleData,
styleDeclarationData,
} from '@rrweb/types';
} from 'howdygo-rrweb-types';
import {
BaseRRNode as RRNode,
BaseRRCDATASectionImpl,
Expand Down Expand Up @@ -198,7 +198,7 @@ type RRElementType<K extends keyof HTMLElementTagNameMap> =
K extends keyof RRElementTagNameMap ? RRElementTagNameMap[K] : RRElement;

function getValidTagName(element: HTMLElement): string {
// https://github.com/rrweb-io/rrweb-snapshot/issues/56
// https://github.com/rrweb-io/howdygo-rrweb-snapshot/issues/56
if (element instanceof HTMLFormElement) {
return 'FORM';
}
Expand Down Expand Up @@ -338,7 +338,7 @@ export function createMirror(): Mirror {
return new Mirror();
}

// based on Mirror from rrweb-snapshots
// based on Mirror from howdygo-rrweb-snapshots
export class Mirror implements IMirror<RRNode> {
private idNodeMap: Map<number, RRNode> = new Map();
private nodeMetaMap: WeakMap<RRNode, serializedNodeWithId> = new WeakMap();
Expand Down
8 changes: 4 additions & 4 deletions packages/rrdom/test/diff.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
serializedNodeWithId,
createMirror,
Mirror as NodeMirror,
} from 'rrweb-snapshot';
} from 'howdygo-rrweb-snapshot';
import {
buildFromDom,
getDefaultSN,
Expand All @@ -25,14 +25,14 @@ import {
sameNodeType,
} from '../src/diff';
import type { IRRElement, IRRNode } from '../src/document';
import { Replayer } from 'rrweb';
import { Replayer } from 'howdygo-rrweb';
import type {
eventWithTime,
canvasMutationData,
styleDeclarationData,
styleSheetRuleData,
} from '@rrweb/types';
import { EventType, IncrementalSource } from '@rrweb/types';
} from 'howdygo-rrweb-types';
import { EventType, IncrementalSource } from 'howdygo-rrweb-types';
import { compileTSCode } from './utils';

const elementSn = {
Expand Down
Loading
Loading