@zenfg/inspector 0.1.0-beta.2 → 0.1.0-beta.4
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/GUIDE.md +182 -0
- package/README.md +60 -26
- package/THEMING.md +124 -0
- package/dist/FrameGraphInspector.d.ts +24 -8
- package/dist/FrameGraphInspector.d.ts.map +1 -1
- package/dist/FrameGraphInspector.js +151 -65
- package/dist/FrameGraphInspector.js.map +1 -1
- package/dist/capture.d.ts +5 -0
- package/dist/capture.d.ts.map +1 -0
- package/dist/capture.js +2 -0
- package/dist/capture.js.map +1 -0
- package/dist/debugCaptureModel.d.ts +28 -4
- package/dist/debugCaptureModel.d.ts.map +1 -1
- package/dist/debugCaptureModel.js +72 -16
- package/dist/debugCaptureModel.js.map +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/panelAliasAnalysis.d.ts +1 -0
- package/dist/panelAliasAnalysis.d.ts.map +1 -1
- package/dist/panelAliasAnalysis.js +23 -54
- package/dist/panelAliasAnalysis.js.map +1 -1
- package/dist/panelCytoscapeGraphRenderer.d.ts +18 -3
- package/dist/panelCytoscapeGraphRenderer.d.ts.map +1 -1
- package/dist/panelCytoscapeGraphRenderer.js +183 -41
- package/dist/panelCytoscapeGraphRenderer.js.map +1 -1
- package/dist/panelDetailLayout.d.ts +27 -0
- package/dist/panelDetailLayout.d.ts.map +1 -0
- package/dist/panelDetailLayout.js +174 -0
- package/dist/panelDetailLayout.js.map +1 -0
- package/dist/panelDetailStyles.d.ts +2 -0
- package/dist/panelDetailStyles.d.ts.map +1 -0
- package/dist/panelDetailStyles.js +57 -0
- package/dist/panelDetailStyles.js.map +1 -0
- package/dist/panelDiagnosticsView.d.ts +10 -1
- package/dist/panelDiagnosticsView.d.ts.map +1 -1
- package/dist/panelDiagnosticsView.js +167 -58
- package/dist/panelDiagnosticsView.js.map +1 -1
- package/dist/panelDomHelpers.d.ts.map +1 -1
- package/dist/panelDomHelpers.js +6 -5
- package/dist/panelDomHelpers.js.map +1 -1
- package/dist/panelGraphLayout.d.ts +3 -2
- package/dist/panelGraphLayout.d.ts.map +1 -1
- package/dist/panelGraphLayout.js +20 -5
- package/dist/panelGraphLayout.js.map +1 -1
- package/dist/panelGraphRenderer.d.ts +10 -0
- package/dist/panelGraphRenderer.d.ts.map +1 -1
- package/dist/panelGraphRenderer.js.map +1 -1
- package/dist/panelGraphScene.d.ts +15 -26
- package/dist/panelGraphScene.d.ts.map +1 -1
- package/dist/panelGraphScene.js +191 -208
- package/dist/panelGraphScene.js.map +1 -1
- package/dist/panelGraphSearch.d.ts +16 -0
- package/dist/panelGraphSearch.d.ts.map +1 -0
- package/dist/panelGraphSearch.js +93 -0
- package/dist/panelGraphSearch.js.map +1 -0
- package/dist/panelGraphView.d.ts +82 -0
- package/dist/panelGraphView.d.ts.map +1 -1
- package/dist/panelGraphView.js +42 -9
- package/dist/panelGraphView.js.map +1 -1
- package/dist/panelGraphVisuals.d.ts +18 -6
- package/dist/panelGraphVisuals.d.ts.map +1 -1
- package/dist/panelGraphVisuals.js +156 -116
- package/dist/panelGraphVisuals.js.map +1 -1
- package/dist/panelInspectorView.d.ts +13 -0
- package/dist/panelInspectorView.d.ts.map +1 -1
- package/dist/panelInspectorView.js +326 -46
- package/dist/panelInspectorView.js.map +1 -1
- package/dist/panelListStyles.d.ts +3 -0
- package/dist/panelListStyles.d.ts.map +1 -0
- package/dist/panelListStyles.js +155 -0
- package/dist/panelListStyles.js.map +1 -0
- package/dist/panelMemoryStyles.d.ts +3 -0
- package/dist/panelMemoryStyles.d.ts.map +1 -0
- package/dist/panelMemoryStyles.js +42 -0
- package/dist/panelMemoryStyles.js.map +1 -0
- package/dist/panelMemoryView.d.ts +13 -1
- package/dist/panelMemoryView.d.ts.map +1 -1
- package/dist/panelMemoryView.js +161 -41
- package/dist/panelMemoryView.js.map +1 -1
- package/dist/panelPassesView.d.ts +15 -0
- package/dist/panelPassesView.d.ts.map +1 -1
- package/dist/panelPassesView.js +202 -72
- package/dist/panelPassesView.js.map +1 -1
- package/dist/panelRawView.d.ts +15 -0
- package/dist/panelRawView.d.ts.map +1 -0
- package/dist/panelRawView.js +105 -0
- package/dist/panelRawView.js.map +1 -0
- package/dist/panelResourcesView.d.ts +8 -0
- package/dist/panelResourcesView.d.ts.map +1 -1
- package/dist/panelResourcesView.js +62 -31
- package/dist/panelResourcesView.js.map +1 -1
- package/dist/panelSelection.d.ts +9 -1
- package/dist/panelSelection.d.ts.map +1 -1
- package/dist/panelSelection.js +36 -6
- package/dist/panelSelection.js.map +1 -1
- package/dist/panelTheme.d.ts +13 -0
- package/dist/panelTheme.d.ts.map +1 -0
- package/dist/panelTheme.js +104 -0
- package/dist/panelTheme.js.map +1 -0
- package/dist/panelTypes.d.ts +18 -4
- package/dist/panelTypes.d.ts.map +1 -1
- package/dist/panelTypes.js.map +1 -1
- package/dist/panelVisualTheme.d.ts +176 -71
- package/dist/panelVisualTheme.d.ts.map +1 -1
- package/dist/panelVisualTheme.js +34 -36
- package/dist/panelVisualTheme.js.map +1 -1
- package/dist/panelWorkbenchHelpers.d.ts +12 -1
- package/dist/panelWorkbenchHelpers.d.ts.map +1 -1
- package/dist/panelWorkbenchHelpers.js +63 -2
- package/dist/panelWorkbenchHelpers.js.map +1 -1
- package/dist/panelWorkbenchStyles.d.ts +2 -0
- package/dist/panelWorkbenchStyles.d.ts.map +1 -0
- package/dist/panelWorkbenchStyles.js +101 -0
- package/dist/panelWorkbenchStyles.js.map +1 -0
- package/dist/panelWorkbenchView.d.ts +16 -0
- package/dist/panelWorkbenchView.d.ts.map +1 -1
- package/dist/panelWorkbenchView.js +228 -50
- package/dist/panelWorkbenchView.js.map +1 -1
- package/dist/query.js.map +1 -1
- package/dist/styles.d.ts.map +1 -1
- package/dist/styles.js +161 -205
- package/dist/styles.js.map +1 -1
- package/dist/theme.d.ts +22 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +10 -0
- package/dist/theme.js.map +1 -0
- package/dist/themeDefinitions.d.ts +251 -0
- package/dist/themeDefinitions.d.ts.map +1 -0
- package/dist/themeDefinitions.js +96 -0
- package/dist/themeDefinitions.js.map +1 -0
- package/dist/themePalette.d.ts +66 -0
- package/dist/themePalette.d.ts.map +1 -0
- package/dist/themePalette.js +37 -0
- package/dist/themePalette.js.map +1 -0
- package/dist/themes.css +165 -0
- package/package.json +44 -10
- package/src/FrameGraphInspector.ts +145 -68
- package/src/capture.ts +4 -0
- package/src/debugCaptureModel.ts +97 -21
- package/src/index.ts +6 -2
- package/src/panelAliasAnalysis.ts +24 -70
- package/src/panelCytoscapeGraphRenderer.ts +177 -40
- package/src/panelDetailLayout.ts +155 -0
- package/src/panelDetailStyles.ts +56 -0
- package/src/panelDiagnosticsView.ts +167 -86
- package/src/panelDomHelpers.ts +4 -5
- package/src/panelGraphLayout.ts +20 -5
- package/src/panelGraphRenderer.ts +7 -0
- package/src/panelGraphScene.ts +204 -292
- package/src/panelGraphSearch.ts +96 -0
- package/src/panelGraphView.ts +41 -9
- package/src/panelGraphVisuals.ts +152 -118
- package/src/panelInspectorView.ts +315 -48
- package/src/panelListStyles.ts +154 -0
- package/src/panelMemoryStyles.ts +41 -0
- package/src/panelMemoryView.ts +178 -53
- package/src/panelPassesView.ts +190 -137
- package/src/panelRawView.ts +99 -0
- package/src/panelResourcesView.ts +69 -56
- package/src/panelSelection.ts +39 -7
- package/src/panelTheme.ts +85 -0
- package/src/panelTypes.ts +16 -4
- package/src/panelVisualTheme.ts +38 -38
- package/src/panelWorkbenchHelpers.ts +62 -4
- package/src/panelWorkbenchStyles.ts +100 -0
- package/src/panelWorkbenchView.ts +201 -52
- package/src/query.ts +11 -11
- package/src/styles.ts +162 -205
- package/src/theme.ts +24 -0
- package/src/themeDefinitions.ts +103 -0
- package/src/themePalette.ts +44 -0
package/dist/panelGraphView.js
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
|
+
import { GRAPH_VISUAL_THEME } from "./panelVisualTheme.js";
|
|
1
2
|
import { CytoscapeGraphRenderer } from "./panelCytoscapeGraphRenderer.js";
|
|
2
3
|
import { createGraphScene } from "./panelGraphScene.js";
|
|
3
4
|
import { createGraphLegend } from "./panelGraphVisuals.js";
|
|
4
5
|
const graphSceneCache = new WeakMap();
|
|
5
6
|
export function renderGraphView(graphView, snapshot, selected, hovered, onSelect, onHover, onToggleGroup) {
|
|
6
7
|
const scene = resolveGraphScene(graphView, snapshot);
|
|
7
|
-
|
|
8
|
+
if (!graphView.theme)
|
|
9
|
+
graphView.refreshTheme?.();
|
|
10
|
+
renderGraphLegend(graphView.legend, snapshot, graphView.theme, graphView.showResourceDeclarations);
|
|
8
11
|
const elementCount = scene.nodes.length + scene.edges.length;
|
|
9
12
|
const layoutElementBudget = graphView.layoutElementBudget ?? Number.MAX_SAFE_INTEGER;
|
|
10
13
|
if (elementCount > layoutElementBudget) {
|
|
@@ -21,29 +24,34 @@ export function renderGraphView(graphView, snapshot, selected, hovered, onSelect
|
|
|
21
24
|
graphView.renderer ??= new CytoscapeGraphRenderer(graphView.host);
|
|
22
25
|
graphView.renderer.render({
|
|
23
26
|
scene,
|
|
27
|
+
theme: graphView.theme,
|
|
28
|
+
onVisible: graphView.refreshTheme,
|
|
24
29
|
selected,
|
|
25
30
|
hovered,
|
|
26
31
|
fit: graphView.fitOnNextRender,
|
|
27
32
|
anchorElementId: graphView.anchorElementIdOnNextRender,
|
|
33
|
+
reveal: graphView.revealOnNextRender,
|
|
34
|
+
captureRevision: graphView.captureRevision,
|
|
28
35
|
onSelect,
|
|
29
36
|
onHover,
|
|
30
37
|
onToggleGroup,
|
|
31
38
|
});
|
|
32
39
|
graphView.fitOnNextRender = false;
|
|
33
40
|
graphView.anchorElementIdOnNextRender = undefined;
|
|
41
|
+
graphView.revealOnNextRender = undefined;
|
|
34
42
|
}
|
|
35
43
|
export function resolveGraphScene(graphView, snapshot) {
|
|
36
44
|
const optionsKey = JSON.stringify([
|
|
37
|
-
graphView.graphMode,
|
|
38
45
|
graphView.groupsEnabled,
|
|
46
|
+
graphView.showResourceDeclarations ?? true,
|
|
39
47
|
[...graphView.expandedGroupPaths].sort(),
|
|
40
48
|
]);
|
|
41
49
|
const cached = graphSceneCache.get(graphView);
|
|
42
50
|
if (cached?.snapshot === snapshot && cached.optionsKey === optionsKey)
|
|
43
51
|
return cached.scene;
|
|
44
52
|
const scene = createGraphScene(snapshot, {
|
|
45
|
-
mode: graphView.graphMode,
|
|
46
53
|
groupsEnabled: graphView.groupsEnabled,
|
|
54
|
+
showResourceDeclarations: graphView.showResourceDeclarations,
|
|
47
55
|
expandedGroupPaths: graphView.expandedGroupPaths,
|
|
48
56
|
});
|
|
49
57
|
graphSceneCache.set(graphView, { snapshot, optionsKey, scene });
|
|
@@ -53,6 +61,7 @@ export function fitGraph(graphView) {
|
|
|
53
61
|
graphView.renderer?.fit();
|
|
54
62
|
}
|
|
55
63
|
export function resizeGraph(graphView) {
|
|
64
|
+
graphView.refreshTheme?.();
|
|
56
65
|
graphView.renderer?.resize();
|
|
57
66
|
}
|
|
58
67
|
export function destroyGraph(graphView) {
|
|
@@ -60,15 +69,28 @@ export function destroyGraph(graphView) {
|
|
|
60
69
|
graphView.renderer = undefined;
|
|
61
70
|
graphSceneCache.delete(graphView);
|
|
62
71
|
}
|
|
63
|
-
function renderGraphLegend(host,
|
|
72
|
+
export function renderGraphLegend(host, snapshot, theme = GRAPH_VISUAL_THEME, showResourceDeclarations = true) {
|
|
64
73
|
if (!host)
|
|
65
74
|
return;
|
|
66
|
-
const entries = createGraphLegend(
|
|
67
|
-
const key =
|
|
75
|
+
const entries = createGraphLegend(snapshot, theme, showResourceDeclarations);
|
|
76
|
+
const key = JSON.stringify(entries);
|
|
68
77
|
if (host.dataset.legendKey === key)
|
|
69
78
|
return;
|
|
70
79
|
host.dataset.legendKey = key;
|
|
71
|
-
host.replaceChildren(
|
|
80
|
+
host.replaceChildren();
|
|
81
|
+
let group;
|
|
82
|
+
for (const entry of entries) {
|
|
83
|
+
if (group?.getAttribute('aria-label') !== entry.group) {
|
|
84
|
+
group = document.createElement('span');
|
|
85
|
+
group.className = 'zenfg-inspector-legend-group';
|
|
86
|
+
group.setAttribute('role', 'group');
|
|
87
|
+
group.setAttribute('aria-label', entry.group);
|
|
88
|
+
const heading = document.createElement('span');
|
|
89
|
+
heading.className = 'zenfg-inspector-legend-heading';
|
|
90
|
+
heading.textContent = entry.group;
|
|
91
|
+
group.appendChild(heading);
|
|
92
|
+
host.appendChild(group);
|
|
93
|
+
}
|
|
72
94
|
const item = document.createElement('span');
|
|
73
95
|
item.className = 'zenfg-inspector-legend-item';
|
|
74
96
|
const swatch = document.createElement('span');
|
|
@@ -79,10 +101,21 @@ function renderGraphLegend(host, scene) {
|
|
|
79
101
|
if (entry.hollowArrow)
|
|
80
102
|
swatch.dataset.hollowArrow = 'true';
|
|
81
103
|
swatch.style.setProperty('--zenfg-inspector-legend-color', entry.color);
|
|
104
|
+
if (entry.shape === 'cut-rectangle' || entry.shape === 'tag') {
|
|
105
|
+
const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');
|
|
106
|
+
svg.setAttribute('viewBox', '0 0 20 14');
|
|
107
|
+
svg.setAttribute('aria-hidden', 'true');
|
|
108
|
+
const polygon = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');
|
|
109
|
+
polygon.setAttribute('points', entry.shape === 'tag'
|
|
110
|
+
? '1,1 16,1 19,7 16,13 1,13'
|
|
111
|
+
: '4,1 16,1 19,4 19,10 16,13 4,13 1,10 1,4');
|
|
112
|
+
svg.appendChild(polygon);
|
|
113
|
+
swatch.appendChild(svg);
|
|
114
|
+
}
|
|
82
115
|
const label = document.createElement('span');
|
|
83
116
|
label.textContent = entry.label;
|
|
84
117
|
item.append(swatch, label);
|
|
85
|
-
|
|
86
|
-
}
|
|
118
|
+
group.appendChild(item);
|
|
119
|
+
}
|
|
87
120
|
}
|
|
88
121
|
//# sourceMappingURL=panelGraph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E,MAAM,CAAC,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC;QAC3D,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,gCAAgC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACxE,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7C,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC;IAChB,CAAC,CAAC,CAAC,CAAC;AACR,CAAC","sourcesContent":["import type { FrameGraphDebugViewModel } from './debugCaptureModel.ts';\nimport { CytoscapeGraphRenderer } from './panelCytoscapeGraphRenderer.ts';\nimport { createGraphScene, type GraphScene } from './panelGraphScene.ts';\nimport { createGraphLegend } from './panelGraphVisuals.ts';\nimport type { GraphViewState, Selection } from './panelTypes.ts';\n\ntype GraphSceneCacheEntry = {\n readonly snapshot: FrameGraphDebugViewModel;\n readonly optionsKey: string;\n readonly scene: GraphScene;\n};\n\nconst graphSceneCache = new WeakMap<GraphViewState, GraphSceneCacheEntry>();\n\nexport function renderGraphView(\n graphView: GraphViewState,\n snapshot: FrameGraphDebugViewModel,\n selected: Selection | undefined,\n hovered: Selection | undefined,\n onSelect: (selection: Selection) => void,\n onHover: (selection: Selection | undefined) => void,\n onToggleGroup: (pathKey: string) => void,\n): void {\n const scene = resolveGraphScene(graphView, snapshot);\n renderGraphLegend(graphView.legend, scene);\n\tconst elementCount = scene.nodes.length + scene.edges.length;\n\tconst layoutElementBudget = graphView.layoutElementBudget ?? Number.MAX_SAFE_INTEGER;\n\tif (elementCount > layoutElementBudget) {\n\t\tgraphView.renderer?.destroy();\n\t\tgraphView.renderer = undefined;\n\t\tconst notice = document.createElement('div');\n\t\tnotice.className = 'zenfg-inspector-graph-status';\n\t\tnotice.dataset.state = 'empty';\n\t\tnotice.setAttribute('role', 'status');\n\t\tnotice.textContent = `Automatic layout disabled: ${elementCount} graph elements exceed the ${layoutElementBudget} element budget. Passes, Resources, Memory, Diagnostics, and raw data remain available.`;\n\t\tgraphView.host.replaceChildren(notice);\n\t\treturn;\n\t}\n\tgraphView.renderer ??= new CytoscapeGraphRenderer(graphView.host);\n graphView.renderer.render({\n scene,\n selected,\n hovered,\n fit: graphView.fitOnNextRender,\n anchorElementId: graphView.anchorElementIdOnNextRender,\n onSelect,\n onHover,\n onToggleGroup,\n });\n graphView.fitOnNextRender = false;\n graphView.anchorElementIdOnNextRender = undefined;\n}\n\nexport function resolveGraphScene(\n graphView: GraphViewState,\n snapshot: FrameGraphDebugViewModel,\n): GraphScene {\n const optionsKey = JSON.stringify([\n graphView.graphMode,\n graphView.groupsEnabled,\n [...graphView.expandedGroupPaths].sort(),\n ]);\n const cached = graphSceneCache.get(graphView);\n if (cached?.snapshot === snapshot && cached.optionsKey === optionsKey) return cached.scene;\n const scene = createGraphScene(snapshot, {\n mode: graphView.graphMode,\n groupsEnabled: graphView.groupsEnabled,\n expandedGroupPaths: graphView.expandedGroupPaths,\n });\n graphSceneCache.set(graphView, { snapshot, optionsKey, scene });\n return scene;\n}\n\nexport function fitGraph(graphView: GraphViewState): void {\n graphView.renderer?.fit();\n}\n\nexport function resizeGraph(graphView: GraphViewState): void {\n graphView.renderer?.resize();\n}\n\nexport function destroyGraph(graphView: GraphViewState): void {\n graphView.renderer?.destroy();\n graphView.renderer = undefined;\n graphSceneCache.delete(graphView);\n}\n\nfunction renderGraphLegend(host: HTMLElement | undefined, scene: GraphScene): void {\n if (!host) return;\n const entries = createGraphLegend(scene);\n const key = entries.map((entry) => entry.key).join('|');\n if (host.dataset.legendKey === key) return;\n host.dataset.legendKey = key;\n host.replaceChildren(...entries.map((entry) => {\n const item = document.createElement('span');\n item.className = 'zenfg-inspector-legend-item';\n const swatch = document.createElement('span');\n swatch.className = 'zenfg-inspector-legend-swatch';\n swatch.dataset.shape = entry.shape;\n if (entry.lineStyle) swatch.dataset.lineStyle = entry.lineStyle;\n if (entry.hollowArrow) swatch.dataset.hollowArrow = 'true';\n swatch.style.setProperty('--zenfg-inspector-legend-color', entry.color);\n const label = document.createElement('span');\n label.textContent = entry.label;\n item.append(swatch, label);\n return item;\n }));\n}\n"]}
|
|
1
|
+
{"version":3,"file":"panelGraphView.js","sourceRoot":"","sources":["../src/panelGraphView.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAmB,MAAM,sBAAsB,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAS3D,MAAM,eAAe,GAAG,IAAI,OAAO,EAAwC,CAAC;AAE5E,MAAM,UAAU,eAAe,CAC3B,SAAyB,EACzB,QAAkC,EAClC,QAA+B,EAC/B,OAA8B,EAC9B,QAAwC,EACxC,OAAmD,EACnD,aAAwC;IAExC,MAAM,KAAK,GAAG,iBAAiB,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACrD,IAAI,CAAC,SAAS,CAAC,KAAK;QAAE,SAAS,CAAC,YAAY,EAAE,EAAE,CAAC;IACjD,iBAAiB,CAAC,SAAS,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC,wBAAwB,CAAC,CAAC;IACtG,MAAM,YAAY,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC;IAC7D,MAAM,mBAAmB,GAAG,SAAS,CAAC,mBAAmB,IAAI,MAAM,CAAC,gBAAgB,CAAC;IACrF,IAAI,YAAY,GAAG,mBAAmB,EAAE,CAAC;QACxC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,CAAC;QAC9B,SAAS,CAAC,QAAQ,GAAG,SAAS,CAAC;QAC/B,MAAM,MAA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M,CAAC,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC;QAC3D,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,gCAAgC,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;QACxE,IAAI,KAAK,CAAC,KAAK,KAAK,eAAe,IAAI,KAAK,CAAC,KAAK,KAAK,KAAK,EAAE,CAAC;YAC3D,MAAM,GAAG,GAAG,QAAQ,CAAC,eAAe,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;YAC1E,GAAG,CAAC,YAAY,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;YACzC,GAAG,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAC;YACxC,MAAM,OAAO,GAAG,QAAQ,CAAC,eAAe,CAAC,4BAA4B,EAAE,SAAS,CAAC,CAAC;YAClF,OAAO,CAAC,YAAY,CAAC,QAAQ,EAAE,KAAK,CAAC,KAAK,KAAK,KAAK;gBAChD,CAAC,CAAC,0BAA0B;gBAC5B,CAAC,CAAC,yCAAyC,CAAC,CAAC;YACjD,GAAG,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;YACzB,MAAM,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC5B,CAAC;QACD,MAAM,KAAK,GAAG,QAAQ,CAAC,aAAa,CAAC,MAAM,CAAC,CAAC;QAC7C,KAAK,CAAC,WAAW,GAAG,KAAK,CAAC,KAAK,CAAC;QAChC,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAC3B,KAAM,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;IAC7B,CAAC;AACL,CAAC","sourcesContent":["import { GRAPH_VISUAL_THEME } from './panelVisualTheme.ts';\nimport type { FrameGraphDebugViewModel } from './debugCaptureModel.ts';\nimport { CytoscapeGraphRenderer } from './panelCytoscapeGraphRenderer.ts';\nimport { createGraphScene, type GraphScene } from './panelGraphScene.ts';\nimport { createGraphLegend } from './panelGraphVisuals.ts';\nimport type { GraphViewState, Selection } from './panelTypes.ts';\n\ntype GraphSceneCacheEntry = {\n readonly snapshot: FrameGraphDebugViewModel;\n readonly optionsKey: string;\n readonly scene: GraphScene;\n};\n\nconst graphSceneCache = new WeakMap<GraphViewState, GraphSceneCacheEntry>();\n\nexport function renderGraphView(\n graphView: GraphViewState,\n snapshot: FrameGraphDebugViewModel,\n selected: Selection | undefined,\n hovered: Selection | undefined,\n onSelect: (selection: Selection) => void,\n onHover: (selection: Selection | undefined) => void,\n onToggleGroup: (pathKey: string) => void,\n): void {\n const scene = resolveGraphScene(graphView, snapshot);\n if (!graphView.theme) graphView.refreshTheme?.();\n renderGraphLegend(graphView.legend, snapshot, graphView.theme, graphView.showResourceDeclarations);\n\tconst elementCount = scene.nodes.length + scene.edges.length;\n\tconst layoutElementBudget = graphView.layoutElementBudget ?? Number.MAX_SAFE_INTEGER;\n\tif (elementCount > layoutElementBudget) {\n\t\tgraphView.renderer?.destroy();\n\t\tgraphView.renderer = undefined;\n\t\tconst notice = document.createElement('div');\n\t\tnotice.className = 'zenfg-inspector-graph-status';\n\t\tnotice.dataset.state = 'empty';\n\t\tnotice.setAttribute('role', 'status');\n\t\tnotice.textContent = `Automatic layout disabled: ${elementCount} graph elements exceed the ${layoutElementBudget} element budget. Passes, Resources, Memory, Diagnostics, and raw data remain available.`;\n\t\tgraphView.host.replaceChildren(notice);\n\t\treturn;\n\t}\n\tgraphView.renderer ??= new CytoscapeGraphRenderer(graphView.host);\n graphView.renderer.render({\n scene,\n theme: graphView.theme,\n onVisible: graphView.refreshTheme,\n selected,\n hovered,\n fit: graphView.fitOnNextRender,\n anchorElementId: graphView.anchorElementIdOnNextRender,\n reveal: graphView.revealOnNextRender,\n captureRevision: graphView.captureRevision,\n onSelect,\n onHover,\n onToggleGroup,\n });\n graphView.fitOnNextRender = false;\n graphView.anchorElementIdOnNextRender = undefined;\n graphView.revealOnNextRender = undefined;\n}\n\nexport function resolveGraphScene(\n graphView: GraphViewState,\n snapshot: FrameGraphDebugViewModel,\n): GraphScene {\n const optionsKey = JSON.stringify([\n graphView.groupsEnabled,\n graphView.showResourceDeclarations ?? true,\n [...graphView.expandedGroupPaths].sort(),\n ]);\n const cached = graphSceneCache.get(graphView);\n if (cached?.snapshot === snapshot && cached.optionsKey === optionsKey) return cached.scene;\n const scene = createGraphScene(snapshot, {\n groupsEnabled: graphView.groupsEnabled,\n showResourceDeclarations: graphView.showResourceDeclarations,\n expandedGroupPaths: graphView.expandedGroupPaths,\n });\n graphSceneCache.set(graphView, { snapshot, optionsKey, scene });\n return scene;\n}\n\nexport function fitGraph(graphView: GraphViewState): void {\n graphView.renderer?.fit();\n}\n\nexport function resizeGraph(graphView: GraphViewState): void {\n graphView.refreshTheme?.();\n graphView.renderer?.resize();\n}\n\nexport function destroyGraph(graphView: GraphViewState): void {\n graphView.renderer?.destroy();\n graphView.renderer = undefined;\n graphSceneCache.delete(graphView);\n}\n\nexport function renderGraphLegend(host: HTMLElement | undefined, snapshot: FrameGraphDebugViewModel, theme = GRAPH_VISUAL_THEME, showResourceDeclarations = true): void {\n if (!host) return;\n const entries = createGraphLegend(snapshot, theme, showResourceDeclarations);\n const key = JSON.stringify(entries);\n if (host.dataset.legendKey === key) return;\n host.dataset.legendKey = key;\n host.replaceChildren();\n let group: HTMLElement | undefined;\n for (const entry of entries) {\n if (group?.getAttribute('aria-label') !== entry.group) {\n group = document.createElement('span');\n group.className = 'zenfg-inspector-legend-group';\n group.setAttribute('role', 'group');\n group.setAttribute('aria-label', entry.group);\n const heading = document.createElement('span');\n heading.className = 'zenfg-inspector-legend-heading';\n heading.textContent = entry.group;\n group.appendChild(heading);\n host.appendChild(group);\n }\n const item = document.createElement('span');\n item.className = 'zenfg-inspector-legend-item';\n const swatch = document.createElement('span');\n swatch.className = 'zenfg-inspector-legend-swatch';\n swatch.dataset.shape = entry.shape;\n if (entry.lineStyle) swatch.dataset.lineStyle = entry.lineStyle;\n if (entry.hollowArrow) swatch.dataset.hollowArrow = 'true';\n swatch.style.setProperty('--zenfg-inspector-legend-color', entry.color);\n if (entry.shape === 'cut-rectangle' || entry.shape === 'tag') {\n const svg = document.createElementNS('http://www.w3.org/2000/svg', 'svg');\n svg.setAttribute('viewBox', '0 0 20 14');\n svg.setAttribute('aria-hidden', 'true');\n const polygon = document.createElementNS('http://www.w3.org/2000/svg', 'polygon');\n polygon.setAttribute('points', entry.shape === 'tag'\n ? '1,1 16,1 19,7 16,13 1,13'\n : '4,1 16,1 19,4 19,10 16,13 4,13 1,10 1,4');\n svg.appendChild(polygon);\n swatch.appendChild(svg);\n }\n const label = document.createElement('span');\n label.textContent = entry.label;\n item.append(swatch, label);\n group!.appendChild(item);\n }\n}\n"]}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type cytoscape from 'cytoscape';
|
|
2
2
|
import type { GraphScene, GraphSceneEdge, GraphSceneNode } from './panelGraphScene.ts';
|
|
3
|
+
import { type GraphVisualTheme } from './panelVisualTheme.ts';
|
|
4
|
+
import { type FrameGraphDebugViewModel } from './debugCaptureModel.ts';
|
|
3
5
|
export { GRAPH_VISUAL_THEME } from './panelVisualTheme.ts';
|
|
4
6
|
export declare const GRAPH_GEOMETRY: {
|
|
5
7
|
readonly fitPadding: 28;
|
|
@@ -16,23 +18,33 @@ export declare const GRAPH_GEOMETRY: {
|
|
|
16
18
|
readonly left: 24;
|
|
17
19
|
};
|
|
18
20
|
readonly edgeCornerRadius: 6;
|
|
21
|
+
readonly outputWidth: 208;
|
|
22
|
+
readonly outputTipWidth: 24;
|
|
23
|
+
readonly outputLabelWidth: 160;
|
|
19
24
|
};
|
|
20
25
|
export type GraphLegendEntry = {
|
|
26
|
+
readonly group: 'Execution' | 'Resources' | 'Relationships';
|
|
21
27
|
readonly key: string;
|
|
22
28
|
readonly label: string;
|
|
23
29
|
readonly color: string;
|
|
24
|
-
readonly shape: 'box' | 'ellipse' | 'group' | 'line';
|
|
30
|
+
readonly shape: 'box' | 'cut-rectangle' | 'tag' | 'ellipse' | 'group' | 'line';
|
|
25
31
|
readonly lineStyle?: 'solid' | 'dotted' | 'dashed';
|
|
26
32
|
readonly hollowArrow?: boolean;
|
|
27
33
|
};
|
|
28
|
-
export declare function createGraphLegend(
|
|
29
|
-
export declare function createGraphStyles(): cytoscape.StylesheetJson;
|
|
30
|
-
export declare function nodeDimensions(node: GraphSceneNode): {
|
|
34
|
+
export declare function createGraphLegend(snapshot: FrameGraphDebugViewModel, theme?: GraphVisualTheme, showResourceDeclarations?: boolean): readonly GraphLegendEntry[];
|
|
35
|
+
export declare function createGraphStyles(theme?: GraphVisualTheme): cytoscape.StylesheetJson;
|
|
36
|
+
export declare function nodeDimensions(node: GraphSceneNode, theme?: GraphVisualTheme): {
|
|
31
37
|
readonly width: number;
|
|
32
38
|
readonly height: number;
|
|
33
39
|
};
|
|
40
|
+
/** Enlarge short labels within the existing box; retain the theme size for dense text. */
|
|
41
|
+
export declare function graphLabelFontSize(label: string, width: number, height: number, theme: GraphVisualTheme): number;
|
|
42
|
+
/** Wrap only the group name (up to two lines); keep the node-count row distinct. */
|
|
43
|
+
export declare function fitCollapsedGroupLabel(label: string, width: number, theme: GraphVisualTheme): string;
|
|
44
|
+
/** Fit the already semantic label to its available width after font changes. */
|
|
45
|
+
export declare function fitGraphLabel(label: string, width: number, theme: GraphVisualTheme): string;
|
|
34
46
|
export declare function graphLayoutGeometryKey(scene: GraphScene): string;
|
|
35
|
-
export declare function graphEdgeDisplayLabel(
|
|
47
|
+
export declare function graphEdgeDisplayLabel(_edge: GraphSceneEdge): string;
|
|
36
48
|
export declare function expandedGroupLabelMaxWidth(outerWidth: number): number;
|
|
37
|
-
export declare function isOverviewGraphScale(zoom: number): boolean;
|
|
49
|
+
export declare function isOverviewGraphScale(zoom: number, theme?: GraphVisualTheme): boolean;
|
|
38
50
|
//# sourceMappingURL=panelGraphVisuals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelGraphVisuals.d.ts","sourceRoot":"","sources":["../src/panel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