@bpmn-nova/studio 0.3.0-preview → 0.3.2-preview
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/README.md +245 -20
- package/dist/canvas.js +7 -4
- package/dist/context-menu.js +2 -2
- package/dist/controller.js +84 -6
- package/dist/index.d.ts +138 -38
- package/dist/index.js +12 -11
- package/dist/interactions.js +1 -1
- package/dist/modules/bpmn-model/index.d.ts +11 -0
- package/dist/modules/bpmn-model/index.js +703 -0
- package/dist/modules/core/containment.js +590 -0
- package/dist/modules/core/gateway.js +72 -0
- package/dist/modules/core/history.js +32 -0
- package/dist/modules/core/index.d.ts +268 -0
- package/dist/modules/core/index.js +7 -0
- package/dist/modules/core/layout.js +644 -0
- package/dist/modules/core/model.js +287 -0
- package/dist/modules/core/runtime-transition-route.js +360 -0
- package/dist/modules/core/scope.js +99 -0
- package/dist/modules/designer/index.d.ts +79 -0
- package/dist/modules/designer/index.js +607 -0
- package/dist/modules/engine-activiti/index.d.ts +19 -0
- package/dist/modules/engine-activiti/index.js +160 -0
- package/dist/modules/engine-flowable/index.d.ts +19 -0
- package/dist/modules/engine-flowable/index.js +160 -0
- package/dist/modules/export-svg/index.d.ts +112 -0
- package/dist/modules/export-svg/index.js +2 -0
- package/dist/modules/export-svg/preview.js +327 -0
- package/dist/modules/export-svg/render.js +718 -0
- package/dist/modules/icons/index.d.ts +24 -0
- package/dist/modules/icons/index.js +264 -0
- package/dist/modules/palette/index.d.ts +74 -0
- package/dist/modules/palette/index.js +99 -0
- package/dist/modules/palette/panel.js +99 -0
- package/dist/modules/properties/index.d.ts +20 -0
- package/dist/modules/properties/index.js +19 -0
- package/dist/modules/properties-activiti/index.d.ts +3 -0
- package/dist/modules/properties-activiti/index.js +97 -0
- package/dist/modules/properties-bpmn/index.d.ts +3 -0
- package/dist/modules/properties-bpmn/index.js +518 -0
- package/dist/modules/properties-core/index.d.ts +124 -0
- package/dist/modules/properties-core/index.js +312 -0
- package/dist/modules/properties-flowable/index.d.ts +3 -0
- package/dist/modules/properties-flowable/index.js +114 -0
- package/dist/modules/properties-renderer/index.d.ts +25 -0
- package/dist/modules/properties-renderer/index.js +491 -0
- package/dist/modules/renderer-svg/index.d.ts +118 -0
- package/dist/modules/renderer-svg/index.js +1460 -0
- package/dist/modules/runtime/index.d.ts +169 -0
- package/dist/modules/runtime/index.js +535 -0
- package/dist/modules/theme/index.d.ts +95 -0
- package/dist/modules/theme/index.js +368 -0
- package/dist/modules/viewer/index.d.ts +265 -0
- package/dist/modules/viewer/index.js +1011 -0
- package/dist/modules/viewer/runtime-content.js +123 -0
- package/dist/modules/viewer/runtime-details-motion.js +228 -0
- package/dist/modules/viewer/runtime-trace.js +574 -0
- package/dist/modules/viewer/timeline.js +276 -0
- package/dist/selection-layout.js +1 -1
- package/dist/shell.js +210 -26
- package/dist/styles.css +116 -7
- package/llms-full.txt +3082 -0
- package/llms.txt +225 -0
- package/package.json +39 -16
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
export type EngineId = 'flowable' | 'activiti'
|
|
2
|
+
export type NodeType =
|
|
3
|
+
| 'startEvent' | 'messageStartEvent' | 'timerStartEvent' | 'conditionalStartEvent' | 'signalStartEvent' | 'errorStartEvent' | 'escalationStartEvent' | 'compensationStartEvent'
|
|
4
|
+
| 'intermediateCatchEvent' | 'messageIntermediateCatchEvent' | 'timerIntermediateCatchEvent' | 'conditionalIntermediateCatchEvent' | 'signalIntermediateCatchEvent' | 'linkIntermediateCatchEvent'
|
|
5
|
+
| 'intermediateThrowEvent' | 'messageIntermediateThrowEvent' | 'escalationIntermediateThrowEvent' | 'signalIntermediateThrowEvent' | 'linkIntermediateThrowEvent' | 'compensationIntermediateThrowEvent'
|
|
6
|
+
| 'timerBoundaryEvent' | 'messageBoundaryEvent' | 'errorBoundaryEvent' | 'escalationBoundaryEvent' | 'signalBoundaryEvent' | 'conditionalBoundaryEvent' | 'compensationBoundaryEvent'
|
|
7
|
+
| 'endEvent' | 'messageEndEvent' | 'errorEndEvent' | 'escalationEndEvent' | 'cancelEndEvent' | 'compensationEndEvent' | 'signalEndEvent' | 'terminateEndEvent'
|
|
8
|
+
| 'task' | 'userTask' | 'manualTask' | 'serviceTask' | 'scriptTask' | 'businessRuleTask' | 'sendTask' | 'receiveTask' | 'callActivity'
|
|
9
|
+
| 'subProcess' | 'eventSubProcess' | 'transaction' | 'adHocSubProcess'
|
|
10
|
+
| 'exclusiveGateway' | 'parallelGateway' | 'inclusiveGateway' | 'eventBasedGateway' | 'complexGateway'
|
|
11
|
+
| 'dataObjectReference' | 'dataStoreReference' | 'textAnnotation' | 'group' | 'participant' | 'lane'
|
|
12
|
+
|
|
13
|
+
export type EdgeType = 'sequenceFlow' | 'messageFlow' | 'association'
|
|
14
|
+
export type NodeKind = 'event' | 'boundary' | 'task' | 'container' | 'gateway' | 'data' | 'dataStore' | 'annotation' | 'group' | 'participant' | 'lane'
|
|
15
|
+
export type SwimlaneLabelPlacement = 'side' | 'top'
|
|
16
|
+
export interface Point { x: number; y: number }
|
|
17
|
+
export interface SelectionRect { x: number; y: number; width: number; height: number }
|
|
18
|
+
export interface ExtensionAttributeMap { [qualifiedName: string]: string }
|
|
19
|
+
|
|
20
|
+
export interface BpmnNodeProperties extends Record<string, unknown> {
|
|
21
|
+
extensionAttributes?: ExtensionAttributeMap
|
|
22
|
+
swimlaneLabelPlacement?: SwimlaneLabelPlacement
|
|
23
|
+
flowNodeRefs?: string[]
|
|
24
|
+
processRef?: string
|
|
25
|
+
attachedToRef?: string
|
|
26
|
+
categoryValue?: string
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface BpmnNode {
|
|
30
|
+
id: string
|
|
31
|
+
type: NodeType
|
|
32
|
+
bpmnType: string
|
|
33
|
+
name: string
|
|
34
|
+
x: number
|
|
35
|
+
y: number
|
|
36
|
+
width: number
|
|
37
|
+
height: number
|
|
38
|
+
scopeId?: string
|
|
39
|
+
containerId?: string
|
|
40
|
+
isExpanded?: boolean
|
|
41
|
+
properties: BpmnNodeProperties
|
|
42
|
+
unknownAttributes?: Array<{ name: string; value: string }>
|
|
43
|
+
extensionElements?: string[]
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface BpmnEdge {
|
|
47
|
+
id: string
|
|
48
|
+
type?: EdgeType
|
|
49
|
+
source: string
|
|
50
|
+
target: string
|
|
51
|
+
scopeId?: string
|
|
52
|
+
name?: string
|
|
53
|
+
condition?: string
|
|
54
|
+
isDefault?: boolean
|
|
55
|
+
waypoints?: Point[] | null
|
|
56
|
+
routeStyle?: 'rounded' | 'smooth' | 'straight'
|
|
57
|
+
cornerRadius?: number
|
|
58
|
+
properties?: Record<string, unknown> & { extensionAttributes?: ExtensionAttributeMap }
|
|
59
|
+
unknownAttributes?: Array<{ name: string; value: string }>
|
|
60
|
+
extensionElements?: string[]
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export type ElementSelection =
|
|
64
|
+
| { kind: 'process'; id: string }
|
|
65
|
+
| { kind: 'node' | 'edge'; id: string }
|
|
66
|
+
| { kind: 'multi'; items: Array<{ kind: 'node' | 'edge'; id: string }> }
|
|
67
|
+
|
|
68
|
+
export interface ProcessResource { id: string; name?: string }
|
|
69
|
+
export interface ProcessModel {
|
|
70
|
+
id: string
|
|
71
|
+
name: string
|
|
72
|
+
engine: EngineId
|
|
73
|
+
isExecutable: boolean
|
|
74
|
+
targetNamespace: string
|
|
75
|
+
namespaceDeclarations: Record<string, string>
|
|
76
|
+
properties: Record<string, unknown> & { extensionAttributes?: ExtensionAttributeMap }
|
|
77
|
+
resources: {
|
|
78
|
+
messages: ProcessResource[]
|
|
79
|
+
signals: ProcessResource[]
|
|
80
|
+
errors: Array<ProcessResource & { errorCode?: string }>
|
|
81
|
+
escalations: Array<ProcessResource & { escalationCode?: string }>
|
|
82
|
+
}
|
|
83
|
+
extensionElements?: string[]
|
|
84
|
+
nodes: BpmnNode[]
|
|
85
|
+
edges: BpmnEdge[]
|
|
86
|
+
settings?: {
|
|
87
|
+
direction?: 'horizontal' | 'vertical'
|
|
88
|
+
layoutDensity?: 'compact' | 'balanced' | 'spacious'
|
|
89
|
+
edgeStyle?: 'rounded' | 'smooth' | 'straight'
|
|
90
|
+
cornerRadius?: number
|
|
91
|
+
showGrid?: boolean
|
|
92
|
+
gridSize?: number
|
|
93
|
+
snapToGrid?: boolean
|
|
94
|
+
alignmentGuides?: boolean
|
|
95
|
+
alignmentThreshold?: number
|
|
96
|
+
mergeGatewayConnections?: boolean
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export interface NodeDefinition {
|
|
101
|
+
bpmnType: string
|
|
102
|
+
localName: string
|
|
103
|
+
label: string
|
|
104
|
+
icon: string
|
|
105
|
+
kind: NodeKind
|
|
106
|
+
width: number
|
|
107
|
+
height: number
|
|
108
|
+
palette?: string
|
|
109
|
+
eventStage?: 'start' | 'intermediate' | 'boundary' | 'end'
|
|
110
|
+
eventRole?: 'catch' | 'throw'
|
|
111
|
+
eventDefinition?: string | null
|
|
112
|
+
activityKind?: string
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export const NODE_DEFINITIONS: Record<NodeType | 'generic', NodeDefinition>
|
|
116
|
+
export const PALETTE_GROUPS: Array<{ id: string; label: string; types: NodeType[] }>
|
|
117
|
+
export const EDGE_DEFINITIONS: Record<EdgeType, { bpmnType: string; label: string }>
|
|
118
|
+
export function uid(prefix?: string): string
|
|
119
|
+
export function createNode(type: NodeType, x?: number, y?: number, overrides?: Partial<BpmnNode>): BpmnNode
|
|
120
|
+
export function createEdge(source: string, target: string, overrides?: Partial<BpmnEdge>): BpmnEdge
|
|
121
|
+
export function createEmptyProcess(engine?: EngineId): ProcessModel
|
|
122
|
+
export function cloneModel<T extends ProcessModel>(model: T): T
|
|
123
|
+
export function getNode(model: ProcessModel, id: string): BpmnNode | null
|
|
124
|
+
export function getEdge(model: ProcessModel, id: string): BpmnEdge | null
|
|
125
|
+
export function clearConnectedWaypoints(model: ProcessModel, nodeId: string): void
|
|
126
|
+
export function createSampleProcess(engine?: EngineId): ProcessModel
|
|
127
|
+
|
|
128
|
+
export class HistoryStack {
|
|
129
|
+
constructor(limit?: number)
|
|
130
|
+
readonly canUndo: boolean
|
|
131
|
+
readonly canRedo: boolean
|
|
132
|
+
capture(model: ProcessModel): void
|
|
133
|
+
undo(current: ProcessModel): ProcessModel | null
|
|
134
|
+
redo(current: ProcessModel): ProcessModel | null
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export interface SnapNodePositionOptions {
|
|
138
|
+
threshold?: number
|
|
139
|
+
disabled?: boolean
|
|
140
|
+
}
|
|
141
|
+
export interface AlignmentGuide {
|
|
142
|
+
orientation: 'horizontal' | 'vertical'
|
|
143
|
+
position: number
|
|
144
|
+
kind: 'center' | 'edge'
|
|
145
|
+
}
|
|
146
|
+
export interface SnapNodePositionResult { x: number; y: number; guides: AlignmentGuide[] }
|
|
147
|
+
export type NodeSide = 'top' | 'right' | 'bottom' | 'left'
|
|
148
|
+
export function smartAnchors(source: BpmnNode, target: BpmnNode): { sourceSide: NodeSide; targetSide: NodeSide }
|
|
149
|
+
export function snapNodePosition(model: ProcessModel, node: BpmnNode, x: number, y: number, options?: SnapNodePositionOptions): SnapNodePositionResult
|
|
150
|
+
export function edgeWaypoints(model: ProcessModel, edge: BpmnEdge): Point[]
|
|
151
|
+
export function roundedPath(points: Point[], radius?: number): string
|
|
152
|
+
export function smoothPath(points: Point[], radius?: number): string
|
|
153
|
+
export const LAYOUT_DENSITIES: Readonly<Record<'compact' | 'balanced' | 'spacious', Readonly<{ rankGap: number; nodeGap: number; label: string }>>>
|
|
154
|
+
export interface LayoutOptions {
|
|
155
|
+
direction?: 'horizontal' | 'vertical'
|
|
156
|
+
density?: 'compact' | 'balanced' | 'spacious'
|
|
157
|
+
compact?: boolean
|
|
158
|
+
startX?: number
|
|
159
|
+
startY?: number
|
|
160
|
+
rankGap?: number
|
|
161
|
+
nodeGap?: number
|
|
162
|
+
edgeStyle?: 'rounded' | 'smooth' | 'straight'
|
|
163
|
+
cornerRadius?: number
|
|
164
|
+
gridSize?: number
|
|
165
|
+
snapToGrid?: boolean
|
|
166
|
+
alignmentThreshold?: number
|
|
167
|
+
mergeGatewayConnections?: boolean
|
|
168
|
+
}
|
|
169
|
+
export function autoLayout(model: ProcessModel, options?: LayoutOptions): ProcessModel
|
|
170
|
+
export function beautify(model: ProcessModel, options?: LayoutOptions): ProcessModel
|
|
171
|
+
|
|
172
|
+
export const EMBEDDED_SUBPROCESS_TYPES: ReadonlySet<NodeType>
|
|
173
|
+
export function isEmbeddedSubProcess(nodeOrType: BpmnNode | NodeType | null | undefined): boolean
|
|
174
|
+
export function elementScopeId(model: ProcessModel, element?: BpmnNode | BpmnEdge | null): string
|
|
175
|
+
export function scopeExists(model: ProcessModel, scopeId: string): boolean
|
|
176
|
+
export type ScopeOwner = ProcessModel | BpmnNode
|
|
177
|
+
export function getScopeOwner(model: ProcessModel, scopeId: string): ScopeOwner | null
|
|
178
|
+
export function getParentScopeId(model: ProcessModel, scopeId: string): string | null
|
|
179
|
+
export function getScopePath(model: ProcessModel, scopeId?: string): Array<{ id: string; name: string; kind: 'process' | 'subProcess' }>
|
|
180
|
+
export function getScopeGraph(model: ProcessModel, scopeId?: string): ProcessModel
|
|
181
|
+
export function getDescendantScopeIds(model: ProcessModel, ownerId: string): string[]
|
|
182
|
+
export function hasScopeChildren(model: ProcessModel, ownerId: string): boolean
|
|
183
|
+
export interface ScopeIntegrityIssue {
|
|
184
|
+
kind: 'node' | 'edge'
|
|
185
|
+
id: string
|
|
186
|
+
scopeId: string
|
|
187
|
+
reason: 'missing-scope' | 'cyclic-scope' | 'cross-scope'
|
|
188
|
+
}
|
|
189
|
+
export function getScopeIntegrityIssues(model: ProcessModel): ScopeIntegrityIssue[]
|
|
190
|
+
|
|
191
|
+
export const CONTAINMENT_LIMITS: Readonly<{
|
|
192
|
+
groupMinWidth: 120; groupMinHeight: 80; groupPadding: 28
|
|
193
|
+
participantMinWidth: 320; participantMinHeight: 120
|
|
194
|
+
laneMinWidth: 240; laneMinHeight: 72; swimlaneTitleSize: 38
|
|
195
|
+
participantRailWidth: 38; participantContentPadding: 24
|
|
196
|
+
}>
|
|
197
|
+
export const SWIMLANE_LABEL_PLACEMENTS: Readonly<{ side: 'side'; top: 'top' }>
|
|
198
|
+
export type ContainmentOperation =
|
|
199
|
+
| { type: 'reconcile'; inferOwners?: boolean; normalize?: boolean }
|
|
200
|
+
| { type: 'attach-lane'; laneId: string; participantId: string; index?: number }
|
|
201
|
+
| { type: 'detach-lane'; laneId: string; x?: number; y?: number; preservePosition?: boolean }
|
|
202
|
+
| { type: 'reorder-lane'; laneId: string; index: number }
|
|
203
|
+
| { type: 'assign-node'; nodeId: string }
|
|
204
|
+
| { type: 'assign-all' }
|
|
205
|
+
| { type: 'move-container'; nodeId: string; dx: number; dy: number }
|
|
206
|
+
| { type: 'resize-container'; nodeId: string; bounds: SelectionRect }
|
|
207
|
+
| { type: 'resize-divider'; laneId: string; delta: number }
|
|
208
|
+
| { type: 'update-label-placement'; nodeId: string; previousPlacement: SwimlaneLabelPlacement }
|
|
209
|
+
| { type: 'prepare-remove'; nodeId: string }
|
|
210
|
+
export interface ContainmentResolution {
|
|
211
|
+
nodesById: Map<string, BpmnNode>
|
|
212
|
+
lanesByParticipant: Map<string, BpmnNode[]>
|
|
213
|
+
laneByNode: Map<string, BpmnNode>
|
|
214
|
+
getParticipantLanes(participantId: string): BpmnNode[]
|
|
215
|
+
getLaneForNode(nodeId: string): BpmnNode | null
|
|
216
|
+
getLaneAt(point: Point, excludedId?: string): BpmnNode | null
|
|
217
|
+
getParticipantAt(point: Point): BpmnNode | null
|
|
218
|
+
}
|
|
219
|
+
export function resolveSwimlaneLabelPlacement(model: ProcessModel, node: BpmnNode): SwimlaneLabelPlacement
|
|
220
|
+
export function getSwimlaneContentInsets(model: ProcessModel, node: BpmnNode): { top: number; right: number; bottom: number; left: number }
|
|
221
|
+
export function getSwimlaneContentBounds(model: ProcessModel, node: BpmnNode): SelectionRect
|
|
222
|
+
export function resolveContainment(model: ProcessModel): ContainmentResolution
|
|
223
|
+
export function applyContainmentOperation(model: ProcessModel, operation?: ContainmentOperation): { changed: boolean }
|
|
224
|
+
|
|
225
|
+
export interface GatewayRoleResolution {
|
|
226
|
+
declared: 'Unspecified' | 'Diverging' | 'Converging' | 'Mixed'
|
|
227
|
+
inferred: 'Unspecified' | 'Diverging' | 'Converging' | 'Mixed'
|
|
228
|
+
effective: 'Unspecified' | 'Diverging' | 'Converging' | 'Mixed'
|
|
229
|
+
incoming: BpmnEdge[]
|
|
230
|
+
outgoing: BpmnEdge[]
|
|
231
|
+
topologyComplete: boolean
|
|
232
|
+
status: 'valid' | 'incomplete' | 'conflict' | 'ambiguous'
|
|
233
|
+
issues: string[]
|
|
234
|
+
}
|
|
235
|
+
export const PARALLEL_GATEWAY_PRESETS: Readonly<Record<'diverging' | 'converging', Readonly<{ id: string; label: string; iconId: string; nodeType: 'parallelGateway'; preset: Partial<BpmnNode> }>>>
|
|
236
|
+
export function resolveGatewayRole(model: ProcessModel, node: BpmnNode): GatewayRoleResolution
|
|
237
|
+
export function validateParallelGateway(model: ProcessModel, node: BpmnNode): string[]
|
|
238
|
+
|
|
239
|
+
export interface RuntimeTransitionRouteOptions {
|
|
240
|
+
occupiedRoutes?: Array<Point[] | { points: Point[] }>
|
|
241
|
+
obstacles?: SelectionRect[]
|
|
242
|
+
labelSize?: { width: number; height: number }
|
|
243
|
+
nodeClearance?: number
|
|
244
|
+
laneGap?: number
|
|
245
|
+
laneSpacing?: number
|
|
246
|
+
nearParallelDistance?: number
|
|
247
|
+
anchorOverlapTolerance?: number
|
|
248
|
+
maxLanesPerSide?: number
|
|
249
|
+
}
|
|
250
|
+
export interface RuntimeTransitionRoute {
|
|
251
|
+
points: Point[]
|
|
252
|
+
labelPoint: Point
|
|
253
|
+
direction: 'horizontal' | 'vertical'
|
|
254
|
+
laneSide: 'top' | 'bottom' | 'left' | 'right'
|
|
255
|
+
laneIndex: number
|
|
256
|
+
sourceSide: 'top' | 'right' | 'bottom' | 'left'
|
|
257
|
+
targetSide: 'top' | 'right' | 'bottom' | 'left'
|
|
258
|
+
anchorStrategy: 'outer-same-side' | 'flow-axis-fallback'
|
|
259
|
+
portConflicts: number
|
|
260
|
+
nodeHits: number
|
|
261
|
+
overlapLength: number
|
|
262
|
+
nearParallelLength: number
|
|
263
|
+
crossings: number
|
|
264
|
+
bends: number
|
|
265
|
+
length: number
|
|
266
|
+
labelConflicts: number
|
|
267
|
+
}
|
|
268
|
+
export function routeRuntimeTransition(model: ProcessModel, transition: { sourceElementId: string; targetElementId?: string; [key: string]: unknown }, options?: RuntimeTransitionRouteOptions): RuntimeTransitionRoute | null
|