@memlab/lens 1.0.3 → 2.0.0
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.js +28 -19
- package/dist/memlens.lib.bundle.js +106 -90
- package/dist/memlens.lib.bundle.min.js +1 -1
- package/dist/memlens.run.bundle.js +146 -135
- package/dist/memlens.run.bundle.min.js +1 -1
- package/package.json +2 -2
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
/******/ "use strict";
|
|
28
28
|
/******/ var __webpack_modules__ = ({
|
|
29
29
|
|
|
30
|
-
/***/ 23
|
|
31
|
-
|
|
30
|
+
/***/ 23
|
|
31
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
32
32
|
|
|
33
33
|
|
|
34
34
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
@@ -89,10 +89,10 @@ exports.DOMVisualizationExtension = DOMVisualizationExtension;
|
|
|
89
89
|
_DOMVisualizationExtension_domVirtualizer = new WeakMap();
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
/***/ }
|
|
92
|
+
/***/ },
|
|
93
93
|
|
|
94
|
-
/***/ 54
|
|
95
|
-
|
|
94
|
+
/***/ 54
|
|
95
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
96
96
|
|
|
97
97
|
|
|
98
98
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
@@ -186,7 +186,7 @@ class DOMObserver {
|
|
|
186
186
|
if (document.body) {
|
|
187
187
|
// observe changes in DOM tree
|
|
188
188
|
(_a = __classPrivateFieldGet(this, _DOMObserver_mutationObserver, "f")) === null || _a === void 0 ? void 0 : _a.observe(document.body, {
|
|
189
|
-
childList: true,
|
|
189
|
+
childList: true, // Detect direct additions/removals
|
|
190
190
|
subtree: true, // Observe all descendants
|
|
191
191
|
});
|
|
192
192
|
}
|
|
@@ -284,10 +284,10 @@ _DOMObserver_elementCount = new WeakMap(), _DOMObserver_detachedElementCount = n
|
|
|
284
284
|
};
|
|
285
285
|
|
|
286
286
|
|
|
287
|
-
/***/ }
|
|
287
|
+
/***/ },
|
|
288
288
|
|
|
289
|
-
/***/ 150
|
|
290
|
-
|
|
289
|
+
/***/ 150
|
|
290
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
291
291
|
|
|
292
292
|
|
|
293
293
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
@@ -318,7 +318,6 @@ class DOMElementVisualizer {
|
|
|
318
318
|
__classPrivateFieldGet(this, _DOMElementVisualizer_instances, "m", _DOMElementVisualizer_paint).call(this, domElementInfoList);
|
|
319
319
|
}
|
|
320
320
|
}
|
|
321
|
-
exports["default"] = DOMElementVisualizer;
|
|
322
321
|
_DOMElementVisualizer_canvas = new WeakMap(), _DOMElementVisualizer_instances = new WeakSet(), _DOMElementVisualizer_paint = function _DOMElementVisualizer_paint(domElementInfoList) {
|
|
323
322
|
if (!__classPrivateFieldGet(this, _DOMElementVisualizer_canvas, "f")) {
|
|
324
323
|
const canvas = __classPrivateFieldGet(this, _DOMElementVisualizer_instances, "m", _DOMElementVisualizer_createAndAppendCanvas).call(this);
|
|
@@ -409,12 +408,13 @@ _DOMElementVisualizer_canvas = new WeakMap(), _DOMElementVisualizer_instances =
|
|
|
409
408
|
}
|
|
410
409
|
__classPrivateFieldSet(this, _DOMElementVisualizer_canvas, null, "f");
|
|
411
410
|
};
|
|
411
|
+
exports["default"] = DOMElementVisualizer;
|
|
412
412
|
|
|
413
413
|
|
|
414
|
-
/***/ }
|
|
414
|
+
/***/ },
|
|
415
415
|
|
|
416
|
-
/***/ 271
|
|
417
|
-
|
|
416
|
+
/***/ 271
|
|
417
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
418
418
|
|
|
419
419
|
|
|
420
420
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
@@ -488,7 +488,6 @@ class DOMElementVisualizerInteractive extends dom_element_visualizer_1.default {
|
|
|
488
488
|
super.cleanup();
|
|
489
489
|
}
|
|
490
490
|
}
|
|
491
|
-
exports["default"] = DOMElementVisualizerInteractive;
|
|
492
491
|
_DOMElementVisualizerInteractive_elementIdToRectangle = new WeakMap(), _DOMElementVisualizerInteractive_visualizationOverlayDiv = new WeakMap(), _DOMElementVisualizerInteractive_controlWidget = new WeakMap(), _DOMElementVisualizerInteractive_blockedElementIds = new WeakMap(), _DOMElementVisualizerInteractive_currentVisualData = new WeakMap(), _DOMElementVisualizerInteractive_hideAllRef = new WeakMap(), _DOMElementVisualizerInteractive_updateDataCallbacks = new WeakMap(), _DOMElementVisualizerInteractive_instances = new WeakSet(), _DOMElementVisualizerInteractive_listenToKeyboardEvent = function _DOMElementVisualizerInteractive_listenToKeyboardEvent() {
|
|
493
492
|
document.addEventListener('keydown', event => {
|
|
494
493
|
if (event.key === 'd' || event.key === 'D') {
|
|
@@ -733,12 +732,13 @@ _DOMElementVisualizerInteractive_elementIdToRectangle = new WeakMap(), _DOMEleme
|
|
|
733
732
|
cb(Object.assign({}, __classPrivateFieldGet(this, _DOMElementVisualizerInteractive_currentVisualData, "f")));
|
|
734
733
|
}
|
|
735
734
|
};
|
|
735
|
+
exports["default"] = DOMElementVisualizerInteractive;
|
|
736
736
|
|
|
737
737
|
|
|
738
|
-
/***/ }
|
|
738
|
+
/***/ },
|
|
739
739
|
|
|
740
|
-
/***/ 282
|
|
741
|
-
|
|
740
|
+
/***/ 282
|
|
741
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
742
742
|
|
|
743
743
|
|
|
744
744
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -757,13 +757,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
757
757
|
}) : function(o, v) {
|
|
758
758
|
o["default"] = v;
|
|
759
759
|
});
|
|
760
|
-
var __importStar = (this && this.__importStar) || function (
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
};
|
|
760
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
761
|
+
var ownKeys = function(o) {
|
|
762
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
763
|
+
var ar = [];
|
|
764
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
765
|
+
return ar;
|
|
766
|
+
};
|
|
767
|
+
return ownKeys(o);
|
|
768
|
+
};
|
|
769
|
+
return function (mod) {
|
|
770
|
+
if (mod && mod.__esModule) return mod;
|
|
771
|
+
var result = {};
|
|
772
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
773
|
+
__setModuleDefault(result, mod);
|
|
774
|
+
return result;
|
|
775
|
+
};
|
|
776
|
+
})();
|
|
767
777
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
768
778
|
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
769
779
|
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
@@ -1036,7 +1046,6 @@ class ReactMemoryScan {
|
|
|
1036
1046
|
return scanResult;
|
|
1037
1047
|
}
|
|
1038
1048
|
}
|
|
1039
|
-
exports["default"] = ReactMemoryScan;
|
|
1040
1049
|
_ReactMemoryScan_elementWeakRefs = new WeakMap(), _ReactMemoryScan_isActivated = new WeakMap(), _ReactMemoryScan_intervalId = new WeakMap(), _ReactMemoryScan_elementToBoundingRects = new WeakMap(), _ReactMemoryScan_elementToComponentStack = new WeakMap(), _ReactMemoryScan_knownFiberNodes = new WeakMap(), _ReactMemoryScan_fiberAnalyzer = new WeakMap(), _ReactMemoryScan_isDevMode = new WeakMap(), _ReactMemoryScan_subscribers = new WeakMap(), _ReactMemoryScan_extensions = new WeakMap(), _ReactMemoryScan_scanIntervalMs = new WeakMap(), _ReactMemoryScan_domObserver = new WeakMap(), _ReactMemoryScan_eventListenerTracker = new WeakMap(), _ReactMemoryScan_isDisposed = new WeakMap(), _ReactMemoryScan_instances = new WeakSet(), _ReactMemoryScan_log = function _ReactMemoryScan_log(...args) {
|
|
1041
1050
|
if (__classPrivateFieldGet(this, _ReactMemoryScan_isDevMode, "f") && config_1.config.features.enableConsoleLogs) {
|
|
1042
1051
|
utils.consoleLog(...args);
|
|
@@ -1117,6 +1126,7 @@ _ReactMemoryScan_elementWeakRefs = new WeakMap(), _ReactMemoryScan_isActivated =
|
|
|
1117
1126
|
return eventListenerLeaks;
|
|
1118
1127
|
};
|
|
1119
1128
|
ReactMemoryScan.nextElementId = 0;
|
|
1129
|
+
exports["default"] = ReactMemoryScan;
|
|
1120
1130
|
class LeakedFiber {
|
|
1121
1131
|
constructor(fiber) {
|
|
1122
1132
|
this.leakedFiber = fiber;
|
|
@@ -1124,10 +1134,10 @@ class LeakedFiber {
|
|
|
1124
1134
|
}
|
|
1125
1135
|
|
|
1126
1136
|
|
|
1127
|
-
/***/ }
|
|
1137
|
+
/***/ },
|
|
1128
1138
|
|
|
1129
|
-
/***/ 302
|
|
1130
|
-
|
|
1139
|
+
/***/ 302
|
|
1140
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
1131
1141
|
|
|
1132
1142
|
|
|
1133
1143
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
@@ -1146,13 +1156,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
|
|
|
1146
1156
|
}) : function(o, v) {
|
|
1147
1157
|
o["default"] = v;
|
|
1148
1158
|
});
|
|
1149
|
-
var __importStar = (this && this.__importStar) || function (
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
};
|
|
1159
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
1160
|
+
var ownKeys = function(o) {
|
|
1161
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
1162
|
+
var ar = [];
|
|
1163
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
1164
|
+
return ar;
|
|
1165
|
+
};
|
|
1166
|
+
return ownKeys(o);
|
|
1167
|
+
};
|
|
1168
|
+
return function (mod) {
|
|
1169
|
+
if (mod && mod.__esModule) return mod;
|
|
1170
|
+
var result = {};
|
|
1171
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
1172
|
+
__setModuleDefault(result, mod);
|
|
1173
|
+
return result;
|
|
1174
|
+
};
|
|
1175
|
+
})();
|
|
1156
1176
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1157
1177
|
/**
|
|
1158
1178
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
@@ -1254,10 +1274,10 @@ class ReactFiberAnalyzer {
|
|
|
1254
1274
|
exports["default"] = ReactFiberAnalyzer;
|
|
1255
1275
|
|
|
1256
1276
|
|
|
1257
|
-
/***/ }
|
|
1277
|
+
/***/ },
|
|
1258
1278
|
|
|
1259
|
-
/***/ 313
|
|
1260
|
-
|
|
1279
|
+
/***/ 313
|
|
1280
|
+
(__unused_webpack_module, exports) {
|
|
1261
1281
|
|
|
1262
1282
|
|
|
1263
1283
|
/**
|
|
@@ -1271,7 +1291,17 @@ exports["default"] = ReactFiberAnalyzer;
|
|
|
1271
1291
|
*/
|
|
1272
1292
|
var _a, _b, _c;
|
|
1273
1293
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1274
|
-
exports.WeakMapPlus = exports.
|
|
1294
|
+
exports.WeakMapPlus = exports.WeakMapNoOp = exports.WeakSetNoOp = exports.WeakRefNoOp = void 0;
|
|
1295
|
+
exports.getNativeWeakMap = getNativeWeakMap;
|
|
1296
|
+
exports.getNativeWeakMapOrFallback = getNativeWeakMapOrFallback;
|
|
1297
|
+
exports.getNativeWeakSet = getNativeWeakSet;
|
|
1298
|
+
exports.getNativeWeakSetOrFallback = getNativeWeakSetOrFallback;
|
|
1299
|
+
exports.getNativeWeakRef = getNativeWeakRef;
|
|
1300
|
+
exports.getNativeWeakRefOrFallback = getNativeWeakRefOrFallback;
|
|
1301
|
+
exports.isWeakMapNative = isWeakMapNative;
|
|
1302
|
+
exports.isWeakSetNative = isWeakSetNative;
|
|
1303
|
+
exports.isWeakRefNative = isWeakRefNative;
|
|
1304
|
+
exports.isWeakAPINative = isWeakAPINative;
|
|
1275
1305
|
const globalScope = typeof window !== 'undefined' ? window : self;
|
|
1276
1306
|
const _weakMap = (_a = globalScope.WeakMap) !== null && _a !== void 0 ? _a : null;
|
|
1277
1307
|
const _weakMapIsNative = isWeakMapNative();
|
|
@@ -1335,27 +1365,21 @@ exports.WeakMapNoOp = WeakMapNoOp;
|
|
|
1335
1365
|
function getNativeWeakMap() {
|
|
1336
1366
|
return _weakMapIsNative ? _weakMap : null;
|
|
1337
1367
|
}
|
|
1338
|
-
exports.getNativeWeakMap = getNativeWeakMap;
|
|
1339
1368
|
function getNativeWeakMapOrFallback() {
|
|
1340
1369
|
return _weakMapIsNative && _weakMap ? _weakMap : WeakMapNoOp;
|
|
1341
1370
|
}
|
|
1342
|
-
exports.getNativeWeakMapOrFallback = getNativeWeakMapOrFallback;
|
|
1343
1371
|
function getNativeWeakSet() {
|
|
1344
1372
|
return _weakSetIsNative ? _weakSet : null;
|
|
1345
1373
|
}
|
|
1346
|
-
exports.getNativeWeakSet = getNativeWeakSet;
|
|
1347
1374
|
function getNativeWeakSetOrFallback() {
|
|
1348
1375
|
return _weakSetIsNative && _weakSet ? _weakSet : WeakSetNoOp;
|
|
1349
1376
|
}
|
|
1350
|
-
exports.getNativeWeakSetOrFallback = getNativeWeakSetOrFallback;
|
|
1351
1377
|
function getNativeWeakRef() {
|
|
1352
1378
|
return _weakRefIsNative ? _weakRef : null;
|
|
1353
1379
|
}
|
|
1354
|
-
exports.getNativeWeakRef = getNativeWeakRef;
|
|
1355
1380
|
function getNativeWeakRefOrFallback() {
|
|
1356
1381
|
return _weakRefIsNative && _weakRef ? _weakRef : WeakRefNoOp;
|
|
1357
1382
|
}
|
|
1358
|
-
exports.getNativeWeakRefOrFallback = getNativeWeakRefOrFallback;
|
|
1359
1383
|
function normalize(input) {
|
|
1360
1384
|
return typeof input.replace === 'function'
|
|
1361
1385
|
? input.replace(/\n/g, ' ').replace(/\s+/g, ' ')
|
|
@@ -1366,23 +1390,19 @@ function isWeakMapNative() {
|
|
|
1366
1390
|
typeof _weakMap.toString === 'function' &&
|
|
1367
1391
|
normalize(_weakMap.toString()) === 'function WeakMap() { [native code] }');
|
|
1368
1392
|
}
|
|
1369
|
-
exports.isWeakMapNative = isWeakMapNative;
|
|
1370
1393
|
function isWeakSetNative() {
|
|
1371
1394
|
return (_weakSet !== null &&
|
|
1372
1395
|
typeof _weakSet.toString === 'function' &&
|
|
1373
1396
|
normalize(_weakSet.toString()) === 'function WeakSet() { [native code] }');
|
|
1374
1397
|
}
|
|
1375
|
-
exports.isWeakSetNative = isWeakSetNative;
|
|
1376
1398
|
function isWeakRefNative() {
|
|
1377
1399
|
return (_weakRef !== null &&
|
|
1378
1400
|
typeof _weakRef.toString === 'function' &&
|
|
1379
1401
|
normalize(_weakRef.toString()) === 'function WeakRef() { [native code] }');
|
|
1380
1402
|
}
|
|
1381
|
-
exports.isWeakRefNative = isWeakRefNative;
|
|
1382
1403
|
function isWeakAPINative() {
|
|
1383
1404
|
return _weakAPIsAreNative;
|
|
1384
1405
|
}
|
|
1385
|
-
exports.isWeakAPINative = isWeakAPINative;
|
|
1386
1406
|
class WeakMapPlus {
|
|
1387
1407
|
constructor(options = {}) {
|
|
1388
1408
|
this.strongMap = null;
|
|
@@ -1532,14 +1552,14 @@ class WeakMapPlus {
|
|
|
1532
1552
|
exports.WeakMapPlus = WeakMapPlus;
|
|
1533
1553
|
|
|
1534
1554
|
|
|
1535
|
-
/***/ }
|
|
1555
|
+
/***/ },
|
|
1536
1556
|
|
|
1537
|
-
/***/ 341
|
|
1538
|
-
|
|
1557
|
+
/***/ 341
|
|
1558
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
1539
1559
|
|
|
1540
1560
|
|
|
1541
1561
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1542
|
-
exports.createControlWidget =
|
|
1562
|
+
exports.createControlWidget = createControlWidget;
|
|
1543
1563
|
const visual_utils_1 = __webpack_require__(498);
|
|
1544
1564
|
const status_text_1 = __webpack_require__(775);
|
|
1545
1565
|
const toggle_button_1 = __webpack_require__(946);
|
|
@@ -1579,7 +1599,6 @@ function createControlWidget(overlayDiv, hideAllRef, registerDataUpdateCallback)
|
|
|
1579
1599
|
header.appendChild(statusText);
|
|
1580
1600
|
return controlWidget;
|
|
1581
1601
|
}
|
|
1582
|
-
exports.createControlWidget = createControlWidget;
|
|
1583
1602
|
function supportDragging(controlWidget) {
|
|
1584
1603
|
let isDragging = false;
|
|
1585
1604
|
let offsetX = 0;
|
|
@@ -1608,10 +1627,10 @@ function supportDragging(controlWidget) {
|
|
|
1608
1627
|
}
|
|
1609
1628
|
|
|
1610
1629
|
|
|
1611
|
-
/***/ }
|
|
1630
|
+
/***/ },
|
|
1612
1631
|
|
|
1613
|
-
/***/ 346
|
|
1614
|
-
|
|
1632
|
+
/***/ 346
|
|
1633
|
+
(__unused_webpack_module, exports) {
|
|
1615
1634
|
|
|
1616
1635
|
|
|
1617
1636
|
/**
|
|
@@ -1645,14 +1664,14 @@ exports.config = {
|
|
|
1645
1664
|
};
|
|
1646
1665
|
|
|
1647
1666
|
|
|
1648
|
-
/***/ }
|
|
1667
|
+
/***/ },
|
|
1649
1668
|
|
|
1650
|
-
/***/ 368
|
|
1651
|
-
|
|
1669
|
+
/***/ 368
|
|
1670
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
1652
1671
|
|
|
1653
1672
|
|
|
1654
1673
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1655
|
-
exports.createOverlayDiv =
|
|
1674
|
+
exports.createOverlayDiv = createOverlayDiv;
|
|
1656
1675
|
/**
|
|
1657
1676
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
1658
1677
|
*
|
|
@@ -1671,17 +1690,25 @@ function createOverlayDiv() {
|
|
|
1671
1690
|
overlayDiv.id = 'memory-visualization-overlay';
|
|
1672
1691
|
return overlayDiv;
|
|
1673
1692
|
}
|
|
1674
|
-
exports.createOverlayDiv = createOverlayDiv;
|
|
1675
1693
|
|
|
1676
1694
|
|
|
1677
|
-
/***/ }
|
|
1695
|
+
/***/ },
|
|
1678
1696
|
|
|
1679
|
-
/***/ 476
|
|
1680
|
-
|
|
1697
|
+
/***/ 476
|
|
1698
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
1681
1699
|
|
|
1682
1700
|
|
|
1683
1701
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1684
|
-
exports.
|
|
1702
|
+
exports.getDOMElements = getDOMElements;
|
|
1703
|
+
exports.getDOMElementCount = getDOMElementCount;
|
|
1704
|
+
exports.getMeaningfulName = getMeaningfulName;
|
|
1705
|
+
exports.isMinifiedName = isMinifiedName;
|
|
1706
|
+
exports.addCountbyKey = addCountbyKey;
|
|
1707
|
+
exports.updateWeakRefList = updateWeakRefList;
|
|
1708
|
+
exports.getBoundingClientRect = getBoundingClientRect;
|
|
1709
|
+
exports.consoleLog = consoleLog;
|
|
1710
|
+
exports.hasRunInSession = hasRunInSession;
|
|
1711
|
+
exports.setRunInSession = setRunInSession;
|
|
1685
1712
|
const visual_utils_1 = __webpack_require__(498);
|
|
1686
1713
|
function getDOMElements() {
|
|
1687
1714
|
const elements = Array.from(document.querySelectorAll('*'));
|
|
@@ -1694,7 +1721,6 @@ function getDOMElements() {
|
|
|
1694
1721
|
}
|
|
1695
1722
|
return ret;
|
|
1696
1723
|
}
|
|
1697
|
-
exports.getDOMElements = getDOMElements;
|
|
1698
1724
|
function getDOMElementCount() {
|
|
1699
1725
|
const elements = Array.from(document.querySelectorAll('*'));
|
|
1700
1726
|
let ret = 0;
|
|
@@ -1706,7 +1732,6 @@ function getDOMElementCount() {
|
|
|
1706
1732
|
}
|
|
1707
1733
|
return ret;
|
|
1708
1734
|
}
|
|
1709
|
-
exports.getDOMElementCount = getDOMElementCount;
|
|
1710
1735
|
function getMeaningfulName(name) {
|
|
1711
1736
|
if (name == null) {
|
|
1712
1737
|
return null;
|
|
@@ -1714,7 +1739,6 @@ function getMeaningfulName(name) {
|
|
|
1714
1739
|
const isMinified = isMinifiedName(name);
|
|
1715
1740
|
return isMinified ? null : name;
|
|
1716
1741
|
}
|
|
1717
|
-
exports.getMeaningfulName = getMeaningfulName;
|
|
1718
1742
|
/**
|
|
1719
1743
|
* Determines if a given function or class name is minified.
|
|
1720
1744
|
*
|
|
@@ -1737,12 +1761,10 @@ function isMinifiedName(name) {
|
|
|
1737
1761
|
const hasMeaningfulPattern = /^[A-Z][a-z]+([A-Z][a-z]*)*$|^[a-z]+([A-Z][a-z]*)*$/.test(name);
|
|
1738
1762
|
return !hasMeaningfulPattern;
|
|
1739
1763
|
}
|
|
1740
|
-
exports.isMinifiedName = isMinifiedName;
|
|
1741
1764
|
function addCountbyKey(map, key, count) {
|
|
1742
1765
|
var _a;
|
|
1743
1766
|
map.set(key, ((_a = map.get(key)) !== null && _a !== void 0 ? _a : 0) + count);
|
|
1744
1767
|
}
|
|
1745
|
-
exports.addCountbyKey = addCountbyKey;
|
|
1746
1768
|
function updateWeakRefList(weakRefList, elementRefs) {
|
|
1747
1769
|
consolidateWeakRefList(weakRefList);
|
|
1748
1770
|
const set = getElementsSet(weakRefList);
|
|
@@ -1756,7 +1778,6 @@ function updateWeakRefList(weakRefList, elementRefs) {
|
|
|
1756
1778
|
}
|
|
1757
1779
|
return weakRefList;
|
|
1758
1780
|
}
|
|
1759
|
-
exports.updateWeakRefList = updateWeakRefList;
|
|
1760
1781
|
function getElementsSet(weakRefList) {
|
|
1761
1782
|
const set = new Set();
|
|
1762
1783
|
for (const weakRef of weakRefList) {
|
|
@@ -1813,13 +1834,11 @@ function getBoundingClientRect(element) {
|
|
|
1813
1834
|
ret.scrollTop = scrollTop;
|
|
1814
1835
|
return ret;
|
|
1815
1836
|
}
|
|
1816
|
-
exports.getBoundingClientRect = getBoundingClientRect;
|
|
1817
1837
|
const _console = console;
|
|
1818
1838
|
const _consoleLog = _console.log;
|
|
1819
1839
|
function consoleLog(...args) {
|
|
1820
1840
|
_consoleLog.apply(_console, args);
|
|
1821
1841
|
}
|
|
1822
|
-
exports.consoleLog = consoleLog;
|
|
1823
1842
|
const SESSION_STORAGE_KEY = 'memory_lens_session';
|
|
1824
1843
|
function isSessionStorageAvailable() {
|
|
1825
1844
|
try {
|
|
@@ -1843,7 +1862,6 @@ function hasRunInSession() {
|
|
|
1843
1862
|
return false;
|
|
1844
1863
|
}
|
|
1845
1864
|
}
|
|
1846
|
-
exports.hasRunInSession = hasRunInSession;
|
|
1847
1865
|
function setRunInSession() {
|
|
1848
1866
|
if (!isSessionStorageAvailable()) {
|
|
1849
1867
|
return;
|
|
@@ -1855,17 +1873,21 @@ function setRunInSession() {
|
|
|
1855
1873
|
// do nothing
|
|
1856
1874
|
}
|
|
1857
1875
|
}
|
|
1858
|
-
exports.setRunInSession = setRunInSession;
|
|
1859
1876
|
|
|
1860
1877
|
|
|
1861
|
-
/***/ }
|
|
1878
|
+
/***/ },
|
|
1862
1879
|
|
|
1863
|
-
/***/ 498
|
|
1864
|
-
|
|
1880
|
+
/***/ 498
|
|
1881
|
+
(__unused_webpack_module, exports) {
|
|
1865
1882
|
|
|
1866
1883
|
|
|
1867
1884
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1868
|
-
exports.
|
|
1885
|
+
exports.isVisualizerElement = isVisualizerElement;
|
|
1886
|
+
exports.createVisualizerElement = createVisualizerElement;
|
|
1887
|
+
exports.tryToAttachOverlay = tryToAttachOverlay;
|
|
1888
|
+
exports.addTrackedListener = addTrackedListener;
|
|
1889
|
+
exports.removeAllListeners = removeAllListeners;
|
|
1890
|
+
exports.debounce = debounce;
|
|
1869
1891
|
const VISUALIZER_DATA_ATTR = 'data-visualizer';
|
|
1870
1892
|
function setVisualizerElement(element) {
|
|
1871
1893
|
element.setAttribute(VISUALIZER_DATA_ATTR, 'true');
|
|
@@ -1874,19 +1896,16 @@ function setVisualizerElement(element) {
|
|
|
1874
1896
|
function isVisualizerElement(element) {
|
|
1875
1897
|
return element.getAttribute(VISUALIZER_DATA_ATTR) === 'true';
|
|
1876
1898
|
}
|
|
1877
|
-
exports.isVisualizerElement = isVisualizerElement;
|
|
1878
1899
|
function createVisualizerElement(tag) {
|
|
1879
1900
|
const element = document.createElement(tag);
|
|
1880
1901
|
setVisualizerElement(element);
|
|
1881
1902
|
return element;
|
|
1882
1903
|
}
|
|
1883
|
-
exports.createVisualizerElement = createVisualizerElement;
|
|
1884
1904
|
function tryToAttachOverlay(overlayDiv) {
|
|
1885
1905
|
if (document.body) {
|
|
1886
1906
|
document.body.appendChild(overlayDiv);
|
|
1887
1907
|
}
|
|
1888
1908
|
}
|
|
1889
|
-
exports.tryToAttachOverlay = tryToAttachOverlay;
|
|
1890
1909
|
const listenerMap = new WeakMap();
|
|
1891
1910
|
function addTrackedListener(elRef, type, cb, options) {
|
|
1892
1911
|
var _a;
|
|
@@ -1899,7 +1918,6 @@ function addTrackedListener(elRef, type, cb, options) {
|
|
|
1899
1918
|
}
|
|
1900
1919
|
(_a = listenerMap.get(el)) === null || _a === void 0 ? void 0 : _a.push({ type, cb, options });
|
|
1901
1920
|
}
|
|
1902
|
-
exports.addTrackedListener = addTrackedListener;
|
|
1903
1921
|
function removeAllListeners(elRef) {
|
|
1904
1922
|
const el = elRef.deref();
|
|
1905
1923
|
if (!el)
|
|
@@ -1912,7 +1930,6 @@ function removeAllListeners(elRef) {
|
|
|
1912
1930
|
}
|
|
1913
1931
|
listenerMap.delete(el);
|
|
1914
1932
|
}
|
|
1915
|
-
exports.removeAllListeners = removeAllListeners;
|
|
1916
1933
|
function debounce(callback, delay) {
|
|
1917
1934
|
let timer = null;
|
|
1918
1935
|
return (...args) => {
|
|
@@ -1924,17 +1941,16 @@ function debounce(callback, delay) {
|
|
|
1924
1941
|
}, delay);
|
|
1925
1942
|
};
|
|
1926
1943
|
}
|
|
1927
|
-
exports.debounce = debounce;
|
|
1928
1944
|
|
|
1929
1945
|
|
|
1930
|
-
/***/ }
|
|
1946
|
+
/***/ },
|
|
1931
1947
|
|
|
1932
|
-
/***/ 701
|
|
1933
|
-
|
|
1948
|
+
/***/ 701
|
|
1949
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
1934
1950
|
|
|
1935
1951
|
|
|
1936
1952
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
1937
|
-
exports.createOverlayRectangle =
|
|
1953
|
+
exports.createOverlayRectangle = createOverlayRectangle;
|
|
1938
1954
|
const intersection_observer_1 = __webpack_require__(979);
|
|
1939
1955
|
const visual_utils_1 = __webpack_require__(498);
|
|
1940
1956
|
const MAX_Z_INDEX = `${Math.pow(2, 30) - 1}`;
|
|
@@ -2037,7 +2053,6 @@ function createOverlayRectangle(elementId, info, container, setSelectedId, setUn
|
|
|
2037
2053
|
container.appendChild(div);
|
|
2038
2054
|
return divRef;
|
|
2039
2055
|
}
|
|
2040
|
-
exports.createOverlayRectangle = createOverlayRectangle;
|
|
2041
2056
|
function styleOnInteraction(divRef, state) {
|
|
2042
2057
|
const div = divRef.deref();
|
|
2043
2058
|
if (div == null) {
|
|
@@ -2062,14 +2077,19 @@ function styleOnInteraction(divRef, state) {
|
|
|
2062
2077
|
}
|
|
2063
2078
|
|
|
2064
2079
|
|
|
2065
|
-
/***/ }
|
|
2080
|
+
/***/ },
|
|
2066
2081
|
|
|
2067
|
-
/***/ 737
|
|
2068
|
-
|
|
2082
|
+
/***/ 737
|
|
2083
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2069
2084
|
|
|
2070
2085
|
|
|
2071
2086
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2072
|
-
exports.
|
|
2087
|
+
exports.traverseFiber = exports.getTopMostFiberWithChild = exports.getTopMostHostFiber = exports.getNearestHostFiber = exports.isHostFiber = exports.MutationMask = exports.Visibility = exports.Snapshot = exports.Ref = exports.ContentReset = exports.ChildDeletion = exports.Cloned = exports.Update = exports.Hydrating = exports.DidCapture = exports.Placement = exports.PerformedWork = exports.DEPRECATED_ASYNC_MODE_SYMBOL_STRING = exports.CONCURRENT_MODE_SYMBOL_STRING = exports.CONCURRENT_MODE_NUMBER = exports.HostRoot = exports.OffscreenComponent = exports.LegacyHiddenComponent = exports.Fragment = exports.HostText = exports.DehydratedSuspenseComponent = exports.HostSingletonTag = exports.HostHoistableTag = exports.HostComponentTag = exports.SimpleMemoComponentTag = exports.MemoComponentTag = exports.ForwardRefTag = exports.OffscreenComponentTag = exports.SuspenseComponentTag = exports.ContextConsumerTag = exports.FunctionComponentTag = exports.ClassComponentTag = void 0;
|
|
2088
|
+
exports.getFiberNodeFromElement = getFiberNodeFromElement;
|
|
2089
|
+
exports.getReactComponentStack = getReactComponentStack;
|
|
2090
|
+
exports.getDisplayNameOfFiberNode = getDisplayNameOfFiberNode;
|
|
2091
|
+
exports.isFunctionalComponent = isFunctionalComponent;
|
|
2092
|
+
exports.extractReactComponentName = extractReactComponentName;
|
|
2073
2093
|
const utils_1 = __webpack_require__(476);
|
|
2074
2094
|
const valid_component_name_1 = __webpack_require__(847);
|
|
2075
2095
|
exports.ClassComponentTag = 1;
|
|
@@ -2171,8 +2191,8 @@ const traverseFiber = (fiber, selector, ascending = false) => {
|
|
|
2171
2191
|
exports.traverseFiber = traverseFiber;
|
|
2172
2192
|
// React internal property keys
|
|
2173
2193
|
const internalKeys = [
|
|
2174
|
-
'__reactFiber$',
|
|
2175
|
-
'__reactInternalInstance$',
|
|
2194
|
+
'__reactFiber$', // React 17+
|
|
2195
|
+
'__reactInternalInstance$', // React 16
|
|
2176
2196
|
'_reactRootContainer', // React Root
|
|
2177
2197
|
];
|
|
2178
2198
|
const getOwnPropertyNames = Object.getOwnPropertyNames.bind(Object);
|
|
@@ -2186,7 +2206,6 @@ function getFiberNodeFromElement(element) {
|
|
|
2186
2206
|
}
|
|
2187
2207
|
return null;
|
|
2188
2208
|
}
|
|
2189
|
-
exports.getFiberNodeFromElement = getFiberNodeFromElement;
|
|
2190
2209
|
function getReactComponentStack(node) {
|
|
2191
2210
|
const stack = [];
|
|
2192
2211
|
const visited = new Set();
|
|
@@ -2204,7 +2223,6 @@ function getReactComponentStack(node) {
|
|
|
2204
2223
|
}
|
|
2205
2224
|
return stack;
|
|
2206
2225
|
}
|
|
2207
|
-
exports.getReactComponentStack = getReactComponentStack;
|
|
2208
2226
|
function getDisplayNameOfFiberNode(node) {
|
|
2209
2227
|
var _a, _b, _c, _d;
|
|
2210
2228
|
const elementType = (_a = node.type) !== null && _a !== void 0 ? _a : node.elementType;
|
|
@@ -2229,12 +2247,10 @@ function getDisplayNameOfFiberNode(node) {
|
|
|
2229
2247
|
const ret = (0, utils_1.getMeaningfulName)(extractReactComponentName(displayName));
|
|
2230
2248
|
return (0, valid_component_name_1.isValidComponentName)(ret) ? ret : null;
|
|
2231
2249
|
}
|
|
2232
|
-
exports.getDisplayNameOfFiberNode = getDisplayNameOfFiberNode;
|
|
2233
2250
|
function isFunctionalComponent(node) {
|
|
2234
2251
|
const elementType = node === null || node === void 0 ? void 0 : node.elementType;
|
|
2235
2252
|
return typeof elementType === 'function';
|
|
2236
2253
|
}
|
|
2237
|
-
exports.isFunctionalComponent = isFunctionalComponent;
|
|
2238
2254
|
// dom-element [from component.react] --> component.react
|
|
2239
2255
|
function extractReactComponentName(displayName) {
|
|
2240
2256
|
if (typeof displayName !== 'string') {
|
|
@@ -2254,17 +2270,16 @@ function extractReactComponentName(displayName) {
|
|
|
2254
2270
|
}
|
|
2255
2271
|
return name;
|
|
2256
2272
|
}
|
|
2257
|
-
exports.extractReactComponentName = extractReactComponentName;
|
|
2258
2273
|
|
|
2259
2274
|
|
|
2260
|
-
/***/ }
|
|
2275
|
+
/***/ },
|
|
2261
2276
|
|
|
2262
|
-
/***/ 775
|
|
2263
|
-
|
|
2277
|
+
/***/ 775
|
|
2278
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2264
2279
|
|
|
2265
2280
|
|
|
2266
2281
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2267
|
-
exports.createStatusText =
|
|
2282
|
+
exports.createStatusText = createStatusText;
|
|
2268
2283
|
const visual_utils_1 = __webpack_require__(498);
|
|
2269
2284
|
function formatBytes(bytes) {
|
|
2270
2285
|
if (bytes === 0)
|
|
@@ -2298,13 +2313,12 @@ function createStatusText(registerDataUpdateCallback) {
|
|
|
2298
2313
|
});
|
|
2299
2314
|
return statusWidget;
|
|
2300
2315
|
}
|
|
2301
|
-
exports.createStatusText = createStatusText;
|
|
2302
2316
|
|
|
2303
2317
|
|
|
2304
|
-
/***/ }
|
|
2318
|
+
/***/ },
|
|
2305
2319
|
|
|
2306
|
-
/***/ 847
|
|
2307
|
-
|
|
2320
|
+
/***/ 847
|
|
2321
|
+
(__unused_webpack_module, exports) {
|
|
2308
2322
|
|
|
2309
2323
|
|
|
2310
2324
|
/**
|
|
@@ -2317,18 +2331,17 @@ exports.createStatusText = createStatusText;
|
|
|
2317
2331
|
* @oncall memory_lab
|
|
2318
2332
|
*/
|
|
2319
2333
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2320
|
-
exports.isValidComponentName =
|
|
2334
|
+
exports.isValidComponentName = isValidComponentName;
|
|
2321
2335
|
const displayNameBlockList = new Set();
|
|
2322
2336
|
function isValidComponentName(name) {
|
|
2323
2337
|
return name != null && !displayNameBlockList.has(name);
|
|
2324
2338
|
}
|
|
2325
|
-
exports.isValidComponentName = isValidComponentName;
|
|
2326
2339
|
|
|
2327
2340
|
|
|
2328
|
-
/***/ }
|
|
2341
|
+
/***/ },
|
|
2329
2342
|
|
|
2330
|
-
/***/ 860
|
|
2331
|
-
|
|
2343
|
+
/***/ 860
|
|
2344
|
+
(__unused_webpack_module, exports) {
|
|
2332
2345
|
|
|
2333
2346
|
|
|
2334
2347
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
@@ -2361,14 +2374,14 @@ class BasicExtension {
|
|
|
2361
2374
|
exports.BasicExtension = BasicExtension;
|
|
2362
2375
|
|
|
2363
2376
|
|
|
2364
|
-
/***/ }
|
|
2377
|
+
/***/ },
|
|
2365
2378
|
|
|
2366
|
-
/***/ 904
|
|
2367
|
-
|
|
2379
|
+
/***/ 904
|
|
2380
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2368
2381
|
|
|
2369
2382
|
|
|
2370
2383
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2371
|
-
exports.createComponentStackPanel =
|
|
2384
|
+
exports.createComponentStackPanel = createComponentStackPanel;
|
|
2372
2385
|
const visual_utils_1 = __webpack_require__(498);
|
|
2373
2386
|
function createComponentStackPanel(registerDataUpdateCallback) {
|
|
2374
2387
|
const panel = (0, visual_utils_1.createVisualizerElement)('div');
|
|
@@ -2427,13 +2440,12 @@ function createComponentStackPanel(registerDataUpdateCallback) {
|
|
|
2427
2440
|
}, 1));
|
|
2428
2441
|
return panel;
|
|
2429
2442
|
}
|
|
2430
|
-
exports.createComponentStackPanel = createComponentStackPanel;
|
|
2431
2443
|
|
|
2432
2444
|
|
|
2433
|
-
/***/ }
|
|
2445
|
+
/***/ },
|
|
2434
2446
|
|
|
2435
|
-
/***/ 933
|
|
2436
|
-
|
|
2447
|
+
/***/ 933
|
|
2448
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2437
2449
|
|
|
2438
2450
|
|
|
2439
2451
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
@@ -2461,14 +2473,14 @@ if (!(0, utils_1.hasRunInSession)()) {
|
|
|
2461
2473
|
}
|
|
2462
2474
|
|
|
2463
2475
|
|
|
2464
|
-
/***/ }
|
|
2476
|
+
/***/ },
|
|
2465
2477
|
|
|
2466
|
-
/***/ 946
|
|
2467
|
-
|
|
2478
|
+
/***/ 946
|
|
2479
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2468
2480
|
|
|
2469
2481
|
|
|
2470
2482
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
2471
|
-
exports.createToggleButton =
|
|
2483
|
+
exports.createToggleButton = createToggleButton;
|
|
2472
2484
|
/**
|
|
2473
2485
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
2474
2486
|
*
|
|
@@ -2519,13 +2531,12 @@ function createToggleButton(overlayDiv, hideAllRef) {
|
|
|
2519
2531
|
});
|
|
2520
2532
|
return toggleWrapper;
|
|
2521
2533
|
}
|
|
2522
|
-
exports.createToggleButton = createToggleButton;
|
|
2523
2534
|
|
|
2524
2535
|
|
|
2525
|
-
/***/ }
|
|
2536
|
+
/***/ },
|
|
2526
2537
|
|
|
2527
|
-
/***/ 953
|
|
2528
|
-
|
|
2538
|
+
/***/ 953
|
|
2539
|
+
(__unused_webpack_module, exports, __webpack_require__) {
|
|
2529
2540
|
|
|
2530
2541
|
|
|
2531
2542
|
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
@@ -2657,10 +2668,10 @@ _EventListenerTracker_listenerMap = new WeakMap(), _EventListenerTracker_detache
|
|
|
2657
2668
|
EventListenerTracker.instance = null;
|
|
2658
2669
|
|
|
2659
2670
|
|
|
2660
|
-
/***/ }
|
|
2671
|
+
/***/ },
|
|
2661
2672
|
|
|
2662
|
-
/***/ 979
|
|
2663
|
-
|
|
2673
|
+
/***/ 979
|
|
2674
|
+
(__unused_webpack_module, exports) {
|
|
2664
2675
|
|
|
2665
2676
|
|
|
2666
2677
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
@@ -2718,7 +2729,7 @@ class IntersectionObserverManager {
|
|
|
2718
2729
|
exports.IntersectionObserverManager = IntersectionObserverManager;
|
|
2719
2730
|
|
|
2720
2731
|
|
|
2721
|
-
/***/ }
|
|
2732
|
+
/***/ }
|
|
2722
2733
|
|
|
2723
2734
|
/******/ });
|
|
2724
2735
|
/************************************************************************/
|