@formicoidea/labre-framework-ddd-context-map 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 +3 -3
- package/dist/commands.js +17 -2
- package/package.json +3 -3
|
@@ -21,7 +21,7 @@ export const contextMapCommandsManifest = [
|
|
|
21
21
|
labelKey: 'com.labre.commands.ddd-context-map.addBoard',
|
|
22
22
|
labelFallback: 'Context Map board',
|
|
23
23
|
scope: 'edgeless',
|
|
24
|
-
defaultKeys: { mac: [], other: [] },
|
|
24
|
+
defaultKeys: { mac: ['d', 'm'], other: ['d', 'm'] },
|
|
25
25
|
},
|
|
26
26
|
{
|
|
27
27
|
id: 'ddd-context-map.addBoundedContext',
|
|
@@ -29,7 +29,7 @@ export const contextMapCommandsManifest = [
|
|
|
29
29
|
labelKey: 'com.labre.commands.ddd-context-map.addBoundedContext',
|
|
30
30
|
labelFallback: 'Bounded Context',
|
|
31
31
|
scope: 'edgeless',
|
|
32
|
-
defaultKeys: { mac: [], other: [] },
|
|
32
|
+
defaultKeys: { mac: ['d', 'b'], other: ['d', 'b'] },
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
id: 'ddd-context-map.addCloud',
|
|
@@ -37,7 +37,7 @@ export const contextMapCommandsManifest = [
|
|
|
37
37
|
labelKey: 'com.labre.commands.ddd-context-map.addCloud',
|
|
38
38
|
labelFallback: 'Cloud / System (Big Ball of Mud)',
|
|
39
39
|
scope: 'edgeless',
|
|
40
|
-
defaultKeys: { mac: [], other: [] },
|
|
40
|
+
defaultKeys: { mac: ['d', 's'], other: ['d', 's'] },
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
id: 'ddd-context-map.addPartnership',
|
package/dist/commands.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { addBubble, addCloud, CLOUD, CM_BUBBLE, CM_RELATIONSHIPS, contextMapToolbarIcon, LABEL_COLOR, placeDddElement, } from '@formicoidea/labre-ddd-shared';
|
|
2
2
|
import { NOTATION_NEUTRALS } from '@formicoidea/labre-core/shared/consts';
|
|
3
3
|
import { translateKey, } from '@formicoidea/labre-core/shared/services';
|
|
4
|
+
import { frameworkChord } from '@formicoidea/labre-core/shared/utils';
|
|
4
5
|
import { GfxControllerIdentifier } from '@formicoidea/labre-core/std/gfx';
|
|
5
6
|
import { svg } from 'lit';
|
|
6
7
|
import { activateContextMapRelationship, createContextMapBoard, } from './actions.js';
|
|
@@ -9,6 +10,15 @@ import { CONTEXT_MAP_SEED_BOUNDED_CONTEXT, CONTEXT_MAP_SEED_CLOUD, } from './see
|
|
|
9
10
|
// Declared in `seeds.ts` (editor-free, for the toolbox) and re-exported here,
|
|
10
11
|
// where `translations.ts` has always read them.
|
|
11
12
|
export { CONTEXT_MAP_SEED_BOUNDED_CONTEXT, CONTEXT_MAP_SEED_CLOUD };
|
|
13
|
+
/**
|
|
14
|
+
* The first keystroke of every Context Map chord (`d b` places a bounded
|
|
15
|
+
* context). The two DDD boards SHARE `d` by product decision: their second keys
|
|
16
|
+
* are unique across both (`chord-prefixes.unit.spec.ts`), so `d` reads as
|
|
17
|
+
* "DDD" whichever board you are on. Spelled again as
|
|
18
|
+
* `FrameworkDescriptor.chordPrefix` in `@labre/affine`'s `frameworks.ts`,
|
|
19
|
+
* held together by the same spec (`docs/adr/0055`).
|
|
20
|
+
*/
|
|
21
|
+
const DDD_CHORD_PREFIX = 'd';
|
|
12
22
|
/**
|
|
13
23
|
* The automatic legend's own section titles — text stamped onto the board the
|
|
14
24
|
* moment the legend is built, like any other seed, and declared HERE because
|
|
@@ -49,6 +59,7 @@ const relationSwatch = (dashed, arrow) => svg `<svg viewBox="0 0 24 24" fill="no
|
|
|
49
59
|
const SPECS = [
|
|
50
60
|
{
|
|
51
61
|
id: 'addBoard',
|
|
62
|
+
key: 'm',
|
|
52
63
|
label: 'Context Map board',
|
|
53
64
|
iconKey: 'ddd-context-map.board',
|
|
54
65
|
// A NEW telemetry value, and the only one in this file: every other entry
|
|
@@ -63,6 +74,7 @@ const SPECS = [
|
|
|
63
74
|
},
|
|
64
75
|
{
|
|
65
76
|
id: 'addBoundedContext',
|
|
77
|
+
key: 'b',
|
|
66
78
|
label: 'Bounded Context',
|
|
67
79
|
iconKey: 'ddd-context-map.bubble',
|
|
68
80
|
element: 'bounded-context',
|
|
@@ -82,6 +94,7 @@ const SPECS = [
|
|
|
82
94
|
},
|
|
83
95
|
{
|
|
84
96
|
id: 'addCloud',
|
|
97
|
+
key: 's',
|
|
85
98
|
label: 'Cloud / System (Big Ball of Mud)',
|
|
86
99
|
iconKey: 'ddd-context-map.cloud',
|
|
87
100
|
element: 'cloud',
|
|
@@ -137,8 +150,10 @@ export const contextMapCommands = SPECS.map((spec, order) => ({
|
|
|
137
150
|
surfaces: ['senior-menu', 'catalogue', 'palette', 'agent'],
|
|
138
151
|
order,
|
|
139
152
|
scope: 'edgeless',
|
|
140
|
-
defaultKeys:
|
|
141
|
-
|
|
153
|
+
defaultKeys: frameworkChord(DDD_CHORD_PREFIX, spec.key),
|
|
154
|
+
// It WRITES: a read-only document is one it cannot run on, so no surface
|
|
155
|
+
// offers it there and no chord arms for it (`docs/adr/0055`).
|
|
156
|
+
availability: 'editable',
|
|
142
157
|
run: spec.run,
|
|
143
158
|
telemetry: {
|
|
144
159
|
framework: 'ddd-context-map',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formicoidea/labre-framework-ddd-context-map",
|
|
3
3
|
"description": "Labre ddd-context-map 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,8 +35,8 @@
|
|
|
35
35
|
"dist"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@formicoidea/labre-core": "4.
|
|
39
|
-
"@formicoidea/labre-ddd-shared": "4.
|
|
38
|
+
"@formicoidea/labre-core": "4.2.0",
|
|
39
|
+
"@formicoidea/labre-ddd-shared": "4.2.0",
|
|
40
40
|
"lit": "^3.2.0"
|
|
41
41
|
}
|
|
42
42
|
}
|