@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.
|
@@ -388,10 +388,6 @@ var EnrichHelper = /** @class */ (function () {
|
|
|
388
388
|
var selectorBeta = helper.selector.get(input, 1 /* Layout.Selector.Beta */);
|
|
389
389
|
d.selectorBeta = selectorBeta.length > 0 ? selectorBeta : null;
|
|
390
390
|
d.hashBeta = selectorBeta.length > 0 ? helper.hash(d.selectorBeta) : null;
|
|
391
|
-
var rawClass = (d.attributes || {})['class'] || '';
|
|
392
|
-
if (rawClass.includes('gp_ls-is-cached')) {
|
|
393
|
-
console.log("[Enrich] id=".concat(d.id, " tag=").concat(d.tag, " | class=\"").concat(rawClass, "\" | selectorBeta=\"").concat(selectorBeta, "\" | hashBeta=").concat(d.hashBeta));
|
|
394
|
-
}
|
|
395
391
|
/* Track state for future reference */
|
|
396
392
|
node.alpha = selectorAlpha;
|
|
397
393
|
node.beta = selectorBeta;
|
|
@@ -1767,9 +1763,6 @@ var LayoutHelper = /** @class */ (function () {
|
|
|
1767
1763
|
// In case of selector collision, prefer the first inserted node
|
|
1768
1764
|
_this.hashMapAlpha[data.hashAlpha] = _this.get(data.hashAlpha) || parent;
|
|
1769
1765
|
_this.hashMapBeta[data.hashBeta] = _this.get(data.hashBeta) || parent;
|
|
1770
|
-
if (data.hashBeta === '2e36mrf7c' || data.hashBeta === '19lq10ve5') {
|
|
1771
|
-
console.log("[Layout] addToHashMap hashBeta=".concat(data.hashBeta, " | hashAlpha=").concat(data.hashAlpha, " | tag=").concat(parent === null || parent === void 0 ? void 0 : parent.tagName));
|
|
1772
|
-
}
|
|
1773
1766
|
};
|
|
1774
1767
|
this.resize = function (el, width, height) {
|
|
1775
1768
|
if (el && el.nodeType === 1 /* NodeType.ELEMENT_NODE */ && width && height) {
|
|
@@ -2401,7 +2394,7 @@ var Visualizer = /** @class */ (function () {
|
|
|
2401
2394
|
this._excludeClassNames = [];
|
|
2402
2395
|
this.configure = function (opts) {
|
|
2403
2396
|
_this._excludeClassNames = opts.excludeClassNames || [];
|
|
2404
|
-
helper.selector.
|
|
2397
|
+
helper.selector.config(_this._excludeClassNames);
|
|
2405
2398
|
};
|
|
2406
2399
|
this.dom = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
2407
2400
|
return __generator(this, function (_a) {
|
|
@@ -2439,33 +2432,25 @@ var Visualizer = /** @class */ (function () {
|
|
|
2439
2432
|
return false;
|
|
2440
2433
|
}
|
|
2441
2434
|
};
|
|
2442
|
-
this.html = function (decoded, target, portalCanvasId, hash, useproxy, logerror, shortCircuitStrategy
|
|
2435
|
+
this.html = function (decoded, target, portalCanvasId, hash, useproxy, logerror, shortCircuitStrategy) {
|
|
2443
2436
|
if (hash === void 0) { hash = null; }
|
|
2444
2437
|
if (shortCircuitStrategy === void 0) { shortCircuitStrategy = 0 /* ShortCircuitStrategy.None */; }
|
|
2445
2438
|
return __awaiter(_this, void 0, void 0, function () {
|
|
2446
|
-
var merged,
|
|
2439
|
+
var merged, entry, _a, domEvent, e_1;
|
|
2447
2440
|
return __generator(this, function (_b) {
|
|
2448
2441
|
switch (_b.label) {
|
|
2449
2442
|
case 0:
|
|
2450
|
-
if (!(decoded && decoded.length > 0 && target)) return [3 /*break*/,
|
|
2443
|
+
if (!(decoded && decoded.length > 0 && target)) return [3 /*break*/, 11];
|
|
2451
2444
|
_b.label = 1;
|
|
2452
2445
|
case 1:
|
|
2453
|
-
_b.trys.push([1,
|
|
2446
|
+
_b.trys.push([1, 10, , 11]);
|
|
2454
2447
|
merged = this.merge(decoded);
|
|
2455
|
-
if (signal === null || signal === void 0 ? void 0 : signal.aborted)
|
|
2456
|
-
return [2 /*return*/, this];
|
|
2457
2448
|
return [4 /*yield*/, this.setup(target, { version: decoded[0].envelope.version, dom: merged.dom, useproxy: useproxy, portalCanvasId: portalCanvasId })];
|
|
2458
2449
|
case 2:
|
|
2459
2450
|
_b.sent();
|
|
2460
|
-
if (signal === null || signal === void 0 ? void 0 : signal.aborted)
|
|
2461
|
-
return [2 /*return*/, this];
|
|
2462
|
-
CHUNK_BUDGET_MS = 8;
|
|
2463
|
-
chunkStart = performance.now();
|
|
2464
2451
|
_b.label = 3;
|
|
2465
2452
|
case 3:
|
|
2466
|
-
if (!(merged.events.length > 0)) return [3 /*break*/,
|
|
2467
|
-
if (signal === null || signal === void 0 ? void 0 : signal.aborted)
|
|
2468
|
-
return [2 /*return*/, this];
|
|
2453
|
+
if (!(merged.events.length > 0)) return [3 /*break*/, 9];
|
|
2469
2454
|
entry = merged.events.shift();
|
|
2470
2455
|
_a = entry.event;
|
|
2471
2456
|
switch (_a) {
|
|
@@ -2491,22 +2476,15 @@ var Visualizer = /** @class */ (function () {
|
|
|
2491
2476
|
case 7:
|
|
2492
2477
|
_b.sent();
|
|
2493
2478
|
return [3 /*break*/, 8];
|
|
2494
|
-
case 8:
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
case 9:
|
|
2498
|
-
_b.sent();
|
|
2499
|
-
chunkStart = performance.now();
|
|
2500
|
-
_b.label = 10;
|
|
2501
|
-
case 10: return [3 /*break*/, 3];
|
|
2502
|
-
case 11: return [3 /*break*/, 13];
|
|
2503
|
-
case 12:
|
|
2479
|
+
case 8: return [3 /*break*/, 3];
|
|
2480
|
+
case 9: return [3 /*break*/, 11];
|
|
2481
|
+
case 10:
|
|
2504
2482
|
e_1 = _b.sent();
|
|
2505
2483
|
if (logerror) {
|
|
2506
2484
|
logerror(e_1);
|
|
2507
2485
|
}
|
|
2508
|
-
return [3 /*break*/,
|
|
2509
|
-
case
|
|
2486
|
+
return [3 /*break*/, 11];
|
|
2487
|
+
case 11: return [2 /*return*/, this];
|
|
2510
2488
|
}
|
|
2511
2489
|
});
|
|
2512
2490
|
});
|
|
@@ -2538,7 +2516,7 @@ var Visualizer = /** @class */ (function () {
|
|
|
2538
2516
|
decoded = decoded.sort(_this.sortPayloads);
|
|
2539
2517
|
// Re-initialize enrich class if someone ends up calling merge function directly
|
|
2540
2518
|
_this.enrich = _this.enrich || new EnrichHelper();
|
|
2541
|
-
helper.selector.
|
|
2519
|
+
helper.selector.config(_this._excludeClassNames);
|
|
2542
2520
|
_this.enrich.reset();
|
|
2543
2521
|
// Walk through payloads and generate merged payload from an array of decoded payloads
|
|
2544
2522
|
for (var _i = 0, decoded_1 = decoded; _i < decoded_1.length; _i++) {
|
|
@@ -2579,7 +2557,7 @@ var Visualizer = /** @class */ (function () {
|
|
|
2579
2557
|
this.reset();
|
|
2580
2558
|
if (options.excludeClassNames) {
|
|
2581
2559
|
this._excludeClassNames = options.excludeClassNames;
|
|
2582
|
-
helper.selector.
|
|
2560
|
+
helper.selector.config(options.excludeClassNames);
|
|
2583
2561
|
}
|
|
2584
2562
|
// Infer options
|
|
2585
2563
|
options.pointer = "pointer" in options ? options.pointer : true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gemx-dev/clarity-visualize",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.65",
|
|
4
4
|
"description": "Clarity visualize",
|
|
5
5
|
"author": "Microsoft Corp.",
|
|
6
6
|
"license": "MIT",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"unpkg": "build/clarity.visualize.min.js",
|
|
10
10
|
"types": "types/index.d.ts",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@gemx-dev/clarity-decode": "^0.8.
|
|
12
|
+
"@gemx-dev/clarity-decode": "^0.8.65"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"@rollup/plugin-commonjs": "^24.0.0",
|
package/src/visualizer.ts
CHANGED
|
@@ -27,7 +27,7 @@ export class Visualizer implements VisualizerType {
|
|
|
27
27
|
|
|
28
28
|
public configure = (opts: { excludeClassNames?: string[] }): void => {
|
|
29
29
|
this._excludeClassNames = opts.excludeClassNames || [];
|
|
30
|
-
helper.selector.
|
|
30
|
+
helper.selector.config(this._excludeClassNames);
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
public dom = async (event: Layout.DomEvent): Promise<void> => {
|
|
@@ -123,7 +123,7 @@ export class Visualizer implements VisualizerType {
|
|
|
123
123
|
decoded = decoded.sort(this.sortPayloads);
|
|
124
124
|
// Re-initialize enrich class if someone ends up calling merge function directly
|
|
125
125
|
this.enrich = this.enrich || new EnrichHelper();
|
|
126
|
-
helper.selector.
|
|
126
|
+
helper.selector.config(this._excludeClassNames);
|
|
127
127
|
this.enrich.reset();
|
|
128
128
|
// Walk through payloads and generate merged payload from an array of decoded payloads
|
|
129
129
|
for (let payload of decoded) {
|
|
@@ -158,7 +158,7 @@ export class Visualizer implements VisualizerType {
|
|
|
158
158
|
this.reset();
|
|
159
159
|
if (options.excludeClassNames) {
|
|
160
160
|
this._excludeClassNames = options.excludeClassNames;
|
|
161
|
-
helper.selector.
|
|
161
|
+
helper.selector.config(options.excludeClassNames);
|
|
162
162
|
}
|
|
163
163
|
// Infer options
|
|
164
164
|
options.pointer = "pointer" in options ? options.pointer : true;
|