@zenfg/inspector 0.1.0-beta.2 → 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 +63 -1
- 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 +39 -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/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/styles.d.ts.map +1 -1
- package/dist/styles.js +16 -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 +38 -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/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/styles.ts +16 -12
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelCytoscapeGraphRenderer.js","sourceRoot":"","sources":["../src/panelCytoscapeGraphRenderer.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,8BAA8B,GAGjC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,YAAY,GAKf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACH,iBAAiB,EACjB,0BAA0B,EAC1B,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,GACjB,MAAM,wBAAwB,CAAC;AAkBhC,MAAM,OAAO,sBAAsB;IAyBV;IACA;IAzBJ,UAAU,CAAc;IACxB,OAAO,CAAc;IACrB,MAAM,CAAc;IACpB,aAAa,CAAc;IAC3B,WAAW,CAAoB;IAC/B,kBAAkB,CAAsC;IACjE,IAAI,CAA6B;IACjC,GAAG,CAAkB;IACrB,OA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BAAoB,EACpB,gBAAgB,GACnB,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EACH,iBAAiB,EACjB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,GACvB,MAAM,wBAAwB,CAAC","sourcesContent":["import type cytoscape from 'cytoscape';\nimport type { ELK } from 'elkjs/lib/elk-api';\n\nimport type { GraphRenderer, GraphRenderRequest } from './panelGraphRenderer.ts';\nimport {\n applyGraphLayout,\n layoutGraphScene,\n syncExpandedGroupLabelGeometry,\n type GraphLayoutResult,\n type GraphPosition,\n} from './panelGraphLayout.ts';\nimport {\n selectionKey,\n type GraphScene,\n type GraphSceneEdge,\n type GraphSceneElementId,\n type GraphSceneNode,\n} from './panelGraphScene.ts';\nimport {\n createGraphStyles,\n expandedGroupLabelMaxWidth,\n GRAPH_GEOMETRY,\n graphEdgeDisplayLabel,\n graphLayoutGeometryKey,\n isOverviewGraphScale,\n nodeDimensions,\n} from './panelGraphVisuals.ts';\n\ntype Viewport = { readonly pan: GraphPosition; readonly zoom: number };\n\ntype GraphRendererRuntime = {\n readonly createCore: (options: cytoscape.CytoscapeOptions) => cytoscape.Core;\n readonly elk: ELK;\n};\n\nexport type GraphResizeSubscription = { disconnect(): void };\n\nexport type GraphRendererEnvironment = {\n readonly createElement: (tagName: string) => HTMLElement;\n readonly loadRuntime: () => Promise<GraphRendererRuntime>;\n readonly layoutScene: (elk: ELK, scene: GraphScene) => Promise<GraphLayoutResult>;\n readonly observeResize?: (element: HTMLElement, onResize: () => void) => GraphResizeSubscription;\n};\n\nexport class CytoscapeGraphRenderer implements GraphRenderer {\n private readonly canvasHost: HTMLElement;\n private readonly tooltip: HTMLElement;\n private readonly status: HTMLElement;\n private readonly statusMessage: HTMLElement;\n private readonly retryButton: HTMLButtonElement;\n private readonly resizeSubscription: GraphResizeSubscription | undefined;\n private core: cytoscape.Core | undefined;\n private elk: ELK | undefined;\n private loading: Promise<void> | undefined;\n private processing: Promise<void> | undefined;\n private latestRequest: GraphRenderRequest | undefined;\n private appliedScene: GraphScene | undefined;\n private requestVersion = 0;\n private processedVersion = 0;\n private destroyed = false;\n private fitTargetContentKey: string | undefined;\n private forceRelayout = false;\n private anchorElementId: GraphSceneElementId | undefined;\n private anchorTargetContentKey: string | undefined;\n private failedSceneContentKey: string | undefined;\n private overview = false;\n private lastTap: { readonly id: string; readonly at: number } | undefined;\n\n constructor(\n private readonly host: HTMLElement,\n private readonly environment: GraphRendererEnvironment = browserGraphRendererEnvironment,\n ) {\n this.canvasHost = environment.createElement('div');\n this.canvasHost.className = 'zenfg-inspector-graph-canvas';\n this.tooltip = environment.createElement('div');\n this.tooltip.className = 'zenfg-inspector-graph-tooltip';\n this.tooltip.hidden = true;\n this.status = environment.createElement('div');\n this.status.className = 'zenfg-inspector-graph-status';\n this.status.hidden = true;\n this.status.setAttribute('role', 'status');\n this.status.setAttribute('aria-live', 'polite');\n this.statusMessage = environment.createElement('span');\n this.retryButton = environment.createElement('button') as HTMLButtonElement;\n this.retryButton.type = 'button';\n this.retryButton.textContent = 'Retry';\n this.retryButton.hidden = true;\n this.retryButton.addEventListener('click', () => this.relayout());\n this.status.append(this.statusMessage, this.retryButton);\n this.host.replaceChildren(this.canvasHost, this.status, this.tooltip);\n this.resizeSubscription = environment.observeResize?.(host, () => this.core?.resize());\n }\n\n render(request: GraphRenderRequest): void {\n if (this.destroyed) return;\n this.latestRequest = request;\n if (request.fit) {\n this.fitTargetContentKey = request.scene.contentKey;\n } else if (this.fitTargetContentKey !== request.scene.contentKey) {\n this.fitTargetContentKey = undefined;\n }\n if (request.anchorElementId !== undefined) {\n this.anchorElementId = request.anchorElementId;\n this.anchorTargetContentKey = request.scene.contentKey;\n } else if (this.anchorTargetContentKey !== request.scene.contentKey) {\n this.anchorElementId = undefined;\n this.anchorTargetContentKey = undefined;\n }\n if (this.failedSceneContentKey && this.failedSceneContentKey !== request.scene.contentKey) {\n this.failedSceneContentKey = undefined;\n this.hideStatus();\n }\n\n const version = ++this.requestVersion;\n if (this.failedSceneContentKey === request.scene.contentKey) {\n this.syncInteraction(request);\n this.processedVersion = version;\n return;\n }\n if (!this.processing && this.core && this.appliedScene?.contentKey === request.scene.contentKey && !this.forceRelayout) {\n this.appliedScene = request.scene;\n this.syncInteraction(request);\n this.consumeFitIfCurrentTarget();\n this.consumeAnchorIfCurrentTarget();\n this.processedVersion = version;\n return;\n }\n this.scheduleProcessing();\n }\n\n resize(): void {\n this.core?.resize();\n }\n\n fit(): void {\n const targetContentKey = this.latestRequest?.scene.contentKey;\n if (targetContentKey) this.fitTargetContentKey = targetContentKey;\n if (!this.core || !this.appliedScene) return;\n this.core.resize();\n this.core.fit(undefined, GRAPH_GEOMETRY.fitPadding);\n this.updateSemanticZoom();\n if (!this.targetNeedsApply()) this.fitTargetContentKey = undefined;\n }\n\n relayout(): void {\n if (!this.latestRequest || this.destroyed) return;\n this.failedSceneContentKey = undefined;\n this.forceRelayout = true;\n this.fitTargetContentKey = this.latestRequest.scene.contentKey;\n this.anchorElementId = undefined;\n this.anchorTargetContentKey = undefined;\n this.hideTooltip();\n ++this.requestVersion;\n this.scheduleProcessing();\n }\n\n destroy(): void {\n if (this.destroyed) return;\n this.destroyed = true;\n this.requestVersion++;\n this.resizeSubscription?.disconnect();\n this.hideTooltip();\n this.core?.destroy();\n this.core = undefined;\n this.elk = undefined;\n this.loading = undefined;\n this.latestRequest = undefined;\n this.appliedScene = undefined;\n this.fitTargetContentKey = undefined;\n this.anchorElementId = undefined;\n this.anchorTargetContentKey = undefined;\n this.host.replaceChildren();\n }\n\n private scheduleProcessing(): void {\n if (this.processing || this.destroyed) return;\n this.processing = this.processRequests().finally(() => {\n this.processing = undefined;\n if (!this.destroyed\n && !this.failedSceneContentKey\n && this.processedVersion !== this.requestVersion) {\n this.scheduleProcessing();\n }\n });\n }\n\n private async processRequests(): Promise<void> {\n while (!this.destroyed && this.processedVersion !== this.requestVersion) {\n let version = this.requestVersion;\n let request = this.latestRequest;\n if (!request) return;\n\n if (request.scene.nodes.length === 0) {\n this.hideTooltip();\n if (this.core) replaceElements(this.core, request.scene);\n this.appliedScene = request.scene;\n this.forceRelayout = false;\n if (this.fitTargetContentKey === request.scene.contentKey) this.fitTargetContentKey = undefined;\n this.consumeAnchorIfCurrentTarget();\n this.syncInteraction(request);\n this.showStatus('empty', 'No graph elements in this view.');\n this.processedVersion = version;\n continue;\n }\n\n try {\n if (!this.core) this.showStatus('loading', 'Loading graph runtime…');\n await this.ensureRuntime();\n const runtimeRequest = this.resolveCurrentRequest(version, request.scene.contentKey);\n if (!runtimeRequest) continue;\n ({ version, request } = runtimeRequest);\n const core = this.core!;\n if (this.appliedScene?.contentKey === request.scene.contentKey && !this.forceRelayout) {\n this.appliedScene = request.scene;\n this.syncInteraction(request);\n this.consumeFitIfCurrentTarget();\n this.consumeAnchorIfCurrentTarget();\n this.hideStatus();\n this.processedVersion = version;\n continue;\n }\n\n this.hideTooltip();\n const previousViewport = viewport(core);\n const anchorElementId = this.anchorTargetContentKey === request.scene.contentKey\n ? this.anchorElementId\n : undefined;\n const anchorBefore = anchorElementId === undefined\n ? undefined\n : renderedPosition(core, anchorElementId);\n const topologyChanged = this.appliedScene?.topologyKey !== request.scene.topologyKey;\n const geometryChanged = !this.appliedScene\n || graphLayoutGeometryKey(this.appliedScene) !== graphLayoutGeometryKey(request.scene);\n let laidOut = false;\n\n if (geometryChanged || this.forceRelayout) {\n this.showStatus('layout', 'Laying out graph…');\n const result = await this.environment.layoutScene(this.elk!, request.scene);\n const layoutRequest = this.resolveCurrentRequest(version, request.scene.contentKey);\n if (!layoutRequest) continue;\n ({ version, request } = layoutRequest);\n if (topologyChanged || !this.appliedScene) replaceElements(core, request.scene);\n else updateElementData(core, request.scene);\n applyGraphLayout(core, request.scene, result);\n laidOut = true;\n } else {\n updateElementData(core, request.scene);\n }\n\n syncExpandedGroupLabelGeometry(core);\n this.appliedScene = request.scene;\n this.forceRelayout = false;\n this.failedSceneContentKey = undefined;\n this.syncInteraction(request);\n core.resize();\n if (this.fitTargetContentKey === request.scene.contentKey) {\n core.fit(undefined, GRAPH_GEOMETRY.fitPadding);\n this.fitTargetContentKey = undefined;\n } else if (laidOut && anchorBefore && anchorElementId) {\n restoreViewport(core, previousViewport);\n const anchorAfter = renderedPosition(core, anchorElementId);\n if (anchorAfter) core.panBy({ x: anchorBefore.x - anchorAfter.x, y: anchorBefore.y - anchorAfter.y });\n } else {\n restoreViewport(core, previousViewport);\n }\n this.consumeAnchorIfCurrentTarget();\n this.updateSemanticZoom(true);\n this.hideStatus();\n this.processedVersion = version;\n } catch (error) {\n const failedRequest = this.resolveCurrentRequest(version, request.scene.contentKey);\n if (!failedRequest) continue;\n ({ version, request } = failedRequest);\n this.forceRelayout = false;\n this.failedSceneContentKey = request.scene.contentKey;\n this.processedVersion = version;\n this.showStatus(\n 'error',\n `Failed to render graph: ${error instanceof Error ? error.message : String(error)}`,\n true,\n );\n return;\n }\n }\n }\n\n private async ensureRuntime(): Promise<void> {\n if (this.core || this.destroyed) return;\n this.loading ??= this.loadRuntime().catch((error) => {\n this.loading = undefined;\n throw error;\n });\n await this.loading;\n }\n\n private async loadRuntime(): Promise<void> {\n const runtime = await this.environment.loadRuntime();\n if (this.destroyed) return;\n this.canvasHost.textContent = '';\n this.elk = runtime.elk;\n this.core = runtime.createCore({\n container: this.canvasHost,\n elements: [],\n style: createGraphStyles(),\n layout: { name: 'preset' },\n minZoom: 0.03,\n maxZoom: 4,\n wheelSensitivity: 1.3,\n boxSelectionEnabled: false,\n autoungrabify: true,\n autounselectify: true,\n });\n this.bindEvents(this.core);\n }\n\n private bindEvents(core: cytoscape.Core): void {\n const selectElement = (event: cytoscape.EventObject) => {\n const request = this.interactiveRequest();\n if (!request) return;\n const id = event.target.id() as GraphSceneElementId;\n const selection = request.scene.interaction.selectionByElementId.get(id);\n if (selection) request.onSelect(selection);\n const now = performance.now();\n if (this.lastTap?.id === id && now - this.lastTap.at <= 350 && selection?.kind === 'group') {\n request.onToggleGroup(selection.pathKey);\n this.lastTap = undefined;\n } else {\n this.lastTap = { id, at: now };\n }\n };\n core.on('tap', 'node', selectElement);\n core.on('tap', 'edge', selectElement);\n core.on('tap', (event) => {\n if (event.target === core) this.lastTap = undefined;\n });\n const hoverElement = (event: cytoscape.EventObject) => {\n const request = this.interactiveRequest();\n if (!request) return;\n const id = event.target.id() as GraphSceneElementId;\n const selection = request.scene.interaction.selectionByElementId.get(id);\n if (selection) request.onHover(selection);\n const title = event.target.data('tooltip') as string | undefined;\n if (title) {\n this.tooltip.textContent = title;\n this.tooltip.hidden = false;\n this.positionTooltip(event.renderedPosition);\n }\n };\n core.on('mouseover', 'node', hoverElement);\n core.on('mouseover', 'edge', hoverElement);\n const moveTooltip = (event: cytoscape.EventObject) => this.positionTooltip(event.renderedPosition);\n core.on('mousemove', 'node', moveTooltip);\n core.on('mousemove', 'edge', moveTooltip);\n const clearHover = () => {\n this.hideTooltip();\n this.latestRequest?.onHover(undefined);\n };\n core.on('mouseout', 'node', clearHover);\n core.on('mouseout', 'edge', clearHover);\n core.on('zoom', () => this.updateSemanticZoom());\n }\n\n private interactiveRequest(): GraphRenderRequest | undefined {\n const request = this.latestRequest;\n return request && this.appliedScene?.contentKey === request.scene.contentKey ? request : undefined;\n }\n\n private syncInteraction(request: GraphRenderRequest): void {\n const core = this.core;\n if (!core || this.appliedScene?.topologyKey !== request.scene.topologyKey) return;\n core.batch(() => {\n core.elements().removeClass('semantic-selected semantic-hover');\n if (request.hovered) {\n for (const id of request.scene.interaction.relatedElementIdsBySelection.get(selectionKey(request.hovered)) ?? []) {\n core.getElementById(id).addClass('semantic-hover');\n }\n }\n if (request.selected) {\n for (const id of request.scene.interaction.primaryElementIdsBySelection.get(selectionKey(request.selected)) ?? []) {\n core.getElementById(id).addClass('semantic-selected');\n }\n }\n });\n }\n\n private consumeFitIfCurrentTarget(): void {\n const targetContentKey = this.latestRequest?.scene.contentKey;\n if (!targetContentKey\n || this.fitTargetContentKey !== targetContentKey\n || !this.core\n || this.targetNeedsApply()) return;\n this.core.resize();\n this.core.fit(undefined, GRAPH_GEOMETRY.fitPadding);\n this.fitTargetContentKey = undefined;\n this.updateSemanticZoom();\n }\n\n private consumeAnchorIfCurrentTarget(): void {\n const targetContentKey = this.latestRequest?.scene.contentKey;\n if (!targetContentKey || this.anchorTargetContentKey !== targetContentKey) return;\n this.anchorElementId = undefined;\n this.anchorTargetContentKey = undefined;\n }\n\n private targetNeedsApply(): boolean {\n const target = this.latestRequest?.scene;\n if (!target || !this.appliedScene) return target !== undefined;\n return this.forceRelayout || this.appliedScene.contentKey !== target.contentKey;\n }\n\n private updateSemanticZoom(force = false): void {\n const core = this.core;\n if (!core) return;\n const overview = isOverviewGraphScale(core.zoom());\n if (!force && overview === this.overview) return;\n this.overview = overview;\n core.batch(() => {\n for (const node of core.nodes()) {\n node.data('displayLabel', overview ? node.data('overviewLabel') : node.data('detailLabel'));\n }\n for (const edge of core.edges()) {\n edge.data('displayLabel', overview ? '' : edge.data('detailLabel'));\n }\n });\n }\n\n private positionTooltip(position: GraphPosition): void {\n const maxX = Math.max(8, this.host.clientWidth - this.tooltip.offsetWidth - 8);\n const maxY = Math.max(8, this.host.clientHeight - this.tooltip.offsetHeight - 8);\n this.tooltip.style.left = `${Math.max(8, Math.min(maxX, position.x + 12))}px`;\n this.tooltip.style.top = `${Math.max(8, Math.min(maxY, position.y + 12))}px`;\n }\n\n private hideTooltip(): void {\n this.tooltip.hidden = true;\n this.tooltip.textContent = '';\n this.lastTap = undefined;\n }\n\n private showStatus(kind: 'loading' | 'layout' | 'empty' | 'error', message: string, retry = false): void {\n this.status.dataset.state = kind;\n this.statusMessage.textContent = message;\n this.retryButton.hidden = !retry;\n this.status.hidden = false;\n this.host.setAttribute('aria-busy', kind === 'loading' || kind === 'layout' ? 'true' : 'false');\n }\n\n private hideStatus(): void {\n this.status.hidden = true;\n this.retryButton.hidden = true;\n this.host.setAttribute('aria-busy', 'false');\n }\n\n private resolveCurrentRequest(\n version: number,\n contentKey: string,\n ): { readonly version: number; readonly request: GraphRenderRequest } | undefined {\n if (this.destroyed) return undefined;\n const request = this.latestRequest;\n if (!request) return undefined;\n if (version === this.requestVersion || request.scene.contentKey === contentKey) {\n return { version: this.requestVersion, request };\n }\n return undefined;\n }\n}\n\nconst browserGraphRendererEnvironment: GraphRendererEnvironment = {\n createElement: (tagName) => document.createElement(tagName),\n loadRuntime: async () => {\n const [cytoscapeModule, elkModule] = await Promise.all([\n import('cytoscape'),\n import('elkjs/lib/elk.bundled.js'),\n ]);\n return {\n createCore: cytoscapeModule.default,\n elk: new elkModule.default(),\n };\n },\n layoutScene: layoutGraphScene,\n observeResize: (element, onResize) => {\n if (typeof ResizeObserver === 'undefined') return { disconnect: () => undefined };\n const view = element.ownerDocument.defaultView;\n let animationFrame: number | undefined;\n const observer = new ResizeObserver(() => {\n if (!view || animationFrame !== undefined) return;\n animationFrame = view.requestAnimationFrame(() => {\n animationFrame = undefined;\n onResize();\n });\n });\n observer.observe(element);\n return {\n disconnect: () => {\n observer.disconnect();\n if (animationFrame !== undefined) {\n view?.cancelAnimationFrame(animationFrame);\n animationFrame = undefined;\n }\n },\n };\n },\n};\n\nfunction replaceElements(core: cytoscape.Core, scene: GraphScene): void {\n const definitions: cytoscape.ElementDefinition[] = [\n ...scene.nodes.map(nodeDefinition),\n ...scene.edges.map(edgeDefinition),\n ];\n core.startBatch();\n core.elements().remove();\n core.add(definitions);\n core.endBatch();\n}\n\nexport function updateElementData(core: cytoscape.Core, scene: GraphScene): void {\n core.batch(() => {\n for (const node of scene.nodes) {\n const element = core.getElementById(node.id);\n if (element.nonempty()) element.data(nodeRenderableData(node));\n }\n for (const edge of scene.edges) {\n const element = core.getElementById(edge.id);\n if (element.nonempty()) element.data(edgeRenderableData(edge));\n }\n });\n}\n\nfunction nodeDefinition(node: GraphSceneNode): cytoscape.ElementDefinition {\n return {\n group: 'nodes',\n data: {\n id: node.id,\n parent: node.parentId,\n ...nodeRenderableData(node),\n },\n };\n}\n\nfunction nodeRenderableData(node: GraphSceneNode): Record<string, unknown> {\n const dimensions = nodeDimensions(node);\n const labelMaxWidth = node.kind === 'group' && node.collapsed\n ? expandedGroupLabelMaxWidth(dimensions.width)\n : 160;\n return {\n kind: node.kind,\n passKind: node.kind === 'pass' || node.kind === 'culled-pass' ? node.passKind : undefined,\n resourceKind: node.kind === 'resource' ? node.resourceKind : undefined,\n collapsed: node.kind === 'group' && node.collapsed ? 1 : 0,\n hasCulled: node.kind === 'group' && node.culledNodeCount > 0 ? 1 : 0,\n depthBand: node.kind === 'group' ? node.depthBand : undefined,\n detailLabel: node.label,\n overviewLabel: node.overviewLabel,\n displayLabel: node.label,\n tooltip: node.title,\n labelMaxWidth,\n width: dimensions.width,\n height: dimensions.height,\n };\n}\n\nfunction edgeDefinition(edge: GraphSceneEdge): cytoscape.ElementDefinition {\n return {\n group: 'edges',\n data: {\n id: edge.id,\n source: edge.from,\n target: edge.to,\n ...edgeRenderableData(edge),\n },\n };\n}\n\nfunction edgeRenderableData(edge: GraphSceneEdge): Record<string, unknown> {\n const detailLabel = graphEdgeDisplayLabel(edge);\n return {\n kind: edge.kind,\n dependencyKind: edge.kind === 'dependency' ? edge.dependencyKind : undefined,\n accessMode: edge.kind === 'access' ? edge.accessMode : undefined,\n dashed: edge.kind === 'access' && edge.dashed ? 1 : 0,\n detailLabel,\n displayLabel: detailLabel,\n tooltip: edge.title,\n };\n}\n\nfunction viewport(core: cytoscape.Core): Viewport {\n return { pan: { ...core.pan() }, zoom: core.zoom() };\n}\n\nfunction restoreViewport(core: cytoscape.Core, state: Viewport): void {\n core.zoom(state.zoom);\n core.pan(state.pan);\n}\n\nfunction renderedPosition(core: cytoscape.Core, id: GraphSceneElementId): GraphPosition | undefined {\n const element = core.getElementById(id);\n return element.nonempty() && element.isNode() ? { ...element.renderedPosition() } : undefined;\n}\n\nexport {\n createCytoscapeEdgeRouteData,\n createElkLayoutGraph,\n layoutGraphScene,\n} from './panelGraphLayout.ts';\nexport type {\n CytoscapeEdgeRouteData,\n GraphEdgeRoute,\n GraphLayoutResult,\n GraphPosition,\n} from './panelGraphLayout.ts';\nexport {\n createGraphStyles,\n expandedGroupLabelMaxWidth,\n graphEdgeDisplayLabel,\n graphLayoutGeometryKey,\n isOverviewGraphScale,\n} from './panelGraphVisuals.ts';\n"]}
|
|
1
|
+
{"version":3,"file":"panelCytoscapeGraphRenderer.js","sourceRoot":"","sources":["../src/panelCytoscapeGraphRenderer.ts"],"names":[],"mappings":"AAIA,OAAO,EACH,gBAAgB,EAChB,gBAAgB,EAChB,8BAA8B,GAGjC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,YAAY,GAKf,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACH,iBAAiB,EACjB,0BAA0B,EAC1B,cAAc,EACd,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,GACjB,MAAM,wBAAwB,CAAC;AAkBhC,MAAM,OAAO,sBAAsB;IAyBV;IACA;IAzBJ,UAAU,CAAc;IACxB,OAAO,CAAc;IACrB,MAAM,CAAc;IACpB,aAAa,CAAc;IAC3B,WAAW,CAAoB;IAC/B,kBAAkB,CAAsC;IACjE,IAAI,CAA6B;IACjC,GAAG,CAAkB;IACrB,OAAO,CAA4B;IACnC,UAAU,CAA4B;IACtC,aAAa,CAAiC;IAC9C,YAAY,CAAyB;IACrC,cAAc,GAAG,CAAC,CAAC;IACnB,gBAAgB,GAAG,CAAC,CAAC;IACrB,SAAS,GAAG,KAAK,CAAC;IAClB,mBAAmB,CAAqB;IACxC,aAAa,GAAG,KAAK,CAAC;IACtB,eAAe,CAAkC;IACjD,sBAAsB,CAAqB;IAC3C,qBAAqB,CAAqB;IAC1C,QAAQ,GAAG,KAAK,CAAC;IACjB,eAAe,CAAqF;IAE5G,YACqB,IAAiB,EACjB,cAAwC,+BAA+B;QADvE,SAAI,GAAJ,IAAI,CAAa;QACjB,gBAAW,GAAX,WAAW,CAA4D;QAExF,IAAI,CAAC,UAAU,G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ED,SAAS,gBAAgB,CAAC,IAAoB,EAAE,EAAuB;IACnE,MAAM,OAAO,GAAG,IAAI,CAAC,cAAc,CAAC,EAAE,CAAC,CAAC;IACxC,OAAO,OAAO,CAAC,QAAQ,EAAE,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,gBAAgB,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;AAClG,CAAC;AAED,OAAO,EACH,4BAA4B,EAC5B,oBAAoB,EACpB,gBAAgB,GACnB,MAAM,uBAAuB,CAAC;AAO/B,OAAO,EACH,iBAAiB,EACjB,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,oBAAoB,GACvB,MAAM,wBAAwB,CAAC","sourcesContent":["import type cytoscape from 'cytoscape';\nimport type { ELK } from 'elkjs/lib/elk-api';\n\nimport type { GraphRenderer, GraphRenderRequest } from './panelGraphRenderer.ts';\nimport {\n applyGraphLayout,\n layoutGraphScene,\n syncExpandedGroupLabelGeometry,\n type GraphLayoutResult,\n type GraphPosition,\n} from './panelGraphLayout.ts';\nimport {\n selectionKey,\n type GraphScene,\n type GraphSceneEdge,\n type GraphSceneElementId,\n type GraphSceneNode,\n} from './panelGraphScene.ts';\nimport {\n createGraphStyles,\n expandedGroupLabelMaxWidth,\n GRAPH_GEOMETRY,\n graphEdgeDisplayLabel,\n graphLayoutGeometryKey,\n isOverviewGraphScale,\n nodeDimensions,\n} from './panelGraphVisuals.ts';\n\ntype Viewport = { readonly pan: GraphPosition; readonly zoom: number };\n\ntype GraphRendererRuntime = {\n readonly createCore: (options: cytoscape.CytoscapeOptions) => cytoscape.Core;\n readonly elk: ELK;\n};\n\nexport type GraphResizeSubscription = { disconnect(): void };\n\nexport type GraphRendererEnvironment = {\n readonly createElement: (tagName: string) => HTMLElement;\n readonly loadRuntime: () => Promise<GraphRendererRuntime>;\n readonly layoutScene: (elk: ELK, scene: GraphScene) => Promise<GraphLayoutResult>;\n readonly observeResize?: (element: HTMLElement, onResize: () => void) => GraphResizeSubscription;\n};\n\nexport class CytoscapeGraphRenderer implements GraphRenderer {\n private readonly canvasHost: HTMLElement;\n private readonly tooltip: HTMLElement;\n private readonly status: HTMLElement;\n private readonly statusMessage: HTMLElement;\n private readonly retryButton: HTMLButtonElement;\n private readonly resizeSubscription: GraphResizeSubscription | undefined;\n private core: cytoscape.Core | undefined;\n private elk: ELK | undefined;\n private loading: Promise<void> | undefined;\n private processing: Promise<void> | undefined;\n private latestRequest: GraphRenderRequest | undefined;\n private appliedScene: GraphScene | undefined;\n private requestVersion = 0;\n private processedVersion = 0;\n private destroyed = false;\n private fitTargetContentKey: string | undefined;\n private forceRelayout = false;\n private anchorElementId: GraphSceneElementId | undefined;\n private anchorTargetContentKey: string | undefined;\n private failedSceneContentKey: string | undefined;\n private overview = false;\n private pendingGroupTap: { readonly id: string; readonly timer: ReturnType<typeof setTimeout> } | undefined;\n\n constructor(\n private readonly host: HTMLElement,\n private readonly environment: GraphRendererEnvironment = browserGraphRendererEnvironment,\n ) {\n this.canvasHost = environment.createElement('div');\n this.canvasHost.className = 'zenfg-inspector-graph-canvas';\n this.tooltip = environment.createElement('div');\n this.tooltip.className = 'zenfg-inspector-graph-tooltip';\n this.tooltip.hidden = true;\n // Cytoscape's node mouseout is not guaranteed when leaving its canvas directly.\n this.canvasHost.addEventListener('pointerleave', () => this.clearHover());\n this.status = environment.createElement('div');\n this.status.className = 'zenfg-inspector-graph-status';\n this.status.hidden = true;\n this.status.setAttribute('role', 'status');\n this.status.setAttribute('aria-live', 'polite');\n this.statusMessage = environment.createElement('span');\n this.retryButton = environment.createElement('button') as HTMLButtonElement;\n this.retryButton.type = 'button';\n this.retryButton.textContent = 'Retry';\n this.retryButton.hidden = true;\n this.retryButton.addEventListener('click', () => this.relayout());\n this.status.append(this.statusMessage, this.retryButton);\n this.host.replaceChildren(this.canvasHost, this.status, this.tooltip);\n this.resizeSubscription = environment.observeResize?.(host, () => this.core?.resize());\n }\n\n render(request: GraphRenderRequest): void {\n if (this.destroyed) return;\n if (this.latestRequest?.scene !== request.scene\n || (this.latestRequest?.selected && selectionKey(this.latestRequest.selected)) !== (request.selected && selectionKey(request.selected))) {\n this.cancelGroupTap();\n }\n if ((!request.hovered && !this.tooltip.hidden) || this.latestRequest?.scene.contentKey !== request.scene.contentKey) {\n this.hideTooltip();\n this.core?.elements().removeClass('semantic-hover');\n }\n this.latestRequest = request;\n if (request.fit) {\n this.fitTargetContentKey = request.scene.contentKey;\n } else if (this.fitTargetContentKey !== request.scene.contentKey) {\n this.fitTargetContentKey = undefined;\n }\n if (request.anchorElementId !== undefined) {\n this.anchorElementId = request.anchorElementId;\n this.anchorTargetContentKey = request.scene.contentKey;\n } else if (this.anchorTargetContentKey !== request.scene.contentKey) {\n this.anchorElementId = undefined;\n this.anchorTargetContentKey = undefined;\n }\n if (this.failedSceneContentKey && this.failedSceneContentKey !== request.scene.contentKey) {\n this.failedSceneContentKey = undefined;\n this.hideStatus();\n }\n\n const version = ++this.requestVersion;\n if (this.failedSceneContentKey === request.scene.contentKey) {\n this.syncInteraction(request);\n this.processedVersion = version;\n return;\n }\n if (!this.processing && this.core && this.appliedScene?.contentKey === request.scene.contentKey && !this.forceRelayout) {\n this.appliedScene = request.scene;\n this.syncInteraction(request);\n this.consumeFitIfCurrentTarget();\n this.consumeAnchorIfCurrentTarget();\n this.processedVersion = version;\n return;\n }\n this.scheduleProcessing();\n }\n\n resize(): void {\n this.core?.resize();\n }\n\n fit(): void {\n const targetContentKey = this.latestRequest?.scene.contentKey;\n if (targetContentKey) this.fitTargetContentKey = targetContentKey;\n if (!this.core || !this.appliedScene) return;\n this.core.resize();\n this.core.fit(undefined, GRAPH_GEOMETRY.fitPadding);\n this.updateSemanticZoom();\n if (!this.targetNeedsApply()) this.fitTargetContentKey = undefined;\n }\n\n relayout(): void {\n if (!this.latestRequest || this.destroyed) return;\n this.cancelGroupTap();\n this.failedSceneContentKey = undefined;\n this.forceRelayout = true;\n this.fitTargetContentKey = this.latestRequest.scene.contentKey;\n this.anchorElementId = undefined;\n this.anchorTargetContentKey = undefined;\n this.hideTooltip();\n ++this.requestVersion;\n this.scheduleProcessing();\n }\n\n destroy(): void {\n if (this.destroyed) return;\n this.destroyed = true;\n this.cancelGroupTap();\n this.requestVersion++;\n this.resizeSubscription?.disconnect();\n this.hideTooltip();\n this.core?.destroy();\n this.core = undefined;\n this.elk = undefined;\n this.loading = undefined;\n this.latestRequest = undefined;\n this.appliedScene = undefined;\n this.fitTargetContentKey = undefined;\n this.anchorElementId = undefined;\n this.anchorTargetContentKey = undefined;\n this.host.replaceChildren();\n }\n\n private scheduleProcessing(): void {\n if (this.processing || this.destroyed) return;\n this.processing = this.processRequests().finally(() => {\n this.processing = undefined;\n if (!this.destroyed\n && !this.failedSceneContentKey\n && this.processedVersion !== this.requestVersion) {\n this.scheduleProcessing();\n }\n });\n }\n\n private async processRequests(): Promise<void> {\n while (!this.destroyed && this.processedVersion !== this.requestVersion) {\n let version = this.requestVersion;\n let request = this.latestRequest;\n if (!request) return;\n\n if (request.scene.nodes.length === 0) {\n this.hideTooltip();\n if (this.core) replaceElements(this.core, request.scene);\n this.appliedScene = request.scene;\n this.forceRelayout = false;\n if (this.fitTargetContentKey === request.scene.contentKey) this.fitTargetContentKey = undefined;\n this.consumeAnchorIfCurrentTarget();\n this.syncInteraction(request);\n this.showStatus('empty', 'No graph elements in this view.');\n this.processedVersion = version;\n continue;\n }\n\n try {\n if (!this.core) this.showStatus('loading', 'Loading graph runtime…');\n await this.ensureRuntime();\n const runtimeRequest = this.resolveCurrentRequest(version, request.scene.contentKey);\n if (!runtimeRequest) continue;\n ({ version, request } = runtimeRequest);\n const core = this.core!;\n if (this.appliedScene?.contentKey === request.scene.contentKey && !this.forceRelayout) {\n this.appliedScene = request.scene;\n this.syncInteraction(request);\n this.consumeFitIfCurrentTarget();\n this.consumeAnchorIfCurrentTarget();\n this.hideStatus();\n this.processedVersion = version;\n continue;\n }\n\n this.hideTooltip();\n const previousViewport = viewport(core);\n const anchorElementId = this.anchorTargetContentKey === request.scene.contentKey\n ? this.anchorElementId\n : undefined;\n const anchorBefore = anchorElementId === undefined\n ? undefined\n : renderedPosition(core, anchorElementId);\n const topologyChanged = this.appliedScene?.topologyKey !== request.scene.topologyKey;\n const geometryChanged = !this.appliedScene\n || graphLayoutGeometryKey(this.appliedScene) !== graphLayoutGeometryKey(request.scene);\n let laidOut = false;\n\n if (geometryChanged || this.forceRelayout) {\n this.showStatus('layout', 'Laying out graph…');\n const result = await this.environment.layoutScene(this.elk!, request.scene);\n const layoutRequest = this.resolveCurrentRequest(version, request.scene.contentKey);\n if (!layoutRequest) continue;\n ({ version, request } = layoutRequest);\n if (topologyChanged || !this.appliedScene) replaceElements(core, request.scene);\n else updateElementData(core, request.scene);\n applyGraphLayout(core, request.scene, result);\n laidOut = true;\n } else {\n updateElementData(core, request.scene);\n }\n\n syncExpandedGroupLabelGeometry(core);\n this.appliedScene = request.scene;\n this.forceRelayout = false;\n this.failedSceneContentKey = undefined;\n this.syncInteraction(request);\n core.resize();\n if (this.fitTargetContentKey === request.scene.contentKey) {\n core.fit(undefined, GRAPH_GEOMETRY.fitPadding);\n this.fitTargetContentKey = undefined;\n } else if (laidOut && anchorBefore && anchorElementId) {\n restoreViewport(core, previousViewport);\n const anchorAfter = renderedPosition(core, anchorElementId);\n if (anchorAfter) core.panBy({ x: anchorBefore.x - anchorAfter.x, y: anchorBefore.y - anchorAfter.y });\n } else {\n restoreViewport(core, previousViewport);\n }\n this.consumeAnchorIfCurrentTarget();\n this.updateSemanticZoom(true);\n this.hideStatus();\n this.processedVersion = version;\n } catch (error) {\n const failedRequest = this.resolveCurrentRequest(version, request.scene.contentKey);\n if (!failedRequest) continue;\n ({ version, request } = failedRequest);\n this.forceRelayout = false;\n this.failedSceneContentKey = request.scene.contentKey;\n this.processedVersion = version;\n this.showStatus(\n 'error',\n `Failed to render graph: ${error instanceof Error ? error.message : String(error)}`,\n true,\n );\n return;\n }\n }\n }\n\n private async ensureRuntime(): Promise<void> {\n if (this.core || this.destroyed) return;\n this.loading ??= this.loadRuntime().catch((error) => {\n this.loading = undefined;\n throw error;\n });\n await this.loading;\n }\n\n private async loadRuntime(): Promise<void> {\n const runtime = await this.environment.loadRuntime();\n if (this.destroyed) return;\n this.canvasHost.textContent = '';\n this.elk = runtime.elk;\n this.core = runtime.createCore({\n container: this.canvasHost,\n elements: [],\n style: createGraphStyles(),\n layout: { name: 'preset' },\n minZoom: 0.03,\n maxZoom: 4,\n wheelSensitivity: 1.3,\n boxSelectionEnabled: false,\n autoungrabify: true,\n autounselectify: true,\n });\n this.bindEvents(this.core);\n }\n\n private bindEvents(core: cytoscape.Core): void {\n const selectElement = (event: cytoscape.EventObject) => {\n const request = this.interactiveRequest();\n if (!request) return;\n const id = event.target.id() as GraphSceneElementId;\n const selection = request.scene.interaction.selectionByElementId.get(id);\n const doubleTap = this.pendingGroupTap?.id === id;\n this.cancelGroupTap();\n if (selection?.kind !== 'group') {\n if (selection) request.onSelect(selection);\n } else if (doubleTap) {\n request.onToggleGroup(selection.pathKey);\n } else {\n // Defer group selection so expansion does not replace the inspected resource.\n this.pendingGroupTap = { id, timer: setTimeout(() => {\n this.pendingGroupTap = undefined;\n this.interactiveRequest()?.onSelect(selection);\n }, 350) };\n }\n };\n core.on('tap', 'node', selectElement);\n core.on('tap', 'edge', selectElement);\n core.on('tap', (event) => {\n if (event.target === core) this.cancelGroupTap();\n });\n const hoverElement = (event: cytoscape.EventObject) => {\n const request = this.interactiveRequest();\n if (!request) return;\n const id = event.target.id() as GraphSceneElementId;\n const selection = request.scene.interaction.selectionByElementId.get(id);\n if (selection) request.onHover(selection);\n const title = event.target.data('tooltip') as string | undefined;\n if (title) {\n this.tooltip.textContent = title;\n this.tooltip.hidden = false;\n this.positionTooltip(event.renderedPosition);\n }\n };\n core.on('mouseover', 'node', hoverElement);\n core.on('mouseover', 'edge', hoverElement);\n const moveTooltip = (event: cytoscape.EventObject) => this.positionTooltip(event.renderedPosition);\n core.on('mousemove', 'node', moveTooltip);\n core.on('mousemove', 'edge', moveTooltip);\n const clearHover = () => this.clearHover();\n core.on('mouseout', 'node', clearHover);\n core.on('mouseout', 'edge', clearHover);\n core.on('zoom', () => this.updateSemanticZoom());\n }\n\n private interactiveRequest(): GraphRenderRequest | undefined {\n const request = this.latestRequest;\n return request && this.appliedScene?.contentKey === request.scene.contentKey ? request : undefined;\n }\n\n private syncInteraction(request: GraphRenderRequest): void {\n const core = this.core;\n if (!core || this.appliedScene?.topologyKey !== request.scene.topologyKey) return;\n core.batch(() => {\n core.elements().removeClass('semantic-selected semantic-hover');\n if (request.hovered) {\n for (const id of request.scene.interaction.hoverElementIdsBySelection.get(selectionKey(request.hovered)) ?? []) {\n core.getElementById(id).addClass('semantic-hover');\n }\n }\n if (request.selected) {\n for (const id of request.scene.interaction.primaryElementIdsBySelection.get(selectionKey(request.selected)) ?? []) {\n core.getElementById(id).addClass('semantic-selected');\n }\n }\n });\n }\n\n private consumeFitIfCurrentTarget(): void {\n const targetContentKey = this.latestRequest?.scene.contentKey;\n if (!targetContentKey\n || this.fitTargetContentKey !== targetContentKey\n || !this.core\n || this.targetNeedsApply()) return;\n this.core.resize();\n this.core.fit(undefined, GRAPH_GEOMETRY.fitPadding);\n this.fitTargetContentKey = undefined;\n this.updateSemanticZoom();\n }\n\n private consumeAnchorIfCurrentTarget(): void {\n const targetContentKey = this.latestRequest?.scene.contentKey;\n if (!targetContentKey || this.anchorTargetContentKey !== targetContentKey) return;\n this.anchorElementId = undefined;\n this.anchorTargetContentKey = undefined;\n }\n\n private targetNeedsApply(): boolean {\n const target = this.latestRequest?.scene;\n if (!target || !this.appliedScene) return target !== undefined;\n return this.forceRelayout || this.appliedScene.contentKey !== target.contentKey;\n }\n\n private updateSemanticZoom(force = false): void {\n const core = this.core;\n if (!core) return;\n const overview = isOverviewGraphScale(core.zoom());\n if (!force && overview === this.overview) return;\n this.overview = overview;\n core.batch(() => {\n for (const node of core.nodes()) {\n node.data('displayLabel', overview ? node.data('overviewLabel') : node.data('detailLabel'));\n }\n for (const edge of core.edges()) {\n edge.data('displayLabel', overview ? '' : edge.data('detailLabel'));\n }\n });\n }\n\n private positionTooltip(position: GraphPosition): void {\n const maxX = Math.max(8, this.host.clientWidth - this.tooltip.offsetWidth - 8);\n const maxY = Math.max(8, this.host.clientHeight - this.tooltip.offsetHeight - 8);\n this.tooltip.style.left = `${Math.max(8, Math.min(maxX, position.x + 12))}px`;\n this.tooltip.style.top = `${Math.max(8, Math.min(maxY, position.y + 12))}px`;\n }\n\n private hideTooltip(): void {\n this.tooltip.hidden = true;\n this.tooltip.textContent = '';\n }\n\n private cancelGroupTap(): void {\n if (this.pendingGroupTap) clearTimeout(this.pendingGroupTap.timer);\n this.pendingGroupTap = undefined;\n }\n\n private clearHover(): void {\n this.hideTooltip();\n this.latestRequest?.onHover(undefined);\n }\n\n private showStatus(kind: 'loading' | 'layout' | 'empty' | 'error', message: string, retry = false): void {\n this.status.dataset.state = kind;\n this.statusMessage.textContent = message;\n this.retryButton.hidden = !retry;\n this.status.hidden = false;\n this.host.setAttribute('aria-busy', kind === 'loading' || kind === 'layout' ? 'true' : 'false');\n }\n\n private hideStatus(): void {\n this.status.hidden = true;\n this.retryButton.hidden = true;\n this.host.setAttribute('aria-busy', 'false');\n }\n\n private resolveCurrentRequest(\n version: number,\n contentKey: string,\n ): { readonly version: number; readonly request: GraphRenderRequest } | undefined {\n if (this.destroyed) return undefined;\n const request = this.latestRequest;\n if (!request) return undefined;\n if (version === this.requestVersion || request.scene.contentKey === contentKey) {\n return { version: this.requestVersion, request };\n }\n return undefined;\n }\n}\n\nconst browserGraphRendererEnvironment: GraphRendererEnvironment = {\n createElement: (tagName) => document.createElement(tagName),\n loadRuntime: async () => {\n const [cytoscapeModule, elkModule] = await Promise.all([\n import('cytoscape'),\n import('elkjs/lib/elk.bundled.js'),\n ]);\n return {\n createCore: cytoscapeModule.default,\n elk: new elkModule.default(),\n };\n },\n layoutScene: layoutGraphScene,\n observeResize: (element, onResize) => {\n if (typeof ResizeObserver === 'undefined') return { disconnect: () => undefined };\n const view = element.ownerDocument.defaultView;\n let animationFrame: number | undefined;\n const observer = new ResizeObserver(() => {\n if (!view || animationFrame !== undefined) return;\n animationFrame = view.requestAnimationFrame(() => {\n animationFrame = undefined;\n onResize();\n });\n });\n observer.observe(element);\n return {\n disconnect: () => {\n observer.disconnect();\n if (animationFrame !== undefined) {\n view?.cancelAnimationFrame(animationFrame);\n animationFrame = undefined;\n }\n },\n };\n },\n};\n\nfunction replaceElements(core: cytoscape.Core, scene: GraphScene): void {\n const definitions: cytoscape.ElementDefinition[] = [\n ...scene.nodes.map(nodeDefinition),\n ...scene.edges.map(edgeDefinition),\n ];\n core.startBatch();\n core.elements().remove();\n core.add(definitions);\n core.endBatch();\n}\n\nexport function updateElementData(core: cytoscape.Core, scene: GraphScene): void {\n core.batch(() => {\n for (const node of scene.nodes) {\n const element = core.getElementById(node.id);\n if (element.nonempty()) element.data(nodeRenderableData(node));\n }\n for (const edge of scene.edges) {\n const element = core.getElementById(edge.id);\n if (element.nonempty()) element.data(edgeRenderableData(edge));\n }\n });\n}\n\nfunction nodeDefinition(node: GraphSceneNode): cytoscape.ElementDefinition {\n return {\n group: 'nodes',\n data: {\n id: node.id,\n parent: node.parentId,\n ...nodeRenderableData(node),\n },\n };\n}\n\nfunction nodeRenderableData(node: GraphSceneNode): Record<string, unknown> {\n const dimensions = nodeDimensions(node);\n const labelMaxWidth = node.kind === 'group' && node.collapsed\n ? expandedGroupLabelMaxWidth(dimensions.width)\n : 160;\n return {\n kind: node.kind,\n passKind: node.kind === 'pass' ? node.passKind : undefined,\n resourceKind: (node.kind === 'resource' || node.kind === 'root') ? node.resourceKind : undefined,\n collapsed: node.kind === 'group' && node.collapsed ? 1 : 0,\n hasCulled: node.kind === 'group' && node.culledNodeCount > 0 ? 1 : 0,\n depthBand: node.kind === 'group' ? node.depthBand : undefined,\n detailLabel: node.label,\n overviewLabel: node.overviewLabel,\n displayLabel: node.label,\n tooltip: node.title,\n labelMaxWidth,\n width: dimensions.width,\n height: dimensions.height,\n };\n}\n\nfunction edgeDefinition(edge: GraphSceneEdge): cytoscape.ElementDefinition {\n return {\n group: 'edges',\n data: {\n id: edge.id,\n source: edge.from,\n target: edge.to,\n ...edgeRenderableData(edge),\n },\n };\n}\n\nfunction edgeRenderableData(edge: GraphSceneEdge): Record<string, unknown> {\n const detailLabel = graphEdgeDisplayLabel(edge);\n return {\n kind: edge.kind,\n detailLabel,\n displayLabel: detailLabel,\n tooltip: edge.title,\n };\n}\n\nfunction viewport(core: cytoscape.Core): Viewport {\n return { pan: { ...core.pan() }, zoom: core.zoom() };\n}\n\nfunction restoreViewport(core: cytoscape.Core, state: Viewport): void {\n core.zoom(state.zoom);\n core.pan(state.pan);\n}\n\nfunction renderedPosition(core: cytoscape.Core, id: GraphSceneElementId): GraphPosition | undefined {\n const element = core.getElementById(id);\n return element.nonempty() && element.isNode() ? { ...element.renderedPosition() } : undefined;\n}\n\nexport {\n createCytoscapeEdgeRouteData,\n createElkLayoutGraph,\n layoutGraphScene,\n} from './panelGraphLayout.ts';\nexport type {\n CytoscapeEdgeRouteData,\n GraphEdgeRoute,\n GraphLayoutResult,\n GraphPosition,\n} from './panelGraphLayout.ts';\nexport {\n createGraphStyles,\n expandedGroupLabelMaxWidth,\n graphEdgeDisplayLabel,\n graphLayoutGeometryKey,\n isOverviewGraphScale,\n} from './panelGraphVisuals.ts';\n"]}
|
|
@@ -51,8 +51,8 @@ export class DiagnosticsView {
|
|
|
51
51
|
const section = this.createSection('Retention roots', 'Roots explain why graph work survived dead-node elimination.');
|
|
52
52
|
const list = document.createElement('div');
|
|
53
53
|
list.className = 'zenfg-inspector-diagnostic-list';
|
|
54
|
-
snapshot.roots.forEach((root
|
|
55
|
-
const selection = { kind: 'root',
|
|
54
|
+
snapshot.roots.forEach((root) => {
|
|
55
|
+
const selection = { kind: 'root', key: root.key };
|
|
56
56
|
const button = createRelationButton(`${root.reason} · ${root.resource ? labelResource(root.resource) : root.nodeId === undefined ? '-' : `node-${root.nodeId}`}`, selection, this.callbacks.onSelect);
|
|
57
57
|
registerSelectable(this.rows, button, selection, this.callbacks);
|
|
58
58
|
list.appendChild(button);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelDiagnosticsView.js","sourceRoot":"","sources":["../src/panelDiagnosticsView.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE5E,OAAO,EACN,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAElB,kBAAkB,GAClB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,OAAO,eAAe;IAQE;IAPpB,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,CAAC;IACjC,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACzC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACxC,IAAI,GAAG,IAAI,GAAG,EAAyB,CAAC;IACjD,QAAQ,CAAuC;IAC/C,QAAQ,CAAwB;IAExC,YAA6B,SAA6B,EAAE,QAAgB;QAA/C,cAAS,GAAT,SAAS,CAAoB;QACzD,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,uDAAuD,CAAC;QAC9E,IAAI,CAAC,IAAI,CAAC,EAAE,GAAG,GAAG,QAAQ,mBAAmB,CAAC;QAC9C,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAC3C,IAAI,CAAC,QAAQ,CAAC,SAAS,GAAG,sCAAsC,CAAC;QACjE,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,kCAAkC,CAAC;QAC5D,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC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H,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACpC,OAAO,OAAO,CAAC;IAChB,CAAC;CACD","sourcesContent":["import type { FrameGraphDebugViewModel } from './debugCaptureModel.ts';\nimport { createCell, labelNode, labelResource } from './panelDomHelpers.ts';\nimport type { Selection } from './panelTypes.ts';\nimport {\n\tcreateEmptyTableRow,\n\tcreateKindCell,\n\tcreateRelationButton,\n\tcreateSelectionCell,\n\tcreateTableScroller,\n\tregisterSelectable,\n\ttype WorkbenchCallbacks,\n\tupdateSelectedRows,\n} from './panelWorkbenchHelpers.ts';\n\nexport class DiagnosticsView {\n\treadonly root = document.createElement('section');\n\tprivate readonly scroller = document.createElement('div');\n\tprivate readonly content = document.createElement('div');\n\tprivate readonly rows = new Map<string, HTMLElement[]>();\n\tprivate snapshot: FrameGraphDebugViewModel | undefined;\n\tprivate selected: Selection | undefined;\n\n\tconstructor(private readonly callbacks: WorkbenchCallbacks, idPrefix: string) {\n\t\tthis.root.className = 'zenfg-inspector-view zenfg-inspector-diagnostics-view';\n\t\tthis.root.id = `${idPrefix}-view-diagnostics`;\n\t\tthis.root.setAttribute('role', 'tabpanel');\n\t\tthis.scroller.className = 'zenfg-inspector-diagnostics-scroller';\n\t\tthis.content.className = 'zenfg-inspector-diagnostics-grid';\n\t\tthis.scroller.appendChild(this.content);\n\t\tthis.root.appendChild(this.scroller);\n\t}\n\n\tsetSnapshot(snapshot: FrameGraphDebugViewModel): void {\n\t\tthis.snapshot = snapshot;\n\t\tthis.render();\n\t}\n\n\tsetSelection(selected: Selection | undefined): void {\n\t\tthis.selected = selected;\n\t\tupdateSelectedRows(this.rows, selected);\n\t}\n\n\tprivate render(): void {\n\t\tconst snapshot = this.snapshot;\n\t\tif (!snapshot) return;\n\t\tthis.rows.clear();\n\t\tthis.content.replaceChildren(\n\t\t\tthis.createRoots(snapshot),\n\t\t\tthis.createCulled(snapshot),\n\t\t\tthis.createSegments(snapshot),\n\t\t\tthis.createTiming(snapshot),\n\t\t);\n\t\tupdateSelectedRows(this.rows, this.selected);\n\t}\n\n\tprivate createSection(title: string, description?: string): HTMLElement {\n\t\tconst section = document.createElement('section');\n\t\tsection.className = 'zenfg-inspector-diagnostic-card';\n\t\tconst heading = document.createElement('h2');\n\t\theading.textContent = title;\n\t\tsection.appendChild(heading);\n\t\tif (description) {\n\t\t\tconst text = document.createElement('p');\n\t\t\ttext.textContent = description;\n\t\t\tsection.appendChild(text);\n\t\t}\n\t\treturn section;\n\t}\n\n\tprivate createRoots(snapshot: FrameGraphDebugViewModel): HTMLElement {\n\t\tconst section = this.createSection('Retention roots', 'Roots explain why graph work survived dead-node elimination.');\n\t\tconst list = document.createElement('div');\n\t\tlist.className = 'zenfg-inspector-diagnostic-list';\n\t\tsnapshot.roots.forEach((root, index) => {\n\t\t\tconst selection: Selection = { kind: 'root', index };\n\t\t\tconst button = createRelationButton(\n\t\t\t\t`${root.reason} · ${root.resource ? labelResource(root.resource) : root.nodeId === undefined ? '-' : `node-${root.nodeId}`}`,\n\t\t\t\tselection,\n\t\t\t\tthis.callbacks.onSelect,\n\t\t\t);\n\t\t\tregisterSelectable(this.rows, button, selection, this.callbacks);\n\t\t\tlist.appendChild(button);\n\t\t});\n\t\tif (snapshot.roots.length === 0) list.textContent = 'No retention roots.';\n\t\tsection.appendChild(list);\n\t\treturn section;\n\t}\n\n\tprivate createCulled(snapshot: FrameGraphDebugViewModel): HTMLElement {\n\t\tconst section = this.createSection('Culled nodes', 'Recorded nodes that were not reachable from a retention root.');\n\t\tconst table = createTableScroller([{ label: 'Node' }, { label: 'Kind', column: 'kind' }, { label: 'Reason' }]);\n\t\tfor (const [index, entry] of snapshot.culledNodes.entries()) {\n\t\t\tconst selection: Selection = { kind: 'culled', index };\n\t\t\tconst row = document.createElement('tr');\n\t\t\tregisterSelectable(this.rows, row, selection, this.callbacks);\n\t\t\trow.append(\n\t\t\t\tcreateSelectionCell(labelNode(entry.node), selection, this.callbacks),\n\t\t\t\tcreateKindCell(entry.node.kind),\n\t\t\t\tcreateCell(entry.reason),\n\t\t\t);\n\t\t\ttable.body.appendChild(row);\n\t\t}\n\t\tif (snapshot.culledNodes.length === 0) table.body.appendChild(createEmptyTableRow(3, 'No culled nodes.'));\n\t\tsection.appendChild(table.scroller);\n\t\treturn section;\n\t}\n\n\tprivate createSegments(snapshot: FrameGraphDebugViewModel): HTMLElement {\n\t\tconst section = this.createSection(\n\t\t\t'Execution segments',\n\t\t\t'An opaque interval is a graph boundary around external work; it is not a count or timing of third-party GPU submissions.',\n\t\t);\n\t\tconst table = createTableScroller([{ label: '#', column: 'numeric' }, { label: 'Kind', column: 'kind' }, { label: 'Nodes' }]);\n\t\tfor (const segment of snapshot.executionSegments) {\n\t\t\tconst selection: Selection = { kind: 'segment', index: segment.index };\n\t\t\tconst row = document.createElement('tr');\n\t\t\tregisterSelectable(this.rows, row, selection, this.callbacks);\n\t\t\tconst labels = segment.nodeIds.map((id) => snapshot.nodeById.get(id))\n\t\t\t\t.filter((node) => node !== undefined)\n\t\t\t\t.map((node) => labelNode(node));\n\t\t\trow.append(\n\t\t\t\tcreateSelectionCell(String(segment.index), selection, this.callbacks, 'numeric'),\n\t\t\t\tcreateKindCell(segment.kind, segment.kind === 'frame-graph' ? 'FrameGraph command segment' : 'Opaque interval'),\n\t\t\t\tcreateCell(labels.join(', ') || '-'),\n\t\t\t);\n\t\t\ttable.body.appendChild(row);\n\t\t}\n\t\tif (snapshot.executionSegments.length === 0) table.body.appendChild(createEmptyTableRow(3, 'No execution segments.'));\n\t\tsection.appendChild(table.scroller);\n\t\treturn section;\n\t}\n\n\tprivate createTiming(snapshot: FrameGraphDebugViewModel): HTMLElement {\n\t\tconst metrics = snapshot.metrics;\n\t\tconst coverage = metrics.timingEligibleNodeCount === 0\n\t\t\t? 'No eligible render or compute passes'\n\t\t\t: `${metrics.timedNodeCount}/${metrics.timingEligibleNodeCount} eligible passes timed (${((metrics.timedNodeCount / metrics.timingEligibleNodeCount) * 100).toFixed(0)}%)`;\n\t\tconst section = this.createSection('GPU timing coverage', coverage);\n\t\tif (snapshot.profiling.status === 'unavailable') {\n\t\t\tconst status = document.createElement('p');\n\t\t\tstatus.textContent = `Timing unavailable: ${snapshot.profiling.reason}.`;\n\t\t\tsection.appendChild(status);\n\t\t}\n\t\tconst table = createTableScroller([{ label: 'Pass' }, { label: 'Status', column: 'kind' }, { label: 'GPU (ms)', column: 'numeric' }]);\n\t\tfor (const node of snapshot.nodes.filter((candidate) => candidate.kind === 'render' || candidate.kind === 'compute')) {\n\t\t\tconst selection: Selection = { kind: 'node', id: node.id };\n\t\t\tconst row = document.createElement('tr');\n\t\t\tregisterSelectable(this.rows, row, selection, this.callbacks);\n\t\t\trow.append(\n\t\t\t\tcreateSelectionCell(labelNode(node), selection, this.callbacks),\n\t\t\t\tcreateKindCell(node.gpuDurationMicros === undefined ? 'not-timed' : 'timed', node.gpuDurationMicros === undefined ? 'Not timed' : 'Timed'),\n\t\t\t\tcreateCell(node.gpuDurationMicros === undefined ? '-' : (node.gpuDurationMicros / 1000).toFixed(3), { column: 'numeric' }),\r\n\t\t\t);\n\t\t\ttable.body.appendChild(row);\n\t\t}\n\t\tif (table.body.childElementCount === 0) table.body.appendChild(createEmptyTableRow(3, 'No timing-eligible passes.'));\n\t\tsection.appendChild(table.scroller);\n\t\treturn section;\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"panelDiagnosticsView.js","sourceRoot":"","sources":["../src/panelDiagnosticsView.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAE5E,OAAO,EACN,mBAAmB,EACnB,cAAc,EACd,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EAElB,kBAAkB,GAClB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,OAAO,eAAe;IAQE;IAPpB,IAAI,GAAG,QAAQ,CAAC,aAAa,CAAC,SAAS,CAAC,C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IAAI,CAAC,SAAS,CAAC,EAC/D,cAAc,CAAC,IAAI,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,EAAE,IAAI,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,EAC1I,UAAU,CAAC,IAAI,CAAC,iBAAiB,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAC1H,CAAC;YACF,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC;QAC7B,CAAC;QACD,IAAI,KAAK,CAAC,IAAI,CAAC,iBAAiB,KAAK,CAAC;YAAE,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,mBAAmB,CAAC,CAAC,EAAE,4BAA4B,CAAC,CAAC,CAAC;QACrH,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACpC,OAAO,OAAO,CAAC;IAChB,CAAC;CACD","sourcesContent":["import type { FrameGraphDebugViewModel } from './debugCaptureModel.ts';\nimport { createCell, labelNode, labelResource } from './panelDomHelpers.ts';\nimport type { Selection } from './panelTypes.ts';\nimport {\n\tcreateEmptyTableRow,\n\tcreateKindCell,\n\tcreateRelationButton,\n\tcreateSelectionCell,\n\tcreateTableScroller,\n\tregisterSelectable,\n\ttype WorkbenchCallbacks,\n\tupdateSelectedRows,\n} from './panelWorkbenchHelpers.ts';\n\nexport class DiagnosticsView {\n\treadonly root = document.createElement('section');\n\tprivate readonly scroller = document.createElement('div');\n\tprivate readonly content = document.createElement('div');\n\tprivate readonly rows = new Map<string, HTMLElement[]>();\n\tprivate snapshot: FrameGraphDebugViewModel | undefined;\n\tprivate selected: Selection | undefined;\n\n\tconstructor(private readonly callbacks: WorkbenchCallbacks, idPrefix: string) {\n\t\tthis.root.className = 'zenfg-inspector-view zenfg-inspector-diagnostics-view';\n\t\tthis.root.id = `${idPrefix}-view-diagnostics`;\n\t\tthis.root.setAttribute('role', 'tabpanel');\n\t\tthis.scroller.className = 'zenfg-inspector-diagnostics-scroller';\n\t\tthis.content.className = 'zenfg-inspector-diagnostics-grid';\n\t\tthis.scroller.appendChild(this.content);\n\t\tthis.root.appendChild(this.scroller);\n\t}\n\n\tsetSnapshot(snapshot: FrameGraphDebugViewModel): void {\n\t\tthis.snapshot = snapshot;\n\t\tthis.render();\n\t}\n\n\tsetSelection(selected: Selection | undefined): void {\n\t\tthis.selected = selected;\n\t\tupdateSelectedRows(this.rows, selected);\n\t}\n\n\tprivate render(): void {\n\t\tconst snapshot = this.snapshot;\n\t\tif (!snapshot) return;\n\t\tthis.rows.clear();\n\t\tthis.content.replaceChildren(\n\t\t\tthis.createRoots(snapshot),\n\t\t\tthis.createCulled(snapshot),\n\t\t\tthis.createSegments(snapshot),\n\t\t\tthis.createTiming(snapshot),\n\t\t);\n\t\tupdateSelectedRows(this.rows, this.selected);\n\t}\n\n\tprivate createSection(title: string, description?: string): HTMLElement {\n\t\tconst section = document.createElement('section');\n\t\tsection.className = 'zenfg-inspector-diagnostic-card';\n\t\tconst heading = document.createElement('h2');\n\t\theading.textContent = title;\n\t\tsection.appendChild(heading);\n\t\tif (description) {\n\t\t\tconst text = document.createElement('p');\n\t\t\ttext.textContent = description;\n\t\t\tsection.appendChild(text);\n\t\t}\n\t\treturn section;\n\t}\n\n\tprivate createRoots(snapshot: FrameGraphDebugViewModel): HTMLElement {\n\t\tconst section = this.createSection('Retention roots', 'Roots explain why graph work survived dead-node elimination.');\n\t\tconst list = document.createElement('div');\n\t\tlist.className = 'zenfg-inspector-diagnostic-list';\n\t\tsnapshot.roots.forEach((root) => {\n\t\t\tconst selection: Selection = { kind: 'root', key: root.key };\n\t\t\tconst button = createRelationButton(\n\t\t\t\t`${root.reason} · ${root.resource ? labelResource(root.resource) : root.nodeId === undefined ? '-' : `node-${root.nodeId}`}`,\n\t\t\t\tselection,\n\t\t\t\tthis.callbacks.onSelect,\n\t\t\t);\n\t\t\tregisterSelectable(this.rows, button, selection, this.callbacks);\n\t\t\tlist.appendChild(button);\n\t\t});\n\t\tif (snapshot.roots.length === 0) list.textContent = 'No retention roots.';\n\t\tsection.appendChild(list);\n\t\treturn section;\n\t}\n\n\tprivate createCulled(snapshot: FrameGraphDebugViewModel): HTMLElement {\n\t\tconst section = this.createSection('Culled nodes', 'Recorded nodes that were not reachable from a retention root.');\n\t\tconst table = createTableScroller([{ label: 'Node' }, { label: 'Kind', column: 'kind' }, { label: 'Reason' }]);\n\t\tfor (const [index, entry] of snapshot.culledNodes.entries()) {\n\t\t\tconst selection: Selection = { kind: 'culled', index };\n\t\t\tconst row = document.createElement('tr');\n\t\t\tregisterSelectable(this.rows, row, selection, this.callbacks);\n\t\t\trow.append(\n\t\t\t\tcreateSelectionCell(labelNode(entry.node), selection, this.callbacks),\n\t\t\t\tcreateKindCell(entry.node.kind),\n\t\t\t\tcreateCell(entry.reason),\n\t\t\t);\n\t\t\ttable.body.appendChild(row);\n\t\t}\n\t\tif (snapshot.culledNodes.length === 0) table.body.appendChild(createEmptyTableRow(3, 'No culled nodes.'));\n\t\tsection.appendChild(table.scroller);\n\t\treturn section;\n\t}\n\n\tprivate createSegments(snapshot: FrameGraphDebugViewModel): HTMLElement {\n\t\tconst section = this.createSection(\n\t\t\t'Execution segments',\n\t\t\t'An opaque interval is a graph boundary around external work; it is not a count or timing of third-party GPU submissions.',\n\t\t);\n\t\tconst table = createTableScroller([{ label: '#', column: 'numeric' }, { label: 'Kind', column: 'kind' }, { label: 'Nodes' }]);\n\t\tfor (const segment of snapshot.executionSegments) {\n\t\t\tconst selection: Selection = { kind: 'segment', index: segment.index };\n\t\t\tconst row = document.createElement('tr');\n\t\t\tregisterSelectable(this.rows, row, selection, this.callbacks);\n\t\t\tconst labels = segment.nodeIds.map((id) => snapshot.nodeById.get(id))\n\t\t\t\t.filter((node) => node !== undefined)\n\t\t\t\t.map((node) => labelNode(node));\n\t\t\trow.append(\n\t\t\t\tcreateSelectionCell(String(segment.index), selection, this.callbacks, 'numeric'),\n\t\t\t\tcreateKindCell(segment.kind, segment.kind === 'frame-graph' ? 'FrameGraph command segment' : 'Opaque interval'),\n\t\t\t\tcreateCell(labels.join(', ') || '-'),\n\t\t\t);\n\t\t\ttable.body.appendChild(row);\n\t\t}\n\t\tif (snapshot.executionSegments.length === 0) table.body.appendChild(createEmptyTableRow(3, 'No execution segments.'));\n\t\tsection.appendChild(table.scroller);\n\t\treturn section;\n\t}\n\n\tprivate createTiming(snapshot: FrameGraphDebugViewModel): HTMLElement {\n\t\tconst metrics = snapshot.metrics;\n\t\tconst coverage = metrics.timingEligibleNodeCount === 0\n\t\t\t? 'No eligible render or compute passes'\n\t\t\t: `${metrics.timedNodeCount}/${metrics.timingEligibleNodeCount} eligible passes timed (${((metrics.timedNodeCount / metrics.timingEligibleNodeCount) * 100).toFixed(0)}%)`;\n\t\tconst section = this.createSection('GPU timing coverage', coverage);\n\t\tif (snapshot.profiling.status === 'unavailable') {\n\t\t\tconst status = document.createElement('p');\n\t\t\tstatus.textContent = `Timing unavailable: ${snapshot.profiling.reason}.`;\n\t\t\tsection.appendChild(status);\n\t\t}\n\t\tconst table = createTableScroller([{ label: 'Pass' }, { label: 'Status', column: 'kind' }, { label: 'GPU (ms)', column: 'numeric' }]);\n\t\tfor (const node of snapshot.nodes.filter((candidate) => candidate.kind === 'render' || candidate.kind === 'compute')) {\n\t\t\tconst selection: Selection = { kind: 'node', id: node.id };\n\t\t\tconst row = document.createElement('tr');\n\t\t\tregisterSelectable(this.rows, row, selection, this.callbacks);\n\t\t\trow.append(\n\t\t\t\tcreateSelectionCell(labelNode(node), selection, this.callbacks),\n\t\t\t\tcreateKindCell(node.gpuDurationMicros === undefined ? 'not-timed' : 'timed', node.gpuDurationMicros === undefined ? 'Not timed' : 'Timed'),\n\t\t\t\tcreateCell(node.gpuDurationMicros === undefined ? '-' : (node.gpuDurationMicros / 1000).toFixed(3), { column: 'numeric' }),\n\t\t\t);\n\t\t\ttable.body.appendChild(row);\n\t\t}\n\t\tif (table.body.childElementCount === 0) table.body.appendChild(createEmptyTableRow(3, 'No timing-eligible passes.'));\n\t\tsection.appendChild(table.scroller);\n\t\treturn section;\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelGraphLayout.d.ts","sourceRoot":"","sources":["../src/panelGraphLayout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,WAAW,CAAC;AACvC,OAAO,KAAK,EAAE,GAAG,EAAmB,OAAO,EAAW,MAAM,mBAAmB,CAAC;AAEhF,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAkB,MAAM,sBAAsB,CAAC;AAG5F,MAAM,MAAM,aAAa,GAAG;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC;AACvE,MAAM,MAAM,cAAc,GAAG;IACzB,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;IACnC,QAAQ,CAAC,UAAU,EAAE,SAAS,aAAa,EAAE,CAAC;IAC9C,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;CACpC,CAAC;AACF,MAAM,MAAM,iBAAiB,GAAG;IAC5B,QAAQ,CAAC,SAAS,EAAE,WAAW,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;IACpE,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAC,mBAAmB,EAAE,cAAc,CAAC,CAAC;CACrE,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACjC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,cAAc,E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E,GAAG,EAAE,KAAK,EAAE,UAAU,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAU9F;AAOD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,UAAU,GAAG,OAAO,CAoF/D;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI,CAoBzG;AAED,wBAAgB,8BAA8B,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAWzE;AAED,wBAAgB,4BAA4B,CACxC,KAAK,EAAE,cAAc,GAAG,SAAS,EACjC,YAAY,EAAE,aAAa,EAC3B,YAAY,EAAE,aAAa,GAC5B,sBAAsB,GAAG,SAAS,CASpC"}
|
package/dist/panelGraphLayout.js
CHANGED
|
@@ -10,20 +10,34 @@ export async function layoutGraphScene(elk, scene) {
|
|
|
10
10
|
collectEdgeRoutes(layout, 0, 0, nodeOffsets, routes);
|
|
11
11
|
return { positions, routes };
|
|
12
12
|
}
|
|
13
|
+
function usesCenterPorts(node) {
|
|
14
|
+
return node.kind === 'resource' || node.kind === 'root'
|
|
15
|
+
|| (node.kind === 'pass' && node.passKind === 'external-submission');
|
|
16
|
+
}
|
|
13
17
|
export function createElkLayoutGraph(scene) {
|
|
14
18
|
const childrenByParent = new Map();
|
|
15
19
|
const portsByNode = new Map();
|
|
20
|
+
const nodesById = new Map(scene.nodes.map((node) => [node.id, node]));
|
|
21
|
+
const boundaryPort = (id, source) => {
|
|
22
|
+
const node = nodesById.get(id);
|
|
23
|
+
if (!usesCenterPorts(node))
|
|
24
|
+
return {};
|
|
25
|
+
const dimensions = nodeDimensions(node);
|
|
26
|
+
return { x: source ? dimensions.width : 0, y: dimensions.height / 2 };
|
|
27
|
+
};
|
|
16
28
|
const elkEdges = scene.edges.map((edge) => {
|
|
17
29
|
const sourcePortId = `${edge.id}:source`;
|
|
18
30
|
const targetPortId = `${edge.id}:target`;
|
|
19
31
|
appendPort(portsByNode, edge.from, {
|
|
20
32
|
id: sourcePortId,
|
|
33
|
+
...boundaryPort(edge.from, true),
|
|
21
34
|
width: 1,
|
|
22
35
|
height: 1,
|
|
23
36
|
layoutOptions: { 'elk.port.side': 'EAST' },
|
|
24
37
|
});
|
|
25
38
|
appendPort(portsByNode, edge.to, {
|
|
26
39
|
id: targetPortId,
|
|
40
|
+
...boundaryPort(edge.to, false),
|
|
27
41
|
width: 1,
|
|
28
42
|
height: 1,
|
|
29
43
|
layoutOptions: { 'elk.port.side': 'WEST' },
|
|
@@ -62,7 +76,7 @@ export function createElkLayoutGraph(scene) {
|
|
|
62
76
|
'elk.spacing.edgeEdge': '10',
|
|
63
77
|
'elk.layered.spacing.edgeEdgeBetweenLayers': '10',
|
|
64
78
|
} : {
|
|
65
|
-
'elk.portConstraints': 'FIXED_SIDE',
|
|
79
|
+
'elk.portConstraints': usesCenterPorts(node) ? 'FIXED_POS' : 'FIXED_SIDE',
|
|
66
80
|
},
|
|
67
81
|
};
|
|
68
82
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelGraphLayout.js","sourceRoot":"","sources":["../src/panelGraphLayout.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,0BAA0B,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAoBpG,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,GAAQ,EAAE,KAAiB;IAC9D,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAsC,CAAC;IAChE,sBAAsB,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;IAChD,MAAM,WAAW,GAAG,IAAI,GAAG,EAAsC,CAAC;IAClE,oBAAoB,CAAC,MAAM,E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MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC;IAC/B,MAAM,aAAa,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;IACxC,IAAI,aAAa,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,CAAC,EAAE,CAAC;IAC7D,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;IACvF,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,GAAG,MAAM,GAAG,EAAE,CAAC;IAC1C,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,GAAG,MAAM,GAAG,EAAE,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC;IACvF,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAChC,CAAC","sourcesContent":["import type cytoscape from 'cytoscape';\nimport type { ELK, ElkExtendedEdge, ElkNode, ElkPort } from 'elkjs/lib/elk-api';\n\nimport type { GraphScene, GraphSceneElementId, GraphSceneNode } from './panelGraphScene.ts';\nimport { expandedGroupLabelMaxWidth, GRAPH_GEOMETRY, nodeDimensions } from './panelGraphVisuals.ts';\n\nexport type GraphPosition = { readonly x: number; readonly y: number };\nexport type GraphEdgeRoute = {\n readonly startPoint: GraphPosition;\n readonly bendPoints: readonly GraphPosition[];\n readonly endPoint: GraphPosition;\n};\nexport type GraphLayoutResult = {\n readonly positions: ReadonlyMap<GraphSceneElementId, GraphPosition>;\n readonly routes: ReadonlyMap<GraphSceneElementId, GraphEdgeRoute>;\n};\n\nexport type CytoscapeEdgeRouteData = {\n readonly sourceEndpoint: string;\n readonly targetEndpoint: string;\n readonly segmentWeights: string;\n readonly segmentDistances: string;\n};\n\nexport async function layoutGraphScene(elk: ELK, scene: GraphScene): Promise<GraphLayoutResult> {\n const graph = createElkLayoutGraph(scene);\n const layout = await elk.layout(graph);\n const positions = new Map<GraphSceneElementId, GraphPosition>();\n collectLayoutPositions(layout, 0, 0, positions);\n const nodeOffsets = new Map<GraphSceneElementId, GraphPosition>();\n collectLayoutOffsets(layout, 0, 0, nodeOffsets);\n const routes = new Map<GraphSceneElementId, GraphEdgeRoute>();\n collectEdgeRoutes(layout, 0, 0, nodeOffsets, routes);\n return { positions, routes };\n}\n\nexport function createElkLayoutGraph(scene: GraphScene): ElkNode {\n const childrenByParent = new Map<GraphSceneElementId | undefined, GraphSceneNode[]>();\n const portsByNode = new Map<GraphSceneElementId, ElkPort[]>();\n const elkEdges = scene.edges.map((edge): ElkExtendedEdge => {\n const sourcePortId = `${edge.id}:source`;\n const targetPortId = `${edge.id}:target`;\n appendPort(portsByNode, edge.from, {\n id: sourcePortId,\n width: 1,\n height: 1,\n layoutOptions: { 'elk.port.side': 'EAST' },\n });\n appendPort(portsByNode, edge.to, {\n id: targetPortId,\n width: 1,\n height: 1,\n layoutOptions: { 'elk.port.side': 'WEST' },\n });\n return {\n id: edge.id,\n sources: [sourcePortId],\n targets: [targetPortId],\n };\n });\n for (const node of scene.nodes) {\n const children = childrenByParent.get(node.parentId) ?? [];\n children.push(node);\n childrenByParent.set(node.parentId, children);\n }\n const createNode = (node: GraphSceneNode): ElkNode => {\n const children = childrenByParent.get(node.id)?.map(createNode);\n const dimensions = nodeDimensions(node);\n return {\n id: node.id,\n width: dimensions.width,\n height: dimensions.height,\n children,\n ports: portsByNode.get(node.id),\n layoutOptions: children?.length ? {\n 'elk.algorithm': 'layered',\n 'elk.direction': 'RIGHT',\n 'elk.edgeRouting': 'ORTHOGONAL',\n 'elk.hierarchyHandling': 'INCLUDE_CHILDREN',\n 'elk.portConstraints': 'FIXED_SIDE',\n 'elk.layered.mergeEdges': 'false',\n 'elk.layered.mergeHierarchyEdges': 'false',\n 'elk.padding': elkPadding(),\n 'elk.spacing.nodeNode': '36',\n 'elk.layered.spacing.nodeNodeBetweenLayers': '72',\n 'elk.spacing.edgeEdge': '10',\n 'elk.layered.spacing.edgeEdgeBetweenLayers': '10',\n } : {\n 'elk.portConstraints': 'FIXED_SIDE',\n },\n };\n };\n return {\n id: 'root',\n children: (childrenByParent.get(undefined) ?? []).map(createNode),\n edges: elkEdges,\n layoutOptions: {\n 'elk.algorithm': 'layered',\n 'elk.direction': 'RIGHT',\n 'elk.edgeRouting': 'ORTHOGONAL',\n 'elk.hierarchyHandling': 'INCLUDE_CHILDREN',\n 'elk.layered.mergeEdges': 'false',\n 'elk.layered.mergeHierarchyEdges': 'false',\n 'elk.spacing.nodeNode': '42',\n 'elk.layered.spacing.nodeNodeBetweenLayers': '88',\n 'elk.spacing.edgeNode': '20',\n 'elk.spacing.edgeEdge': '10',\n 'elk.layered.spacing.edgeEdgeBetweenLayers': '10',\n 'elk.layered.considerModelOrder.strategy': 'NODES_AND_EDGES',\n },\n };\n}\n\nexport function applyGraphLayout(core: cytoscape.Core, scene: GraphScene, layout: GraphLayoutResult): void {\n applyPositions(core, layout.positions);\n core.batch(() => {\n for (const edge of scene.edges) {\n const route = layout.routes.get(edge.id);\n const cytoscapeEdge = core.getElementById(edge.id);\n if (cytoscapeEdge.empty()) continue;\n const sourceNode = core.getElementById(edge.from);\n const targetNode = core.getElementById(edge.to);\n const routeData = sourceNode.nonempty() && targetNode.nonempty()\n ? createCytoscapeEdgeRouteData(route, sourceNode.position(), targetNode.position())\n : undefined;\n cytoscapeEdge\n .removeClass('elk-route elk-segments')\n .removeData('sourceEndpoint', 'targetEndpoint', 'segmentWeights', 'segmentDistances');\n if (!routeData) continue;\n cytoscapeEdge.data(routeData).addClass('elk-route');\n if (route!.bendPoints.length > 0) cytoscapeEdge.addClass('elk-segments');\n }\n });\n}\n\nexport function syncExpandedGroupLabelGeometry(core: cytoscape.Core): void {\n const groups = core.nodes('node[kind = \"group\"][collapsed = 0]');\n for (let iteration = 0; iteration < 2; iteration++) {\n const updates = groups.map((node) => ({\n node,\n labelMaxWidth: expandedGroupLabelMaxWidth(node.outerWidth()),\n }));\n core.batch(() => {\n for (const update of updates) update.node.data('labelMaxWidth', update.labelMaxWidth);\n });\n }\n}\n\nexport function createCytoscapeEdgeRouteData(\n route: GraphEdgeRoute | undefined,\n sourceCenter: GraphPosition,\n targetCenter: GraphPosition,\n): CytoscapeEdgeRouteData | undefined {\n if (!route || !isValidRoute(route)) return undefined;\n const segments = route.bendPoints.map((point) => segmentFromPoint(route.startPoint, route.endPoint, point));\n return {\n sourceEndpoint: endpointOffset(route.startPoint, sourceCenter),\n targetEndpoint: endpointOffset(route.endPoint, targetCenter),\n segmentWeights: segments.map((segment) => segment.weight).join(' '),\n segmentDistances: segments.map((segment) => segment.distance).join(' '),\n };\n}\n\nfunction elkPadding(): string {\n const padding = GRAPH_GEOMETRY.elkGroupPadding;\n return `[top=${padding.top},left=${padding.left},bottom=${padding.bottom},right=${padding.right}]`;\n}\n\nfunction appendPort(\n portsByNode: Map<GraphSceneElementId, ElkPort[]>,\n nodeId: GraphSceneElementId,\n port: ElkPort,\n): void {\n const ports = portsByNode.get(nodeId) ?? [];\n ports.push(port);\n portsByNode.set(nodeId, ports);\n}\n\nfunction collectLayoutPositions(\n node: ElkNode,\n offsetX: number,\n offsetY: number,\n positions: Map<GraphSceneElementId, GraphPosition>,\n): void {\n for (const child of node.children ?? []) {\n const x = offsetX + (child.x ?? 0);\n const y = offsetY + (child.y ?? 0);\n positions.set(child.id, {\n x: x + (child.width ?? 0) / 2,\n y: y + (child.height ?? 0) / 2,\n });\n collectLayoutPositions(child, x, y, positions);\n }\n}\n\nfunction collectLayoutOffsets(\n node: ElkNode,\n offsetX: number,\n offsetY: number,\n offsets: Map<GraphSceneElementId, GraphPosition>,\n): void {\n offsets.set(node.id, { x: offsetX, y: offsetY });\n for (const child of node.children ?? []) {\n collectLayoutOffsets(child, offsetX + (child.x ?? 0), offsetY + (child.y ?? 0), offsets);\n }\n}\n\nfunction collectEdgeRoutes(\n node: ElkNode,\n offsetX: number,\n offsetY: number,\n nodeOffsets: ReadonlyMap<GraphSceneElementId, GraphPosition>,\n routes: Map<GraphSceneElementId, GraphEdgeRoute>,\n): void {\n for (const edge of node.edges ?? []) {\n if (edge.sections?.length !== 1) continue;\n const section = edge.sections[0];\n if (!section) continue;\n // ELK may keep hierarchy edges on an ancestor while expressing their sections in container-local coordinates.\n const containerOffset = edge.container === undefined ? undefined : nodeOffsets.get(edge.container);\n const routeOffsetX = containerOffset?.x ?? offsetX;\n const routeOffsetY = containerOffset?.y ?? offsetY;\n routes.set(edge.id, {\n startPoint: offsetPoint(section.startPoint, routeOffsetX, routeOffsetY),\n bendPoints: (section.bendPoints ?? []).map((point) => offsetPoint(point, routeOffsetX, routeOffsetY)),\n endPoint: offsetPoint(section.endPoint, routeOffsetX, routeOffsetY),\n });\n }\n for (const child of node.children ?? []) {\n collectEdgeRoutes(\n child,\n offsetX + (child.x ?? 0),\n offsetY + (child.y ?? 0),\n nodeOffsets,\n routes,\n );\n }\n}\n\nfunction offsetPoint(point: GraphPosition, offsetX: number, offsetY: number): GraphPosition {\n return { x: point.x + offsetX, y: point.y + offsetY };\n}\n\nfunction isValidRoute(route: GraphEdgeRoute): boolean {\n const dx = route.endPoint.x - route.startPoint.x;\n const dy = route.endPoint.y - route.startPoint.y;\n return isFinitePoint(route.startPoint)\n && isFinitePoint(route.endPoint)\n && dx * dx + dy * dy > Number.EPSILON\n && route.bendPoints.every(isFinitePoint);\n}\n\nfunction isFinitePoint(point: GraphPosition): boolean {\n return Number.isFinite(point.x) && Number.isFinite(point.y);\n}\n\nfunction endpointOffset(point: GraphPosition, center: GraphPosition): string {\n return `${point.x - center.x}px ${point.y - center.y}px`;\n}\n\nfunction applyPositions(core: cytoscape.Core, positions: ReadonlyMap<GraphSceneElementId, GraphPosition>): void {\n core.batch(() => {\n for (const [id, position] of positions) {\n const node = core.getElementById(id);\n if (node.nonempty() && node.isNode() && !node.isParent()) node.position(position);\n }\n });\n}\n\nfunction segmentFromPoint(source: GraphPosition, target: GraphPosition, point: GraphPosition) {\n const dx = target.x - source.x;\n const dy = target.y - source.y;\n const lengthSquared = dx * dx + dy * dy;\n if (lengthSquared === 0) return { weight: 0.5, distance: 0 };\n const weight = ((point.x - source.x) * dx + (point.y - source.y) * dy) / lengthSquared;\n const projectedX = source.x + weight * dx;\n const projectedY = source.y + weight * dy;\n const length = Math.sqrt(lengthSquared);\n const distance = ((point.x - projectedX) * -dy + (point.y - projectedY) * dx) / length;\n return { weight, distance };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"panelGraphLayout.js","sourceRoot":"","sources":["../src/panelGraphLayout.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,0BAA0B,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAoBpG,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,GAAQ,EAAE,KAAiB;IAC9D,MAAM,KAAK,GAAG,oBAAoB,CAAC,KAAK,CAAC,CAAC;IAC1C,MAAM,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACvC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAsC,CAAC;IAChE,sBAAsB,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC;IAChD,MAAM,WAAW,GAAG,IAAI,GAAG,EAAsC,CAAC;IAClE,oBAAoB,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,WAAW,CAAC,CAAC;IAChD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAuC,CAAC;IAC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K,CAAC,CAAC,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,GAAG,aAAa,CAAC;IACvF,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,GAAG,MAAM,GAAG,EAAE,CAAC;IAC1C,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,GAAG,MAAM,GAAG,EAAE,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IACxC,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,KAAK,CAAC,CAAC,GAAG,UAAU,CAAC,GAAG,EAAE,CAAC,GAAG,MAAM,CAAC;IACvF,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,CAAC;AAChC,CAAC","sourcesContent":["import type cytoscape from 'cytoscape';\nimport type { ELK, ElkExtendedEdge, ElkNode, ElkPort } from 'elkjs/lib/elk-api';\n\nimport type { GraphScene, GraphSceneElementId, GraphSceneNode } from './panelGraphScene.ts';\nimport { expandedGroupLabelMaxWidth, GRAPH_GEOMETRY, nodeDimensions } from './panelGraphVisuals.ts';\n\nexport type GraphPosition = { readonly x: number; readonly y: number };\nexport type GraphEdgeRoute = {\n readonly startPoint: GraphPosition;\n readonly bendPoints: readonly GraphPosition[];\n readonly endPoint: GraphPosition;\n};\nexport type GraphLayoutResult = {\n readonly positions: ReadonlyMap<GraphSceneElementId, GraphPosition>;\n readonly routes: ReadonlyMap<GraphSceneElementId, GraphEdgeRoute>;\n};\n\nexport type CytoscapeEdgeRouteData = {\n readonly sourceEndpoint: string;\n readonly targetEndpoint: string;\n readonly segmentWeights: string;\n readonly segmentDistances: string;\n};\n\nexport async function layoutGraphScene(elk: ELK, scene: GraphScene): Promise<GraphLayoutResult> {\n const graph = createElkLayoutGraph(scene);\n const layout = await elk.layout(graph);\n const positions = new Map<GraphSceneElementId, GraphPosition>();\n collectLayoutPositions(layout, 0, 0, positions);\n const nodeOffsets = new Map<GraphSceneElementId, GraphPosition>();\n collectLayoutOffsets(layout, 0, 0, nodeOffsets);\n const routes = new Map<GraphSceneElementId, GraphEdgeRoute>();\n collectEdgeRoutes(layout, 0, 0, nodeOffsets, routes);\n return { positions, routes };\n}\n\nfunction usesCenterPorts(node: GraphSceneNode): boolean {\n return node.kind === 'resource' || node.kind === 'root'\n || (node.kind === 'pass' && node.passKind === 'external-submission');\n}\n\nexport function createElkLayoutGraph(scene: GraphScene): ElkNode {\n const childrenByParent = new Map<GraphSceneElementId | undefined, GraphSceneNode[]>();\n const portsByNode = new Map<GraphSceneElementId, ElkPort[]>();\n const nodesById = new Map(scene.nodes.map((node) => [node.id, node]));\n const boundaryPort = (id: string, source: boolean) => {\n const node = nodesById.get(id)!;\n if (!usesCenterPorts(node)) return {};\n const dimensions = nodeDimensions(node);\n return { x: source ? dimensions.width : 0, y: dimensions.height / 2 };\n };\n const elkEdges = scene.edges.map((edge): ElkExtendedEdge => {\n const sourcePortId = `${edge.id}:source`;\n const targetPortId = `${edge.id}:target`;\n appendPort(portsByNode, edge.from, {\n id: sourcePortId,\n ...boundaryPort(edge.from, true),\n width: 1,\n height: 1,\n layoutOptions: { 'elk.port.side': 'EAST' },\n });\n appendPort(portsByNode, edge.to, {\n id: targetPortId,\n ...boundaryPort(edge.to, false),\n width: 1,\n height: 1,\n layoutOptions: { 'elk.port.side': 'WEST' },\n });\n return {\n id: edge.id,\n sources: [sourcePortId],\n targets: [targetPortId],\n };\n });\n for (const node of scene.nodes) {\n const children = childrenByParent.get(node.parentId) ?? [];\n children.push(node);\n childrenByParent.set(node.parentId, children);\n }\n const createNode = (node: GraphSceneNode): ElkNode => {\n const children = childrenByParent.get(node.id)?.map(createNode);\n const dimensions = nodeDimensions(node);\n return {\n id: node.id,\n width: dimensions.width,\n height: dimensions.height,\n children,\n ports: portsByNode.get(node.id),\n layoutOptions: children?.length ? {\n 'elk.algorithm': 'layered',\n 'elk.direction': 'RIGHT',\n 'elk.edgeRouting': 'ORTHOGONAL',\n 'elk.hierarchyHandling': 'INCLUDE_CHILDREN',\n 'elk.portConstraints': 'FIXED_SIDE',\n 'elk.layered.mergeEdges': 'false',\n 'elk.layered.mergeHierarchyEdges': 'false',\n 'elk.padding': elkPadding(),\n 'elk.spacing.nodeNode': '36',\n 'elk.layered.spacing.nodeNodeBetweenLayers': '72',\n 'elk.spacing.edgeEdge': '10',\n 'elk.layered.spacing.edgeEdgeBetweenLayers': '10',\n } : {\n 'elk.portConstraints': usesCenterPorts(node) ? 'FIXED_POS' : 'FIXED_SIDE',\n },\n };\n };\n return {\n id: 'root',\n children: (childrenByParent.get(undefined) ?? []).map(createNode),\n edges: elkEdges,\n layoutOptions: {\n 'elk.algorithm': 'layered',\n 'elk.direction': 'RIGHT',\n 'elk.edgeRouting': 'ORTHOGONAL',\n 'elk.hierarchyHandling': 'INCLUDE_CHILDREN',\n 'elk.layered.mergeEdges': 'false',\n 'elk.layered.mergeHierarchyEdges': 'false',\n 'elk.spacing.nodeNode': '42',\n 'elk.layered.spacing.nodeNodeBetweenLayers': '88',\n 'elk.spacing.edgeNode': '20',\n 'elk.spacing.edgeEdge': '10',\n 'elk.layered.spacing.edgeEdgeBetweenLayers': '10',\n 'elk.layered.considerModelOrder.strategy': 'NODES_AND_EDGES',\n },\n };\n}\n\nexport function applyGraphLayout(core: cytoscape.Core, scene: GraphScene, layout: GraphLayoutResult): void {\n applyPositions(core, layout.positions);\n core.batch(() => {\n for (const edge of scene.edges) {\n const route = layout.routes.get(edge.id);\n const cytoscapeEdge = core.getElementById(edge.id);\n if (cytoscapeEdge.empty()) continue;\n const sourceNode = core.getElementById(edge.from);\n const targetNode = core.getElementById(edge.to);\n const routeData = sourceNode.nonempty() && targetNode.nonempty()\n ? createCytoscapeEdgeRouteData(route, sourceNode.position(), targetNode.position())\n : undefined;\n cytoscapeEdge\n .removeClass('elk-route elk-segments')\n .removeData('sourceEndpoint', 'targetEndpoint', 'segmentWeights', 'segmentDistances');\n if (!routeData) continue;\n cytoscapeEdge.data(routeData).addClass('elk-route');\n if (route!.bendPoints.length > 0) cytoscapeEdge.addClass('elk-segments');\n }\n });\n}\n\nexport function syncExpandedGroupLabelGeometry(core: cytoscape.Core): void {\n const groups = core.nodes('node[kind = \"group\"][collapsed = 0]');\n for (let iteration = 0; iteration < 2; iteration++) {\n const updates = groups.map((node) => ({\n node,\n labelMaxWidth: expandedGroupLabelMaxWidth(node.outerWidth()),\n }));\n core.batch(() => {\n for (const update of updates) update.node.data('labelMaxWidth', update.labelMaxWidth);\n });\n }\n}\n\nexport function createCytoscapeEdgeRouteData(\n route: GraphEdgeRoute | undefined,\n sourceCenter: GraphPosition,\n targetCenter: GraphPosition,\n): CytoscapeEdgeRouteData | undefined {\n if (!route || !isValidRoute(route)) return undefined;\n const segments = route.bendPoints.map((point) => segmentFromPoint(route.startPoint, route.endPoint, point));\n return {\n sourceEndpoint: endpointOffset(route.startPoint, sourceCenter),\n targetEndpoint: endpointOffset(route.endPoint, targetCenter),\n segmentWeights: segments.map((segment) => segment.weight).join(' '),\n segmentDistances: segments.map((segment) => segment.distance).join(' '),\n };\n}\n\nfunction elkPadding(): string {\n const padding = GRAPH_GEOMETRY.elkGroupPadding;\n return `[top=${padding.top},left=${padding.left},bottom=${padding.bottom},right=${padding.right}]`;\n}\n\nfunction appendPort(\n portsByNode: Map<GraphSceneElementId, ElkPort[]>,\n nodeId: GraphSceneElementId,\n port: ElkPort,\n): void {\n const ports = portsByNode.get(nodeId) ?? [];\n ports.push(port);\n portsByNode.set(nodeId, ports);\n}\n\nfunction collectLayoutPositions(\n node: ElkNode,\n offsetX: number,\n offsetY: number,\n positions: Map<GraphSceneElementId, GraphPosition>,\n): void {\n for (const child of node.children ?? []) {\n const x = offsetX + (child.x ?? 0);\n const y = offsetY + (child.y ?? 0);\n positions.set(child.id, {\n x: x + (child.width ?? 0) / 2,\n y: y + (child.height ?? 0) / 2,\n });\n collectLayoutPositions(child, x, y, positions);\n }\n}\n\nfunction collectLayoutOffsets(\n node: ElkNode,\n offsetX: number,\n offsetY: number,\n offsets: Map<GraphSceneElementId, GraphPosition>,\n): void {\n offsets.set(node.id, { x: offsetX, y: offsetY });\n for (const child of node.children ?? []) {\n collectLayoutOffsets(child, offsetX + (child.x ?? 0), offsetY + (child.y ?? 0), offsets);\n }\n}\n\nfunction collectEdgeRoutes(\n node: ElkNode,\n offsetX: number,\n offsetY: number,\n nodeOffsets: ReadonlyMap<GraphSceneElementId, GraphPosition>,\n routes: Map<GraphSceneElementId, GraphEdgeRoute>,\n): void {\n for (const edge of node.edges ?? []) {\n if (edge.sections?.length !== 1) continue;\n const section = edge.sections[0];\n if (!section) continue;\n // ELK may keep hierarchy edges on an ancestor while expressing their sections in container-local coordinates.\n const containerOffset = edge.container === undefined ? undefined : nodeOffsets.get(edge.container);\n const routeOffsetX = containerOffset?.x ?? offsetX;\n const routeOffsetY = containerOffset?.y ?? offsetY;\n routes.set(edge.id, {\n startPoint: offsetPoint(section.startPoint, routeOffsetX, routeOffsetY),\n bendPoints: (section.bendPoints ?? []).map((point) => offsetPoint(point, routeOffsetX, routeOffsetY)),\n endPoint: offsetPoint(section.endPoint, routeOffsetX, routeOffsetY),\n });\n }\n for (const child of node.children ?? []) {\n collectEdgeRoutes(\n child,\n offsetX + (child.x ?? 0),\n offsetY + (child.y ?? 0),\n nodeOffsets,\n routes,\n );\n }\n}\n\nfunction offsetPoint(point: GraphPosition, offsetX: number, offsetY: number): GraphPosition {\n return { x: point.x + offsetX, y: point.y + offsetY };\n}\n\nfunction isValidRoute(route: GraphEdgeRoute): boolean {\n const dx = route.endPoint.x - route.startPoint.x;\n const dy = route.endPoint.y - route.startPoint.y;\n return isFinitePoint(route.startPoint)\n && isFinitePoint(route.endPoint)\n && dx * dx + dy * dy > Number.EPSILON\n && route.bendPoints.every(isFinitePoint);\n}\n\nfunction isFinitePoint(point: GraphPosition): boolean {\n return Number.isFinite(point.x) && Number.isFinite(point.y);\n}\n\nfunction endpointOffset(point: GraphPosition, center: GraphPosition): string {\n return `${point.x - center.x}px ${point.y - center.y}px`;\n}\n\nfunction applyPositions(core: cytoscape.Core, positions: ReadonlyMap<GraphSceneElementId, GraphPosition>): void {\n core.batch(() => {\n for (const [id, position] of positions) {\n const node = core.getElementById(id);\n if (node.nonempty() && node.isNode() && !node.isParent()) node.position(position);\n }\n });\n}\n\nfunction segmentFromPoint(source: GraphPosition, target: GraphPosition, point: GraphPosition) {\n const dx = target.x - source.x;\n const dy = target.y - source.y;\n const lengthSquared = dx * dx + dy * dy;\n if (lengthSquared === 0) return { weight: 0.5, distance: 0 };\n const weight = ((point.x - source.x) * dx + (point.y - source.y) * dy) / lengthSquared;\n const projectedX = source.x + weight * dx;\n const projectedY = source.y + weight * dy;\n const length = Math.sqrt(lengthSquared);\n const distance = ((point.x - projectedX) * -dy + (point.y - projectedY) * dx) / length;\n return { weight, distance };\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
import type {
|
|
1
|
+
import type { FrameGraphDebugEdge, FrameGraphDebugNode, FrameGraphDebugResource, FrameGraphDebugViewModel } from './debugCaptureModel.ts';
|
|
2
|
+
import type { GraphFlowRelation, Selection } from './panelTypes.ts';
|
|
3
3
|
export type GraphSceneElementId = string;
|
|
4
4
|
type GraphSceneNodeBase = {
|
|
5
5
|
readonly id: GraphSceneElementId;
|
|
@@ -15,13 +15,6 @@ export type PassSceneNode = GraphSceneNodeBase & {
|
|
|
15
15
|
readonly executionSegmentIndex?: number;
|
|
16
16
|
readonly gpuDurationMicros?: number;
|
|
17
17
|
};
|
|
18
|
-
export type CulledPassSceneNode = GraphSceneNodeBase & {
|
|
19
|
-
readonly kind: 'culled-pass';
|
|
20
|
-
readonly culledIndex: number;
|
|
21
|
-
readonly nodeId: string;
|
|
22
|
-
readonly passKind: FrameGraphDebugNode['kind'];
|
|
23
|
-
readonly reason: string;
|
|
24
|
-
};
|
|
25
18
|
export type GroupSceneNode = GraphSceneNodeBase & {
|
|
26
19
|
readonly kind: 'group';
|
|
27
20
|
readonly groupId: string;
|
|
@@ -41,29 +34,26 @@ export type ResourceSceneNode = GraphSceneNodeBase & {
|
|
|
41
34
|
readonly resourceId: string;
|
|
42
35
|
readonly resourceKind: FrameGraphDebugResource['kind'];
|
|
43
36
|
};
|
|
44
|
-
export type
|
|
37
|
+
export type RootSceneNode = GraphSceneNodeBase & {
|
|
38
|
+
readonly kind: 'root';
|
|
39
|
+
readonly rootKey: string;
|
|
40
|
+
readonly resourceId: string;
|
|
41
|
+
readonly resourceKind: FrameGraphDebugResource['kind'];
|
|
42
|
+
};
|
|
43
|
+
export type GraphSceneNode = PassSceneNode | GroupSceneNode | ResourceSceneNode | RootSceneNode;
|
|
45
44
|
type GraphSceneEdgeBase = {
|
|
46
45
|
readonly id: GraphSceneElementId;
|
|
47
46
|
readonly from: GraphSceneElementId;
|
|
48
47
|
readonly to: GraphSceneElementId;
|
|
49
|
-
readonly label?: string;
|
|
50
48
|
readonly title: string;
|
|
51
49
|
readonly resourceId: string;
|
|
52
50
|
};
|
|
53
|
-
export type
|
|
54
|
-
readonly kind: '
|
|
55
|
-
readonly
|
|
51
|
+
export type GraphSceneEdge = GraphSceneEdgeBase & {
|
|
52
|
+
readonly kind: 'flow' | 'ordering';
|
|
53
|
+
readonly relations: readonly GraphFlowRelation[];
|
|
56
54
|
readonly underlyingDependencies: readonly FrameGraphDebugEdge[];
|
|
57
55
|
readonly underlyingDependencyCount: number;
|
|
58
56
|
};
|
|
59
|
-
export type AccessSceneEdge = GraphSceneEdgeBase & {
|
|
60
|
-
readonly kind: 'access';
|
|
61
|
-
readonly accessId: string;
|
|
62
|
-
readonly accessMode: FrameGraphDebugAccessEdge['mode'];
|
|
63
|
-
readonly access: FrameGraphDebugAccessEdge['access'];
|
|
64
|
-
readonly dashed: boolean;
|
|
65
|
-
};
|
|
66
|
-
export type GraphSceneEdge = DependencySceneEdge | AccessSceneEdge;
|
|
67
57
|
export type GraphSemanticReferences = {
|
|
68
58
|
readonly nodeIds: readonly string[];
|
|
69
59
|
readonly groupPathKeys: readonly string[];
|
|
@@ -74,11 +64,11 @@ export type GraphSemanticReferences = {
|
|
|
74
64
|
export type GraphSceneInteractionIndex = {
|
|
75
65
|
readonly selectionByElementId: ReadonlyMap<GraphSceneElementId, Selection>;
|
|
76
66
|
readonly primaryElementIdsBySelection: ReadonlyMap<string, readonly GraphSceneElementId[]>;
|
|
77
|
-
readonly
|
|
67
|
+
readonly hoverElementIdsBySelection: ReadonlyMap<string, readonly GraphSceneElementId[]>;
|
|
68
|
+
readonly resourceElementIdsByResourceId: ReadonlyMap<string, readonly GraphSceneElementId[]>;
|
|
78
69
|
readonly semanticReferencesByElementId: ReadonlyMap<GraphSceneElementId, GraphSemanticReferences>;
|
|
79
70
|
};
|
|
80
71
|
export type GraphScene = {
|
|
81
|
-
readonly mode: GraphViewMode;
|
|
82
72
|
readonly nodes: readonly GraphSceneNode[];
|
|
83
73
|
readonly edges: readonly GraphSceneEdge[];
|
|
84
74
|
readonly topologyKey: string;
|
|
@@ -86,13 +76,11 @@ export type GraphScene = {
|
|
|
86
76
|
readonly interaction: GraphSceneInteractionIndex;
|
|
87
77
|
};
|
|
88
78
|
export type CreateGraphSceneOptions = {
|
|
89
|
-
readonly mode: GraphViewMode;
|
|
90
79
|
readonly groupsEnabled: boolean;
|
|
91
80
|
readonly expandedGroupPaths: ReadonlySet<string>;
|
|
92
81
|
};
|
|
93
82
|
export declare function createGraphScene(snapshot: FrameGraphDebugViewModel, options: CreateGraphSceneOptions): GraphScene;
|
|
94
83
|
export declare function graphGroupElementId(pathKey: string): GraphSceneElementId;
|
|
95
84
|
export declare function selectionKey(selection: Selection): string;
|
|
96
|
-
export declare function indexAccessesByResourceId(accesses: readonly FrameGraphDebugAccessEdge[]): ReadonlyMap<string, readonly FrameGraphDebugAccessEdge[]>;
|
|
97
85
|
export {};
|
|
98
86
|
//# sourceMappingURL=panelGraphScene.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"panelGraphScene.d.ts","sourceRoot":"","sources":["../src/panelGraphScene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"panelGraphScene.d.ts","sourceRoot":"","sources":["../src/panelGraphScene.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAER,mBAAmB,EAEnB,mBAAmB,EACnB,uBAAuB,EACvB,wBAAwB,EAC3B,MAAM,wBAAwB,CAAC;AAGhC,OAAO,KAAK,EAAE,iBAAiB,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG,MAAM,CAAC;AAEzC,KAAK,kBAAkB,GAAG;IACtB,QAAQ,CAAC,EAAE,EAAE,mBAAmB,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,CAAC,EAAE,mBAAmB,CAAC;CAC3C,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,kBAAkB,GAAG;IAC7C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,QAAQ,EAAE,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC/C,QAAQ,CAAC,qBAAqB,CAAC,EAAE,MAAM,CAAC;IACxC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG;IAC9C,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,O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