@formicoidea/labre-framework-ddd-event-storming 0.40.0 → 0.41.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.js +8 -3
- package/dist/legend.js +8 -3
- package/dist/templates.js +6 -1
- package/dist/translations.d.ts +10 -0
- package/dist/translations.js +26 -1
- package/package.json +3 -3
package/dist/commands.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { addSticky, ES_HOTSPOT, ES_STICKIES, placeDddElement, STICKY_SIZE, } from '@formicoidea/labre-ddd-shared';
|
|
1
|
+
import { addSticky, esStickySeedKey, ES_HOTSPOT, ES_STICKIES, placeDddElement, STICKY_SIZE, } from '@formicoidea/labre-ddd-shared';
|
|
2
2
|
import { NOTATION_NEUTRALS } from '@formicoidea/labre-core/shared/consts';
|
|
3
|
+
import { translateKey } from '@formicoidea/labre-core/shared/services';
|
|
3
4
|
import { GfxControllerIdentifier } from '@formicoidea/labre-core/std/gfx';
|
|
4
5
|
import { svg } from 'lit';
|
|
5
6
|
import { activateEventStormingFlow, createEventStormingBoard } from './actions.js';
|
|
@@ -49,7 +50,10 @@ const SPECS = [
|
|
|
49
50
|
run: std => placeDddElement(std, (surface, cx, cy) => addSticky(surface, std, cx, cy, {
|
|
50
51
|
fill: preset.fill,
|
|
51
52
|
text: preset.text,
|
|
52
|
-
|
|
53
|
+
// Translated HERE and once: the caption is document content the
|
|
54
|
+
// moment it lands (ADR 0016), so the host's catalogue is asked at
|
|
55
|
+
// placement and never again.
|
|
56
|
+
label: translateKey(std, esStickySeedKey(preset.kind), preset.label),
|
|
53
57
|
size: preset.kind === 'aggregate' ? AGGREGATE_SIZE : STICKY_SIZE,
|
|
54
58
|
// The role is what makes a sticky a domain EVENT rather than an
|
|
55
59
|
// orange square: every rule in `rules.ts` reads it, and a sticky
|
|
@@ -67,7 +71,8 @@ const SPECS = [
|
|
|
67
71
|
run: std => placeDddElement(std, (surface, cx, cy) => addSticky(surface, std, cx, cy, {
|
|
68
72
|
fill: ES_HOTSPOT.fill,
|
|
69
73
|
text: ES_HOTSPOT.text,
|
|
70
|
-
|
|
74
|
+
// Translated HERE and once, like every sticky above (ADR 0016).
|
|
75
|
+
label: translateKey(std, esStickySeedKey('hotspot'), ES_HOTSPOT.label),
|
|
71
76
|
shapeType: 'diamond',
|
|
72
77
|
// Typed like the rest, and cited by no grammar triplet on purpose —
|
|
73
78
|
// an arc onto a hotspot is a question being parked. See `rules.ts`.
|
package/dist/legend.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { ES_HOTSPOT, ES_STICKIES, LABEL_COLOR, roleLabel, } from '@formicoidea/labre-ddd-shared';
|
|
2
|
+
import { BOARD_LEGEND_TITLE } from '@formicoidea/labre-core/shared/services';
|
|
2
3
|
import { ES_ROLE, ES_STICKY_ROLE, EVENT_STORMING_ROLES } from './roles.js';
|
|
4
|
+
import { ES_SEED_LEGEND_FLOW, ES_SEED_LEGEND_STICKIES } from './translations.js';
|
|
3
5
|
/**
|
|
4
6
|
* What the Event Storming board's automatic legend can say — a TABLE, and
|
|
5
7
|
* nothing else: the scan, the placement and the box are `createAutoLegend`'s
|
|
@@ -15,11 +17,13 @@ import { ES_ROLE, ES_STICKY_ROLE, EVENT_STORMING_ROLES } from './roles.js';
|
|
|
15
17
|
* its own preset (a diamond, not a square) rather than in the table.
|
|
16
18
|
*/
|
|
17
19
|
export const EVENT_STORMING_AUTO_LEGEND = {
|
|
18
|
-
title:
|
|
20
|
+
title: BOARD_LEGEND_TITLE[1],
|
|
21
|
+
titleKey: BOARD_LEGEND_TITLE[0],
|
|
19
22
|
roles: EVENT_STORMING_ROLES,
|
|
20
23
|
sections: [
|
|
21
24
|
{
|
|
22
|
-
title:
|
|
25
|
+
title: ES_SEED_LEGEND_STICKIES[1],
|
|
26
|
+
titleKey: ES_SEED_LEGEND_STICKIES[0],
|
|
23
27
|
entries: [
|
|
24
28
|
...ES_STICKIES.map(preset => ({
|
|
25
29
|
role: ES_STICKY_ROLE[preset.kind],
|
|
@@ -40,7 +44,8 @@ export const EVENT_STORMING_AUTO_LEGEND = {
|
|
|
40
44
|
],
|
|
41
45
|
},
|
|
42
46
|
{
|
|
43
|
-
title:
|
|
47
|
+
title: ES_SEED_LEGEND_FLOW[1],
|
|
48
|
+
titleKey: ES_SEED_LEGEND_FLOW[0],
|
|
44
49
|
entries: [
|
|
45
50
|
{
|
|
46
51
|
role: ES_ROLE.flow,
|
package/dist/templates.js
CHANGED
|
@@ -31,8 +31,13 @@ const dia = (c) => `<svg ${ATTRS}><rect x="48" y="20" width="40" height="40" tra
|
|
|
31
31
|
const BOARD_PREVIEW = `<svg ${ATTRS} fill="none"><rect x="4" y="6" width="127" height="68" rx="6" fill="${NOTATION_NEUTRALS.cardFill}" stroke="${NOTATION_NEUTRALS.cardBorder}" stroke-width="1.5"/><rect x="14" y="18" width="18" height="18" rx="3" fill="${ES_STICKIES[0].fill}"/><rect x="38" y="18" width="18" height="18" rx="3" fill="${ES_STICKIES[1].fill}"/><rect x="62" y="18" width="18" height="18" rx="3" fill="${ES_STICKIES[2].fill}"/><rect x="86" y="18" width="18" height="18" rx="3" fill="${ES_STICKIES[3].fill}"/><path d="M12 58 H114" stroke="${NOTATION_NEUTRALS.frameInk}" stroke-width="3"/><path d="M112 53 L122 58 L112 63 Z" fill="${NOTATION_NEUTRALS.frameInk}"/></svg>`;
|
|
32
32
|
export const eventStormingTemplateCategory = {
|
|
33
33
|
name: 'Event Storming',
|
|
34
|
+
// Reuses the senior button's own key — see `TemplateCategory.nameKey`.
|
|
35
|
+
nameKey: 'com.labre.framework.ddd-event-storming',
|
|
34
36
|
templates: [
|
|
35
|
-
|
|
37
|
+
// No name override: it would only restate the command's own
|
|
38
|
+
// `labelFallback` as a second literal the panel could not translate — see
|
|
39
|
+
// `resolveTemplateName`, which reads the command's `labelKey` instead.
|
|
40
|
+
templateFromCommand(byLabel('Event Storming board'), BOARD_PREVIEW),
|
|
36
41
|
...ES_STICKIES.map(preset => templateFromCommand(byLabel(preset.label), sq(preset.fill), `Event Storming — ${preset.label}`)),
|
|
37
42
|
templateFromCommand(byLabel(ES_HOTSPOT.label), dia(ES_HOTSPOT.fill), `Event Storming — ${ES_HOTSPOT.label}`),
|
|
38
43
|
],
|
package/dist/translations.d.ts
CHANGED
|
@@ -1,4 +1,14 @@
|
|
|
1
|
+
import type { ChromeWording } from '@formicoidea/labre-core/shared/services';
|
|
1
2
|
import { type TranslationKeyManifestEntry } from '@formicoidea/labre-core/std';
|
|
3
|
+
/**
|
|
4
|
+
* The automatic legend's own section titles (`legend.ts`) — text stamped onto
|
|
5
|
+
* the board the moment the legend is built (`createAutoLegend`), like any
|
|
6
|
+
* other seed. The box title itself is NOT here: it says the shared word
|
|
7
|
+
* "Legend", so it reuses `BOARD_LEGEND_TITLE`
|
|
8
|
+
* (`@labre/affine-shared/services`) instead of a key of its own.
|
|
9
|
+
*/
|
|
10
|
+
export declare const ES_SEED_LEGEND_STICKIES: ChromeWording;
|
|
11
|
+
export declare const ES_SEED_LEGEND_FLOW: ChromeWording;
|
|
2
12
|
/**
|
|
3
13
|
* THIS framework's contribution to the translation-key manifest — every
|
|
4
14
|
* `com.labre.*` key Event Storming can hand to `TranslationProvider.t`,
|
package/dist/translations.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { dddSharedTranslationEntries } from '@formicoidea/labre-ddd-shared';
|
|
1
2
|
import { collectTranslationKeys, commandCategoryTranslationEntries, commandTranslationEntries, mergeTranslationEntries, } from '@formicoidea/labre-core/std';
|
|
2
3
|
import { EVENT_STORMING_BACKGROUND } from './background.js';
|
|
3
4
|
import { eventStormingCommands } from './commands.js';
|
|
@@ -6,6 +7,21 @@ import { EVENT_STORMING_PROFILES } from './profiles.js';
|
|
|
6
7
|
import { EVENT_STORMING_READING } from './reading.js';
|
|
7
8
|
import { EVENT_STORMING_ROLES } from './roles.js';
|
|
8
9
|
import { EVENT_STORMING_RULES } from './rules.js';
|
|
10
|
+
/**
|
|
11
|
+
* The automatic legend's own section titles (`legend.ts`) — text stamped onto
|
|
12
|
+
* the board the moment the legend is built (`createAutoLegend`), like any
|
|
13
|
+
* other seed. The box title itself is NOT here: it says the shared word
|
|
14
|
+
* "Legend", so it reuses `BOARD_LEGEND_TITLE`
|
|
15
|
+
* (`@labre/affine-shared/services`) instead of a key of its own.
|
|
16
|
+
*/
|
|
17
|
+
export const ES_SEED_LEGEND_STICKIES = [
|
|
18
|
+
'com.labre.ddd-event-storming.seed.legend-stickies',
|
|
19
|
+
'Stickies',
|
|
20
|
+
];
|
|
21
|
+
export const ES_SEED_LEGEND_FLOW = [
|
|
22
|
+
'com.labre.ddd-event-storming.seed.legend-flow',
|
|
23
|
+
'Flow',
|
|
24
|
+
];
|
|
9
25
|
/**
|
|
10
26
|
* THIS framework's contribution to the translation-key manifest — every
|
|
11
27
|
* `com.labre.*` key Event Storming can hand to `TranslationProvider.t`,
|
|
@@ -31,4 +47,13 @@ commandCategoryTranslationEntries(eventStormingCommands), collectTranslationKeys
|
|
|
31
47
|
// framework's own `roles`, so walking it reaches every role key the `role`
|
|
32
48
|
// line above already named. `mergeTranslationEntries` keeps the FIRST
|
|
33
49
|
// occurrence, which is what makes each key report the source it comes from.
|
|
34
|
-
collectTranslationKeys('reading', EVENT_STORMING_READING)
|
|
50
|
+
collectTranslationKeys('reading', EVENT_STORMING_READING),
|
|
51
|
+
// The seeds baked into a placed sticky (`commands.ts`), derived from the
|
|
52
|
+
// shared palette in `ddd-shared` rather than restated — spread whole
|
|
53
|
+
// rather than imported from a sibling DDD framework (never allowed), and
|
|
54
|
+
// de-duplicated with whatever this framework already listed.
|
|
55
|
+
dddSharedTranslationEntries, [ES_SEED_LEGEND_STICKIES, ES_SEED_LEGEND_FLOW].map(([key, fallback]) => ({
|
|
56
|
+
key,
|
|
57
|
+
fallback,
|
|
58
|
+
source: 'seed',
|
|
59
|
+
})));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formicoidea/labre-framework-ddd-event-storming",
|
|
3
3
|
"description": "Labre ddd-event-storming framework for @formicoidea/labre-core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.41.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "lajola",
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@formicoidea/labre-core": "0.
|
|
35
|
-
"@formicoidea/labre-ddd-shared": "0.
|
|
34
|
+
"@formicoidea/labre-core": "0.41.0",
|
|
35
|
+
"@formicoidea/labre-ddd-shared": "0.41.0",
|
|
36
36
|
"lit": "^3.2.0"
|
|
37
37
|
}
|
|
38
38
|
}
|