@vpxa/aikit 0.1.162 → 0.1.164
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/package.json +1 -1
- package/packages/blocks-core/dist/index.d.ts +2 -1
- package/packages/blocks-core/dist/index.js +6 -3
- package/packages/present/dist/index.html +1 -1
- package/packages/server/dist/index.js +1 -1
- package/packages/server/dist/{server-DLkC-unR.js → server-BXHUbkn9.js} +2436 -42
- package/packages/server/viewers/c4-viewer.html +27 -36
- package/packages/server/viewers/canvas.html +63 -73
- package/packages/server/viewers/report-template.html +596 -31
- package/packages/server/viewers/task-plan-static.html +38 -35
- package/packages/server/viewers/tour-viewer.html +601 -50
- package/scaffold/dist/definitions/skills/c4-architecture.mjs +1 -1
- package/scaffold/dist/definitions/skills/docs.mjs +1 -1
- package/scaffold/dist/definitions/skills/present.mjs +1 -1
|
@@ -167,8 +167,8 @@
|
|
|
167
167
|
svg {
|
|
168
168
|
display: block;
|
|
169
169
|
width: 100%;
|
|
170
|
-
height:
|
|
171
|
-
min-height:
|
|
170
|
+
height: auto;
|
|
171
|
+
min-height: 600px;
|
|
172
172
|
}
|
|
173
173
|
|
|
174
174
|
.empty-state {
|
|
@@ -235,7 +235,7 @@
|
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
svg {
|
|
238
|
-
min-height:
|
|
238
|
+
min-height: 500px;
|
|
239
239
|
}
|
|
240
240
|
}
|
|
241
241
|
</style>
|
|
@@ -271,17 +271,17 @@
|
|
|
271
271
|
const themeButton = document.getElementById('theme-button');
|
|
272
272
|
const themes = ['auto', 'dark', 'light'];
|
|
273
273
|
const monoFont = '"JetBrains Mono", "SFMono-Regular", Consolas, ui-monospace, monospace';
|
|
274
|
-
const phaseGap =
|
|
275
|
-
const batchGap =
|
|
276
|
-
const taskGap =
|
|
277
|
-
const sequentialTaskGap =
|
|
278
|
-
const taskWidth =
|
|
279
|
-
const taskHeight =
|
|
280
|
-
const phaseHeaderHeight =
|
|
281
|
-
const canvasPadding =
|
|
282
|
-
const phasePaddingX =
|
|
283
|
-
const phasePaddingBottom =
|
|
284
|
-
const batchLabelHeight =
|
|
274
|
+
const phaseGap = 300;
|
|
275
|
+
const batchGap = 120;
|
|
276
|
+
const taskGap = 100;
|
|
277
|
+
const sequentialTaskGap = 140;
|
|
278
|
+
const taskWidth = 260;
|
|
279
|
+
const taskHeight = 88;
|
|
280
|
+
const phaseHeaderHeight = 72;
|
|
281
|
+
const canvasPadding = 80;
|
|
282
|
+
const phasePaddingX = 36;
|
|
283
|
+
const phasePaddingBottom = 44;
|
|
284
|
+
const batchLabelHeight = 32;
|
|
285
285
|
const phasePalette = [
|
|
286
286
|
'--dt-cyan',
|
|
287
287
|
'--tp-indigo',
|
|
@@ -531,9 +531,9 @@
|
|
|
531
531
|
}
|
|
532
532
|
|
|
533
533
|
function measureTask(task) {
|
|
534
|
-
const titleLines = wrapText(task.title || task.id,
|
|
535
|
-
const agentLines = wrapText(task.agent || 'Unassigned',
|
|
536
|
-
const height = taskHeight + Math.max(0, titleLines.length - 1) *
|
|
534
|
+
const titleLines = wrapText(task.title || task.id, 28, 2);
|
|
535
|
+
const agentLines = wrapText(task.agent || 'Unassigned', 24, 1);
|
|
536
|
+
const height = taskHeight + Math.max(0, titleLines.length - 1) * 20;
|
|
537
537
|
return {
|
|
538
538
|
width: taskWidth,
|
|
539
539
|
height,
|
|
@@ -579,59 +579,61 @@
|
|
|
579
579
|
function layout(model) {
|
|
580
580
|
const phaseLayouts = [];
|
|
581
581
|
const taskBoxes = new Map();
|
|
582
|
-
let
|
|
583
|
-
let
|
|
582
|
+
let currentY = canvasPadding;
|
|
583
|
+
let maxWidth = 0;
|
|
584
584
|
|
|
585
585
|
model.phases.forEach((phase, phaseIndex) => {
|
|
586
|
-
const phaseX =
|
|
587
|
-
const phaseY =
|
|
588
|
-
let
|
|
589
|
-
|
|
586
|
+
const phaseX = canvasPadding;
|
|
587
|
+
const phaseY = currentY;
|
|
588
|
+
let batchCursorX = phaseX + phasePaddingX;
|
|
589
|
+
const batchBaseY = phaseY + phaseHeaderHeight + 18;
|
|
590
590
|
let rightEdge = phaseX + 320;
|
|
591
|
+
let maxBatchBottom = batchBaseY;
|
|
591
592
|
const batchLayouts = [];
|
|
592
593
|
|
|
593
594
|
phase.batches.forEach((batch) => {
|
|
594
|
-
const batchLayout = layoutBatch(batch,
|
|
595
|
+
const batchLayout = layoutBatch(batch, batchCursorX, batchBaseY);
|
|
595
596
|
batchLayout.boxes.forEach((box) => {
|
|
596
597
|
taskBoxes.set(box.task.id, box);
|
|
597
598
|
});
|
|
598
599
|
batchLayouts.push({
|
|
599
600
|
batch,
|
|
600
|
-
x:
|
|
601
|
-
y:
|
|
601
|
+
x: batchCursorX,
|
|
602
|
+
y: batchBaseY,
|
|
602
603
|
width: batchLayout.width,
|
|
603
604
|
height: batchLayout.height,
|
|
604
605
|
boxes: batchLayout.boxes,
|
|
605
606
|
});
|
|
606
|
-
rightEdge = Math.max(rightEdge,
|
|
607
|
-
|
|
608
|
-
|
|
607
|
+
rightEdge = Math.max(rightEdge, batchCursorX + batchLayout.width + phasePaddingX);
|
|
608
|
+
maxBatchBottom = Math.max(maxBatchBottom, batchBaseY + batchLayout.height);
|
|
609
|
+
batchCursorX += Math.max(taskWidth, batchLayout.width) + batchGap;
|
|
609
610
|
});
|
|
610
611
|
|
|
612
|
+
const phaseWidth = Math.max(600, rightEdge - phaseX);
|
|
611
613
|
const phaseHeight = Math.max(
|
|
612
614
|
phaseHeaderHeight + 120,
|
|
613
|
-
|
|
615
|
+
maxBatchBottom - phaseY + phasePaddingBottom,
|
|
614
616
|
);
|
|
615
617
|
|
|
616
618
|
phaseLayouts.push({
|
|
617
619
|
phase,
|
|
618
620
|
x: phaseX,
|
|
619
621
|
y: phaseY,
|
|
620
|
-
width:
|
|
622
|
+
width: phaseWidth,
|
|
621
623
|
height: phaseHeight,
|
|
622
624
|
color: phaseColor(phaseIndex),
|
|
623
625
|
batches: batchLayouts,
|
|
624
626
|
});
|
|
625
627
|
|
|
626
|
-
|
|
627
|
-
|
|
628
|
+
maxWidth = Math.max(maxWidth, phaseX + phaseWidth + canvasPadding);
|
|
629
|
+
currentY += phaseHeight + phaseGap;
|
|
628
630
|
});
|
|
629
631
|
|
|
630
632
|
return {
|
|
631
633
|
phases: phaseLayouts,
|
|
632
634
|
taskBoxes,
|
|
633
|
-
width: Math.max(
|
|
634
|
-
height: Math.max(
|
|
635
|
+
width: Math.max(1200, maxWidth),
|
|
636
|
+
height: Math.max(600, currentY - phaseGap + canvasPadding),
|
|
635
637
|
};
|
|
636
638
|
}
|
|
637
639
|
|
|
@@ -1008,6 +1010,7 @@
|
|
|
1008
1010
|
const layoutResult = layout(model);
|
|
1009
1011
|
svg.innerHTML = '';
|
|
1010
1012
|
svg.setAttribute('viewBox', '0 0 ' + layoutResult.width + ' ' + layoutResult.height);
|
|
1013
|
+
svg.style.height = layoutResult.height + 'px';
|
|
1011
1014
|
svg.setAttribute('aria-label', model.title + ' with ' + totalTasks + ' tasks');
|
|
1012
1015
|
svg.appendChild(renderDefs());
|
|
1013
1016
|
svg.appendChild(node('title', { id: 'diagram-title' }, model.title || 'Task execution plan'));
|