@formicoidea/labre-framework-ddd-event-storming 0.37.0 → 0.38.1
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/templates.d.ts +2 -6
- package/dist/templates.js +36 -4
- package/dist/view.d.ts +1 -2
- package/dist/view.js +7 -2
- package/package.json +3 -3
package/dist/templates.d.ts
CHANGED
|
@@ -1,6 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* package so the aggregate package can register all DDD categories under the
|
|
4
|
-
* single `ddd-templates` flag; re-exported here for a stable per-package API.
|
|
5
|
-
*/
|
|
6
|
-
export { eventStormingTemplateCategory } from '@formicoidea/labre-ddd-shared';
|
|
1
|
+
import { type TemplateCategory } from '@formicoidea/labre-core/gfx/template';
|
|
2
|
+
export declare const eventStormingTemplateCategory: TemplateCategory;
|
package/dist/templates.js
CHANGED
|
@@ -1,6 +1,38 @@
|
|
|
1
|
+
import { ES_HOTSPOT, ES_STICKIES } from '@formicoidea/labre-ddd-shared';
|
|
2
|
+
import { templateFromCommand, } from '@formicoidea/labre-core/gfx/template';
|
|
3
|
+
import { eventStormingCommands } from './commands.js';
|
|
1
4
|
/**
|
|
2
|
-
* Event Storming
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
+
* The Event Storming palette — DERIVED from the toolbox, one template per
|
|
6
|
+
* placement command.
|
|
7
|
+
*
|
|
8
|
+
* It used to be hand-written surface JSON in `ddd-shared`, untouched since
|
|
9
|
+
* 2026-06-21 while the toolbox kept moving: a sticky was one flat rect instead
|
|
10
|
+
* of the shadow + face the prefab groups, it carried neither
|
|
11
|
+
* `textFitMode: Contained` nor the `es:*` role every rule reads, and there was
|
|
12
|
+
* no board template at all. Derived, none of that can happen again — and
|
|
13
|
+
* `__tests__/templates-parity.unit.spec.ts` re-runs each command and compares.
|
|
14
|
+
*
|
|
15
|
+
* The Flow entry has no template on purpose: it arms the connector tool and
|
|
16
|
+
* draws nothing (`docs/adr/0010`) — the user draws the arc.
|
|
5
17
|
*/
|
|
6
|
-
|
|
18
|
+
/** The command a derived template is the picture of. Throws rather than skips. */
|
|
19
|
+
function byLabel(label) {
|
|
20
|
+
const command = eventStormingCommands.find(entry => entry.labelFallback === label);
|
|
21
|
+
if (!command) {
|
|
22
|
+
throw new Error(`[ddd-event-storming] templates: no command "${label}"`);
|
|
23
|
+
}
|
|
24
|
+
return command;
|
|
25
|
+
}
|
|
26
|
+
const ATTRS = 'width="100%" height="100%" viewBox="0 0 135 80" xmlns="http://www.w3.org/2000/svg"';
|
|
27
|
+
const sq = (c) => `<svg ${ATTRS}><rect x="38" y="13" width="60" height="54" rx="5" fill="${c}"/></svg>`;
|
|
28
|
+
const dia = (c) => `<svg ${ATTRS}><rect x="48" y="20" width="40" height="40" transform="rotate(45 68 40)" fill="${c}"/></svg>`;
|
|
29
|
+
/** The roll, in miniature: a white card, a few stickies, and the one axis. */
|
|
30
|
+
const BOARD_PREVIEW = `<svg ${ATTRS} fill="none"><rect x="4" y="6" width="127" height="68" rx="6" fill="#ffffff" stroke="#d5d9e0" 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="#6d6e71" stroke-width="3"/><path d="M112 53 L122 58 L112 63 Z" fill="#6d6e71"/></svg>`;
|
|
31
|
+
export const eventStormingTemplateCategory = {
|
|
32
|
+
name: 'Event Storming',
|
|
33
|
+
templates: [
|
|
34
|
+
templateFromCommand(byLabel('Event Storming board'), BOARD_PREVIEW, 'Event Storming board'),
|
|
35
|
+
...ES_STICKIES.map(preset => templateFromCommand(byLabel(preset.label), sq(preset.fill), `Event Storming — ${preset.label}`)),
|
|
36
|
+
templateFromCommand(byLabel(ES_HOTSPOT.label), dia(ES_HOTSPOT.fill), `Event Storming — ${ES_HOTSPOT.label}`),
|
|
37
|
+
],
|
|
38
|
+
};
|
package/dist/view.d.ts
CHANGED
|
@@ -19,8 +19,7 @@ export declare class DddEventStormingRenderViewExtension extends ViewExtensionPr
|
|
|
19
19
|
* until the flag comes back.
|
|
20
20
|
*
|
|
21
21
|
* Note: its Templates-panel category is registered by the aggregate package's
|
|
22
|
-
*
|
|
23
|
-
* stay available even when this senior button is disabled.
|
|
22
|
+
* The Templates-panel category is registered here too (see `effect`).
|
|
24
23
|
*/
|
|
25
24
|
export declare class DddEventStormingViewExtension extends ViewExtensionProvider {
|
|
26
25
|
name: string;
|
package/dist/view.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { morphToolbarConfig, QualityNudgeExtension, ReadingProfileExtension, validationToolbarConfig, ValidationProfileExtension, ValidationRuleExtension, } from '@formicoidea/labre-core/blocks/surface';
|
|
2
2
|
import { ViewExtensionProvider, } from '@formicoidea/labre-core/ext-loader';
|
|
3
3
|
import { ToolbarModuleExtension, toolbarModuleKey, } from '@formicoidea/labre-core/shared/services';
|
|
4
|
+
import { extendTemplateCategory } from '@formicoidea/labre-core/gfx/template';
|
|
4
5
|
import { BlockFlavourIdentifier, CommandExtension } from '@formicoidea/labre-core/std';
|
|
5
6
|
import { RoleVocabularyExtension } from '@formicoidea/labre-core/std/gfx';
|
|
6
7
|
import { eventStormingCommandIcons, eventStormingCommands } from './commands.js';
|
|
8
|
+
import { eventStormingTemplateCategory } from './templates.js';
|
|
7
9
|
import { eventStormingEffects } from './effects.js';
|
|
8
10
|
import { EventStormingRendererExtension } from './element-renderer.js';
|
|
9
11
|
import { EventStormingInteraction, EventStormingView } from './element-view.js';
|
|
@@ -53,8 +55,7 @@ export class DddEventStormingRenderViewExtension extends ViewExtensionProvider {
|
|
|
53
55
|
* until the flag comes back.
|
|
54
56
|
*
|
|
55
57
|
* Note: its Templates-panel category is registered by the aggregate package's
|
|
56
|
-
*
|
|
57
|
-
* stay available even when this senior button is disabled.
|
|
58
|
+
* The Templates-panel category is registered here too (see `effect`).
|
|
58
59
|
*/
|
|
59
60
|
export class DddEventStormingViewExtension extends ViewExtensionProvider {
|
|
60
61
|
constructor() {
|
|
@@ -64,6 +65,10 @@ export class DddEventStormingViewExtension extends ViewExtensionProvider {
|
|
|
64
65
|
effect() {
|
|
65
66
|
super.effect();
|
|
66
67
|
eventStormingEffects();
|
|
68
|
+
// The Templates-panel category, gated by this framework's own flag like
|
|
69
|
+
// every other framework's: a template is tooling (`docs/adr/0009`), and it
|
|
70
|
+
// is DERIVED from this package's commands, so it registers where they do.
|
|
71
|
+
extendTemplateCategory(eventStormingTemplateCategory);
|
|
67
72
|
}
|
|
68
73
|
setup(context) {
|
|
69
74
|
super.setup(context);
|
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.38.1",
|
|
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.38.1",
|
|
35
|
+
"@formicoidea/labre-ddd-shared": "0.38.1",
|
|
36
36
|
"lit": "^3.2.0"
|
|
37
37
|
}
|
|
38
38
|
}
|