@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,169 @@
|
|
|
1
|
+
import type { BpmnEdge, BpmnNode, ProcessModel } from '../core/index.js'
|
|
2
|
+
|
|
3
|
+
export type ActivityStatus = 'idle' | 'active' | 'completed' | 'failed' | 'cancelled' | 'skipped'
|
|
4
|
+
export interface RuntimeParticipant { id?: string; name: string; avatarUrl?: string }
|
|
5
|
+
export type RuntimeApprovalActionType =
|
|
6
|
+
| 'submit' | 'approve' | 'reject' | 'return' | 'add-sign' | 'transfer' | 'delegate' | 'withdraw' | 'comment' | 'skip'
|
|
7
|
+
| (string & {})
|
|
8
|
+
export interface RuntimeAssetRef {
|
|
9
|
+
id: string
|
|
10
|
+
name: string
|
|
11
|
+
mediaType: string
|
|
12
|
+
size?: number
|
|
13
|
+
width?: number
|
|
14
|
+
height?: number
|
|
15
|
+
}
|
|
16
|
+
export type RuntimeApprovalContentBlock =
|
|
17
|
+
| { type: 'paragraph'; text: string }
|
|
18
|
+
| { type: 'image'; assetId: string; alt?: string }
|
|
19
|
+
| { type: 'file'; assetId: string }
|
|
20
|
+
| { type: string; [key: string]: unknown }
|
|
21
|
+
export interface RuntimeApprovalContent {
|
|
22
|
+
plainText?: string
|
|
23
|
+
blocks?: RuntimeApprovalContentBlock[]
|
|
24
|
+
assets?: RuntimeAssetRef[]
|
|
25
|
+
}
|
|
26
|
+
export interface RuntimeApprovalAction {
|
|
27
|
+
id: string
|
|
28
|
+
type: RuntimeApprovalActionType
|
|
29
|
+
label?: string
|
|
30
|
+
elementId: string
|
|
31
|
+
visitId: string
|
|
32
|
+
activityId?: string
|
|
33
|
+
actor?: RuntimeParticipant
|
|
34
|
+
occurredAt: string
|
|
35
|
+
targets?: RuntimeParticipant[]
|
|
36
|
+
targetElementId?: string
|
|
37
|
+
content?: RuntimeApprovalContent
|
|
38
|
+
metadata?: Record<string, unknown>
|
|
39
|
+
}
|
|
40
|
+
export interface RuntimeApprovalActionPresentation extends Omit<RuntimeApprovalAction, 'content'> {
|
|
41
|
+
explicitLabel: string | null
|
|
42
|
+
label: string
|
|
43
|
+
iconId?: string
|
|
44
|
+
tone?: string
|
|
45
|
+
content: Required<RuntimeApprovalContent>
|
|
46
|
+
plainText: string
|
|
47
|
+
images: RuntimeAssetRef[]
|
|
48
|
+
files: RuntimeAssetRef[]
|
|
49
|
+
imageCount: number
|
|
50
|
+
fileCount: number
|
|
51
|
+
assetCount: number
|
|
52
|
+
order: number
|
|
53
|
+
}
|
|
54
|
+
export interface RuntimeApprovalActionSummary {
|
|
55
|
+
actions: RuntimeApprovalActionPresentation[]
|
|
56
|
+
latestAction: RuntimeApprovalActionPresentation | null
|
|
57
|
+
actionText: string
|
|
58
|
+
actionSummary: string
|
|
59
|
+
imageCount: number
|
|
60
|
+
fileCount: number
|
|
61
|
+
assetCount: number
|
|
62
|
+
}
|
|
63
|
+
export interface ActivityInstance {
|
|
64
|
+
id: string
|
|
65
|
+
elementId: string
|
|
66
|
+
status: Exclude<ActivityStatus, 'idle'>
|
|
67
|
+
startTime?: string
|
|
68
|
+
endTime?: string
|
|
69
|
+
assignee?: string
|
|
70
|
+
assigneeId?: string
|
|
71
|
+
participant?: RuntimeParticipant
|
|
72
|
+
visitId?: string
|
|
73
|
+
multiInstanceId?: string
|
|
74
|
+
approvalMode?: 'single' | 'all' | 'any'
|
|
75
|
+
multiInstanceMode?: 'parallel' | 'sequential'
|
|
76
|
+
totalInstances?: number
|
|
77
|
+
requiredInstances?: number
|
|
78
|
+
outcome?: string
|
|
79
|
+
comment?: string
|
|
80
|
+
}
|
|
81
|
+
export interface RuntimeTransition {
|
|
82
|
+
id: string
|
|
83
|
+
type: 'forward' | 'reject' | 'return' | 'skip'
|
|
84
|
+
sourceActivityId?: string
|
|
85
|
+
sourceElementId: string
|
|
86
|
+
targetElementId?: string
|
|
87
|
+
operator?: string
|
|
88
|
+
occurredAt?: string
|
|
89
|
+
time?: string
|
|
90
|
+
comment?: string
|
|
91
|
+
actionId?: string
|
|
92
|
+
state?: 'active' | 'resolved'
|
|
93
|
+
resolvedAt?: string
|
|
94
|
+
resolvedByActivityId?: string
|
|
95
|
+
invalidatedActivityIds?: string[]
|
|
96
|
+
invalidatedEdgeIds?: string[]
|
|
97
|
+
}
|
|
98
|
+
export interface RuntimeEdgeVisit {
|
|
99
|
+
id: string
|
|
100
|
+
edgeId: string
|
|
101
|
+
visitId?: string
|
|
102
|
+
occurredAt?: string
|
|
103
|
+
time?: string
|
|
104
|
+
status?: 'effective' | 'superseded'
|
|
105
|
+
}
|
|
106
|
+
export interface ProcessInstanceSnapshot {
|
|
107
|
+
processInstanceId: string
|
|
108
|
+
status: 'running' | 'completed' | 'suspended' | 'terminated'
|
|
109
|
+
activities: ActivityInstance[]
|
|
110
|
+
actions?: RuntimeApprovalAction[]
|
|
111
|
+
visitedEdges: string[]
|
|
112
|
+
transitions?: RuntimeTransition[]
|
|
113
|
+
edgeVisits?: RuntimeEdgeVisit[]
|
|
114
|
+
}
|
|
115
|
+
export interface RuntimeTransitionPresentation extends RuntimeTransition {
|
|
116
|
+
state: 'active' | 'resolved'
|
|
117
|
+
visible: boolean
|
|
118
|
+
sourceName: string
|
|
119
|
+
targetName: string
|
|
120
|
+
label: string
|
|
121
|
+
latest: boolean
|
|
122
|
+
issues: string[]
|
|
123
|
+
invalidatedActivityIds: string[]
|
|
124
|
+
invalidatedEdgeIds: string[]
|
|
125
|
+
action: RuntimeApprovalActionPresentation | null
|
|
126
|
+
}
|
|
127
|
+
export interface NodeRuntimePresentation extends RuntimeApprovalActionSummary {
|
|
128
|
+
elementId: string
|
|
129
|
+
status: ActivityStatus | 'rejected'
|
|
130
|
+
pathStatus: ActivityStatus
|
|
131
|
+
superseded: boolean
|
|
132
|
+
statusLabel: string
|
|
133
|
+
summary: string
|
|
134
|
+
fullSummary: string
|
|
135
|
+
participants: RuntimeParticipant[]
|
|
136
|
+
approvalMode: 'single' | 'all' | 'any' | null
|
|
137
|
+
multiInstanceMode: 'parallel' | 'sequential' | null
|
|
138
|
+
completed: number
|
|
139
|
+
total: number
|
|
140
|
+
required: number
|
|
141
|
+
round: number
|
|
142
|
+
records: ActivityInstance[]
|
|
143
|
+
latestRecords: ActivityInstance[]
|
|
144
|
+
visits: Array<{ id: string; round: number; records: ActivityInstance[] } & RuntimeApprovalActionSummary>
|
|
145
|
+
transitions: RuntimeTransitionPresentation[]
|
|
146
|
+
isReentry: boolean
|
|
147
|
+
hasDetails: boolean
|
|
148
|
+
}
|
|
149
|
+
export interface RuntimePresentation {
|
|
150
|
+
runtime: ProcessInstanceSnapshot
|
|
151
|
+
getNode(elementId: string): NodeRuntimePresentation
|
|
152
|
+
getEdge(edgeId: string): { edgeId: string; status: ActivityStatus; visited: boolean; historicallyVisited: boolean; superseded: boolean }
|
|
153
|
+
getAction(actionId: string): RuntimeApprovalActionPresentation | null
|
|
154
|
+
getActions(elementId?: string | null): RuntimeApprovalActionPresentation[]
|
|
155
|
+
getTransition(transitionId: string): RuntimeTransitionPresentation | null
|
|
156
|
+
getTransitions(): RuntimeTransitionPresentation[]
|
|
157
|
+
}
|
|
158
|
+
export interface RuntimeAppearanceLike {
|
|
159
|
+
resolveStatus(status: string): string
|
|
160
|
+
resolveAction(action?: { type?: string; explicitLabel?: string; label?: string }): { label: string; iconId: string; tone: string }
|
|
161
|
+
resolveTransition(transition?: { type?: string }): { tone: string }
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export function normalizeRuntime(snapshot?: Partial<ProcessInstanceSnapshot> | null): ProcessInstanceSnapshot
|
|
165
|
+
export function activityState(runtime: ProcessInstanceSnapshot | null | undefined, elementId: string): ActivityStatus
|
|
166
|
+
export function createRuntimePresentation(context: { model: ProcessModel; runtime?: ProcessInstanceSnapshot | null; appearance?: RuntimeAppearanceLike | null }): RuntimePresentation
|
|
167
|
+
export function demoRuntime(): ProcessInstanceSnapshot
|
|
168
|
+
|
|
169
|
+
export type RuntimeElement = BpmnNode | BpmnEdge
|