@formicoidea/labre-framework-ddd-core-domain 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.
@@ -21,7 +21,7 @@ export const coreDomainCommandsManifest = [
21
21
  labelKey: 'com.labre.commands.ddd-core-domain.addChart',
22
22
  labelFallback: 'Core Domain Chart',
23
23
  scope: 'edgeless',
24
- defaultKeys: { mac: [], other: [] },
24
+ defaultKeys: { mac: ['d', 'c'], other: ['d', 'c'] },
25
25
  },
26
26
  {
27
27
  id: 'ddd-core-domain.addBigBet',
@@ -29,7 +29,7 @@ export const coreDomainCommandsManifest = [
29
29
  labelKey: 'com.labre.commands.ddd-core-domain.addBigBet',
30
30
  labelFallback: 'Big-bet sub-domain',
31
31
  scope: 'edgeless',
32
- defaultKeys: { mac: [], other: [] },
32
+ defaultKeys: { mac: ['d', 'g'], other: ['d', 'g'] },
33
33
  },
34
34
  {
35
35
  id: 'ddd-core-domain.addPlatform',
@@ -37,7 +37,7 @@ export const coreDomainCommandsManifest = [
37
37
  labelKey: 'com.labre.commands.ddd-core-domain.addPlatform',
38
38
  labelFallback: 'Platform sub-domain',
39
39
  scope: 'edgeless',
40
- defaultKeys: { mac: [], other: [] },
40
+ defaultKeys: { mac: ['d', 'p'], other: ['d', 'p'] },
41
41
  },
42
42
  {
43
43
  id: 'ddd-core-domain.addOutsourced',
@@ -45,7 +45,7 @@ export const coreDomainCommandsManifest = [
45
45
  labelKey: 'com.labre.commands.ddd-core-domain.addOutsourced',
46
46
  labelFallback: 'Outsourced / purchased',
47
47
  scope: 'edgeless',
48
- defaultKeys: { mac: [], other: [] },
48
+ defaultKeys: { mac: ['d', 'o'], other: ['d', 'o'] },
49
49
  },
50
50
  {
51
51
  id: 'ddd-core-domain.addBcCurrent',
@@ -53,7 +53,7 @@ export const coreDomainCommandsManifest = [
53
53
  labelKey: 'com.labre.commands.ddd-core-domain.addBcCurrent',
54
54
  labelFallback: 'Bounded context',
55
55
  scope: 'edgeless',
56
- defaultKeys: { mac: [], other: [] },
56
+ defaultKeys: { mac: ['d', 'n'], other: ['d', 'n'] },
57
57
  },
58
58
  {
59
59
  id: 'ddd-core-domain.addBcFuture',
@@ -61,7 +61,7 @@ export const coreDomainCommandsManifest = [
61
61
  labelKey: 'com.labre.commands.ddd-core-domain.addBcFuture',
62
62
  labelFallback: 'Future position',
63
63
  scope: 'edgeless',
64
- defaultKeys: { mac: [], other: [] },
64
+ defaultKeys: { mac: ['d', 'f'], other: ['d', 'f'] },
65
65
  },
66
66
  {
67
67
  id: 'ddd-core-domain.addCollaboration',
package/dist/commands.js CHANGED
@@ -1,9 +1,34 @@
1
1
  import { addDot, addMarker, cdSubdomainSeedKey, CD_SUBDOMAINS, coreDomainToolbarIcon, MOVEMENT_COLOR, placeDddElement, teamTopologySeedKey, TEAM_TOPOLOGIES, } 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 { svg } from 'lit';
5
6
  import { activateMovement, createCoreDomainChart } from './actions.js';
6
7
  import { CORE_DOMAIN_ROLE, CORE_DOMAIN_ROLES, markerRole, subdomainRole, } from './roles.js';
8
+ /**
9
+ * The first keystroke of every Core Domain Chart chord (`d c` places a
10
+ * chart). The two DDD boards SHARE `d` by product decision: their second keys
11
+ * are unique across both (`chord-prefixes.unit.spec.ts`), so `d` reads as
12
+ * "DDD" whichever board you are on. Spelled again as
13
+ * `FrameworkDescriptor.chordPrefix` in `@labre/affine`'s `frameworks.ts`,
14
+ * held together by the same spec (`docs/adr/0055`).
15
+ */
16
+ const DDD_CHORD_PREFIX = 'd';
17
+ /**
18
+ * The second keys of the five sub-domain dots, by preset kind: the dots are
19
+ * built from the shared `CD_SUBDOMAINS` presets, so their key is looked up
20
+ * here rather than written into a literal spec. `n` and `f` pair the two
21
+ * positions of a bounded context, now and future. A preset with no entry is
22
+ * keyless by intent; the three team-topology markers are, like Wardley's
23
+ * annotations, reached for once the chart is drawn.
24
+ */
25
+ const SUBDOMAIN_KEYS = {
26
+ bigBet: 'g',
27
+ platform: 'p',
28
+ outsourced: 'o',
29
+ bcCurrent: 'n',
30
+ bcFuture: 'f',
31
+ };
7
32
  /**
8
33
  * The legend wording of a sub-domain dot: the ROLE's own i18n key — so a host
9
34
  * catalogue still wins and no key is invented — with the PALETTE's shorter
@@ -55,6 +80,7 @@ const markerSwatch = (fill, letter) => svg `<svg width="24" height="24" viewBox=
55
80
  const SPECS = [
56
81
  {
57
82
  id: 'addChart',
83
+ key: 'c',
58
84
  label: 'Core Domain Chart',
59
85
  iconKey: 'ddd-core-domain.chart',
60
86
  element: 'background',
@@ -64,6 +90,7 @@ const SPECS = [
64
90
  },
65
91
  ...CD_SUBDOMAINS.map((preset) => ({
66
92
  id: `add${preset.kind[0].toUpperCase()}${preset.kind.slice(1)}`,
93
+ key: SUBDOMAIN_KEYS[preset.kind],
67
94
  label: preset.label,
68
95
  iconKey: `ddd-core-domain.subdomain.${preset.kind}`,
69
96
  element: `subdomain:${preset.kind}`,
@@ -147,8 +174,10 @@ export const coreDomainCommands = SPECS.map((spec, order) => ({
147
174
  surfaces: ['senior-menu', 'catalogue', 'palette', 'agent'],
148
175
  order,
149
176
  scope: 'edgeless',
150
- defaultKeys: { mac: [], other: [] },
151
- availability: 'always',
177
+ defaultKeys: frameworkChord(DDD_CHORD_PREFIX, spec.key),
178
+ // It WRITES: a read-only document is one it cannot run on, so no surface
179
+ // offers it there and no chord arms for it (`docs/adr/0055`).
180
+ availability: 'editable',
152
181
  run: spec.run,
153
182
  telemetry: {
154
183
  framework: 'ddd-core-domain',
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@formicoidea/labre-framework-ddd-core-domain",
3
3
  "description": "Labre ddd-core-domain framework for @formicoidea/labre-core.",
4
- "version": "4.0.0",
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.0.0",
39
- "@formicoidea/labre-ddd-shared": "4.0.0",
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
  }