@lytjs/devtools 6.5.0 → 6.6.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/README.md +723 -723
- package/dist/index.cjs +16 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +16 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +60 -60
package/dist/index.cjs
CHANGED
|
@@ -36,7 +36,10 @@ function buildComponentTreeRecursive(component, parentId) {
|
|
|
36
36
|
if (component.children && Array.isArray(component.children)) {
|
|
37
37
|
const children = [];
|
|
38
38
|
for (const child of component.children) {
|
|
39
|
-
const childNode = buildComponentTreeRecursive(
|
|
39
|
+
const childNode = buildComponentTreeRecursive(
|
|
40
|
+
child,
|
|
41
|
+
node.id
|
|
42
|
+
);
|
|
40
43
|
if (childNode) {
|
|
41
44
|
children.push(childNode);
|
|
42
45
|
}
|
|
@@ -1361,7 +1364,10 @@ function endTimelineEvent(id) {
|
|
|
1361
1364
|
event.duration = endTime - event.startTime;
|
|
1362
1365
|
for (let i = stackIndex + 1; i < timelineEventStack.length; i++) {
|
|
1363
1366
|
const nestedEvent = timelineEventStack[i];
|
|
1364
|
-
event.duration = Math.max(
|
|
1367
|
+
event.duration = Math.max(
|
|
1368
|
+
event.duration,
|
|
1369
|
+
nestedEvent.startTime - event.startTime + nestedEvent.event.duration
|
|
1370
|
+
);
|
|
1365
1371
|
}
|
|
1366
1372
|
timelineEventStack.splice(stackIndex);
|
|
1367
1373
|
currentDepth = Math.max(0, currentDepth - 1);
|
|
@@ -1446,10 +1452,14 @@ function clearTimelineEvents() {
|
|
|
1446
1452
|
currentDepth = 0;
|
|
1447
1453
|
}
|
|
1448
1454
|
function exportTimelineAsJSON() {
|
|
1449
|
-
return JSON.stringify(
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1455
|
+
return JSON.stringify(
|
|
1456
|
+
{
|
|
1457
|
+
events: timelineEvents,
|
|
1458
|
+
exportedAt: Date.now()
|
|
1459
|
+
},
|
|
1460
|
+
null,
|
|
1461
|
+
2
|
|
1462
|
+
);
|
|
1453
1463
|
}
|
|
1454
1464
|
function serializeTimelineEvents() {
|
|
1455
1465
|
if (timelineEvents.length === 0) {
|