@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.mjs
CHANGED
|
@@ -32,7 +32,10 @@ function buildComponentTreeRecursive(component, parentId) {
|
|
|
32
32
|
if (component.children && Array.isArray(component.children)) {
|
|
33
33
|
const children = [];
|
|
34
34
|
for (const child of component.children) {
|
|
35
|
-
const childNode = buildComponentTreeRecursive(
|
|
35
|
+
const childNode = buildComponentTreeRecursive(
|
|
36
|
+
child,
|
|
37
|
+
node.id
|
|
38
|
+
);
|
|
36
39
|
if (childNode) {
|
|
37
40
|
children.push(childNode);
|
|
38
41
|
}
|
|
@@ -1357,7 +1360,10 @@ function endTimelineEvent(id) {
|
|
|
1357
1360
|
event.duration = endTime - event.startTime;
|
|
1358
1361
|
for (let i = stackIndex + 1; i < timelineEventStack.length; i++) {
|
|
1359
1362
|
const nestedEvent = timelineEventStack[i];
|
|
1360
|
-
event.duration = Math.max(
|
|
1363
|
+
event.duration = Math.max(
|
|
1364
|
+
event.duration,
|
|
1365
|
+
nestedEvent.startTime - event.startTime + nestedEvent.event.duration
|
|
1366
|
+
);
|
|
1361
1367
|
}
|
|
1362
1368
|
timelineEventStack.splice(stackIndex);
|
|
1363
1369
|
currentDepth = Math.max(0, currentDepth - 1);
|
|
@@ -1442,10 +1448,14 @@ function clearTimelineEvents() {
|
|
|
1442
1448
|
currentDepth = 0;
|
|
1443
1449
|
}
|
|
1444
1450
|
function exportTimelineAsJSON() {
|
|
1445
|
-
return JSON.stringify(
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1451
|
+
return JSON.stringify(
|
|
1452
|
+
{
|
|
1453
|
+
events: timelineEvents,
|
|
1454
|
+
exportedAt: Date.now()
|
|
1455
|
+
},
|
|
1456
|
+
null,
|
|
1457
|
+
2
|
|
1458
|
+
);
|
|
1449
1459
|
}
|
|
1450
1460
|
function serializeTimelineEvents() {
|
|
1451
1461
|
if (timelineEvents.length === 0) {
|