- Model | Graph switch on main.archify (Diagram | Graph on diagram pages, narrowed to that diagram) - union graph of every element and connection, registry and inline, built from the model index - query box: text, type:, diagram:, decision:, uses:, near:, from: to:, unused, shared, -shared - side panel per element and connection with diagrams, registry line and decisions one click away - legend chips, Fit, Layout, Labels, Export PNG; Cytoscape.js bundled as dist/graph.js - command Archify | Open Model Graph; integration check; unit tests for graph and queries
21 lines
578 B
TypeScript
21 lines
578 B
TypeScript
import type { ModelGraph } from '../model/graph';
|
|
|
|
/**
|
|
* What the bridge script (page.ts) exposes to the bundled page scripts as
|
|
* `window.__archifyHost`: they cannot call acquireVsCodeApi a second time.
|
|
*/
|
|
export interface ArchifyHost {
|
|
defaultView: '2d' | '3d';
|
|
post(message: unknown): void;
|
|
getState(): Record<string, unknown>;
|
|
setState(patch: Record<string, unknown>): void;
|
|
/** The Graph page's data, present on that page only. */
|
|
graph?: { graph: ModelGraph; query?: string };
|
|
}
|
|
|
|
declare global {
|
|
interface Window {
|
|
__archifyHost?: ArchifyHost;
|
|
}
|
|
}
|