@skydesign/tf 0.3.4 → 0.3.6
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/dist/index.d.ts +52 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +482 -429
- package/dist/{render-Dzu8gXVX.mjs → render-CyerC-P0.mjs} +379 -359
- package/dist/{render-wQ_Mruy4.js → render-DP-7B8CP.js} +3 -3
- package/dist/server.d.ts +18 -0
- package/dist/server.js +3 -3
- package/dist/server.mjs +66 -61
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -296,6 +296,45 @@ export declare interface LayoutConfig {
|
|
|
296
296
|
nearlyAlignedThreshold: number;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
|
+
/**
|
|
300
|
+
* The frame showing the whole graph content with the standard padding — the
|
|
301
|
+
* initial minimap viewBox before the client starts tracking the viewport.
|
|
302
|
+
*/
|
|
303
|
+
export declare function minimapContentFrame(viewBoxWidth: number, viewBoxHeight: number): {
|
|
304
|
+
x: number;
|
|
305
|
+
y: number;
|
|
306
|
+
w: number;
|
|
307
|
+
h: number;
|
|
308
|
+
};
|
|
309
|
+
|
|
310
|
+
/** One grey rounded block per node. */
|
|
311
|
+
export declare function MinimapNodeBlocks({ nodes }: MinimapSceneProps): JSX.Element;
|
|
312
|
+
|
|
313
|
+
export declare interface MinimapSceneProps {
|
|
314
|
+
/** Non-virtual node boxes in SVG coordinates (`RenderResult.nodeBounds`). */
|
|
315
|
+
nodes: NodeBounds[];
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* SSR first-paint minimap: node blocks framed on the graph content. The
|
|
320
|
+
* viewport mask needs the live container size and transform, so it only
|
|
321
|
+
* appears once the client `Minimap` takes over.
|
|
322
|
+
*/
|
|
323
|
+
export declare function MinimapStatic({ nodes, viewBoxWidth, viewBoxHeight }: MinimapStaticProps): JSX.Element;
|
|
324
|
+
|
|
325
|
+
export declare interface MinimapStaticProps extends MinimapSceneProps {
|
|
326
|
+
viewBoxWidth: number;
|
|
327
|
+
viewBoxHeight: number;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/** Axis-aligned box in SVG coordinates (y grows downward). */
|
|
331
|
+
export declare interface NodeBounds {
|
|
332
|
+
x: number;
|
|
333
|
+
y: number;
|
|
334
|
+
width: number;
|
|
335
|
+
height: number;
|
|
336
|
+
}
|
|
337
|
+
|
|
299
338
|
/**
|
|
300
339
|
* Content structure for graph nodes
|
|
301
340
|
*/
|
|
@@ -350,6 +389,12 @@ export declare interface RenderOptions {
|
|
|
350
389
|
selectedEdgeId: number | null;
|
|
351
390
|
/** Edge selection callback; undefined disables click-to-select. */
|
|
352
391
|
onEdgeSelect: ((edgeIndex: number | null) => void) | undefined;
|
|
392
|
+
/**
|
|
393
|
+
* Edge label click callback, fired even when the edge is already selected
|
|
394
|
+
* (the consumer typically re-centers the label via its navigation API).
|
|
395
|
+
* undefined = label clicks fall through to the edge's select handler.
|
|
396
|
+
*/
|
|
397
|
+
onEdgeLabelClick: ((edgeIndex: number) => void) | undefined;
|
|
353
398
|
/** Node box width in points; null keeps the graphviz-computed width. */
|
|
354
399
|
nodeWidth: number | null;
|
|
355
400
|
/** Node box height in points; null keeps the graphviz-computed height. */
|
|
@@ -390,8 +435,15 @@ declare interface RenderResult {
|
|
|
390
435
|
gElement: SVGGElement;
|
|
391
436
|
baseFontSize: number;
|
|
392
437
|
viewBoxWidth: number;
|
|
438
|
+
viewBoxHeight: number;
|
|
393
439
|
edges: EdgeInfo[];
|
|
394
440
|
initialTransform: InitialTransform;
|
|
441
|
+
/**
|
|
442
|
+
* Non-virtual node boxes in SVG coordinates — the minimap scene data.
|
|
443
|
+
* Computed from the layout model (not getBBox), so headless renders
|
|
444
|
+
* produce the exact same values as the browser.
|
|
445
|
+
*/
|
|
446
|
+
nodeBounds: NodeBounds[];
|
|
395
447
|
}
|
|
396
448
|
|
|
397
449
|
/**
|