@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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { GRAPH_VISUAL_THEME } from "./panelVisualTheme.js";
|
|
2
|
+
import { declarationEntrances } from "./debugCaptureModel.js";
|
|
2
3
|
export { GRAPH_VISUAL_THEME } from "./panelVisualTheme.js";
|
|
3
4
|
export const GRAPH_GEOMETRY = {
|
|
4
5
|
fitPadding: 28,
|
|
@@ -10,6 +11,8 @@ export const GRAPH_GEOMETRY = {
|
|
|
10
11
|
groupPadding: 32,
|
|
11
12
|
elkGroupPadding: { top: 46, right: 24, bottom: 24, left: 24 },
|
|
12
13
|
edgeCornerRadius: 6,
|
|
14
|
+
outputWidth: 256,
|
|
15
|
+
outputLabelWidth: 144,
|
|
13
16
|
};
|
|
14
17
|
const ENDPOINT_EDGE_DISTANCES = 'endpoints';
|
|
15
18
|
const EDGE_SEGMENT_RADII = `${GRAPH_GEOMETRY.edgeCornerRadius}px`;
|
|
@@ -19,50 +22,39 @@ const NODE_LEGEND_ENTRIES = {
|
|
|
19
22
|
copy: nodeLegend('copy', 'Copy', GRAPH_VISUAL_THEME.copy.stroke),
|
|
20
23
|
'clear-buffer': nodeLegend('clear', 'Clear', GRAPH_VISUAL_THEME.clear.stroke),
|
|
21
24
|
command: nodeLegend('command', 'Command', GRAPH_VISUAL_THEME.command.stroke),
|
|
22
|
-
'external-submission': nodeLegend('external', 'External', GRAPH_VISUAL_THEME.external.stroke),
|
|
25
|
+
'external-submission': { ...nodeLegend('external', 'External', GRAPH_VISUAL_THEME.external.stroke), shape: 'cut-rectangle' },
|
|
23
26
|
};
|
|
24
|
-
export function createGraphLegend(
|
|
27
|
+
export function createGraphLegend(snapshot) {
|
|
25
28
|
const entries = [];
|
|
26
|
-
const passKinds = new Set(
|
|
27
|
-
? [node.passKind]
|
|
28
|
-
: []));
|
|
29
|
+
const passKinds = new Set(snapshot.nodes.map((node) => node.kind));
|
|
29
30
|
for (const kind of ['render', 'compute', 'copy', 'clear-buffer', 'command', 'external-submission']) {
|
|
30
31
|
if (passKinds.has(kind))
|
|
31
32
|
entries.push(NODE_LEGEND_ENTRIES[kind]);
|
|
32
33
|
}
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
const retained = new Set(snapshot.nodes.map((node) => node.id));
|
|
35
|
+
const used = new Set([
|
|
36
|
+
...snapshot.accessEdges.filter((access) => retained.has(access.nodeId)).map((access) => access.resource.id),
|
|
37
|
+
...snapshot.roots.flatMap((root) => root.resource ? [root.resource.id] : []),
|
|
38
|
+
]);
|
|
39
|
+
const resources = snapshot.resources.filter((resource) => used.has(resource.id));
|
|
40
|
+
if (resources.length)
|
|
41
|
+
entries.push({ group: 'Resources', key: 'declaration', label: 'Declaration', color: GRAPH_VISUAL_THEME.declaration.stroke, shape: 'ellipse' });
|
|
42
|
+
if (snapshot.roots.some((root) => root.resource))
|
|
43
|
+
entries.push({ group: 'Resources', key: 'output', label: 'Output', color: GRAPH_VISUAL_THEME.output.stroke, shape: 'tag' });
|
|
44
|
+
if ([...snapshot.nodes, ...resources].some((item) => item.debugGroupId !== undefined)) {
|
|
45
|
+
entries.push({ group: 'Relationships', key: 'group', label: 'Group', color: GRAPH_VISUAL_THEME.group.stroke, shape: 'group' });
|
|
35
46
|
}
|
|
36
|
-
if (
|
|
37
|
-
|
|
47
|
+
if (snapshot.edges.some((edge) => edge.kind === 'value')
|
|
48
|
+
|| declarationEntrances(snapshot.nodes, snapshot.accessEdges, snapshot.edges).length
|
|
49
|
+
|| snapshot.roots.some((root) => root.resource && root.resolution && (root.resolution.usesInitialContents || root.resolution.producerNodeIds.length))) {
|
|
50
|
+
entries.push(edgeLegend('flow', 'Resource Flow', GRAPH_VISUAL_THEME.dependency.value, 'solid'));
|
|
38
51
|
}
|
|
39
|
-
if (
|
|
40
|
-
entries.push({ key: 'buffer', label: 'Buffer', color: GRAPH_VISUAL_THEME.buffer.stroke, shape: 'ellipse' });
|
|
41
|
-
}
|
|
42
|
-
if (scene.nodes.some((node) => node.kind === 'culled-pass')) {
|
|
43
|
-
entries.push({
|
|
44
|
-
key: 'culled',
|
|
45
|
-
label: 'Culled',
|
|
46
|
-
color: GRAPH_VISUAL_THEME.culled.stroke,
|
|
47
|
-
shape: 'box',
|
|
48
|
-
lineStyle: 'dashed',
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
if (scene.edges.some((edge) => edge.kind === 'dependency' && edge.dependencyKind === 'value')) {
|
|
52
|
-
entries.push(edgeLegend('value', 'Value', GRAPH_VISUAL_THEME.dependency.value, 'solid'));
|
|
53
|
-
}
|
|
54
|
-
if (scene.edges.some((edge) => edge.kind === 'dependency' && edge.dependencyKind === 'ordering')) {
|
|
52
|
+
if (snapshot.edges.some((edge) => edge.kind === 'ordering')) {
|
|
55
53
|
entries.push({
|
|
56
54
|
...edgeLegend('ordering', 'Order', GRAPH_VISUAL_THEME.dependency.ordering, 'dotted'),
|
|
57
55
|
hollowArrow: true,
|
|
58
56
|
});
|
|
59
57
|
}
|
|
60
|
-
if (scene.edges.some((edge) => edge.kind === 'access' && edge.accessMode === 'read')) {
|
|
61
|
-
entries.push(edgeLegend('read', 'Read', GRAPH_VISUAL_THEME.access.read, 'solid'));
|
|
62
|
-
}
|
|
63
|
-
if (scene.edges.some((edge) => edge.kind === 'access' && edge.accessMode === 'write')) {
|
|
64
|
-
entries.push(edgeLegend('write', 'Write', GRAPH_VISUAL_THEME.access.write, 'solid'));
|
|
65
|
-
}
|
|
66
58
|
return entries;
|
|
67
59
|
}
|
|
68
60
|
export function createGraphStyles() {
|
|
@@ -84,6 +76,7 @@ export function createGraphStyles() {
|
|
|
84
76
|
'background-color': theme.surfaceRaised,
|
|
85
77
|
'border-color': theme.group.stroke,
|
|
86
78
|
'border-width': 1.25,
|
|
79
|
+
'border-style': 'solid',
|
|
87
80
|
'text-valign': 'center',
|
|
88
81
|
'text-halign': 'center',
|
|
89
82
|
'overlay-opacity': 0,
|
|
@@ -100,34 +93,27 @@ export function createGraphStyles() {
|
|
|
100
93
|
style: {
|
|
101
94
|
'background-color': theme.external.fill,
|
|
102
95
|
'border-color': theme.external.stroke,
|
|
103
|
-
'
|
|
104
|
-
'
|
|
105
|
-
},
|
|
106
|
-
},
|
|
107
|
-
{
|
|
108
|
-
selector: 'node[kind = "culled-pass"]',
|
|
109
|
-
style: {
|
|
110
|
-
'background-color': theme.culled.fill,
|
|
111
|
-
'border-color': theme.culled.stroke,
|
|
112
|
-
'color': theme.muted,
|
|
113
|
-
'border-style': 'dashed',
|
|
114
|
-
'opacity': 0.72,
|
|
96
|
+
'shape': 'cut-rectangle',
|
|
97
|
+
'corner-radius': '10px',
|
|
115
98
|
},
|
|
116
99
|
},
|
|
117
100
|
{
|
|
118
|
-
selector: 'node[kind = "resource"]
|
|
101
|
+
selector: 'node[kind = "resource"]',
|
|
119
102
|
style: {
|
|
120
103
|
'shape': 'ellipse',
|
|
121
|
-
'background-color': theme.
|
|
122
|
-
'border-color': theme.
|
|
104
|
+
'background-color': theme.declaration.fill,
|
|
105
|
+
'border-color': theme.declaration.stroke,
|
|
123
106
|
},
|
|
124
107
|
},
|
|
125
108
|
{
|
|
126
|
-
selector: 'node[kind = "
|
|
109
|
+
selector: 'node[kind = "root"]',
|
|
127
110
|
style: {
|
|
128
|
-
'shape': '
|
|
129
|
-
'background-color': theme.
|
|
130
|
-
'border-color': theme.
|
|
111
|
+
'shape': 'tag',
|
|
112
|
+
'background-color': theme.output.fill,
|
|
113
|
+
'border-color': theme.output.stroke,
|
|
114
|
+
'text-max-width': `${GRAPH_GEOMETRY.outputLabelWidth}px`,
|
|
115
|
+
// Native tag shoulders sit at 5/8 of its width. Center text in the rectangular body.
|
|
116
|
+
'text-margin-x': -GRAPH_GEOMETRY.outputWidth * 3 / 16,
|
|
131
117
|
},
|
|
132
118
|
},
|
|
133
119
|
{
|
|
@@ -178,7 +164,7 @@ export function createGraphStyles() {
|
|
|
178
164
|
},
|
|
179
165
|
},
|
|
180
166
|
{
|
|
181
|
-
selector: 'edge[
|
|
167
|
+
selector: 'edge[kind = "ordering"]',
|
|
182
168
|
style: {
|
|
183
169
|
'line-color': theme.dependency.ordering,
|
|
184
170
|
'target-arrow-color': theme.dependency.ordering,
|
|
@@ -187,24 +173,6 @@ export function createGraphStyles() {
|
|
|
187
173
|
'line-opacity': 0.72,
|
|
188
174
|
},
|
|
189
175
|
},
|
|
190
|
-
{
|
|
191
|
-
selector: 'edge[accessMode = "read"]',
|
|
192
|
-
style: {
|
|
193
|
-
'line-color': theme.access.read,
|
|
194
|
-
'target-arrow-color': theme.access.read,
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
{
|
|
198
|
-
selector: 'edge[accessMode = "write"]',
|
|
199
|
-
style: {
|
|
200
|
-
'line-color': theme.access.write,
|
|
201
|
-
'target-arrow-color': theme.access.write,
|
|
202
|
-
},
|
|
203
|
-
},
|
|
204
|
-
{
|
|
205
|
-
selector: 'edge[dashed = 1]',
|
|
206
|
-
style: { 'line-style': 'dashed', 'line-opacity': 0.46, 'opacity': 0.58 },
|
|
207
|
-
},
|
|
208
176
|
{
|
|
209
177
|
selector: 'edge.elk-route',
|
|
210
178
|
style: {
|
|
@@ -245,9 +213,6 @@ export function createGraphStyles() {
|
|
|
245
213
|
style: {
|
|
246
214
|
'border-color': theme.selected,
|
|
247
215
|
'border-width': 3,
|
|
248
|
-
'underlay-color': theme.selected,
|
|
249
|
-
'underlay-padding': 5,
|
|
250
|
-
'underlay-opacity': 0.18,
|
|
251
216
|
'opacity': 1,
|
|
252
217
|
'z-index': 20,
|
|
253
218
|
},
|
|
@@ -268,10 +233,10 @@ export function nodeDimensions(node) {
|
|
|
268
233
|
switch (node.kind) {
|
|
269
234
|
case 'pass':
|
|
270
235
|
return { width: 184, height: node.label.includes('\n') ? 62 : 48 };
|
|
271
|
-
case '
|
|
272
|
-
return { width:
|
|
236
|
+
case 'root':
|
|
237
|
+
return { width: GRAPH_GEOMETRY.outputWidth, height: Math.max(58, node.label.split('\n').length * 17 + 24) };
|
|
273
238
|
case 'resource':
|
|
274
|
-
return { width:
|
|
239
|
+
return { width: 184, height: Math.max(58, node.label.split('\n').length * 17 + 24) };
|
|
275
240
|
case 'group':
|
|
276
241
|
return node.collapsed ? { width: 224, height: 68 } : { width: 120, height: 80 };
|
|
277
242
|
}
|
|
@@ -281,12 +246,12 @@ export function graphLayoutGeometryKey(scene) {
|
|
|
281
246
|
topology: scene.topologyKey,
|
|
282
247
|
dimensions: scene.nodes.map((node) => {
|
|
283
248
|
const dimensions = nodeDimensions(node);
|
|
284
|
-
return [node.id, dimensions.width, dimensions.height];
|
|
249
|
+
return [node.id, dimensions.width, dimensions.height, node.kind === 'pass' && node.passKind === 'external-submission'];
|
|
285
250
|
}),
|
|
286
251
|
});
|
|
287
252
|
}
|
|
288
|
-
export function graphEdgeDisplayLabel(
|
|
289
|
-
return
|
|
253
|
+
export function graphEdgeDisplayLabel(_edge) {
|
|
254
|
+
return '';
|
|
290
255
|
}
|
|
291
256
|
export function expandedGroupLabelMaxWidth(outerWidth) {
|
|
292
257
|
return Math.max(80, Math.floor(outerWidth - GRAPH_GEOMETRY.groupTitleInset * 2));
|
|
@@ -295,10 +260,10 @@ export function isOverviewGraphScale(zoom) {
|
|
|
295
260
|
return GRAPH_GEOMETRY.baseFontSize * zoom < GRAPH_GEOMETRY.overviewFontThreshold;
|
|
296
261
|
}
|
|
297
262
|
function nodeLegend(key, label, color) {
|
|
298
|
-
return { key, label, color, shape: 'box' };
|
|
263
|
+
return { group: 'Execution', key, label, color, shape: 'box' };
|
|
299
264
|
}
|
|
300
265
|
function edgeLegend(key, label, color, lineStyle) {
|
|
301
|
-
return { key, label, color, shape: 'line', lineStyle };
|
|
266
|
+
return { group: 'Relationships', key, label, color, shape: 'line', lineStyle };
|
|
302
267
|
}
|
|
303
268
|
function passStyle(kind, colors) {
|
|
304
269
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelGraphVisuals.js","sourceRoot":"","sources":["../src/panelGraphVisuals.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,EAAE;IAChB,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,CAAC;IACxB,eAAe,EAAE,CAAC;IAClB,oBAAoB,EAAE,GAAG;IACzB,YAAY,EAAE,EAAE;IAChB,eAAe,EAAE,EAAE,GAAG,EAAE,EAAE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,MAAM,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;KAC5E,CAAC;AACN,CAAC;AAED,SAAS,kBAAkB,CAAC,eAAuB;IAC/C,MAAM,QAAQ,GAAG,cAAc,CAAC;IAChC,OAAO;QACH,kBAAkB,EAAE,eAAe;QACnC,oBAAoB,EAAE,IAAI;QAC1B,cAAc,EAAE,kBAAkB,CAAC,KAAK,CAAC,MAAM;QAC/C,cAAc,EAAE,GAAG;QACnB,SAAS,EAAE,GAAG,QAAQ,CAAC,YAAY,IAAI;QACvC,4BAA4B,EAAE,SAAS;QACvC,WAAW,EAAE,OAAO;QACpB,YAAY,EAAE,MAAM;QACpB,aAAa,EAAE,YAAY;QAC3B,aAAa,EAAE,aAAa;QAC5B,oBAAoB,EAAE,MAAM;QAC5B,eAAe,EAAE,QAAQ,CAAC,eAAe,GAAG,QAAQ,CAAC,YAAY,GAAG,CAAC;QACrE,eAAe,EAAE,QAAQ,CAAC,eAAe,GAAG,QAAQ,CAAC,YAAY,GAAG,CAAC;QACrE,aAAa,EAAE,QAAQ,CAAC,oBAAoB;QAC5C,OAAO,EAAE,kBAAkB,CAAC,IAAI;QAChC,aAAa,EAAE,GAAG;KACrB,CAAC;AACN,CAAC","sourcesContent":["import type cytoscape from 'cytoscape';\n\nimport type { GraphScene, GraphSceneEdge, GraphSceneNode } from './panelGraphScene.ts';\nimport { GRAPH_VISUAL_THEME } from './panelVisualTheme.ts';\n\nexport { GRAPH_VISUAL_THEME } from './panelVisualTheme.ts';\n\n\nexport const GRAPH_GEOMETRY = {\n fitPadding: 28,\n baseFontSize: 13,\n overviewFontThreshold: 9,\n minimumZoomedFontSize: 5,\n groupTitleInset: 8,\n groupTitleLineHeight: 1.2,\n groupPadding: 32,\n elkGroupPadding: { top: 46, right: 24, bottom: 24, left: 24 },\n edgeCornerRadius: 6,\n} as const;\n\nconst ENDPOINT_EDGE_DISTANCES = 'endpoints' as unknown as cytoscape.Css.Edge['edge-distances'];\nconst EDGE_SEGMENT_RADII = `${GRAPH_GEOMETRY.edgeCornerRadius}px` as unknown as cytoscape.Css.Edge['segment-radii'];\n\nexport type GraphLegendEntry = {\n readonly key: string;\n readonly label: string;\n readonly color: string;\n readonly shape: 'box' | 'ellipse' | 'group' | 'line';\n readonly lineStyle?: 'solid' | 'dotted' | 'dashed';\n readonly hollowArrow?: boolean;\n};\n\nconst NODE_LEGEND_ENTRIES = {\n render: nodeLegend('render', 'Render', GRAPH_VISUAL_THEME.render.stroke),\n compute: nodeLegend('compute', 'Compute', GRAPH_VISUAL_THEME.compute.stroke),\n copy: nodeLegend('copy', 'Copy', GRAPH_VISUAL_THEME.copy.stroke),\n 'clear-buffer': nodeLegend('clear', 'Clear', GRAPH_VISUAL_THEME.clear.stroke),\n command: nodeLegend('command', 'Command', GRAPH_VISUAL_THEME.command.stroke),\n 'external-submission': nodeLegend('external', 'External', GRAPH_VISUAL_THEME.external.stroke),\n} as const;\n\nexport function createGraphLegend(scene: GraphScene): readonly GraphLegendEntry[] {\n const entries: GraphLegendEntry[] = [];\n const passKinds = new Set(scene.nodes.flatMap((node) => node.kind === 'pass' || node.kind === 'culled-pass'\n ? [node.passKind]\n : []));\n for (const kind of ['render', 'compute', 'copy', 'clear-buffer', 'command', 'external-submission'] as const) {\n if (passKinds.has(kind)) entries.push(NODE_LEGEND_ENTRIES[kind]);\n }\n if (scene.nodes.some((node) => node.kind === 'group')) {\n entries.push({ key: 'group', label: 'Group', color: GRAPH_VISUAL_THEME.group.stroke, shape: 'group' });\n }\n if (scene.nodes.some((node) => node.kind === 'resource' && node.resourceKind === 'texture')) {\n entries.push({ key: 'texture', label: 'Texture', color: GRAPH_VISUAL_THEME.texture.stroke, shape: 'ellipse' });\n }\n if (scene.nodes.some((node) => node.kind === 'resource' && node.resourceKind === 'buffer')) {\n entries.push({ key: 'buffer', label: 'Buffer', color: GRAPH_VISUAL_THEME.buffer.stroke, shape: 'ellipse' });\n }\n if (scene.nodes.some((node) => node.kind === 'culled-pass')) {\n entries.push({\n key: 'culled',\n label: 'Culled',\n color: GRAPH_VISUAL_THEME.culled.stroke,\n shape: 'box',\n lineStyle: 'dashed',\n });\n }\n if (scene.edges.some((edge) => edge.kind === 'dependency' && edge.dependencyKind === 'value')) {\n entries.push(edgeLegend('value', 'Value', GRAPH_VISUAL_THEME.dependency.value, 'solid'));\n }\n if (scene.edges.some((edge) => edge.kind === 'dependency' && edge.dependencyKind === 'ordering')) {\n entries.push({\n ...edgeLegend('ordering', 'Order', GRAPH_VISUAL_THEME.dependency.ordering, 'dotted'),\n hollowArrow: true,\n });\n }\n if (scene.edges.some((edge) => edge.kind === 'access' && edge.accessMode === 'read')) {\n entries.push(edgeLegend('read', 'Read', GRAPH_VISUAL_THEME.access.read, 'solid'));\n }\n if (scene.edges.some((edge) => edge.kind === 'access' && edge.accessMode === 'write')) {\n entries.push(edgeLegend('write', 'Write', GRAPH_VISUAL_THEME.access.write, 'solid'));\n }\n return entries;\n}\n\nexport function createGraphStyles(): cytoscape.StylesheetJson {\n const theme = GRAPH_VISUAL_THEME;\n return [\n {\n selector: 'node',\n style: {\n 'shape': 'round-rectangle',\n 'width': 'data(width)',\n 'height': 'data(height)',\n 'label': 'data(displayLabel)',\n 'text-wrap': 'wrap',\n 'text-max-width': '160px',\n 'font-family': 'ui-monospace, SFMono-Regular, Consolas, Liberation Mono, monospace',\n 'font-size': GRAPH_GEOMETRY.baseFontSize,\n 'min-zoomed-font-size': GRAPH_GEOMETRY.minimumZoomedFontSize,\n 'color': theme.text,\n 'background-color': theme.surfaceRaised,\n 'border-color': theme.group.stroke,\n 'border-width': 1.25,\n 'text-valign': 'center',\n 'text-halign': 'center',\n 'overlay-opacity': 0,\n 'underlay-opacity': 0,\n },\n },\n passStyle('render', theme.render),\n passStyle('compute', theme.compute),\n passStyle('copy', theme.copy),\n passStyle('clear-buffer', theme.clear),\n passStyle('command', theme.command),\n {\n selector: 'node[passKind = \"external-submission\"]',\n style: {\n 'background-color': theme.external.fill,\n 'border-color': theme.external.stroke,\n 'border-style': 'double',\n 'border-width': 3,\n },\n },\n {\n selector: 'node[kind = \"culled-pass\"]',\n style: {\n 'background-color': theme.culled.fill,\n 'border-color': theme.culled.stroke,\n 'color': theme.muted,\n 'border-style': 'dashed',\n 'opacity': 0.72,\n },\n },\n {\n selector: 'node[kind = \"resource\"][resourceKind = \"texture\"]',\n style: {\n 'shape': 'ellipse',\n 'background-color': theme.texture.fill,\n 'border-color': theme.texture.stroke,\n },\n },\n {\n selector: 'node[kind = \"resource\"][resourceKind = \"buffer\"]',\n style: {\n 'shape': 'ellipse',\n 'background-color': theme.buffer.fill,\n 'border-color': theme.buffer.stroke,\n },\n },\n {\n selector: 'node[kind = \"group\"]',\n style: {\n 'text-max-width': (element: cytoscape.SingularElementArgument) => `${element.data('labelMaxWidth') as number}px`,\n },\n },\n {\n selector: 'node[kind = \"group\"][collapsed = 1]',\n style: {\n 'background-color': theme.group.fill,\n 'border-color': theme.group.stroke,\n 'border-width': 2,\n 'color': theme.text,\n },\n },\n {\n selector: 'node[kind = \"group\"][collapsed = 0]',\n style: expandedGroupStyle(theme.group.fill),\n },\n {\n selector: 'node[kind = \"group\"][collapsed = 0][depthBand = 1]',\n style: { 'background-color': theme.group.alternateFill },\n },\n {\n selector: 'edge',\n style: {\n 'width': 1.5,\n 'line-color': theme.dependency.value,\n 'line-opacity': 0.82,\n 'target-arrow-color': theme.dependency.value,\n 'target-arrow-shape': 'triangle',\n 'target-arrow-fill': 'filled',\n 'arrow-scale': 0.8,\n 'curve-style': 'straight',\n 'label': 'data(displayLabel)',\n 'font-family': 'ui-monospace, SFMono-Regular, Consolas, Liberation Mono, monospace',\r\n 'font-size': 10,\n 'min-zoomed-font-size': GRAPH_GEOMETRY.minimumZoomedFontSize,\n 'color': theme.text,\n 'text-background-color': theme.canvas,\n 'text-background-opacity': 0.82,\n 'text-background-padding': '2px',\n 'text-rotation': 'autorotate',\n 'overlay-opacity': 0,\n 'underlay-opacity': 0,\n },\n },\n {\n selector: 'edge[dependencyKind = \"ordering\"]',\n style: {\n 'line-color': theme.dependency.ordering,\n 'target-arrow-color': theme.dependency.ordering,\n 'line-style': 'dotted',\n 'target-arrow-fill': 'hollow',\n 'line-opacity': 0.72,\n },\n },\n {\n selector: 'edge[accessMode = \"read\"]',\n style: {\n 'line-color': theme.access.read,\n 'target-arrow-color': theme.access.read,\n },\n },\n {\n selector: 'edge[accessMode = \"write\"]',\n style: {\n 'line-color': theme.access.write,\n 'target-arrow-color': theme.access.write,\n },\n },\n {\n selector: 'edge[dashed = 1]',\n style: { 'line-style': 'dashed', 'line-opacity': 0.46, 'opacity': 0.58 },\n },\n {\n selector: 'edge.elk-route',\n style: {\n 'source-endpoint': 'data(sourceEndpoint)',\n 'target-endpoint': 'data(targetEndpoint)',\n 'edge-distances': ENDPOINT_EDGE_DISTANCES,\n },\n },\n {\n selector: 'edge.elk-segments',\n style: {\n 'curve-style': 'round-segments',\n 'segment-distances': 'data(segmentDistances)',\n 'segment-weights': 'data(segmentWeights)',\n 'segment-radii': EDGE_SEGMENT_RADII,\n },\n },\n {\n selector: 'node.semantic-hover',\n style: {\n 'border-color': theme.hover,\n 'border-width': 2,\n 'z-index': 15,\n },\n },\n {\n selector: 'edge.semantic-hover',\n style: {\n 'line-color': theme.hover,\n 'target-arrow-color': theme.hover,\n 'line-opacity': 1,\n 'width': 2.5,\n 'z-index': 15,\n },\n },\n {\n selector: 'node.semantic-selected',\n style: {\n 'border-color': theme.selected,\n 'border-width': 3,\n 'underlay-color': theme.selected,\n 'underlay-padding': 5,\n 'underlay-opacity': 0.18,\n 'opacity': 1,\n 'z-index': 20,\n },\n },\n {\n selector: 'edge.semantic-selected',\n style: {\n 'line-color': theme.selected,\n 'target-arrow-color': theme.selected,\n 'line-opacity': 1,\n 'width': 3,\n 'z-index': 20,\n },\n },\n ];\n}\n\nexport function nodeDimensions(node: GraphSceneNode): { readonly width: number; readonly height: number } {\n switch (node.kind) {\n case 'pass':\n return { width: 184, height: node.label.includes('\\n') ? 62 : 48 };\n case 'culled-pass':\n return { width: 184, height: 64 };\n case 'resource':\n return { width: 166, height: node.label.includes('\\n') ? 58 : 46 };\n case 'group':\n return node.collapsed ? { width: 224, height: 68 } : { width: 120, height: 80 };\n }\n}\n\nexport function graphLayoutGeometryKey(scene: GraphScene): string {\n return JSON.stringify({\n topology: scene.topologyKey,\n dimensions: scene.nodes.map((node) => {\n const dimensions = nodeDimensions(node);\n return [node.id, dimensions.width, dimensions.height];\n }),\n });\n}\n\nexport function graphEdgeDisplayLabel(edge: GraphSceneEdge): string {\n return edge.kind === 'access' ? '' : edge.label ?? '';\n}\n\nexport function expandedGroupLabelMaxWidth(outerWidth: number): number {\n return Math.max(80, Math.floor(outerWidth - GRAPH_GEOMETRY.groupTitleInset * 2));\n}\n\nexport function isOverviewGraphScale(zoom: number): boolean {\n return GRAPH_GEOMETRY.baseFontSize * zoom < GRAPH_GEOMETRY.overviewFontThreshold;\n}\n\nfunction nodeLegend(key: string, label: string, color: string): GraphLegendEntry {\n return { key, label, color, shape: 'box' };\n}\n\nfunction edgeLegend(\n key: string,\n label: string,\n color: string,\n lineStyle: NonNullable<GraphLegendEntry['lineStyle']>,\n): GraphLegendEntry {\n return { key, label, color, shape: 'line', lineStyle };\n}\n\nfunction passStyle(\n kind: string,\n colors: { readonly stroke: string; readonly fill: string },\n): cytoscape.StylesheetStyle {\n return {\n selector: `node[passKind = \"${kind}\"]`,\n style: { 'background-color': colors.fill, 'border-color': colors.stroke },\n };\n}\n\nfunction expandedGroupStyle(backgroundColor: string): cytoscape.Css.Node {\n const geometry = GRAPH_GEOMETRY;\n return {\n 'background-color': backgroundColor,\n 'background-opacity': 0.34,\n 'border-color': GRAPH_VISUAL_THEME.group.stroke,\n 'border-width': 1.5,\n 'padding': `${geometry.groupPadding}px`,\n 'compound-sizing-wrt-labels': 'include',\n 'min-width': '120px',\n 'min-height': '80px',\n 'text-valign': 'top-inside',\n 'text-halign': 'left-inside',\n 'text-justification': 'left',\n 'text-margin-x': geometry.groupTitleInset - geometry.groupPadding * 2,\n 'text-margin-y': geometry.groupTitleInset - geometry.groupPadding * 2,\n 'line-height': geometry.groupTitleLineHeight,\n 'color': GRAPH_VISUAL_THEME.text,\n 'font-weight': 600,\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"panelGraphVisuals.js","sourceRoot":"","sources":["../src/panelGraphVisuals.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,oBAAoB,EAAiC,MAAM,wBAAwB,CAAC;AAE7F,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAG3D,MAAM,CAAC,MAAM,cAAc,GAAG;IAC1B,UAAU,EAAE,EAAE;IACd,YAAY,EAAE,EAAE;IAChB,qBAAqB,EAAE,CAAC;IACxB,qBAAqB,EAAE,CAAC;IACxB,eAAe,EAAE,CAAC;IAClB,oBAAoB,EAAE,GAAG;IACzB,YAAY,EAAE,EAAE;IAChB,eAAe,EAAE,EAAE,GAAG,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE;IAC7D,gBAAgB,EAAE,CAAC;IACnB,WAAW,EAAE,GAAG;IAChB,gBAAgB,EAAE,GAAG;CACf,CAAC;AAEX,MAAM,uBAAuB,GAAG,WAA8D,CAAC;AAC/F,MAAM,kBAAkB,GAAG,GAAG,cAAc,CAAC,gBAAgB,IAAsD,CAAC;AAYpH,MAAM,mBAAmB,GAAG;IACxB,MAAM,EAAE,UAAU,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,CAAC,MAAM,CAAC,MAAM,CAAC;IACxE,OAAO,EAAE,UAAU,CAAC,SAAS,EAAE,SAAS,EAAE,kBAAkB,CAAC,OAAO,CAAC,MAAM,CAAC;IAC5E,IAAI,EAAE,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,kBAAkB,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E,MAAM,EAAE,SAAS,EAAE,CAAC;AACnF,CAAC;AAED,SAAS,SAAS,CACd,IAAY,EACZ,MAA0D;IAE1D,OAAO;QACH,QAAQ,EAAE,oBAAoB,IAAI,IAAI;QACtC,KAAK,EAAE,EAAE,kBAAkB,EAAE,MAAM,CAAC,IAAI,EAAE,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE;KAC5E,CAAC;AACN,CAAC;AAED,SAAS,kBAAkB,CAAC,eAAuB;IAC/C,MAAM,QAAQ,GAAG,cAAc,CAAC;IAChC,OAAO;QACH,kBAAkB,EAAE,eAAe;QACnC,oBAAoB,EAAE,IAAI;QAC1B,cAAc,EAAE,kBAAkB,CAAC,KAAK,CAAC,MAAM;QAC/C,cAAc,EAAE,GAAG;QACnB,SAAS,EAAE,GAAG,QAAQ,CAAC,YAAY,IAAI;QACvC,4BAA4B,EAAE,SAAS;QACvC,WAAW,EAAE,OAAO;QACpB,YAAY,EAAE,MAAM;QACpB,aAAa,EAAE,YAAY;QAC3B,aAAa,EAAE,aAAa;QAC5B,oBAAoB,EAAE,MAAM;QAC5B,eAAe,EAAE,QAAQ,CAAC,eAAe,GAAG,QAAQ,CAAC,YAAY,GAAG,CAAC;QACrE,eAAe,EAAE,QAAQ,CAAC,eAAe,GAAG,QAAQ,CAAC,YAAY,GAAG,CAAC;QACrE,aAAa,EAAE,QAAQ,CAAC,oBAAoB;QAC5C,OAAO,EAAE,kBAAkB,CAAC,IAAI;QAChC,aAAa,EAAE,GAAG;KACrB,CAAC;AACN,CAAC","sourcesContent":["import type cytoscape from 'cytoscape';\n\nimport type { GraphScene, GraphSceneEdge, GraphSceneNode } from './panelGraphScene.ts';\nimport { GRAPH_VISUAL_THEME } from './panelVisualTheme.ts';\nimport { declarationEntrances, type FrameGraphDebugViewModel } from './debugCaptureModel.ts';\n\nexport { GRAPH_VISUAL_THEME } from './panelVisualTheme.ts';\n\n\nexport const GRAPH_GEOMETRY = {\n fitPadding: 28,\n baseFontSize: 13,\n overviewFontThreshold: 9,\n minimumZoomedFontSize: 5,\n groupTitleInset: 8,\n groupTitleLineHeight: 1.2,\n groupPadding: 32,\n elkGroupPadding: { top: 46, right: 24, bottom: 24, left: 24 },\n edgeCornerRadius: 6,\n outputWidth: 256,\n outputLabelWidth: 144,\n} as const;\n\nconst ENDPOINT_EDGE_DISTANCES = 'endpoints' as unknown as cytoscape.Css.Edge['edge-distances'];\nconst EDGE_SEGMENT_RADII = `${GRAPH_GEOMETRY.edgeCornerRadius}px` as unknown as cytoscape.Css.Edge['segment-radii'];\n\nexport type GraphLegendEntry = {\n readonly group: 'Execution' | 'Resources' | 'Relationships';\n readonly key: string;\n readonly label: string;\n readonly color: string;\n readonly shape: 'box' | 'cut-rectangle' | 'tag' | 'ellipse' | 'group' | 'line';\n readonly lineStyle?: 'solid' | 'dotted' | 'dashed';\n readonly hollowArrow?: boolean;\n};\n\nconst NODE_LEGEND_ENTRIES = {\n render: nodeLegend('render', 'Render', GRAPH_VISUAL_THEME.render.stroke),\n compute: nodeLegend('compute', 'Compute', GRAPH_VISUAL_THEME.compute.stroke),\n copy: nodeLegend('copy', 'Copy', GRAPH_VISUAL_THEME.copy.stroke),\n 'clear-buffer': nodeLegend('clear', 'Clear', GRAPH_VISUAL_THEME.clear.stroke),\n command: nodeLegend('command', 'Command', GRAPH_VISUAL_THEME.command.stroke),\n 'external-submission': { ...nodeLegend('external', 'External', GRAPH_VISUAL_THEME.external.stroke), shape: 'cut-rectangle' as const },\n} as const;\n\nexport function createGraphLegend(snapshot: FrameGraphDebugViewModel): readonly GraphLegendEntry[] {\n const entries: GraphLegendEntry[] = [];\n const passKinds = new Set(snapshot.nodes.map((node) => node.kind));\n for (const kind of ['render', 'compute', 'copy', 'clear-buffer', 'command', 'external-submission'] as const) {\n if (passKinds.has(kind)) entries.push(NODE_LEGEND_ENTRIES[kind]);\n }\n const retained = new Set(snapshot.nodes.map((node) => node.id));\n const used = new Set([\n ...snapshot.accessEdges.filter((access) => retained.has(access.nodeId)).map((access) => access.resource.id),\n ...snapshot.roots.flatMap((root) => root.resource ? [root.resource.id] : []),\n ]);\n const resources = snapshot.resources.filter((resource) => used.has(resource.id));\n if (resources.length) entries.push({ group: 'Resources', key: 'declaration', label: 'Declaration', color: GRAPH_VISUAL_THEME.declaration.stroke, shape: 'ellipse' });\n if (snapshot.roots.some((root) => root.resource)) entries.push({ group: 'Resources', key: 'output', label: 'Output', color: GRAPH_VISUAL_THEME.output.stroke, shape: 'tag' });\n if ([...snapshot.nodes, ...resources].some((item) => item.debugGroupId !== undefined)) {\n entries.push({ group: 'Relationships', key: 'group', label: 'Group', color: GRAPH_VISUAL_THEME.group.stroke, shape: 'group' });\n }\n if (snapshot.edges.some((edge) => edge.kind === 'value')\n || declarationEntrances(snapshot.nodes, snapshot.accessEdges, snapshot.edges).length\n || snapshot.roots.some((root) => root.resource && root.resolution && (root.resolution.usesInitialContents || root.resolution.producerNodeIds.length))) {\n entries.push(edgeLegend('flow', 'Resource Flow', GRAPH_VISUAL_THEME.dependency.value, 'solid'));\n }\n if (snapshot.edges.some((edge) => edge.kind === 'ordering')) {\n entries.push({\n ...edgeLegend('ordering', 'Order', GRAPH_VISUAL_THEME.dependency.ordering, 'dotted'),\n hollowArrow: true,\n });\n }\n return entries;\n}\n\nexport function createGraphStyles(): cytoscape.StylesheetJson {\n const theme = GRAPH_VISUAL_THEME;\n return [\n {\n selector: 'node',\n style: {\n 'shape': 'round-rectangle',\n 'width': 'data(width)',\n 'height': 'data(height)',\n 'label': 'data(displayLabel)',\n 'text-wrap': 'wrap',\n 'text-max-width': '160px',\n 'font-family': 'ui-monospace, SFMono-Regular, Consolas, Liberation Mono, monospace',\n 'font-size': GRAPH_GEOMETRY.baseFontSize,\n 'min-zoomed-font-size': GRAPH_GEOMETRY.minimumZoomedFontSize,\n 'color': theme.text,\n 'background-color': theme.surfaceRaised,\n 'border-color': theme.group.stroke,\n 'border-width': 1.25,\n 'border-style': 'solid',\n 'text-valign': 'center',\n 'text-halign': 'center',\n 'overlay-opacity': 0,\n 'underlay-opacity': 0,\n },\n },\n passStyle('render', theme.render),\n passStyle('compute', theme.compute),\n passStyle('copy', theme.copy),\n passStyle('clear-buffer', theme.clear),\n passStyle('command', theme.command),\n {\n selector: 'node[passKind = \"external-submission\"]',\n style: {\n 'background-color': theme.external.fill,\n 'border-color': theme.external.stroke,\n 'shape': 'cut-rectangle',\n 'corner-radius': '10px',\n },\n },\n {\n selector: 'node[kind = \"resource\"]',\n style: {\n 'shape': 'ellipse',\n 'background-color': theme.declaration.fill,\n 'border-color': theme.declaration.stroke,\n },\n },\n {\n selector: 'node[kind = \"root\"]',\n style: {\n 'shape': 'tag',\n 'background-color': theme.output.fill,\n 'border-color': theme.output.stroke,\n 'text-max-width': `${GRAPH_GEOMETRY.outputLabelWidth}px`,\n // Native tag shoulders sit at 5/8 of its width. Center text in the rectangular body.\n 'text-margin-x': -GRAPH_GEOMETRY.outputWidth * 3 / 16,\n },\n },\n {\n selector: 'node[kind = \"group\"]',\n style: {\n 'text-max-width': (element: cytoscape.SingularElementArgument) => `${element.data('labelMaxWidth') as number}px`,\n },\n },\n {\n selector: 'node[kind = \"group\"][collapsed = 1]',\n style: {\n 'background-color': theme.group.fill,\n 'border-color': theme.group.stroke,\n 'border-width': 2,\n 'color': theme.text,\n },\n },\n {\n selector: 'node[kind = \"group\"][collapsed = 0]',\n style: expandedGroupStyle(theme.group.fill),\n },\n {\n selector: 'node[kind = \"group\"][collapsed = 0][depthBand = 1]',\n style: { 'background-color': theme.group.alternateFill },\n },\n {\n selector: 'edge',\n style: {\n 'width': 1.5,\n 'line-color': theme.dependency.value,\n 'line-opacity': 0.82,\n 'target-arrow-color': theme.dependency.value,\n 'target-arrow-shape': 'triangle',\n 'target-arrow-fill': 'filled',\n 'arrow-scale': 0.8,\n 'curve-style': 'straight',\n 'label': 'data(displayLabel)',\n 'font-family': 'ui-monospace, SFMono-Regular, Consolas, Liberation Mono, monospace',\n 'font-size': 10,\n 'min-zoomed-font-size': GRAPH_GEOMETRY.minimumZoomedFontSize,\n 'color': theme.text,\n 'text-background-color': theme.canvas,\n 'text-background-opacity': 0.82,\n 'text-background-padding': '2px',\n 'text-rotation': 'autorotate',\n 'overlay-opacity': 0,\n 'underlay-opacity': 0,\n },\n },\n {\n selector: 'edge[kind = \"ordering\"]',\n style: {\n 'line-color': theme.dependency.ordering,\n 'target-arrow-color': theme.dependency.ordering,\n 'line-style': 'dotted',\n 'target-arrow-fill': 'hollow',\n 'line-opacity': 0.72,\n },\n },\n {\n selector: 'edge.elk-route',\n style: {\n 'source-endpoint': 'data(sourceEndpoint)',\n 'target-endpoint': 'data(targetEndpoint)',\n 'edge-distances': ENDPOINT_EDGE_DISTANCES,\n },\n },\n {\n selector: 'edge.elk-segments',\n style: {\n 'curve-style': 'round-segments',\n 'segment-distances': 'data(segmentDistances)',\n 'segment-weights': 'data(segmentWeights)',\n 'segment-radii': EDGE_SEGMENT_RADII,\n },\n },\n {\n selector: 'node.semantic-hover',\n style: {\n 'border-color': theme.hover,\n 'border-width': 2,\n 'z-index': 15,\n },\n },\n {\n selector: 'edge.semantic-hover',\n style: {\n 'line-color': theme.hover,\n 'target-arrow-color': theme.hover,\n 'line-opacity': 1,\n 'width': 2.5,\n 'z-index': 15,\n },\n },\n {\n selector: 'node.semantic-selected',\n style: {\n 'border-color': theme.selected,\n 'border-width': 3,\n 'opacity': 1,\n 'z-index': 20,\n },\n },\n {\n selector: 'edge.semantic-selected',\n style: {\n 'line-color': theme.selected,\n 'target-arrow-color': theme.selected,\n 'line-opacity': 1,\n 'width': 3,\n 'z-index': 20,\n },\n },\n ];\n}\n\nexport function nodeDimensions(node: GraphSceneNode): { readonly width: number; readonly height: number } {\n switch (node.kind) {\n case 'pass':\n return { width: 184, height: node.label.includes('\\n') ? 62 : 48 };\n case 'root':\n return { width: GRAPH_GEOMETRY.outputWidth, height: Math.max(58, node.label.split('\\n').length * 17 + 24) };\n case 'resource':\n return { width: 184, height: Math.max(58, node.label.split('\\n').length * 17 + 24) };\n case 'group':\n return node.collapsed ? { width: 224, height: 68 } : { width: 120, height: 80 };\n }\n}\n\nexport function graphLayoutGeometryKey(scene: GraphScene): string {\n return JSON.stringify({\n topology: scene.topologyKey,\n dimensions: scene.nodes.map((node) => {\n const dimensions = nodeDimensions(node);\n return [node.id, dimensions.width, dimensions.height, node.kind === 'pass' && node.passKind === 'external-submission'];\n }),\n });\n}\n\nexport function graphEdgeDisplayLabel(_edge: GraphSceneEdge): string {\n return '';\n}\n\nexport function expandedGroupLabelMaxWidth(outerWidth: number): number {\n return Math.max(80, Math.floor(outerWidth - GRAPH_GEOMETRY.groupTitleInset * 2));\n}\n\nexport function isOverviewGraphScale(zoom: number): boolean {\n return GRAPH_GEOMETRY.baseFontSize * zoom < GRAPH_GEOMETRY.overviewFontThreshold;\n}\n\nfunction nodeLegend(key: string, label: string, color: string): GraphLegendEntry {\n return { group: 'Execution', key, label, color, shape: 'box' };\n}\n\nfunction edgeLegend(\n key: string,\n label: string,\n color: string,\n lineStyle: NonNullable<GraphLegendEntry['lineStyle']>,\n): GraphLegendEntry {\n return { group: 'Relationships', key, label, color, shape: 'line', lineStyle };\n}\n\nfunction passStyle(\n kind: string,\n colors: { readonly stroke: string; readonly fill: string },\n): cytoscape.StylesheetStyle {\n return {\n selector: `node[passKind = \"${kind}\"]`,\n style: { 'background-color': colors.fill, 'border-color': colors.stroke },\n };\n}\n\nfunction expandedGroupStyle(backgroundColor: string): cytoscape.Css.Node {\n const geometry = GRAPH_GEOMETRY;\n return {\n 'background-color': backgroundColor,\n 'background-opacity': 0.34,\n 'border-color': GRAPH_VISUAL_THEME.group.stroke,\n 'border-width': 1.5,\n 'padding': `${geometry.groupPadding}px`,\n 'compound-sizing-wrt-labels': 'include',\n 'min-width': '120px',\n 'min-height': '80px',\n 'text-valign': 'top-inside',\n 'text-halign': 'left-inside',\n 'text-justification': 'left',\n 'text-margin-x': geometry.groupTitleInset - geometry.groupPadding * 2,\n 'text-margin-y': geometry.groupTitleInset - geometry.groupPadding * 2,\n 'line-height': geometry.groupTitleLineHeight,\n 'color': GRAPH_VISUAL_THEME.text,\n 'font-weight': 600,\n };\n}\n"]}
|
package/dist/panelIcons.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export type PanelIconName = 'capture' | 'check' | 'close' | 'copy' | 'empty' | 'error' | 'fit' | 'inspector' | 'spinner' | 'waiting';
|
|
1
|
+
export type PanelIconName = 'capture' | 'check' | 'close' | 'copy' | 'download' | 'empty' | 'error' | 'fit' | 'inspector' | 'spinner' | 'waiting';
|
|
2
2
|
export declare function createPanelIcon(name: PanelIconName): SVGSVGElement;
|
|
3
3
|
export declare function setPanelButtonContent(button: HTMLButtonElement, icon: PanelIconName, label: string): void;
|
|
4
4
|
//# sourceMappingURL=panelIcons.d.ts.map
|
package/dist/panelIcons.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelIcons.d.ts","sourceRoot":"","sources":["../src/panelIcons.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACtB,SAAS,GACT,OAAO,GACP,OAAO,GACP,MAAM,GACN,OAAO,GACP,OAAO,GACP,KAAK,GACL,WAAW,GACX,SAAS,GACT,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"panelIcons.d.ts","sourceRoot":"","sources":["../src/panelIcons.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,aAAa,GACtB,SAAS,GACT,OAAO,GACP,OAAO,GACP,MAAM,GACN,UAAU,GACV,OAAO,GACP,OAAO,GACP,KAAK,GACL,WAAW,GACX,SAAS,GACT,SAAS,CAAC;AAsBb,wBAAgB,eAAe,CAAC,IAAI,EAAE,aAAa,GAAG,aAAa,CAoBlE;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,iBAAiB,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAEzG"}
|
package/dist/panelIcons.js
CHANGED
|
@@ -9,6 +9,7 @@ const ICON_PATHS = {
|
|
|
9
9
|
check: ['M3 8.2 6.3 11.5 13 4.8'],
|
|
10
10
|
close: ['M4 4l8 8', 'M12 4l-8 8'],
|
|
11
11
|
copy: ['M5.5 4h7.5v9H5.5z', 'M3 11V2.5h7.5'],
|
|
12
|
+
download: ['M8 2.5v7', 'M5.5 7.5 8 10l2.5-2.5', 'M3 12.5h10'],
|
|
12
13
|
empty: ['M3 3h10v10H3z', 'M5.5 8h5'],
|
|
13
14
|
error: ['M8 2.5l5.5 10H2.5z', 'M8 6v3', 'M8 11.2v.1'],
|
|
14
15
|
fit: ['M6 2.5H2.5V6', 'M10 2.5h3.5V6', 'M6 13.5H2.5V10', 'M10 13.5h3.5V10'],
|
package/dist/panelIcons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelIcons.js","sourceRoot":"","sources":["../src/panelIcons.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"panelIcons.js","sourceRoot":"","sources":["../src/panelIcons.ts"],"names":[],"mappings":"AAaA,MAAM,UAAU,GAA6C;IAC5D,OAAO,EAAE;QACR,cAAc;QACd,eAAe;QACf,gBAAgB;QAChB,iBAAiB;QACjB,qDAAqD;KACrD;IACD,KAAK,EAAE,CAAC,wBAAwB,CAAC;IACjC,KAAK,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;IACjC,IAAI,EAAE,CAAC,mBAAmB,EAAE,eAAe,CAAC;IAC5C,QAAQ,EAAE,CAAC,UAAU,EAAE,uBAAuB,EAAE,YAAY,CAAC;IAC7D,KAAK,EAAE,CAAC,eAAe,EAAE,UAAU,CAAC;IACpC,KAAK,EAAE,CAAC,oBAAoB,EAAE,QAAQ,EAAE,YAAY,CAAC;IACrD,GAAG,EAAE,CAAC,cAAc,EAAE,eAAe,EAAE,gBAAgB,EAAE,iBAAiB,CAAC;IAC3E,SAAS,EAAE,CAAC,mBAAmB,EAAE,WAAW,CAAC;IAC7C,OAAO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ACZ,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,MAAyB,EAAE,IAAmB,EAAE,KAAa;IAClG,MAAM,CAAC,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,EAAE,QAAQ,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,CAAC;AAC/E,CAAC","sourcesContent":["export type PanelIconName =\n\t| 'capture'\n\t| 'check'\n\t| 'close'\n\t| 'copy'\n\t| 'download'\n\t| 'empty'\n\t| 'error'\n\t| 'fit'\n\t| 'inspector'\n\t| 'spinner'\n\t| 'waiting';\n\nconst ICON_PATHS: Record<PanelIconName, readonly string[]> = {\n\tcapture: [\n\t\t'M6 2.5H2.5V6',\n\t\t'M10 2.5h3.5V6',\n\t\t'M6 13.5H2.5V10',\n\t\t'M10 13.5h3.5V10',\n\t\t'M8 6.25a1.75 1.75 0 1 1 0 3.5 1.75 1.75 0 0 1 0-3.5',\n\t],\n\tcheck: ['M3 8.2 6.3 11.5 13 4.8'],\n\tclose: ['M4 4l8 8', 'M12 4l-8 8'],\n\tcopy: ['M5.5 4h7.5v9H5.5z', 'M3 11V2.5h7.5'],\n\tdownload: ['M8 2.5v7', 'M5.5 7.5 8 10l2.5-2.5', 'M3 12.5h10'],\n\tempty: ['M3 3h10v10H3z', 'M5.5 8h5'],\n\terror: ['M8 2.5l5.5 10H2.5z', 'M8 6v3', 'M8 11.2v.1'],\n\tfit: ['M6 2.5H2.5V6', 'M10 2.5h3.5V6', 'M6 13.5H2.5V10', 'M10 13.5h3.5V10'],\n\tinspector: ['M2.5 3h11v10h-11z', 'M9.5 3v10'],\n\tspinner: ['M13 8a5 5 0 1 1-2-4'],\n\twaiting: ['M5.5 5v6', 'M10.5 5v6'],\n};\n\nexport function createPanelIcon(name: PanelIconName): SVGSVGElement {\n\tconst svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n\tsvg.classList.add('zenfg-inspector-control-icon');\n\tsvg.dataset.icon = name;\n\tsvg.setAttribute('viewBox', '0 0 16 16');\n\tsvg.setAttribute('width', '14');\n\tsvg.setAttribute('height', '14');\n\tsvg.setAttribute('aria-hidden', 'true');\n\tsvg.setAttribute('focusable', 'false');\n\tfor (const data of ICON_PATHS[name]) {\n\t\tconst path = document.createElementNS('http://www.w3.org/2000/svg', 'path');\n\t\tpath.setAttribute('d', data);\n\t\tpath.setAttribute('fill', 'none');\n\t\tpath.setAttribute('stroke', 'currentColor');\n\t\tpath.setAttribute('stroke-linecap', 'round');\n\t\tpath.setAttribute('stroke-linejoin', 'round');\n\t\tpath.setAttribute('stroke-width', '1.4');\n\t\tsvg.appendChild(path);\n\t}\n\treturn svg;\n}\n\nexport function setPanelButtonContent(button: HTMLButtonElement, icon: PanelIconName, label: string): void {\n\tbutton.replaceChildren(createPanelIcon(icon), document.createTextNode(label));\n}\n"]}
|
|
@@ -13,6 +13,7 @@ export declare class InspectorView {
|
|
|
13
13
|
private selected;
|
|
14
14
|
private activeTab;
|
|
15
15
|
private open;
|
|
16
|
+
private hoveredLink;
|
|
16
17
|
constructor(callbacks: WorkbenchCallbacks, onOpenChange: (open: boolean) => void, idPrefix: string);
|
|
17
18
|
setSnapshot(snapshot: FrameGraphDebugViewModel): void;
|
|
18
19
|
setSelection(selected: Selection | undefined, reveal?: boolean): void;
|
|
@@ -26,6 +27,10 @@ export declare class InspectorView {
|
|
|
26
27
|
private accessRelations;
|
|
27
28
|
private resourceRelations;
|
|
28
29
|
private relationGroup;
|
|
30
|
+
private selectRelated;
|
|
31
|
+
private viewResourceButton;
|
|
32
|
+
private createDetailLink;
|
|
33
|
+
private clearLinkHover;
|
|
29
34
|
private summary;
|
|
30
35
|
private accessNodeLabel;
|
|
31
36
|
private accessNodeSelection;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelInspectorView.d.ts","sourceRoot":"","sources":["../src/panelInspectorView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"panelInspectorView.d.ts","sourceRoot":"","sources":["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