@zenfg/inspector 0.1.0-beta.1

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.
Files changed (123) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +74 -0
  3. package/dist/FrameGraphInspector.d.ts +153 -0
  4. package/dist/FrameGraphInspector.d.ts.map +1 -0
  5. package/dist/FrameGraphInspector.js +580 -0
  6. package/dist/FrameGraphInspector.js.map +1 -0
  7. package/dist/debugCaptureModel.d.ts +166 -0
  8. package/dist/debugCaptureModel.d.ts.map +1 -0
  9. package/dist/debugCaptureModel.js +364 -0
  10. package/dist/debugCaptureModel.js.map +1 -0
  11. package/dist/index.d.ts +17 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +15 -0
  14. package/dist/index.js.map +1 -0
  15. package/dist/panelAliasAnalysis.d.ts +20 -0
  16. package/dist/panelAliasAnalysis.d.ts.map +1 -0
  17. package/dist/panelAliasAnalysis.js +113 -0
  18. package/dist/panelAliasAnalysis.js.map +1 -0
  19. package/dist/panelCytoscapeGraphRenderer.d.ts +71 -0
  20. package/dist/panelCytoscapeGraphRenderer.d.ts.map +1 -0
  21. package/dist/panelCytoscapeGraphRenderer.js +559 -0
  22. package/dist/panelCytoscapeGraphRenderer.js.map +1 -0
  23. package/dist/panelDiagnosticsView.d.ts +22 -0
  24. package/dist/panelDiagnosticsView.d.ts.map +1 -0
  25. package/dist/panelDiagnosticsView.js +123 -0
  26. package/dist/panelDiagnosticsView.js.map +1 -0
  27. package/dist/panelDomHelpers.d.ts +26 -0
  28. package/dist/panelDomHelpers.d.ts.map +1 -0
  29. package/dist/panelDomHelpers.js +129 -0
  30. package/dist/panelDomHelpers.js.map +1 -0
  31. package/dist/panelGraphLayout.d.ts +28 -0
  32. package/dist/panelGraphLayout.d.ts.map +1 -0
  33. package/dist/panelGraphLayout.js +223 -0
  34. package/dist/panelGraphLayout.js.map +1 -0
  35. package/dist/panelGraphRenderer.d.ts +20 -0
  36. package/dist/panelGraphRenderer.d.ts.map +1 -0
  37. package/dist/panelGraphRenderer.js +2 -0
  38. package/dist/panelGraphRenderer.js.map +1 -0
  39. package/dist/panelGraphScene.d.ts +98 -0
  40. package/dist/panelGraphScene.d.ts.map +1 -0
  41. package/dist/panelGraphScene.js +559 -0
  42. package/dist/panelGraphScene.js.map +1 -0
  43. package/dist/panelGraphView.d.ts +9 -0
  44. package/dist/panelGraphView.d.ts.map +1 -0
  45. package/dist/panelGraphView.js +88 -0
  46. package/dist/panelGraphView.js.map +1 -0
  47. package/dist/panelGraphVisuals.d.ts +38 -0
  48. package/dist/panelGraphVisuals.d.ts.map +1 -0
  49. package/dist/panelGraphVisuals.js +330 -0
  50. package/dist/panelGraphVisuals.js.map +1 -0
  51. package/dist/panelIcons.d.ts +4 -0
  52. package/dist/panelIcons.d.ts.map +1 -0
  53. package/dist/panelIcons.js +43 -0
  54. package/dist/panelIcons.js.map +1 -0
  55. package/dist/panelInspectorView.d.ts +33 -0
  56. package/dist/panelInspectorView.d.ts.map +1 -0
  57. package/dist/panelInspectorView.js +357 -0
  58. package/dist/panelInspectorView.js.map +1 -0
  59. package/dist/panelMemoryView.d.ts +21 -0
  60. package/dist/panelMemoryView.d.ts.map +1 -0
  61. package/dist/panelMemoryView.js +134 -0
  62. package/dist/panelMemoryView.js.map +1 -0
  63. package/dist/panelPassesView.d.ts +31 -0
  64. package/dist/panelPassesView.d.ts.map +1 -0
  65. package/dist/panelPassesView.js +183 -0
  66. package/dist/panelPassesView.js.map +1 -0
  67. package/dist/panelResourcesView.d.ts +19 -0
  68. package/dist/panelResourcesView.d.ts.map +1 -0
  69. package/dist/panelResourcesView.js +89 -0
  70. package/dist/panelResourcesView.js.map +1 -0
  71. package/dist/panelSelection.d.ts +5 -0
  72. package/dist/panelSelection.d.ts.map +1 -0
  73. package/dist/panelSelection.js +88 -0
  74. package/dist/panelSelection.js.map +1 -0
  75. package/dist/panelTypes.d.ts +40 -0
  76. package/dist/panelTypes.d.ts.map +1 -0
  77. package/dist/panelTypes.js +2 -0
  78. package/dist/panelTypes.js.map +1 -0
  79. package/dist/panelVisualTheme.d.ts +76 -0
  80. package/dist/panelVisualTheme.d.ts.map +1 -0
  81. package/dist/panelVisualTheme.js +39 -0
  82. package/dist/panelVisualTheme.js.map +1 -0
  83. package/dist/panelWorkbenchHelpers.d.ts +34 -0
  84. package/dist/panelWorkbenchHelpers.d.ts.map +1 -0
  85. package/dist/panelWorkbenchHelpers.js +162 -0
  86. package/dist/panelWorkbenchHelpers.js.map +1 -0
  87. package/dist/panelWorkbenchView.d.ts +77 -0
  88. package/dist/panelWorkbenchView.d.ts.map +1 -0
  89. package/dist/panelWorkbenchView.js +409 -0
  90. package/dist/panelWorkbenchView.js.map +1 -0
  91. package/dist/query.d.ts +11 -0
  92. package/dist/query.d.ts.map +1 -0
  93. package/dist/query.js +21 -0
  94. package/dist/query.js.map +1 -0
  95. package/dist/styles.d.ts +8 -0
  96. package/dist/styles.d.ts.map +1 -0
  97. package/dist/styles.js +1073 -0
  98. package/dist/styles.js.map +1 -0
  99. package/package.json +29 -0
  100. package/src/FrameGraphInspector.ts +632 -0
  101. package/src/debugCaptureModel.ts +583 -0
  102. package/src/index.ts +21 -0
  103. package/src/panelAliasAnalysis.ts +164 -0
  104. package/src/panelCytoscapeGraphRenderer.ts +617 -0
  105. package/src/panelDiagnosticsView.ts +160 -0
  106. package/src/panelDomHelpers.ts +151 -0
  107. package/src/panelGraphLayout.ts +281 -0
  108. package/src/panelGraphRenderer.ts +21 -0
  109. package/src/panelGraphScene.ts +787 -0
  110. package/src/panelGraphView.ts +108 -0
  111. package/src/panelGraphVisuals.ts +364 -0
  112. package/src/panelIcons.ts +56 -0
  113. package/src/panelInspectorView.ts +377 -0
  114. package/src/panelMemoryView.ts +154 -0
  115. package/src/panelPassesView.ts +222 -0
  116. package/src/panelResourcesView.ts +115 -0
  117. package/src/panelSelection.ts +99 -0
  118. package/src/panelTypes.ts +28 -0
  119. package/src/panelVisualTheme.ts +39 -0
  120. package/src/panelWorkbenchHelpers.ts +216 -0
  121. package/src/panelWorkbenchView.ts +465 -0
  122. package/src/query.ts +22 -0
  123. package/src/styles.ts +1076 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panelGraphScene.js","sourceRoot":"","sources":["../src/panelGraphScene.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,iBAAiB,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAmHnF,MAAM,UAAU,gBAAgB,CAC5B,QAAkC,EAClC,OAAgC;IAEhC,OAAO,OAAO,CAAC,IAAI,KAAK,WAAW;QAC/B,CAAC,CAAC,wBAAwB,CAAC,QAAQ,CAAC;QACpC,CAAC,CAAC,oBAAoB,CAAC,QAAQ,EAAE,OAAO,CAAC,aAAa,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;AAC5F,CAAC;AAED,MAAM,UAAU,mBAAmB,CAAC,OAAe;IAC/C,OAAO,SAAS,OAAO,EAAE,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,SAAoB;IAC7C,QAAQ,SAAS,CAAC,IAAI,EAAE,CAAC;QACrB,KAAK,MAAM;YACP,OAAO,QAAQ,SAAS,CAAC,EAAE,EAAE,CAAC;QAClC,KAAK,OAAO;YACR,OAAO,SAAS,SAAS,CAAC,OAAO,EAAE,CAAC;QACxC,KAAK,UAAU;YACX,OAAO,YAAY,SAAS,CAAC,EAAE,EAAE,CAAC;QACtC,KAAK,YAAY;YACb,OAAO,cAAc,SAAS,CAAC,EAAE,EAAE,CAAC;QACxC,KAAK,MAAM;YACP,OAAO,QAAQ,SAAS,CAAC,KAAK,EAAE,CAAC;QACrC,KAAK,QAAQ;YACT,OAAO,UAAU,SAAS,CAAC,KAAK,EAAE,CAAC;QACvC,KAAK,SAAS;YACV,OAAO,WAAW,SAAS,CAAC,KAAK,EAAE,CAAC;IAC5C,CAAC;AACL,CAAC;AAED,SAAS,oBAAoB,CACzB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ACzB,MAAM,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QACxB,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC;QACrC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QACpB,MAAM,CAAC,GAAG,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;IAC5B,CAAC;IACD,OAAO,MAAM,CAAC;AAClB,CAAC","sourcesContent":["import type {\n FrameGraphDebugAccessEdge,\n FrameGraphDebugEdge,\n FrameGraphDebugGroup,\n FrameGraphDebugNode,\n FrameGraphDebugResource,\n FrameGraphDebugResourceRef,\n FrameGraphDebugViewModel,\n} from './debugCaptureModel.ts';\nimport { formatGpuDuration, labelNode, labelResource } from './panelDomHelpers.ts';\nimport type { GraphViewMode, Selection } from './panelTypes.ts';\n\nexport type GraphSceneElementId = string;\n\ntype GraphSceneNodeBase = {\n readonly id: GraphSceneElementId;\n readonly label: string;\n readonly overviewLabel: string;\n readonly title: string;\n readonly parentId?: GraphSceneElementId;\n};\n\nexport type PassSceneNode = GraphSceneNodeBase & {\n readonly kind: 'pass';\n readonly nodeId: string;\n readonly passKind: FrameGraphDebugNode['kind'];\n readonly executionSegmentIndex?: number;\n readonly gpuDurationMicros?: number;\n};\n\nexport type CulledPassSceneNode = GraphSceneNodeBase & {\n readonly kind: 'culled-pass';\n readonly culledIndex: number;\n readonly nodeId: string;\n readonly passKind: FrameGraphDebugNode['kind'];\n readonly reason: string;\n};\n\nexport type GroupSceneNode = GraphSceneNodeBase & {\n readonly kind: 'group';\n readonly groupId: string;\n readonly groupPathKey: string;\n readonly collapsed: boolean;\n readonly depthBand: 0 | 1;\n readonly childNodeIds: readonly GraphSceneElementId[];\n readonly representedNodeIds: readonly string[];\n readonly retainedNodeCount: number;\n readonly culledNodeCount: number;\n readonly gpuWorkDurationMicros: number;\n readonly timedNodeCount: number;\n readonly timingEligibleNodeCount: number;\n};\n\nexport type ResourceSceneNode = GraphSceneNodeBase & {\n readonly kind: 'resource';\n readonly resourceId: string;\n readonly resourceKind: FrameGraphDebugResource['kind'];\n};\n\nexport type GraphSceneNode = PassSceneNode | CulledPassSceneNode | GroupSceneNode | ResourceSceneNode;\n\ntype GraphSceneEdgeBase = {\n readonly id: GraphSceneElementId;\n readonly from: GraphSceneElementId;\n readonly to: GraphSceneElementId;\n readonly label?: string;\n readonly title: string;\n readonly resourceId: string;\n};\n\nexport type DependencySceneEdge = GraphSceneEdgeBase & {\n readonly kind: 'dependency';\n readonly dependencyKind: FrameGraphDebugEdge['kind'];\n readonly underlyingDependencies: readonly FrameGraphDebugEdge[];\n readonly underlyingDependencyCount: number;\n};\n\nexport type AccessSceneEdge = GraphSceneEdgeBase & {\n readonly kind: 'access';\n readonly accessId: string;\n readonly accessMode: FrameGraphDebugAccessEdge['mode'];\n readonly access: FrameGraphDebugAccessEdge['access'];\n readonly dashed: boolean;\n};\n\nexport type GraphSceneEdge = DependencySceneEdge | AccessSceneEdge;\n\nexport type GraphSemanticReferences = {\n readonly nodeIds: readonly string[];\n readonly groupPathKeys: readonly string[];\n readonly resourceIds: readonly string[];\n readonly accessIds: readonly string[];\n readonly dependencies: readonly FrameGraphDebugEdge[];\n};\n\nexport type GraphSceneInteractionIndex = {\n readonly selectionByElementId: ReadonlyMap<GraphSceneElementId, Selection>;\n readonly primaryElementIdsBySelection: ReadonlyMap<string, readonly GraphSceneElementId[]>;\n readonly relatedElementIdsBySelection: ReadonlyMap<string, readonly GraphSceneElementId[]>;\n readonly semanticReferencesByElementId: ReadonlyMap<GraphSceneElementId, GraphSemanticReferences>;\n};\n\nexport type GraphScene = {\n readonly mode: GraphViewMode;\n readonly nodes: readonly GraphSceneNode[];\n readonly edges: readonly GraphSceneEdge[];\n readonly topologyKey: string;\n readonly contentKey: string;\n readonly interaction: GraphSceneInteractionIndex;\n};\n\nexport type CreateGraphSceneOptions = {\n readonly mode: GraphViewMode;\n readonly groupsEnabled: boolean;\n readonly expandedGroupPaths: ReadonlySet<string>;\n};\n\ntype MutableInteractionIndex = {\n readonly selectionByElementId: Map<GraphSceneElementId, Selection>;\n readonly primaryElementIdsBySelection: Map<string, GraphSceneElementId[]>;\n readonly relatedElementIdsBySelection: Map<string, GraphSceneElementId[]>;\n readonly semanticReferencesByElementId: Map<GraphSceneElementId, GraphSemanticReferences>;\n};\n\nexport function createGraphScene(\n snapshot: FrameGraphDebugViewModel,\n options: CreateGraphSceneOptions,\n): GraphScene {\n return options.mode === 'resources'\n ? createResourceGraphScene(snapshot)\n : createPassGraphScene(snapshot, options.groupsEnabled, options.expandedGroupPaths);\n}\n\nexport function graphGroupElementId(pathKey: string): GraphSceneElementId {\n return `group:${pathKey}`;\n}\n\nexport function selectionKey(selection: Selection): string {\n switch (selection.kind) {\n case 'node':\n return `node:${selection.id}`;\n case 'group':\n return `group:${selection.pathKey}`;\n case 'resource':\n return `resource:${selection.id}`;\n case 'allocation':\n return `allocation:${selection.id}`;\n case 'root':\n return `root:${selection.index}`;\n case 'culled':\n return `culled:${selection.index}`;\n case 'segment':\n return `segment:${selection.index}`;\n }\n}\n\nfunction createPassGraphScene(\n snapshot: FrameGraphDebugViewModel,\n groupsEnabled: boolean,\n expandedGroupPaths: ReadonlySet<string>,\n): GraphScene {\n const interaction = createMutableInteractionIndex();\n const segmentByNodeId = executionSegmentByNodeId(snapshot);\n const groupsById = new Map(snapshot.debugGroups.map((group) => [group.id, group]));\n const useGroups = groupsEnabled && snapshot.debugGroups.length > 0;\n const isExpanded = (group: FrameGraphDebugGroup) => expandedGroupPaths.has(group.pathKey);\n const hasVisibleAncestors = (group: FrameGraphDebugGroup) => group.ancestorIds\n .slice(0, -1)\n .every((id) => isExpanded(groupsById.get(id)!));\n const includedGroups = useGroups\n ? snapshot.debugGroups.filter((group) => group.summary.retainedNodeCount > 0 && hasVisibleAncestors(group))\n : [];\n const includedGroupIds = new Set(includedGroups.map((group) => group.id));\n const representedNodeIdsByGroupId = new Map<string, string[]>();\n for (const node of snapshot.nodes) {\n const group = node.debugGroupId === undefined ? undefined : groupsById.get(node.debugGroupId);\n for (const groupId of group?.ancestorIds ?? []) {\n const represented = representedNodeIdsByGroupId.get(groupId) ?? [];\n represented.push(node.id);\n representedNodeIdsByGroupId.set(groupId, represented);\n }\n }\n const visiblePasses = snapshot.nodes.filter((node) => {\n if (!useGroups || node.debugGroupId === undefined) return true;\n return groupsById.get(node.debugGroupId)!.ancestorIds.every((id) => isExpanded(groupsById.get(id)!));\n });\n const visiblePassIds = new Set(visiblePasses.map((node) => node.id));\n const includedGroupsByParentId = indexByOptionalId(includedGroups, (group) => group.parentId);\n const visiblePassesByGroupId = indexByOptionalId(visiblePasses, (node) => node.debugGroupId);\n\n const groupNodes: GroupSceneNode[] = includedGroups.map((group) => {\n const id = graphGroupElementId(group.pathKey);\n const collapsed = !isExpanded(group);\n const representedNodeIds = representedNodeIdsByGroupId.get(group.id) ?? [];\n const childNodeIds = collapsed ? [] : [\n ...(includedGroupsByParentId.get(group.id) ?? [])\n .map((child) => graphGroupElementId(child.pathKey)),\n ...(visiblePassesByGroupId.get(group.id) ?? [])\n .map((node) => passElementId(node.id)),\n ];\n const node: GroupSceneNode = {\n id,\n kind: 'group',\n groupId: group.id,\n groupPathKey: group.pathKey,\n label: createGroupLabel(group, collapsed),\n overviewLabel: `${collapsed ? '▸' : '▾'} ${group.label}`,\n title: createGroupTitle(group),\n parentId: group.parentId !== undefined && includedGroupIds.has(group.parentId)\n ? graphGroupElementId(groupsById.get(group.parentId)!.pathKey)\n : undefined,\n collapsed,\n depthBand: group.ancestorIds.length % 2 as 0 | 1,\n childNodeIds,\n representedNodeIds,\n retainedNodeCount: group.summary.retainedNodeCount,\n culledNodeCount: group.summary.culledNodeCount,\n gpuWorkDurationMicros: group.summary.gpuWorkDurationMicros,\n timedNodeCount: group.summary.timedNodeCount,\n timingEligibleNodeCount: group.summary.timingEligibleNodeCount,\n };\n const selection: Selection = { kind: 'group', pathKey: group.pathKey };\n registerElement(interaction, node.id, selection, {\n nodeIds: representedNodeIds,\n groupPathKeys: [group.pathKey],\n resourceIds: [\n ...group.summary.inputResources.map((resource) => resource.id),\n ...group.summary.outputResources.map((resource) => resource.id),\n ],\n accessIds: [],\n dependencies: [],\n });\n return node;\n });\n\n const passNodes: PassSceneNode[] = visiblePasses.map((node) => {\n const segment = segmentByNodeId.get(node.id);\n const sceneNode: PassSceneNode = {\n id: passElementId(node.id),\n kind: 'pass',\n nodeId: node.id,\n passKind: node.kind,\n executionSegmentIndex: segment?.index,\n gpuDurationMicros: node.gpuDurationMicros,\n label: formatGraphNodeLabel(`${segmentLabel(segment)} ${labelNode(node)}`),\n overviewLabel: shortGraphLabel(labelNode(node)),\n title: createNodeTitle(node, segment, snapshot),\n parentId: useGroups && node.debugGroupId !== undefined\n ? graphGroupElementId(groupsById.get(node.debugGroupId)!.pathKey)\n : undefined,\n };\n const selection: Selection = { kind: 'node', id: node.id };\n registerElement(interaction, sceneNode.id, selection, emptyReferences({ nodeIds: [node.id] }));\n return sceneNode;\n });\n\n const representativeByNodeId = new Map<string, GraphSceneElementId>();\n for (const node of snapshot.nodes) {\n if (visiblePassIds.has(node.id)) {\n representativeByNodeId.set(node.id, passElementId(node.id));\n continue;\n }\n const group = groupsById.get(node.debugGroupId!)!;\n const collapsedAncestorId = group.ancestorIds.find((id) => !isExpanded(groupsById.get(id)!));\n representativeByNodeId.set(node.id, graphGroupElementId(groupsById.get(collapsedAncestorId!)!.pathKey));\n }\n\n for (const node of snapshot.nodes) {\n const representative = representativeByNodeId.get(node.id)!;\n setSelectionElements(interaction, { kind: 'node', id: node.id }, [representative], [representative]);\n }\n if (useGroups) {\n for (const group of snapshot.debugGroups) {\n if (includedGroupIds.has(group.id)) continue;\n const collapsedAncestorId = group.ancestorIds.find((id) => !isExpanded(groupsById.get(id)!));\n if (collapsedAncestorId !== undefined) {\n const representative = graphGroupElementId(groupsById.get(collapsedAncestorId)!.pathKey);\n setSelectionElements(interaction, { kind: 'group', pathKey: group.pathKey }, [representative], [representative]);\n }\n }\n }\n\n const dependencyEdges = useGroups\n ? createFoldedDependencyEdges(snapshot.edges, representativeByNodeId)\n : snapshot.edges.map((edge, index) => createDependencySceneEdge(\n edge,\n passElementId(edge.fromNodeId),\n passElementId(edge.toNodeId),\n [edge],\n index,\n ));\n for (const edge of dependencyEdges) {\n const selection: Selection = { kind: 'resource', id: edge.resourceId };\n interaction.selectionByElementId.set(edge.id, selection);\n appendSelectionElement(interaction.primaryElementIdsBySelection, selection, edge.id);\n appendSelectionElement(interaction.relatedElementIdsBySelection, selection, edge.id);\n interaction.semanticReferencesByElementId.set(edge.id, {\n nodeIds: unique(edge.underlyingDependencies.flatMap((dependency) => [dependency.fromNodeId, dependency.toNodeId])),\n groupPathKeys: [],\n resourceIds: [edge.resourceId],\n accessIds: [],\n dependencies: edge.underlyingDependencies,\n });\n }\n\n return finalizeScene('passes', [...groupNodes, ...passNodes], dependencyEdges, interaction);\n}\n\nfunction createResourceGraphScene(snapshot: FrameGraphDebugViewModel): GraphScene {\n const interaction = createMutableInteractionIndex();\n const segmentByNodeId = executionSegmentByNodeId(snapshot);\n const accessesByResourceId = indexAccessesByResourceId(snapshot.accessEdges);\n const passNodes: PassSceneNode[] = snapshot.nodes.map((node) => {\n const segment = segmentByNodeId.get(node.id);\n const sceneNode: PassSceneNode = {\n id: passElementId(node.id),\n kind: 'pass',\n nodeId: node.id,\n passKind: node.kind,\n executionSegmentIndex: segment?.index,\n gpuDurationMicros: node.gpuDurationMicros,\n label: formatGraphNodeLabel(`${segmentLabel(segment)} ${labelNode(node)}`),\n overviewLabel: shortGraphLabel(labelNode(node)),\n title: createNodeTitle(node, segment, snapshot),\n };\n registerElement(\n interaction,\n sceneNode.id,\n { kind: 'node', id: node.id },\n emptyReferences({ nodeIds: [node.id] }),\n );\n return sceneNode;\n });\n const culledNodes: CulledPassSceneNode[] = snapshot.culledNodes.map((culled, index) => {\n const sceneNode: CulledPassSceneNode = {\n id: culledPassElementId(index, culled.node.id),\n kind: 'culled-pass',\n culledIndex: index,\n nodeId: culled.node.id,\n passKind: culled.node.kind,\n reason: culled.reason,\n label: `${formatGraphNodeLabel(labelNode(culled.node))}\\n(culled)`,\n overviewLabel: `${shortGraphLabel(labelNode(culled.node))} (culled)`,\n title: createCulledNodeTitle(culled),\n };\n registerElement(\n interaction,\n sceneNode.id,\n { kind: 'culled', index },\n emptyReferences({ nodeIds: [culled.node.id] }),\n );\n return sceneNode;\n });\n const resourceNodes: ResourceSceneNode[] = snapshot.resources.map((resource) => {\n const sceneNode: ResourceSceneNode = {\n id: resourceElementId(resource.id),\n kind: 'resource',\n resourceId: resource.id,\n resourceKind: resource.kind,\n label: formatGraphResourceLabel(labelResource(resource)),\n overviewLabel: shortGraphLabel(labelResource(resource)),\n title: createResourceTitle(resource, snapshot, accessesByResourceId.get(resource.id) ?? []),\n };\n registerElement(\n interaction,\n sceneNode.id,\n { kind: 'resource', id: resource.id },\n emptyReferences({ resourceIds: [resource.id] }),\n );\n return sceneNode;\n });\n const culledNodeIds = new Map(snapshot.culledNodes.map((culled, index) => [\n culled.node.id,\n culledPassElementId(index, culled.node.id),\n ]));\n const accessEdges: AccessSceneEdge[] = snapshot.accessEdges.map((access) => {\n const passId = culledNodeIds.get(access.nodeId) ?? passElementId(access.nodeId);\n const resourceId = resourceElementId(access.resource.id);\n const edge: AccessSceneEdge = {\n id: accessElementId(access.accessId, access.resource.id),\n kind: 'access',\n from: access.mode === 'write' ? passId : resourceId,\n to: access.mode === 'write' ? resourceId : passId,\n label: access.access,\n title: createAccessTitle(access),\n resourceId: access.resource.id,\n accessId: access.accessId,\n accessMode: access.mode,\n access: access.access,\n dashed: culledNodeIds.has(access.nodeId),\n };\n const selection: Selection = { kind: 'resource', id: access.resource.id };\n interaction.selectionByElementId.set(edge.id, selection);\n appendSelectionElement(interaction.relatedElementIdsBySelection, selection, edge.id);\n interaction.semanticReferencesByElementId.set(edge.id, {\n nodeIds: [access.nodeId],\n groupPathKeys: [],\n resourceIds: [access.resource.id],\n accessIds: [access.accessId],\n dependencies: [],\n });\n return edge;\n });\n\n return finalizeScene('resources', [...passNodes, ...culledNodes, ...resourceNodes], accessEdges, interaction);\n}\n\nexport function indexAccessesByResourceId(\n accesses: readonly FrameGraphDebugAccessEdge[],\n): ReadonlyMap<string, readonly FrameGraphDebugAccessEdge[]> {\n const result = new Map<string, FrameGraphDebugAccessEdge[]>();\n for (const access of accesses) {\n const resourceAccesses = result.get(access.resource.id);\n if (resourceAccesses) {\n resourceAccesses.push(access);\n } else {\n result.set(access.resource.id, [access]);\n }\n }\n return result;\n}\n\nfunction createFoldedDependencyEdges(\n dependencies: readonly FrameGraphDebugEdge[],\n representativeByNodeId: ReadonlyMap<string, GraphSceneElementId>,\n): DependencySceneEdge[] {\n const dependenciesByKey = new Map<string, {\n readonly from: GraphSceneElementId;\n readonly to: GraphSceneElementId;\n readonly resource: FrameGraphDebugResourceRef;\n readonly dependencies: FrameGraphDebugEdge[];\n }>();\n for (const dependency of dependencies) {\n const from = representativeByNodeId.get(dependency.fromNodeId)!;\n const to = representativeByNodeId.get(dependency.toNodeId)!;\n if (from === to) continue;\n const key = JSON.stringify([from, to, dependency.resource.id]);\n const existing = dependenciesByKey.get(key);\n if (existing) {\n existing.dependencies.push(dependency);\n } else {\n dependenciesByKey.set(key, { from, to, resource: dependency.resource, dependencies: [dependency] });\n }\n }\n return [...dependenciesByKey.values()].map((entry, index) => createDependencySceneEdge(\n entry.dependencies.find((dependency) => dependency.kind === 'value') ?? entry.dependencies[0]!,\n entry.from,\n entry.to,\n entry.dependencies,\n index,\n ));\n}\n\nfunction createDependencySceneEdge(\n dependency: FrameGraphDebugEdge,\n from: GraphSceneElementId,\n to: GraphSceneElementId,\n underlyingDependencies: readonly FrameGraphDebugEdge[],\n occurrence: number,\n): DependencySceneEdge {\n const dependencyKind = underlyingDependencies.some((edge) => edge.kind === 'value') ? 'value' : 'ordering';\n return {\n id: `dependency:${JSON.stringify([from, to, dependency.resource.id, occurrence])}`,\n kind: 'dependency',\n from,\n to,\n title: `${labelResource(dependency.resource)}${underlyingDependencies.length > 1\n ? `\\n${underlyingDependencies.length} folded dependencies`\n : ''}`,\n resourceId: dependency.resource.id,\n dependencyKind,\n underlyingDependencies,\n underlyingDependencyCount: underlyingDependencies.length,\n };\n}\n\nfunction finalizeScene(\n mode: GraphViewMode,\n nodes: readonly GraphSceneNode[],\n edges: readonly GraphSceneEdge[],\n interaction: MutableInteractionIndex,\n): GraphScene {\n const topologyKey = JSON.stringify({\n mode,\n nodes: nodes.map((node) => [node.id, node.kind, node.parentId, node.kind === 'group' ? node.collapsed : undefined]),\n edges: edges.map((edge) => [edge.id, edge.kind, edge.from, edge.to]),\n });\n const contentKey = JSON.stringify({\n mode,\n nodes: nodes.map((node) => [\n node.id,\n node.kind,\n node.parentId,\n node.label,\n node.overviewLabel,\n node.title,\n node.kind === 'pass' || node.kind === 'culled-pass' ? node.passKind : undefined,\n node.kind === 'resource' ? node.resourceKind : undefined,\n node.kind === 'group' ? node.collapsed : undefined,\n node.kind === 'group' ? node.depthBand : undefined,\n node.kind === 'group' ? node.culledNodeCount > 0 : undefined,\n ]),\n edges: edges.map((edge) => [\n edge.id,\n edge.kind,\n edge.from,\n edge.to,\n edge.label,\n edge.title,\n edge.kind === 'dependency' ? edge.dependencyKind : undefined,\n edge.kind === 'access' ? edge.accessMode : undefined,\n edge.kind === 'access' ? edge.dashed : undefined,\n ]),\n });\n return {\n mode,\n nodes,\n edges,\n topologyKey,\n contentKey,\n interaction,\n };\n}\n\nfunction createMutableInteractionIndex(): MutableInteractionIndex {\n return {\n selectionByElementId: new Map(),\n primaryElementIdsBySelection: new Map(),\n relatedElementIdsBySelection: new Map(),\n semanticReferencesByElementId: new Map(),\n };\n}\n\nfunction registerElement(\n interaction: MutableInteractionIndex,\n elementId: GraphSceneElementId,\n selection: Selection,\n references: GraphSemanticReferences,\n): void {\n interaction.selectionByElementId.set(elementId, selection);\n setSelectionElements(interaction, selection, [elementId], [elementId]);\n interaction.semanticReferencesByElementId.set(elementId, references);\n}\n\nfunction setSelectionElements(\n interaction: MutableInteractionIndex,\n selection: Selection,\n primary: readonly GraphSceneElementId[],\n related: readonly GraphSceneElementId[],\n): void {\n interaction.primaryElementIdsBySelection.set(selectionKey(selection), [...primary]);\n interaction.relatedElementIdsBySelection.set(selectionKey(selection), [...related]);\n}\n\nfunction appendSelectionElement(\n map: Map<string, GraphSceneElementId[]>,\n selection: Selection,\n elementId: GraphSceneElementId,\n): void {\n const key = selectionKey(selection);\n const elementIds = map.get(key) ?? [];\n if (!elementIds.includes(elementId)) elementIds.push(elementId);\n map.set(key, elementIds);\n}\n\nfunction emptyReferences(overrides: Partial<GraphSemanticReferences>): GraphSemanticReferences {\n return {\n nodeIds: [],\n groupPathKeys: [],\n resourceIds: [],\n accessIds: [],\n dependencies: [],\n ...overrides,\n };\n}\n\nfunction passElementId(nodeId: string): GraphSceneElementId {\n return `pass:${nodeId}`;\n}\n\nfunction culledPassElementId(index: number, nodeId: string): GraphSceneElementId {\n return `culled-pass:${index}:${nodeId}`;\n}\n\nfunction resourceElementId(resourceId: string): GraphSceneElementId {\n return `resource:${resourceId}`;\n}\n\nfunction accessElementId(accessId: string, resourceId: string): GraphSceneElementId {\n return `access:${accessId}:${resourceId}`;\n}\n\nfunction formatGraphNodeLabel(label: string): string {\n return formatGraphLabel(label, 20, 3);\n}\n\nfunction formatGraphResourceLabel(label: string): string {\n return formatGraphLabel(label, 18, 3);\n}\n\nfunction formatGraphLabel(label: string, maxLineLength: number, maxLines: number): string {\n if (label.length <= maxLineLength) return label;\n const chunks = label.match(/[^.]+\\.?/g) ?? [label];\n const lines: string[] = [];\n let current = '';\n let truncated = false;\n for (const chunk of chunks) {\n const next = current ? `${current}${chunk}` : chunk;\n if (current && next.length > maxLineLength) {\n lines.push(current);\n current = chunk;\n if (lines.length === maxLines) {\n truncated = true;\n break;\n }\n continue;\n }\n if (!current && chunk.length > maxLineLength) {\n const wrapped = splitLongGraphLabelChunk(chunk, maxLineLength);\n for (const line of wrapped) {\n if (lines.length === maxLines) {\n truncated = true;\n break;\n }\n lines.push(line);\n }\n current = '';\n if (truncated) break;\n continue;\n }\n current = next;\n }\n if (current && lines.length < maxLines) lines.push(current);\n else if (current) truncated = true;\n if (lines.length > maxLines) {\n lines.length = maxLines;\n truncated = true;\n }\n if (truncated && lines.length > 0) {\n const line = lines[lines.length - 1]!;\n lines[lines.length - 1] = line.length < maxLineLength\n ? `${line}…`\n : `${line.slice(0, Math.max(1, maxLineLength - 1))}…`;\n }\n return lines.join('\\n');\n}\n\nfunction splitLongGraphLabelChunk(label: string, maxLineLength: number): string[] {\n const chunks = label.match(/[^\\s_\\-/]+[\\s_\\-/]*/g) ?? [label];\n const lines: string[] = [];\n let current = '';\n for (const chunk of chunks) {\n const next = current ? `${current}${chunk}` : chunk;\n if (current && next.length > maxLineLength) {\n lines.push(current);\n current = chunk;\n } else if (!current && chunk.length > maxLineLength) {\n for (let index = 0; index < chunk.length; index += maxLineLength) {\n lines.push(chunk.slice(index, index + maxLineLength));\n }\n } else {\n current = next;\n }\n }\n if (current) lines.push(current);\n return lines;\n}\n\nfunction shortGraphLabel(label: string): string {\n const parts = label.split(/[./]/).filter(Boolean);\n const last = parts[parts.length - 1] ?? label;\n const short = parts.length > 1 && (/^\\d+$/.test(last) || /^view#\\d+$/.test(last))\n ? `${parts[parts.length - 2]}.${last}`\n : last;\n return short.length <= 18 ? short : `${short.slice(0, 17)}…`;\n}\n\nfunction createGroupLabel(group: FrameGraphDebugGroup, collapsed: boolean): string {\n const summary = group.summary;\n const gpu = summary.timingEligibleNodeCount === 0\n ? 'no timed passes'\n : `Σ ${(summary.gpuWorkDurationMicros / 1000).toFixed(3)} ms ${summary.timedNodeCount}/${summary.timingEligibleNodeCount}`;\n return `${collapsed ? '▸' : '▾'} ${group.label} · ${summary.retainedNodeCount} retained · ${summary.culledNodeCount} culled · ${gpu}`;\n}\n\nfunction createNodeTitle(\n node: FrameGraphDebugNode,\n segment: FrameGraphDebugViewModel['executionSegments'][number] | undefined,\n snapshot: FrameGraphDebugViewModel,\n): string {\n return [\n labelNode(node),\n `kind: ${node.kind}`,\n `group: ${debugGroupPathForId(node.debugGroupId, snapshot)}`,\n `segment: ${segment ? `${segment.index}:${segment.kind}` : '-'}`,\n `gpu: ${node.kind === 'external-submission' ? 'opaque' : `${formatGpuDuration(node)} ms`}`,\n `reads: ${node.reads.map((access) => labelResource(access.resource)).join(', ') || '-'}`,\n `writes: ${node.writes.map((access) => labelResource(access.resource)).join(', ') || '-'}`,\n ].join('\\n');\n}\n\nfunction createGroupTitle(group: FrameGraphDebugGroup): string {\n const summary = group.summary;\n return [\n group.path.join(' / '),\n `retained: ${summary.retainedNodeCount}`,\n `culled: ${summary.culledNodeCount}`,\n `inputs: ${summary.inputResources.map(labelResource).join(', ') || '-'}`,\n `outputs: ${summary.outputResources.map(labelResource).join(', ') || '-'}`,\n `transient registered/accessed: ${summary.registeredTransientResourceCount}/${summary.accessedTransientResourceCount}`,\n `physical allocations: ${summary.physicalAllocationCount}`,\n `segments: ${summary.executionSegmentCount}`,\n `opaque: ${summary.externalSubmissionCount}`,\n `Σ GPU work: ${(summary.gpuWorkDurationMicros / 1000).toFixed(3)} ms (${summary.timedNodeCount}/${summary.timingEligibleNodeCount})`,\n ].join('\\n');\n}\n\nfunction createCulledNodeTitle(culled: FrameGraphDebugViewModel['culledNodes'][number]): string {\n return [\n `${labelNode(culled.node)} (culled)`,\n `kind: ${culled.node.kind}`,\n `reason: ${culled.reason}`,\n `reads: ${culled.node.reads.map((access) => labelResource(access.resource)).join(', ') || '-'}`,\n `writes: ${culled.node.writes.map((access) => labelResource(access.resource)).join(', ') || '-'}`,\n ].join('\\n');\n}\n\nfunction createResourceTitle(\n resource: FrameGraphDebugResource,\n snapshot: FrameGraphDebugViewModel,\n accesses: readonly FrameGraphDebugAccessEdge[],\n): string {\n return [\n labelResource(resource),\n `kind: ${resource.kind}`,\n `origin: ${resource.origin}`,\n `registered in: ${debugGroupPathForId(resource.debugGroupId, snapshot)}`,\n `lifetime: ${resource.lifetime ? `${resource.lifetime.firstUse}-${resource.lifetime.lastUse}` : '-'}`,\n `physical: ${resource.physicalResourceId ?? '-'}`,\n `reads: ${accesses.filter((access) => access.mode === 'read').length}`,\n `writes: ${accesses.filter((access) => access.mode === 'write').length}`,\n ].join('\\n');\n}\n\nfunction createAccessTitle(access: FrameGraphDebugAccessEdge): string {\n return [\n `#${access.accessId} ${access.mode}`,\n labelResource(access.resource),\n `access: ${access.access}`,\n access.mode === 'write' ? `contents: ${access.contents}` : undefined,\n access.mode === 'write' ? `result: ${access.producesValue ? 'produced' : 'discarded'}` : undefined,\n access.textureViewId === undefined ? undefined : `texture view: #${access.textureViewId}`,\n access.textureRegion ? `texture: mip ${access.textureRegion.baseMipLevel}+${access.textureRegion.mipLevelCount}, layer ${access.textureRegion.baseArrayLayer ?? 0}+${access.textureRegion.arrayLayerCount ?? 1}, depth ${access.textureRegion.baseDepthSlice ?? 0}+${access.textureRegion.depthSliceCount ?? 1}, ${access.textureRegion.aspect}` : undefined,\n access.bufferRange ? `buffer: ${access.bufferRange.offset}+${access.bufferRange.size ?? 'end'}` : undefined,\n ].filter(Boolean).join('\\n');\n}\n\nfunction debugGroupPathForId(groupId: string | undefined, snapshot: FrameGraphDebugViewModel): string {\n if (groupId === undefined) return '-';\n return snapshot.debugGroups.find((group) => group.id === groupId)?.path.join(' / ') ?? `#${groupId}`;\n}\n\nfunction executionSegmentByNodeId(snapshot: FrameGraphDebugViewModel) {\n return new Map(snapshot.executionSegments.flatMap((segment) => segment.nodeIds.map((nodeId) => [nodeId, segment] as const)));\n}\n\nfunction segmentLabel(segment: FrameGraphDebugViewModel['executionSegments'][number] | undefined): string {\n return segment ? `[S${segment.index}]` : '[S-]';\n}\n\nfunction unique<T>(values: readonly T[]): T[] {\n return [...new Set(values)];\n}\n\nfunction indexByOptionalId<T>(\n values: readonly T[],\n getId: (value: T) => string | undefined,\n): ReadonlyMap<string | undefined, readonly T[]> {\n const result = new Map<string | undefined, T[]>();\n for (const value of values) {\n const id = getId(value);\n const indexed = result.get(id) ?? [];\n indexed.push(value);\n result.set(id, indexed);\n }\n return result;\n}\n"]}
@@ -0,0 +1,9 @@
1
+ import type { FrameGraphDebugViewModel } from './debugCaptureModel.ts';
2
+ import { type GraphScene } from './panelGraphScene.ts';
3
+ import type { GraphViewState, Selection } from './panelTypes.ts';
4
+ export declare function renderGraphView(graphView: GraphViewState, snapshot: FrameGraphDebugViewModel, selected: Selection | undefined, hovered: Selection | undefined, onSelect: (selection: Selection) => void, onHover: (selection: Selection | undefined) => void, onToggleGroup: (pathKey: string) => void): void;
5
+ export declare function resolveGraphScene(graphView: GraphViewState, snapshot: FrameGraphDebugViewModel): GraphScene;
6
+ export declare function fitGraph(graphView: GraphViewState): void;
7
+ export declare function resizeGraph(graphView: GraphViewState): void;
8
+ export declare function destroyGraph(graphView: GraphViewState): void;
9
+ //# sourceMappingURL=panelGraphView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panelGraphView.d.ts","sourceRoot":"","sources":["../src/panelGraphView.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAEvE,OAAO,EAAoB,KAAK,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAEzE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAUjE,wBAAgB,eAAe,CAC3B,SAAS,EAAE,cAAc,EACzB,QAAQ,EAAE,wBAAwB,EAClC,QAAQ,EAAE,SAAS,GAAG,SAAS,EAC/B,OAAO,EAAE,SAAS,GAAG,SAAS,EAC9B,QAAQ,EAAE,CAAC,SAAS,EAAE,SAAS,KAAK,IAAI,EACxC,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,GAAG,SAAS,KAAK,IAAI,EACnD,aAAa,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,GACzC,IAAI,CA6BN;AAED,wBAAgB,iBAAiB,CAC7B,SAAS,EAAE,cAAc,EACzB,QAAQ,EAAE,wBAAwB,GACnC,UAAU,CAeZ;AAED,wBAAgB,QAAQ,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,CAExD;AAED,wBAAgB,WAAW,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,CAE3D;AAED,wBAAgB,YAAY,CAAC,SAAS,EAAE,cAAc,GAAG,IAAI,CAI5D"}
@@ -0,0 +1,88 @@
1
+ import { CytoscapeGraphRenderer } from "./panelCytoscapeGraphRenderer.js";
2
+ import { createGraphScene } from "./panelGraphScene.js";
3
+ import { createGraphLegend } from "./panelGraphVisuals.js";
4
+ const graphSceneCache = new WeakMap();
5
+ export function renderGraphView(graphView, snapshot, selected, hovered, onSelect, onHover, onToggleGroup) {
6
+ const scene = resolveGraphScene(graphView, snapshot);
7
+ renderGraphLegend(graphView.legend, scene);
8
+ const elementCount = scene.nodes.length + scene.edges.length;
9
+ const layoutElementBudget = graphView.layoutElementBudget ?? Number.MAX_SAFE_INTEGER;
10
+ if (elementCount > layoutElementBudget) {
11
+ graphView.renderer?.destroy();
12
+ graphView.renderer = undefined;
13
+ const notice = document.createElement('div');
14
+ notice.className = 'zenfg-inspector-graph-status';
15
+ notice.dataset.state = 'empty';
16
+ notice.setAttribute('role', 'status');
17
+ notice.textContent = `Automatic layout disabled: ${elementCount} graph elements exceed the ${layoutElementBudget} element budget. Passes, Resources, Memory, Diagnostics, and raw data remain available.`;
18
+ graphView.host.replaceChildren(notice);
19
+ return;
20
+ }
21
+ graphView.renderer ??= new CytoscapeGraphRenderer(graphView.host);
22
+ graphView.renderer.render({
23
+ scene,
24
+ selected,
25
+ hovered,
26
+ fit: graphView.fitOnNextRender,
27
+ anchorElementId: graphView.anchorElementIdOnNextRender,
28
+ onSelect,
29
+ onHover,
30
+ onToggleGroup,
31
+ });
32
+ graphView.fitOnNextRender = false;
33
+ graphView.anchorElementIdOnNextRender = undefined;
34
+ }
35
+ export function resolveGraphScene(graphView, snapshot) {
36
+ const optionsKey = JSON.stringify([
37
+ graphView.graphMode,
38
+ graphView.groupsEnabled,
39
+ [...graphView.expandedGroupPaths].sort(),
40
+ ]);
41
+ const cached = graphSceneCache.get(graphView);
42
+ if (cached?.snapshot === snapshot && cached.optionsKey === optionsKey)
43
+ return cached.scene;
44
+ const scene = createGraphScene(snapshot, {
45
+ mode: graphView.graphMode,
46
+ groupsEnabled: graphView.groupsEnabled,
47
+ expandedGroupPaths: graphView.expandedGroupPaths,
48
+ });
49
+ graphSceneCache.set(graphView, { snapshot, optionsKey, scene });
50
+ return scene;
51
+ }
52
+ export function fitGraph(graphView) {
53
+ graphView.renderer?.fit();
54
+ }
55
+ export function resizeGraph(graphView) {
56
+ graphView.renderer?.resize();
57
+ }
58
+ export function destroyGraph(graphView) {
59
+ graphView.renderer?.destroy();
60
+ graphView.renderer = undefined;
61
+ graphSceneCache.delete(graphView);
62
+ }
63
+ function renderGraphLegend(host, scene) {
64
+ if (!host)
65
+ return;
66
+ const entries = createGraphLegend(scene);
67
+ const key = entries.map((entry) => entry.key).join('|');
68
+ if (host.dataset.legendKey === key)
69
+ return;
70
+ host.dataset.legendKey = key;
71
+ host.replaceChildren(...entries.map((entry) => {
72
+ const item = document.createElement('span');
73
+ item.className = 'zenfg-inspector-legend-item';
74
+ const swatch = document.createElement('span');
75
+ swatch.className = 'zenfg-inspector-legend-swatch';
76
+ swatch.dataset.shape = entry.shape;
77
+ if (entry.lineStyle)
78
+ swatch.dataset.lineStyle = entry.lineStyle;
79
+ if (entry.hollowArrow)
80
+ swatch.dataset.hollowArrow = 'true';
81
+ swatch.style.setProperty('--zenfg-inspector-legend-color', entry.color);
82
+ const label = document.createElement('span');
83
+ label.textContent = entry.label;
84
+ item.append(swatch, label);
85
+ return item;
86
+ }));
87
+ }
88
+ //# sourceMappingURL=panelGraphView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panelGraphView.js","sourceRo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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"]}
@@ -0,0 +1,38 @@
1
+ import type cytoscape from 'cytoscape';
2
+ import type { GraphScene, GraphSceneEdge, GraphSceneNode } from './panelGraphScene.ts';
3
+ export { GRAPH_VISUAL_THEME } from './panelVisualTheme.ts';
4
+ export declare const GRAPH_GEOMETRY: {
5
+ readonly fitPadding: 28;
6
+ readonly baseFontSize: 13;
7
+ readonly overviewFontThreshold: 9;
8
+ readonly minimumZoomedFontSize: 5;
9
+ readonly groupTitleInset: 8;
10
+ readonly groupTitleLineHeight: 1.2;
11
+ readonly groupPadding: 32;
12
+ readonly elkGroupPadding: {
13
+ readonly top: 46;
14
+ readonly right: 24;
15
+ readonly bottom: 24;
16
+ readonly left: 24;
17
+ };
18
+ readonly edgeCornerRadius: 6;
19
+ };
20
+ export type GraphLegendEntry = {
21
+ readonly key: string;
22
+ readonly label: string;
23
+ readonly color: string;
24
+ readonly shape: 'box' | 'ellipse' | 'group' | 'line';
25
+ readonly lineStyle?: 'solid' | 'dotted' | 'dashed';
26
+ readonly hollowArrow?: boolean;
27
+ };
28
+ export declare function createGraphLegend(scene: GraphScene): readonly GraphLegendEntry[];
29
+ export declare function createGraphStyles(): cytoscape.StylesheetJson;
30
+ export declare function nodeDimensions(node: GraphSceneNode): {
31
+ readonly width: number;
32
+ readonly height: number;
33
+ };
34
+ export declare function graphLayoutGeometryKey(scene: GraphScene): string;
35
+ export declare function graphEdgeDisplayLabel(edge: GraphSceneEdge): string;
36
+ export declare function expandedGroupLabelMaxWidth(outerWidth: number): number;
37
+ export declare function isOverviewGraphScale(zoom: number): boolean;
38
+ //# sourceMappingURL=panelGraphVisuals.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"panelGraphVisuals.d.ts","sourceRoot":"","sources":["../src/panelGraphVisuals.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAA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heme.js";
3
+ export const GRAPH_GEOMETRY = {
4
+ fitPadding: 28,
5
+ baseFontSize: 13,
6
+ overviewFontThreshold: 9,
7
+ minimumZoomedFontSize: 5,
8
+ groupTitleInset: 8,
9
+ groupTitleLineHeight: 1.2,
10
+ groupPadding: 32,
11
+ elkGroupPadding: { top: 46, right: 24, bottom: 24, left: 24 },
12
+ edgeCornerRadius: 6,
13
+ };
14
+ const ENDPOINT_EDGE_DISTANCES = 'endpoints';
15
+ const EDGE_SEGMENT_RADII = `${GRAPH_GEOMETRY.edgeCornerRadius}px`;
16
+ const NODE_LEGEND_ENTRIES = {
17
+ render: nodeLegend('render', 'Render', GRAPH_VISUAL_THEME.render.stroke),
18
+ compute: nodeLegend('compute', 'Compute', GRAPH_VISUAL_THEME.compute.stroke),
19
+ copy: nodeLegend('copy', 'Copy', GRAPH_VISUAL_THEME.copy.stroke),
20
+ 'clear-buffer': nodeLegend('clear', 'Clear', GRAPH_VISUAL_THEME.clear.stroke),
21
+ command: nodeLegend('command', 'Command', GRAPH_VISUAL_THEME.command.stroke),
22
+ 'external-submission': nodeLegend('external', 'External', GRAPH_VISUAL_THEME.external.stroke),
23
+ };
24
+ export function createGraphLegend(scene) {
25
+ const entries = [];
26
+ const passKinds = new Set(scene.nodes.flatMap((node) => node.kind === 'pass' || node.kind === 'culled-pass'
27
+ ? [node.passKind]
28
+ : []));
29
+ for (const kind of ['render', 'compute', 'copy', 'clear-buffer', 'command', 'external-submission']) {
30
+ if (passKinds.has(kind))
31
+ entries.push(NODE_LEGEND_ENTRIES[kind]);
32
+ }
33
+ if (scene.nodes.some((node) => node.kind === 'group')) {
34
+ entries.push({ key: 'group', label: 'Group', color: GRAPH_VISUAL_THEME.group.stroke, shape: 'group' });
35
+ }
36
+ if (scene.nodes.some((node) => node.kind === 'resource' && node.resourceKind === 'texture')) {
37
+ entries.push({ key: 'texture', label: 'Texture', color: GRAPH_VISUAL_THEME.texture.stroke, shape: 'ellipse' });
38
+ }
39
+ if (scene.nodes.some((node) => node.kind === 'resource' && node.resourceKind === 'buffer')) {
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')) {
55
+ entries.push({
56
+ ...edgeLegend('ordering', 'Order', GRAPH_VISUAL_THEME.dependency.ordering, 'dotted'),
57
+ hollowArrow: true,
58
+ });
59
+ }
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
+ return entries;
67
+ }
68
+ export function createGraphStyles() {
69
+ const theme = GRAPH_VISUAL_THEME;
70
+ return [
71
+ {
72
+ selector: 'node',
73
+ style: {
74
+ 'shape': 'round-rectangle',
75
+ 'width': 'data(width)',
76
+ 'height': 'data(height)',
77
+ 'label': 'data(displayLabel)',
78
+ 'text-wrap': 'wrap',
79
+ 'text-max-width': '160px',
80
+ 'font-family': 'ui-monospace, SFMono-Regular, Consolas, Liberation Mono, monospace',
81
+ 'font-size': GRAPH_GEOMETRY.baseFontSize,
82
+ 'min-zoomed-font-size': GRAPH_GEOMETRY.minimumZoomedFontSize,
83
+ 'color': theme.text,
84
+ 'background-color': theme.surfaceRaised,
85
+ 'border-color': theme.group.stroke,
86
+ 'border-width': 1.25,
87
+ 'text-valign': 'center',
88
+ 'text-halign': 'center',
89
+ 'overlay-opacity': 0,
90
+ 'underlay-opacity': 0,
91
+ },
92
+ },
93
+ passStyle('render', theme.render),
94
+ passStyle('compute', theme.compute),
95
+ passStyle('copy', theme.copy),
96
+ passStyle('clear-buffer', theme.clear),
97
+ passStyle('command', theme.command),
98
+ {
99
+ selector: 'node[passKind = "external-submission"]',
100
+ style: {
101
+ 'background-color': theme.external.fill,
102
+ 'border-color': theme.external.stroke,
103
+ 'border-style': 'double',
104
+ 'border-width': 3,
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,
115
+ },
116
+ },
117
+ {
118
+ selector: 'node[kind = "resource"][resourceKind = "texture"]',
119
+ style: {
120
+ 'shape': 'ellipse',
121
+ 'background-color': theme.texture.fill,
122
+ 'border-color': theme.texture.stroke,
123
+ },
124
+ },
125
+ {
126
+ selector: 'node[kind = "resource"][resourceKind = "buffer"]',
127
+ style: {
128
+ 'shape': 'ellipse',
129
+ 'background-color': theme.buffer.fill,
130
+ 'border-color': theme.buffer.stroke,
131
+ },
132
+ },
133
+ {
134
+ selector: 'node[kind = "group"]',
135
+ style: {
136
+ 'text-max-width': (element) => `${element.data('labelMaxWidth')}px`,
137
+ },
138
+ },
139
+ {
140
+ selector: 'node[kind = "group"][collapsed = 1]',
141
+ style: {
142
+ 'background-color': theme.group.fill,
143
+ 'border-color': theme.group.stroke,
144
+ 'border-width': 2,
145
+ 'color': theme.text,
146
+ },
147
+ },
148
+ {
149
+ selector: 'node[kind = "group"][collapsed = 0]',
150
+ style: expandedGroupStyle(theme.group.fill),
151
+ },
152
+ {
153
+ selector: 'node[kind = "group"][collapsed = 0][depthBand = 1]',
154
+ style: { 'background-color': theme.group.alternateFill },
155
+ },
156
+ {
157
+ selector: 'edge',
158
+ style: {
159
+ 'width': 1.5,
160
+ 'line-color': theme.dependency.value,
161
+ 'line-opacity': 0.82,
162
+ 'target-arrow-color': theme.dependency.value,
163
+ 'target-arrow-shape': 'triangle',
164
+ 'target-arrow-fill': 'filled',
165
+ 'arrow-scale': 0.8,
166
+ 'curve-style': 'straight',
167
+ 'label': 'data(displayLabel)',
168
+ 'font-family': 'ui-monospace, SFMono-Regular, Consolas, Liberation Mono, monospace',
169
+ 'font-size': 10,
170
+ 'min-zoomed-font-size': GRAPH_GEOMETRY.minimumZoomedFontSize,
171
+ 'color': theme.text,
172
+ 'text-background-color': theme.canvas,
173
+ 'text-background-opacity': 0.82,
174
+ 'text-background-padding': '2px',
175
+ 'text-rotation': 'autorotate',
176
+ 'overlay-opacity': 0,
177
+ 'underlay-opacity': 0,
178
+ },
179
+ },
180
+ {
181
+ selector: 'edge[dependencyKind = "ordering"]',
182
+ style: {
183
+ 'line-color': theme.dependency.ordering,
184
+ 'target-arrow-color': theme.dependency.ordering,
185
+ 'line-style': 'dotted',
186
+ 'target-arrow-fill': 'hollow',
187
+ 'line-opacity': 0.72,
188
+ },
189
+ },
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
+ {
209
+ selector: 'edge.elk-route',
210
+ style: {
211
+ 'source-endpoint': 'data(sourceEndpoint)',
212
+ 'target-endpoint': 'data(targetEndpoint)',
213
+ 'edge-distances': ENDPOINT_EDGE_DISTANCES,
214
+ },
215
+ },
216
+ {
217
+ selector: 'edge.elk-segments',
218
+ style: {
219
+ 'curve-style': 'round-segments',
220
+ 'segment-distances': 'data(segmentDistances)',
221
+ 'segment-weights': 'data(segmentWeights)',
222
+ 'segment-radii': EDGE_SEGMENT_RADII,
223
+ },
224
+ },
225
+ {
226
+ selector: 'node.semantic-hover',
227
+ style: {
228
+ 'border-color': theme.hover,
229
+ 'border-width': 2,
230
+ 'z-index': 15,
231
+ },
232
+ },
233
+ {
234
+ selector: 'edge.semantic-hover',
235
+ style: {
236
+ 'line-color': theme.hover,
237
+ 'target-arrow-color': theme.hover,
238
+ 'line-opacity': 1,
239
+ 'width': 2.5,
240
+ 'z-index': 15,
241
+ },
242
+ },
243
+ {
244
+ selector: 'node.semantic-selected',
245
+ style: {
246
+ 'border-color': theme.selected,
247
+ 'border-width': 3,
248
+ 'underlay-color': theme.selected,
249
+ 'underlay-padding': 5,
250
+ 'underlay-opacity': 0.18,
251
+ 'opacity': 1,
252
+ 'z-index': 20,
253
+ },
254
+ },
255
+ {
256
+ selector: 'edge.semantic-selected',
257
+ style: {
258
+ 'line-color': theme.selected,
259
+ 'target-arrow-color': theme.selected,
260
+ 'line-opacity': 1,
261
+ 'width': 3,
262
+ 'z-index': 20,
263
+ },
264
+ },
265
+ ];
266
+ }
267
+ export function nodeDimensions(node) {
268
+ switch (node.kind) {
269
+ case 'pass':
270
+ return { width: 184, height: node.label.includes('\n') ? 62 : 48 };
271
+ case 'culled-pass':
272
+ return { width: 184, height: 64 };
273
+ case 'resource':
274
+ return { width: 166, height: node.label.includes('\n') ? 58 : 46 };
275
+ case 'group':
276
+ return node.collapsed ? { width: 224, height: 68 } : { width: 120, height: 80 };
277
+ }
278
+ }
279
+ export function graphLayoutGeometryKey(scene) {
280
+ return JSON.stringify({
281
+ topology: scene.topologyKey,
282
+ dimensions: scene.nodes.map((node) => {
283
+ const dimensions = nodeDimensions(node);
284
+ return [node.id, dimensions.width, dimensions.height];
285
+ }),
286
+ });
287
+ }
288
+ export function graphEdgeDisplayLabel(edge) {
289
+ return edge.kind === 'access' ? '' : edge.label ?? '';
290
+ }
291
+ export function expandedGroupLabelMaxWidth(outerWidth) {
292
+ return Math.max(80, Math.floor(outerWidth - GRAPH_GEOMETRY.groupTitleInset * 2));
293
+ }
294
+ export function isOverviewGraphScale(zoom) {
295
+ return GRAPH_GEOMETRY.baseFontSize * zoom < GRAPH_GEOMETRY.overviewFontThreshold;
296
+ }
297
+ function nodeLegend(key, label, color) {
298
+ return { key, label, color, shape: 'box' };
299
+ }
300
+ function edgeLegend(key, label, color, lineStyle) {
301
+ return { key, label, color, shape: 'line', lineStyle };
302
+ }
303
+ function passStyle(kind, colors) {
304
+ return {
305
+ selector: `node[passKind = "${kind}"]`,
306
+ style: { 'background-color': colors.fill, 'border-color': colors.stroke },
307
+ };
308
+ }
309
+ function expandedGroupStyle(backgroundColor) {
310
+ const geometry = GRAPH_GEOMETRY;
311
+ return {
312
+ 'background-color': backgroundColor,
313
+ 'background-opacity': 0.34,
314
+ 'border-color': GRAPH_VISUAL_THEME.group.stroke,
315
+ 'border-width': 1.5,
316
+ 'padding': `${geometry.groupPadding}px`,
317
+ 'compound-sizing-wrt-labels': 'include',
318
+ 'min-width': '120px',
319
+ 'min-height': '80px',
320
+ 'text-valign': 'top-inside',
321
+ 'text-halign': 'left-inside',
322
+ 'text-justification': 'left',
323
+ 'text-margin-x': geometry.groupTitleInset - geometry.groupPadding * 2,
324
+ 'text-margin-y': geometry.groupTitleInset - geometry.groupPadding * 2,
325
+ 'line-height': geometry.groupTitleLineHeight,
326
+ 'color': GRAPH_VISUAL_THEME.text,
327
+ 'font-weight': 600,
328
+ };
329
+ }
330
+ //# sourceMappingURL=panelGraphVisuals.js.map