@aranzatech/diagrams-bpmn 0.3.1 → 0.3.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/dist/{catalog-DAGDhO-D.d.cts → catalog-DG-sz0VM.d.cts} +1 -1
- package/dist/{catalog-Q1QmKLDD.d.ts → catalog-DNIyjHbl.d.ts} +1 -1
- package/dist/{chunk-334WN4JZ.js → chunk-NYIYQUGX.js} +104 -23
- package/dist/chunk-NYIYQUGX.js.map +1 -0
- package/dist/elements/index.d.cts +3 -3
- package/dist/elements/index.d.ts +3 -3
- package/dist/extensions/index.d.cts +2 -2
- package/dist/extensions/index.d.ts +2 -2
- package/dist/index.cjs +102 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -4
- package/dist/index.d.ts +4 -4
- package/dist/index.js +1 -1
- package/dist/layout/index.cjs +60 -29
- package/dist/layout/index.cjs.map +1 -1
- package/dist/layout/index.d.cts +4 -4
- package/dist/layout/index.d.ts +4 -4
- package/dist/layout/index.js +60 -29
- package/dist/layout/index.js.map +1 -1
- package/dist/modeling/index.d.cts +4 -4
- package/dist/modeling/index.d.ts +4 -4
- package/dist/{types-CggktCqr.d.cts → types-CDp9kWQ4.d.cts} +2 -2
- package/dist/{types-DmDODKlh.d.ts → types-CuDL2YGL.d.ts} +2 -2
- package/dist/{types-D7zel9dq.d.ts → types-X5FyP8oS.d.ts} +1 -1
- package/dist/{types-BX_o95GC.d.cts → types-dQUuSnV5.d.cts} +1 -1
- package/dist/{types-BYN4Zuee.d.cts → types-nvF59RGF.d.cts} +12 -0
- package/dist/{types-BYN4Zuee.d.ts → types-nvF59RGF.d.ts} +12 -0
- package/dist/validation/index.d.cts +3 -3
- package/dist/validation/index.d.ts +3 -3
- package/dist/xml/index.cjs +102 -21
- package/dist/xml/index.cjs.map +1 -1
- package/dist/xml/index.d.cts +4 -4
- package/dist/xml/index.d.ts +4 -4
- package/dist/xml/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-334WN4JZ.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { B as BPMN_ELEMENT_CATALOG, a as BPMN_RESIZABLE_ELEMENT_TYPES, g as getBpmnElementSize, b as getElementMeta, i as isBpmnElementResizable } from './catalog-
|
|
1
|
+
export { B as BPMN_ELEMENT_CATALOG, a as BPMN_RESIZABLE_ELEMENT_TYPES, g as getBpmnElementSize, b as getElementMeta, i as isBpmnElementResizable } from './catalog-DG-sz0VM.cjs';
|
|
2
2
|
export { GetAllowedEventTriggersOptions, acceptsBoundaryEvents, getAllowedEventTriggers, getHandlePolicy, getOrientation, isChoreographyType, isContainerType, isConversationType, isDataType, isEventType, isGatewayType, isTaskType, supportsCollapse, supportsMarkers } from './elements/index.cjs';
|
|
3
|
-
export { B as BpmnCategory, a as BpmnDefinitionsSet, b as BpmnEdgeData, c as BpmnEdgeType, d as BpmnElementMeta, e as BpmnElementSize, f as BpmnElementType, g as BpmnErrorDefinition, h as BpmnEscalationDefinition, i as BpmnEventDefinition, j as BpmnEventSemantics, k as BpmnHandlePolicy, l as BpmnMessageDefinition, m as BpmnNodeData, n as BpmnOrientation, o as BpmnProcessVariable, p as BpmnServiceTaskConfig, q as BpmnSignalDefinition, r as BpmnTimerDefinition, s as BpmnTimerKind, E as EventTrigger, S as SubProcessVariant, T as TaskMarker } from './types-
|
|
3
|
+
export { B as BpmnCategory, a as BpmnDefinitionsSet, b as BpmnEdgeData, c as BpmnEdgeType, d as BpmnElementMeta, e as BpmnElementSize, f as BpmnElementType, g as BpmnErrorDefinition, h as BpmnEscalationDefinition, i as BpmnEventDefinition, j as BpmnEventSemantics, k as BpmnHandlePolicy, l as BpmnMessageDefinition, m as BpmnNodeData, n as BpmnOrientation, o as BpmnProcessVariable, p as BpmnServiceTaskConfig, q as BpmnSignalDefinition, r as BpmnTimerDefinition, s as BpmnTimerKind, E as EventTrigger, S as SubProcessVariant, T as TaskMarker } from './types-nvF59RGF.cjs';
|
|
4
4
|
export { ARANZA_DESCRIPTOR } from './extensions/index.cjs';
|
|
5
|
-
export { B as BpmnAranzaTaskExtensions, a as BpmnExecutionEngine, b as BpmnFlowableExportOptions, c as BpmnFlowableTaskExtensions, d as BpmnMessageFlowExecutionExtensions, e as BpmnTaskExecutionExtensions, g as getBpmnMessageFlowExecutionExtensions, f as getBpmnTaskExecutionExtensions } from './types-
|
|
5
|
+
export { B as BpmnAranzaTaskExtensions, a as BpmnExecutionEngine, b as BpmnFlowableExportOptions, c as BpmnFlowableTaskExtensions, d as BpmnMessageFlowExecutionExtensions, e as BpmnTaskExecutionExtensions, g as getBpmnMessageFlowExecutionExtensions, f as getBpmnTaskExecutionExtensions } from './types-dQUuSnV5.cjs';
|
|
6
6
|
export { AnnotationNode, BPMN_NODE_TYPES, BoundaryEventNode, CallChoreographyNode, CallConversationNode, ChoreographyTaskNode, ConversationNode, DataInputNode, DataObjectNode, DataObjectReferenceNode, DataOutputNode, DataStoreNode, DataStoreReferenceNode, EndEventNode, GatewayNode, GroupNode, IntermediateCatchEventNode, IntermediateThrowEventNode, LaneNode, PoolNode, StartEventNode, SubChoreographyNode, SubConversationNode, SubProcessNode, TaskNode } from './nodes/index.cjs';
|
|
7
7
|
export { AssociationEdge, BPMN_EDGE_TYPES, ConversationLinkEdge, DataAssociationEdge, MessageFlowEdge, SequenceFlowEdge } from './edges/index.cjs';
|
|
8
8
|
export { parseBpmnXml, serializeBpmnXml } from './xml/index.cjs';
|
|
9
|
-
export { B as BpmnExportOptions, a as BpmnImportResult, b as BpmnProcessModel, c as BpmnRFEdge, d as BpmnRFNode } from './types-
|
|
9
|
+
export { B as BpmnExportOptions, a as BpmnImportResult, b as BpmnProcessModel, c as BpmnRFEdge, d as BpmnRFNode } from './types-CDp9kWQ4.cjs';
|
|
10
10
|
import { SimDiagram } from './simulation/index.cjs';
|
|
11
11
|
export { SimEdge, SimLogEntry, SimLogType, SimNode, SimStatus, SimToken, SimVariables, SimulationState, createSimulation, fire, getFireable, isCompleted, setVariable, tick } from './simulation/index.cjs';
|
|
12
12
|
export { BPMN_EDGE_CONNECTION_RULES, BPMN_MODELING_RULES, BPMN_POOL_LANE_LAYOUT, BPMN_POOL_LANE_STACK_LAYOUT, BPMN_ROUTABLE_EDGE_TYPES, BPMN_SELECTION_STYLE, BpmnBoundaryAttachment, BpmnClipboardState, BpmnConnectionResolution, BpmnConnectionRule, BpmnDiagramDocument, BpmnDiagramSnapshot, BpmnDiagramState, BpmnDropTargetResolution, BpmnEdgeLaneContext, BpmnEventBus, ConnectBpmnOptions, CreateBpmnNodeOptions, FindBpmnContainerAtOptions, GroupAsBpmnSubProcessOptions, MoveBpmnLaneOptions, PasteBpmnOptions, ReorderBpmnLaneOptions, ReparentBpmnNodeAtPositionOptions, ReparentBpmnNodeOptions, ReplaceBpmnNodeOptions, ResizeBpmnNodeByHandleOptions, ResizeBpmnNodeOptions, ResolveBpmnDropTargetOptions, RouteBpmnEdgeOptions, applyBpmnPoolLaneDimensionChange, attachBoundaryEventCommand, bpmnConnectionValidators, canContainBpmnElement, computeBpmnSmartGuides, connectBpmnCommand, copyBpmnElements, createBpmnDiagramDocument, createBpmnEventBus, createBpmnLayoutCache, createBpmnNode, createBpmnNodeCommand, deleteBpmnElementsCommand, deserializeBpmnDiagram, deserializeBpmnDiagramSnapshot, findBpmnContainerAt, getAppendedBpmnLaneFrame, getBoundaryEventAttachment, getBpmnDragHandleSelector, getBpmnEdgeLabelLayout, getBpmnEdgeLaneContext, getBpmnLaneIndexAtPosition, getBpmnNodeAbsolutePosition, getBpmnNodeCenter, getBpmnNodeSize, getBpmnNodeZIndex, getBpmnPoolLaneNodeMaxSize, getBpmnPoolLaneNodeMinSize, getBpmnPoolLanes, getBpmnPoolOrientation, getBpmnTabOrder, groupAsBpmnSubProcessCommand, inferBpmnEdgeType, isBpmnDroppableInContainer, isBpmnEdgeRoutingEditable, isBpmnProcessNode, layoutBpmnPoolLaneNodes, layoutBpmnPoolLaneNodesPreservingHeights, layoutBpmnPoolLanes, moveBpmnLaneCommand, parseBpmnDiagramDocument, pasteBpmnElementsCommand, persistBpmnHistory, reorderBpmnLane, reorderBpmnLaneAfterDrop, reorderBpmnLaneCommand, reorderBpmnPoolLaneAfterDropPreservingHeights, reparentBpmnNodeAtPosition, reparentBpmnNodeCommand, replaceBpmnNodeCommand, resizeBpmnNodeByHandleCommand, resizeBpmnNodeCommand, resolveBpmnConnection, resolveBpmnDropTarget, restoreBpmnHistory, routeBpmnEdgeCommand, runBpmnCommand, runBpmnCommands, selectBpmnElementsCommand, serializeBpmnDiagram, toBpmnRelativePosition, validateBpmnConnectionForEdgeType, withBpmnLayoutCache, withBpmnNodeZIndexes } from './modeling/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { B as BPMN_ELEMENT_CATALOG, a as BPMN_RESIZABLE_ELEMENT_TYPES, g as getBpmnElementSize, b as getElementMeta, i as isBpmnElementResizable } from './catalog-
|
|
1
|
+
export { B as BPMN_ELEMENT_CATALOG, a as BPMN_RESIZABLE_ELEMENT_TYPES, g as getBpmnElementSize, b as getElementMeta, i as isBpmnElementResizable } from './catalog-DNIyjHbl.js';
|
|
2
2
|
export { GetAllowedEventTriggersOptions, acceptsBoundaryEvents, getAllowedEventTriggers, getHandlePolicy, getOrientation, isChoreographyType, isContainerType, isConversationType, isDataType, isEventType, isGatewayType, isTaskType, supportsCollapse, supportsMarkers } from './elements/index.js';
|
|
3
|
-
export { B as BpmnCategory, a as BpmnDefinitionsSet, b as BpmnEdgeData, c as BpmnEdgeType, d as BpmnElementMeta, e as BpmnElementSize, f as BpmnElementType, g as BpmnErrorDefinition, h as BpmnEscalationDefinition, i as BpmnEventDefinition, j as BpmnEventSemantics, k as BpmnHandlePolicy, l as BpmnMessageDefinition, m as BpmnNodeData, n as BpmnOrientation, o as BpmnProcessVariable, p as BpmnServiceTaskConfig, q as BpmnSignalDefinition, r as BpmnTimerDefinition, s as BpmnTimerKind, E as EventTrigger, S as SubProcessVariant, T as TaskMarker } from './types-
|
|
3
|
+
export { B as BpmnCategory, a as BpmnDefinitionsSet, b as BpmnEdgeData, c as BpmnEdgeType, d as BpmnElementMeta, e as BpmnElementSize, f as BpmnElementType, g as BpmnErrorDefinition, h as BpmnEscalationDefinition, i as BpmnEventDefinition, j as BpmnEventSemantics, k as BpmnHandlePolicy, l as BpmnMessageDefinition, m as BpmnNodeData, n as BpmnOrientation, o as BpmnProcessVariable, p as BpmnServiceTaskConfig, q as BpmnSignalDefinition, r as BpmnTimerDefinition, s as BpmnTimerKind, E as EventTrigger, S as SubProcessVariant, T as TaskMarker } from './types-nvF59RGF.js';
|
|
4
4
|
export { ARANZA_DESCRIPTOR } from './extensions/index.js';
|
|
5
|
-
export { B as BpmnAranzaTaskExtensions, a as BpmnExecutionEngine, b as BpmnFlowableExportOptions, c as BpmnFlowableTaskExtensions, d as BpmnMessageFlowExecutionExtensions, e as BpmnTaskExecutionExtensions, g as getBpmnMessageFlowExecutionExtensions, f as getBpmnTaskExecutionExtensions } from './types-
|
|
5
|
+
export { B as BpmnAranzaTaskExtensions, a as BpmnExecutionEngine, b as BpmnFlowableExportOptions, c as BpmnFlowableTaskExtensions, d as BpmnMessageFlowExecutionExtensions, e as BpmnTaskExecutionExtensions, g as getBpmnMessageFlowExecutionExtensions, f as getBpmnTaskExecutionExtensions } from './types-X5FyP8oS.js';
|
|
6
6
|
export { AnnotationNode, BPMN_NODE_TYPES, BoundaryEventNode, CallChoreographyNode, CallConversationNode, ChoreographyTaskNode, ConversationNode, DataInputNode, DataObjectNode, DataObjectReferenceNode, DataOutputNode, DataStoreNode, DataStoreReferenceNode, EndEventNode, GatewayNode, GroupNode, IntermediateCatchEventNode, IntermediateThrowEventNode, LaneNode, PoolNode, StartEventNode, SubChoreographyNode, SubConversationNode, SubProcessNode, TaskNode } from './nodes/index.js';
|
|
7
7
|
export { AssociationEdge, BPMN_EDGE_TYPES, ConversationLinkEdge, DataAssociationEdge, MessageFlowEdge, SequenceFlowEdge } from './edges/index.js';
|
|
8
8
|
export { parseBpmnXml, serializeBpmnXml } from './xml/index.js';
|
|
9
|
-
export { B as BpmnExportOptions, a as BpmnImportResult, b as BpmnProcessModel, c as BpmnRFEdge, d as BpmnRFNode } from './types-
|
|
9
|
+
export { B as BpmnExportOptions, a as BpmnImportResult, b as BpmnProcessModel, c as BpmnRFEdge, d as BpmnRFNode } from './types-CuDL2YGL.js';
|
|
10
10
|
import { SimDiagram } from './simulation/index.js';
|
|
11
11
|
export { SimEdge, SimLogEntry, SimLogType, SimNode, SimStatus, SimToken, SimVariables, SimulationState, createSimulation, fire, getFireable, isCompleted, setVariable, tick } from './simulation/index.js';
|
|
12
12
|
export { BPMN_EDGE_CONNECTION_RULES, BPMN_MODELING_RULES, BPMN_POOL_LANE_LAYOUT, BPMN_POOL_LANE_STACK_LAYOUT, BPMN_ROUTABLE_EDGE_TYPES, BPMN_SELECTION_STYLE, BpmnBoundaryAttachment, BpmnClipboardState, BpmnConnectionResolution, BpmnConnectionRule, BpmnDiagramDocument, BpmnDiagramSnapshot, BpmnDiagramState, BpmnDropTargetResolution, BpmnEdgeLaneContext, BpmnEventBus, ConnectBpmnOptions, CreateBpmnNodeOptions, FindBpmnContainerAtOptions, GroupAsBpmnSubProcessOptions, MoveBpmnLaneOptions, PasteBpmnOptions, ReorderBpmnLaneOptions, ReparentBpmnNodeAtPositionOptions, ReparentBpmnNodeOptions, ReplaceBpmnNodeOptions, ResizeBpmnNodeByHandleOptions, ResizeBpmnNodeOptions, ResolveBpmnDropTargetOptions, RouteBpmnEdgeOptions, applyBpmnPoolLaneDimensionChange, attachBoundaryEventCommand, bpmnConnectionValidators, canContainBpmnElement, computeBpmnSmartGuides, connectBpmnCommand, copyBpmnElements, createBpmnDiagramDocument, createBpmnEventBus, createBpmnLayoutCache, createBpmnNode, createBpmnNodeCommand, deleteBpmnElementsCommand, deserializeBpmnDiagram, deserializeBpmnDiagramSnapshot, findBpmnContainerAt, getAppendedBpmnLaneFrame, getBoundaryEventAttachment, getBpmnDragHandleSelector, getBpmnEdgeLabelLayout, getBpmnEdgeLaneContext, getBpmnLaneIndexAtPosition, getBpmnNodeAbsolutePosition, getBpmnNodeCenter, getBpmnNodeSize, getBpmnNodeZIndex, getBpmnPoolLaneNodeMaxSize, getBpmnPoolLaneNodeMinSize, getBpmnPoolLanes, getBpmnPoolOrientation, getBpmnTabOrder, groupAsBpmnSubProcessCommand, inferBpmnEdgeType, isBpmnDroppableInContainer, isBpmnEdgeRoutingEditable, isBpmnProcessNode, layoutBpmnPoolLaneNodes, layoutBpmnPoolLaneNodesPreservingHeights, layoutBpmnPoolLanes, moveBpmnLaneCommand, parseBpmnDiagramDocument, pasteBpmnElementsCommand, persistBpmnHistory, reorderBpmnLane, reorderBpmnLaneAfterDrop, reorderBpmnLaneCommand, reorderBpmnPoolLaneAfterDropPreservingHeights, reparentBpmnNodeAtPosition, reparentBpmnNodeCommand, replaceBpmnNodeCommand, resizeBpmnNodeByHandleCommand, resizeBpmnNodeCommand, resolveBpmnConnection, resolveBpmnDropTarget, restoreBpmnHistory, routeBpmnEdgeCommand, runBpmnCommand, runBpmnCommands, selectBpmnElementsCommand, serializeBpmnDiagram, toBpmnRelativePosition, validateBpmnConnectionForEdgeType, withBpmnLayoutCache, withBpmnNodeZIndexes } from './modeling/index.js';
|
package/dist/index.js
CHANGED
|
@@ -2,7 +2,7 @@ export { getAllowedEventTriggers } from './chunk-JEGYVEJO.js';
|
|
|
2
2
|
export { AnnotationNode, BPMN_NODE_TYPES, BoundaryEventNode, CallChoreographyNode, CallConversationNode, ChoreographyTaskNode, ConversationNode, DataInputNode, DataObjectNode, DataObjectReferenceNode, DataOutputNode, DataStoreNode, DataStoreReferenceNode, EndEventNode, GatewayNode, GroupNode, IntermediateCatchEventNode, IntermediateThrowEventNode, LaneNode, PoolNode, StartEventNode, SubChoreographyNode, SubConversationNode, SubProcessNode, TaskNode } from './chunk-X54NHLBA.js';
|
|
3
3
|
export { AssociationEdge, BPMN_EDGE_TYPES, ConversationLinkEdge, DataAssociationEdge, MessageFlowEdge, SequenceFlowEdge } from './chunk-CPFUQM6H.js';
|
|
4
4
|
import './chunk-PDTXM32P.js';
|
|
5
|
-
export { parseBpmnXml, serializeBpmnXml } from './chunk-
|
|
5
|
+
export { parseBpmnXml, serializeBpmnXml } from './chunk-NYIYQUGX.js';
|
|
6
6
|
import './chunk-77L6O76M.js';
|
|
7
7
|
export { ARANZA_DESCRIPTOR, getBpmnMessageFlowExecutionExtensions, getBpmnTaskExecutionExtensions } from './chunk-TB6V4S5N.js';
|
|
8
8
|
import { createSimulation, tick, getFireable, fire } from './chunk-M46UDUN3.js';
|
package/dist/layout/index.cjs
CHANGED
|
@@ -1311,17 +1311,17 @@ function assignRows(nodes, forwardEdges, columns, gatewayPairs) {
|
|
|
1311
1311
|
|
|
1312
1312
|
// src/layout/bpmn-custom-layout.ts
|
|
1313
1313
|
var LANE_LABEL_W = 28;
|
|
1314
|
-
var LANE_H_PAD =
|
|
1315
|
-
var COL_GAP =
|
|
1316
|
-
var ROW_HEIGHT =
|
|
1317
|
-
var ROW_GAP =
|
|
1318
|
-
var LANE_V_PAD =
|
|
1319
|
-
var POOL_H_PAD =
|
|
1320
|
-
var POOL_V_GAP =
|
|
1321
|
-
var LANE_MIN_H =
|
|
1322
|
-
var POOL_MIN_W =
|
|
1314
|
+
var LANE_H_PAD = 32;
|
|
1315
|
+
var COL_GAP = 60;
|
|
1316
|
+
var ROW_HEIGHT = 90;
|
|
1317
|
+
var ROW_GAP = 50;
|
|
1318
|
+
var LANE_V_PAD = 48;
|
|
1319
|
+
var POOL_H_PAD = 64;
|
|
1320
|
+
var POOL_V_GAP = 48;
|
|
1321
|
+
var LANE_MIN_H = 180;
|
|
1322
|
+
var POOL_MIN_W = 720;
|
|
1323
1323
|
var POOL_INNER_PAD = 10;
|
|
1324
|
-
var BACK_EDGE_CLEARANCE =
|
|
1324
|
+
var BACK_EDGE_CLEARANCE = 56;
|
|
1325
1325
|
var LAYOUT_ARTIFACT_TYPES = /* @__PURE__ */ new Set([
|
|
1326
1326
|
"DataObject",
|
|
1327
1327
|
"DataObjectReference",
|
|
@@ -1338,12 +1338,38 @@ var COLLAPSED_SUBPROCESS_TYPES = /* @__PURE__ */ new Set([
|
|
|
1338
1338
|
"EventSubProcess",
|
|
1339
1339
|
"AdHocSubProcess"
|
|
1340
1340
|
]);
|
|
1341
|
+
var LAYOUT_TASK_TYPES = /* @__PURE__ */ new Set([
|
|
1342
|
+
"Task",
|
|
1343
|
+
"UserTask",
|
|
1344
|
+
"ServiceTask",
|
|
1345
|
+
"ScriptTask",
|
|
1346
|
+
"ManualTask",
|
|
1347
|
+
"BusinessRuleTask",
|
|
1348
|
+
"ReceiveTask",
|
|
1349
|
+
"SendTask",
|
|
1350
|
+
"CallActivity"
|
|
1351
|
+
]);
|
|
1352
|
+
var TASK_LAYOUT_MIN_W = 130;
|
|
1353
|
+
var TASK_LAYOUT_MIN_H = 80;
|
|
1341
1354
|
function nW(node) {
|
|
1342
1355
|
return node.width ?? node.measured?.width ?? 120;
|
|
1343
1356
|
}
|
|
1344
1357
|
function nH(node) {
|
|
1345
1358
|
return node.height ?? node.measured?.height ?? 60;
|
|
1346
1359
|
}
|
|
1360
|
+
function layoutW(node) {
|
|
1361
|
+
return LAYOUT_TASK_TYPES.has(node.data.elementType) ? Math.max(nW(node), TASK_LAYOUT_MIN_W) : nW(node);
|
|
1362
|
+
}
|
|
1363
|
+
function layoutH(node) {
|
|
1364
|
+
return LAYOUT_TASK_TYPES.has(node.data.elementType) ? Math.max(nH(node), TASK_LAYOUT_MIN_H) : nH(node);
|
|
1365
|
+
}
|
|
1366
|
+
function applyLayoutMinSize(node) {
|
|
1367
|
+
if (!LAYOUT_TASK_TYPES.has(node.data.elementType)) return node;
|
|
1368
|
+
const w = layoutW(node);
|
|
1369
|
+
const h = layoutH(node);
|
|
1370
|
+
if (w === nW(node) && h === nH(node)) return node;
|
|
1371
|
+
return { ...node, width: w, height: h, measured: { width: w, height: h } };
|
|
1372
|
+
}
|
|
1347
1373
|
var BOUNDARY_SPACING = 10;
|
|
1348
1374
|
function repositionBoundaryEvents(boundaryEvents, positionedContent) {
|
|
1349
1375
|
if (boundaryEvents.length === 0) return [];
|
|
@@ -1369,8 +1395,8 @@ function repositionBoundaryEvents(boundaryEvents, positionedContent) {
|
|
|
1369
1395
|
}
|
|
1370
1396
|
const hostGroup = byHost.get(hostId);
|
|
1371
1397
|
const siblingIdx = hostGroup.findIndex((n) => n.id === be.id);
|
|
1372
|
-
const hostW =
|
|
1373
|
-
const hostH =
|
|
1398
|
+
const hostW = layoutW(host);
|
|
1399
|
+
const hostH = layoutH(host);
|
|
1374
1400
|
const beH = nH(be);
|
|
1375
1401
|
const totalGroupW = hostGroup.reduce((s, b) => s + nW(b), 0) + (hostGroup.length - 1) * BOUNDARY_SPACING;
|
|
1376
1402
|
const groupStartX = host.position.x + hostW / 2 - totalGroupW / 2;
|
|
@@ -1411,7 +1437,7 @@ function layoutSubProcess(children, edges) {
|
|
|
1411
1437
|
for (let c = 0; c <= maxCol; c++) colW.set(c, 0);
|
|
1412
1438
|
for (const node of mainChildren) {
|
|
1413
1439
|
const c = columns.get(node.id) ?? 0;
|
|
1414
|
-
colW.set(c, Math.max(colW.get(c) ?? 0,
|
|
1440
|
+
colW.set(c, Math.max(colW.get(c) ?? 0, layoutW(node)));
|
|
1415
1441
|
}
|
|
1416
1442
|
const colX = /* @__PURE__ */ new Map();
|
|
1417
1443
|
let cumX = 0;
|
|
@@ -1430,12 +1456,11 @@ function layoutSubProcess(children, edges) {
|
|
|
1430
1456
|
const positionedChildren = mainChildren.map((node) => {
|
|
1431
1457
|
const c = columns.get(node.id) ?? 0;
|
|
1432
1458
|
const r = rows.get(node.id) ?? 0;
|
|
1433
|
-
const
|
|
1434
|
-
const
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
};
|
|
1459
|
+
const lw = layoutW(node);
|
|
1460
|
+
const lh = layoutH(node);
|
|
1461
|
+
const colOffset = (colX.get(c) ?? 0) + (colW.get(c) ?? 120) / 2 - lw / 2;
|
|
1462
|
+
const rowOffset = (r - minRow) * (ROW_HEIGHT + ROW_GAP) + ROW_HEIGHT / 2 - lh / 2;
|
|
1463
|
+
return applyLayoutMinSize({ ...node, position: { x: SP_PAD + colOffset, y: SP_PAD + rowOffset } });
|
|
1439
1464
|
});
|
|
1440
1465
|
const positionedBoundaries = repositionBoundaryEvents(boundaryEvents, positionedChildren);
|
|
1441
1466
|
return {
|
|
@@ -1468,8 +1493,7 @@ function layoutPool(pool, lanes, content, allEdges) {
|
|
|
1468
1493
|
height: h
|
|
1469
1494
|
};
|
|
1470
1495
|
}
|
|
1471
|
-
const
|
|
1472
|
-
const sortedLanes = lanePositionsDistinct ? [...lanes].sort((a, b) => a.position.y - b.position.y) : [...lanes];
|
|
1496
|
+
const sortedLanes = [...lanes].sort((a, b) => a.position.y - b.position.y);
|
|
1473
1497
|
const hasLanes = sortedLanes.length > 0;
|
|
1474
1498
|
const laneIdSet = new Set(sortedLanes.map((l) => l.id));
|
|
1475
1499
|
const nodeLaneId = /* @__PURE__ */ new Map();
|
|
@@ -1518,7 +1542,7 @@ function layoutPool(pool, lanes, content, allEdges) {
|
|
|
1518
1542
|
for (let c = 0; c <= maxCol; c++) colW.set(c, 0);
|
|
1519
1543
|
for (const node of mainContent) {
|
|
1520
1544
|
const c = columns.get(node.id) ?? 0;
|
|
1521
|
-
colW.set(c, Math.max(colW.get(c) ?? 0,
|
|
1545
|
+
colW.set(c, Math.max(colW.get(c) ?? 0, layoutW(node)));
|
|
1522
1546
|
}
|
|
1523
1547
|
const colX = /* @__PURE__ */ new Map();
|
|
1524
1548
|
let cumX = 0;
|
|
@@ -1545,14 +1569,16 @@ function layoutPool(pool, lanes, content, allEdges) {
|
|
|
1545
1569
|
const laneId = nodeLaneId.get(node.id) ?? "_pool_";
|
|
1546
1570
|
const stat = laneStats.get(laneId);
|
|
1547
1571
|
const lYOff = laneY.get(laneId) ?? 0;
|
|
1548
|
-
const
|
|
1549
|
-
const
|
|
1572
|
+
const lw = layoutW(node);
|
|
1573
|
+
const lh = layoutH(node);
|
|
1574
|
+
const colOffset = (colX.get(c) ?? 0) + (colW.get(c) ?? 120) / 2 - lw / 2;
|
|
1575
|
+
const rowOffset = (r - stat.minRow) * (ROW_HEIGHT + ROW_GAP) + ROW_HEIGHT / 2 - lh / 2;
|
|
1550
1576
|
const contentH_stat = stat.rowCount * ROW_HEIGHT + Math.max(0, stat.rowCount - 1) * ROW_GAP;
|
|
1551
1577
|
const vertTopOffset = Math.max(LANE_V_PAD, (stat.height - contentH_stat) / 2);
|
|
1552
1578
|
const isLaneChild = hasLanes && !!node.parentId && node.parentId !== pool.id;
|
|
1553
1579
|
const x = isLaneChild ? LANE_LABEL_W + LANE_H_PAD + colOffset : POOL_H_PAD + colOffset;
|
|
1554
1580
|
const y = isLaneChild ? vertTopOffset + rowOffset : lYOff + vertTopOffset + rowOffset;
|
|
1555
|
-
return { ...node, position: { x, y } };
|
|
1581
|
+
return applyLayoutMinSize({ ...node, position: { x, y } });
|
|
1556
1582
|
});
|
|
1557
1583
|
const NODE_MIN_GAP = 24;
|
|
1558
1584
|
const resolvedContent = [...positionedContent];
|
|
@@ -1561,13 +1587,13 @@ function layoutPool(pool, lanes, content, allEdges) {
|
|
|
1561
1587
|
for (let k = 1; k < laneNodeIndices.length; k++) {
|
|
1562
1588
|
const prev = resolvedContent[laneNodeIndices[k - 1].i];
|
|
1563
1589
|
const curr = resolvedContent[laneNodeIndices[k].i];
|
|
1564
|
-
const prevBottom = prev.position.y +
|
|
1590
|
+
const prevBottom = prev.position.y + layoutH(prev);
|
|
1565
1591
|
const currTop = curr.position.y;
|
|
1566
1592
|
const prevTop = prev.position.y;
|
|
1567
|
-
const currBottom = curr.position.y +
|
|
1593
|
+
const currBottom = curr.position.y + layoutH(curr);
|
|
1568
1594
|
const yOverlap = prevBottom + NODE_MIN_GAP > currTop && currBottom + NODE_MIN_GAP > prevTop;
|
|
1569
1595
|
if (!yOverlap) continue;
|
|
1570
|
-
const prevRight = prev.position.x +
|
|
1596
|
+
const prevRight = prev.position.x + layoutW(prev);
|
|
1571
1597
|
if (prevRight + NODE_MIN_GAP > curr.position.x) {
|
|
1572
1598
|
resolvedContent[laneNodeIndices[k].i] = {
|
|
1573
1599
|
...curr,
|
|
@@ -1612,6 +1638,11 @@ function gapMidX(sAbs, sW, tAbs, tW) {
|
|
|
1612
1638
|
const rightLeftEdge = Math.max(sAbs.x, tAbs.x);
|
|
1613
1639
|
return leftRightEdge < rightLeftEdge ? (leftRightEdge + rightLeftEdge) / 2 : sAbs.x + sW / 2;
|
|
1614
1640
|
}
|
|
1641
|
+
function routeMidX(sAbs, sW, tAbs, tW) {
|
|
1642
|
+
const leftEdge = Math.min(sAbs.x + sW, tAbs.x + tW);
|
|
1643
|
+
const rightEdge = Math.max(sAbs.x, tAbs.x);
|
|
1644
|
+
return leftEdge < rightEdge ? leftEdge + (rightEdge - leftEdge) * 0.35 : sAbs.x + sW / 2;
|
|
1645
|
+
}
|
|
1615
1646
|
var SAME_ROW_THRESHOLD = 15;
|
|
1616
1647
|
function routeEdges(edges, layoutNodes, backEdgeIds, laneIds, poolIds) {
|
|
1617
1648
|
const byId = new Map(layoutNodes.map((n) => [n.id, n]));
|
|
@@ -1723,7 +1754,7 @@ function routeEdges(edges, layoutNodes, backEdgeIds, laneIds, poolIds) {
|
|
|
1723
1754
|
{ x: tCX, y: exitsTop ? tAbs.y + tH : tAbs.y }
|
|
1724
1755
|
];
|
|
1725
1756
|
} else {
|
|
1726
|
-
const midX =
|
|
1757
|
+
const midX = routeMidX(sAbs, sW, tAbs, tW);
|
|
1727
1758
|
routingPoints = [
|
|
1728
1759
|
{ x: sAbs.x + sW, y: sCY },
|
|
1729
1760
|
{ x: midX, y: sCY },
|