@focus.matters/diagrams 0.0.10 → 0.1.0
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-aLZ8iXbb.js → DirectedPoint-BcpEj8ub.js} +2 -2
- package/dist/DirectedPoint-BcpEj8ub.js.map +1 -0
- package/dist/diagrams.css +1 -1
- package/dist/index-hTkL5cDr.js +12037 -0
- package/dist/index-hTkL5cDr.js.map +1 -0
- package/dist/index.es.js +8 -6
- package/dist/index.umd.js +5 -4
- package/dist/index.umd.js.map +1 -1
- package/dist/src/Diagrams/components/Canvas.d.ts +1 -0
- package/dist/src/Diagrams/components/extensions/RenderDiagramExtensions.d.ts +4 -0
- package/dist/src/Diagrams/components/extensions/RenderUIExtensions.d.ts +4 -0
- package/dist/src/Diagrams/components/extra/AlignmentSuggestions.d.ts +1 -0
- package/dist/src/Diagrams/components/extra/GatewayRender.d.ts +1 -0
- package/dist/src/Diagrams/components/extra/NodeGatewayRender.d.ts +6 -0
- package/dist/src/Diagrams/components/objects/EdgeLabels.d.ts +7 -0
- package/dist/src/Diagrams/components/objects/RenderEdge/EdgeMarker.d.ts +1 -0
- package/dist/src/Diagrams/components/objects/RenderEdge/buildEdgePath.d.ts +5 -0
- package/dist/src/Diagrams/components/objects/RenderEdge/index.d.ts +1 -0
- package/dist/src/Diagrams/components/objects/RenderEdge/types.d.ts +2 -1
- package/dist/src/Diagrams/components/objects/Shapes.d.ts +1 -0
- package/dist/src/Diagrams/components/objects/edgeLabelPlacement.d.ts +4 -0
- package/dist/src/Diagrams/custom/agent/edges/AgentEdge.d.ts +19 -1
- package/dist/src/Diagrams/custom/agent/nodes/AgentNode.d.ts +20 -1
- package/dist/src/Diagrams/custom/bpmn/BPMDiagram.d.ts +10 -1
- package/dist/src/Diagrams/custom/bpmn/bpmnEvents.d.ts +2 -1
- package/dist/src/Diagrams/custom/bpmn/config/BPMNElementCatalog.d.ts +26 -0
- package/dist/src/Diagrams/custom/bpmn/config/BPMNLabels.d.ts +27 -0
- package/dist/src/Diagrams/custom/bpmn/edges/BPMNEdge.d.ts +77 -0
- package/dist/src/Diagrams/custom/bpmn/extensions/BPMNArtifactTransformer.d.ts +5 -0
- package/dist/src/Diagrams/custom/bpmn/extensions/BPMNEventAttachments.d.ts +19 -0
- package/dist/src/Diagrams/custom/bpmn/extensions/BPMNGridSnap.d.ts +4 -2
- package/dist/src/Diagrams/custom/bpmn/extensions/BPMNLaneResizer.d.ts +1 -1
- package/dist/src/Diagrams/custom/bpmn/extensions/BPMNModelerExtension.d.ts +97 -0
- package/dist/src/Diagrams/custom/bpmn/extensions/BPMNNodeResizer.d.ts +31 -0
- package/dist/src/Diagrams/custom/bpmn/extensions/BPMNPropertyChangeEvent.d.ts +4 -0
- package/dist/src/Diagrams/custom/bpmn/extensions/BPMNResizeSuggester.d.ts +23 -0
- package/dist/src/Diagrams/custom/bpmn/nodes/BPMNEventDefinition.d.ts +28 -0
- package/dist/src/Diagrams/custom/bpmn/nodes/BPMNode.d.ts +9 -0
- package/dist/src/Diagrams/custom/bpmn/nodes/BlackBoxPoolNode.d.ts +17 -0
- package/dist/src/Diagrams/custom/bpmn/nodes/DataStoreNode.d.ts +14 -0
- package/dist/src/Diagrams/custom/bpmn/nodes/DocumentAnnotationNode.d.ts +19 -0
- package/dist/src/Diagrams/custom/bpmn/nodes/DocumentNode.d.ts +13 -0
- package/dist/src/Diagrams/custom/bpmn/nodes/EventNode.d.ts +82 -12
- package/dist/src/Diagrams/custom/bpmn/nodes/GateNode.d.ts +27 -2
- package/dist/src/Diagrams/custom/bpmn/nodes/Lanes/LaneScreenRenderer.d.ts +1 -1
- package/dist/src/Diagrams/custom/bpmn/nodes/Lanes/index.d.ts +30 -6
- package/dist/src/Diagrams/custom/bpmn/nodes/TaskNode.d.ts +108 -3
- package/dist/src/Diagrams/custom/bpmn/nodes/TextAnnotationNode.d.ts +75 -0
- package/dist/src/Diagrams/custom/bpmn/nodes/UnknownBPMNNode.d.ts +20 -1
- package/dist/src/Diagrams/custom/bpmn/ui/BPMNDiagramControls.d.ts +6 -0
- package/dist/src/Diagrams/custom/bpmn/ui/BPMNElementMenu.d.ts +11 -0
- package/dist/src/Diagrams/custom/bpmn/ui/BPMNIcon.d.ts +9 -0
- package/dist/src/Diagrams/custom/bpmn/ui/BPMNPropertiesPanel.d.ts +6 -0
- package/dist/src/Diagrams/custom/bpmn/ui/BPMNResizeHandle.d.ts +7 -0
- package/dist/src/Diagrams/custom/bpmn/ui/resolveToolbarMenuPlacement.d.ts +18 -0
- package/dist/src/Diagrams/custom/bpmn/ui/resolveVisibleEdgeToolbarAnchor.d.ts +4 -0
- package/dist/src/Diagrams/custom/communication/edges/CommunicationEdge.d.ts +1 -27
- package/dist/src/Diagrams/custom/editable/EditableLabel.d.ts +1 -1
- package/dist/src/Diagrams/custom/editable/EditableNode.d.ts +8 -2
- package/dist/src/Diagrams/store/Canvas.d.ts +16 -6
- package/dist/src/Diagrams/store/Diagram.d.ts +77 -19
- package/dist/src/Diagrams/store/elements/DEdgeLabelChangeEvent.d.ts +5 -0
- package/dist/src/Diagrams/store/elements/Edge.d.ts +58 -8
- package/dist/src/Diagrams/store/elements/EdgeLabel.d.ts +64 -0
- package/dist/src/Diagrams/store/elements/Events.d.ts +5 -5
- package/dist/src/Diagrams/store/elements/Gateway.d.ts +24 -4
- package/dist/src/Diagrams/store/elements/Node.d.ts +69 -7
- package/dist/src/Diagrams/store/extensions/DiagramExtension.d.ts +11 -1
- package/dist/src/Diagrams/store/extensions/DistancesBalancer.d.ts +7 -1
- package/dist/src/Diagrams/store/extensions/Dragger.d.ts +19 -4
- package/dist/src/Diagrams/store/extensions/EdgesDragger.d.ts +15 -4
- package/dist/src/Diagrams/store/extensions/History.d.ts +10 -2
- package/dist/src/Diagrams/store/extensions/Hotkeys.d.ts +4 -1
- package/dist/src/Diagrams/store/extensions/LabelsAligner.d.ts +21 -0
- package/dist/src/Diagrams/store/extensions/NodesAligner.d.ts +10 -3
- package/dist/src/Diagrams/store/extensions/NodesConnector.d.ts +32 -3
- package/dist/src/Diagrams/store/extensions/Priorities.d.ts +2 -1
- package/dist/src/Diagrams/store/extensions/Rules.d.ts +6 -1
- package/dist/src/Diagrams/store/extensions/Selector.d.ts +17 -4
- package/dist/src/Diagrams/store/extensions/StraightDrag.d.ts +3 -0
- package/dist/src/Diagrams/store/extensions/StraightLabelsDrag.d.ts +10 -0
- package/dist/src/Diagrams/store/extensions/nodePositionProposalRanking.d.ts +8 -0
- package/dist/src/Diagrams/store/routers/CurvedRouter.d.ts +13 -0
- package/dist/src/Diagrams/store/routers/EdgesRouter.d.ts +21 -0
- package/dist/src/Diagrams/store/routers/OrthogonalRouter.d.ts +16 -0
- package/dist/src/Diagrams/store/routers/StraightRouter.d.ts +13 -0
- package/dist/src/Diagrams/store/routers/cardinalAxisConstraint.d.ts +7 -0
- package/dist/src/Diagrams/store/routers/getEdgesRouter.d.ts +4 -0
- package/dist/src/Diagrams/store/routers/resolveConnectionCandidate.d.ts +22 -0
- package/dist/src/Diagrams/store/types.d.ts +16 -7
- package/dist/src/Diagrams/util/bpmn/applyBPMNImportPlan.d.ts +1 -0
- package/dist/src/Diagrams/util/bpmn/buildBPMNImportPlan.d.ts +1 -1
- package/dist/src/Diagrams/util/bpmn/index.d.ts +2 -1
- package/dist/src/Diagrams/util/bpmn/sanitizeId.d.ts +2 -0
- package/dist/src/Diagrams/util/bpmn/types.d.ts +1 -0
- package/dist/src/Diagrams/util/paths/orthogonalRouter.d.ts +2 -0
- package/dist/src/index.d.ts +8 -5
- package/package.json +1 -1
- package/dist/DirectedPoint-aLZ8iXbb.js.map +0 -1
- package/dist/index-B_tKoJcy.js +0 -7229
- package/dist/index-B_tKoJcy.js.map +0 -1
- package/dist/src/Diagrams/util/paths/findBestPathBetweenNodes.d.ts +0 -8
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { Gateway } from '../../store/elements/Gateway';
|
|
3
|
+
/** Renders one interactive gateway while preserving its owning node's hover state. */
|
|
3
4
|
export declare const GatewayRender: ({ gateway, }: {
|
|
4
5
|
gateway: Gateway;
|
|
5
6
|
}) => ReactElement;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { Node } from '../../store/elements/Node';
|
|
3
|
+
/** Renders an invisible perimeter hit target for nodes using edges as gateways. */
|
|
4
|
+
export declare const NodeGatewayRender: ((props: {
|
|
5
|
+
node: Node<any>;
|
|
6
|
+
}) => ReactElement);
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Edge } from '../../store/elements/Edge';
|
|
2
|
+
/** Renders every edge label in the unscaled screen layer for crisp zoomed text. */
|
|
3
|
+
export declare const EdgeLabels: (({ edge }: {
|
|
4
|
+
edge: Edge;
|
|
5
|
+
}) => import("react").JSX.Element[]) & {
|
|
6
|
+
displayName: string;
|
|
7
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Edge } from '../../../store/elements/Edge';
|
|
2
|
+
import { EdgePathType } from '../../../store/types';
|
|
3
|
+
import { Coordinates } from '../../../store/primitives/Coordinates';
|
|
4
|
+
/** Builds the SVG path matching an edge's straight, curved, or orthogonal mode. */
|
|
5
|
+
export declare function buildEdgePath(points: Coordinates[], edge?: Edge, pathType?: EdgePathType): string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
2
|
import { Coordinates } from '../../../store/primitives/Coordinates';
|
|
3
|
-
import { EdgeArrowHead, EdgeLineStyle } from '../../../store/types';
|
|
3
|
+
import { EdgeArrowHead, EdgeLineStyle, EdgePathType } from '../../../store/types';
|
|
4
4
|
import { EdgePoint } from '../../../store/elements/EdgePoint';
|
|
5
5
|
import { Edge } from '../../../store/elements/Edge';
|
|
6
6
|
import { AnyMouseEvent } from '../../../store/elements/Events';
|
|
@@ -16,6 +16,7 @@ export interface RenderEdgeProps {
|
|
|
16
16
|
startType?: EdgeArrowHead;
|
|
17
17
|
endType?: EdgeArrowHead;
|
|
18
18
|
lineStyle?: EdgeLineStyle;
|
|
19
|
+
pathType?: EdgePathType;
|
|
19
20
|
draggable?: boolean;
|
|
20
21
|
onMidpointMouseDown?: (p: Midpoint, ev: React.MouseEvent) => void;
|
|
21
22
|
onEndpointMouseDown?: (endpoint: "from" | "to", ev: React.MouseEvent) => void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { Edge } from '../../store/elements/Edge';
|
|
2
|
+
import { Coordinates } from '../../store/primitives/Coordinates';
|
|
3
|
+
/** Places a new label beside the clicked route segment instead of over its stroke. */
|
|
4
|
+
export declare function positionEdgeLabelBesideRoute(edge: Edge, clicked: Coordinates, clearance?: number): Coordinates;
|
|
@@ -19,7 +19,25 @@ export declare class AgentEdge extends Edge {
|
|
|
19
19
|
displacementEnd: [number, number] | undefined;
|
|
20
20
|
displacementStart: [number, number] | undefined;
|
|
21
21
|
lineStyle: import('../../../store/types').EdgeLineStyle | undefined;
|
|
22
|
-
|
|
22
|
+
labels: {
|
|
23
|
+
alignment: "right" | "left" | "center";
|
|
24
|
+
id: string;
|
|
25
|
+
size: {
|
|
26
|
+
height: number;
|
|
27
|
+
width: number;
|
|
28
|
+
};
|
|
29
|
+
text: string;
|
|
30
|
+
position: [number, number];
|
|
31
|
+
}[];
|
|
32
|
+
pathType: import('../../../store/types').EdgePathType;
|
|
33
|
+
startAnchor: {
|
|
34
|
+
mode: import('../../../store/types').EdgeAnchorMode;
|
|
35
|
+
position: [number, number] | undefined;
|
|
36
|
+
};
|
|
37
|
+
endAnchor: {
|
|
38
|
+
mode: import('../../../store/types').EdgeAnchorMode;
|
|
39
|
+
position: [number, number] | undefined;
|
|
40
|
+
};
|
|
23
41
|
steps: import('../../../store/elements/EdgePoint').TSerializedEdgePoint[];
|
|
24
42
|
stroke: string | undefined;
|
|
25
43
|
strokeWidth: number | undefined;
|
|
@@ -36,7 +36,25 @@ export declare abstract class AgentNode<TPayload> extends EditableNode {
|
|
|
36
36
|
displacementEnd: [number, number] | undefined;
|
|
37
37
|
displacementStart: [number, number] | undefined;
|
|
38
38
|
lineStyle: import('../../../store/types').EdgeLineStyle | undefined;
|
|
39
|
-
|
|
39
|
+
labels: {
|
|
40
|
+
alignment: "right" | "left" | "center";
|
|
41
|
+
id: string;
|
|
42
|
+
size: {
|
|
43
|
+
height: number;
|
|
44
|
+
width: number;
|
|
45
|
+
};
|
|
46
|
+
text: string;
|
|
47
|
+
position: [number, number];
|
|
48
|
+
}[];
|
|
49
|
+
pathType: import('../../../store/types').EdgePathType;
|
|
50
|
+
startAnchor: {
|
|
51
|
+
mode: import('../../../store/types').EdgeAnchorMode;
|
|
52
|
+
position: [number, number] | undefined;
|
|
53
|
+
};
|
|
54
|
+
endAnchor: {
|
|
55
|
+
mode: import('../../../store/types').EdgeAnchorMode;
|
|
56
|
+
position: [number, number] | undefined;
|
|
57
|
+
};
|
|
40
58
|
steps: import('../../../store/elements/EdgePoint').TSerializedEdgePoint[];
|
|
41
59
|
stroke: string | undefined;
|
|
42
60
|
strokeWidth: number | undefined;
|
|
@@ -48,6 +66,7 @@ export declare abstract class AgentNode<TPayload> extends EditableNode {
|
|
|
48
66
|
}[];
|
|
49
67
|
fill: string | undefined;
|
|
50
68
|
labelFontSize: number | undefined;
|
|
69
|
+
labelOffset: [number, number] | undefined;
|
|
51
70
|
stroke: string | undefined;
|
|
52
71
|
strokewWidth: number | undefined;
|
|
53
72
|
class: string;
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { TDiagramSettings } from '../../store/Diagram';
|
|
2
2
|
import { EditableDiagram } from '../editable/EditableDiagram';
|
|
3
|
+
import { BPMNLabelOverrides, BPMNLabels } from './config/BPMNLabels';
|
|
4
|
+
export type BPMDiagramSettings = TDiagramSettings & {
|
|
5
|
+
labels?: BPMNLabelOverrides;
|
|
6
|
+
};
|
|
7
|
+
/** Configures the editable diagram with all supported BPMN nodes and extensions. */
|
|
3
8
|
export declare class BPMDiagram extends EditableDiagram {
|
|
4
|
-
constructor(settings?:
|
|
9
|
+
constructor(settings?: BPMDiagramSettings);
|
|
10
|
+
/** Exposes the isolated complete labels currently used by this BPMN diagram. */
|
|
11
|
+
get bpmnLabels(): BPMNLabels;
|
|
12
|
+
/** Replaces selected labels for this diagram while preserving prior overrides. */
|
|
13
|
+
configureLabels(overrides: BPMNLabelOverrides): void;
|
|
5
14
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { DChangeEvent } from '../../store/elements/Events';
|
|
2
|
-
|
|
2
|
+
/** Records BPMN lane mutations so history can undo and redo each completed gesture. */
|
|
3
|
+
export declare class BPMNLaneChangeEvent extends DChangeEvent {
|
|
3
4
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Node } from '../../../store/elements/Node';
|
|
2
|
+
import { BPMNIconId } from '../ui/BPMNIcon';
|
|
3
|
+
export type BPMNElementFamily = "task" | "event" | "gateway" | "lane" | "data" | "artifact";
|
|
4
|
+
export type BPMNElementId = Exclude<BPMNIconId, "transform" | "connect" | "settings">;
|
|
5
|
+
export type BPMNElementDefinition = {
|
|
6
|
+
id: BPMNElementId;
|
|
7
|
+
family: BPMNElementFamily;
|
|
8
|
+
section: "activities" | "events" | "gateways" | "support";
|
|
9
|
+
priority: number;
|
|
10
|
+
enabled: boolean;
|
|
11
|
+
connectable: boolean;
|
|
12
|
+
};
|
|
13
|
+
export declare const BPMN_ELEMENTS: readonly BPMNElementDefinition[];
|
|
14
|
+
/** Provides the shared BPMN element registry, construction, and type mutation API. */
|
|
15
|
+
export declare class BPMNElementCatalog {
|
|
16
|
+
/** Returns enabled definitions in configured priority and declaration order. */
|
|
17
|
+
static enabled(): BPMNElementDefinition[];
|
|
18
|
+
/** Resolves the stable catalog definition represented by a concrete diagram node. */
|
|
19
|
+
static forNode(node: Node): BPMNElementDefinition | undefined;
|
|
20
|
+
/** Resolves the stable catalog identifier represented by a concrete diagram node. */
|
|
21
|
+
static idForNode(node: Node): BPMNElementId | undefined;
|
|
22
|
+
/** Creates an unmounted node for the requested catalog element identifier. */
|
|
23
|
+
static create(id: BPMNElementId, nodeId: string, label: string): Node;
|
|
24
|
+
/** Mutates a node to another enabled variant in the same semantic family. */
|
|
25
|
+
static transform(node: Node, targetId: BPMNElementId): boolean;
|
|
26
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type BPMNLabels = {
|
|
2
|
+
sections: Record<"activities" | "events" | "gateways" | "support", string>;
|
|
3
|
+
elements: Record<string, string>;
|
|
4
|
+
eventOptions: Record<"none" | "start" | "intermediate" | "end" | "catch" | "throw", string>;
|
|
5
|
+
actions: Record<"transform" | "connect" | "settings" | "close" | "delete" | "reverseDirection" | "resize" | "resizeElement", string>;
|
|
6
|
+
properties: Record<"title" | "name" | "type" | "condition" | "defaultFlow" | "directed" | "edgeType" | "routingType" | "eventType" | "eventStage" | "eventDirection" | "interrupting" | "subprocessStart" | "eventSubprocessStartType" | "loop" | "multiInstance", string>;
|
|
7
|
+
edges: Record<string, string>;
|
|
8
|
+
routing: Record<"orthogonal" | "straight" | "curved", string>;
|
|
9
|
+
inputs: Record<"blackBoxPoolName" | "documentAnnotationText" | "elementSearch" | "laneName", string>;
|
|
10
|
+
resizeDirections: Record<"n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw", string>;
|
|
11
|
+
lanes: Record<"defaultLane" | "pool" | "rename" | "insertBefore" | "subdivide" | "removeSubdivision" | "removeLane" | "insertAfter", string>;
|
|
12
|
+
};
|
|
13
|
+
export type BPMNLabelOverrides = {
|
|
14
|
+
sections?: Partial<BPMNLabels["sections"]>;
|
|
15
|
+
elements?: Record<string, string>;
|
|
16
|
+
eventOptions?: Partial<BPMNLabels["eventOptions"]>;
|
|
17
|
+
actions?: Partial<BPMNLabels["actions"]>;
|
|
18
|
+
properties?: Partial<BPMNLabels["properties"]>;
|
|
19
|
+
edges?: Record<string, string>;
|
|
20
|
+
routing?: Partial<BPMNLabels["routing"]>;
|
|
21
|
+
inputs?: Partial<BPMNLabels["inputs"]>;
|
|
22
|
+
resizeDirections?: Partial<BPMNLabels["resizeDirections"]>;
|
|
23
|
+
lanes?: Partial<BPMNLabels["lanes"]>;
|
|
24
|
+
};
|
|
25
|
+
export declare const BPMN_LABELS: BPMNLabels;
|
|
26
|
+
/** Creates an isolated complete label object without mutating shared defaults. */
|
|
27
|
+
export declare function configureBPMNLabels(overrides?: BPMNLabelOverrides, base?: BPMNLabels): BPMNLabels;
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { Edge } from '../../../store/elements/Edge';
|
|
2
|
+
import { EdgeRouterAnchor } from '../../../store/routers/EdgesRouter';
|
|
3
|
+
import { TEdgeState } from '../../../store/types';
|
|
4
|
+
export type BPMNEdgeKind = "sequenceFlow" | "messageFlow" | "inputDataAssociation" | "outputDataAssociation" | "association";
|
|
5
|
+
type BPMNEdgeState = TEdgeState & {
|
|
6
|
+
kind?: BPMNEdgeKind;
|
|
7
|
+
condition?: string;
|
|
8
|
+
isDefault?: boolean;
|
|
9
|
+
isDirected?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/** Stores BPMN connection semantics independently from generic edge routing. */
|
|
12
|
+
export declare class BPMNEdge extends Edge {
|
|
13
|
+
kind: BPMNEdgeKind;
|
|
14
|
+
condition: string;
|
|
15
|
+
private defaultFlow;
|
|
16
|
+
private directedFlow;
|
|
17
|
+
get isDefault(): boolean;
|
|
18
|
+
get isDirected(): boolean;
|
|
19
|
+
/** Reports whether this BPMN connection exposes an editable direction marker. */
|
|
20
|
+
get supportsDirection(): boolean;
|
|
21
|
+
get supportsDefaultFlow(): boolean;
|
|
22
|
+
constructor(parent: ConstructorParameters<typeof Edge>[0], state: BPMNEdgeState);
|
|
23
|
+
/** Infers the legal BPMN connection type for two concrete endpoint nodes. */
|
|
24
|
+
static inferKind(from: unknown, to: unknown): BPMNEdgeKind | null;
|
|
25
|
+
/** Updates connection semantics and reapplies the standard BPMN edge styling. */
|
|
26
|
+
setKind(kind: BPMNEdgeKind): void;
|
|
27
|
+
/** Applies a legal default marker and clears every sibling default branch. */
|
|
28
|
+
setDefault(isDefault: boolean): boolean;
|
|
29
|
+
/** Toggles the target marker for every BPMN connection supporting direction. */
|
|
30
|
+
setDirected(isDirected: boolean): boolean;
|
|
31
|
+
/** Revalidates default-flow legality after either endpoint is reconnected. */
|
|
32
|
+
applyResolvedAnchors(start: EdgeRouterAnchor, end: EdgeRouterAnchor): void;
|
|
33
|
+
/** Reverses both BPMN endpoints while preserving the complete routed path geometry. */
|
|
34
|
+
reverseDirection(): void;
|
|
35
|
+
private clearOtherDefaultFlows;
|
|
36
|
+
private applyStyle;
|
|
37
|
+
/** Serializes BPMN-specific properties in addition to generic routed edge state. */
|
|
38
|
+
serialize(): {
|
|
39
|
+
kind: BPMNEdgeKind;
|
|
40
|
+
condition: string;
|
|
41
|
+
isDefault: boolean;
|
|
42
|
+
isDirected: boolean;
|
|
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
|
+
labels: {
|
|
49
|
+
alignment: "right" | "left" | "center";
|
|
50
|
+
id: string;
|
|
51
|
+
size: {
|
|
52
|
+
height: number;
|
|
53
|
+
width: number;
|
|
54
|
+
};
|
|
55
|
+
text: string;
|
|
56
|
+
position: [number, number];
|
|
57
|
+
}[];
|
|
58
|
+
pathType: import('../../../store/types').EdgePathType;
|
|
59
|
+
startAnchor: {
|
|
60
|
+
mode: import('../../../store/types').EdgeAnchorMode;
|
|
61
|
+
position: [number, number] | undefined;
|
|
62
|
+
};
|
|
63
|
+
endAnchor: {
|
|
64
|
+
mode: import('../../../store/types').EdgeAnchorMode;
|
|
65
|
+
position: [number, number] | undefined;
|
|
66
|
+
};
|
|
67
|
+
steps: import('../../../store/elements/EdgePoint').TSerializedEdgePoint[];
|
|
68
|
+
stroke: string | undefined;
|
|
69
|
+
strokeWidth: number | undefined;
|
|
70
|
+
to: string;
|
|
71
|
+
toParentId: string;
|
|
72
|
+
class: string;
|
|
73
|
+
};
|
|
74
|
+
/** Restores the required current BPMN edge contract without legacy fallbacks. */
|
|
75
|
+
deserialize(o: ReturnType<this["serialize"]>): void;
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Diagram } from '../../../store/Diagram';
|
|
2
|
+
import { Node } from '../../../store/elements/Node';
|
|
3
|
+
import { BPMNElementId } from '../config/BPMNElementCatalog';
|
|
4
|
+
/** Replaces an annotation node while retaining its identity, state, and connected edges. */
|
|
5
|
+
export declare function transformBPMNArtifact(diagram: Diagram, node: Node, targetId: BPMNElementId): Node | null;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { DiagramExtension } from '../../../store/extensions/DiagramExtension';
|
|
2
|
+
/** Constrains attached and subprocess-start events throughout their lifecycle. */
|
|
3
|
+
export declare class BPMNEventAttachments extends DiagramExtension {
|
|
4
|
+
private draggedEventIds;
|
|
5
|
+
/** Registers attachment projection after generic alignment and grid constraints. */
|
|
6
|
+
init(): void;
|
|
7
|
+
private attachedEvents;
|
|
8
|
+
private subprocessEvents;
|
|
9
|
+
private handleDrag;
|
|
10
|
+
private clearDropPresentations;
|
|
11
|
+
private presentDropTarget;
|
|
12
|
+
private findInternalDropTarget;
|
|
13
|
+
private findAttachmentDropTarget;
|
|
14
|
+
private constrainAttachedEvent;
|
|
15
|
+
private constrainSubprocessEvent;
|
|
16
|
+
private moveAttachedEvents;
|
|
17
|
+
private finishEventDrags;
|
|
18
|
+
private findDropTask;
|
|
19
|
+
}
|
|
@@ -7,13 +7,15 @@ type TBPMNResize = {
|
|
|
7
7
|
height: number;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* Applies BPMN-specific
|
|
10
|
+
* Applies BPMN-specific node positioning and lane resizing constraints to the grid.
|
|
11
11
|
*/
|
|
12
12
|
export declare class BPMNGridSnap extends DiagramExtension {
|
|
13
13
|
/** Initializes the extension, whose resize constraints are invoked by BPMN tools. */
|
|
14
14
|
init(): void;
|
|
15
|
+
private snapOneGridNodes;
|
|
15
16
|
/** Applies minimum sizes and optional grid snapping to a BPMN lane resize. */
|
|
16
|
-
resize(lanes: Lanes, resize: TBPMNResize):
|
|
17
|
+
resize(lanes: Lanes, resize: TBPMNResize): boolean;
|
|
18
|
+
private snapGrowingEdge;
|
|
17
19
|
private constrain;
|
|
18
20
|
private getLaneSuggestions;
|
|
19
21
|
private getHorizontalLaneSuggestions;
|
|
@@ -11,7 +11,7 @@ export declare class BPMNLaneResizer extends DiagramExtension {
|
|
|
11
11
|
init(): void;
|
|
12
12
|
/** Starts resizing the complete lane container from its right-side handle. */
|
|
13
13
|
resizeWidth(lanes: Lanes, event: MouseEvent): void;
|
|
14
|
-
/** Starts resizing one BPMN lane from its horizontal lower-edge handle. */
|
|
14
|
+
/** Starts resizing one BPMN lane from its horizontal lower-edge drag handle. */
|
|
15
15
|
resizeHeight(lanes: Lanes, laneId: string, initialHeight: number, event: MouseEvent): void;
|
|
16
16
|
private startSession;
|
|
17
17
|
private handleMouseMove;
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { MouseEvent as ReactMouseEvent } from 'react';
|
|
2
|
+
import { Edge } from '../../../store/elements/Edge';
|
|
3
|
+
import { Node } from '../../../store/elements/Node';
|
|
4
|
+
import { DiagramExtension } from '../../../store/extensions/DiagramExtension';
|
|
5
|
+
import { EdgePathType } from '../../../store/types';
|
|
6
|
+
import { BPMNElementDefinition, BPMNElementId } from '../config/BPMNElementCatalog';
|
|
7
|
+
import { BPMNLabelOverrides, BPMNLabels } from '../config/BPMNLabels';
|
|
8
|
+
import { BPMNEdge, BPMNEdgeKind } from '../edges/BPMNEdge';
|
|
9
|
+
import { EventNode, EventDirection, EventKind, EventStage } from '../nodes/EventNode';
|
|
10
|
+
import { TaskNode, TaskMultiInstance } from '../nodes/TaskNode';
|
|
11
|
+
/** Coordinates BPMN catalog transformations, inferred edges, and extension UI. */
|
|
12
|
+
export declare class BPMNModelerExtension extends DiagramExtension {
|
|
13
|
+
dragging: boolean;
|
|
14
|
+
propertiesPanelOpen: boolean;
|
|
15
|
+
RenderDiagram: (({ diagram, extension }: import('../../../store/extensions/DiagramExtension').TDiagramExtensionRenderProps<BPMNModelerExtension>) => import("react").JSX.Element | null) & {
|
|
16
|
+
displayName: string;
|
|
17
|
+
};
|
|
18
|
+
RenderUI: (({ diagram, extension }: import('../../../store/extensions/DiagramExtension').TDiagramExtensionRenderProps<BPMNModelerExtension>) => import("react").JSX.Element) & {
|
|
19
|
+
displayName: string;
|
|
20
|
+
};
|
|
21
|
+
private labelConfiguration;
|
|
22
|
+
/** Returns this diagram's isolated labels, or defaults for legacy probes. */
|
|
23
|
+
get labels(): BPMNLabels;
|
|
24
|
+
/** Merges label overrides into this diagram without changing global defaults. */
|
|
25
|
+
configureLabels(overrides: BPMNLabelOverrides): void;
|
|
26
|
+
/** Registers semantic edge support and guards invalid drag-created connections. */
|
|
27
|
+
init(): void;
|
|
28
|
+
/** Returns legal enabled transformations that preserve current connections. */
|
|
29
|
+
transformTargets(node: Node): BPMNElementDefinition[];
|
|
30
|
+
/** Returns transform choices in stable catalog order including the current type. */
|
|
31
|
+
shapeOptions(node: Node): BPMNElementDefinition[];
|
|
32
|
+
/** Changes a node variant through the shared catalog and emits history state. */
|
|
33
|
+
transform(node: Node, targetId: BPMNElementId): boolean;
|
|
34
|
+
/** Returns enabled target elements that form a legal outgoing BPMN connection. */
|
|
35
|
+
connectionTargets(node: Node): BPMNElementDefinition[];
|
|
36
|
+
private inferDefinitionKind;
|
|
37
|
+
/** Creates and connects a catalog node at the nearest collision-free position. */
|
|
38
|
+
appendConnected(node: Node, targetId: BPMNElementId): Node | null;
|
|
39
|
+
private nearestAvailablePosition;
|
|
40
|
+
private placementDirectionRank;
|
|
41
|
+
/** Starts an automatic outgoing connection from the toolbar of a selected node. */
|
|
42
|
+
startToolbarConnection(node: Node, event: ReactMouseEvent): void;
|
|
43
|
+
/** Reports whether the interactive connector should replace selection UI. */
|
|
44
|
+
get connecting(): boolean;
|
|
45
|
+
/** Updates a selected node label and records the mutation in diagram history. */
|
|
46
|
+
renameNode(node: Node, label: string): void;
|
|
47
|
+
private acceptsEventDefinition;
|
|
48
|
+
/** Lists event kinds available without invalidating an existing attachment. */
|
|
49
|
+
eventKindOptions(node: EventNode): EventKind[];
|
|
50
|
+
private eventDefinitionForKind;
|
|
51
|
+
/** Changes only the kind and normalizes independently unsupported dimensions. */
|
|
52
|
+
changeEventKind(node: EventNode, kind: EventKind): boolean;
|
|
53
|
+
/** Lists valid stages while preserving the independently selected direction. */
|
|
54
|
+
eventStageOptions(node: EventNode): EventStage[];
|
|
55
|
+
/** Lists valid directions while preserving the independently selected stage. */
|
|
56
|
+
eventDirectionOptions(node: EventNode): EventDirection[];
|
|
57
|
+
/** Changes an event stage without modifying the independently chosen direction. */
|
|
58
|
+
changeEventStage(node: EventNode, stage: EventStage): boolean;
|
|
59
|
+
/** Changes whether the current event catches or throws its configured trigger. */
|
|
60
|
+
changeEventDirection(node: EventNode, direction: EventDirection): boolean;
|
|
61
|
+
/** Toggles whether an attached boundary event interrupts its owning task. */
|
|
62
|
+
changeEventInterrupting(node: EventNode, interrupting: boolean): void;
|
|
63
|
+
private eventSubprocessStart;
|
|
64
|
+
private containedEventCandidate;
|
|
65
|
+
/** Returns the concrete start-event kind configured by an event subprocess. */
|
|
66
|
+
eventSubprocessStartKind(node: TaskNode): EventKind | "";
|
|
67
|
+
/** Creates or updates the movable internal start event selected on its owner. */
|
|
68
|
+
changeEventSubprocessStartKind(node: TaskNode, kind: EventKind): EventNode | null;
|
|
69
|
+
/** Changes the activity multi-instance marker while recording one property mutation. */
|
|
70
|
+
changeTaskMultiInstance(node: TaskNode, multiInstance: TaskMultiInstance): boolean;
|
|
71
|
+
/** Toggles a task's standard conditional loop and records the property change. */
|
|
72
|
+
changeTaskLoop(node: TaskNode, loop: boolean): boolean;
|
|
73
|
+
/** Updates a selected edge label and records the mutation in diagram history. */
|
|
74
|
+
renameEdge(edge: Edge, label: string): void;
|
|
75
|
+
/** Returns only edge kinds that preserve all endpoint-specific BPMN constraints. */
|
|
76
|
+
edgeKindOptions(edge: BPMNEdge): BPMNEdgeKind[];
|
|
77
|
+
/** Updates a BPMN edge kind and refreshes its visual connection convention. */
|
|
78
|
+
changeEdgeKind(edge: BPMNEdge, kind: BPMNEdgeKind): void;
|
|
79
|
+
/** Reverses one BPMN edge while retaining its route and emitting a history change. */
|
|
80
|
+
reverseEdge(edge: BPMNEdge): void;
|
|
81
|
+
/** Changes one BPMN edge routing strategy while preserving history integration. */
|
|
82
|
+
changeEdgePathType(edge: BPMNEdge, pathType: EdgePathType): void;
|
|
83
|
+
/** Updates the conditional expression associated with a sequence flow edge. */
|
|
84
|
+
changeEdgeCondition(edge: BPMNEdge, condition: string): void;
|
|
85
|
+
/** Toggles a legal gateway default while preserving source-wide exclusivity. */
|
|
86
|
+
changeEdgeDefault(edge: BPMNEdge, isDefault: boolean): boolean;
|
|
87
|
+
/** Toggles an eligible edge target marker and records the semantic history change. */
|
|
88
|
+
changeEdgeDirected(edge: BPMNEdge, isDirected: boolean): void;
|
|
89
|
+
/** Returns whether this edge can be the default of an exclusive or inclusive gateway. */
|
|
90
|
+
supportsDefaultFlow(edge: BPMNEdge): boolean;
|
|
91
|
+
/** Returns whether sequence-flow conditions are meaningful for this source. */
|
|
92
|
+
supportsCondition(edge: BPMNEdge): boolean;
|
|
93
|
+
/** Toggles the properties inspector and persists its current preference locally. */
|
|
94
|
+
togglePropertiesPanel(): void;
|
|
95
|
+
/** Closes the properties inspector and persists its disabled preference locally. */
|
|
96
|
+
closePropertiesPanel(): void;
|
|
97
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { DiagramExtension } from '../../../store/extensions/DiagramExtension';
|
|
2
|
+
import { Coordinates } from '../../../store/primitives/Coordinates';
|
|
3
|
+
import { Dimensions } from '../../../store/primitives/Dimensions';
|
|
4
|
+
import { BPMNode } from '../nodes/BPMNode';
|
|
5
|
+
export type BPMNResizableNode = BPMNode & {
|
|
6
|
+
readonly minimumResizeSize: Coordinates;
|
|
7
|
+
};
|
|
8
|
+
export type BPMNResizeDirection = "n" | "ne" | "e" | "se" | "s" | "sw" | "w" | "nw";
|
|
9
|
+
/** Owns opt-in BPMN node resize sessions with grid, bounds, and edge updates. */
|
|
10
|
+
export declare class BPMNNodeResizer extends DiagramExtension {
|
|
11
|
+
private readonly autopan;
|
|
12
|
+
private session;
|
|
13
|
+
private unbindSession;
|
|
14
|
+
/** Initializes the imperative extension consumed by resizable BPMN renderers. */
|
|
15
|
+
init(): void;
|
|
16
|
+
/** Starts a directional resize gesture safely from any side or corner handle. */
|
|
17
|
+
startResize(node: BPMNResizableNode, event: PointerEvent, direction: BPMNResizeDirection): void;
|
|
18
|
+
/** Applies a constrained size immediately and reroutes every connected edge. */
|
|
19
|
+
resizeNode(node: BPMNResizableNode, size: Coordinates | [number, number]): boolean;
|
|
20
|
+
/** Resizes from one handle while keeping the opposite sides anchored in place. */
|
|
21
|
+
resizeNodeFromDirection(node: BPMNResizableNode, initialBox: Dimensions, direction: BPMNResizeDirection, delta: Coordinates): boolean;
|
|
22
|
+
private snapDirectionalBoxToGrid;
|
|
23
|
+
private snapCoordinate;
|
|
24
|
+
private applyBox;
|
|
25
|
+
private constrain;
|
|
26
|
+
private rerouteConnectedEdges;
|
|
27
|
+
private handlePointerMove;
|
|
28
|
+
private handleAutopan;
|
|
29
|
+
private resizeFromPointer;
|
|
30
|
+
private endSession;
|
|
31
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { DiagramExtension } from '../../../store/extensions/DiagramExtension';
|
|
2
|
+
import { AlignmentGuide } from '../../../store/extensions/NodesAligner';
|
|
3
|
+
import { Coordinates } from '../../../store/primitives/Coordinates';
|
|
4
|
+
import { Dimensions } from '../../../store/primitives/Dimensions';
|
|
5
|
+
import { BPMNode } from '../nodes/BPMNode';
|
|
6
|
+
import { BPMNResizeDirection } from './BPMNNodeResizer';
|
|
7
|
+
/** Suggests BPMN resize stops that match peer dimensions and corresponding sides. */
|
|
8
|
+
export declare class BPMNResizeSuggester extends DiagramExtension {
|
|
9
|
+
alignmentProposals: AlignmentGuide[];
|
|
10
|
+
/** Initializes the observable guide collection used by the diagram overlay. */
|
|
11
|
+
init(): void;
|
|
12
|
+
/** Removes all transient guides when a resize gesture finishes or restarts. */
|
|
13
|
+
clear(): void;
|
|
14
|
+
/** Returns the best snapped box while publishing every associated visual guide. */
|
|
15
|
+
suggest(node: BPMNode, box: Dimensions, direction: BPMNResizeDirection, fallback?: Dimensions, minimumResizeSize?: Coordinates): Dimensions;
|
|
16
|
+
private sideCandidate;
|
|
17
|
+
private widthCandidate;
|
|
18
|
+
private candidate;
|
|
19
|
+
private isValid;
|
|
20
|
+
private verticalGuide;
|
|
21
|
+
private horizontalGuide;
|
|
22
|
+
private widthGuides;
|
|
23
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** Stable compatibility codes used by persisted diagrams and catalog transforms. */
|
|
2
|
+
export declare enum EventTypes {
|
|
3
|
+
start = 0,
|
|
4
|
+
end = 1,
|
|
5
|
+
intermediate = 2,
|
|
6
|
+
timer = 3,
|
|
7
|
+
messageCatch = 4,
|
|
8
|
+
messageThrow = 5,
|
|
9
|
+
signalCatch = 6,
|
|
10
|
+
signalThrow = 7,
|
|
11
|
+
compensationCatch = 8,
|
|
12
|
+
compensationThrow = 9,
|
|
13
|
+
errorCatch = 10,
|
|
14
|
+
errorThrow = 11,
|
|
15
|
+
conditional = 12,
|
|
16
|
+
terminate = 13
|
|
17
|
+
}
|
|
18
|
+
export type EventStage = "start" | "intermediate" | "end";
|
|
19
|
+
export type EventKind = "none" | "timer" | "message" | "signal" | "compensation" | "error" | "conditional" | "terminate";
|
|
20
|
+
export type EventDirection = "catch" | "throw";
|
|
21
|
+
export type EventDefinition = Readonly<{
|
|
22
|
+
stage: EventStage;
|
|
23
|
+
kind: EventKind;
|
|
24
|
+
direction: EventDirection;
|
|
25
|
+
}>;
|
|
26
|
+
export declare const EVENT_DEFINITION_BY_TYPE: Readonly<Record<EventTypes, EventDefinition>>;
|
|
27
|
+
/** Validates the complete event tuple against the supported BPMN combinations. */
|
|
28
|
+
export declare function isValidEventDefinition(value: unknown): value is EventDefinition;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
import { Diagram } from '../../../store/Diagram';
|
|
1
2
|
import { Element } from '../../../store/elements/Element';
|
|
2
3
|
import { TNodeConstructorProps } from '../../../store/elements/Node';
|
|
3
4
|
import { EditableNode } from '../../editable/EditableNode';
|
|
5
|
+
/** Provides shared BPMN sizing, typography, and connection-boundary behavior. */
|
|
4
6
|
export declare abstract class BPMNode extends EditableNode {
|
|
7
|
+
edgesAsGateways: boolean;
|
|
8
|
+
protected occupiesGridSquare: boolean;
|
|
5
9
|
constructor(parent: Element | null, state: TNodeConstructorProps);
|
|
10
|
+
protected fitToGridSquare(): void;
|
|
11
|
+
/** Attaches the node and reapplies any geometry tied to the active grid size. */
|
|
12
|
+
setDiagram(diagram: Diagram): void;
|
|
13
|
+
/** Restores shared state while enforcing current typography and grid geometry. */
|
|
14
|
+
deserialize(o: ReturnType<this["serialize"]>): void;
|
|
6
15
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Element } from '../../../store/elements/Element';
|
|
2
|
+
import { TNodeConstructorProps, TNodeScreenRenderProps } from '../../../store/elements/Node';
|
|
3
|
+
import { Coordinates } from '../../../store/primitives/Coordinates';
|
|
4
|
+
import { BPMNResizableNode } from '../extensions/BPMNNodeResizer';
|
|
5
|
+
import { BPMNode } from './BPMNode';
|
|
6
|
+
/** Models an external BPMN participant whose internal process remains hidden. */
|
|
7
|
+
export declare class BlackBoxPoolNode extends BPMNode implements BPMNResizableNode {
|
|
8
|
+
readonly minimumResizeSize: Coordinates;
|
|
9
|
+
edgesAsGateways: boolean;
|
|
10
|
+
constructor(parent: Element | null, state: TNodeConstructorProps);
|
|
11
|
+
RenderScreen: (({ node }: TNodeScreenRenderProps<BlackBoxPoolNode>) => import("react").JSX.Element) & {
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
RenderOverlay: (() => import("react").JSX.Element) & {
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Element } from '../../../store/elements/Element';
|
|
2
|
+
import { TNodeConstructorProps } from '../../../store/elements/Node';
|
|
3
|
+
import { Dimensions } from '../../../store/primitives/Dimensions';
|
|
4
|
+
import { BPMNode } from './BPMNode';
|
|
5
|
+
/** Models persistent information storage used through directional BPMN associations. */
|
|
6
|
+
export declare class DataStoreNode extends BPMNode {
|
|
7
|
+
requiredEdgePathType: "straight";
|
|
8
|
+
protected occupiesGridSquare: boolean;
|
|
9
|
+
constructor(parent: Element | null, state: TNodeConstructorProps);
|
|
10
|
+
protected get screenLabelBox(): Dimensions;
|
|
11
|
+
RenderOverlay: (() => import("react").JSX.Element) & {
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
}
|