@focus.matters/diagrams 0.0.9 → 0.0.10
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/{DirectedPoint-HRgiLZeU.js → DirectedPoint-aLZ8iXbb.js} +2 -2
- package/dist/DirectedPoint-aLZ8iXbb.js.map +1 -0
- package/dist/diagrams.css +1 -1
- package/dist/{index-DZNvKq1b.js → index-B_tKoJcy.js} +2535 -1963
- package/dist/{index-DZNvKq1b.js.map → index-B_tKoJcy.js.map} +1 -1
- package/dist/index.d.ts +1 -8
- package/dist/index.es.js +1 -1
- package/dist/index.umd.js +4 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/src/Diagrams/components/objects/CustomRenderers.d.ts +4 -0
- package/dist/{Diagrams → src/Diagrams}/components/objects/RenderEdge/debugEdges.d.ts +4 -4
- package/dist/{Diagrams → src/Diagrams}/components/objects/RenderEdge/types.d.ts +1 -1
- package/dist/src/Diagrams/components/objects/ScreenRenderers.d.ts +4 -0
- package/dist/{Diagrams → src/Diagrams}/components/objects/Shape.d.ts +3 -3
- package/dist/{Diagrams → src/Diagrams}/components/objects/customRendererProps.d.ts +1 -1
- package/dist/src/Diagrams/components/objects/screenRendererProps.d.ts +18 -0
- package/dist/{Diagrams → src/Diagrams}/custom/agent/edges/AgentEdge.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/custom/agent/nodes/ActionNode.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/custom/agent/nodes/AgentNode.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/custom/agent/nodes/ConditionNode.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/custom/agent/nodes/OutcomeNode.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/custom/agent/nodes/TriggerNode.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/custom/agent/types.d.ts +6 -6
- package/dist/src/Diagrams/custom/bpmn/extensions/BPMNGridSnap.d.ts +21 -0
- package/dist/src/Diagrams/custom/bpmn/extensions/BPMNLaneResizer.d.ts +20 -0
- package/dist/{Diagrams → src/Diagrams}/custom/bpmn/nodes/EventNode.d.ts +4 -2
- package/dist/{Diagrams → src/Diagrams}/custom/bpmn/nodes/GateNode.d.ts +4 -2
- package/dist/src/Diagrams/custom/bpmn/nodes/Lanes/LaneScreenRenderer.d.ts +6 -0
- package/dist/src/Diagrams/custom/bpmn/nodes/Lanes/index.d.ts +107 -0
- package/dist/{Diagrams → src/Diagrams}/custom/bpmn/nodes/TaskNode.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/custom/bpmn/nodes/UnknownBPMNNode.d.ts +2 -2
- package/dist/{Diagrams → src/Diagrams}/custom/communication/edges/CommunicationEdge.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/custom/communication/nodes/CommunicationActorNode.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/custom/communication/nodes/CommunicationControllerNode.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/custom/communication/nodes/CommunicationObjectNode.d.ts +1 -1
- package/dist/src/Diagrams/custom/communication/types.d.ts +1 -0
- package/dist/src/Diagrams/custom/editable/EditableLabel.d.ts +8 -0
- package/dist/{Diagrams → src/Diagrams}/custom/editable/EditableNode.d.ts +2 -2
- package/dist/{Diagrams → src/Diagrams}/store/elements/Edge.d.ts +2 -2
- package/dist/{Diagrams → src/Diagrams}/store/elements/EdgePoint.d.ts +4 -4
- package/dist/{Diagrams → src/Diagrams}/store/elements/Events.d.ts +6 -6
- package/dist/{Diagrams → src/Diagrams}/store/elements/Gateway.d.ts +3 -3
- package/dist/{Diagrams → src/Diagrams}/store/elements/Node.d.ts +11 -3
- package/dist/{Diagrams → src/Diagrams}/store/extensions/Creator.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/store/extensions/Dragger.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/store/extensions/EdgesDragger.d.ts +23 -23
- package/dist/src/Diagrams/store/extensions/NodesAligner.d.ts +39 -0
- package/dist/{Diagrams → src/Diagrams}/store/extensions/Selector.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/store/primitives/Coordinates.d.ts +1 -1
- package/dist/{Diagrams → src/Diagrams}/store/types.d.ts +4 -4
- package/dist/src/Diagrams/util/Autopan.d.ts +14 -0
- package/dist/{Diagrams → src/Diagrams}/util/bpmn/types.d.ts +1 -1
- package/dist/src/index.d.ts +8 -0
- package/package.json +1 -1
- package/dist/Diagrams/components/objects/CustomRenderers.d.ts +0 -6
- package/dist/Diagrams/custom/bpmn/nodes/Lanes/LanesResizer.d.ts +0 -6
- package/dist/Diagrams/custom/bpmn/nodes/Lanes/index.d.ts +0 -66
- package/dist/Diagrams/custom/communication/types.d.ts +0 -1
- package/dist/Diagrams/custom/editable/EditableLabel.d.ts +0 -3
- package/dist/Diagrams/custom/editable/EditableNodeContext.d.ts +0 -3
- package/dist/Diagrams/store/extensions/NodesAligner.d.ts +0 -19
- package/dist/DirectedPoint-HRgiLZeU.js.map +0 -1
- /package/dist/{Diagrams → src/Diagrams}/DiagramEditor.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/Canvas.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/extra/AlignmentSuggestions.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/extra/GatewayRender.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/extra/Measurement.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/extra/MouseTracker.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/extra/NodesConnectorRenderer.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/extra/PathFindingRenderer.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/extra/Selection.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/extra/Stats.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/extra/Svg.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/extra/Theme.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/extra/ToolsState.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/nodes/NodeTools.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/objects/Cross.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/objects/Grid.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/objects/RenderEdge/EdgeMarker.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/objects/RenderEdge/EdgeMidpoints.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/objects/RenderEdge/index.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/objects/RenderEdge/util.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/objects/Shapes.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/components/objects/makeScalableComponent.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/context-menu/ContextMenu.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/context-menu/buildDiagramContextMenu.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/context-menu/index.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/context-menu/types.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/agent/AgentDiagram.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/agent/index.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/bpmn/BPMDiagram.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/bpmn/bpmnEvents.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/bpmn/edges/EdgeWithLoad.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/bpmn/nodes/BPMNNodeContext.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/bpmn/nodes/BPMNode.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/communication/CommunicationDiagram.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/communication/CommunicationNode.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/editable/EditableDiagram.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/editable/EditionMode.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/custom/editable/events.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/layout/HStack.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/Canvas.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/Diagram.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/elements/Element.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/elements/EventsMouseInformation.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/elements/TextNode.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/Debugger.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/DiagramExtension.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/DistancesBalancer.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/GridSnap.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/History.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/Hotkeys.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/Measurer.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/NodesConnector.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/NodesResizer.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/PathFindingRenderer.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/Priorities.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/Rules.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/extensions/StraightDrag.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/primitives/Dimensions.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/store/primitives/DirectedPoint.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/ClassList.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/Mouse.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/Mutex.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/PriorityQueue.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/Semaphore.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/TasksQueue.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/arrayOrArray.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/awaitTime.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/binders.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/bpmn/applyBPMNImportPlan.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/bpmn/buildBPMNImportPlan.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/bpmn/importBPMNXmlIntoDiagram.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/bpmn/index.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/bpmn/parseBPMNXml.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/cloneDeep.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/downloadFile.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/getEnumStr.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/getIdForNode.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/getUniqueId.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/insertSorted.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/paths/PathsGrid.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/paths/findBestPathBetweenNodes.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/paths/orthogonalRouter.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/paths/stepBackFromGateway.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/readFile.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/shapes.d.ts +0 -0
- /package/dist/{Diagrams → src/Diagrams}/util/throttle.d.ts +0 -0
|
@@ -14,6 +14,7 @@ import { DiagramExtension } from './DiagramExtension';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare class Dragger extends DiagramExtension {
|
|
16
16
|
private dragThreshold;
|
|
17
|
+
private readonly autopan;
|
|
17
18
|
/**
|
|
18
19
|
* childId -> parentId, built at drag start for grouped nodes.
|
|
19
20
|
*/
|
|
@@ -33,7 +34,6 @@ export declare class Dragger extends DiagramExtension {
|
|
|
33
34
|
protected handleMouseDown(ev: DMouseDownEvent): void;
|
|
34
35
|
protected handleMouseMove(ev: DMouseMoveEvent): void;
|
|
35
36
|
protected handleDragAction(): void;
|
|
36
|
-
private calcDisplacement;
|
|
37
37
|
private isFullyContained;
|
|
38
38
|
private collectConnectedEdges;
|
|
39
39
|
private translateEdge;
|
|
@@ -9,7 +9,7 @@ type DragContext = {
|
|
|
9
9
|
midpoint: Midpoint;
|
|
10
10
|
pointA: EdgePoint;
|
|
11
11
|
pointB: EdgePoint;
|
|
12
|
-
movedAxis:
|
|
12
|
+
movedAxis: "x" | "y";
|
|
13
13
|
startMouseCanvas: Coordinates;
|
|
14
14
|
startPointA: Coordinates;
|
|
15
15
|
startPointB: Coordinates;
|
|
@@ -21,13 +21,13 @@ type DragContext = {
|
|
|
21
21
|
};
|
|
22
22
|
type EndpointDragContext = {
|
|
23
23
|
edge: Edge;
|
|
24
|
-
endpoint:
|
|
24
|
+
endpoint: "from" | "to";
|
|
25
25
|
};
|
|
26
|
-
type EdgeEndSide =
|
|
26
|
+
type EdgeEndSide = "from" | "to";
|
|
27
27
|
type PreparedSegment = {
|
|
28
28
|
pointA: EdgePoint;
|
|
29
29
|
pointB: EdgePoint;
|
|
30
|
-
movedAxis:
|
|
30
|
+
movedAxis: "x" | "y";
|
|
31
31
|
};
|
|
32
32
|
export declare class EdgesDragger extends DiagramExtension {
|
|
33
33
|
protected drag: DragContext | null;
|
|
@@ -40,46 +40,46 @@ export declare class EdgesDragger extends DiagramExtension {
|
|
|
40
40
|
protected pointsNear(a: Coordinates, b: Coordinates, epsilon?: number): boolean;
|
|
41
41
|
protected isActivePoint(point: EdgePoint): boolean;
|
|
42
42
|
protected getGridSize(): number;
|
|
43
|
-
protected orientationVector(orientation:
|
|
43
|
+
protected orientationVector(orientation: "up" | "down" | "left" | "right"): {
|
|
44
44
|
x: number;
|
|
45
45
|
y: number;
|
|
46
46
|
};
|
|
47
|
-
protected axisPerpendicularToGateway(orientation:
|
|
47
|
+
protected axisPerpendicularToGateway(orientation: "up" | "down" | "left" | "right"): "x" | "y";
|
|
48
48
|
protected expectedLeadPoint(edge: Edge, side: EdgeEndSide): Coordinates;
|
|
49
|
-
protected leadMatchesGatewaySide(endpoint: Coordinates, lead: Coordinates, orientation:
|
|
49
|
+
protected leadMatchesGatewaySide(endpoint: Coordinates, lead: Coordinates, orientation: "up" | "down" | "left" | "right"): boolean;
|
|
50
50
|
protected endpointLeadPoint(edge: Edge, side: EdgeEndSide): Coordinates | EdgePoint;
|
|
51
51
|
protected ensureEndpointLeadPoint(edge: Edge, side: EdgeEndSide): number;
|
|
52
52
|
protected ensureEndpointLeads(edge: Edge): void;
|
|
53
53
|
protected isProtectedLeadPoint(edge: Edge, index: number): boolean;
|
|
54
|
-
protected segmentMovedAxis(a: Coordinates, b: Coordinates):
|
|
54
|
+
protected segmentMovedAxis(a: Coordinates, b: Coordinates): "x" | "y";
|
|
55
55
|
protected segmentDirection(a: Coordinates, b: Coordinates): "horizontal" | "vertical" | null;
|
|
56
56
|
protected segmentIsParallelToDraggedAxis(a: Coordinates, b: Coordinates): boolean;
|
|
57
|
-
protected perpendicularAxis(axis:
|
|
58
|
-
protected pointAxis(point: Coordinates, axis:
|
|
59
|
-
protected setPointAxis(point: Coordinates, axis:
|
|
60
|
-
protected crossesStaticBoundary(orientation:
|
|
61
|
-
protected copyAsManual(point: EdgePoint, axis?:
|
|
62
|
-
protected markManual(point: EdgePoint, axis?:
|
|
63
|
-
protected clampPointPastLead(point: EdgePoint, lead: Coordinates, orientation:
|
|
64
|
-
protected movedAxisMatchesOrientation(movedAxis:
|
|
65
|
-
protected edgePointAt(edge: Edge, x: number, y: number, mode?:
|
|
66
|
-
protected guardCoordinate(edge: Edge, side: EdgeEndSide, lead: Coordinates, oppositePoint: Coordinates, perpendicularAxis:
|
|
67
|
-
protected makeGuardCorner(edge: Edge, lead: Coordinates, guardCoordinate: number, movedAxis:
|
|
57
|
+
protected perpendicularAxis(axis: "x" | "y"): "x" | "y";
|
|
58
|
+
protected pointAxis(point: Coordinates, axis: "x" | "y"): number;
|
|
59
|
+
protected setPointAxis(point: Coordinates, axis: "x" | "y", value: number): void;
|
|
60
|
+
protected crossesStaticBoundary(orientation: "up" | "down" | "left" | "right", movedAxis: "x" | "y", point: Coordinates, boundary: Coordinates, threshold?: number): boolean;
|
|
61
|
+
protected copyAsManual(point: EdgePoint, axis?: "x" | "y" | "both"): EdgePoint;
|
|
62
|
+
protected markManual(point: EdgePoint, axis?: "x" | "y" | "both"): void;
|
|
63
|
+
protected clampPointPastLead(point: EdgePoint, lead: Coordinates, orientation: "up" | "down" | "left" | "right"): void;
|
|
64
|
+
protected movedAxisMatchesOrientation(movedAxis: "x" | "y", orientation: "up" | "down" | "left" | "right"): boolean;
|
|
65
|
+
protected edgePointAt(edge: Edge, x: number, y: number, mode?: "auto" | "manual" | "static"): EdgePoint;
|
|
66
|
+
protected guardCoordinate(edge: Edge, side: EdgeEndSide, lead: Coordinates, oppositePoint: Coordinates, perpendicularAxis: "x" | "y"): number;
|
|
67
|
+
protected makeGuardCorner(edge: Edge, lead: Coordinates, guardCoordinate: number, movedAxis: "x" | "y"): EdgePoint;
|
|
68
68
|
protected insertStaticBoundaryGuard(side: EdgeEndSide): boolean;
|
|
69
69
|
protected insertStaticBoundaryGuards(): boolean;
|
|
70
70
|
protected clampDraggedSegmentAgainstEndpointLeads(): void;
|
|
71
71
|
protected mergeDraggedSegmentWithManualNeighbors(): boolean;
|
|
72
|
-
protected rebaseDraggedEndpointFixedAxis(side:
|
|
73
|
-
protected replaceDraggedEndpointWithProtectedLeadDuplicate(side:
|
|
72
|
+
protected rebaseDraggedEndpointFixedAxis(side: "pointA" | "pointB", point: EdgePoint): void;
|
|
73
|
+
protected replaceDraggedEndpointWithProtectedLeadDuplicate(side: "pointA" | "pointB", lead: EdgePoint, replacedIndex: number): void;
|
|
74
74
|
protected absorbCollinearSegmentsIntoDraggedSegment(): boolean;
|
|
75
75
|
protected removeAdjacentDuplicates(preserveActivePoints: boolean): boolean;
|
|
76
|
-
protected coordinateAnchorForPair(a: EdgePoint, b: EdgePoint, axis:
|
|
76
|
+
protected coordinateAnchorForPair(a: EdgePoint, b: EdgePoint, axis: "x" | "y", aIndex: number): number;
|
|
77
77
|
protected snapNearlyAlignedDraggedPairs(): boolean;
|
|
78
78
|
protected chooseOrthogonalCorner(from: EdgePoint, to: EdgePoint, previous?: EdgePoint, next?: EdgePoint): EdgePoint;
|
|
79
79
|
protected ensureOrthogonalAdjacency(): boolean;
|
|
80
80
|
protected normalizeDraggedEdge(): boolean;
|
|
81
81
|
protected finalizeDraggedEdge(): void;
|
|
82
|
-
protected prepareStraightLeadSegment(edge: Edge, movedAxis:
|
|
82
|
+
protected prepareStraightLeadSegment(edge: Edge, movedAxis: "x" | "y"): {
|
|
83
83
|
pointA: EdgePoint;
|
|
84
84
|
pointB: EdgePoint;
|
|
85
85
|
movedAxis: "x" | "y";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { DiagramExtension } from './DiagramExtension';
|
|
2
|
+
import { Node } from '../elements/Node';
|
|
3
|
+
import { Dimensions } from '../primitives/Dimensions';
|
|
4
|
+
type Proposal = {
|
|
5
|
+
type: "v";
|
|
6
|
+
y: number;
|
|
7
|
+
range: [number, number];
|
|
8
|
+
id: string;
|
|
9
|
+
} | {
|
|
10
|
+
type: "h";
|
|
11
|
+
x: number;
|
|
12
|
+
range: [number, number];
|
|
13
|
+
id: string;
|
|
14
|
+
};
|
|
15
|
+
type VerticalSuggestion = {
|
|
16
|
+
nodeY: number;
|
|
17
|
+
guideY: number;
|
|
18
|
+
range: [number, number];
|
|
19
|
+
};
|
|
20
|
+
type VerticalSuggestionProvider = (node: Node<any>, box: Dimensions) => VerticalSuggestion[];
|
|
21
|
+
type HorizontalSuggestion = {
|
|
22
|
+
nodeX: number;
|
|
23
|
+
guideX: number;
|
|
24
|
+
range: [number, number];
|
|
25
|
+
};
|
|
26
|
+
type HorizontalSuggestionProvider = (node: Node<any>, box: Dimensions) => HorizontalSuggestion[];
|
|
27
|
+
export declare class NodesAligner extends DiagramExtension {
|
|
28
|
+
private gridSize;
|
|
29
|
+
private horizontalSuggestionProviders;
|
|
30
|
+
private verticalSuggestionProviders;
|
|
31
|
+
proposals: Proposal[];
|
|
32
|
+
/** Registers extra horizontal candidates while preserving aligner arbitration. */
|
|
33
|
+
registerHorizontalSuggestionProvider(provider: HorizontalSuggestionProvider): () => void;
|
|
34
|
+
/** Registers extra vertical candidates while preserving aligner arbitration. */
|
|
35
|
+
registerVerticalSuggestionProvider(provider: VerticalSuggestionProvider): () => void;
|
|
36
|
+
clear(): void;
|
|
37
|
+
init(): void;
|
|
38
|
+
}
|
|
39
|
+
export {};
|
|
@@ -3,7 +3,7 @@ import { DMouseDownEvent, DMouseUpEvent, DMouseMoveEvent } from '../elements/Eve
|
|
|
3
3
|
import { Node } from '../elements/Node';
|
|
4
4
|
import { DiagramExtension } from './DiagramExtension';
|
|
5
5
|
import { Edge } from '../elements/Edge';
|
|
6
|
-
type SelectionMode =
|
|
6
|
+
type SelectionMode = "area" | "element";
|
|
7
7
|
/**
|
|
8
8
|
* The selection must be handled entirelly by the Selector class.
|
|
9
9
|
*
|
|
@@ -32,7 +32,7 @@ export declare class Coordinates {
|
|
|
32
32
|
};
|
|
33
33
|
multiply(factor: number | Coordinates): this;
|
|
34
34
|
set(i: number, value: number): this;
|
|
35
|
-
snapToGrid(gridSize: number, dimension?:
|
|
35
|
+
snapToGrid(gridSize: number, dimension?: "x" | "y" | "both"): this;
|
|
36
36
|
substract(another: Coordinates | [number, number]): this;
|
|
37
37
|
sum(another: Coordinates | [number, number] | number): this;
|
|
38
38
|
toDirectedPoint(direction: TOrientation): DirectedPoint;
|
|
@@ -19,9 +19,9 @@ export type TNodeState = {
|
|
|
19
19
|
zIndex: number;
|
|
20
20
|
groupChildren: boolean;
|
|
21
21
|
}>;
|
|
22
|
-
export type EdgePathType =
|
|
23
|
-
export type EdgeArrowHead =
|
|
24
|
-
export type EdgeLineStyle =
|
|
22
|
+
export type EdgePathType = "straight" | "curved" | "angle";
|
|
23
|
+
export type EdgeArrowHead = "none" | "arrow" | "triangle" | "triangle-filled" | "diamond" | "circle-small" | "circle-medium" | "measure";
|
|
24
|
+
export type EdgeLineStyle = "solid" | "dashed" | "dotted";
|
|
25
25
|
export type TEdgeState = {
|
|
26
26
|
dragging: boolean;
|
|
27
27
|
hover: boolean;
|
|
@@ -58,4 +58,4 @@ export type TGatewayState = {
|
|
|
58
58
|
*/
|
|
59
59
|
position: Coordinates;
|
|
60
60
|
};
|
|
61
|
-
export type TOrientation =
|
|
61
|
+
export type TOrientation = "up" | "right" | "down" | "left";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Diagram } from '../store/Diagram';
|
|
2
|
+
import { Coordinates } from '../store/primitives/Coordinates';
|
|
3
|
+
/**
|
|
4
|
+
* Displaces a diagram viewport while an interaction remains near its edges.
|
|
5
|
+
*/
|
|
6
|
+
export declare class Autopan {
|
|
7
|
+
private readonly diagram;
|
|
8
|
+
static readonly edgeThreshold = 100;
|
|
9
|
+
constructor(diagram: Diagram);
|
|
10
|
+
/** Applies one auto-pan step for the supplied viewport pointer coordinates. */
|
|
11
|
+
displace(pointer: Coordinates): Coordinates;
|
|
12
|
+
private axisDisplacement;
|
|
13
|
+
private step;
|
|
14
|
+
}
|
|
@@ -54,7 +54,7 @@ export type ParsedBPMNModel = {
|
|
|
54
54
|
unsupportedLinks: ParsedBPMNUnsupportedLink[];
|
|
55
55
|
warnings: string[];
|
|
56
56
|
};
|
|
57
|
-
export type BPMNNodeClassName =
|
|
57
|
+
export type BPMNNodeClassName = "TaskNode" | "EventNode" | "GateNode" | "UnknownBPMNNode";
|
|
58
58
|
export type BPMNImportLanePlan = {
|
|
59
59
|
id: string;
|
|
60
60
|
processId: string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { DiagramEditor } from './Diagrams/DiagramEditor';
|
|
2
|
+
export { Diagram } from './Diagrams/store/Diagram';
|
|
3
|
+
export { BPMDiagram } from './Diagrams/custom/bpmn/BPMDiagram';
|
|
4
|
+
export { AgentDiagram } from './Diagrams/custom/agent/AgentDiagram';
|
|
5
|
+
export { CommunicationDiagram } from './Diagrams/custom/communication/CommunicationDiagram';
|
|
6
|
+
export { ToolsStates } from './Diagrams/components/extra/ToolsState';
|
|
7
|
+
export type { CommunicationNodeType } from './Diagrams/custom/communication/types';
|
|
8
|
+
export type * from './Diagrams/custom/agent/types';
|
package/package.json
CHANGED
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
import { BPMNode } from '../BPMNode';
|
|
3
|
-
import { Element } from '../../../../store/elements/Element';
|
|
4
|
-
import { Dimensions } from '../../../../store/primitives/Dimensions';
|
|
5
|
-
export type TPool = {
|
|
6
|
-
name: string;
|
|
7
|
-
label: string;
|
|
8
|
-
};
|
|
9
|
-
export declare class Lanes extends BPMNode {
|
|
10
|
-
static readonly laneHeaderWidth = 50;
|
|
11
|
-
static readonly laneHeight = 250;
|
|
12
|
-
static readonly lanePadding = 25;
|
|
13
|
-
static readonly laneHeaderFontSize = 14;
|
|
14
|
-
constructor(parent: Element | null, state: {
|
|
15
|
-
id: string;
|
|
16
|
-
});
|
|
17
|
-
get box(): Dimensions;
|
|
18
|
-
addPool(): TPool;
|
|
19
|
-
protected editionIndex: number;
|
|
20
|
-
protected previousPools: TPool[];
|
|
21
|
-
cancel(): void;
|
|
22
|
-
confirm(): boolean;
|
|
23
|
-
edit(): void;
|
|
24
|
-
resetPools(): void;
|
|
25
|
-
deserialize(o: ReturnType<this['serialize']>): void;
|
|
26
|
-
serialize(): {
|
|
27
|
-
pools: TPool[];
|
|
28
|
-
box: [number, number, number, number];
|
|
29
|
-
id: string;
|
|
30
|
-
label: string;
|
|
31
|
-
movable: boolean | undefined;
|
|
32
|
-
selectable: boolean | undefined;
|
|
33
|
-
selected: boolean | undefined;
|
|
34
|
-
gateways: {
|
|
35
|
-
coordinates: [number, number];
|
|
36
|
-
fill: string | undefined;
|
|
37
|
-
id: string;
|
|
38
|
-
orientation: import('../../../../store/types').TOrientation;
|
|
39
|
-
radius: number;
|
|
40
|
-
stroke: string | undefined;
|
|
41
|
-
strokeWidth: number;
|
|
42
|
-
outEdges: {
|
|
43
|
-
arrowHeadEnd: import('../../../../store/types').EdgeArrowHead | undefined;
|
|
44
|
-
arrowHeadStart: import('../../../../store/types').EdgeArrowHead | undefined;
|
|
45
|
-
displacementEnd: [number, number] | undefined;
|
|
46
|
-
displacementStart: [number, number] | undefined;
|
|
47
|
-
lineStyle: import('../../../../store/types').EdgeLineStyle | undefined;
|
|
48
|
-
pathType: import('../../../../store/types').EdgePathType | undefined;
|
|
49
|
-
steps: import('../../../../store/elements/EdgePoint').TSerializedEdgePoint[];
|
|
50
|
-
stroke: string | undefined;
|
|
51
|
-
strokeWidth: number | undefined;
|
|
52
|
-
to: string;
|
|
53
|
-
toParentId: string;
|
|
54
|
-
class: string;
|
|
55
|
-
}[];
|
|
56
|
-
class: string;
|
|
57
|
-
}[];
|
|
58
|
-
fill: string | undefined;
|
|
59
|
-
labelFontSize: number | undefined;
|
|
60
|
-
stroke: string | undefined;
|
|
61
|
-
strokewWidth: number | undefined;
|
|
62
|
-
class: string;
|
|
63
|
-
};
|
|
64
|
-
pools: TPool[];
|
|
65
|
-
Render: FC;
|
|
66
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export type CommunicationNodeType = 'actor' | 'object' | 'controller';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { DiagramExtension } from './DiagramExtension';
|
|
2
|
-
type Proposal = {
|
|
3
|
-
type: 'v';
|
|
4
|
-
y: number;
|
|
5
|
-
range: [number, number];
|
|
6
|
-
id: string;
|
|
7
|
-
} | {
|
|
8
|
-
type: 'h';
|
|
9
|
-
x: number;
|
|
10
|
-
range: [number, number];
|
|
11
|
-
id: string;
|
|
12
|
-
};
|
|
13
|
-
export declare class NodesAligner extends DiagramExtension {
|
|
14
|
-
private gridSize;
|
|
15
|
-
proposals: Proposal[];
|
|
16
|
-
clear(): void;
|
|
17
|
-
init(): void;
|
|
18
|
-
}
|
|
19
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DirectedPoint-HRgiLZeU.js","sources":["../src/Diagrams/store/primitives/DirectedPoint.ts"],"sourcesContent":["import type { TOrientation } from '../types';\r\nimport { Coordinates } from './Coordinates';\r\n\r\nexport class DirectedPoint extends Coordinates {\r\n direction: TOrientation = 'left';\r\n\r\n get rawDirectedPoint() {\r\n return {\r\n x: this.x,\r\n y: this.y,\r\n direction: this.direction,\r\n };\r\n }\r\n\r\n stepBack() {\r\n switch (this.direction) {\r\n case 'down':\r\n this.y--;\r\n break;\r\n case 'left':\r\n this.x++;\r\n break;\r\n case 'right':\r\n this.x--;\r\n break;\r\n case 'up':\r\n this.y++;\r\n break;\r\n }\r\n return this;\r\n }\r\n\r\n stepForward() {\r\n switch (this.direction) {\r\n case 'down':\r\n this.y++;\r\n break;\r\n case 'left':\r\n this.x--;\r\n break;\r\n case 'right':\r\n this.x++;\r\n break;\r\n case 'up':\r\n this.y--;\r\n break;\r\n }\r\n return this;\r\n }\r\n}\r\n"],"names":["_DirectedPoint","Coordinates","__name","DirectedPoint"],"mappings":";;;AAGO,MAAMA,IAAN,MAAMA,UAAsBC,EAAY;AAAA,EAC7C,YAA0B;AAAA,EAE1B,IAAI,mBAAmB;AACrB,WAAO;AAAA,MACL,GAAG,KAAK;AAAA,MACR,GAAG,KAAK;AAAA,MACR,WAAW,KAAK;AAAA,IAAA;AAAA,EAEpB;AAAA,EAEA,WAAW;AACT,YAAQ,KAAK,WAAA;AAAA,MACX,KAAK;AACH,aAAK;AACL;AAAA,MACF,KAAK;AACH,aAAK;AACL;AAAA,MACF,KAAK;AACH,aAAK;AACL;AAAA,MACF,KAAK;AACH,aAAK;AACL;AAAA,IAAA;AAEJ,WAAO;AAAA,EACT;AAAA,EAEA,cAAc;AACZ,YAAQ,KAAK,WAAA;AAAA,MACX,KAAK;AACH,aAAK;AACL;AAAA,MACF,KAAK;AACH,aAAK;AACL;AAAA,MACF,KAAK;AACH,aAAK;AACL;AAAA,MACF,KAAK;AACH,aAAK;AACL;AAAA,IAAA;AAEJ,WAAO;AAAA,EACT;AACF;AA9C+CC,EAAAF,GAAA;AAAxC,IAAMG,IAANH;"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|