From a7c33f2093c4d92faf7ae25e8bb0e088d122c13b Mon Sep 17 00:00:00 2001 From: Eoghan Murray Date: Tue, 26 Mar 2024 15:44:43 +0000 Subject: [PATCH 1/5] Fix some css issues with :hover and rewrite max-device-width (#1431) * We weren't recursing into media queries (or @supports etc.) to rewrite hover pseudoclasses * The early return meant that the stylesWithHoverClass cache wasn't being populated if there were no hover selectors on the stylesheet - not committing the test, but modifying the existing 'add a hover class to a previously processed css string' as follows shows the problem: --- a/packages/rrweb-snapshot/test/rebuild.test.ts +++ b/packages/rrweb-snapshot/test/rebuild.test.ts @@ -151,6 +185,7 @@ describe('rebuild', function () { path.resolve(__dirname, './css/benchmark.css'), 'utf8', ); + cssText = cssText.replace(/:hover/g, ''); const start = process.hrtime(); addHoverClass(cssText, cache); * Replace `min-device-width` and similar with `min-width` as the former looks out at the browser viewport whereas we need it to look at the replayer iframe viewport * Add some tests to show how the hover replacement works against selector lists. I believe these were failing in a previous version of rrweb as I had some local patches that no longer seem to be needed to handle these cases * Update name of function to reflect that 'addHoverClass' does more than just :hover. I believe this function is only exported for the purposes of use in the tests * Apply formatting changes * Create rotten-spies-enjoy.md * Apply formatting changes * Add correct typing on `getSelectors` * Refactor CSS interfaces to include optional rules * Change `rules` to be non optional --------- Co-authored-by: eoghanmurray Co-authored-by: Justin Halsall --- .changeset/rotten-spies-enjoy.md | 7 ++ packages/rrweb-snapshot/src/css.ts | 30 +++----- packages/rrweb-snapshot/src/index.ts | 4 +- packages/rrweb-snapshot/src/rebuild.ts | 80 +++++++++++++------- packages/rrweb-snapshot/test/rebuild.test.ts | 69 ++++++++++++++--- 5 files changed, 133 insertions(+), 57 deletions(-) create mode 100644 .changeset/rotten-spies-enjoy.md diff --git a/.changeset/rotten-spies-enjoy.md b/.changeset/rotten-spies-enjoy.md new file mode 100644 index 0000000000..5f5954fcac --- /dev/null +++ b/.changeset/rotten-spies-enjoy.md @@ -0,0 +1,7 @@ +--- +'rrweb-snapshot': patch +'rrweb': patch +--- + +Ensure :hover works on replayer, even if a rule is behind a media query +Respect the intent behind max-device-width and min-device-width media queries so that their effects are apparent in the replayer context diff --git a/packages/rrweb-snapshot/src/css.ts b/packages/rrweb-snapshot/src/css.ts index d7a413eb67..522e257daf 100644 --- a/packages/rrweb-snapshot/src/css.ts +++ b/packages/rrweb-snapshot/src/css.ts @@ -56,6 +56,11 @@ export interface Node { }; } +export interface NodeWithRules extends Node { + /** Array of nodes with the types rule, comment and any of the at-rule types. */ + rules: Array; +} + export interface Rule extends Node { /** The list of selectors of the rule, split on commas. Each selector is trimmed from whitespace and comments. */ selectors?: string[]; @@ -98,13 +103,11 @@ export interface CustomMedia extends Node { /** * The @document at-rule. */ -export interface Document extends Node { +export interface Document extends NodeWithRules { /** The part following @document. */ document?: string; /** The vendor prefix in @document, or undefined if there is none. */ vendor?: string; - /** Array of nodes with the types rule, comment and any of the at-rule types. */ - rules?: Array; } /** @@ -118,10 +121,7 @@ export interface FontFace extends Node { /** * The @host at-rule. */ -export interface Host extends Node { - /** Array of nodes with the types rule, comment and any of the at-rule types. */ - rules?: Array; -} +export type Host = NodeWithRules; /** * The @import at-rule. @@ -153,11 +153,9 @@ export interface KeyFrame extends Node { /** * The @media at-rule. */ -export interface Media extends Node { +export interface Media extends NodeWithRules { /** The part following @media. */ media?: string; - /** Array of nodes with the types rule, comment and any of the at-rule types. */ - rules?: Array; } /** @@ -181,11 +179,9 @@ export interface Page extends Node { /** * The @supports at-rule. */ -export interface Supports extends Node { +export interface Supports extends NodeWithRules { /** The part following @supports. */ supports?: string; - /** Array of nodes with the types rule, comment and any of the at-rule types. */ - rules?: Array; } /** All at-rules. */ @@ -205,10 +201,8 @@ export type AtRule = /** * A collection of rules */ -export interface StyleRules { +export interface StyleRules extends NodeWithRules { source?: string; - /** Array of nodes with the types rule, comment and any of the at-rule types. */ - rules: Array; /** Array of Errors. Errors collected during parsing when option silent is true. */ parsingErrors?: ParserError[]; } @@ -224,7 +218,7 @@ export interface Stylesheet extends Node { // https://github.com/visionmedia/css-parse/pull/49#issuecomment-30088027 const commentre = /\/\*[^*]*\*+([^/*][^*]*\*+)*\//g; -export function parse(css: string, options: ParserOptions = {}) { +export function parse(css: string, options: ParserOptions = {}): Stylesheet { /** * Positional. */ @@ -882,7 +876,7 @@ function trim(str: string) { * Adds non-enumerable parent node reference to each node. */ -function addParent(obj: Stylesheet, parent?: Stylesheet) { +function addParent(obj: Stylesheet, parent?: Stylesheet): Stylesheet { const isNode = obj && typeof obj.type === 'string'; const childParent = isNode ? obj : parent; diff --git a/packages/rrweb-snapshot/src/index.ts b/packages/rrweb-snapshot/src/index.ts index ef9d1b19fa..c9f91a9100 100644 --- a/packages/rrweb-snapshot/src/index.ts +++ b/packages/rrweb-snapshot/src/index.ts @@ -11,7 +11,7 @@ import snapshot, { } from './snapshot'; import rebuild, { buildNodeWithSN, - addHoverClass, + adaptCssForReplay, createCache, } from './rebuild'; export * from './types'; @@ -22,7 +22,7 @@ export { serializeNodeWithId, rebuild, buildNodeWithSN, - addHoverClass, + adaptCssForReplay, createCache, transformAttribute, ignoreAttribute, diff --git a/packages/rrweb-snapshot/src/rebuild.ts b/packages/rrweb-snapshot/src/rebuild.ts index 10bf067a76..dc9b6c3b9f 100644 --- a/packages/rrweb-snapshot/src/rebuild.ts +++ b/packages/rrweb-snapshot/src/rebuild.ts @@ -1,4 +1,4 @@ -import { parse } from './css'; +import { Rule, Media, NodeWithRules, parse } from './css'; import { serializedNodeWithId, NodeType, @@ -62,9 +62,11 @@ function escapeRegExp(str: string) { return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string } +const MEDIA_SELECTOR = /(max|min)-device-(width|height)/; +const MEDIA_SELECTOR_GLOBAL = new RegExp(MEDIA_SELECTOR.source, 'g'); const HOVER_SELECTOR = /([^\\]):hover/; const HOVER_SELECTOR_GLOBAL = new RegExp(HOVER_SELECTOR.source, 'g'); -export function addHoverClass(cssText: string, cache: BuildCache): string { +export function adaptCssForReplay(cssText: string, cache: BuildCache): string { const cachedStyle = cache?.stylesWithHoverClass.get(cssText); if (cachedStyle) return cachedStyle; @@ -77,35 +79,61 @@ export function addHoverClass(cssText: string, cache: BuildCache): string { } const selectors: string[] = []; - ast.stylesheet.rules.forEach((rule) => { - if ('selectors' in rule) { - (rule.selectors || []).forEach((selector: string) => { + const medias: string[] = []; + function getSelectors(rule: Rule | Media | NodeWithRules) { + if ('selectors' in rule && rule.selectors) { + rule.selectors.forEach((selector: string) => { if (HOVER_SELECTOR.test(selector)) { selectors.push(selector); } }); } - }); - - if (selectors.length === 0) { - return cssText; + if ('media' in rule && rule.media && MEDIA_SELECTOR.test(rule.media)) { + medias.push(rule.media); + } + if ('rules' in rule && rule.rules) { + rule.rules.forEach(getSelectors); + } } + getSelectors(ast.stylesheet); - const selectorMatcher = new RegExp( - selectors - .filter((selector, index) => selectors.indexOf(selector) === index) - .sort((a, b) => b.length - a.length) - .map((selector) => { - return escapeRegExp(selector); - }) - .join('|'), - 'g', - ); - - const result = cssText.replace(selectorMatcher, (selector) => { - const newSelector = selector.replace(HOVER_SELECTOR_GLOBAL, '$1.\\:hover'); - return `${selector}, ${newSelector}`; - }); + let result = cssText; + if (selectors.length > 0) { + const selectorMatcher = new RegExp( + selectors + .filter((selector, index) => selectors.indexOf(selector) === index) + .sort((a, b) => b.length - a.length) + .map((selector) => { + return escapeRegExp(selector); + }) + .join('|'), + 'g', + ); + result = result.replace(selectorMatcher, (selector) => { + const newSelector = selector.replace( + HOVER_SELECTOR_GLOBAL, + '$1.\\:hover', + ); + return `${selector}, ${newSelector}`; + }); + } + if (medias.length > 0) { + const mediaMatcher = new RegExp( + medias + .filter((media, index) => medias.indexOf(media) === index) + .sort((a, b) => b.length - a.length) + .map((media) => { + return escapeRegExp(media); + }) + .join('|'), + 'g', + ); + result = result.replace(mediaMatcher, (media) => { + // not attempting to maintain min-device-width along with min-width + // (it's non standard) + return media.replace(MEDIA_SELECTOR_GLOBAL, '$1-$2'); + }); + } cache?.stylesWithHoverClass.set(cssText, result); return result; } @@ -196,7 +224,7 @@ function buildNode( const isTextarea = tagName === 'textarea' && name === 'value'; const isRemoteOrDynamicCss = tagName === 'style' && name === '_cssText'; if (isRemoteOrDynamicCss && hackCss && typeof value === 'string') { - value = addHoverClass(value, cache); + value = adaptCssForReplay(value, cache); } if ((isTextarea || isRemoteOrDynamicCss) && typeof value === 'string') { node.appendChild(doc.createTextNode(value)); @@ -341,7 +369,7 @@ function buildNode( case NodeType.Text: return doc.createTextNode( n.isStyle && hackCss - ? addHoverClass(n.textContent, cache) + ? adaptCssForReplay(n.textContent, cache) : n.textContent, ); case NodeType.CDATA: diff --git a/packages/rrweb-snapshot/test/rebuild.test.ts b/packages/rrweb-snapshot/test/rebuild.test.ts index 357cd2fb3c..097ff0989a 100644 --- a/packages/rrweb-snapshot/test/rebuild.test.ts +++ b/packages/rrweb-snapshot/test/rebuild.test.ts @@ -3,7 +3,11 @@ */ import * as fs from 'fs'; import * as path from 'path'; -import { addHoverClass, buildNodeWithSN, createCache } from '../src/rebuild'; +import { + adaptCssForReplay, + buildNodeWithSN, + createCache, +} from '../src/rebuild'; import { NodeType } from '../src/types'; import { createMirror, Mirror } from '../src/utils'; @@ -81,47 +85,90 @@ describe('rebuild', function () { describe('add hover class to hover selector related rules', function () { it('will do nothing to css text without :hover', () => { const cssText = 'body { color: white }'; - expect(addHoverClass(cssText, cache)).toEqual(cssText); + expect(adaptCssForReplay(cssText, cache)).toEqual(cssText); }); it('can add hover class to css text', () => { const cssText = '.a:hover { color: white }'; - expect(addHoverClass(cssText, cache)).toEqual( + expect(adaptCssForReplay(cssText, cache)).toEqual( '.a:hover, .a.\\:hover { color: white }', ); }); + it('can correctly add hover when in middle of selector', () => { + const cssText = 'ul li a:hover img { color: white }'; + expect(adaptCssForReplay(cssText, cache)).toEqual( + 'ul li a:hover img, ul li a.\\:hover img { color: white }', + ); + }); + + it('can correctly add hover on multiline selector', () => { + const cssText = `ul li.specified a:hover img, +ul li.multiline +b:hover +img, +ul li.specified c:hover img { + color: white +}`; + expect(adaptCssForReplay(cssText, cache)).toEqual( + `ul li.specified a:hover img, ul li.specified a.\\:hover img, +ul li.multiline +b:hover +img, ul li.multiline +b.\\:hover +img, +ul li.specified c:hover img, ul li.specified c.\\:hover img { + color: white +}`, + ); + }); + + it('can add hover class within media query', () => { + const cssText = '@media screen { .m:hover { color: white } }'; + expect(adaptCssForReplay(cssText, cache)).toEqual( + '@media screen { .m:hover, .m.\\:hover { color: white } }', + ); + }); + it('can add hover class when there is multi selector', () => { const cssText = '.a, .b:hover, .c { color: white }'; - expect(addHoverClass(cssText, cache)).toEqual( + expect(adaptCssForReplay(cssText, cache)).toEqual( '.a, .b:hover, .b.\\:hover, .c { color: white }', ); }); it('can add hover class when there is a multi selector with the same prefix', () => { const cssText = '.a:hover, .a:hover::after { color: white }'; - expect(addHoverClass(cssText, cache)).toEqual( + expect(adaptCssForReplay(cssText, cache)).toEqual( '.a:hover, .a.\\:hover, .a:hover::after, .a.\\:hover::after { color: white }', ); }); it('can add hover class when :hover is not the end of selector', () => { const cssText = 'div:hover::after { color: white }'; - expect(addHoverClass(cssText, cache)).toEqual( + expect(adaptCssForReplay(cssText, cache)).toEqual( 'div:hover::after, div.\\:hover::after { color: white }', ); }); it('can add hover class when the selector has multi :hover', () => { const cssText = 'a:hover b:hover { color: white }'; - expect(addHoverClass(cssText, cache)).toEqual( + expect(adaptCssForReplay(cssText, cache)).toEqual( 'a:hover b:hover, a.\\:hover b.\\:hover { color: white }', ); }); it('will ignore :hover in css value', () => { const cssText = '.a::after { content: ":hover" }'; - expect(addHoverClass(cssText, cache)).toEqual(cssText); + expect(adaptCssForReplay(cssText, cache)).toEqual(cssText); + }); + + it('can adapt media rules to replay context', () => { + const cssText = + '@media only screen and (min-device-width : 1200px) { .a { width: 10px; }}'; + expect(adaptCssForReplay(cssText, cache)).toEqual( + '@media only screen and (min-width : 1200px) { .a { width: 10px; }}', + ); }); // this benchmark is unreliable when run in parallel with other tests @@ -131,7 +178,7 @@ describe('rebuild', function () { 'utf8', ); const start = process.hrtime(); - addHoverClass(cssText, cache); + adaptCssForReplay(cssText, cache); const end = process.hrtime(start); const duration = getDuration(end); expect(duration).toBeLessThan(100); @@ -146,11 +193,11 @@ describe('rebuild', function () { ); const start = process.hrtime(); - addHoverClass(cssText, cache); + adaptCssForReplay(cssText, cache); const end = process.hrtime(start); const cachedStart = process.hrtime(); - addHoverClass(cssText, cache); + adaptCssForReplay(cssText, cache); const cachedEnd = process.hrtime(cachedStart); expect(getDuration(cachedEnd) * factor).toBeLessThan(getDuration(end)); From 5e6a0be3a10820c3b039c4146980912e1ebc995c Mon Sep 17 00:00:00 2001 From: Daniel Engelke Date: Wed, 27 Mar 2024 00:11:04 +0800 Subject: [PATCH 2/5] Add HowdyGo to Who's using rrweb (#1423) * Add HowdyGo to Who's using rrweb * Create twenty-goats-kneel.md --------- Co-authored-by: Justin Halsall --- .changeset/twenty-goats-kneel.md | 2 ++ README.md | 5 +++++ 2 files changed, 7 insertions(+) create mode 100644 .changeset/twenty-goats-kneel.md diff --git a/.changeset/twenty-goats-kneel.md b/.changeset/twenty-goats-kneel.md new file mode 100644 index 0000000000..a845151cc8 --- /dev/null +++ b/.changeset/twenty-goats-kneel.md @@ -0,0 +1,2 @@ +--- +--- diff --git a/README.md b/README.md index 0d518df6f1..dc2ffef021 100644 --- a/README.md +++ b/README.md @@ -242,5 +242,10 @@ In addition to adding integration tests and unit tests, rrweb also provides a RE Self-hosted website analytics with heatmaps and session recordings. + + + Interactive product demos for small marketing teams + + From 104900263a711c62c006425f43be6f7f270310f1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 16:29:26 +0200 Subject: [PATCH 3/5] Version Packages (alpha) (#1291) Co-authored-by: github-actions[bot] --- .changeset/pre.json | 27 +++++++++++++++++++ packages/rrdom-nodejs/CHANGELOG.md | 8 ++++++ packages/rrdom-nodejs/package.json | 6 ++--- packages/rrdom/CHANGELOG.md | 9 +++++++ packages/rrdom/package.json | 6 ++--- packages/rrvideo/CHANGELOG.md | 7 +++++ packages/rrvideo/package.json | 6 ++--- packages/rrweb-player/CHANGELOG.md | 7 +++++ packages/rrweb-player/package.json | 6 ++--- packages/rrweb-snapshot/CHANGELOG.md | 23 ++++++++++++++++ packages/rrweb-snapshot/package.json | 2 +- packages/rrweb/CHANGELOG.md | 40 ++++++++++++++++++++++++++++ packages/rrweb/package.json | 8 +++--- packages/types/CHANGELOG.md | 7 +++++ packages/types/package.json | 4 +-- packages/web-extension/CHANGELOG.md | 16 +++++++++++ packages/web-extension/package.json | 8 +++--- 17 files changed, 167 insertions(+), 23 deletions(-) diff --git a/.changeset/pre.json b/.changeset/pre.json index 067c4ae386..2b1c152737 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -14,64 +14,91 @@ "changesets": [ "attribute-text-reductions", "brave-numbers-joke", + "breezy-mice-breathe", "calm-bulldogs-speak", + "calm-oranges-sin", "chatty-cherries-train", "clean-plants-play", "clean-shrimps-lay", "cold-eyes-hunt", + "cold-hounds-teach", "controller-finish-flag", + "cuddly-readers-warn", "curvy-apples-lay", "date-now-guard", "eight-terms-hunt", "empty-bikes-cheer", "fair-dragons-greet", "fast-chefs-smell", + "few-rockets-travel", "few-turkeys-reflect", "five-peas-lay", + "fluffy-planes-retire", "forty-elephants-attack", "fresh-cars-impress", "fresh-spoons-drive", + "friendly-numbers-leave", + "gold-apples-joke", "gold-terms-look", "grumpy-ways-own", + "hip-worms-relax", "itchy-dryers-double", "khaki-dots-bathe", "large-ants-prove", + "lazy-squids-draw", "lazy-toes-confess", + "lemon-lamps-switch", "little-radios-thank", "little-suits-leave", "loud-seals-raise", "lovely-pears-cross", "lovely-students-boil", "mean-tips-impress", + "mighty-bulldogs-begin", "mighty-frogs-sparkle", + "moody-dots-refuse", "nervous-buses-pump", + "nervous-mirrors-perform", "nervous-poets-grin", "nervous-tables-travel", "new-snakes-call", "nice-pugs-reply", "old-dryers-hide", + "polite-olives-wave", "pretty-plums-rescue", "pretty-schools-remember", "proud-experts-jam", + "rare-adults-sneeze", "real-masks-explode", "real-trains-switch", "rich-crews-protect", "rich-jars-remember", + "rotten-spies-enjoy", "serious-ants-juggle", + "silver-windows-float", "sixty-impalas-laugh", "small-olives-arrive", + "smart-ears-refuse", + "smooth-papayas-boil", "smooth-poems-bake", + "spotty-bees-destroy", "stupid-ghosts-help", + "swift-dancers-rest", "swift-peas-film", + "thin-vans-applaud", "thirty-baboons-punch", + "tidy-swans-repair", "tidy-yaks-joke", "tiny-buckets-love", + "tiny-candles-whisper", "tiny-chairs-build", "tricky-panthers-guess", + "twenty-goats-kneel", "twenty-lies-switch", "twenty-planets-repeat", "violet-melons-itch", "violet-zebras-cry", + "witty-kids-talk", "yellow-mails-cheat", "young-timers-grow" ] diff --git a/packages/rrdom-nodejs/CHANGELOG.md b/packages/rrdom-nodejs/CHANGELOG.md index 644746d893..80316eea48 100644 --- a/packages/rrdom-nodejs/CHANGELOG.md +++ b/packages/rrdom-nodejs/CHANGELOG.md @@ -1,5 +1,13 @@ # rrdom-nodejs +## 2.0.0-alpha.12 + +### Patch Changes + +- Updated dependencies [[`58c9104`](https://github.com/rrweb-io/rrweb/commit/58c9104eddc8b7994a067a97daae5684e42f892f), [`a2be77b`](https://github.com/rrweb-io/rrweb/commit/a2be77b82826c4be0e7f3c7c9f7ee50476d5f6f8), [`a7c33f2`](https://github.com/rrweb-io/rrweb/commit/a7c33f2093c4d92faf7ae25e8bb0e088d122c13b), [`8aea5b0`](https://github.com/rrweb-io/rrweb/commit/8aea5b00a4dfe5a6f59bd2ae72bb624f45e51e81), [`314a8dd`](https://github.com/rrweb-io/rrweb/commit/314a8dde5a13095873b89d07bac7c949918bf817), [`e607e83`](https://github.com/rrweb-io/rrweb/commit/e607e83b21d45131a56c1ff606e9519a5b475fc1), [`7c0dc9d`](https://github.com/rrweb-io/rrweb/commit/7c0dc9dfe1564c9d6624557c5b394e7844955882), [`07ac5c9`](https://github.com/rrweb-io/rrweb/commit/07ac5c9e1371824ec3ffb705f9250bbe10f4b73e)]: + - rrweb-snapshot@2.0.0-alpha.12 + - rrdom@2.0.0-alpha.12 + ## 2.0.0-alpha.11 ### Patch Changes diff --git a/packages/rrdom-nodejs/package.json b/packages/rrdom-nodejs/package.json index 58aad4a681..b15eed2fd8 100644 --- a/packages/rrdom-nodejs/package.json +++ b/packages/rrdom-nodejs/package.json @@ -1,6 +1,6 @@ { "name": "rrdom-nodejs", - "version": "2.0.0-alpha.11", + "version": "2.0.0-alpha.12", "scripts": { "dev": "rollup -c -w", "bundle": "rollup --config", @@ -48,8 +48,8 @@ "cssom": "^0.5.0", "cssstyle": "^2.3.0", "nwsapi": "^2.2.0", - "rrdom": "^2.0.0-alpha.11", - "rrweb-snapshot": "^2.0.0-alpha.11" + "rrdom": "^2.0.0-alpha.12", + "rrweb-snapshot": "^2.0.0-alpha.12" }, "browserslist": [ "supports es6-class" diff --git a/packages/rrdom/CHANGELOG.md b/packages/rrdom/CHANGELOG.md index 656122115a..86e7df7956 100644 --- a/packages/rrdom/CHANGELOG.md +++ b/packages/rrdom/CHANGELOG.md @@ -1,5 +1,14 @@ # rrdom +## 2.0.0-alpha.12 + +### Patch Changes + +- [#1352](https://github.com/rrweb-io/rrweb/pull/1352) [`e607e83`](https://github.com/rrweb-io/rrweb/commit/e607e83b21d45131a56c1ff606e9519a5b475fc1) Thanks [@juliecheng](https://github.com/juliecheng)! - fix: scrolling may not be applied when fast-forwarding + +- Updated dependencies [[`58c9104`](https://github.com/rrweb-io/rrweb/commit/58c9104eddc8b7994a067a97daae5684e42f892f), [`a2be77b`](https://github.com/rrweb-io/rrweb/commit/a2be77b82826c4be0e7f3c7c9f7ee50476d5f6f8), [`a7c33f2`](https://github.com/rrweb-io/rrweb/commit/a7c33f2093c4d92faf7ae25e8bb0e088d122c13b), [`8aea5b0`](https://github.com/rrweb-io/rrweb/commit/8aea5b00a4dfe5a6f59bd2ae72bb624f45e51e81), [`314a8dd`](https://github.com/rrweb-io/rrweb/commit/314a8dde5a13095873b89d07bac7c949918bf817), [`7c0dc9d`](https://github.com/rrweb-io/rrweb/commit/7c0dc9dfe1564c9d6624557c5b394e7844955882), [`07ac5c9`](https://github.com/rrweb-io/rrweb/commit/07ac5c9e1371824ec3ffb705f9250bbe10f4b73e)]: + - rrweb-snapshot@2.0.0-alpha.12 + ## 2.0.0-alpha.11 ### Patch Changes diff --git a/packages/rrdom/package.json b/packages/rrdom/package.json index f7122da917..7af59a7652 100644 --- a/packages/rrdom/package.json +++ b/packages/rrdom/package.json @@ -1,6 +1,6 @@ { "name": "rrdom", - "version": "2.0.0-alpha.11", + "version": "2.0.0-alpha.12", "homepage": "https://github.com/rrweb-io/rrweb/tree/main/packages/rrdom#readme", "license": "MIT", "main": "lib/rrdom.cjs", @@ -32,7 +32,7 @@ }, "devDependencies": { "@rollup/plugin-commonjs": "^20.0.0", - "@rrweb/types": "^2.0.0-alpha.11", + "@rrweb/types": "^2.0.0-alpha.12", "@types/jest": "^27.4.1", "@types/puppeteer": "^5.4.4", "@typescript-eslint/eslint-plugin": "^5.23.0", @@ -47,6 +47,6 @@ "ts-jest": "^27.1.3" }, "dependencies": { - "rrweb-snapshot": "^2.0.0-alpha.11" + "rrweb-snapshot": "^2.0.0-alpha.12" } } diff --git a/packages/rrvideo/CHANGELOG.md b/packages/rrvideo/CHANGELOG.md index d0a3168f9c..1d12ef6087 100644 --- a/packages/rrvideo/CHANGELOG.md +++ b/packages/rrvideo/CHANGELOG.md @@ -1,5 +1,12 @@ # rrvideo +## 2.0.0-alpha.12 + +### Patch Changes + +- Updated dependencies []: + - rrweb-player@2.0.0-alpha.12 + ## 2.0.0-alpha.11 ### Patch Changes diff --git a/packages/rrvideo/package.json b/packages/rrvideo/package.json index 5472c8981a..0b5c2e8bca 100644 --- a/packages/rrvideo/package.json +++ b/packages/rrvideo/package.json @@ -1,6 +1,6 @@ { "name": "rrvideo", - "version": "2.0.0-alpha.11", + "version": "2.0.0-alpha.12", "description": "transform rrweb session into video", "main": "build/index.js", "bin": { @@ -26,13 +26,13 @@ "@types/node": "^18.15.11", "jest": "^27.5.1", "ts-jest": "^27.1.3", - "@rrweb/types": "^2.0.0-alpha.11" + "@rrweb/types": "^2.0.0-alpha.12" }, "dependencies": { "@open-tech-world/cli-progress-bar": "^2.0.2", "fs-extra": "^11.1.1", "minimist": "^1.2.5", "playwright": "^1.32.1", - "rrweb-player": "^2.0.0-alpha.11" + "rrweb-player": "^2.0.0-alpha.12" } } diff --git a/packages/rrweb-player/CHANGELOG.md b/packages/rrweb-player/CHANGELOG.md index 0743a3a1d3..55d610bbe7 100644 --- a/packages/rrweb-player/CHANGELOG.md +++ b/packages/rrweb-player/CHANGELOG.md @@ -1,5 +1,12 @@ # rrweb-player +## 2.0.0-alpha.12 + +### Patch Changes + +- Updated dependencies [[`af0962c`](https://github.com/rrweb-io/rrweb/commit/af0962cc6c80b693bbc622520032d17342685cf6), [`57a940a`](https://github.com/rrweb-io/rrweb/commit/57a940afac0bdd14cd82937915d53110b5311673), [`8aea5b0`](https://github.com/rrweb-io/rrweb/commit/8aea5b00a4dfe5a6f59bd2ae72bb624f45e51e81), [`9c6edfe`](https://github.com/rrweb-io/rrweb/commit/9c6edfe2261680b4e92284be69f9d183b1eca8f4), [`1e0b273`](https://github.com/rrweb-io/rrweb/commit/1e0b27382210db0168d2a79d82c13698082b0983), [`1fe39ab`](https://github.com/rrweb-io/rrweb/commit/1fe39ab0db7f5d2b04f4a4f39fb5c0cfee33a1f8), [`05478c3`](https://github.com/rrweb-io/rrweb/commit/05478c36dde03a118099783d908bb3e465e9859c), [`58c9104`](https://github.com/rrweb-io/rrweb/commit/58c9104eddc8b7994a067a97daae5684e42f892f), [`980a38c`](https://github.com/rrweb-io/rrweb/commit/980a38c816d763833fc3491f56d03c959a41122d), [`a2be77b`](https://github.com/rrweb-io/rrweb/commit/a2be77b82826c4be0e7f3c7c9f7ee50476d5f6f8), [`a7c33f2`](https://github.com/rrweb-io/rrweb/commit/a7c33f2093c4d92faf7ae25e8bb0e088d122c13b), [`314a8dd`](https://github.com/rrweb-io/rrweb/commit/314a8dde5a13095873b89d07bac7c949918bf817), [`7c0dc9d`](https://github.com/rrweb-io/rrweb/commit/7c0dc9dfe1564c9d6624557c5b394e7844955882), [`07ac5c9`](https://github.com/rrweb-io/rrweb/commit/07ac5c9e1371824ec3ffb705f9250bbe10f4b73e)]: + - rrweb@2.0.0-alpha.12 + ## 2.0.0-alpha.11 ### Patch Changes diff --git a/packages/rrweb-player/package.json b/packages/rrweb-player/package.json index f545256267..65f9db5d18 100644 --- a/packages/rrweb-player/package.json +++ b/packages/rrweb-player/package.json @@ -1,10 +1,10 @@ { "name": "rrweb-player", - "version": "2.0.0-alpha.11", + "version": "2.0.0-alpha.12", "devDependencies": { "@rollup/plugin-commonjs": "^22.0.0", "@rollup/plugin-node-resolve": "^13.2.1", - "@rrweb/types": "^2.0.0-alpha.11", + "@rrweb/types": "^2.0.0-alpha.12", "@types/offscreencanvas": "^2019.6.4", "eslint-config-google": "^0.14.0", "eslint-plugin-svelte3": "^4.0.0", @@ -24,7 +24,7 @@ }, "dependencies": { "@tsconfig/svelte": "^1.0.0", - "rrweb": "^2.0.0-alpha.11" + "rrweb": "^2.0.0-alpha.12" }, "scripts": { "build": "rollup -c", diff --git a/packages/rrweb-snapshot/CHANGELOG.md b/packages/rrweb-snapshot/CHANGELOG.md index 3051b02caf..26a2cf3a61 100644 --- a/packages/rrweb-snapshot/CHANGELOG.md +++ b/packages/rrweb-snapshot/CHANGELOG.md @@ -1,5 +1,28 @@ # rrweb-snapshot +## 2.0.0-alpha.12 + +### Minor Changes + +- [#1310](https://github.com/rrweb-io/rrweb/pull/1310) [`7c0dc9d`](https://github.com/rrweb-io/rrweb/commit/7c0dc9dfe1564c9d6624557c5b394e7844955882) Thanks [@benjackwhite](https://github.com/benjackwhite)! - Extends maskTextFn to pass the HTMLElement to the deciding function + +### Patch Changes + +- [#1272](https://github.com/rrweb-io/rrweb/pull/1272) [`58c9104`](https://github.com/rrweb-io/rrweb/commit/58c9104eddc8b7994a067a97daae5684e42f892f) Thanks [@eoghanmurray](https://github.com/eoghanmurray)! - Perf: Avoid creation of intermediary array when iterating over style rules + +- [#1351](https://github.com/rrweb-io/rrweb/pull/1351) [`a2be77b`](https://github.com/rrweb-io/rrweb/commit/a2be77b82826c4be0e7f3c7c9f7ee50476d5f6f8) Thanks [@eoghanmurray](https://github.com/eoghanmurray)! - Don't double-record the values of