/** * The floating per-node menu, shared by ALL THREE generated graphs. * * There is exactly ONE implementation of the menu — its CSS, its positioning, its dismissal and the * click wiring that opens it — and `architecture/dependencies.html` (graph-visualizer.ts), every * project's `design.html` (di-graph/design-visualizer.ts) and `tmp/webpieces/runtime-architecture.html` * (runtime-visualizer.ts) all inline these same bytes. Duplicating it into the three emitters is what * this module exists to prevent. * * Why the browser code is emitted as a STRING here rather than living in a compiled `*.client.ts` * beside its emitter: `generateDesignHTML` is called straight from a source checkout (by the * di-graph-generate executor's unit tests) and has no injection seam for the client text, so a * `readCompiledClient` sibling would make the design page unbuildable from source. A string keeps one * copy reachable by every emitter with no build-order coupling. The two pages that DO have a compiled * client (`graph-visualizer.client.ts`, `runtime-visualizer.client.ts`) call into these classes as * ambient globals — see viz-client-globals.d.ts. * * What the menu does NOT own is the LOCK BEHAVIOUR, because the pages genuinely differ: * - the architecture page already has a `#wp-lock` dropdown backed by GraphHighlighter (chain * highlight + responsibilities filter), and its menu item drives that, so the two stay in sync; * - a design page and the runtime page have neither dropdown nor responsibilities, so they use * `WpNodeLock` below — dim every other box in that graph, light the locked one. * All three spell the dim with the SAME class names and the SAME CSS from `dimStyles()`. */ export declare class GraphNodeMenu { /** * Menu chrome + the "this box is clickable" affordance. Every node is clickable now (the menu * replaced direct navigation), so the cursor/glow is on every box rather than only the ones with * a design page. */ styles(): string; /** * The dim/undim rules a lock (or a hover) toggles, scoped to whatever element holds the rendered * SVG on this page (`#graph` on the architecture page, `.graph` on a design page). * * We ONLY dim: the lit subgraph keeps its exact normal look. The un-dim rules repeat * `svg.wp-dim` so they out-specify the dim rule, which carries an extra type selector. */ dimStyles(scope: string): string; /** The whole browser side: the menu, the design-page lock, and the global dismiss handlers. */ script(): string; /** * `WpNodeMenuItem` + `WpNodeMenu`. Anchored at the node's own bounding box (bottom-left corner, * 4px below it) and clamped so a box at the right edge of a very wide graph still shows its whole * menu. Opening a menu closes any other, so at most one is ever on screen. */ private menuScript; /** * The lock the DESIGN pages and the RUNTIME page use: neither has a dropdown or a responsibilities * list, so locking a box dims every other box in that graph and lights the locked one. */ private lockScript; /** Outside click and Escape both dismiss — wired once, on the document. */ private dismissScript; }