@gemx-dev/clarity-visualize 0.8.64 → 0.8.65
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.
|
@@ -390,10 +390,6 @@ var EnrichHelper = /** @class */ (function () {
|
|
|
390
390
|
var selectorBeta = helper.selector.get(input, 1 /* Layout.Selector.Beta */);
|
|
391
391
|
d.selectorBeta = selectorBeta.length > 0 ? selectorBeta : null;
|
|
392
392
|
d.hashBeta = selectorBeta.length > 0 ? helper.hash(d.selectorBeta) : null;
|
|
393
|
-
var rawClass = (d.attributes || {})['class'] || '';
|
|
394
|
-
if (rawClass.includes('gp_ls-is-cached')) {
|
|
395
|
-
console.log("[Enrich] id=".concat(d.id, " tag=").concat(d.tag, " | class=\"").concat(rawClass, "\" | selectorBeta=\"").concat(selectorBeta, "\" | hashBeta=").concat(d.hashBeta));
|
|
396
|
-
}
|
|
397
393
|
/* Track state for future reference */
|
|
398
394
|
node.alpha = selectorAlpha;
|
|
399
395
|
node.beta = selectorBeta;
|
|
@@ -1769,9 +1765,6 @@ var LayoutHelper = /** @class */ (function () {
|
|
|
1769
1765
|
// In case of selector collision, prefer the first inserted node
|
|
1770
1766
|
_this.hashMapAlpha[data.hashAlpha] = _this.get(data.hashAlpha) || parent;
|
|
1771
1767
|
_this.hashMapBeta[data.hashBeta] = _this.get(data.hashBeta) || parent;
|
|
1772
|
-
if (data.hashBeta === '2e36mrf7c' || data.hashBeta === '19lq10ve5') {
|
|
1773
|
-
console.log("[Layout] addToHashMap hashBeta=".concat(data.hashBeta, " | hashAlpha=").concat(data.hashAlpha, " | tag=").concat(parent === null || parent === void 0 ? void 0 : parent.tagName));
|
|
1774
|
-
}
|
|
1775
1768
|
};
|
|
1776
1769
|
this.resize = function (el, width, height) {
|
|
1777
1770
|
if (el && el.nodeType === 1 /* NodeType.ELEMENT_NODE */ && width && height) {
|
|
@@ -2403,7 +2396,7 @@ var Visualizer = /** @class */ (function () {
|
|
|
2403
2396
|
this._excludeClassNames = [];
|
|
2404
2397
|
this.configure = function (opts) {
|
|
2405
2398
|
_this._excludeClassNames = opts.excludeClassNames || [];
|
|
2406
|
-
helper.selector.
|
|
2399
|
+
helper.selector.config(_this._excludeClassNames);
|
|
2407
2400
|
};
|
|
2408
2401
|
this.dom = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
2409
2402
|
return __generator(this, function (_a) {
|
|
@@ -2441,33 +2434,25 @@ var Visualizer = /** @class */ (function () {
|
|
|
2441
2434
|
return false;
|
|
2442
2435
|
}
|
|
2443
2436
|
};
|
|
2444
|
-
this.html = function (decoded, target, portalCanvasId, hash, useproxy, logerror, shortCircuitStrategy
|
|
2437
|
+
this.html = function (decoded, target, portalCanvasId, hash, useproxy, logerror, shortCircuitStrategy) {
|
|
2445
2438
|
if (hash === void 0) { hash = null; }
|
|
2446
2439
|
if (shortCircuitStrategy === void 0) { shortCircuitStrategy = 0 /* ShortCircuitStrategy.None */; }
|
|
2447
2440
|
return __awaiter(_this, void 0, void 0, function () {
|
|
2448
|
-
var merged,
|
|
2441
|
+
var merged, entry, _a, domEvent, e_1;
|
|
2449
2442
|
return __generator(this, function (_b) {
|
|
2450
2443
|
switch (_b.label) {
|
|
2451
2444
|
case 0:
|
|
2452
|
-
if (!(decoded && decoded.length > 0 && target)) return [3 /*break*/,
|
|
2445
|
+
if (!(decoded && decoded.length > 0 && target)) return [3 /*break*/, 11];
|
|
2453
2446
|
_b.label = 1;
|
|
2454
2447
|
case 1:
|
|
2455
|
-
_b.trys.push([1,
|
|
2448
|
+
_b.trys.push([1, 10, , 11]);
|
|
2456
2449
|
merged = this.merge(decoded);
|
|
2457
|
-
if (signal === null || signal === void 0 ? void 0 : signal.aborted)
|
|
2458
|
-
return [2 /*return*/, this];
|
|
2459
2450
|
return [4 /*yield*/, this.setup(target, { version: decoded[0].envelope.version, dom: merged.dom, useproxy: useproxy, portalCanvasId: portalCanvasId })];
|
|
2460
2451
|
case 2:
|
|
2461
2452
|
_b.sent();
|
|
2462
|
-
if (signal === null || signal === void 0 ? void 0 : signal.aborted)
|
|
2463
|
-
return [2 /*return*/, this];
|
|
2464
|
-
CHUNK_BUDGET_MS = 8;
|
|
2465
|
-
chunkStart = performance.now();
|
|
2466
2453
|
_b.label = 3;
|
|
2467
2454
|
case 3:
|
|
2468
|
-
if (!(merged.events.length > 0)) return [3 /*break*/,
|
|
2469
|
-
if (signal === null || signal === void 0 ? void 0 : signal.aborted)
|
|
2470
|
-
return [2 /*return*/, this];
|
|
2455
|
+
if (!(merged.events.length > 0)) return [3 /*break*/, 9];
|
|
2471
2456
|
entry = merged.events.shift();
|
|
2472
2457
|
_a = entry.event;
|
|
2473
2458
|
switch (_a) {
|
|
@@ -2493,22 +2478,15 @@ var Visualizer = /** @class */ (function () {
|
|
|
2493
2478
|
case 7:
|
|
2494
2479
|
_b.sent();
|
|
2495
2480
|
return [3 /*break*/, 8];
|
|
2496
|
-
case 8:
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
case 9:
|
|
2500
|
-
_b.sent();
|
|
2501
|
-
chunkStart = performance.now();
|
|
2502
|
-
_b.label = 10;
|
|
2503
|
-
case 10: return [3 /*break*/, 3];
|
|
2504
|
-
case 11: return [3 /*break*/, 13];
|
|
2505
|
-
case 12:
|
|
2481
|
+
case 8: return [3 /*break*/, 3];
|
|
2482
|
+
case 9: return [3 /*break*/, 11];
|
|
2483
|
+
case 10:
|
|
2506
2484
|
e_1 = _b.sent();
|
|
2507
2485
|
if (logerror) {
|
|
2508
2486
|
logerror(e_1);
|
|
2509
2487
|
}
|
|
2510
|
-
return [3 /*break*/,
|
|
2511
|
-
case
|
|
2488
|
+
return [3 /*break*/, 11];
|
|
2489
|
+
case 11: return [2 /*return*/, this];
|
|
2512
2490
|
}
|
|
2513
2491
|
});
|
|
2514
2492
|
});
|
|
@@ -2540,7 +2518,7 @@ var Visualizer = /** @class */ (function () {
|
|
|
2540
2518
|
decoded = decoded.sort(_this.sortPayloads);
|
|
2541
2519
|
// Re-initialize enrich class if someone ends up calling merge function directly
|
|
2542
2520
|
_this.enrich = _this.enrich || new EnrichHelper();
|
|
2543
|
-
helper.selector.
|
|
2521
|
+
helper.selector.config(_this._excludeClassNames);
|
|
2544
2522
|
_this.enrich.reset();
|
|
2545
2523
|
// Walk through payloads and generate merged payload from an array of decoded payloads
|
|
2546
2524
|
for (var _i = 0, decoded_1 = decoded; _i < decoded_1.length; _i++) {
|
|
@@ -2581,7 +2559,7 @@ var Visualizer = /** @class */ (function () {
|
|
|
2581
2559
|
this.reset();
|
|
2582
2560
|
if (options.excludeClassNames) {
|
|
2583
2561
|
this._excludeClassNames = options.excludeClassNames;
|
|
2584
|
-
helper.selector.
|
|
2562
|
+
helper.selector.config(options.excludeClassNames);
|
|
2585
2563
|
}
|
|
2586
2564
|
// Infer options
|
|
2587
2565
|
options.pointer = "pointer" in options ? options.pointer : true;
|