@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.
Files changed (63) hide show
  1. package/README.md +245 -20
  2. package/dist/canvas.js +7 -4
  3. package/dist/context-menu.js +2 -2
  4. package/dist/controller.js +84 -6
  5. package/dist/index.d.ts +138 -38
  6. package/dist/index.js +12 -11
  7. package/dist/interactions.js +1 -1
  8. package/dist/modules/bpmn-model/index.d.ts +11 -0
  9. package/dist/modules/bpmn-model/index.js +703 -0
  10. package/dist/modules/core/containment.js +590 -0
  11. package/dist/modules/core/gateway.js +72 -0
  12. package/dist/modules/core/history.js +32 -0
  13. package/dist/modules/core/index.d.ts +268 -0
  14. package/dist/modules/core/index.js +7 -0
  15. package/dist/modules/core/layout.js +644 -0
  16. package/dist/modules/core/model.js +287 -0
  17. package/dist/modules/core/runtime-transition-route.js +360 -0
  18. package/dist/modules/core/scope.js +99 -0
  19. package/dist/modules/designer/index.d.ts +79 -0
  20. package/dist/modules/designer/index.js +607 -0
  21. package/dist/modules/engine-activiti/index.d.ts +19 -0
  22. package/dist/modules/engine-activiti/index.js +160 -0
  23. package/dist/modules/engine-flowable/index.d.ts +19 -0
  24. package/dist/modules/engine-flowable/index.js +160 -0
  25. package/dist/modules/export-svg/index.d.ts +112 -0
  26. package/dist/modules/export-svg/index.js +2 -0
  27. package/dist/modules/export-svg/preview.js +327 -0
  28. package/dist/modules/export-svg/render.js +718 -0
  29. package/dist/modules/icons/index.d.ts +24 -0
  30. package/dist/modules/icons/index.js +264 -0
  31. package/dist/modules/palette/index.d.ts +74 -0
  32. package/dist/modules/palette/index.js +99 -0
  33. package/dist/modules/palette/panel.js +99 -0
  34. package/dist/modules/properties/index.d.ts +20 -0
  35. package/dist/modules/properties/index.js +19 -0
  36. package/dist/modules/properties-activiti/index.d.ts +3 -0
  37. package/dist/modules/properties-activiti/index.js +97 -0
  38. package/dist/modules/properties-bpmn/index.d.ts +3 -0
  39. package/dist/modules/properties-bpmn/index.js +518 -0
  40. package/dist/modules/properties-core/index.d.ts +124 -0
  41. package/dist/modules/properties-core/index.js +312 -0
  42. package/dist/modules/properties-flowable/index.d.ts +3 -0
  43. package/dist/modules/properties-flowable/index.js +114 -0
  44. package/dist/modules/properties-renderer/index.d.ts +25 -0
  45. package/dist/modules/properties-renderer/index.js +491 -0
  46. package/dist/modules/renderer-svg/index.d.ts +118 -0
  47. package/dist/modules/renderer-svg/index.js +1460 -0
  48. package/dist/modules/runtime/index.d.ts +169 -0
  49. package/dist/modules/runtime/index.js +535 -0
  50. package/dist/modules/theme/index.d.ts +95 -0
  51. package/dist/modules/theme/index.js +368 -0
  52. package/dist/modules/viewer/index.d.ts +265 -0
  53. package/dist/modules/viewer/index.js +1011 -0
  54. package/dist/modules/viewer/runtime-content.js +123 -0
  55. package/dist/modules/viewer/runtime-details-motion.js +228 -0
  56. package/dist/modules/viewer/runtime-trace.js +574 -0
  57. package/dist/modules/viewer/timeline.js +276 -0
  58. package/dist/selection-layout.js +1 -1
  59. package/dist/shell.js +210 -26
  60. package/dist/styles.css +116 -7
  61. package/llms-full.txt +3082 -0
  62. package/llms.txt +225 -0
  63. 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