@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
package/dist/index.d.ts
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
5
|
-
export * from '
|
|
6
|
-
export * from '
|
|
7
|
-
export * from '
|
|
8
|
-
export * from '
|
|
9
|
-
export * from '
|
|
10
|
-
export * from '
|
|
11
|
-
export * from '
|
|
1
|
+
export * from './modules/core/index.js'
|
|
2
|
+
export * from './modules/bpmn-model/index.js'
|
|
3
|
+
export * from './modules/runtime/index.js'
|
|
4
|
+
export * from './modules/theme/index.js'
|
|
5
|
+
export * from './modules/export-svg/index.js'
|
|
6
|
+
export * from './modules/designer/index.js'
|
|
7
|
+
export * from './modules/viewer/index.js'
|
|
8
|
+
export * from './modules/engine-flowable/index.js'
|
|
9
|
+
export * from './modules/engine-activiti/index.js'
|
|
10
|
+
export * from './modules/properties/index.js'
|
|
11
|
+
export * from './modules/icons/index.js'
|
|
12
|
+
export * from './modules/palette/index.js'
|
|
12
13
|
|
|
13
14
|
import type {
|
|
14
15
|
BpmnEdge,
|
|
15
16
|
BpmnNode,
|
|
17
|
+
EdgeType,
|
|
16
18
|
ElementSelection,
|
|
17
19
|
EngineId,
|
|
18
20
|
LayoutOptions,
|
|
@@ -20,20 +22,21 @@ import type {
|
|
|
20
22
|
Point,
|
|
21
23
|
ProcessModel,
|
|
22
24
|
SelectionRect,
|
|
23
|
-
} from '
|
|
24
|
-
import type { IconRegistry } from '
|
|
25
|
-
import type { PaletteRegistry } from '
|
|
26
|
-
import type { PropertiesRegistry } from '
|
|
27
|
-
import type { DiagramNodeRenderer, DiagramRendererOptions } from '
|
|
25
|
+
} from './modules/core/index.js'
|
|
26
|
+
import type { IconRegistry } from './modules/icons/index.js'
|
|
27
|
+
import type { PaletteRegistry } from './modules/palette/index.js'
|
|
28
|
+
import type { PropertiesRegistry } from './modules/properties/index.js'
|
|
29
|
+
import type { DiagramNodeRenderer, DiagramRendererOptions } from './modules/renderer-svg/index.js'
|
|
30
|
+
import type { RuntimeTimelineSvgRenderer, SvgExportArtifact, SvgExportOptions, SvgExportPreviewController, SvgNodeRenderer } from './modules/export-svg/index.js'
|
|
28
31
|
import type {
|
|
29
32
|
ActivityInstance as RuntimeActivityInstance,
|
|
30
33
|
ProcessInstanceSnapshot as RuntimeProcessInstanceSnapshot,
|
|
31
|
-
} from '
|
|
32
|
-
import type { NovaThemeInput, NovaThemeMode, NovaThemeState, RuntimeAppearanceOptions, RuntimeAppearanceResolver } from '
|
|
34
|
+
} from './modules/runtime/index.js'
|
|
35
|
+
import type { NovaThemeInput, NovaThemeMode, NovaThemeState, RuntimeAppearanceOptions, RuntimeAppearanceResolver } from './modules/theme/index.js'
|
|
33
36
|
import type {
|
|
34
37
|
RuntimeDetailsRenderer,
|
|
35
38
|
RuntimeTransitionDetailsRenderer,
|
|
36
|
-
} from '
|
|
39
|
+
} from './modules/viewer/index.js'
|
|
37
40
|
|
|
38
41
|
// Aggregate compatibility surface. Studio re-exports the package-level types,
|
|
39
42
|
// and keeps these frequently consumed declarations visible at its own entry.
|
|
@@ -84,12 +87,12 @@ export interface RuntimeTransitionRoute {
|
|
|
84
87
|
anchorStrategy: 'outer-same-side' | 'flow-axis-fallback'
|
|
85
88
|
portConflicts: number
|
|
86
89
|
}
|
|
87
|
-
export function routeRuntimeTransition(model: ProcessModel, transition: import('
|
|
90
|
+
export function routeRuntimeTransition(model: ProcessModel, transition: import('./modules/runtime/index.js').RuntimeTransition, options?: RuntimeTransitionRouteOptions): RuntimeTransitionRoute | null
|
|
88
91
|
|
|
89
|
-
export type RuntimeParticipant = import('
|
|
90
|
-
export type RuntimeTransition = import('
|
|
91
|
-
export type NodeRuntimePresentation = import('
|
|
92
|
-
export type RuntimePresentation = import('
|
|
92
|
+
export type RuntimeParticipant = import('./modules/runtime/index.js').RuntimeParticipant
|
|
93
|
+
export type RuntimeTransition = import('./modules/runtime/index.js').RuntimeTransition
|
|
94
|
+
export type NodeRuntimePresentation = import('./modules/runtime/index.js').NodeRuntimePresentation
|
|
95
|
+
export type RuntimePresentation = import('./modules/runtime/index.js').RuntimePresentation
|
|
93
96
|
export interface ActivityInstance extends RuntimeActivityInstance {
|
|
94
97
|
visitId?: string
|
|
95
98
|
multiInstanceId?: string
|
|
@@ -104,18 +107,18 @@ export interface ProcessInstanceSnapshot extends RuntimeProcessInstanceSnapshot
|
|
|
104
107
|
}
|
|
105
108
|
|
|
106
109
|
export type ViewerProjection = 'auto' | 'standard' | 'approval' | 'compact'
|
|
107
|
-
export type RuntimeTraceProjection = import('
|
|
108
|
-
export type RuntimeTraceItem = import('
|
|
109
|
-
export type RuntimeTraceLink = import('
|
|
110
|
-
export type RuntimeTraceGroup = import('
|
|
110
|
+
export type RuntimeTraceProjection = import('./modules/viewer/index.js').RuntimeTraceProjection
|
|
111
|
+
export type RuntimeTraceItem = import('./modules/viewer/index.js').RuntimeTraceItem
|
|
112
|
+
export type RuntimeTraceLink = import('./modules/viewer/index.js').RuntimeTraceLink
|
|
113
|
+
export type RuntimeTraceGroup = import('./modules/viewer/index.js').RuntimeTraceGroup
|
|
111
114
|
export interface RuntimeTraceProjectionOptions {
|
|
112
115
|
includePredicted?: boolean
|
|
113
116
|
showStartMilestone?: boolean
|
|
114
117
|
showEndMilestone?: boolean
|
|
115
118
|
}
|
|
116
119
|
export interface ViewerTimelineOptions {
|
|
117
|
-
title?: string | null | ((context: import('
|
|
118
|
-
description?: string | null | ((context: import('
|
|
120
|
+
title?: string | null | ((context: import('./modules/viewer/index.js').ViewerTimelineContext) => string | null)
|
|
121
|
+
description?: string | null | ((context: import('./modules/viewer/index.js').ViewerTimelineContext) => string | null)
|
|
119
122
|
}
|
|
120
123
|
export interface RuntimeDetailsLayoutOptions {
|
|
121
124
|
placement?: 'popover' | 'center' | 'bottom'
|
|
@@ -129,13 +132,15 @@ export interface RuntimeDetailsOptions {
|
|
|
129
132
|
desktop?: RuntimeDetailsLayoutOptions
|
|
130
133
|
mobile?: RuntimeDetailsLayoutOptions
|
|
131
134
|
}
|
|
132
|
-
export type RuntimeTimelineRenderer = import('
|
|
133
|
-
export type RuntimeTraceClickEvent = import('
|
|
135
|
+
export type RuntimeTimelineRenderer = import('./modules/viewer/index.js').RuntimeTimelineRenderer
|
|
136
|
+
export type RuntimeTraceClickEvent = import('./modules/viewer/index.js').RuntimeTraceClickEvent
|
|
134
137
|
export interface ViewerOptions {
|
|
135
138
|
container: HTMLElement
|
|
136
139
|
model: ProcessModel
|
|
137
140
|
runtime?: ProcessInstanceSnapshot | null
|
|
138
141
|
iconRegistry?: IconRegistry
|
|
142
|
+
nodeRenderers?: Record<string, Function>
|
|
143
|
+
nodeRenderer?: Function
|
|
139
144
|
projection?: ViewerProjection
|
|
140
145
|
responsive?: boolean
|
|
141
146
|
timeline?: ViewerTimelineOptions
|
|
@@ -143,15 +148,47 @@ export interface ViewerOptions {
|
|
|
143
148
|
runtimeTraceOptions?: RuntimeTraceProjectionOptions
|
|
144
149
|
onTraceClick?: (event: RuntimeTraceClickEvent) => void
|
|
145
150
|
runtimePresenter?: (context: { model: ProcessModel; runtime: ProcessInstanceSnapshot | null; appearance: RuntimeAppearanceResolver }) => RuntimePresentation
|
|
151
|
+
runtimeTraceProjector?: import('./modules/viewer/index.js').ViewerOptions['runtimeTraceProjector']
|
|
152
|
+
runtimeAssetResolver?: import('./modules/viewer/index.js').RuntimeAssetResolver
|
|
153
|
+
theme?: NovaThemeInput
|
|
154
|
+
runtimeAppearance?: RuntimeAppearanceOptions
|
|
155
|
+
svgExport?: SvgExportOptions & { label?: string; nodeRenderers?: Record<string, SvgNodeRenderer>; runtimeTimelineRenderer?: RuntimeTimelineSvgRenderer }
|
|
156
|
+
onThemeChange?: (state: NovaThemeState) => void
|
|
157
|
+
runtimeTimelineRenderer?: RuntimeTimelineRenderer
|
|
158
|
+
onRuntimeTraceItemClick?: import('./modules/viewer/index.js').ViewerOptions['onRuntimeTraceItemClick']
|
|
159
|
+
onProjectionChange?: import('./modules/viewer/index.js').ViewerOptions['onProjectionChange']
|
|
146
160
|
runtimeDetailsRenderer?: RuntimeDetailsRenderer | null
|
|
147
|
-
onRuntimeDetailsOpen?:
|
|
161
|
+
onRuntimeDetailsOpen?: import('./modules/viewer/index.js').ViewerOptions['onRuntimeDetailsOpen']
|
|
148
162
|
runtimeTransitionDetailsRenderer?: RuntimeTransitionDetailsRenderer | null
|
|
149
|
-
onRuntimeTransitionDetailsOpen?:
|
|
163
|
+
onRuntimeTransitionDetailsOpen?: import('./modules/viewer/index.js').ViewerOptions['onRuntimeTransitionDetailsOpen']
|
|
164
|
+
onElementClick?: import('./modules/viewer/index.js').ViewerOptions['onElementClick']
|
|
150
165
|
}
|
|
151
166
|
export class BpmnViewer {
|
|
152
167
|
constructor(options: ViewerOptions)
|
|
153
|
-
|
|
168
|
+
model: ProcessModel
|
|
169
|
+
runtime: ProcessInstanceSnapshot | null
|
|
170
|
+
projection: ViewerProjection
|
|
171
|
+
responsive: boolean
|
|
172
|
+
activeProjection: Exclude<ViewerProjection, 'auto'>
|
|
173
|
+
traceProjection: RuntimeTraceProjection | null
|
|
174
|
+
setModel(model: ProcessModel): void
|
|
175
|
+
setRuntime(runtime: ProcessInstanceSnapshot | null): void
|
|
176
|
+
setDisplayOptions(options: { timeline?: ViewerTimelineOptions; runtimeDetails?: RuntimeDetailsOptions; runtimeTraceOptions?: RuntimeTraceProjectionOptions; runtimeAssetResolver?: import('./modules/viewer/index.js').RuntimeAssetResolver | null }): void
|
|
177
|
+
setProjection(projection: ViewerProjection): void
|
|
178
|
+
setTheme(theme: NovaThemeInput): NovaThemeState
|
|
179
|
+
setThemeMode(mode: NovaThemeMode): NovaThemeState
|
|
180
|
+
getThemeState(): NovaThemeState
|
|
181
|
+
exportSvg(options?: SvgExportOptions): Promise<SvgExportArtifact>
|
|
182
|
+
openSvgExportPreview(options?: SvgExportOptions & { previewTitle?: string; onDownload?: (artifact: SvgExportArtifact) => void }): SvgExportPreviewController
|
|
183
|
+
setRuntimeAppearance(options: RuntimeAppearanceOptions | null): void
|
|
154
184
|
fitView(): void
|
|
185
|
+
zoomBy(delta: number): void
|
|
186
|
+
clearSelection(): void
|
|
187
|
+
openRuntimeDetails(node: BpmnNode, presentation?: NodeRuntimePresentation, anchor?: Element | null): boolean
|
|
188
|
+
openRuntimeTransitionDetails(transition: import('./modules/runtime/index.js').RuntimeTransitionPresentation | string, anchor?: Element | null): boolean
|
|
189
|
+
closeRuntimeAssetPreview(): void
|
|
190
|
+
closeRuntimeDetails(): void
|
|
191
|
+
refresh(): void
|
|
155
192
|
destroy(): void
|
|
156
193
|
}
|
|
157
194
|
|
|
@@ -165,9 +202,16 @@ export interface StudioState {
|
|
|
165
202
|
canRedo: boolean
|
|
166
203
|
engine: EngineId
|
|
167
204
|
propertiesProfile: 'business' | 'developer'
|
|
205
|
+
allowedNodeTypes: NodeType[] | null
|
|
206
|
+
allowedEdgeTypes: EdgeType[] | null
|
|
168
207
|
activeScopeId: string
|
|
169
208
|
scopePath: Array<{ id: string; name: string; kind: 'process' | 'subProcess' }>
|
|
170
209
|
}
|
|
210
|
+
export interface StudioValidationIssue {
|
|
211
|
+
level: 'error' | 'warning'
|
|
212
|
+
elementId?: string
|
|
213
|
+
message: string
|
|
214
|
+
}
|
|
171
215
|
export interface NodePreset extends Partial<Omit<BpmnNode, 'properties'>> { properties?: Record<string, unknown> }
|
|
172
216
|
export interface TemplateDefinition {
|
|
173
217
|
nodes: Array<{ key: string; nodeType: NodeType; offset?: Point; preset?: NodePreset }>
|
|
@@ -187,6 +231,8 @@ export interface StudioControllerOptions {
|
|
|
187
231
|
historyLimit?: number
|
|
188
232
|
extensions?: StudioExtension[]
|
|
189
233
|
propertiesProfile?: 'business' | 'developer'
|
|
234
|
+
allowedNodeTypes?: Iterable<NodeType> | null
|
|
235
|
+
allowedEdgeTypes?: Iterable<EdgeType> | null
|
|
190
236
|
}
|
|
191
237
|
export interface StudioCommands {
|
|
192
238
|
createNode(input: { nodeType: NodeType; point?: Point; preset?: NodePreset }): BpmnNode
|
|
@@ -253,6 +299,8 @@ export class BpmnStudioController {
|
|
|
253
299
|
navigateToScope(scopeId: string): boolean
|
|
254
300
|
setModel(model: ProcessModel, options?: { resetHistory?: boolean }): void
|
|
255
301
|
setPropertiesProfile(profile: 'business' | 'developer'): void
|
|
302
|
+
allowsNodeType(nodeType: NodeType): boolean
|
|
303
|
+
allowsEdgeType(edgeType: EdgeType): boolean
|
|
256
304
|
startConnect(sourceId: string): boolean
|
|
257
305
|
cancelConnect(): void
|
|
258
306
|
createNode(input: Parameters<StudioCommands['createNode']>[0]): BpmnNode
|
|
@@ -275,6 +323,7 @@ export class BpmnStudioController {
|
|
|
275
323
|
redo(): boolean
|
|
276
324
|
exportXml(engine?: EngineId): string
|
|
277
325
|
importXml(xml: string, engine?: EngineId): ProcessModel
|
|
326
|
+
validate(): StudioValidationIssue[]
|
|
278
327
|
registerExtension(extension: StudioExtension): () => void
|
|
279
328
|
destroy(): void
|
|
280
329
|
}
|
|
@@ -387,15 +436,45 @@ export class BpmnCanvas {
|
|
|
387
436
|
setTheme(theme: NovaThemeInput): NovaThemeState
|
|
388
437
|
setThemeMode(mode: NovaThemeMode): NovaThemeState
|
|
389
438
|
getThemeState(): NovaThemeState
|
|
439
|
+
exportSvg(options?: SvgExportOptions): Promise<SvgExportArtifact>
|
|
440
|
+
openSvgExportPreview(options?: SvgExportOptions & { previewTitle?: string; onDownload?: (artifact: SvgExportArtifact) => void }): SvgExportPreviewController
|
|
390
441
|
closeContextMenu(): void
|
|
391
442
|
destroy(): void
|
|
392
443
|
}
|
|
393
444
|
export function createBpmnCanvas(options: BpmnCanvasOptions): BpmnCanvas
|
|
394
445
|
|
|
446
|
+
export interface StudioShellActions {
|
|
447
|
+
undo(): boolean
|
|
448
|
+
redo(): boolean
|
|
449
|
+
beautify(options?: LayoutOptions): void
|
|
450
|
+
rerouteEdges(options?: LayoutOptions): void
|
|
451
|
+
fitView(): void
|
|
452
|
+
validate(): StudioValidationIssue[]
|
|
453
|
+
importXml(xml: string, engine?: EngineId): ProcessModel
|
|
454
|
+
exportXml(engine?: EngineId): string
|
|
455
|
+
exportSvg(options?: SvgExportOptions): Promise<SvgExportArtifact>
|
|
456
|
+
openSvgExportPreview(options?: SvgExportOptions & {
|
|
457
|
+
previewTitle?: string
|
|
458
|
+
onDownload?: (artifact: SvgExportArtifact) => void
|
|
459
|
+
}): SvgExportPreviewController | null
|
|
460
|
+
}
|
|
461
|
+
export interface StudioShellSlotContext {
|
|
462
|
+
studio: BpmnStudioController
|
|
463
|
+
shell: BpmnStudioShell
|
|
464
|
+
canvas: BpmnCanvas
|
|
465
|
+
actions: StudioShellActions
|
|
466
|
+
getState(): StudioState
|
|
467
|
+
subscribe(listener: (event: StudioEvent) => void): () => void
|
|
468
|
+
}
|
|
469
|
+
export type StudioShellDomSlot =
|
|
470
|
+
| HTMLElement
|
|
471
|
+
| ((context: StudioShellSlotContext & { container: HTMLElement }) => void | (() => void))
|
|
395
472
|
export interface StudioShellSlots {
|
|
396
|
-
left?:
|
|
397
|
-
right?:
|
|
398
|
-
|
|
473
|
+
left?: StudioShellDomSlot
|
|
474
|
+
right?: StudioShellDomSlot
|
|
475
|
+
headerStart?: StudioShellDomSlot
|
|
476
|
+
header?: StudioShellDomSlot
|
|
477
|
+
footer?: StudioShellDomSlot
|
|
399
478
|
contextMenu?: ContextMenuSlot
|
|
400
479
|
selectionToolbar?: SelectionToolbarSlot
|
|
401
480
|
runtimeDetails?: RuntimeDetailsRenderer
|
|
@@ -403,6 +482,19 @@ export interface StudioShellSlots {
|
|
|
403
482
|
runtimeTimeline?: RuntimeTimelineRenderer
|
|
404
483
|
[name: string]: HTMLElement | Function | undefined
|
|
405
484
|
}
|
|
485
|
+
export type StudioShellRegionMode = 'default' | 'hidden'
|
|
486
|
+
export interface StudioShellRegions {
|
|
487
|
+
header?: StudioShellRegionMode
|
|
488
|
+
left?: StudioShellRegionMode
|
|
489
|
+
right?: StudioShellRegionMode
|
|
490
|
+
footer?: StudioShellRegionMode
|
|
491
|
+
}
|
|
492
|
+
export interface StudioShellRegionState {
|
|
493
|
+
header: StudioShellRegionMode
|
|
494
|
+
left: StudioShellRegionMode
|
|
495
|
+
right: StudioShellRegionMode
|
|
496
|
+
footer: StudioShellRegionMode
|
|
497
|
+
}
|
|
406
498
|
export interface StudioShellOptions {
|
|
407
499
|
container: HTMLElement
|
|
408
500
|
studio: BpmnStudioController
|
|
@@ -416,9 +508,11 @@ export interface StudioShellOptions {
|
|
|
416
508
|
timeline?: ViewerTimelineOptions
|
|
417
509
|
}
|
|
418
510
|
slots?: StudioShellSlots
|
|
511
|
+
regions?: StudioShellRegions
|
|
419
512
|
layout?: (context: Record<string, unknown>) => void | (() => void)
|
|
420
513
|
runtime?: ProcessInstanceSnapshot | null
|
|
421
514
|
mode?: 'design' | 'viewer' | 'instance'
|
|
515
|
+
allowedModes?: Array<'design' | 'viewer' | 'instance'>
|
|
422
516
|
projection?: ViewerProjection
|
|
423
517
|
responsive?: boolean
|
|
424
518
|
projectionOptions?: Array<{ value: ViewerProjection; label: string }>
|
|
@@ -426,12 +520,16 @@ export interface StudioShellOptions {
|
|
|
426
520
|
rightWidth?: number
|
|
427
521
|
theme?: NovaThemeInput
|
|
428
522
|
runtimeAppearance?: RuntimeAppearanceOptions
|
|
523
|
+
svgExport?: SvgExportOptions & { label?: string; nodeRenderers?: Record<string, SvgNodeRenderer>; runtimeTimelineRenderer?: RuntimeTimelineSvgRenderer }
|
|
429
524
|
onThemeChange?: (state: NovaThemeState) => void
|
|
430
525
|
}
|
|
431
526
|
export class BpmnStudioShell {
|
|
432
527
|
constructor(options: StudioShellOptions)
|
|
528
|
+
readonly actions: StudioShellActions
|
|
433
529
|
canvas?: BpmnCanvas
|
|
434
530
|
viewer?: BpmnViewer
|
|
531
|
+
getRegions(): Readonly<StudioShellRegionState>
|
|
532
|
+
setRegions(regions: StudioShellRegions): Readonly<StudioShellRegionState>
|
|
435
533
|
setMode(mode: 'design' | 'viewer' | 'instance'): void
|
|
436
534
|
setRuntime(runtime: ProcessInstanceSnapshot | null): void
|
|
437
535
|
setProjection(projection: ViewerProjection): void
|
|
@@ -442,6 +540,8 @@ export class BpmnStudioShell {
|
|
|
442
540
|
setRuntimeAppearance(options: RuntimeAppearanceOptions | null): void
|
|
443
541
|
fitView(): void
|
|
444
542
|
zoomBy(factor: number): void
|
|
543
|
+
exportSvg(options?: SvgExportOptions): Promise<SvgExportArtifact>
|
|
544
|
+
openSvgExportPreview(options?: SvgExportOptions & { previewTitle?: string; onDownload?: (artifact: SvgExportArtifact) => void }): SvgExportPreviewController | null
|
|
445
545
|
destroy(): void
|
|
446
546
|
}
|
|
447
547
|
export function createStudioShell(options: StudioShellOptions): BpmnStudioShell
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
export * from '
|
|
2
|
-
export * from '
|
|
3
|
-
export * from '
|
|
4
|
-
export * from '
|
|
5
|
-
export * from '
|
|
6
|
-
export * from '
|
|
7
|
-
export * from '
|
|
8
|
-
export * from '
|
|
9
|
-
export * from '
|
|
1
|
+
export * from './modules/core/index.js';
|
|
2
|
+
export * from './modules/bpmn-model/index.js';
|
|
3
|
+
export * from './modules/runtime/index.js';
|
|
4
|
+
export * from './modules/theme/index.js';
|
|
5
|
+
export * from './modules/export-svg/index.js';
|
|
6
|
+
export * from './modules/designer/index.js';
|
|
7
|
+
export * from './modules/viewer/index.js';
|
|
8
|
+
export * from './modules/engine-flowable/index.js';
|
|
9
|
+
export * from './modules/engine-activiti/index.js';
|
|
10
|
+
export * from './modules/properties/index.js';
|
|
10
11
|
export * from './controller.js';
|
|
11
12
|
export * from './interactions.js';
|
|
12
13
|
export * from './canvas.js';
|
|
13
14
|
export * from './context-menu.js';
|
|
14
15
|
export * from './shell.js';
|
|
15
|
-
export * from '
|
|
16
|
-
export * from '
|
|
16
|
+
export * from './modules/icons/index.js';
|
|
17
|
+
export * from './modules/palette/index.js';
|
package/dist/interactions.js
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { EngineId, ProcessModel } from '../core/index.js'
|
|
2
|
+
import type { FlowableEngineProfile } from '../engine-flowable/index.js'
|
|
3
|
+
import type { ActivitiEngineProfile } from '../engine-activiti/index.js'
|
|
4
|
+
|
|
5
|
+
export const engineProfiles: {
|
|
6
|
+
flowable: FlowableEngineProfile
|
|
7
|
+
activiti: ActivitiEngineProfile
|
|
8
|
+
}
|
|
9
|
+
export function detectEngineFromXml(xml: string): EngineId
|
|
10
|
+
export function importBpmn(xml: string, engineHint?: EngineId): ProcessModel
|
|
11
|
+
export function exportBpmn(model: ProcessModel, engineOverride?: EngineId): string
|