@openreplay/tracker 16.0.2 → 16.0.3

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 CHANGED
@@ -3711,9 +3711,26 @@ async function parseUseEl(useElement, mode, domParser) {
3711
3711
  console.debug('Openreplay: xlink:href or href not found on <use>.');
3712
3712
  return;
3713
3713
  }
3714
- const [url, symbolId] = href.split('#');
3715
- if (!url || !symbolId) {
3716
- console.debug('Openreplay: Invalid xlink:href or href found on <use>.');
3714
+ let [url, symbolId] = href.split('#');
3715
+ // happens if svg spritemap is local, fastest case for us
3716
+ if (!url && symbolId) {
3717
+ const symbol = document.querySelector(href);
3718
+ if (symbol) {
3719
+ const inlineSvg = `
3720
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="${symbol.getAttribute('viewBox') || '0 0 24 24'}">
3721
+ ${symbol.innerHTML}
3722
+ </svg>
3723
+ `.trim();
3724
+ iconCache[symbolId] = inlineSvg;
3725
+ return inlineSvg;
3726
+ }
3727
+ else {
3728
+ console.warn('Openreplay: Sprite symbol not found in the document.');
3729
+ return;
3730
+ }
3731
+ }
3732
+ if (!url && !symbolId) {
3733
+ console.warn('Openreplay: Invalid xlink:href or href found on <use>.');
3717
3734
  return;
3718
3735
  }
3719
3736
  if (iconCache[symbolId]) {
@@ -4712,7 +4729,7 @@ class App {
4712
4729
  this.stopCallbacks = [];
4713
4730
  this.commitCallbacks = [];
4714
4731
  this.activityState = ActivityState.NotActive;
4715
- this.version = '16.0.2'; // TODO: version compatability check inside each plugin.
4732
+ this.version = '16.0.3'; // TODO: version compatability check inside each plugin.
4716
4733
  this.socketMode = false;
4717
4734
  this.compressionThreshold = 24 * 1000;
4718
4735
  this.bc = null;
@@ -9175,7 +9192,7 @@ class API {
9175
9192
  this.signalStartIssue = (reason, missingApi) => {
9176
9193
  const doNotTrack = this.checkDoNotTrack();
9177
9194
  console.log("Tracker couldn't start due to:", JSON.stringify({
9178
- trackerVersion: '16.0.2',
9195
+ trackerVersion: '16.0.3',
9179
9196
  projectKey: this.options.projectKey,
9180
9197
  doNotTrack,
9181
9198
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,