Commit Graph

878 Commits

Author SHA1 Message Date
Phil Leggetter
ec93ad5b66 adds PostHog as users to the README (#719) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
5db9e807af gc virtual style map when DOM has been removed 2026-04-01 12:00:00 +08:00
Yanzhen Yu
f0f0106749 improve type assertion, from #716 2026-04-01 12:00:00 +08:00
Yanzhen Yu
808823639f fix lint warning 2026-04-01 12:00:00 +08:00
Eoghan Murray
4b6efde134 Monkeypatch each iframe (#716)
* `setTimeout` and `clearTimeout` are global functions. Think the window versions of them were for the following reason: https://stackoverflow.com/questions/60245787/

* Comments and extra test here helped me understand which inserts were expected and which are to be ignored

* Add a test for the style setProperty/removeProperty added in #671

* Add a test to ensure that listeners get added correctly in nested iframes - particularly important for those which rely on prototype monkeypatching

* Pass in the window object from the current iframe so that monkeypatching applies to all windows

* Satisfy typings

* No need to insert an iframe as there's one already set up for us

* Enable the console logger to also intercept log messages within iframes

* There's no tests for FontFace but presumably the monkeypatching here works similarly to the others
2026-04-01 12:00:00 +08:00
Yanzhen Yu
036472280c fix props typo 2026-04-01 12:00:00 +08:00
John Pham
c66cb7eedf Set the blockClass element's background color to the inherited color (#707)
* Set the blockClass element's background color to the inherited color

* Update snapshot

* Update snapshot
2026-04-01 12:00:00 +08:00
Justin Halsall
793ff43ed1 Fixes #690 (#701)
Add nested css recording for safari
2026-04-01 12:00:00 +08:00
Justin Halsall
4ceb7eaead prefer yarn over npm (#705) 2026-04-01 12:00:00 +08:00
Lucky Feng
292f56fe90 improve config definition in the console plugin (#704)
One user encountered a type problem(https://rrweb.slack.com/archives/C01BYDC5C93/p1631683830050900). It turns out that definition of LogReplayConfig isn't perfect
2026-04-01 12:00:00 +08:00
Justin Halsall
bab5526dd5 Keep blocked root elements as placeholders (#696)
* Keep blocked root elements as placeholders

`serializeNode` turns blocked elements into placeholder nodes so we need to make sure we don't remove these elements from the mutations when they get added.
We do however need to keep removing any children of these blocked elements from getting added or mutated.

* Update packages/rrweb/src/record/mutation.ts
2026-04-01 12:00:00 +08:00
Yanzhen Yu
d50094272e chore(release): publish new version
- rrweb@1.0.5
 - rrweb-player@0.7.7
2026-04-01 12:00:00 +08:00
Yanzhen Yu
de7eb1c36d update lerna scripts 2026-04-01 12:00:00 +08:00
Yuku Kotani
98f3794039 chek is CSSGroupingRule supported (#693) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
58209df0fc close #688, remove legacy counter
A previous patch has refactored the canvas image loading process
and it does not use <img /> anymore, so the counter is no longer
need.

commit: 4a72ff0b3cdf9920ea38bca8f69eedbfe52c99904a0036f3fc1cd7c1e0248a37R725
2026-04-01 12:00:00 +08:00
dependabot[bot]
3577303979 Bump tar from 4.4.17 to 4.4.19 (#686)
Bumps [tar](https://github.com/npm/node-tar) from 4.4.17 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-tar/compare/v4.4.17...v4.4.19)

---
updated-dependencies:
- dependency-name: tar
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
fca1974d0d chore(release): publish %s
- rrweb@1.0.4
 - rrweb-player@0.7.6
2026-04-01 12:00:00 +08:00
Yanzhen Yu
0540fcd90c hotfix rrweb es entry 2026-04-01 12:00:00 +08:00
Yanzhen Yu
a517b9dd90 update typing files 2026-04-01 12:00:00 +08:00
yz-yu
0efa7b0491 impl #650, CSS declaration observer (#671) 2026-04-01 12:00:00 +08:00
Eoghan Murray
0d5b46068d The desktop pointer cursor is not representative of mobile (#662)
* Simplify css for click animation

* Refactor to transfer responsibility for casting multiple synchronous to index.ts from machine.ts (so they can be dealt with in bulk)

* During synchronous application of a batch of events, move the mouse to the last position so that it's in the correct place when the timer starts

 - previous `needCastInSyncMode` added in 4bf533a675 meant that the isSync versions of MouseMove/TouchMove were being accidentally ignored
 - each synchronous MouseMove would have resulted in a separate mouse position update
 - the Click/TouchStart/TouchEnd events didn't have an async version

* The desktop pointer cursor is not representative of what is happening on a mobile device.

Instead, check a recording for any presence of a Touch event, and switch to a touch visualisation mode for the entire recording.
(for now, we use this mode even for mixed touch/mouse devices - this could be improved upon in future)

Show a round circle representing the users' finger which is visible only between TouchStart and TouchEnd events
Again this can be evolved upon, but this change should be a good start in the right direction.

* It's more correct to not have a transition for repositioning of touch as user can lift finger off screen and place elsewhere; however we can now have much smoother touch movement during the .touch-active phase as we know the finger is on the screen. This has a .25s delaying effect on the touch position which IMO is acceptable; e.g. scroll position can lag behind a touch movement and this seems to bring them more in sync

* Ensure we end up with the correct touch-active state after a series of synchronous events

* Important to discontinue tail animations and position transitions when user has lifted their finger and placed it into a new position. This is apparent in a replay session where the user is scrolling the page using repeated TouchMove bottom-to-top movements

* Simplify by unwrapping `mouseState.touchActive` and `mouseState.pos` into their own global vars
2026-04-01 12:00:00 +08:00
Justin Halsall
0ec083e875 refactor nested style code (#667) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
15e80075f1 fix registry in lock file 2026-04-01 12:00:00 +08:00
Yanzhen Yu
d26d9582b6 update yarn.lock 2026-04-01 12:00:00 +08:00
yz-yu
183b6c11af Record and replay nested stylesheet rules (#666)
* fix typo

* record nested style rules

* Replay nested style rules

* handle index array in replayer

Co-authored-by: Justin Halsall <Juice10@users.noreply.github.com>
2026-04-01 12:00:00 +08:00
Yanzhen Yu
70df2326f5 chore(release): publish %s
- rrweb@1.0.3
 - rrweb-player@0.7.5
 - rrweb-snapshot@1.1.8
2026-04-01 12:00:00 +08:00
Yanzhen Yu
309b7d9026 add lerna to manage monorepo 2026-04-01 12:00:00 +08:00
Eoghan Murray
257e8c10c9 Don't trust the html 'value' attribute on <option> - the DOM .selected is the one we want I think. (#651)
- encountered inconsistent html with multiple <option> elements with the same value attribute
 - due to check `attributes.selected = (n as HTMLOptionElement).selected;` the extra ones were being stored as `selected: false`; furthermore, the `false` value was being ignored upon replay, and so the last of the extra ones was being chosen as the 'selected' option
2026-04-01 12:00:00 +08:00
Eoghan Murray
b35fc9197f Revert some of the non-essential changes of #630 (for ease of merging other branches) (#652) 2026-04-01 12:00:00 +08:00
Eoghan Murray
2b2b44e54e Fix that timer.addAction reverses order when splicing multiple events at same timestamp (#611)
* Add test for event ordering utilizing final html testing method added by Justin (with thanks)

* Found an error where two mutation events had the same timestamp, but one removed a node added in the other. The `actions.splice` method was reversing their order and triggering a 'Node with id [...] not found' error
2026-04-01 12:00:00 +08:00
Eoghan Murray
cd782c5f97 Correct links in #647; think they were only working previously with an auto-redirect (#658) 2026-04-01 12:00:00 +08:00
Peter Chen
794fe23c40 fix: fix console plugin's OOM problem (#656)
* fix: fix console plugin's OOM problem

* fix: fix console plugin

* feat: patch

* feat: patch

* feat: patch

Co-authored-by: chenyangbj01 <chenyangbj01@fenbi.com>
2026-04-01 12:00:00 +08:00
Olivia Osborn
c35776cce5 Removed sn undefined warning (#572) 2026-04-01 12:00:00 +08:00
Yanzhen Yu
2e7626d181 update git ignore 2026-04-01 12:00:00 +08:00
dbseel
989e327730 DragEvent handling, null check fixes (#630) 2026-04-01 12:00:00 +08:00
Eoghan Murray
eb25068b54 Reference packages directly in docs (removing direct references to the old rrweb-snapshot and rrweb-player repositories) (#647) 2026-04-01 12:00:00 +08:00
Eoghan Murray
d002300e8d Provide an option to only build rrweb-snapshot for inclusion in rrweb (#649) 2026-04-01 12:00:00 +08:00
Justin Halsall
ec984d71f6 Cache addHoverClass as it is quite expensive (#643)
* Add cache and cache purging

Needed for https://github.com/rrweb-io/rrweb-snapshot/pull/85

* Add cache and cache purging

Needed for https://github.com/rrweb-io/rrweb-snapshot/pull/85

* Cache addHoverClass as it is quite expensive

https://github.com/rrweb-io/rrweb-snapshot/pull/85

* Make cache non-optional

* Make cache required on addHoverClass
2026-04-01 12:00:00 +08:00
yz-yu
80d0297ddb Merge pull request #595 from Mark-Fenng/monorepo
Merge rrweb, rrweb-snapshot, rrweb-player into a mono repository
2026-04-01 12:00:00 +08:00
Justin Halsall
7c2d04cbb5 add idRemoved to TreeIndex (#640) 2026-04-01 12:00:00 +08:00
Mark-fenng
2fffcfeb11 update links of packages and README 2026-04-01 12:00:00 +08:00
Yanzhen Yu
88248459cb Release 1.0.2 2026-04-01 12:00:00 +08:00
Mark-fenng
f6aafb70e1 moved rrweb into packages/rrweb 2026-04-01 12:00:00 +08:00
Yanzhen Yu
056e78af09 fix typings 2026-04-01 12:00:00 +08:00
Mark-fenng
e7b8631992 Merge branch 'rrweb-player' into monorepo 2026-04-01 12:00:00 +08:00
Eoghan Murray
6f6c688058 Add more concrete "node not found" warnings (#620)
* Show whether a node was not found because it was never there, or because some other mutation already removed it

* Be more careful applying mutations as replay-stopping things can go wrong, e.g. node removal parent belongs to a different FullSnapshot and has e.g. a text nodeType

* Don't warn when a modified node has been removed in the same mutation - or the parent node for a removed node has been already removed
2026-04-01 12:00:00 +08:00
Mark-fenng
404309ba14 Merge branch 'rrweb-snapshot' into monorepo 2026-04-01 12:00:00 +08:00
Mark-fenng
2ef99ed976 moved rrweb-player into packages/rrweb-player 2026-04-01 12:00:00 +08:00
Yanzhen Yu
d144f29f71 upgrade rrweb-snapshot to 1.1.7
ignore prefetch and preload script links
close #52, #297, #597

Handle quoted strings in data url
2026-04-01 12:00:00 +08:00
Mark-fenng
392c4bd871 moved rrweb-snapshot into packages/rrweb-snapshot 2026-04-01 12:00:00 +08:00