@formicoidea/labre-framework-bpmn 4.0.0 → 4.2.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/commands-manifest.js +12 -12
- package/dist/commands.js +23 -2
- package/package.json +2 -2
|
@@ -21,7 +21,7 @@ export const bpmnCommandsManifest = [
|
|
|
21
21
|
labelKey: 'com.labre.commands.bpmn.addStartEvent',
|
|
22
22
|
labelFallback: 'Start event',
|
|
23
23
|
scope: 'edgeless',
|
|
24
|
-
defaultKeys: { mac: [], other: [] },
|
|
24
|
+
defaultKeys: { mac: ['b', 's'], other: ['b', 's'] },
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
id: 'bpmn.addEndEvent',
|
|
@@ -29,7 +29,7 @@ export const bpmnCommandsManifest = [
|
|
|
29
29
|
labelKey: 'com.labre.commands.bpmn.addEndEvent',
|
|
30
30
|
labelFallback: 'End event',
|
|
31
31
|
scope: 'edgeless',
|
|
32
|
-
defaultKeys: { mac: [], other: [] },
|
|
32
|
+
defaultKeys: { mac: ['b', 'e'], other: ['b', 'e'] },
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
id: 'bpmn.addTask',
|
|
@@ -37,7 +37,7 @@ export const bpmnCommandsManifest = [
|
|
|
37
37
|
labelKey: 'com.labre.commands.bpmn.addTask',
|
|
38
38
|
labelFallback: 'Task',
|
|
39
39
|
scope: 'edgeless',
|
|
40
|
-
defaultKeys: { mac: [], other: [] },
|
|
40
|
+
defaultKeys: { mac: ['b', 't'], other: ['b', 't'] },
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
id: 'bpmn.addExclusiveGateway',
|
|
@@ -45,7 +45,7 @@ export const bpmnCommandsManifest = [
|
|
|
45
45
|
labelKey: 'com.labre.commands.bpmn.addExclusiveGateway',
|
|
46
46
|
labelFallback: 'Exclusive gateway',
|
|
47
47
|
scope: 'edgeless',
|
|
48
|
-
defaultKeys: { mac: [], other: [] },
|
|
48
|
+
defaultKeys: { mac: ['b', 'x'], other: ['b', 'x'] },
|
|
49
49
|
},
|
|
50
50
|
{
|
|
51
51
|
id: 'bpmn.sequenceFlowTool',
|
|
@@ -61,7 +61,7 @@ export const bpmnCommandsManifest = [
|
|
|
61
61
|
labelKey: 'com.labre.commands.bpmn.addPool',
|
|
62
62
|
labelFallback: 'Pool',
|
|
63
63
|
scope: 'edgeless',
|
|
64
|
-
defaultKeys: { mac: [], other: [] },
|
|
64
|
+
defaultKeys: { mac: ['b', 'p'], other: ['b', 'p'] },
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
67
|
id: 'bpmn.messageFlowTool',
|
|
@@ -77,7 +77,7 @@ export const bpmnCommandsManifest = [
|
|
|
77
77
|
labelKey: 'com.labre.commands.bpmn.addUserTask',
|
|
78
78
|
labelFallback: 'User task',
|
|
79
79
|
scope: 'edgeless',
|
|
80
|
-
defaultKeys: { mac: [], other: [] },
|
|
80
|
+
defaultKeys: { mac: ['b', 'u'], other: ['b', 'u'] },
|
|
81
81
|
},
|
|
82
82
|
{
|
|
83
83
|
id: 'bpmn.addServiceTask',
|
|
@@ -85,7 +85,7 @@ export const bpmnCommandsManifest = [
|
|
|
85
85
|
labelKey: 'com.labre.commands.bpmn.addServiceTask',
|
|
86
86
|
labelFallback: 'Service task',
|
|
87
87
|
scope: 'edgeless',
|
|
88
|
-
defaultKeys: { mac: [], other: [] },
|
|
88
|
+
defaultKeys: { mac: ['b', 'v'], other: ['b', 'v'] },
|
|
89
89
|
},
|
|
90
90
|
{
|
|
91
91
|
id: 'bpmn.addSubProcess',
|
|
@@ -93,7 +93,7 @@ export const bpmnCommandsManifest = [
|
|
|
93
93
|
labelKey: 'com.labre.commands.bpmn.addSubProcess',
|
|
94
94
|
labelFallback: 'Sub-process',
|
|
95
95
|
scope: 'edgeless',
|
|
96
|
-
defaultKeys: { mac: [], other: [] },
|
|
96
|
+
defaultKeys: { mac: ['b', 'o'], other: ['b', 'o'] },
|
|
97
97
|
},
|
|
98
98
|
{
|
|
99
99
|
id: 'bpmn.addCallActivity',
|
|
@@ -101,7 +101,7 @@ export const bpmnCommandsManifest = [
|
|
|
101
101
|
labelKey: 'com.labre.commands.bpmn.addCallActivity',
|
|
102
102
|
labelFallback: 'Call activity',
|
|
103
103
|
scope: 'edgeless',
|
|
104
|
-
defaultKeys: { mac: [], other: [] },
|
|
104
|
+
defaultKeys: { mac: ['b', 'c'], other: ['b', 'c'] },
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
id: 'bpmn.addParallelGateway',
|
|
@@ -109,7 +109,7 @@ export const bpmnCommandsManifest = [
|
|
|
109
109
|
labelKey: 'com.labre.commands.bpmn.addParallelGateway',
|
|
110
110
|
labelFallback: 'Parallel gateway',
|
|
111
111
|
scope: 'edgeless',
|
|
112
|
-
defaultKeys: { mac: [], other: [] },
|
|
112
|
+
defaultKeys: { mac: ['b', 'a'], other: ['b', 'a'] },
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
id: 'bpmn.addMessageStartEvent',
|
|
@@ -157,7 +157,7 @@ export const bpmnCommandsManifest = [
|
|
|
157
157
|
labelKey: 'com.labre.commands.bpmn.addDataObject',
|
|
158
158
|
labelFallback: 'Data object',
|
|
159
159
|
scope: 'edgeless',
|
|
160
|
-
defaultKeys: { mac: [], other: [] },
|
|
160
|
+
defaultKeys: { mac: ['b', 'd'], other: ['b', 'd'] },
|
|
161
161
|
},
|
|
162
162
|
{
|
|
163
163
|
id: 'bpmn.addDataStore',
|
|
@@ -173,7 +173,7 @@ export const bpmnCommandsManifest = [
|
|
|
173
173
|
labelKey: 'com.labre.commands.bpmn.addTextAnnotation',
|
|
174
174
|
labelFallback: 'Text annotation',
|
|
175
175
|
scope: 'edgeless',
|
|
176
|
-
defaultKeys: { mac: [], other: [] },
|
|
176
|
+
defaultKeys: { mac: ['b', 'n'], other: ['b', 'n'] },
|
|
177
177
|
},
|
|
178
178
|
{
|
|
179
179
|
id: 'bpmn.addGroup',
|
package/dist/commands.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
1
|
import { StrokeStyle } from '@formicoidea/labre-core/model';
|
|
2
|
+
import { frameworkChord } from '@formicoidea/labre-core/shared/utils';
|
|
2
3
|
import { activateBpmnAssociation, activateBpmnMessageFlow, activateBpmnSequenceFlow, addBpmnLane, bpmnLanesOf, bpmnPoolsForLaneEdit, bpmnPoolsSelected, createBpmnNode, createBpmnPool, exportBpmnXmlFile, importBpmnSvgFile, importBpmnXmlFile, bpmnLaneToMove, moveBpmnLaneDown, moveBpmnLaneUp, removeBpmnLane, } from './actions.js';
|
|
3
4
|
import { BPMN_EDGE_STYLE, NODE_FILL, NODE_SIZE, } from './consts.js';
|
|
4
5
|
import { bpmnNodeProps } from './presets.js';
|
|
5
6
|
import { BPMN_ROLE, BPMN_ROLE_OF_KIND } from './roles.js';
|
|
6
7
|
import { bpmnAssociationIcon, bpmnCallActivityIcon, bpmnDataObjectIcon, bpmnDataStoreIcon, bpmnEndIcon, bpmnEndMessageIcon, bpmnEndTerminateIcon, bpmnExportXmlIcon, bpmnGatewayIcon, bpmnGatewayParallelIcon, bpmnGroupIcon, bpmnImportSvgIcon, bpmnImportXmlIcon, bpmnLaneAddIcon, bpmnLaneDownIcon, bpmnLaneRemoveIcon, bpmnLaneUpIcon, bpmnMessageIcon, bpmnPoolIcon, bpmnSequenceIcon, bpmnStartIcon, bpmnStartMessageIcon, bpmnStartTimerIcon, bpmnSubProcessIcon, bpmnTaskIcon, bpmnTaskServiceIcon, bpmnTaskUserIcon, bpmnTextAnnotationIcon, bpmnToolbarIcon, } from './toolbar/icons.js';
|
|
8
|
+
/**
|
|
9
|
+
* The first keystroke of every BPMN chord (`b t` places a task). Spelled again
|
|
10
|
+
* as `FrameworkDescriptor.chordPrefix` in `@labre/affine`'s `frameworks.ts`;
|
|
11
|
+
* `chord-prefixes.unit.spec.ts` holds the two together (`docs/adr/0055`).
|
|
12
|
+
*/
|
|
13
|
+
const BPMN_CHORD_PREFIX = 'b';
|
|
7
14
|
/**
|
|
8
15
|
* What a spec DOES — its own gesture, or the one its {@link Spec.node} implies.
|
|
9
16
|
*
|
|
@@ -54,6 +61,7 @@ const SPECS = [
|
|
|
54
61
|
/* ── The core: a drawable process, from the first click ─────────────── */
|
|
55
62
|
{
|
|
56
63
|
id: 'addStartEvent',
|
|
64
|
+
key: 's',
|
|
57
65
|
label: 'Start event',
|
|
58
66
|
iconKey: 'bpmn.start',
|
|
59
67
|
kind: 'artefact',
|
|
@@ -64,6 +72,7 @@ const SPECS = [
|
|
|
64
72
|
},
|
|
65
73
|
{
|
|
66
74
|
id: 'addEndEvent',
|
|
75
|
+
key: 'e',
|
|
67
76
|
label: 'End event',
|
|
68
77
|
iconKey: 'bpmn.end',
|
|
69
78
|
kind: 'artefact',
|
|
@@ -74,6 +83,7 @@ const SPECS = [
|
|
|
74
83
|
},
|
|
75
84
|
{
|
|
76
85
|
id: 'addTask',
|
|
86
|
+
key: 't',
|
|
77
87
|
label: 'Task',
|
|
78
88
|
iconKey: 'bpmn.task',
|
|
79
89
|
kind: 'artefact',
|
|
@@ -84,6 +94,7 @@ const SPECS = [
|
|
|
84
94
|
},
|
|
85
95
|
{
|
|
86
96
|
id: 'addExclusiveGateway',
|
|
97
|
+
key: 'x',
|
|
87
98
|
label: 'Exclusive gateway',
|
|
88
99
|
iconKey: 'bpmn.gateway',
|
|
89
100
|
kind: 'artefact',
|
|
@@ -105,6 +116,7 @@ const SPECS = [
|
|
|
105
116
|
},
|
|
106
117
|
{
|
|
107
118
|
id: 'addPool',
|
|
119
|
+
key: 'p',
|
|
108
120
|
label: 'Pool',
|
|
109
121
|
iconKey: 'bpmn.pool',
|
|
110
122
|
kind: 'artefact',
|
|
@@ -131,6 +143,7 @@ const SPECS = [
|
|
|
131
143
|
/* ── Activities: the typed tasks and the two that stand for a process ─ */
|
|
132
144
|
{
|
|
133
145
|
id: 'addUserTask',
|
|
146
|
+
key: 'u',
|
|
134
147
|
label: 'User task',
|
|
135
148
|
iconKey: 'bpmn.task.user',
|
|
136
149
|
kind: 'artefact',
|
|
@@ -141,6 +154,7 @@ const SPECS = [
|
|
|
141
154
|
},
|
|
142
155
|
{
|
|
143
156
|
id: 'addServiceTask',
|
|
157
|
+
key: 'v',
|
|
144
158
|
label: 'Service task',
|
|
145
159
|
iconKey: 'bpmn.task.service',
|
|
146
160
|
kind: 'artefact',
|
|
@@ -151,6 +165,7 @@ const SPECS = [
|
|
|
151
165
|
},
|
|
152
166
|
{
|
|
153
167
|
id: 'addSubProcess',
|
|
168
|
+
key: 'o',
|
|
154
169
|
label: 'Sub-process',
|
|
155
170
|
iconKey: 'bpmn.sub-process',
|
|
156
171
|
kind: 'artefact',
|
|
@@ -161,6 +176,7 @@ const SPECS = [
|
|
|
161
176
|
},
|
|
162
177
|
{
|
|
163
178
|
id: 'addCallActivity',
|
|
179
|
+
key: 'c',
|
|
164
180
|
label: 'Call activity',
|
|
165
181
|
iconKey: 'bpmn.call-activity',
|
|
166
182
|
kind: 'artefact',
|
|
@@ -175,6 +191,7 @@ const SPECS = [
|
|
|
175
191
|
// shipped (`addExclusiveGateway`) — a command id is a value a host override
|
|
176
192
|
// table points at, and the pair reads as a pair in every list that sorts.
|
|
177
193
|
id: 'addParallelGateway',
|
|
194
|
+
key: 'a',
|
|
178
195
|
label: 'Parallel gateway',
|
|
179
196
|
iconKey: 'bpmn.gateway.parallel',
|
|
180
197
|
kind: 'artefact',
|
|
@@ -240,6 +257,7 @@ const SPECS = [
|
|
|
240
257
|
/* ── Data ───────────────────────────────────────────────────────────── */
|
|
241
258
|
{
|
|
242
259
|
id: 'addDataObject',
|
|
260
|
+
key: 'd',
|
|
243
261
|
label: 'Data object',
|
|
244
262
|
iconKey: 'bpmn.data-object',
|
|
245
263
|
kind: 'artefact',
|
|
@@ -261,6 +279,7 @@ const SPECS = [
|
|
|
261
279
|
/* ── Artifacts: what an author writes ON the picture ────────────────── */
|
|
262
280
|
{
|
|
263
281
|
id: 'addTextAnnotation',
|
|
282
|
+
key: 'n',
|
|
264
283
|
label: 'Text annotation',
|
|
265
284
|
iconKey: 'bpmn.text-annotation',
|
|
266
285
|
kind: 'artefact',
|
|
@@ -428,8 +447,10 @@ const toolboxCommands = SPECS.map((spec, order) => {
|
|
|
428
447
|
: ['catalogue', 'palette', 'agent'],
|
|
429
448
|
order,
|
|
430
449
|
scope: 'edgeless',
|
|
431
|
-
defaultKeys:
|
|
432
|
-
|
|
450
|
+
defaultKeys: frameworkChord(BPMN_CHORD_PREFIX, spec.key),
|
|
451
|
+
// It WRITES: a read-only document is one it cannot run on, so no surface
|
|
452
|
+
// offers it there and no chord arms for it (`docs/adr/0055`).
|
|
453
|
+
availability: 'editable',
|
|
433
454
|
run: gestureOf(spec),
|
|
434
455
|
telemetry: { framework: 'bpmn', element: spec.element, board: spec.board },
|
|
435
456
|
...(legend ? { legend } : {}),
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formicoidea/labre-framework-bpmn",
|
|
3
3
|
"description": "Labre bpmn framework for @formicoidea/labre-core.",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "lajola",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@formicoidea/labre-core": "4.
|
|
38
|
+
"@formicoidea/labre-core": "4.2.0",
|
|
39
39
|
"@preact/signals-core": "^1.8.0",
|
|
40
40
|
"lit": "^3.2.0"
|
|
41
41
|
}
|