@zenfg/inspector 0.1.0-beta.1 → 0.1.0-beta.3
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 +143 -53
- package/dist/FrameGraphInspector.d.ts +2 -5
- package/dist/FrameGraphInspector.d.ts.map +1 -1
- package/dist/FrameGraphInspector.js +16 -38
- package/dist/FrameGraphInspector.js.map +1 -1
- package/dist/debugCaptureModel.d.ts +9 -4
- package/dist/debugCaptureModel.d.ts.map +1 -1
- package/dist/debugCaptureModel.js +36 -14
- package/dist/debugCaptureModel.js.map +1 -1
- package/dist/panelCytoscapeGraphRenderer.d.ts +3 -1
- package/dist/panelCytoscapeGraphRenderer.d.ts.map +1 -1
- package/dist/panelCytoscapeGraphRenderer.js +40 -19
- package/dist/panelCytoscapeGraphRenderer.js.map +1 -1
- package/dist/panelDiagnosticsView.js +2 -2
- package/dist/panelDiagnosticsView.js.map +1 -1
- package/dist/panelGraphLayout.d.ts.map +1 -1
- package/dist/panelGraphLayout.js +15 -1
- package/dist/panelGraphLayout.js.map +1 -1
- package/dist/panelGraphScene.d.ts +14 -26
- package/dist/panelGraphScene.d.ts.map +1 -1
- package/dist/panelGraphScene.js +141 -195
- package/dist/panelGraphScene.js.map +1 -1
- package/dist/panelGraphView.d.ts.map +1 -1
- package/dist/panelGraphView.js +31 -9
- package/dist/panelGraphView.js.map +1 -1
- package/dist/panelGraphVisuals.d.ts +7 -3
- package/dist/panelGraphVisuals.d.ts.map +1 -1
- package/dist/panelGraphVisuals.js +45 -80
- package/dist/panelGraphVisuals.js.map +1 -1
- package/dist/panelIcons.d.ts +1 -1
- package/dist/panelIcons.d.ts.map +1 -1
- package/dist/panelIcons.js +1 -0
- package/dist/panelIcons.js.map +1 -1
- package/dist/panelInspectorView.d.ts +5 -0
- package/dist/panelInspectorView.d.ts.map +1 -1
- package/dist/panelInspectorView.js +99 -13
- package/dist/panelInspectorView.js.map +1 -1
- package/dist/panelSelection.js +2 -2
- package/dist/panelSelection.js.map +1 -1
- package/dist/panelTypes.d.ts +8 -3
- package/dist/panelTypes.d.ts.map +1 -1
- package/dist/panelTypes.js.map +1 -1
- package/dist/panelVisualTheme.d.ts +21 -13
- package/dist/panelVisualTheme.d.ts.map +1 -1
- package/dist/panelVisualTheme.js +15 -7
- package/dist/panelVisualTheme.js.map +1 -1
- package/dist/panelWorkbenchHelpers.js +1 -1
- package/dist/panelWorkbenchHelpers.js.map +1 -1
- package/dist/panelWorkbenchView.d.ts.map +1 -1
- package/dist/panelWorkbenchView.js +2 -1
- package/dist/panelWorkbenchView.js.map +1 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +20 -12
- package/dist/styles.js.map +1 -1
- package/package.json +2 -2
- package/src/FrameGraphInspector.ts +17 -39
- package/src/debugCaptureModel.ts +44 -19
- package/src/panelCytoscapeGraphRenderer.ts +39 -18
- package/src/panelDiagnosticsView.ts +3 -3
- package/src/panelGraphLayout.ts +15 -1
- package/src/panelGraphScene.ts +153 -279
- package/src/panelGraphView.ts +31 -9
- package/src/panelGraphVisuals.ts +46 -82
- package/src/panelIcons.ts +2 -0
- package/src/panelInspectorView.ts +104 -16
- package/src/panelSelection.ts +2 -2
- package/src/panelTypes.ts +9 -3
- package/src/panelVisualTheme.ts +18 -7
- package/src/panelWorkbenchHelpers.ts +2 -2
- package/src/panelWorkbenchView.ts +2 -1
- package/src/styles.ts +20 -12
package/src/panelVisualTheme.ts
CHANGED
|
@@ -16,22 +16,33 @@ export const FRAME_GRAPH_DEBUG_VISUAL_THEME = {
|
|
|
16
16
|
fontMono: 'ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace',
|
|
17
17
|
} as const;
|
|
18
18
|
|
|
19
|
+
function category(stroke: string) {
|
|
20
|
+
const canvas = FRAME_GRAPH_DEBUG_VISUAL_THEME.canvas;
|
|
21
|
+
const fill = '#' + [1, 3, 5].map((offset) => Math.round(
|
|
22
|
+
parseInt(stroke.slice(offset, offset + 2), 16) * 0.18
|
|
23
|
+
+ parseInt(canvas.slice(offset, offset + 2), 16) * 0.82,
|
|
24
|
+
).toString(16).padStart(2, '0')).join('');
|
|
25
|
+
return { stroke, fill };
|
|
26
|
+
}
|
|
27
|
+
|
|
19
28
|
export const GRAPH_VISUAL_THEME = {
|
|
20
29
|
canvas: FRAME_GRAPH_DEBUG_VISUAL_THEME.canvas,
|
|
21
30
|
surface: FRAME_GRAPH_DEBUG_VISUAL_THEME.surface,
|
|
22
31
|
surfaceRaised: FRAME_GRAPH_DEBUG_VISUAL_THEME.surfaceRaised,
|
|
23
32
|
text: FRAME_GRAPH_DEBUG_VISUAL_THEME.text,
|
|
24
33
|
muted: FRAME_GRAPH_DEBUG_VISUAL_THEME.muted,
|
|
25
|
-
render:
|
|
26
|
-
compute:
|
|
27
|
-
copy:
|
|
28
|
-
clear:
|
|
29
|
-
command:
|
|
30
|
-
external:
|
|
34
|
+
render: category('#57C785'),
|
|
35
|
+
compute: category('#9AA5FF'),
|
|
36
|
+
copy: category('#F2CD60'),
|
|
37
|
+
clear: category('#C4CF89'),
|
|
38
|
+
command: category('#CF91E8'),
|
|
39
|
+
external: category('#F29A67'),
|
|
40
|
+
declaration: category('#B9AB94'),
|
|
41
|
+
output: category('#EC91AE'),
|
|
31
42
|
texture: { stroke: '#f472b6', fill: '#3c1f32' },
|
|
32
43
|
buffer: { stroke: '#2dd4bf', fill: '#123632' },
|
|
33
44
|
group: { stroke: '#64748b', fill: '#141c29', alternateFill: '#172033' },
|
|
34
|
-
dependency: { value: '#94a3b8', ordering: '#
|
|
45
|
+
dependency: { value: '#94a3b8', ordering: '#8593a6' },
|
|
35
46
|
access: { read: '#2dd4bf', write: '#f59e0b' },
|
|
36
47
|
selected: FRAME_GRAPH_DEBUG_VISUAL_THEME.accent,
|
|
37
48
|
hover: '#cbd5e1',
|
|
@@ -22,7 +22,7 @@ export function selectionKey(selection: Selection): string {
|
|
|
22
22
|
case 'node': return `node:${selection.id}`;
|
|
23
23
|
case 'group': return `group:${selection.pathKey}`;
|
|
24
24
|
case 'resource': return `resource:${selection.id}`;
|
|
25
|
-
case 'root': return `root:${selection.
|
|
25
|
+
case 'root': return `root:${selection.key}`;
|
|
26
26
|
case 'culled': return `culled:${selection.index}`;
|
|
27
27
|
case 'allocation': return `allocation:${selection.id}`;
|
|
28
28
|
case 'segment': return `segment:${selection.index}`;
|
|
@@ -161,7 +161,7 @@ export function createKindCell(kind: string, label = kind): HTMLTableCellElement
|
|
|
161
161
|
cell.appendChild(marker);
|
|
162
162
|
return cell;
|
|
163
163
|
}
|
|
164
|
-
|
|
164
|
+
|
|
165
165
|
export function groupPath(snapshot: FrameGraphDebugViewModel, groupId: string | undefined): string {
|
|
166
166
|
if (groupId === undefined) return '-';
|
|
167
167
|
return snapshot.groupById.get(groupId)?.path.join(' / ') ?? `group-${groupId}`;
|
|
@@ -173,7 +173,8 @@ export class FrameGraphDebugWorkbench {
|
|
|
173
173
|
this.exportMenu.setAttribute('role', 'menu');
|
|
174
174
|
this.exportMenu.hidden = true;
|
|
175
175
|
this.downloadButton.type = 'button';
|
|
176
|
-
this.downloadButton.
|
|
176
|
+
this.downloadButton.className = 'zenfg-inspector-download-action';
|
|
177
|
+
setPanelButtonContent(this.downloadButton, 'download', 'Download JSON');
|
|
177
178
|
this.downloadButton.setAttribute('role', 'menuitem');
|
|
178
179
|
this.downloadButton.addEventListener('click', () => {
|
|
179
180
|
this.setExportMenuOpen(false);
|
package/src/styles.ts
CHANGED
|
@@ -281,6 +281,9 @@ const FRAME_GRAPH_DEBUG_PANEL_CSS = `
|
|
|
281
281
|
}
|
|
282
282
|
.zenfg-inspector-export-menu[hidden] { display: none; }
|
|
283
283
|
.zenfg-inspector-export-menu > button {
|
|
284
|
+
display: flex;
|
|
285
|
+
align-items: center;
|
|
286
|
+
gap: 7px;
|
|
284
287
|
padding: 7px 9px;
|
|
285
288
|
border: 0;
|
|
286
289
|
border-radius: 4px;
|
|
@@ -288,6 +291,7 @@ const FRAME_GRAPH_DEBUG_PANEL_CSS = `
|
|
|
288
291
|
background: transparent;
|
|
289
292
|
font: 600 11px/1.2 var(--fgd-font-ui);
|
|
290
293
|
text-align: left;
|
|
294
|
+
white-space: nowrap;
|
|
291
295
|
cursor: pointer;
|
|
292
296
|
}
|
|
293
297
|
.zenfg-inspector-export-menu > button:hover:not(:disabled) {
|
|
@@ -593,7 +597,7 @@ button[aria-busy='true'] > .zenfg-inspector-control-icon {
|
|
|
593
597
|
.zenfg-inspector-graph-view { display: flex; flex-direction: column; }
|
|
594
598
|
.zenfg-inspector-graph-toolbar {
|
|
595
599
|
display: grid;
|
|
596
|
-
grid-template-columns:
|
|
600
|
+
grid-template-columns: minmax(0, 1fr) auto;
|
|
597
601
|
align-items: center;
|
|
598
602
|
gap: 10px;
|
|
599
603
|
min-width: 0;
|
|
@@ -602,18 +606,8 @@ button[aria-busy='true'] > .zenfg-inspector-control-icon {
|
|
|
602
606
|
border-bottom: 1px solid var(--fgd-border-subtle);
|
|
603
607
|
background: var(--fgd-surface);
|
|
604
608
|
}
|
|
605
|
-
.zenfg-inspector-graph-mode-controls,
|
|
606
609
|
.zenfg-inspector-graph-action-controls { display: flex; align-items: center; min-width: 0; }
|
|
607
610
|
.zenfg-inspector-graph-action-controls { gap: 4px; }
|
|
608
|
-
.zenfg-inspector-graph-toolbar .zenfg-inspector-mode-button {
|
|
609
|
-
margin-right: -1px;
|
|
610
|
-
border-radius: 0;
|
|
611
|
-
}
|
|
612
|
-
.zenfg-inspector-graph-toolbar .zenfg-inspector-mode-button:first-child { border-radius: 5px 0 0 5px; }
|
|
613
|
-
.zenfg-inspector-graph-toolbar .zenfg-inspector-mode-button:last-child {
|
|
614
|
-
margin-right: 0;
|
|
615
|
-
border-radius: 0 5px 5px 0;
|
|
616
|
-
}
|
|
617
611
|
.zenfg-inspector-graph-toolbar button.active,
|
|
618
612
|
.zenfg-inspector-graph-toolbar button[aria-pressed='true'] {
|
|
619
613
|
z-index: 1;
|
|
@@ -636,6 +630,9 @@ button[aria-busy='true'] > .zenfg-inspector-control-icon {
|
|
|
636
630
|
white-space: nowrap;
|
|
637
631
|
}
|
|
638
632
|
.zenfg-inspector-legend-item { display: inline-flex; align-items: center; gap: 4px; flex: 0 0 auto; }
|
|
633
|
+
.zenfg-inspector-legend-group { display: inline-flex; align-items: center; gap: 10px; flex: 0 0 auto; }
|
|
634
|
+
.zenfg-inspector-legend-group + .zenfg-inspector-legend-group { border-left: 1px solid var(--fgd-border-subtle); padding-left: 10px; }
|
|
635
|
+
.zenfg-inspector-legend-heading { color: var(--fgd-text-secondary); font-weight: 600; }
|
|
639
636
|
.zenfg-inspector-legend-swatch {
|
|
640
637
|
position: relative;
|
|
641
638
|
display: inline-block;
|
|
@@ -646,7 +643,15 @@ button[aria-busy='true'] > .zenfg-inspector-control-icon {
|
|
|
646
643
|
background: color-mix(in srgb, var(--zenfg-inspector-legend-color) 20%, var(--fgd-canvas));
|
|
647
644
|
}
|
|
648
645
|
.zenfg-inspector-legend-swatch[data-shape='ellipse'] { border-radius: 50%; }
|
|
649
|
-
.zenfg-inspector-legend-swatch[data-shape='group'] {
|
|
646
|
+
.zenfg-inspector-legend-swatch[data-shape='group'] { background: transparent; }
|
|
647
|
+
.zenfg-inspector-legend-swatch[data-shape='cut-rectangle'],
|
|
648
|
+
.zenfg-inspector-legend-swatch[data-shape='tag'] { width: 14px; height: 10px; border: 0; background: transparent; }
|
|
649
|
+
.zenfg-inspector-legend-swatch > svg { display: block; width: 100%; height: 100%; overflow: visible; }
|
|
650
|
+
.zenfg-inspector-legend-swatch > svg polygon {
|
|
651
|
+
fill: color-mix(in srgb, var(--zenfg-inspector-legend-color) 20%, var(--fgd-canvas));
|
|
652
|
+
stroke: var(--zenfg-inspector-legend-color);
|
|
653
|
+
stroke-width: 1.4;
|
|
654
|
+
}
|
|
650
655
|
.zenfg-inspector-legend-swatch[data-shape='line'] {
|
|
651
656
|
width: 16px;
|
|
652
657
|
height: 0;
|
|
@@ -739,6 +744,7 @@ button[aria-busy='true'] > .zenfg-inspector-control-icon {
|
|
|
739
744
|
.zenfg-inspector-graph-tooltip {
|
|
740
745
|
position: absolute;
|
|
741
746
|
z-index: 3;
|
|
747
|
+
width: max-content;
|
|
742
748
|
max-width: min(380px, calc(100% - 16px));
|
|
743
749
|
padding: 8px 10px;
|
|
744
750
|
border: 1px solid var(--fgd-border-strong);
|
|
@@ -830,6 +836,8 @@ button[aria-busy='true'] > .zenfg-inspector-control-icon {
|
|
|
830
836
|
overflow-wrap: anywhere;
|
|
831
837
|
white-space: normal;
|
|
832
838
|
}
|
|
839
|
+
.zenfg-inspector-relation-entry { display: grid; justify-items: start; gap: 2px; }
|
|
840
|
+
.zenfg-inspector-relation-entry > span { font: 11px/1.5 var(--fgd-font-mono); overflow-wrap: anywhere; }
|
|
833
841
|
.zenfg-inspector-inspector .zenfg-inspector-raw-detail {
|
|
834
842
|
min-width: 100%;
|
|
835
843
|
margin: 0;
|