@glimt/record 0.0.54 → 0.0.55

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/index.d.cts CHANGED
@@ -1,5 +1,8 @@
1
+ import { eventWithTime } from '@glimt/rrweb';
1
2
  import { record } from '@glimt/rrweb';
2
3
 
4
+ export { eventWithTime }
5
+
3
6
  export { record }
4
7
 
5
8
  export { }
package/dist/index.d.ts CHANGED
@@ -1,5 +1,8 @@
1
+ import { eventWithTime } from '@glimt/rrweb';
1
2
  import { record } from '@glimt/rrweb';
2
3
 
4
+ export { eventWithTime }
5
+
3
6
  export { record }
4
7
 
5
8
  export { }
package/dist/record.cjs CHANGED
@@ -430,9 +430,6 @@ const index = {
430
430
  const shouldTryAnonymousFetchingOnCorsError$1 = () => {
431
431
  return !("_rrweb_skip_re_fetching_to_suppress_cors_errors" in window && window._rrweb_skip_re_fetching_to_suppress_cors_errors === true);
432
432
  };
433
- const isDebug$1 = () => {
434
- return "_rrweb_is_debug" in window && window._rrweb_is_debug ? window._rrweb_is_debug : false;
435
- };
436
433
  function isElement(n2) {
437
434
  return n2.nodeType === n2.ELEMENT_NODE;
438
435
  }
@@ -1535,10 +1532,9 @@ function serializeElementNode(n2, options) {
1535
1532
  return;
1536
1533
  }
1537
1534
  } else {
1538
- if (isDebug$1())
1539
- console.warn(
1540
- `Cannot inline img src=${imageSrc}! Error: ${err}`
1541
- );
1535
+ console.warn(
1536
+ `Cannot inline img src=${imageSrc}! Error: ${err}`
1537
+ );
1542
1538
  }
1543
1539
  }
1544
1540
  inlineImageCleanup();
@@ -1694,7 +1690,7 @@ function serializeNodeWithId(n2, options) {
1694
1690
  cssCaptured
1695
1691
  });
1696
1692
  if (!_serializedNode) {
1697
- if (isDebug$1()) console.warn(n2, "not serialized");
1693
+ console.warn(n2, "not serialized");
1698
1694
  return null;
1699
1695
  }
1700
1696
  let id;
@@ -12676,9 +12672,6 @@ class StylesheetManager {
12676
12672
  trackStylesheetInLinkElement(_linkEl) {
12677
12673
  }
12678
12674
  }
12679
- const isDebug = () => {
12680
- return "_rrweb_is_debug" in window && window._rrweb_is_debug ? window._rrweb_is_debug : false;
12681
- };
12682
12675
  let wrappedEmit;
12683
12676
  let takeFullSnapshot$1;
12684
12677
  let canvasManager;
@@ -12691,7 +12684,7 @@ try {
12691
12684
  document.body.removeChild(cleanFrame);
12692
12685
  }
12693
12686
  } catch (err) {
12694
- if (isDebug()) console.debug("Unable to override Array.from", err);
12687
+ console.debug("Unable to override Array.from", err);
12695
12688
  }
12696
12689
  const mirror = createMirror$2();
12697
12690
  function record(options = {}) {
@@ -12970,8 +12963,7 @@ function record(options = {}) {
12970
12963
  keepIframeSrcFn
12971
12964
  });
12972
12965
  if (!node2) {
12973
- if (isDebug()) console.warn("Failed to snapshot the document");
12974
- return;
12966
+ return console.warn("Failed to snapshot the document");
12975
12967
  }
12976
12968
  wrappedEmit(
12977
12969
  {
@@ -13119,10 +13111,7 @@ function record(options = {}) {
13119
13111
  try {
13120
13112
  handlers.push(observe(iframeEl.contentDocument));
13121
13113
  } catch (error) {
13122
- if (isDebug()) {
13123
- console.warn("internal error");
13124
- console.warn(error);
13125
- }
13114
+ console.warn(error);
13126
13115
  }
13127
13116
  });
13128
13117
  let initedAt = null;
@@ -13181,10 +13170,7 @@ function record(options = {}) {
13181
13170
  unregisterErrorHandler();
13182
13171
  };
13183
13172
  } catch (error) {
13184
- if (isDebug()) {
13185
- console.warn("internal error1");
13186
- console.warn(error);
13187
- }
13173
+ console.warn(error);
13188
13174
  }
13189
13175
  }
13190
13176
  record.addCustomEvent = (tag, payload) => {