ggn-layout 0.1.0 → 0.1.2
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/CHANGELOG.md +110 -0
- package/LICENSE +15 -0
- package/README.md +17 -5
- package/THIRD_PARTY_NOTICES.md +35 -3
- package/dist/{algorithms-CNhihjzf.js → algorithms-JOaPA3B9.js} +11 -0
- package/dist/{algorithms-DXUI06fi.cjs → algorithms-X6GKNYEw.cjs} +11 -0
- package/dist/api/index.cjs +12 -1
- package/dist/api/index.d.cts +14 -3
- package/dist/api/index.d.ts +14 -3
- package/dist/api/index.js +12 -1
- package/dist/api/layered.cjs +12 -1
- package/dist/api/layered.d.cts +13 -2
- package/dist/api/layered.d.ts +13 -2
- package/dist/api/layered.js +12 -1
- package/dist/{api-BRaDa6RG.js → api-D4FVITVw.js} +12 -1
- package/dist/{api-DWBi7ngO.cjs → api-DTHTxaol.cjs} +12 -1
- package/dist/{internal-BOuvVTiR.d.cts → core-DWo6Sbh9.d.ts} +13 -2
- package/dist/{internal-Coxrnk9C.d.ts → core-Or66h-Jn.d.cts} +13 -2
- package/dist/{internal.cjs → core.cjs} +12 -1
- package/dist/{internal.d.ts → core.d.cts} +14 -3
- package/dist/{internal.d.cts → core.d.ts} +14 -3
- package/dist/{internal.js → core.js} +12 -1
- package/dist/{elk-json-ibWtLFj2.d.cts → elk-json-BiUIDEHd.d.cts} +11 -0
- package/dist/{elk-json-ibWtLFj2.d.ts → elk-json-BiUIDEHd.d.ts} +11 -0
- package/dist/{elk-json-BtGnwuQE.cjs → elk-json-BqpJCr7A.cjs} +12 -1
- package/dist/{elk-json-B9eLYtu6.js → elk-json-Dm4r-Nqy.js} +12 -1
- package/dist/{index-C_0jvfEV.d.ts → index-DprqHh4K.d.ts} +13 -2
- package/dist/{index-Dl2hrLFA.d.cts → index-DwemPNSn.d.cts} +13 -2
- package/dist/index.cjs +12 -1
- package/dist/index.d.cts +16 -5
- package/dist/index.d.ts +16 -5
- package/dist/index.js +12 -1
- package/dist/layered-options-CWVVspE4.d.cts +17 -0
- package/dist/layered-options-vH0HCu1n.d.ts +17 -0
- package/dist/layout-worker.cjs +12 -1
- package/dist/layout-worker.d.cts +12 -1
- package/dist/layout-worker.d.ts +12 -1
- package/dist/layout-worker.js +12 -1
- package/dist/options.cjs +12 -1
- package/dist/options.d.cts +13 -2
- package/dist/options.d.ts +13 -2
- package/dist/options.js +12 -1
- package/dist/{validate-B9vX3T2G.d.ts → validate-YGFYSdxd.d.cts} +11 -0
- package/dist/{validate-B9vX3T2G.d.cts → validate-YGFYSdxd.d.ts} +11 -0
- package/docs/API.md +1 -1
- package/docs/reference/elk-algorithm-catalog.md +2 -2
- package/docs/reference/elk-algorithm-guide.md +4 -4
- package/docs/reference/elk-edge-routing-investigation.md +10 -13
- package/docs/reference/elk-json-format.md +1 -1
- package/docs/reference/elk-layout-options-mechanism.md +1 -1
- package/docs/reference/elk-layout-options.md +4 -4
- package/docs/reference/elk-node-labels.md +11 -8
- package/docs/reference/elk-spacing-options.md +1 -1
- package/docs/reference/elkjs-feature-coverage.md +2 -3
- package/package.json +18 -9
- package/dist/layered-options-COPhjoOB.d.ts +0 -6
- package/dist/layered-options-Dm7nJC1R.d.cts +0 -6
- /package/{src/api → schema}/layout-input.schema.json +0 -0
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import { _ as LayoutProgressEvent, c as LayoutInput, h as LayoutControl, i as ElkLayoutOptions, l as LayoutOutput, o as ElkPoint } from "./elk-json-BiUIDEHd.js";
|
|
13
|
+
import { r as LayoutError } from "./validate-YGFYSdxd.js";
|
|
3
14
|
//#region src/api/batch.d.ts
|
|
4
15
|
/** Result for one input in a sequential batch layout. */
|
|
5
16
|
interface LayoutBatchItem {
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import { _ as LayoutProgressEvent, c as LayoutInput, h as LayoutControl, i as ElkLayoutOptions, l as LayoutOutput, o as ElkPoint } from "./elk-json-BiUIDEHd.cjs";
|
|
13
|
+
import { r as LayoutError } from "./validate-YGFYSdxd.cjs";
|
|
3
14
|
//#region src/api/batch.d.ts
|
|
4
15
|
/** Result for one input in a sequential batch layout. */
|
|
5
16
|
interface LayoutBatchItem {
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./elk-json-BqpJCr7A.cjs"),t=require("./api-DTHTxaol.cjs"),n=require("./algorithms-X6GKNYEw.cjs");require("./core.cjs"),exports.BARYCENTER_ASSOCIATES=n.On,exports.BOTTOM_COMMENTS=n.kn,exports.BREAKING_POINT_INFO=n.An,exports.CB_NUM_MODEL_ORDER_GROUPS=n.jn,exports.COMMENT_CONN_PORT=n.Mn,exports.CROSSING_HINT=n.Nn,exports.CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER=n.Pn,exports.CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS=n.Fn,exports.CROSS_HIERARCHY_MAP=n.In,exports.CYCLIC=n.Ln,exports.ComponentsProcessor=e.m,exports.Direction=n.Mr,exports.END_LABELS=n.Rn,exports.END_LABEL_EDGE=n.zn,exports.EXT_PORT_CONNECTIONS=n.Bn,exports.EXT_PORT_REPLACED_DUMMIES=n.Vn,exports.EXT_PORT_REPLACED_DUMMY=n.Hn,exports.EXT_PORT_SIDE=n.Un,exports.EXT_PORT_SIZE=n.Wn,exports.EdgeConstraint=n.Nr,exports.GRAPH_PROPERTIES=n.Gn,exports.GREEDY_SWITCH_ACTIVE=n.Kn,exports.GraphProperties=n.qn,exports.HIDDEN_NODES=n.Jn,exports.HIERARCHY_HANDLING=n.q,exports.INPUT_COLLECT=n.Yn,exports.INSIDE_CONNECTIONS=n.Xn,exports.IN_LAYER_LAYOUT_UNIT=n.Zn,exports.IN_LAYER_SUCCESSOR_CONSTRAINTS=n.Qn,exports.IN_LAYER_SUCCESSOR_CONSTRAINTS_BETWEEN_NON_DUMMIES=n.$n,exports.InLayerConstraint=n.Pr,exports.LABEL_SIDE=n.er,exports.LEdge=e.v,exports.LGraph=e.C,exports.LGraphElement=e.x,exports.LNode=e.b,exports.LONG_EDGE_BEFORE_LABEL_DUMMY=n.tr,exports.LONG_EDGE_HAS_LABEL_DUMMIES=n.nr,exports.LONG_EDGE_SOURCE=n.rr,exports.LONG_EDGE_TARGET=n.ir,exports.LONG_EDGE_TARGET_NODE=n.ar,exports.LPort=e.y,exports.LShape=e.S,exports.Layer=e._,exports.LayerConstraint=n.Fr,exports.LayeredLayoutProvider=e.u,exports.LayoutError=e.o,exports.LayoutErrorCode=e.s,exports.MAX_EDGE_THICKNESS=n.or,exports.MAX_MODEL_ORDER_NODES=n.sr,exports.MODEL_ORDER=n.cr,exports.MapPropertyHolder=n.ii,exports.NodeType=n.Ir,exports.NullProgressMonitor=e.d,exports.ORIGIN=n.lr,exports.ORIGINAL_BENDPOINTS=n.ur,exports.ORIGINAL_DUMMY_NODE_POSITION=n.dr,exports.ORIGINAL_LABEL_EDGE=n.fr,exports.ORIGINAL_OPPOSITE_PORT=n.pr,exports.ORIGINAL_PORT_CONSTRAINTS=n.mr,exports.OUTPUT_COLLECT=n.hr,exports.PARTITION_DUMMY=n.gr,exports.PORT_DUMMY=n._r,exports.PORT_IS_OUTPUT=n.vr,exports.PORT_RATIO_OR_POSITION=n.yr,Object.defineProperty(exports,"PortConstraints",{enumerable:!0,get:function(){return n.Lr}}),Object.defineProperty(exports,"PortSide",{enumerable:!0,get:function(){return n.Rr}}),exports.PortType=n.zr,exports.Property=n.ai,exports.RANDOM=n.br,exports.REPRESENTED_LABELS=n.xr,exports.REVERSED=n.Sr,exports.SELF_LOOP_HOLDER=n.Cr,exports.SIDES_EAST=n.Br,exports.SIDES_EAST_SOUTH=n.Vr,exports.SIDES_EAST_SOUTH_WEST=n.Hr,exports.SIDES_EAST_WEST=n.Ur,exports.SIDES_NORTH=n.Wr,exports.SIDES_NORTH_EAST=n.Gr,exports.SIDES_NORTH_EAST_SOUTH=n.Kr,exports.SIDES_NORTH_EAST_SOUTH_WEST=n.qr,exports.SIDES_NORTH_SOUTH=n.Jr,exports.SIDES_NORTH_WEST=n.Yr,exports.SIDES_SOUTH=n.Xr,exports.SIDES_SOUTH_WEST=n.Zr,exports.SIDES_SOUTH_WEST_NORTH=n.Qr,exports.SIDES_WEST=n.$r,exports.SIDES_WEST_NORTH_EAST=n.ei,exports.SPACINGS=n.wr,exports.SPLINE_EDGE_CHAIN=n.Tr,exports.SPLINE_NS_PORT_Y_COORD=n.Er,exports.SPLINE_ROUTE_START=n.Dr,exports.SPLINE_SURVIVING_EDGE=n.Or,exports.TARGET_NODE_MODEL_ORDER=n.kr,exports.TARGET_OFFSET=n.Ar,exports.TOP_COMMENTS=n.jr,exports.assertValidLayoutInput=e.i,exports.buildGraph=e.t,exports.computeComponentSize=e.h,exports.createMergedPort=e.c,exports.diffLayout=t.n,exports.doCompoundLayout=e.f,exports.doSimpleLayout=e.p,exports.extractGraph=e.n,exports.getEdgeEndpoints=e.g,exports.layoutElkJson=e.r,exports.layoutJsonBatch=t.i,exports.layoutJsonDiff=t.r,exports.provideCollectorPort=e.l,exports.validateLayoutInput=e.a;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import { $ as IPropertyHolder, A as InLayerConstraint, B as SIDES_EAST_WEST, C as Layer, D as LShape, E as LGraphElement, F as PortSide, G as SIDES_NORTH_SOUTH, H as SIDES_NORTH_EAST, I as PortType, J as SIDES_SOUTH_WEST, K as SIDES_NORTH_WEST, L as SIDES_EAST, M as LayerConstraint, N as NodeType, O as Direction, P as PortConstraints, Q as IProperty, R as SIDES_EAST_SOUTH, S as LNode, T as LEdge, U as SIDES_NORTH_EAST_SOUTH, V as SIDES_NORTH, W as SIDES_NORTH_EAST_SOUTH_WEST, X as SIDES_WEST, Y as SIDES_SOUTH_WEST_NORTH, Z as SIDES_WEST_NORTH_EAST, _ as LayoutProgressEvent, a as ElkNode, b as LLabel, c as LayoutInput, d as LayoutSummary, et as MapPropertyHolder, f as buildGraph, g as LayoutPhase, h as LayoutControl, i as ElkLayoutOptions, j as KVector, k as EdgeConstraint, l as LayoutOutput, m as layoutElkJson, n as ElkEdge, o as ElkPoint, p as extractGraph, q as SIDES_SOUTH, r as ElkEdgeSection, s as ElkPort, t as BuiltGraph, tt as Property, u as LayoutOutputEdge, v as LGraph, w as LPort, x as LMargin, y as LPadding, z as SIDES_EAST_SOUTH_WEST } from "./elk-json-BiUIDEHd.cjs";
|
|
13
|
+
import { a as LayoutErrorOptions, i as LayoutErrorCode, n as validateLayoutInput, o as LayoutIssue, r as LayoutError, t as assertValidLayoutInput } from "./validate-YGFYSdxd.cjs";
|
|
14
|
+
import { c as LayoutEdgeDelta, d as layoutJsonDiff, f as LayoutBatchItem, l as LayoutNodeDelta, m as layoutJsonBatch, p as LayoutBatchResult, s as LayoutDiff, u as diffLayout } from "./index-DwemPNSn.cjs";
|
|
15
|
+
import { $ as PORT_IS_OUTPUT, A as INPUT_COLLECT, B as LONG_EDGE_TARGET_NODE, C as EXT_PORT_REPLACED_DUMMY, D as GREEDY_SWITCH_ACTIVE, E as GRAPH_PROPERTIES, F as LABEL_SIDE, G as ORIGINAL_BENDPOINTS, H as MAX_MODEL_ORDER_NODES, I as LONG_EDGE_BEFORE_LABEL_DUMMY, J as ORIGINAL_OPPOSITE_PORT, K as ORIGINAL_DUMMY_NODE_POSITION, L as LONG_EDGE_HAS_LABEL_DUMMIES, M as IN_LAYER_LAYOUT_UNIT, N as IN_LAYER_SUCCESSOR_CONSTRAINTS, O as GraphProperties, P as IN_LAYER_SUCCESSOR_CONSTRAINTS_BETWEEN_NON_DUMMIES, Q as PORT_DUMMY, R as LONG_EDGE_SOURCE, S as EXT_PORT_REPLACED_DUMMIES, T as EXT_PORT_SIZE, U as MODEL_ORDER, V as MAX_EDGE_THICKNESS, W as ORIGIN, X as OUTPUT_COLLECT, Y as ORIGINAL_PORT_CONSTRAINTS, Z as PARTITION_DUMMY, _ as CROSS_HIERARCHY_MAP, a as NullProgressMonitor, at as SPACINGS, b as END_LABEL_EDGE, c as getEdgeEndpoints, ct as SPLINE_ROUTE_START, d as BREAKING_POINT_INFO, dt as TARGET_OFFSET, et as PORT_RATIO_OR_POSITION, f as CB_NUM_MODEL_ORDER_GROUPS, ft as TOP_COMMENTS, g as CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS, h as CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER, i as LayeredLayoutProvider, it as SELF_LOOP_HOLDER, j as INSIDE_CONNECTIONS, k as HIDDEN_NODES, l as BARYCENTER_ASSOCIATES, lt as SPLINE_SURVIVING_EDGE, m as CROSSING_HINT, mt as provideCollectorPort, n as computeComponentSize, nt as REPRESENTED_LABELS, o as doCompoundLayout, ot as SPLINE_EDGE_CHAIN, p as COMMENT_CONN_PORT, pt as createMergedPort, q as ORIGINAL_LABEL_EDGE, r as IElkProgressMonitor, rt as REVERSED, s as doSimpleLayout, st as SPLINE_NS_PORT_Y_COORD, t as ComponentsProcessor, tt as RANDOM, u as BOTTOM_COMMENTS, ut as TARGET_NODE_MODEL_ORDER, v as CYCLIC, w as EXT_PORT_SIDE, x as EXT_PORT_CONNECTIONS, y as END_LABELS, z as LONG_EDGE_TARGET } from "./core-Or66h-Jn.cjs";
|
|
16
|
+
import { t as HIERARCHY_HANDLING } from "./layered-options-CWVVspE4.cjs";
|
|
6
17
|
export { BARYCENTER_ASSOCIATES, BOTTOM_COMMENTS, BREAKING_POINT_INFO, type BuiltGraph, CB_NUM_MODEL_ORDER_GROUPS, COMMENT_CONN_PORT, CROSSING_HINT, CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER, CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS, CROSS_HIERARCHY_MAP, CYCLIC, ComponentsProcessor, Direction, END_LABELS, END_LABEL_EDGE, EXT_PORT_CONNECTIONS, EXT_PORT_REPLACED_DUMMIES, EXT_PORT_REPLACED_DUMMY, EXT_PORT_SIDE, EXT_PORT_SIZE, EdgeConstraint, type ElkEdge, type ElkEdgeSection, type ElkLayoutOptions, type ElkNode, type ElkPoint, type ElkPort, GRAPH_PROPERTIES, GREEDY_SWITCH_ACTIVE, GraphProperties, HIDDEN_NODES, HIERARCHY_HANDLING, type IElkProgressMonitor, INPUT_COLLECT, INSIDE_CONNECTIONS, IN_LAYER_LAYOUT_UNIT, IN_LAYER_SUCCESSOR_CONSTRAINTS, IN_LAYER_SUCCESSOR_CONSTRAINTS_BETWEEN_NON_DUMMIES, type IProperty, type IPropertyHolder, InLayerConstraint, type KVector, LABEL_SIDE, LEdge, LGraph, LGraphElement, type LLabel, type LMargin, LNode, LONG_EDGE_BEFORE_LABEL_DUMMY, LONG_EDGE_HAS_LABEL_DUMMIES, LONG_EDGE_SOURCE, LONG_EDGE_TARGET, LONG_EDGE_TARGET_NODE, type LPadding, LPort, LShape, Layer, LayerConstraint, LayeredLayoutProvider, type LayoutBatchItem, type LayoutBatchResult, type LayoutControl, type LayoutDiff, type LayoutEdgeDelta, LayoutError, LayoutErrorCode, type LayoutErrorOptions, type LayoutInput, type LayoutIssue, type LayoutNodeDelta, type LayoutOutput, type LayoutOutputEdge, type LayoutPhase, type LayoutProgressEvent, type LayoutSummary, MAX_EDGE_THICKNESS, MAX_MODEL_ORDER_NODES, MODEL_ORDER, MapPropertyHolder, NodeType, NullProgressMonitor, ORIGIN, ORIGINAL_BENDPOINTS, ORIGINAL_DUMMY_NODE_POSITION, ORIGINAL_LABEL_EDGE, ORIGINAL_OPPOSITE_PORT, ORIGINAL_PORT_CONSTRAINTS, OUTPUT_COLLECT, PARTITION_DUMMY, PORT_DUMMY, PORT_IS_OUTPUT, PORT_RATIO_OR_POSITION, PortConstraints, PortSide, PortType, Property, RANDOM, REPRESENTED_LABELS, REVERSED, SELF_LOOP_HOLDER, SIDES_EAST, SIDES_EAST_SOUTH, SIDES_EAST_SOUTH_WEST, SIDES_EAST_WEST, SIDES_NORTH, SIDES_NORTH_EAST, SIDES_NORTH_EAST_SOUTH, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_NORTH_SOUTH, SIDES_NORTH_WEST, SIDES_SOUTH, SIDES_SOUTH_WEST, SIDES_SOUTH_WEST_NORTH, SIDES_WEST, SIDES_WEST_NORTH_EAST, SPACINGS, SPLINE_EDGE_CHAIN, SPLINE_NS_PORT_Y_COORD, SPLINE_ROUTE_START, SPLINE_SURVIVING_EDGE, TARGET_NODE_MODEL_ORDER, TARGET_OFFSET, TOP_COMMENTS, assertValidLayoutInput, buildGraph, computeComponentSize, createMergedPort, diffLayout, doCompoundLayout, doSimpleLayout, extractGraph, getEdgeEndpoints, layoutElkJson, layoutJsonBatch, layoutJsonDiff, provideCollectorPort, validateLayoutInput };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import { $ as IPropertyHolder, A as InLayerConstraint, B as SIDES_EAST_WEST, C as Layer, D as LShape, E as LGraphElement, F as PortSide, G as SIDES_NORTH_SOUTH, H as SIDES_NORTH_EAST, I as PortType, J as SIDES_SOUTH_WEST, K as SIDES_NORTH_WEST, L as SIDES_EAST, M as LayerConstraint, N as NodeType, O as Direction, P as PortConstraints, Q as IProperty, R as SIDES_EAST_SOUTH, S as LNode, T as LEdge, U as SIDES_NORTH_EAST_SOUTH, V as SIDES_NORTH, W as SIDES_NORTH_EAST_SOUTH_WEST, X as SIDES_WEST, Y as SIDES_SOUTH_WEST_NORTH, Z as SIDES_WEST_NORTH_EAST, _ as LayoutProgressEvent, a as ElkNode, b as LLabel, c as LayoutInput, d as LayoutSummary, et as MapPropertyHolder, f as buildGraph, g as LayoutPhase, h as LayoutControl, i as ElkLayoutOptions, j as KVector, k as EdgeConstraint, l as LayoutOutput, m as layoutElkJson, n as ElkEdge, o as ElkPoint, p as extractGraph, q as SIDES_SOUTH, r as ElkEdgeSection, s as ElkPort, t as BuiltGraph, tt as Property, u as LayoutOutputEdge, v as LGraph, w as LPort, x as LMargin, y as LPadding, z as SIDES_EAST_SOUTH_WEST } from "./elk-json-BiUIDEHd.js";
|
|
13
|
+
import { a as LayoutErrorOptions, i as LayoutErrorCode, n as validateLayoutInput, o as LayoutIssue, r as LayoutError, t as assertValidLayoutInput } from "./validate-YGFYSdxd.js";
|
|
14
|
+
import { c as LayoutEdgeDelta, d as layoutJsonDiff, f as LayoutBatchItem, l as LayoutNodeDelta, m as layoutJsonBatch, p as LayoutBatchResult, s as LayoutDiff, u as diffLayout } from "./index-DprqHh4K.js";
|
|
15
|
+
import { $ as PORT_IS_OUTPUT, A as INPUT_COLLECT, B as LONG_EDGE_TARGET_NODE, C as EXT_PORT_REPLACED_DUMMY, D as GREEDY_SWITCH_ACTIVE, E as GRAPH_PROPERTIES, F as LABEL_SIDE, G as ORIGINAL_BENDPOINTS, H as MAX_MODEL_ORDER_NODES, I as LONG_EDGE_BEFORE_LABEL_DUMMY, J as ORIGINAL_OPPOSITE_PORT, K as ORIGINAL_DUMMY_NODE_POSITION, L as LONG_EDGE_HAS_LABEL_DUMMIES, M as IN_LAYER_LAYOUT_UNIT, N as IN_LAYER_SUCCESSOR_CONSTRAINTS, O as GraphProperties, P as IN_LAYER_SUCCESSOR_CONSTRAINTS_BETWEEN_NON_DUMMIES, Q as PORT_DUMMY, R as LONG_EDGE_SOURCE, S as EXT_PORT_REPLACED_DUMMIES, T as EXT_PORT_SIZE, U as MODEL_ORDER, V as MAX_EDGE_THICKNESS, W as ORIGIN, X as OUTPUT_COLLECT, Y as ORIGINAL_PORT_CONSTRAINTS, Z as PARTITION_DUMMY, _ as CROSS_HIERARCHY_MAP, a as NullProgressMonitor, at as SPACINGS, b as END_LABEL_EDGE, c as getEdgeEndpoints, ct as SPLINE_ROUTE_START, d as BREAKING_POINT_INFO, dt as TARGET_OFFSET, et as PORT_RATIO_OR_POSITION, f as CB_NUM_MODEL_ORDER_GROUPS, ft as TOP_COMMENTS, g as CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS, h as CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER, i as LayeredLayoutProvider, it as SELF_LOOP_HOLDER, j as INSIDE_CONNECTIONS, k as HIDDEN_NODES, l as BARYCENTER_ASSOCIATES, lt as SPLINE_SURVIVING_EDGE, m as CROSSING_HINT, mt as provideCollectorPort, n as computeComponentSize, nt as REPRESENTED_LABELS, o as doCompoundLayout, ot as SPLINE_EDGE_CHAIN, p as COMMENT_CONN_PORT, pt as createMergedPort, q as ORIGINAL_LABEL_EDGE, r as IElkProgressMonitor, rt as REVERSED, s as doSimpleLayout, st as SPLINE_NS_PORT_Y_COORD, t as ComponentsProcessor, tt as RANDOM, u as BOTTOM_COMMENTS, ut as TARGET_NODE_MODEL_ORDER, v as CYCLIC, w as EXT_PORT_SIDE, x as EXT_PORT_CONNECTIONS, y as END_LABELS, z as LONG_EDGE_TARGET } from "./core-DWo6Sbh9.js";
|
|
16
|
+
import { t as HIERARCHY_HANDLING } from "./layered-options-vH0HCu1n.js";
|
|
6
17
|
export { BARYCENTER_ASSOCIATES, BOTTOM_COMMENTS, BREAKING_POINT_INFO, type BuiltGraph, CB_NUM_MODEL_ORDER_GROUPS, COMMENT_CONN_PORT, CROSSING_HINT, CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER, CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS, CROSS_HIERARCHY_MAP, CYCLIC, ComponentsProcessor, Direction, END_LABELS, END_LABEL_EDGE, EXT_PORT_CONNECTIONS, EXT_PORT_REPLACED_DUMMIES, EXT_PORT_REPLACED_DUMMY, EXT_PORT_SIDE, EXT_PORT_SIZE, EdgeConstraint, type ElkEdge, type ElkEdgeSection, type ElkLayoutOptions, type ElkNode, type ElkPoint, type ElkPort, GRAPH_PROPERTIES, GREEDY_SWITCH_ACTIVE, GraphProperties, HIDDEN_NODES, HIERARCHY_HANDLING, type IElkProgressMonitor, INPUT_COLLECT, INSIDE_CONNECTIONS, IN_LAYER_LAYOUT_UNIT, IN_LAYER_SUCCESSOR_CONSTRAINTS, IN_LAYER_SUCCESSOR_CONSTRAINTS_BETWEEN_NON_DUMMIES, type IProperty, type IPropertyHolder, InLayerConstraint, type KVector, LABEL_SIDE, LEdge, LGraph, LGraphElement, type LLabel, type LMargin, LNode, LONG_EDGE_BEFORE_LABEL_DUMMY, LONG_EDGE_HAS_LABEL_DUMMIES, LONG_EDGE_SOURCE, LONG_EDGE_TARGET, LONG_EDGE_TARGET_NODE, type LPadding, LPort, LShape, Layer, LayerConstraint, LayeredLayoutProvider, type LayoutBatchItem, type LayoutBatchResult, type LayoutControl, type LayoutDiff, type LayoutEdgeDelta, LayoutError, LayoutErrorCode, type LayoutErrorOptions, type LayoutInput, type LayoutIssue, type LayoutNodeDelta, type LayoutOutput, type LayoutOutputEdge, type LayoutPhase, type LayoutProgressEvent, type LayoutSummary, MAX_EDGE_THICKNESS, MAX_MODEL_ORDER_NODES, MODEL_ORDER, MapPropertyHolder, NodeType, NullProgressMonitor, ORIGIN, ORIGINAL_BENDPOINTS, ORIGINAL_DUMMY_NODE_POSITION, ORIGINAL_LABEL_EDGE, ORIGINAL_OPPOSITE_PORT, ORIGINAL_PORT_CONSTRAINTS, OUTPUT_COLLECT, PARTITION_DUMMY, PORT_DUMMY, PORT_IS_OUTPUT, PORT_RATIO_OR_POSITION, PortConstraints, PortSide, PortType, Property, RANDOM, REPRESENTED_LABELS, REVERSED, SELF_LOOP_HOLDER, SIDES_EAST, SIDES_EAST_SOUTH, SIDES_EAST_SOUTH_WEST, SIDES_EAST_WEST, SIDES_NORTH, SIDES_NORTH_EAST, SIDES_NORTH_EAST_SOUTH, SIDES_NORTH_EAST_SOUTH_WEST, SIDES_NORTH_SOUTH, SIDES_NORTH_WEST, SIDES_SOUTH, SIDES_SOUTH_WEST, SIDES_SOUTH_WEST_NORTH, SIDES_WEST, SIDES_WEST_NORTH_EAST, SPACINGS, SPLINE_EDGE_CHAIN, SPLINE_NS_PORT_Y_COORD, SPLINE_ROUTE_START, SPLINE_SURVIVING_EDGE, TARGET_NODE_MODEL_ORDER, TARGET_OFFSET, TOP_COMMENTS, assertValidLayoutInput, buildGraph, computeComponentSize, createMergedPort, diffLayout, doCompoundLayout, doSimpleLayout, extractGraph, getEdgeEndpoints, layoutElkJson, layoutJsonBatch, layoutJsonDiff, provideCollectorPort, validateLayoutInput };
|
package/dist/index.js
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as p,o as m,p as h,r as g,s as _,t as v,u as y,v as b,x,y as S}from"./elk-json-Dm4r-Nqy.js";import{i as C,n as w,r as T}from"./api-D4FVITVw.js";import{$n as E,$r as D,An as O,Ar as k,Bn as A,Br as j,Cr as M,Dr as N,Er as P,Fn as F,Fr as I,Gn as L,Gr as R,Hn as z,Hr as B,In as V,Ir as H,Jn as U,Jr as W,Kn as G,Kr as K,Ln as q,Lr as J,Mn as Y,Mr as X,Nn as Z,Nr as Q,On as $,Or as ee,Pn as te,Pr as ne,Qn as re,Qr as ie,Rn as ae,Rr as oe,Sr as se,Tr as ce,Un as le,Ur as ue,Vn as de,Vr as fe,Wn as pe,Wr as me,Xn as he,Xr as ge,Yn as _e,Yr as ve,Zn as ye,Zr as be,_r as xe,ai as Se,ar as Ce,br as we,cr as Te,dr as Ee,ei as De,er as Oe,fr as ke,gr as Ae,hr as je,ii as Me,ir as Ne,jn as Pe,jr as Fe,kn as Ie,kr as Le,lr as Re,mr as ze,nr as Be,or as Ve,pr as He,q as Ue,qn as We,qr as Ge,rr as Ke,sr as qe,tr as Je,ur as Ye,vr as Xe,wr as Ze,xr as Qe,yr as $e,zn as et,zr as tt}from"./algorithms-JOaPA3B9.js";import"./core.js";export{$ as BARYCENTER_ASSOCIATES,Ie as BOTTOM_COMMENTS,O as BREAKING_POINT_INFO,Pe as CB_NUM_MODEL_ORDER_GROUPS,Y as COMMENT_CONN_PORT,Z as CROSSING_HINT,te as CROSSING_MINIMIZATION_FORCE_NODE_MODEL_ORDER,F as CROSSING_MINIMIZATION_HIERARCHICAL_SWEEPINESS,V as CROSS_HIERARCHY_MAP,q as CYCLIC,f as ComponentsProcessor,X as Direction,ae as END_LABELS,et as END_LABEL_EDGE,A as EXT_PORT_CONNECTIONS,de as EXT_PORT_REPLACED_DUMMIES,z as EXT_PORT_REPLACED_DUMMY,le as EXT_PORT_SIDE,pe as EXT_PORT_SIZE,Q as EdgeConstraint,L as GRAPH_PROPERTIES,G as GREEDY_SWITCH_ACTIVE,We as GraphProperties,U as HIDDEN_NODES,Ue as HIERARCHY_HANDLING,_e as INPUT_COLLECT,he as INSIDE_CONNECTIONS,ye as IN_LAYER_LAYOUT_UNIT,re as IN_LAYER_SUCCESSOR_CONSTRAINTS,E as IN_LAYER_SUCCESSOR_CONSTRAINTS_BETWEEN_NON_DUMMIES,ne as InLayerConstraint,Oe as LABEL_SIDE,b as LEdge,e as LGraph,x as LGraphElement,i as LNode,Je as LONG_EDGE_BEFORE_LABEL_DUMMY,Be as LONG_EDGE_HAS_LABEL_DUMMIES,Ke as LONG_EDGE_SOURCE,Ne as LONG_EDGE_TARGET,Ce as LONG_EDGE_TARGET_NODE,S as LPort,t as LShape,n as Layer,I as LayerConstraint,y as LayeredLayoutProvider,m as LayoutError,_ as LayoutErrorCode,Ve as MAX_EDGE_THICKNESS,qe as MAX_MODEL_ORDER_NODES,Te as MODEL_ORDER,Me as MapPropertyHolder,H as NodeType,o as NullProgressMonitor,Re as ORIGIN,Ye as ORIGINAL_BENDPOINTS,Ee as ORIGINAL_DUMMY_NODE_POSITION,ke as ORIGINAL_LABEL_EDGE,He as ORIGINAL_OPPOSITE_PORT,ze as ORIGINAL_PORT_CONSTRAINTS,je as OUTPUT_COLLECT,Ae as PARTITION_DUMMY,xe as PORT_DUMMY,Xe as PORT_IS_OUTPUT,$e as PORT_RATIO_OR_POSITION,J as PortConstraints,oe as PortSide,tt as PortType,Se as Property,we as RANDOM,Qe as REPRESENTED_LABELS,se as REVERSED,M as SELF_LOOP_HOLDER,j as SIDES_EAST,fe as SIDES_EAST_SOUTH,B as SIDES_EAST_SOUTH_WEST,ue as SIDES_EAST_WEST,me as SIDES_NORTH,R as SIDES_NORTH_EAST,K as SIDES_NORTH_EAST_SOUTH,Ge as SIDES_NORTH_EAST_SOUTH_WEST,W as SIDES_NORTH_SOUTH,ve as SIDES_NORTH_WEST,ge as SIDES_SOUTH,be as SIDES_SOUTH_WEST,ie as SIDES_SOUTH_WEST_NORTH,D as SIDES_WEST,De as SIDES_WEST_NORTH_EAST,Ze as SPACINGS,ce as SPLINE_EDGE_CHAIN,P as SPLINE_NS_PORT_Y_COORD,N as SPLINE_ROUTE_START,ee as SPLINE_SURVIVING_EDGE,Le as TARGET_NODE_MODEL_ORDER,k as TARGET_OFFSET,Fe as TOP_COMMENTS,u as assertValidLayoutInput,v as buildGraph,l as computeComponentSize,a as createMergedPort,w as diffLayout,s as doCompoundLayout,h as doSimpleLayout,p as extractGraph,c as getEdgeEndpoints,g as layoutElkJson,C as layoutJsonBatch,T as layoutJsonDiff,d as provideCollectorPort,r as validateLayoutInput};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import { tt as Property } from "./elk-json-BiUIDEHd.cjs";
|
|
13
|
+
//#region src/options/layered-options.d.ts
|
|
14
|
+
/** 层级处理. */
|
|
15
|
+
declare const HIERARCHY_HANDLING: Property<string | null>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { HIERARCHY_HANDLING as t };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import { tt as Property } from "./elk-json-BiUIDEHd.js";
|
|
13
|
+
//#region src/options/layered-options.d.ts
|
|
14
|
+
/** 层级处理. */
|
|
15
|
+
declare const HIERARCHY_HANDLING: Property<string | null>;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { HIERARCHY_HANDLING as t };
|
package/dist/layout-worker.cjs
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./elk-json-BqpJCr7A.cjs");function t(t,r){if(typeof t!=`object`||!t)return;let i=t;if(i.type!==`layout`||typeof i.id!=`number`)return;let{input:a,options:o}=i;try{let t=e.r(a,{...o,control:{onProgress:e=>r({type:`progress`,id:i.id,progress:e})}});r({type:`result`,id:i.id,output:t})}catch(e){r({type:`error`,id:i.id,error:n(e)})}}function n(t){return t instanceof e.o?{code:String(t.code),message:t.message,path:t.path,retryable:t.retryable,phase:t.phase,details:t.details}:{code:`INTERNAL_ERROR`,message:t instanceof Error?t.message:String(t)}}if(typeof self<`u`&&typeof self.postMessage==`function`){let e=self;e.onmessage=e=>{t(e.data,e=>self.postMessage(e))}}exports.handleWorkerMessage=t;
|
package/dist/layout-worker.d.cts
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import { c as LayoutInput, i as ElkLayoutOptions, l as LayoutOutput } from "./elk-json-BiUIDEHd.cjs";
|
|
2
13
|
//#region src/layout-worker.d.ts
|
|
3
14
|
type Post = (message: unknown) => void;
|
|
4
15
|
/** 处理一条来自主线程的消息 (纯函数, 便于注入 fake post). */
|
package/dist/layout-worker.d.ts
CHANGED
|
@@ -1,4 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import { c as LayoutInput, i as ElkLayoutOptions, l as LayoutOutput } from "./elk-json-BiUIDEHd.js";
|
|
2
13
|
//#region src/layout-worker.d.ts
|
|
3
14
|
type Post = (message: unknown) => void;
|
|
4
15
|
/** 处理一条来自主线程的消息 (纯函数, 便于注入 fake post). */
|
package/dist/layout-worker.js
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import{o as e,r as t}from"./elk-json-Dm4r-Nqy.js";function n(e,n){if(typeof e!=`object`||!e)return;let i=e;if(i.type!==`layout`||typeof i.id!=`number`)return;let{input:a,options:o}=i;try{let e=t(a,{...o,control:{onProgress:e=>n({type:`progress`,id:i.id,progress:e})}});n({type:`result`,id:i.id,output:e})}catch(e){n({type:`error`,id:i.id,error:r(e)})}}function r(t){return t instanceof e?{code:String(t.code),message:t.message,path:t.path,retryable:t.retryable,phase:t.phase,details:t.details}:{code:`INTERNAL_ERROR`,message:t instanceof Error?t.message:String(t)}}if(typeof self<`u`&&typeof self.postMessage==`function`){let e=self;e.onmessage=e=>{n(e.data,e=>self.postMessage(e))}}export{n as handleWorkerMessage};
|
package/dist/options.cjs
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./algorithms-X6GKNYEw.cjs");exports.HIERARCHY_HANDLING=e.q,exports.isSupportedAlgorithm=e.d,exports.normalizeAlgorithm=e.f;
|
package/dist/options.d.cts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import { i as ElkLayoutOptions } from "./elk-json-BiUIDEHd.cjs";
|
|
13
|
+
import { t as HIERARCHY_HANDLING } from "./layered-options-CWVVspE4.cjs";
|
|
3
14
|
//#region src/api/algorithms.d.ts
|
|
4
15
|
/**
|
|
5
16
|
* 已移植布局算法注册表(单一事实来源)。
|
package/dist/options.d.ts
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
import { i as ElkLayoutOptions } from "./elk-json-BiUIDEHd.js";
|
|
13
|
+
import { t as HIERARCHY_HANDLING } from "./layered-options-vH0HCu1n.js";
|
|
3
14
|
//#region src/api/algorithms.d.ts
|
|
4
15
|
/**
|
|
5
16
|
* 已移植布局算法注册表(单一事实来源)。
|
package/dist/options.js
CHANGED
|
@@ -1 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
12
|
+
export{q as HIERARCHY_HANDLING,d as isSupportedAlgorithm,f as normalizeAlgorithm}from"./algorithms-JOaPA3B9.js";
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
1
12
|
//#region src/api/errors.d.ts
|
|
2
13
|
/** Machine-readable validation and layout error codes. */
|
|
3
14
|
declare enum LayoutErrorCode {
|
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ggn-layout — TypeScript port of the Eclipse Layout Kernel (ELK) layered layout algorithms.
|
|
3
|
+
*
|
|
4
|
+
* Copyright (c) 2026 GGN contributors.
|
|
5
|
+
* Portions derived from ELK (https://github.com/eclipse/elk), Copyright (c) Kiel University
|
|
6
|
+
* and others, are licensed under the Eclipse Public License 2.0 (EPL-2.0);
|
|
7
|
+
* GGN-original portions are licensed under MIT.
|
|
8
|
+
* See LICENSES/EPL-2.0.txt, LICENSE and THIRD_PARTY_NOTICES.md.
|
|
9
|
+
*
|
|
10
|
+
* SPDX-License-Identifier: (MIT AND EPL-2.0)
|
|
11
|
+
*/
|
|
1
12
|
//#region src/api/errors.d.ts
|
|
2
13
|
/** Machine-readable validation and layout error codes. */
|
|
3
14
|
declare enum LayoutErrorCode {
|
package/docs/API.md
CHANGED
|
@@ -144,7 +144,7 @@ ggn-layout/layered(仅分层算法)和 ggn-layout/layout-worker(Web Worker
|
|
|
144
144
|
与 `.d.cts` 承载。
|
|
145
145
|
|
|
146
146
|
机器可读的 LayoutInput JSON Schema 通过 `ggn-layout/layout-input.schema.json`
|
|
147
|
-
子路径导出(源码位于
|
|
147
|
+
子路径导出(源码位于 schema/layout-input.schema.json),遵循 JSON Schema draft-07,
|
|
148
148
|
覆盖递归 children、单源单目标 edges、端口/标签和开放扩展字段。
|
|
149
149
|
运行时契约以 validateLayoutInput 为准,schema 供工具与 AI agent 消费。
|
|
150
150
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Status**: 🟢 Active
|
|
4
4
|
> **Last Updated**: 2026-08-16
|
|
5
|
-
> **Parent**: [文档索引](
|
|
5
|
+
> **Parent**: [文档索引](../../README.md)
|
|
6
6
|
> **Objective**: 枚举 `ggn-layout` 已移植的全部 14 个 ELK Java 0.12.0 布局算法模块,给出每个模块的官方用途、适用场景、协议暴露状态,并沉淀「场景 → 算法」决策树与「模块如何协作」模型,供使用者选型与维护者查表。
|
|
7
7
|
|
|
8
8
|
## 1. 为什么有这份文档
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
> **新元素**没有上一轮坐标 → 按邻居推导种子(前驱右侧 / 后继左侧 / 无邻居则追加到最右列),
|
|
95
95
|
> 否则默认 (0,0) 会被 interactive 分层塞进最左 span、把整图推开。
|
|
96
96
|
> 用户经 `scene.layout.layered` 显式声明的同类参数优先(可关掉交互式放置)。
|
|
97
|
-
>
|
|
97
|
+
> 实测(对照 = 全量重排):
|
|
98
98
|
> 加节点 → 上游链路 0px(全量 6px 纵向偏移);删节点 → 存活节点 0px 纵向、下游回填一列(全量 58px 纵向 + 跨两列);
|
|
99
99
|
> 改尺寸 → 本节点左缘不动、下游按增宽平移(与全量重排同点 = 该例天花板);
|
|
100
100
|
> 仅加边(拓扑约束变)→ 横轴零位移、只沿布局方向重排(全量对照还会把分量重新居中);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Status**: 🟢 Active
|
|
4
4
|
> **Last Updated**: 2026-08-14
|
|
5
|
-
> **Parent**: [文档索引](
|
|
5
|
+
> **Parent**: [文档索引](../../README.md)
|
|
6
6
|
> **Objective**: 移植 ELK Java 官方「算法结构 / 直接使用算法」指南到本项目——布局阶段、中间处理器、算法装配、Provider 入口四大接口概念与 TS 移植一一对应,供维护者按同一套结构理解与扩展算法。
|
|
7
7
|
|
|
8
8
|
## 1. 背景与来源(为什么有这份文档)
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
本指南把这两份文档**移植并做针对性修改**:原文档面向 Java(`ILayoutPhase` / `ILayoutProcessor` /
|
|
17
17
|
`AlgorithmAssembler` / `AbstractLayoutProvider`),本文映射到本仓库的 TS 实现,并注明差异(见 §8)。
|
|
18
18
|
|
|
19
|
-
> 配套:[ELK 布局选项接口参考](./elk-layout-options.md)(选项键 / 默认值)、[API 文档](../
|
|
19
|
+
> 配套:[ELK 布局选项接口参考](./elk-layout-options.md)(选项键 / 默认值)、[API 文档](../API.md)、
|
|
20
20
|
> 模块清单 `docs/MODULES.tsv`。
|
|
21
21
|
|
|
22
22
|
## 2. 核心概念:布局阶段 vs 中间处理器
|
|
@@ -156,5 +156,5 @@ TS 侧对应:
|
|
|
156
156
|
|
|
157
157
|
- [ELK 布局选项接口参考](./elk-layout-options.md) — 选项键 / TS Property / 默认值
|
|
158
158
|
- `docs/API.md` / `API-QUICKREF.md` — `layoutElkJson` 使用契约
|
|
159
|
-
- `
|
|
160
|
-
|
|
159
|
+
- `PORTING.md` — 移植陷阱表(含管线顺序类陷阱);`MODULES.tsv` — 模块 ↔ Java 类 ↔ 观测点清单。
|
|
160
|
+
两者只存在于源码仓库,不随 npm 包发布。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Status**: 🟢 Active
|
|
4
4
|
> **Last Updated**: 2026-09-10
|
|
5
|
-
> **Parent**: [文档索引](
|
|
5
|
+
> **Parent**: [文档索引](../../README.md)
|
|
6
6
|
> **Objective**: 回答「图里拐角很多」的三个问题——ggn-layout 是否劣于原生 ELK Java、是否存在最优参数、算法层还有多少优化空间——并给出可执行建议与复现路径。
|
|
7
7
|
|
|
8
8
|
## 1. 问题与样本
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
|
|
28
28
|
### 3.1 方法
|
|
29
29
|
|
|
30
|
-
1. 从 Viewer `GET /api/events` 抓取 `run_ggn_project_feedback`
|
|
30
|
+
1. 从 Viewer `GET /api/events` 抓取 `run_ggn_project_feedback` 全量事件,用宿主应用的 event reducer 重放成场景元素;
|
|
31
31
|
2. 用 kernel `measureNode()` 计算节点尺寸,导出标准 ELK JSON(19 边 / 12 节点 / `json.shapeCoords=ROOT`);
|
|
32
32
|
3. **同一份 JSON** 分别跑:
|
|
33
33
|
- 本仓库:`src/api/index.ts` 的 `layoutElkJson()`
|
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
|
|
139
139
|
改造后宿主图仍是同一套 layered 语义(`rel_*` 依赖在容器内部参与分层),只是层次不再用长边表达。
|
|
140
140
|
|
|
141
|
-
**已实施(2026-09-10
|
|
141
|
+
**已实施(2026-09-10)**:宿主应用的归约器不再发 `contains` 边——有子模块的 module 直接渲染成
|
|
142
142
|
`group` 容器(children = 子模块),容器自身承载标题 / 状态行 / 进度条(kernel group-renderer)。
|
|
143
143
|
同口径复测(`layoutScene` 前后对照,`run_ggn_project_feedback` 63 事件快照):
|
|
144
144
|
|
|
@@ -185,23 +185,20 @@
|
|
|
185
185
|
样本与脚本来自一次会话内的临时分析(未入库),步骤如下:
|
|
186
186
|
|
|
187
187
|
```text
|
|
188
|
-
1) 抓事件 GET http
|
|
189
|
-
2) 重放
|
|
188
|
+
1) 抓事件 GET http://<host>:<port>/api/events → 过滤 runId
|
|
189
|
+
2) 重放 宿主应用 reducer → createScene/updateElements → 元素集
|
|
190
190
|
3) 量尺寸 kernel measureNode() → 节点 width/height
|
|
191
191
|
4) 导 ELK JSON id + children(size) + edges(sources/targets) + layoutOptions(ROOT 坐标 + NETWORK_SIMPLEX + edgeNodeBetweenLayers=14)
|
|
192
192
|
5) 双侧跑布局 ggn-layout layoutElkJson() vs Java oracle(同一份 JSON)
|
|
193
193
|
6) 比指标 逐边折点/端点(ε=0.01)+ 弯点数 + 总边长 + 交叉对
|
|
194
194
|
```
|
|
195
195
|
|
|
196
|
-
|
|
197
|
-
`/tmp/ggn-edge-output-ggn.json`、`/tmp/ggn-edge-java-raw.txt`、`/tmp/ggn-vs-java-edge-metrics.json`。
|
|
196
|
+
本次产物为一次会话内的临时文件(19 边输入样本、双侧输出、逐边指标),未入库、也未随包发布。
|
|
198
197
|
|
|
199
|
-
Java oracle 命令(ELK 0.12.0 + 未签名 layered jar
|
|
198
|
+
Java oracle 命令(ELK 0.12.0 + 未签名 layered jar;`LayoutJsonMain` 是一次会话内的临时探针程序):
|
|
200
199
|
|
|
201
200
|
```bash
|
|
202
|
-
|
|
203
|
-
"scripts/elk-java-debug/out-edge:scripts/elk-java-debug/lib/*" \
|
|
204
|
-
LayoutJsonMain /tmp/ggn-edge-input.json > /tmp/ggn-edge-java-raw.txt
|
|
201
|
+
java -cp "<probe-out>:<elk-jars>/*" LayoutJsonMain <input.json> > <java-raw.txt>
|
|
205
202
|
```
|
|
206
203
|
|
|
207
204
|
> 长期回归建议:把「层次包含 vs contains 长边」两个样本收敛为 `本仓库` 的测试用例
|
|
@@ -211,5 +208,5 @@ Java oracle 命令(ELK 0.12.0 + 未签名 layered jar):
|
|
|
211
208
|
|
|
212
209
|
- [ELK 间距选项指南](./elk-spacing-options.md):间距成对语义与覆盖规则
|
|
213
210
|
- [ELK 布局选项接口参考](./elk-layout-options.md):`LayeredOptions` 键与默认值
|
|
214
|
-
-
|
|
215
|
-
-
|
|
211
|
+
- GGN 渲染参数规格(edge 渲染参数与圆角语义)——随 GGN 主仓库维护,本仓不含该文档。
|
|
212
|
+
- Agent 开发过程可视化事件协议(`contains` 与层级语义)——同上,随 GGN 主仓库维护。
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Status**: 🟢 Active
|
|
4
4
|
> **Last Updated**: 2026-08-14
|
|
5
|
-
> **Parent**: [文档索引](
|
|
5
|
+
> **Parent**: [文档索引](../../README.md)
|
|
6
6
|
> **Objective**: 移植 ELK Java「JSON Format」图格式指南——节点 / 端口 / 标签 / 边 / 边段五种基本元素与导入导出 API,并注明本移植的针对性差异(校验、超边、输出形态)。
|
|
7
7
|
|
|
8
8
|
## 1. 背景与来源(为什么有这份文档)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Status**: 🟢 Active
|
|
4
4
|
> **Last Updated**: 2026-08-14
|
|
5
|
-
> **Parent**: [文档索引](
|
|
5
|
+
> **Parent**: [文档索引](../../README.md)
|
|
6
6
|
> **Objective**: 移植 ELK Java「Layout Options」机制指南——`IProperty` / `IPropertyHolder` 的读 / 写 / 查语义、同 id 不同默认值、内部属性约定,与 TS 移植的 `Property` / `MapPropertyHolder` 一一对应。
|
|
7
7
|
|
|
8
8
|
## 1. 背景与来源(为什么有这份文档)
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> **Status**: 🟢 Active
|
|
4
4
|
> **Last Updated**: 2026-08-14
|
|
5
|
-
> **Parent**: [文档索引](
|
|
5
|
+
> **Parent**: [文档索引](../../README.md)
|
|
6
6
|
> **Objective**: 移植 ELK Java 0.12.0 布局选项接口(CoreOptions / LayeredOptions)到本项目的权威对照表——选项键、TS Property、类型、默认值一一对应;供 `kernel:layout` 接线与消费方查表。
|
|
7
7
|
|
|
8
8
|
## 1. 背景与来源(为什么有这份文档)
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
- 其他算法模块:各自目录下的 `options.ts`(`DEFAULTS` 对象),见 [§6 其他算法模块选项](#6-其他算法模块选项)
|
|
16
16
|
- 内部属性(`*.internal.*`,非用户接口):`src/options/internal-properties.ts`,不在本表列出,见 [§8 边界](#8-边界与内部属性)
|
|
17
17
|
|
|
18
|
-
>
|
|
18
|
+
> 相对 2026-08-07 的早期草稿,本表已按当前代码补齐并核对默认值
|
|
19
19
|
> (如 `spacing.edgeLabel = 2`、`portSortingStrategy = INPUT_ORDER` 等修正,见 [§7 针对性修改记录](#7-针对性修改记录相对-elk-java-早期移植))。
|
|
20
20
|
|
|
21
21
|
## 2. 阅读约定
|
|
@@ -275,7 +275,7 @@ layered 之外,`layoutElkJson` 按 `org.eclipse.elk.algorithm` 分派到各算
|
|
|
275
275
|
| `layerUnzipping.strategy` 默认 `NONE` | 枚举 `OFF → NONE` 对齐 | canonical 清单 |
|
|
276
276
|
| `priority.shortness` 默认 `0` | 早期误用 1 | canonical 清单 |
|
|
277
277
|
| core 键归属 | `direction` / `edgeRouting` / `portConstraints` / `hierarchyHandling` 等早期误挂 `layered.*`,已修正回 core | canonical 清单 |
|
|
278
|
-
| 命名约束 | 新增公共符号/文件名不含 `ELK`/`Elk`(`layoutElkJson`/`ElkNode` 兼容名保留) |
|
|
278
|
+
| 命名约束 | 新增公共符号/文件名不含 `ELK`/`Elk`(`layoutElkJson`/`ElkNode` 兼容名保留) | 仓库约定 |
|
|
279
279
|
| spacing 基准 | `LayeredSpacingsBuilder` 以 `spacing.nodeNode`(20)为基准按比例派生其余 spacing factor | `src/options/layered-spacings.ts` |
|
|
280
280
|
|
|
281
281
|
## 8. 边界与内部属性
|
|
@@ -285,7 +285,7 @@ layered 之外,`layoutElkJson` 按 `org.eclipse.elk.algorithm` 分派到各算
|
|
|
285
285
|
**不是用户接口**,由算法/处理器写入,消费方不应依赖。
|
|
286
286
|
- 未定义 `Property` 常量的 core 键(解析层按需处理,不在本表):`padding`、`edge.type`、单值全局
|
|
287
287
|
`priority`、`portLabels.treatAsGroup`(热字符串 key,默认 `undefined`,见 `properties.ts` 的
|
|
288
|
-
`registerFastStringKey
|
|
288
|
+
`registerFastStringKey`)。
|
|
289
289
|
|
|
290
290
|
## 9. 重新生成
|
|
291
291
|
|