@coralogix/browser 3.20.0 → 3.21.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/CHANGELOG.md CHANGED
@@ -1,8 +1,33 @@
1
+ ## 3.21.1 (2026-08-11)
2
+
3
+ ### 🩹 Fixes
4
+
5
+ - Update `CoralogixDomainsApiUrlMap`
6
+
7
+ ## 3.21.0 (2026-08-09)
8
+
9
+ ### 🚀 Features
10
+
11
+ - Upgrade the session recording engine to rrweb 2.1.1
12
+
13
+ ### 🩹 Fixes
14
+
15
+ - Keep session recording working when another library on the page replaces `MutationObserver`
16
+ - Record style changes correctly for CSS rules nested inside `@media` / `@supports`
17
+ - Prevent recording errors on browsers without WebGL support
18
+ - Resolve `url()` references that contain a fragment in captured stylesheets
19
+
20
+ ## 3.20.1 (2026-07-28)
21
+
22
+ ### 🩹 Fixes
23
+
24
+ - Improve user-interaction tracking for product analytics
25
+
1
26
  ## 3.20.0 (2026-07-21)
2
27
 
3
28
  ### 🚀 Features
4
29
 
5
- - Add Proofpoint env
30
+ - Update `CoralogixDomainsApiUrlMap`
6
31
 
7
32
  ## 3.19.4 (2026-07-20)
8
33
 
package/index.esm2.js CHANGED
@@ -1477,10 +1477,56 @@ function cxCancelAnimationFrame(id) {
1477
1477
  var originalCaf = getZoneJsOriginalDom(browserWindow, 'cancelAnimationFrame');
1478
1478
  originalCaf.call(browserWindow, id);
1479
1479
  }
1480
+ var RR_BLOCK_CLASS = 'rr-block';
1481
+ var untaintedMutationObserver;
1482
+ function isNativeFunction(fn) {
1483
+ try {
1484
+ return (typeof fn === 'function' &&
1485
+ Function.prototype.toString.call(fn).indexOf('[native code]') !== -1);
1486
+ }
1487
+ catch (_a) {
1488
+ return false;
1489
+ }
1490
+ }
1491
+ function getUntaintedMutationObserver() {
1492
+ if (untaintedMutationObserver !== undefined) {
1493
+ return untaintedMutationObserver;
1494
+ }
1495
+ var doc = getBrowserWindow().document;
1496
+ if (!doc || !doc.body) {
1497
+ return null;
1498
+ }
1499
+ untaintedMutationObserver = null;
1500
+ try {
1501
+ var iframe = doc.createElement('iframe');
1502
+ iframe.style.display = 'none';
1503
+ iframe.setAttribute('aria-hidden', 'true');
1504
+ iframe.className = RR_BLOCK_CLASS;
1505
+ doc.body.appendChild(iframe);
1506
+ var frameWindow = iframe.contentWindow;
1507
+ var frameCtor = frameWindow === null || frameWindow === void 0 ? void 0 : frameWindow['MutationObserver'];
1508
+ if (typeof frameCtor === 'function') {
1509
+ untaintedMutationObserver = frameCtor;
1510
+ }
1511
+ else {
1512
+ iframe.remove();
1513
+ }
1514
+ }
1515
+ catch (_a) {
1516
+ }
1517
+ return untaintedMutationObserver;
1518
+ }
1480
1519
  function createCxMutationObserver(callback) {
1481
1520
  var browserWindow = getBrowserWindow();
1521
+ if (!shouldRunOutsideZone()) {
1522
+ return new browserWindow.MutationObserver(callback);
1523
+ }
1482
1524
  var OriginalMutationObserver = getZoneJsOriginalDom(browserWindow, 'MutationObserver');
1483
- return new OriginalMutationObserver(callback);
1525
+ if (isNativeFunction(OriginalMutationObserver)) {
1526
+ return new OriginalMutationObserver(callback);
1527
+ }
1528
+ var UntaintedMutationObserver = getUntaintedMutationObserver();
1529
+ return new (UntaintedMutationObserver !== null && UntaintedMutationObserver !== void 0 ? UntaintedMutationObserver : OriginalMutationObserver)(callback);
1484
1530
  }
1485
1531
  function cxRunOutsideZone(fn) {
1486
1532
  if (!shouldRunOutsideZone()) {
@@ -2144,8 +2190,6 @@ function addEventListeners(eventTarget, eventNames, listener, _a) {
2144
2190
 
2145
2191
  var CX_ACTION_NAME_ATTRIBUTE = 'data-cx-action-name';
2146
2192
  var DATA_TEST_ATTRIBUTE = 'data-test';
2147
- var DATA_TESTID_ATTRIBUTE = 'data-testid';
2148
- var DATA_TEST_ID_ATTRIBUTE = 'data-test-id';
2149
2193
  var RR_IS_PASSWORD_ATTRIBUTE = 'data-rr-is-password';
2150
2194
 
2151
2195
  var knownPasswordInputs = new WeakSet();
@@ -2197,16 +2241,18 @@ function handleMutations(mutations) {
2197
2241
  }
2198
2242
  }
2199
2243
 
2200
- var PARENT_SEARCH_DEPTH = 5;
2201
- var ACTION_NAME_SEARCH_DEPTH = 10;
2244
+ var ANCESTOR_SEARCH_DEPTH = 5;
2202
2245
  var POINTER_CURSOR = 'pointer';
2246
+ var TEXT_CURSOR = 'text';
2247
+ var BODY_NODE_NAME = 'BODY';
2203
2248
  var CLICKABLE_SELECTOR = 'a, button, input, select, textarea, label, summary, option, li, ' +
2204
2249
  '[role="button"], [role="link"], [role="tab"], ' +
2205
2250
  '[role="menuitem"], [role="menuitemcheckbox"], [role="menuitemradio"], ' +
2206
2251
  '[role="checkbox"], [role="radio"], [role="switch"], ' +
2207
- '[role="option"], [role="combobox"]';
2252
+ '[role="option"], [role="combobox"], [contenteditable]:not([contenteditable="false"]), ' +
2253
+ '[role="textbox"], [role="searchbox"], [role="combobox"]';
2208
2254
  function getAttributeFromAncestors(element, attr, depth) {
2209
- if (depth === void 0) { depth = PARENT_SEARCH_DEPTH; }
2255
+ if (depth === void 0) { depth = ANCESTOR_SEARCH_DEPTH; }
2210
2256
  if (!element || depth <= 0)
2211
2257
  return '';
2212
2258
  var value = element.getAttribute(attr);
@@ -2215,7 +2261,12 @@ function getAttributeFromAncestors(element, attr, depth) {
2215
2261
  return getAttributeFromAncestors(element.parentElement, attr, depth - 1);
2216
2262
  }
2217
2263
  function extractActionName(el) {
2218
- return getAttributeFromAncestors(el, CX_ACTION_NAME_ATTRIBUTE, ACTION_NAME_SEARCH_DEPTH);
2264
+ if (!el || el.tagName === BODY_NODE_NAME)
2265
+ return '';
2266
+ var value = el.getAttribute(CX_ACTION_NAME_ATTRIBUTE);
2267
+ if (value)
2268
+ return value;
2269
+ return extractActionName(el.parentElement);
2219
2270
  }
2220
2271
  function extractAriaLabel(el) {
2221
2272
  return getAttributeFromAncestors(el, ARIA_LABEL_ATTRIBUTE);
@@ -2227,25 +2278,61 @@ function extractResolvedName(_a) {
2227
2278
  var element = _a.element, config = _a.config, actionName = _a.actionName, ariaLabel = _a.ariaLabel;
2228
2279
  if (!element)
2229
2280
  return '';
2230
- if (actionName)
2231
- return actionName;
2232
- if (isElementMasked(element, config))
2233
- return MASKED_TEXT;
2234
- return (ariaLabel || getPlaceholder(element) || getInnerText(element) || '');
2281
+ var resolveName = actionName ||
2282
+ maskedTextIfMasked(element, config) ||
2283
+ resolveFallbackName(element, ariaLabel, ANCESTOR_SEARCH_DEPTH);
2284
+ return normalizeInteractionText(resolveName);
2285
+ }
2286
+ function maskedTextIfMasked(element, config) {
2287
+ return isElementMasked(element, config) ? MASKED_TEXT : '';
2288
+ }
2289
+ function resolveFallbackName(element, ariaLabel, depth) {
2290
+ var _a;
2291
+ if (!element || element.nodeName === BODY_NODE_NAME)
2292
+ return '';
2293
+ var resolvedName = getLabelText(element) ||
2294
+ ariaLabel ||
2295
+ getPlaceholder(element) ||
2296
+ getInnerText(element);
2297
+ if (resolvedName)
2298
+ return resolvedName;
2299
+ if ((_a = element.matches) === null || _a === void 0 ? void 0 : _a.call(element, CLICKABLE_SELECTOR))
2300
+ return '';
2301
+ var parent = element.parentElement;
2302
+ if (depth <= 0 || !parent || parent.nodeName === BODY_NODE_NAME)
2303
+ return '';
2304
+ return resolveFallbackName(parent, ariaLabel, depth - 1);
2305
+ }
2306
+ function getLabelText(element) {
2307
+ var _a;
2308
+ if (!(element instanceof HTMLInputElement ||
2309
+ element instanceof HTMLTextAreaElement ||
2310
+ element instanceof HTMLSelectElement)) {
2311
+ return '';
2312
+ }
2313
+ var label = (_a = element.labels) === null || _a === void 0 ? void 0 : _a[0];
2314
+ return label ? getTextualContent(label) : '';
2235
2315
  }
2236
2316
  function getPlaceholder(element) {
2237
- if (element instanceof HTMLInputElement || element instanceof HTMLTextAreaElement) {
2317
+ if (element instanceof HTMLInputElement ||
2318
+ element instanceof HTMLTextAreaElement) {
2238
2319
  return element.placeholder || '';
2239
2320
  }
2240
2321
  return '';
2241
2322
  }
2242
- function getInnerText(clickableElement) {
2243
- if (!clickableElement)
2323
+ function getInnerText(element) {
2324
+ if (!element)
2244
2325
  return '';
2245
- return clickableElement instanceof HTMLElement
2246
- ? clickableElement.innerText || ''
2326
+ return element instanceof HTMLElement
2327
+ ? normalizeInteractionText(element.innerText || '')
2247
2328
  : '';
2248
2329
  }
2330
+ function normalizeInteractionText(text) {
2331
+ return text
2332
+ .slice(0, MAX_INTERACTION_ELEMENT_SIZE)
2333
+ .replace(/\s+/g, ' ')
2334
+ .trim();
2335
+ }
2249
2336
  function extractMaskedOrTextContent(clickableElement, config) {
2250
2337
  if (!clickableElement)
2251
2338
  return '';
@@ -2253,7 +2340,7 @@ function extractMaskedOrTextContent(clickableElement, config) {
2253
2340
  }
2254
2341
  function getMaskedOrTextualContent(element, config) {
2255
2342
  if (shouldMaskElement(element, config.maskInputTypes, config.maskClass) ||
2256
- isParentMasked(element, config.maskClass, PARENT_SEARCH_DEPTH)) {
2343
+ isParentMasked(element, config.maskClass, ANCESTOR_SEARCH_DEPTH)) {
2257
2344
  return MASKED_TEXT;
2258
2345
  }
2259
2346
  var maskedChild = findMaskedChildren(element, config);
@@ -2263,14 +2350,22 @@ function getMaskedOrTextualContent(element, config) {
2263
2350
  return getTextualContent(element);
2264
2351
  }
2265
2352
  function getTextualContent(element) {
2266
- if (element instanceof HTMLInputElement) {
2267
- return element.value || '';
2353
+ var _a;
2354
+ if (element instanceof HTMLInputElement ||
2355
+ element instanceof HTMLTextAreaElement) {
2356
+ return normalizeInteractionText(element.value || '');
2357
+ }
2358
+ if (element instanceof HTMLSelectElement) {
2359
+ var selectedIndex = element.selectedIndex, options = element.options;
2360
+ return normalizeInteractionText(((_a = options[selectedIndex]) === null || _a === void 0 ? void 0 : _a.text) || '');
2268
2361
  }
2269
- return 'innerText' in element ? element.innerText : '';
2362
+ return 'innerText' in element
2363
+ ? normalizeInteractionText(element.innerText)
2364
+ : '';
2270
2365
  }
2271
2366
  function isElementMasked(element, config) {
2272
2367
  return (shouldMaskElement(element, config.maskInputTypes, config.maskClass) ||
2273
- isParentMasked(element, config.maskClass, PARENT_SEARCH_DEPTH));
2368
+ isParentMasked(element, config.maskClass, ANCESTOR_SEARCH_DEPTH));
2274
2369
  }
2275
2370
  function shouldMaskElement(element, maskInputTypes, maskClass) {
2276
2371
  if (!element)
@@ -2303,7 +2398,7 @@ function isMaskedByClass(className, maskClass) {
2303
2398
  return className.includes(maskClass);
2304
2399
  }
2305
2400
  function isParentMasked(element, maskClass, maxDepth) {
2306
- if (maxDepth === void 0) { maxDepth = PARENT_SEARCH_DEPTH; }
2401
+ if (maxDepth === void 0) { maxDepth = ANCESTOR_SEARCH_DEPTH; }
2307
2402
  if (!element || maxDepth <= 0) {
2308
2403
  return false;
2309
2404
  }
@@ -2326,16 +2421,23 @@ function findSemanticClickable(element, maxDepth) {
2326
2421
  return element;
2327
2422
  return findSemanticClickable(element.parentElement, maxDepth - 1);
2328
2423
  }
2329
- function getClickableElement(element) {
2330
- var _a;
2424
+ function findAffordanceClickable(element) {
2425
+ var _a, _b;
2331
2426
  if (!element)
2332
2427
  return null;
2333
- return ((_a = getComputedStyle(element)) === null || _a === void 0 ? void 0 : _a.cursor) === POINTER_CURSOR ? element : null;
2428
+ var cursor = (_a = getComputedStyle(element)) === null || _a === void 0 ? void 0 : _a.cursor;
2429
+ var isPointer = cursor === POINTER_CURSOR;
2430
+ var isText = cursor === TEXT_CURSOR;
2431
+ var isContentEditable = element instanceof HTMLElement && element.isContentEditable;
2432
+ var active = CxGlobal.document.activeElement;
2433
+ var isFocused = (_b = active === null || active === void 0 ? void 0 : active.matches(CLICKABLE_SELECTOR)) !== null && _b !== void 0 ? _b : false;
2434
+ var isInteractive = isPointer || isContentEditable || isFocused || isText;
2435
+ return isInteractive ? element : null;
2334
2436
  }
2335
2437
  function findClickableElement(element, maxDepth) {
2336
2438
  var _a;
2337
- if (maxDepth === void 0) { maxDepth = PARENT_SEARCH_DEPTH; }
2338
- return ((_a = findSemanticClickable(element, maxDepth)) !== null && _a !== void 0 ? _a : getClickableElement(element));
2439
+ if (maxDepth === void 0) { maxDepth = ANCESTOR_SEARCH_DEPTH; }
2440
+ return ((_a = findSemanticClickable(element, maxDepth)) !== null && _a !== void 0 ? _a : findAffordanceClickable(element));
2339
2441
  }
2340
2442
 
2341
2443
  var RAGE_CLICK_THRESHOLD = 3;
@@ -2378,12 +2480,6 @@ var RageClickTracker = (function () {
2378
2480
  }());
2379
2481
 
2380
2482
  var SHADOW_DOM_MARKER = '::shadow ';
2381
- var STABLE_ATTRIBUTES = [
2382
- CX_ACTION_NAME_ATTRIBUTE,
2383
- DATA_TEST_ATTRIBUTE,
2384
- DATA_TESTID_ATTRIBUTE,
2385
- DATA_TEST_ID_ATTRIBUTE,
2386
- ];
2387
2483
  var ESCAPE_FREE_CLASS_NAME = /^[a-zA-Z_-][a-zA-Z0-9_-]*$/;
2388
2484
  var GENERATED_VALUE_PATTERNS = [
2389
2485
  /^\d/,
@@ -2430,7 +2526,11 @@ function getSubtreeSelector(target, root) {
2430
2526
  function getUniqueSegment(element, root, childSelector) {
2431
2527
  var e_1, _a;
2432
2528
  try {
2433
- for (var _b = __values$1([getAttributeSegment(element), getIdSegment(element)]), _c = _b.next(); !_c.done; _c = _b.next()) {
2529
+ for (var _b = __values$1([
2530
+ getActionNameSegment(element),
2531
+ getIdSegment(element),
2532
+ getTestIdSegment(element),
2533
+ ]), _c = _b.next(); !_c.done; _c = _b.next()) {
2434
2534
  var segment = _c.value;
2435
2535
  if (segment && isUnique(root, joinWithChild(segment, childSelector))) {
2436
2536
  return segment;
@@ -2449,7 +2549,7 @@ function getUniqueSegment(element, root, childSelector) {
2449
2549
  function getLevelSegment(element, childSelector) {
2450
2550
  var e_2, _a;
2451
2551
  var candidates = [
2452
- getAttributeSegment(element),
2552
+ getActionNameSegment(element),
2453
2553
  getStableClassSegment(element),
2454
2554
  element.tagName,
2455
2555
  ];
@@ -2470,29 +2570,23 @@ function getLevelSegment(element, childSelector) {
2470
2570
  }
2471
2571
  return "".concat(element.tagName, ":nth-of-type(").concat(nthOfTypeIndex(element), ")");
2472
2572
  }
2473
- function getAttributeSegment(element) {
2474
- var e_3, _a;
2475
- try {
2476
- for (var STABLE_ATTRIBUTES_1 = __values$1(STABLE_ATTRIBUTES), STABLE_ATTRIBUTES_1_1 = STABLE_ATTRIBUTES_1.next(); !STABLE_ATTRIBUTES_1_1.done; STABLE_ATTRIBUTES_1_1 = STABLE_ATTRIBUTES_1.next()) {
2477
- var attribute = STABLE_ATTRIBUTES_1_1.value;
2478
- var value = element.getAttribute(attribute);
2479
- if (value) {
2480
- return "".concat(element.tagName, "[").concat(attribute, "=\"").concat(CSS.escape(value), "\"]");
2481
- }
2482
- }
2483
- }
2484
- catch (e_3_1) { e_3 = { error: e_3_1 }; }
2485
- finally {
2486
- try {
2487
- if (STABLE_ATTRIBUTES_1_1 && !STABLE_ATTRIBUTES_1_1.done && (_a = STABLE_ATTRIBUTES_1.return)) _a.call(STABLE_ATTRIBUTES_1);
2488
- }
2489
- finally { if (e_3) throw e_3.error; }
2490
- }
2491
- return undefined;
2573
+ function getActionNameSegment(element) {
2574
+ var value = element.getAttribute(CX_ACTION_NAME_ATTRIBUTE);
2575
+ return value
2576
+ ? "".concat(element.tagName, "[").concat(CX_ACTION_NAME_ATTRIBUTE, "=\"").concat(CSS.escape(value), "\"]")
2577
+ : undefined;
2492
2578
  }
2579
+ var CONTAINS_DIGIT = /\d/;
2493
2580
  function getIdSegment(element) {
2494
- return element.id && !isUnstableValue(element.id)
2495
- ? "#".concat(CSS.escape(element.id))
2581
+ var id = element.id;
2582
+ return id && !isUnstableValue(id) && !CONTAINS_DIGIT.test(id)
2583
+ ? "#".concat(CSS.escape(id))
2584
+ : undefined;
2585
+ }
2586
+ function getTestIdSegment(element) {
2587
+ var value = element.getAttribute(DATA_TEST_ATTRIBUTE);
2588
+ return value && !isUnstableValue(value) && !CONTAINS_DIGIT.test(value)
2589
+ ? "".concat(element.tagName, "[").concat(DATA_TEST_ATTRIBUTE, "=\"").concat(CSS.escape(value), "\"]")
2496
2590
  : undefined;
2497
2591
  }
2498
2592
  function getStableClassSegment(element) {
@@ -2511,7 +2605,7 @@ function isUnique(root, selector) {
2511
2605
  return root.querySelectorAll(selector).length === 1;
2512
2606
  }
2513
2607
  function isUniqueAmongSiblings(element, segment, childSelector) {
2514
- var e_4, _a;
2608
+ var e_3, _a;
2515
2609
  var _b, _c;
2516
2610
  var siblings = (_c = (_b = element.parentElement) === null || _b === void 0 ? void 0 : _b.children) !== null && _c !== void 0 ? _c : [];
2517
2611
  try {
@@ -2526,12 +2620,12 @@ function isUniqueAmongSiblings(element, segment, childSelector) {
2526
2620
  }
2527
2621
  }
2528
2622
  }
2529
- catch (e_4_1) { e_4 = { error: e_4_1 }; }
2623
+ catch (e_3_1) { e_3 = { error: e_3_1 }; }
2530
2624
  finally {
2531
2625
  try {
2532
2626
  if (siblings_1_1 && !siblings_1_1.done && (_a = siblings_1.return)) _a.call(siblings_1);
2533
2627
  }
2534
- finally { if (e_4) throw e_4.error; }
2628
+ finally { if (e_3) throw e_3.error; }
2535
2629
  }
2536
2630
  return true;
2537
2631
  }
@@ -2594,7 +2688,7 @@ var CoralogixUserInteractionInstrumentation = (function (_super) {
2594
2688
  var ariaLabel = extractAriaLabel(eventTarget);
2595
2689
  var testId = extractTestId(eventTarget);
2596
2690
  var resolvedName = extractResolvedName({
2597
- element: clickableElement !== null && clickableElement !== void 0 ? clickableElement : eventTarget,
2691
+ element: eventTarget,
2598
2692
  config: config,
2599
2693
  actionName: cxActionName,
2600
2694
  ariaLabel: ariaLabel,
@@ -2615,15 +2709,9 @@ var CoralogixUserInteractionInstrumentation = (function (_super) {
2615
2709
  [CoralogixAttributes.ELEMENT_ID, id],
2616
2710
  [CoralogixAttributes.ELEMENT_CLASSES, getClassName(eventTarget)],
2617
2711
  [CoralogixAttributes.TARGET_ELEMENT_TYPE, type],
2618
- [
2619
- CoralogixAttributes.ELEMENT_INNER_TEXT,
2620
- elementText === null || elementText === void 0 ? void 0 : elementText.slice(0, MAX_INTERACTION_ELEMENT_SIZE),
2621
- ],
2712
+ [CoralogixAttributes.ELEMENT_INNER_TEXT, elementText],
2622
2713
  [CoralogixAttributes.TARGET_ELEMENT, nodeName],
2623
- [
2624
- CoralogixAttributes.RESOLVED_NAME,
2625
- resolvedName === null || resolvedName === void 0 ? void 0 : resolvedName.slice(0, MAX_INTERACTION_ELEMENT_SIZE),
2626
- ],
2714
+ [CoralogixAttributes.RESOLVED_NAME, resolvedName],
2627
2715
  [CoralogixAttributes.CX_ACTION_NAME, cxActionName],
2628
2716
  [CoralogixAttributes.ARIA_LABEL, ariaLabel],
2629
2717
  [CoralogixAttributes.TEST_ID, testId],
@@ -3226,7 +3314,6 @@ var CoralogixDomainsApiUrlMap = {
3226
3314
  AP1: 'https://ingress.ap1.rum-ingress-coralogix.com',
3227
3315
  AP2: 'https://ingress.ap2.rum-ingress-coralogix.com',
3228
3316
  AP3: 'https://ingress.ap3.rum-ingress-coralogix.com',
3229
- PROOFPOINT: 'https://ingress.proofpoint.rum-ingress-coralogix.com',
3230
3317
  STAGING: 'https://ingress.staging.rum-ingress-coralogix.com',
3231
3318
  };
3232
3319
  var PROXY_CX_FORWARD_PARAMETER = 'cxforward';
@@ -5044,7 +5131,7 @@ function resolveUrlBlueprinters(urlBlueprinters) {
5044
5131
  return resolvedUrlBlueprinters;
5045
5132
  }
5046
5133
 
5047
- var SDK_VERSION = '3.20.0';
5134
+ var SDK_VERSION = '3.21.1';
5048
5135
 
5049
5136
  function shouldDropEvent(cxRumEvent, options) {
5050
5137
  if (isDocumentErrorWithoutMessage(cxRumEvent)) {
@@ -5103,12 +5190,13 @@ function validateBeforeSendResult(beforeSendResult) {
5103
5190
  return beforeSendResult;
5104
5191
  }
5105
5192
  function cxRumEventToEditable(cxRumEvent) {
5106
- var _a = cxRumEvent.session_context, user_id = _a.user_id, user_name = _a.user_name, user_email = _a.user_email, account_id = _a.account_id, user_metadata = _a.user_metadata; cxRumEvent.browser_sdk; cxRumEvent.timestamp; cxRumEvent.isNavigationEvent; cxRumEvent.isSnapshotEvent; cxRumEvent.view_number; var rest = __rest(cxRumEvent, ["session_context", "browser_sdk", "timestamp", "isNavigationEvent", "isSnapshotEvent", "view_number"]);
5193
+ var _a = cxRumEvent.session_context, user_id = _a.user_id, user_name = _a.user_name, user_email = _a.user_email, account_id = _a.account_id, account_name = _a.account_name, user_metadata = _a.user_metadata; cxRumEvent.browser_sdk; cxRumEvent.timestamp; cxRumEvent.isNavigationEvent; cxRumEvent.isSnapshotEvent; cxRumEvent.view_number; var rest = __rest(cxRumEvent, ["session_context", "browser_sdk", "timestamp", "isNavigationEvent", "isSnapshotEvent", "view_number"]);
5107
5194
  return __assign(__assign({}, rest), { session_context: {
5108
5195
  user_id: user_id,
5109
5196
  user_email: user_email,
5110
5197
  user_name: user_name,
5111
5198
  account_id: account_id,
5199
+ account_name: account_name,
5112
5200
  user_metadata: user_metadata,
5113
5201
  } });
5114
5202
  }
@@ -5161,7 +5249,7 @@ function flattenToAttributes(obj, prefix) {
5161
5249
  function buildRumContextAttributes(cxRumEvent, resolvedLabels) {
5162
5250
  var session_context = cxRumEvent.session_context, page_context = cxRumEvent.page_context, event_context = cxRumEvent.event_context, error_context = cxRumEvent.error_context, network_request_context = cxRumEvent.network_request_context;
5163
5251
  var prefixedLabels = flattenToAttributes(resolvedLabels, 'cx_rum.labels.');
5164
- return buildCxRumSpanAttributes(__assign(__assign({ 'cx_rum.browser_sdk.version': cxRumEvent.browser_sdk.version, 'cx_rum.platform': cxRumEvent.platform, 'cx_rum.environment': cxRumEvent.environment, 'cx_rum.version_metadata.app_name': cxRumEvent.version_metadata.app_name, 'cx_rum.version_metadata.app_version': cxRumEvent.version_metadata.app_version }, prefixedLabels), { 'cx_rum.session_context.session_id': session_context === null || session_context === void 0 ? void 0 : session_context.session_id, 'cx_rum.session_context.session_creation_date': session_context === null || session_context === void 0 ? void 0 : session_context.session_creation_date, 'cx_rum.session_context.hasRecording': session_context === null || session_context === void 0 ? void 0 : session_context.hasRecording, 'cx_rum.session_context.os': session_context === null || session_context === void 0 ? void 0 : session_context.os, 'cx_rum.session_context.osVersion': session_context === null || session_context === void 0 ? void 0 : session_context.osVersion, 'cx_rum.session_context.browser': session_context === null || session_context === void 0 ? void 0 : session_context.browser, 'cx_rum.session_context.browserVersion': session_context === null || session_context === void 0 ? void 0 : session_context.browserVersion, 'cx_rum.session_context.device': session_context === null || session_context === void 0 ? void 0 : session_context.device, 'cx_rum.session_context.user_agent': session_context === null || session_context === void 0 ? void 0 : session_context.user_agent, 'cx_rum.session_context.user_email': session_context === null || session_context === void 0 ? void 0 : session_context.user_email, 'cx_rum.session_context.user_id': session_context === null || session_context === void 0 ? void 0 : session_context.user_id, 'cx_rum.session_context.user_name': session_context === null || session_context === void 0 ? void 0 : session_context.user_name, 'cx_rum.session_context.account_id': session_context === null || session_context === void 0 ? void 0 : session_context.account_id, 'cx_rum.page_context.page_fragments': page_context === null || page_context === void 0 ? void 0 : page_context.page_fragments, 'cx_rum.page_context.page_url_blueprint': page_context === null || page_context === void 0 ? void 0 : page_context.page_url_blueprint, 'cx_rum.event_context.type': event_context === null || event_context === void 0 ? void 0 : event_context.type, 'cx_rum.event_context.severity': event_context === null || event_context === void 0 ? void 0 : event_context.severity, 'cx_rum.error_context.error_type': error_context === null || error_context === void 0 ? void 0 : error_context.error_type, 'cx_rum.error_context.error_message': error_context === null || error_context === void 0 ? void 0 : error_context.error_message, 'cx_rum.network_request_context.fragments': network_request_context === null || network_request_context === void 0 ? void 0 : network_request_context.fragments, 'cx_rum.network_request_context.url': network_request_context === null || network_request_context === void 0 ? void 0 : network_request_context.url, 'cx_rum.network_request_context.status_code': network_request_context === null || network_request_context === void 0 ? void 0 : network_request_context.status_code, 'cx_rum.network_request_context.method': network_request_context === null || network_request_context === void 0 ? void 0 : network_request_context.method }));
5252
+ return buildCxRumSpanAttributes(__assign(__assign({ 'cx_rum.browser_sdk.version': cxRumEvent.browser_sdk.version, 'cx_rum.platform': cxRumEvent.platform, 'cx_rum.environment': cxRumEvent.environment, 'cx_rum.version_metadata.app_name': cxRumEvent.version_metadata.app_name, 'cx_rum.version_metadata.app_version': cxRumEvent.version_metadata.app_version }, prefixedLabels), { 'cx_rum.session_context.session_id': session_context === null || session_context === void 0 ? void 0 : session_context.session_id, 'cx_rum.session_context.session_creation_date': session_context === null || session_context === void 0 ? void 0 : session_context.session_creation_date, 'cx_rum.session_context.hasRecording': session_context === null || session_context === void 0 ? void 0 : session_context.hasRecording, 'cx_rum.session_context.os': session_context === null || session_context === void 0 ? void 0 : session_context.os, 'cx_rum.session_context.osVersion': session_context === null || session_context === void 0 ? void 0 : session_context.osVersion, 'cx_rum.session_context.browser': session_context === null || session_context === void 0 ? void 0 : session_context.browser, 'cx_rum.session_context.browserVersion': session_context === null || session_context === void 0 ? void 0 : session_context.browserVersion, 'cx_rum.session_context.device': session_context === null || session_context === void 0 ? void 0 : session_context.device, 'cx_rum.session_context.user_agent': session_context === null || session_context === void 0 ? void 0 : session_context.user_agent, 'cx_rum.session_context.user_email': session_context === null || session_context === void 0 ? void 0 : session_context.user_email, 'cx_rum.session_context.user_id': session_context === null || session_context === void 0 ? void 0 : session_context.user_id, 'cx_rum.session_context.user_name': session_context === null || session_context === void 0 ? void 0 : session_context.user_name, 'cx_rum.session_context.account_id': session_context === null || session_context === void 0 ? void 0 : session_context.account_id, 'cx_rum.session_context.account_name': session_context === null || session_context === void 0 ? void 0 : session_context.account_name, 'cx_rum.page_context.page_fragments': page_context === null || page_context === void 0 ? void 0 : page_context.page_fragments, 'cx_rum.page_context.page_url_blueprint': page_context === null || page_context === void 0 ? void 0 : page_context.page_url_blueprint, 'cx_rum.event_context.type': event_context === null || event_context === void 0 ? void 0 : event_context.type, 'cx_rum.event_context.severity': event_context === null || event_context === void 0 ? void 0 : event_context.severity, 'cx_rum.error_context.error_type': error_context === null || error_context === void 0 ? void 0 : error_context.error_type, 'cx_rum.error_context.error_message': error_context === null || error_context === void 0 ? void 0 : error_context.error_message, 'cx_rum.network_request_context.fragments': network_request_context === null || network_request_context === void 0 ? void 0 : network_request_context.fragments, 'cx_rum.network_request_context.url': network_request_context === null || network_request_context === void 0 ? void 0 : network_request_context.url, 'cx_rum.network_request_context.status_code': network_request_context === null || network_request_context === void 0 ? void 0 : network_request_context.status_code, 'cx_rum.network_request_context.method': network_request_context === null || network_request_context === void 0 ? void 0 : network_request_context.method }));
5165
5253
  }
5166
5254
 
5167
5255
  var CoralogixSpanMapProcessor = (function () {
@@ -5673,9 +5761,9 @@ var CoralogixRum = {
5673
5761
  init: function (options) {
5674
5762
  var _a, _b;
5675
5763
  var _this = this;
5676
- var _c;
5764
+ var _c, _d;
5677
5765
  try {
5678
- if (isInited) {
5766
+ if (isInited || ((_c = CxGlobal === null || CxGlobal === void 0 ? void 0 : CxGlobal.CoralogixRum) === null || _c === void 0 ? void 0 : _c.isInited)) {
5679
5767
  if (options === null || options === void 0 ? void 0 : options.debug) {
5680
5768
  console.debug('CoralogixRum already initialized, skipping init');
5681
5769
  }
@@ -5791,7 +5879,7 @@ var CoralogixRum = {
5791
5879
  spanMapProcessor = new CoralogixSpanMapProcessor();
5792
5880
  tracerProvider.addSpanProcessor(spanMapProcessor);
5793
5881
  new SnapshotManager();
5794
- if ((_c = resolvedOptions_1.sessionRecordingConfig) === null || _c === void 0 ? void 0 : _c.enable) {
5882
+ if ((_d = resolvedOptions_1.sessionRecordingConfig) === null || _d === void 0 ? void 0 : _d.enable) {
5795
5883
  new ClickScreenshotManager();
5796
5884
  }
5797
5885
  snapshotProcessor = new CoralogixSnapshotSpanProcessor();
@@ -5802,10 +5890,10 @@ var CoralogixRum = {
5802
5890
  tracerProvider: tracerProvider,
5803
5891
  instrumentations: instrumentations,
5804
5892
  });
5805
- var _d = __read$1(partition(resolvedOptions_1.labelProviders || [], function (_a) {
5893
+ var _e = __read$1(partition(resolvedOptions_1.labelProviders || [], function (_a) {
5806
5894
  var urlType = _a.urlType;
5807
5895
  return urlType === UrlType.PAGE || !urlType;
5808
- }), 2), pageUrlLabelProviders = _d[0], networkUrlLabelProviders = _d[1];
5896
+ }), 2), pageUrlLabelProviders = _e[0], networkUrlLabelProviders = _e[1];
5809
5897
  saveInternalRumData(PAGE_URL_LABEL_PROVIDERS_KEY, pageUrlLabelProviders);
5810
5898
  saveInternalRumData(NETWORK_URL_LABEL_PROVIDERS_KEY, networkUrlLabelProviders);
5811
5899
  isInited = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coralogix/browser",
3
- "version": "3.20.0",
3
+ "version": "3.21.1",
4
4
  "description": "Official Coralogix SDK for browsers",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Coralogix",
@@ -20,6 +20,7 @@ var EventType;
20
20
  EventType[EventType["Meta"] = 4] = "Meta";
21
21
  EventType[EventType["Custom"] = 5] = "Custom";
22
22
  EventType[EventType["Plugin"] = 6] = "Plugin";
23
+ EventType[EventType["Asset"] = 7] = "Asset";
23
24
  })(EventType || (EventType = {}));
24
25
  var IncrementalSource;
25
26
  (function (IncrementalSource) {
@@ -131,13 +132,14 @@ function getUntaintedPrototype(key) {
131
132
  }
132
133
  try {
133
134
  var iframeEl = document.createElement('iframe');
135
+ iframeEl.style.display = 'none';
134
136
  document.body.appendChild(iframeEl);
135
137
  var win = iframeEl.contentWindow;
136
138
  if (!win)
137
139
  return defaultObj.prototype;
138
140
  var untaintedObject = win[key]
139
141
  .prototype;
140
- document.body.removeChild(iframeEl);
142
+ iframeEl.remove();
141
143
  if (!untaintedObject)
142
144
  return defaultPrototype;
143
145
  return (untaintedBasePrototype[key] = untaintedObject);
@@ -214,6 +216,10 @@ function querySelectorAll(n, selectors) {
214
216
  function mutationObserverCtor() {
215
217
  return getUntaintedPrototype('MutationObserver').constructor;
216
218
  }
219
+ var nowTimestamp = Date.now;
220
+ if (!(/[1-9][0-9]{12}/.test(Date.now().toString()))) {
221
+ nowTimestamp = function () { return new Date().getTime(); };
222
+ }
217
223
  function patch(source, name, replacement) {
218
224
  try {
219
225
  if (!(name in source)) {
@@ -254,7 +260,8 @@ var dom = {
254
260
  shadowRoot: shadowRoot,
255
261
  querySelector: querySelector,
256
262
  querySelectorAll: querySelectorAll,
257
- mutationObserver: mutationObserverCtor,
263
+ nowTimestamp: nowTimestamp,
264
+ mutationObserverCtor: mutationObserverCtor,
258
265
  patch: patch,
259
266
  };
260
267
 
@@ -504,8 +511,10 @@ function absolutifyURLs(cssText, href) {
504
511
  if (filePath[0] === '/') {
505
512
  return "url(".concat(maybeQuote).concat(extractOrigin(href) + filePath).concat(maybeQuote, ")");
506
513
  }
507
- var stack = href.split('/');
508
- var parts = filePath.split('/');
514
+ var filePathNoHash = filePath.split('#')[0];
515
+ var maybeHash = filePath.substring(filePathNoHash.length);
516
+ var stack = href.split('#')[0].split('/');
517
+ var parts = filePathNoHash.split('/');
509
518
  stack.pop();
510
519
  try {
511
520
  for (var parts_1 = __values(parts), parts_1_1 = parts_1.next(); !parts_1_1.done; parts_1_1 = parts_1.next()) {
@@ -528,7 +537,7 @@ function absolutifyURLs(cssText, href) {
528
537
  }
529
538
  finally { if (e_1) throw e_1.error; }
530
539
  }
531
- return "url(".concat(maybeQuote).concat(stack.join('/')).concat(maybeQuote, ")");
540
+ return "url(".concat(maybeQuote).concat(stack.join('/')).concat(maybeHash).concat(maybeQuote, ")");
532
541
  });
533
542
  }
534
543
  function normalizeCssString(cssText, _testNoPxNorm) {
@@ -1660,10 +1669,6 @@ function hookSetter(target, key, d, isRevoked, win) {
1660
1669
  });
1661
1670
  return function () { return hookSetter(target, key, original || {}, true); };
1662
1671
  }
1663
- var nowTimestamp = Date.now;
1664
- if (!(/[1-9][0-9]{12}/.test(Date.now().toString()))) {
1665
- nowTimestamp = function () { return new Date().getTime(); };
1666
- }
1667
1672
  function getWindowScroll(win) {
1668
1673
  var _a, _b, _c, _d;
1669
1674
  var doc = win.document;
@@ -2896,6 +2901,7 @@ function getNestedCSSRulePositions(rule) {
2896
2901
  var rules = Array.from(childRule.parentRule.cssRules);
2897
2902
  var index = rules.indexOf(childRule);
2898
2903
  pos.unshift(index);
2904
+ return recurse(childRule.parentRule, pos);
2899
2905
  }
2900
2906
  else if (childRule.parentStyleSheet) {
2901
2907
  var rules = Array.from(childRule.parentStyleSheet.cssRules);
@@ -4188,7 +4194,9 @@ function patchGLPrototype(prototype, type, cb, blockClass, blockSelector, win) {
4188
4194
  }
4189
4195
  function initCanvasWebGLMutationObserver(cb, win, blockClass, blockSelector) {
4190
4196
  var handlers = [];
4191
- handlers.push.apply(handlers, __spreadArray([], __read(patchGLPrototype(win.WebGLRenderingContext.prototype, CanvasContext.WebGL, cb, blockClass, blockSelector, win)), false));
4197
+ if (typeof win.WebGLRenderingContext !== 'undefined') {
4198
+ handlers.push.apply(handlers, __spreadArray([], __read(patchGLPrototype(win.WebGLRenderingContext.prototype, CanvasContext.WebGL, cb, blockClass, blockSelector, win)), false));
4199
+ }
4192
4200
  if (typeof win.WebGL2RenderingContext !== 'undefined') {
4193
4201
  handlers.push.apply(handlers, __spreadArray([], __read(patchGLPrototype(win.WebGL2RenderingContext.prototype, CanvasContext.WebGL2, cb, blockClass, blockSelector, win)), false));
4194
4202
  }
@@ -74,7 +74,6 @@ export declare const CoralogixDomainsApiUrlMap: {
74
74
  AP1: string;
75
75
  AP2: string;
76
76
  AP3: string;
77
- PROOFPOINT: string;
78
77
  STAGING: string;
79
78
  };
80
79
  export declare const PROXY_CX_FORWARD_PARAMETER = "cxforward";
@@ -1,5 +1,6 @@
1
1
  import type { addedNodeMutation, blockClass, DeprecatedMirror, DocumentDimension, hookResetter, IMirror, IWindow, listenerHandler, textMutation, throttleOptions } from '../rrweb-types';
2
2
  import type { Mirror, SlimDOMOptions } from '../rrweb-snapshot';
3
+ export { nowTimestamp } from '../rrweb-utils';
3
4
  interface RRNode {
4
5
  nodeName: string;
5
6
  nodeType: number;
@@ -11,8 +12,6 @@ export declare function on(type: string, fn: EventListenerOrEventListenerObject,
11
12
  export declare let _mirror: DeprecatedMirror;
12
13
  export declare function throttle<T>(func: (arg: T) => void, wait: number, options?: throttleOptions): (this: any, ...args: T[]) => void;
13
14
  export declare function hookSetter<T>(target: T, key: string | number | symbol, d: PropertyDescriptor, isRevoked?: boolean, win?: Window & typeof globalThis): hookResetter;
14
- declare let nowTimestamp: () => number;
15
- export { nowTimestamp };
16
15
  export declare function getWindowScroll(win: Window): {
17
16
  left: number;
18
17
  top: number;
@@ -43,7 +42,7 @@ export declare function getBaseDimension(node: Node, rootIframe: Node): Document
43
42
  export declare function hasShadowRoot<T extends Node | RRNode>(n: T): n is T & {
44
43
  shadowRoot: ShadowRoot;
45
44
  };
46
- export declare function getNestedRule(rules: CSSRuleList, position: number[]): CSSGroupingRule;
45
+ export declare function getNestedRule(rules: CSSRuleList, position: number[]): CSSGroupingRule | null;
47
46
  export declare function getPositionsAndIndex(nestedIndex: number[]): {
48
47
  positions: number[];
49
48
  index: number | undefined;
@@ -5,7 +5,8 @@ export declare enum EventType {
5
5
  IncrementalSnapshot = 3,
6
6
  Meta = 4,
7
7
  Custom = 5,
8
- Plugin = 6
8
+ Plugin = 6,
9
+ Asset = 7
9
10
  }
10
11
  export type domContentLoadedEvent = {
11
12
  type: EventType.DomContentLoaded;
@@ -51,6 +52,13 @@ export type pluginEvent<T = unknown> = {
51
52
  payload: T;
52
53
  };
53
54
  };
55
+ export type assetEvent = {
56
+ type: EventType.Asset;
57
+ data: assetParam;
58
+ };
59
+ export type assetEventWithTime = assetEvent & {
60
+ timestamp: number;
61
+ };
54
62
  export declare enum IncrementalSource {
55
63
  Mutation = 0,
56
64
  MouseMove = 1,
@@ -115,7 +123,7 @@ export type customElementData = {
115
123
  source: IncrementalSource.CustomElement;
116
124
  } & customElementParam;
117
125
  export type incrementalData = mutationData | mousemoveData | mouseInteractionData | scrollData | viewportResizeData | inputData | mediaInteractionData | styleSheetRuleData | canvasMutationData | fontData | selectionData | styleDeclarationData | adoptedStyleSheetData | customElementData;
118
- export type eventWithoutTime = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent | pluginEvent;
126
+ export type eventWithoutTime = domContentLoadedEvent | loadedEvent | fullSnapshotEvent | incrementalSnapshotEvent | metaEvent | customEvent | pluginEvent | assetEvent;
119
127
  export type event = eventWithoutTime;
120
128
  export type eventWithTime = eventWithoutTime & {
121
129
  timestamp: number;
@@ -258,14 +266,19 @@ export declare enum CanvasContext {
258
266
  WebGL = 1,
259
267
  WebGL2 = 2
260
268
  }
261
- export type SerializedCanvasArg = {
262
- rr_type: 'ArrayBuffer';
263
- base64: string;
264
- } | {
269
+ export type SerializedCssTextArg = {
270
+ rr_type: 'CssText';
271
+ cssTexts: string[];
272
+ };
273
+ export type SerializedBlobArg = {
265
274
  rr_type: 'Blob';
266
275
  data: Array<CanvasArg>;
267
276
  type?: string;
268
- } | {
277
+ };
278
+ export type SerializedCanvasArg = {
279
+ rr_type: 'ArrayBuffer';
280
+ base64: string;
281
+ } | SerializedBlobArg | {
269
282
  rr_type: string;
270
283
  src: string;
271
284
  } | {
@@ -422,6 +435,18 @@ export type customElementParam = {
422
435
  };
423
436
  };
424
437
  export type customElementCallback = (c: customElementParam) => void;
438
+ export type assetParam = {
439
+ url: string;
440
+ payload: SerializedCanvasArg | SerializedCssTextArg;
441
+ timestamp?: number;
442
+ } | {
443
+ url: string;
444
+ failed: {
445
+ status?: number;
446
+ message: string;
447
+ };
448
+ };
449
+ export type assetCallback = (d: assetParam, timestamp?: number | true) => void;
425
450
  interface INode extends Node {
426
451
  __sn: serializedNodeWithId;
427
452
  }
@@ -21,6 +21,8 @@ export declare function shadowRoot(n: Node): ShadowRoot | null;
21
21
  export declare function querySelector(n: Element, selectors: string): Element | null;
22
22
  export declare function querySelectorAll(n: Element, selectors: string): NodeListOf<Element>;
23
23
  export declare function mutationObserverCtor(): (typeof MutationObserver)['prototype']['constructor'];
24
+ declare let nowTimestamp: () => number;
25
+ export { nowTimestamp };
24
26
  export declare function patch(source: {
25
27
  [key: string]: any;
26
28
  }, name: string, replacement: (...args: any[]) => any): () => void;
@@ -37,7 +39,8 @@ declare const _default: {
37
39
  shadowRoot: typeof shadowRoot;
38
40
  querySelector: typeof querySelector;
39
41
  querySelectorAll: typeof querySelectorAll;
40
- mutationObserver: typeof mutationObserverCtor;
42
+ nowTimestamp: () => number;
43
+ mutationObserverCtor: typeof mutationObserverCtor;
41
44
  patch: typeof patch;
42
45
  };
43
46
  export default _default;
@@ -1,5 +1,3 @@
1
1
  export declare const CX_ACTION_NAME_ATTRIBUTE = "data-cx-action-name";
2
2
  export declare const DATA_TEST_ATTRIBUTE = "data-test";
3
- export declare const DATA_TESTID_ATTRIBUTE = "data-testid";
4
- export declare const DATA_TEST_ID_ATTRIBUTE = "data-test-id";
5
3
  export declare const RR_IS_PASSWORD_ATTRIBUTE = "data-rr-is-password";
@@ -10,4 +10,4 @@ export declare function extractResolvedName({ element, config, actionName, ariaL
10
10
  }): string;
11
11
  export declare function extractMaskedOrTextContent(clickableElement: Element | HTMLElement | null, config: CoralogixBrowserSdkConfig): string;
12
12
  export declare function getClassName(element: Element | HTMLElement): string;
13
- export declare function findClickableElement(element: Element | HTMLElement | null, maxDepth?: number): Element | HTMLElement | null;
13
+ export declare function findClickableElement(element: Element | HTMLElement, maxDepth?: number): Element | HTMLElement | null;
@@ -19,6 +19,7 @@ export interface CxRumSpanAttributes extends Attributes {
19
19
  'cx_rum.session_context.user_id'?: string;
20
20
  'cx_rum.session_context.user_name'?: string;
21
21
  'cx_rum.session_context.account_id'?: string;
22
+ 'cx_rum.session_context.account_name'?: string;
22
23
  'cx_rum.page_context.page_fragments'?: string;
23
24
  'cx_rum.page_context.page_url_blueprint'?: string;
24
25
  'cx_rum.event_context.type'?: string;
@@ -7,6 +7,7 @@ export interface ZoneType {
7
7
  }
8
8
  export interface WindowWithZone {
9
9
  Zone?: ZoneType;
10
+ document?: Document;
10
11
  setTimeout: typeof setTimeout;
11
12
  setInterval: typeof setInterval;
12
13
  clearTimeout: typeof clearTimeout;
package/src/types.d.ts CHANGED
@@ -65,6 +65,7 @@ export interface UserContextConfig {
65
65
  user_name: string;
66
66
  user_email?: string;
67
67
  account_id?: string;
68
+ account_name?: string;
68
69
  user_metadata?: {
69
70
  [key: string]: any;
70
71
  };
@@ -299,6 +300,7 @@ export interface UserMetadata {
299
300
  user_name?: string;
300
301
  user_email?: string;
301
302
  account_id?: string;
303
+ account_name?: string;
302
304
  user_metadata?: {
303
305
  [key: string]: any;
304
306
  };
package/src/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "3.20.0";
1
+ export declare const SDK_VERSION = "3.21.1";