@formicoidea/labre-framework-bpmn 0.43.1 → 0.46.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/actions.d.ts +11 -1
- package/dist/actions.js +41 -11
- package/dist/consts.d.ts +72 -27
- package/dist/consts.js +106 -42
- package/dist/element-renderer.d.ts +1 -1
- package/dist/export.d.ts +12 -0
- package/dist/export.js +3 -1
- package/dist/import.d.ts +0 -11
- package/dist/import.js +98 -30
- package/dist/interchange.d.ts +7 -12
- package/dist/interchange.js +61 -22
- package/dist/morph.d.ts +37 -1
- package/dist/morph.js +124 -2
- package/dist/node/node-renderer.d.ts +1 -1
- package/dist/node/node-view.d.ts +24 -3
- package/dist/node/node-view.js +31 -4
- package/dist/presets.d.ts +32 -1
- package/dist/presets.js +44 -3
- package/dist/reading.js +41 -3
- package/dist/roles.d.ts +2 -1
- package/dist/roles.js +23 -0
- package/dist/rules.d.ts +4 -1
- package/dist/rules.js +24 -8
- package/dist/templates/index.d.ts +20 -0
- package/dist/templates/index.js +74 -14
- package/dist/toolbar/config.d.ts +2 -2
- package/dist/toolbar/node-config.d.ts +21 -0
- package/dist/toolbar/node-config.js +88 -0
- package/dist/toolbar/senior-tool.d.ts +1 -1
- package/dist/view.js +38 -16
- package/package.json +2 -2
package/dist/view.js
CHANGED
|
@@ -2,14 +2,14 @@ import { FrameworkBackgroundInteractionExtension, InterchangeExtension, morphToo
|
|
|
2
2
|
import { FrameworkPaletteExtension } from '@formicoidea/labre-core/components/color-picker';
|
|
3
3
|
import { ViewExtensionProvider, } from '@formicoidea/labre-core/ext-loader';
|
|
4
4
|
import { TemplateCategoryExtension } from '@formicoidea/labre-core/gfx/template';
|
|
5
|
-
import { ToolbarModuleExtension } from '@formicoidea/labre-core/shared/services';
|
|
5
|
+
import { ToolbarModuleExtension, toolbarModuleKey, } from '@formicoidea/labre-core/shared/services';
|
|
6
6
|
import { BlockFlavourIdentifier, CommandExtension } from '@formicoidea/labre-core/std';
|
|
7
7
|
import { RoleVocabularyExtension } from '@formicoidea/labre-core/std/gfx';
|
|
8
8
|
import { BPMN_POOL_BACKGROUND } from './background.js';
|
|
9
9
|
import { bpmnCommandIcons, bpmnCommands } from './commands.js';
|
|
10
10
|
import { effects } from './effects.js';
|
|
11
11
|
import { BPMN_INTERCHANGE } from './interchange.js';
|
|
12
|
-
import { BPMN_MORPH_SPEC } from './morph.js';
|
|
12
|
+
import { BPMN_GROUP_MORPH_SPEC, BPMN_MORPH_SPEC } from './morph.js';
|
|
13
13
|
import { BPMN_PROFILES } from './profiles.js';
|
|
14
14
|
import { BPMN_READINGS } from './reading.js';
|
|
15
15
|
import { BPMN_ROLES } from './roles.js';
|
|
@@ -20,6 +20,7 @@ import { BpmnPoolView } from './element-view.js';
|
|
|
20
20
|
import { BpmnNodeRendererExtension } from './node/node-renderer.js';
|
|
21
21
|
import { BpmnNodeView } from './node/node-view.js';
|
|
22
22
|
import { bpmnPoolToolbarExtension, bpmnPoolToolingToolbarExtension, } from './toolbar/config.js';
|
|
23
|
+
import { bpmnNodeToolbarExtension } from './toolbar/node-config.js';
|
|
23
24
|
import { BPMN_FRAMEWORK_PALETTE } from './toolbar/palette.js';
|
|
24
25
|
import { bpmnSeniorTool } from './toolbar/senior-tool.js';
|
|
25
26
|
/**
|
|
@@ -51,6 +52,11 @@ export class BpmnRenderViewExtension extends ViewExtensionProvider {
|
|
|
51
52
|
// otherwise, and the toolbar toggle is what writes it.
|
|
52
53
|
context.register(FrameworkBackgroundInteractionExtension(BPMN_POOL_BACKGROUND));
|
|
53
54
|
context.register(bpmnPoolToolbarExtension);
|
|
55
|
+
// The base shape features on a selected NODE — colours, stroke, text
|
|
56
|
+
// style — on the BARE `affine:surface:bpmnNode` key, like Wardley's and
|
|
57
|
+
// EDGY's node modules. Always on: recolouring a stored element is editing
|
|
58
|
+
// content, not tooling (`docs/adr/0009`).
|
|
59
|
+
context.register(bpmnNodeToolbarExtension);
|
|
54
60
|
}
|
|
55
61
|
}
|
|
56
62
|
}
|
|
@@ -94,25 +100,41 @@ export class BpmnViewExtension extends ViewExtensionProvider {
|
|
|
94
100
|
// The "Change type" dropdown on a selected NODE's contextual toolbar —
|
|
95
101
|
// the generic module, parameterized by BPMN's own families table.
|
|
96
102
|
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
103
|
+
// ## Why the key carries an owner
|
|
104
|
+
//
|
|
105
|
+
// `renderToolbar` merges by flavour KEY — the element's own, its
|
|
106
|
+
// `custom:` twin and the `affine:surface:*` wildcards — so
|
|
107
|
+
// `shapeToolbarExtension`, which binds `affine:surface:shape`, never
|
|
101
108
|
// reaches a bpmn node however much of `ShapeElementModel` the class
|
|
102
|
-
// inherits.
|
|
103
|
-
//
|
|
104
|
-
//
|
|
105
|
-
// `
|
|
109
|
+
// inherits. The bare `affine:surface:bpmnNode` key is now taken by the
|
|
110
|
+
// always-on `bpmnNodeToolbarExtension` (the shape's base features), and
|
|
111
|
+
// a second module on it would throw `DuplicateServiceDefinitionError`
|
|
112
|
+
// at setup. `toolbarModuleKey` lifts that ceiling: the morph is the
|
|
113
|
+
// DISTINCT variant `affine:surface:bpmnNode#bpmn-morph`, and the
|
|
114
|
+
// registry hands it to the same row.
|
|
106
115
|
//
|
|
107
|
-
//
|
|
108
|
-
//
|
|
109
|
-
//
|
|
110
|
-
//
|
|
111
|
-
//
|
|
116
|
+
// ## Why here
|
|
117
|
+
//
|
|
118
|
+
// In the flag-gated half, because a morph is TOOLING: a node drawn while
|
|
119
|
+
// the flag was on keeps its kind, its role, its glyph and its place in
|
|
120
|
+
// every rule when the flag goes off — it just stops being something the
|
|
121
|
+
// toolbar offers to say more precisely (`docs/adr/0009`).
|
|
112
122
|
context.register(ToolbarModuleExtension({
|
|
113
|
-
id: BlockFlavourIdentifier('affine:surface:bpmnNode'),
|
|
123
|
+
id: BlockFlavourIdentifier(toolbarModuleKey('affine:surface:bpmnNode', 'bpmn-morph')),
|
|
114
124
|
config: morphToolbarConfig(BPMN_MORPH_SPEC),
|
|
115
125
|
}));
|
|
126
|
+
// The same dropdown on the GROUP row. An event, a gateway or a data
|
|
127
|
+
// shape is born as a native group of the symbol and its gravitating
|
|
128
|
+
// label (R38), and a click selects the group — so, exactly as Wardley,
|
|
129
|
+
// C4 and UML do for their composites, the morph is also registered on
|
|
130
|
+
// `custom:affine:surface:group` under an owner, and
|
|
131
|
+
// `BPMN_GROUP_MORPH_SPEC` resolves the node inside (refusing any group
|
|
132
|
+
// that is not one BPMN external-label artefact). Flag-gated for the
|
|
133
|
+
// same reason as the node row.
|
|
134
|
+
context.register(ToolbarModuleExtension({
|
|
135
|
+
id: BlockFlavourIdentifier(toolbarModuleKey('custom:affine:surface:group', 'bpmn-morph')),
|
|
136
|
+
config: morphToolbarConfig(BPMN_GROUP_MORPH_SPEC),
|
|
137
|
+
}));
|
|
116
138
|
// The reversed reading (MF3): what the process says about an artefact, on
|
|
117
139
|
// demand. Four profiles because BPMN has four parent-less node families
|
|
118
140
|
// (`reading.ts` says why the notation refuses a common root). The CLICK
|
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": "0.
|
|
4
|
+
"version": "0.46.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "lajola",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@formicoidea/labre-core": "0.
|
|
34
|
+
"@formicoidea/labre-core": "0.46.0",
|
|
35
35
|
"lit": "^3.2.0"
|
|
36
36
|
}
|
|
37
37
|
}
|