@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/lib/index.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
- const [url, symbolId] = href.split('#');
3711
- if (!url || !symbolId) {
3712
- console.debug('Openreplay: Invalid xlink:href or href found on <use>.');
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.2'; // TODO: version compatability check inside each plugin.
4728
+ this.version = '16.0.3'; // TODO: version compatability check inside each plugin.
4712
4729
  this.socketMode = false;
4713
4730
  this.compressionThreshold = 24 * 1000;
4714
4731
  this.bc = null;
@@ -9171,7 +9188,7 @@ class API {
9171
9188
  this.signalStartIssue = (reason, missingApi) => {
9172
9189
  const doNotTrack = this.checkDoNotTrack();
9173
9190
  console.log("Tracker couldn't start due to:", JSON.stringify({
9174
- trackerVersion: '16.0.2',
9191
+ trackerVersion: '16.0.3',
9175
9192
  projectKey: this.options.projectKey,
9176
9193
  doNotTrack,
9177
9194
  reason: missingApi.length ? `missing api: ${missingApi.join(',')}` : reason,