@openreplay/tracker 16.0.2 → 16.0.3-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/dist/cjs/entry.js +27 -13
- package/dist/cjs/entry.js.map +1 -1
- package/dist/cjs/index.js +27 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/main/modules/attributeSender.d.ts +2 -2
- package/dist/lib/entry.js +27 -13
- package/dist/lib/entry.js.map +1 -1
- package/dist/lib/index.js +27 -13
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/main/modules/attributeSender.d.ts +2 -2
- package/dist/types/main/modules/attributeSender.d.ts +2 -2
- package/package.json +1 -1
|
@@ -5,11 +5,11 @@ export declare class StringDictionary {
|
|
|
5
5
|
/** backwards dictionary of
|
|
6
6
|
* [repeated str:key]
|
|
7
7
|
* */
|
|
8
|
-
backDict
|
|
8
|
+
private backDict;
|
|
9
9
|
getKey: (str: string) => [number, boolean];
|
|
10
10
|
}
|
|
11
11
|
export default class AttributeSender {
|
|
12
|
-
dict
|
|
12
|
+
private dict;
|
|
13
13
|
private readonly app;
|
|
14
14
|
private readonly isDictDisabled;
|
|
15
15
|
constructor(options: {
|
package/dist/lib/entry.js
CHANGED
|
@@ -3707,9 +3707,26 @@ async function parseUseEl(useElement, mode, domParser) {
|
|
|
3707
3707
|
console.debug('Openreplay: xlink:href or href not found on <use>.');
|
|
3708
3708
|
return;
|
|
3709
3709
|
}
|
|
3710
|
-
|
|
3711
|
-
if
|
|
3712
|
-
|
|
3710
|
+
let [url, symbolId] = href.split('#');
|
|
3711
|
+
// happens if svg spritemap is local, fastest case for us
|
|
3712
|
+
if (!url && symbolId) {
|
|
3713
|
+
const symbol = document.querySelector(href);
|
|
3714
|
+
if (symbol) {
|
|
3715
|
+
const inlineSvg = `
|
|
3716
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="${symbol.getAttribute('viewBox') || '0 0 24 24'}">
|
|
3717
|
+
${symbol.innerHTML}
|
|
3718
|
+
</svg>
|
|
3719
|
+
`.trim();
|
|
3720
|
+
iconCache[symbolId] = inlineSvg;
|
|
3721
|
+
return inlineSvg;
|
|
3722
|
+
}
|
|
3723
|
+
else {
|
|
3724
|
+
console.warn('Openreplay: Sprite symbol not found in the document.');
|
|
3725
|
+
return;
|
|
3726
|
+
}
|
|
3727
|
+
}
|
|
3728
|
+
if (!url && !symbolId) {
|
|
3729
|
+
console.warn('Openreplay: Invalid xlink:href or href found on <use>.');
|
|
3713
3730
|
return;
|
|
3714
3731
|
}
|
|
3715
3732
|
if (iconCache[symbolId]) {
|
|
@@ -4708,7 +4725,7 @@ class App {
|
|
|
4708
4725
|
this.stopCallbacks = [];
|
|
4709
4726
|
this.commitCallbacks = [];
|
|
4710
4727
|
this.activityState = ActivityState.NotActive;
|
|
4711
|
-
this.version = '16.0.
|
|
4728
|
+
this.version = '16.0.3-beta-1'; // TODO: version compatability check inside each plugin.
|
|
4712
4729
|
this.socketMode = false;
|
|
4713
4730
|
this.compressionThreshold = 24 * 1000;
|
|
4714
4731
|
this.bc = null;
|
|
@@ -5321,8 +5338,7 @@ class App {
|
|
|
5321
5338
|
* */
|
|
5322
5339
|
_nCommit() {
|
|
5323
5340
|
if (this.socketMode) {
|
|
5324
|
-
this.messages.unshift(TabData(this.session.getTabId()));
|
|
5325
|
-
this.messages.unshift(Timestamp(this.timestamp()));
|
|
5341
|
+
this.messages.unshift(Timestamp(this.timestamp()), TabData(this.session.getTabId()));
|
|
5326
5342
|
this.commitCallbacks.forEach((cb) => cb(this.messages));
|
|
5327
5343
|
this.messages.length = 0;
|
|
5328
5344
|
return;
|
|
@@ -5341,8 +5357,7 @@ class App {
|
|
|
5341
5357
|
}
|
|
5342
5358
|
try {
|
|
5343
5359
|
requestIdleCb(() => {
|
|
5344
|
-
this.messages.unshift(TabData(this.session.getTabId()));
|
|
5345
|
-
this.messages.unshift(Timestamp(this.timestamp()));
|
|
5360
|
+
this.messages.unshift(Timestamp(this.timestamp()), TabData(this.session.getTabId()));
|
|
5346
5361
|
this.worker?.postMessage(this.messages);
|
|
5347
5362
|
this.commitCallbacks.forEach((cb) => cb(this.messages));
|
|
5348
5363
|
this.messages.length = 0;
|
|
@@ -5365,10 +5380,9 @@ class App {
|
|
|
5365
5380
|
_cStartCommit() {
|
|
5366
5381
|
this.coldStartCommitN += 1;
|
|
5367
5382
|
if (this.coldStartCommitN === 2) {
|
|
5368
|
-
this.
|
|
5369
|
-
this.bufferedMessages1.push(
|
|
5370
|
-
this.bufferedMessages2.push(
|
|
5371
|
-
this.bufferedMessages2.push(TabData(this.session.getTabId()));
|
|
5383
|
+
const payload = [Timestamp(this.timestamp()), TabData(this.session.getTabId())];
|
|
5384
|
+
this.bufferedMessages1.push(...payload);
|
|
5385
|
+
this.bufferedMessages2.push(...payload);
|
|
5372
5386
|
this.coldStartCommitN = 0;
|
|
5373
5387
|
}
|
|
5374
5388
|
}
|
|
@@ -9171,7 +9185,7 @@ class API {
|
|
|
9171
9185
|
this.signalStartIssue = (reason, missingApi) => {
|
|
9172
9186
|
const doNotTrack = this.checkDoNotTrack();
|
|
9173
9187
|
console.log("Tracker couldn't start due to:", JSON.stringify({
|
|
9174
|
-
trackerVersion: '16.0.
|
|
9188
|
+
trackerVersion: '16.0.3-beta-1',
|
|
9175
9189
|
projectKey: this.options.projectKey,
|
|
9176
9190
|
doNotTrack,
|
|
9177
9191
|
reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,
|