@formicoidea/labre-framework-ddd-event-storming 0.32.0 → 0.33.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 +29 -0
- package/dist/actions.js +78 -0
- package/dist/background.d.ts +2 -0
- package/dist/background.js +138 -0
- package/dist/commands.js +46 -5
- package/dist/descriptor.d.ts +7 -2
- package/dist/descriptor.js +5 -2
- package/dist/element-renderer.d.ts +17 -0
- package/dist/element-renderer.js +15 -0
- package/dist/element-view.d.ts +18 -0
- package/dist/element-view.js +19 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +7 -2
- package/dist/legend.d.ts +16 -0
- package/dist/legend.js +58 -0
- package/dist/nudges.d.ts +26 -0
- package/dist/nudges.js +73 -0
- package/dist/profiles.d.ts +2 -0
- package/dist/profiles.js +121 -0
- package/dist/roles.d.ts +62 -0
- package/dist/roles.js +84 -0
- package/dist/rules.d.ts +20 -0
- package/dist/rules.js +241 -0
- package/dist/toolbar/board-config.d.ts +29 -0
- package/dist/toolbar/board-config.js +86 -0
- package/dist/toolbar/event-storming-menu.d.ts +1 -1
- package/dist/toolbar/event-storming-menu.js +1 -1
- package/dist/toolbar/senior-button.d.ts +1 -0
- package/dist/toolbar/senior-button.js +1 -0
- package/dist/toolbar/senior-tool.js +1 -0
- package/dist/translations.d.ts +7 -5
- package/dist/translations.js +14 -7
- package/dist/view.d.ts +17 -1
- package/dist/view.js +61 -3
- package/package.json +3 -3
|
@@ -2,5 +2,6 @@ import { DddSeniorButtonBase } from '@formicoidea/labre-ddd-shared';
|
|
|
2
2
|
export declare class EdgelessDddEventStormingSeniorButton extends DddSeniorButtonBase {
|
|
3
3
|
protected menuTag: "edgeless-ddd-event-storming-menu";
|
|
4
4
|
protected label: string;
|
|
5
|
+
protected labelKey: string;
|
|
5
6
|
protected icon: import("lit-html").TemplateResult<2>;
|
|
6
7
|
}
|
|
@@ -4,6 +4,7 @@ export class EdgelessDddEventStormingSeniorButton extends DddSeniorButtonBase {
|
|
|
4
4
|
super(...arguments);
|
|
5
5
|
this.menuTag = 'edgeless-ddd-event-storming-menu';
|
|
6
6
|
this.label = 'Event Storming';
|
|
7
|
+
this.labelKey = 'com.labre.framework.ddd-event-storming';
|
|
7
8
|
this.icon = eventStormingToolbarIcon;
|
|
8
9
|
}
|
|
9
10
|
}
|
|
@@ -3,6 +3,7 @@ import { html } from 'lit';
|
|
|
3
3
|
/** Independent senior tool — Event Storming. */
|
|
4
4
|
export const eventStormingSeniorTool = SeniorToolExtension('ddd-event-storming', ({ block }) => ({
|
|
5
5
|
name: 'Event Storming',
|
|
6
|
+
labelKey: 'com.labre.framework.ddd-event-storming',
|
|
6
7
|
content: html `<edgeless-ddd-event-storming-senior-button
|
|
7
8
|
.edgeless=${block}
|
|
8
9
|
></edgeless-ddd-event-storming-senior-button>`,
|
package/dist/translations.d.ts
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { type TranslationKeyManifestEntry } from '@formicoidea/labre-core/std';
|
|
2
2
|
/**
|
|
3
|
-
* THIS framework's contribution to the translation-key manifest
|
|
3
|
+
* THIS framework's contribution to the translation-key manifest — every
|
|
4
|
+
* `com.labre.*` key Event Storming can hand to `TranslationProvider.t`,
|
|
5
|
+
* derived from the very declarations the editor registers (never restated).
|
|
4
6
|
*
|
|
5
7
|
* Its command labels and descriptions are built from a TEMPLATE, so the
|
|
6
|
-
* concrete keys exist nowhere but in the declarations themselves and the
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
8
|
+
* concrete keys exist nowhere but in the declarations themselves and the core
|
|
9
|
+
* manifest could not restate them even if it wanted to. The contribution
|
|
10
|
+
* therefore ships WITH the framework: in the bundled distribution
|
|
11
|
+
* `@formicoidea/labre-framework-ddd-event-storming` carries it, and a host
|
|
10
12
|
* composes it into its catalogue exactly as it already composes
|
|
11
13
|
* `eventStormingCommands` into the command registry. See
|
|
12
14
|
* `packages/affine/all/src/translations.ts`.
|
package/dist/translations.js
CHANGED
|
@@ -1,15 +1,22 @@
|
|
|
1
|
-
import { commandTranslationEntries, } from '@formicoidea/labre-core/std';
|
|
1
|
+
import { collectTranslationKeys, commandTranslationEntries, mergeTranslationEntries, } from '@formicoidea/labre-core/std';
|
|
2
|
+
import { EVENT_STORMING_BACKGROUND } from './background.js';
|
|
2
3
|
import { eventStormingCommands } from './commands.js';
|
|
4
|
+
import { EVENT_STORMING_NUDGES } from './nudges.js';
|
|
5
|
+
import { EVENT_STORMING_PROFILES } from './profiles.js';
|
|
6
|
+
import { EVENT_STORMING_ROLES } from './roles.js';
|
|
7
|
+
import { EVENT_STORMING_RULES } from './rules.js';
|
|
3
8
|
/**
|
|
4
|
-
* THIS framework's contribution to the translation-key manifest
|
|
9
|
+
* THIS framework's contribution to the translation-key manifest — every
|
|
10
|
+
* `com.labre.*` key Event Storming can hand to `TranslationProvider.t`,
|
|
11
|
+
* derived from the very declarations the editor registers (never restated).
|
|
5
12
|
*
|
|
6
13
|
* Its command labels and descriptions are built from a TEMPLATE, so the
|
|
7
|
-
* concrete keys exist nowhere but in the declarations themselves and the
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
14
|
+
* concrete keys exist nowhere but in the declarations themselves and the core
|
|
15
|
+
* manifest could not restate them even if it wanted to. The contribution
|
|
16
|
+
* therefore ships WITH the framework: in the bundled distribution
|
|
17
|
+
* `@formicoidea/labre-framework-ddd-event-storming` carries it, and a host
|
|
11
18
|
* composes it into its catalogue exactly as it already composes
|
|
12
19
|
* `eventStormingCommands` into the command registry. See
|
|
13
20
|
* `packages/affine/all/src/translations.ts`.
|
|
14
21
|
*/
|
|
15
|
-
export const eventStormingTranslationEntries = commandTranslationEntries(eventStormingCommands);
|
|
22
|
+
export const eventStormingTranslationEntries = mergeTranslationEntries(commandTranslationEntries(eventStormingCommands), collectTranslationKeys('role', EVENT_STORMING_ROLES), collectTranslationKeys('background', EVENT_STORMING_BACKGROUND), collectTranslationKeys('rule', EVENT_STORMING_RULES), collectTranslationKeys('nudge', EVENT_STORMING_NUDGES), collectTranslationKeys('profile', EVENT_STORMING_PROFILES));
|
package/dist/view.d.ts
CHANGED
|
@@ -1,6 +1,22 @@
|
|
|
1
1
|
import { type ViewExtensionContext, ViewExtensionProvider } from '@formicoidea/labre-core/ext-loader';
|
|
2
2
|
/**
|
|
3
|
-
* Event Storming —
|
|
3
|
+
* Event Storming rendering — ALWAYS registered, independent of any flag.
|
|
4
|
+
* Disabling `ddd-event-storming` hides only the creation tooling (see
|
|
5
|
+
* {@link DddEventStormingViewExtension}); boards already stormed must still
|
|
6
|
+
* paint, stay selectable, stay movable and keep their contextual toolbar. See
|
|
7
|
+
* `docs/adr/0009`.
|
|
8
|
+
*/
|
|
9
|
+
export declare class DddEventStormingRenderViewExtension extends ViewExtensionProvider {
|
|
10
|
+
name: string;
|
|
11
|
+
setup(context: ViewExtensionContext): void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Event Storming creation tooling — independently flag-gated
|
|
15
|
+
* (`ddd-event-storming`): the senior toolbar button, its palette and the
|
|
16
|
+
* validation rules, profiles and quality nudges. Both halves are tooling: a
|
|
17
|
+
* board stormed while the flag was on keeps rendering when it goes off, it just
|
|
18
|
+
* stops being checked — and the profile it was put on stays written, unread,
|
|
19
|
+
* until the flag comes back.
|
|
4
20
|
*
|
|
5
21
|
* Note: its Templates-panel category is registered by the aggregate package's
|
|
6
22
|
* {@link DddTemplatesViewExtension} (gated by `ddd-templates`), so templates
|
package/dist/view.js
CHANGED
|
@@ -1,10 +1,54 @@
|
|
|
1
|
+
import { QualityNudgeExtension, validationToolbarConfig, ValidationProfileExtension, ValidationRuleExtension, } from '@formicoidea/labre-core/blocks/surface';
|
|
1
2
|
import { ViewExtensionProvider, } from '@formicoidea/labre-core/ext-loader';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
3
|
+
import { ToolbarModuleExtension } from '@formicoidea/labre-core/shared/services';
|
|
4
|
+
import { BlockFlavourIdentifier, CommandExtension } from '@formicoidea/labre-core/std';
|
|
5
|
+
import { RoleVocabularyExtension } from '@formicoidea/labre-core/std/gfx';
|
|
6
|
+
import { eventStormingCommandIcons, eventStormingCommands } from './commands.js';
|
|
4
7
|
import { eventStormingEffects } from './effects.js';
|
|
8
|
+
import { EventStormingRendererExtension } from './element-renderer.js';
|
|
9
|
+
import { EventStormingInteraction, EventStormingView } from './element-view.js';
|
|
10
|
+
import { EVENT_STORMING_NUDGES } from './nudges.js';
|
|
11
|
+
import { EVENT_STORMING_PROFILES } from './profiles.js';
|
|
12
|
+
import { EVENT_STORMING_ROLES } from './roles.js';
|
|
13
|
+
import { EVENT_STORMING_RULES } from './rules.js';
|
|
14
|
+
import { eventStormingBoardToolbarExtension } from './toolbar/board-config.js';
|
|
5
15
|
import { eventStormingSeniorTool } from './toolbar/senior-tool.js';
|
|
6
16
|
/**
|
|
7
|
-
* Event Storming —
|
|
17
|
+
* Event Storming rendering — ALWAYS registered, independent of any flag.
|
|
18
|
+
* Disabling `ddd-event-storming` hides only the creation tooling (see
|
|
19
|
+
* {@link DddEventStormingViewExtension}); boards already stormed must still
|
|
20
|
+
* paint, stay selectable, stay movable and keep their contextual toolbar. See
|
|
21
|
+
* `docs/adr/0009`.
|
|
22
|
+
*/
|
|
23
|
+
export class DddEventStormingRenderViewExtension extends ViewExtensionProvider {
|
|
24
|
+
constructor() {
|
|
25
|
+
super(...arguments);
|
|
26
|
+
this.name = 'affine-ddd-event-storming-render-gfx';
|
|
27
|
+
}
|
|
28
|
+
setup(context) {
|
|
29
|
+
super.setup(context);
|
|
30
|
+
context.register(EventStormingView);
|
|
31
|
+
context.register(EventStormingRendererExtension);
|
|
32
|
+
// The role VOCABULARY, always on. A role is written in the DOCUMENT, not in
|
|
33
|
+
// the tooling: the direction reveal of a typed flow, the inversion command
|
|
34
|
+
// and the toolbar entry that must not lie about one all read this, and they
|
|
35
|
+
// have to keep working on a board stormed while the flag was on and opened
|
|
36
|
+
// while it is off (`docs/adr/0009`, `docs/adr/0010`). The rules that JUDGE
|
|
37
|
+
// those roles stay in the flag-gated extension below.
|
|
38
|
+
context.register(RoleVocabularyExtension(EVENT_STORMING_ROLES));
|
|
39
|
+
if (this.isEdgeless(context.scope)) {
|
|
40
|
+
context.register(EventStormingInteraction);
|
|
41
|
+
context.register(eventStormingBoardToolbarExtension);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Event Storming creation tooling — independently flag-gated
|
|
47
|
+
* (`ddd-event-storming`): the senior toolbar button, its palette and the
|
|
48
|
+
* validation rules, profiles and quality nudges. Both halves are tooling: a
|
|
49
|
+
* board stormed while the flag was on keeps rendering when it goes off, it just
|
|
50
|
+
* stops being checked — and the profile it was put on stays written, unread,
|
|
51
|
+
* until the flag comes back.
|
|
8
52
|
*
|
|
9
53
|
* Note: its Templates-panel category is registered by the aggregate package's
|
|
10
54
|
* {@link DddTemplatesViewExtension} (gated by `ddd-templates`), so templates
|
|
@@ -22,6 +66,20 @@ export class DddEventStormingViewExtension extends ViewExtensionProvider {
|
|
|
22
66
|
setup(context) {
|
|
23
67
|
super.setup(context);
|
|
24
68
|
if (this.isEdgeless(context.scope)) {
|
|
69
|
+
context.register(ValidationRuleExtension(EVENT_STORMING_RULES));
|
|
70
|
+
context.register(ValidationProfileExtension(EVENT_STORMING_PROFILES));
|
|
71
|
+
context.register(QualityNudgeExtension(EVENT_STORMING_NUDGES));
|
|
72
|
+
// The Validation dropdown on a selected board's contextual toolbar. A
|
|
73
|
+
// SECOND module on the same element, through the `custom:` flavour slot:
|
|
74
|
+
// `eventStormingBoardToolbarExtension` is registered always-on because a
|
|
75
|
+
// stored board must keep its resize toggle, while choosing how hard to
|
|
76
|
+
// check it is tooling and belongs here. The config names no framework —
|
|
77
|
+
// it reads roles and profiles — so it is the very same object Wardley
|
|
78
|
+
// registers on its own flavour.
|
|
79
|
+
context.register(ToolbarModuleExtension({
|
|
80
|
+
id: BlockFlavourIdentifier('custom:affine:surface:eventStorming'),
|
|
81
|
+
config: validationToolbarConfig,
|
|
82
|
+
}));
|
|
25
83
|
context.register(eventStormingSeniorTool);
|
|
26
84
|
context.register(CommandExtension(eventStormingCommands, eventStormingCommandIcons));
|
|
27
85
|
}
|
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.33.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "lajola",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"dist"
|
|
28
28
|
],
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@formicoidea/labre-core": "0.
|
|
31
|
-
"@formicoidea/labre-ddd-shared": "0.
|
|
30
|
+
"@formicoidea/labre-core": "0.33.0",
|
|
31
|
+
"@formicoidea/labre-ddd-shared": "0.33.0",
|
|
32
32
|
"lit": "^3.2.0"
|
|
33
33
|
}
|
|
34
34
|
}
|