@formicoidea/labre-framework-ddd-core-domain 0.41.0 → 0.43.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/LICENSE +384 -0
- package/dist/commands.d.ts +15 -0
- package/dist/commands.js +76 -7
- package/dist/core-domain/background.js +83 -10
- package/dist/core-domain/element-view.d.ts +11 -2
- package/dist/core-domain/element-view.js +12 -3
- package/dist/core-domain/toolbar-config.d.ts +22 -1
- package/dist/core-domain/toolbar-config.js +38 -34
- package/dist/toolbar/palette.d.ts +31 -0
- package/dist/toolbar/palette.js +104 -0
- package/dist/toolbar/senior-button.d.ts +1 -0
- package/dist/toolbar/senior-button.js +1 -0
- package/dist/translations.d.ts +0 -11
- package/dist/translations.js +11 -21
- package/dist/view.d.ts +6 -3
- package/dist/view.js +20 -14
- package/package.json +3 -3
- package/dist/core-domain/legend.d.ts +0 -29
- package/dist/core-domain/legend.js +0 -84
package/dist/view.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { morphToolbarConfig, QualityNudgeExtension, ReadingProfileExtension,
|
|
1
|
+
import { morphToolbarConfig, QualityNudgeExtension, ReadingProfileExtension, ValidationProfileExtension, ValidationRuleExtension, } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import { FrameworkPaletteExtension } from '@formicoidea/labre-core/components/color-picker';
|
|
2
3
|
import { ViewExtensionProvider, } from '@formicoidea/labre-core/ext-loader';
|
|
3
4
|
import { ToolbarModuleExtension, toolbarModuleKey, } from '@formicoidea/labre-core/shared/services';
|
|
4
5
|
import { TemplateCategoryExtension } from '@formicoidea/labre-core/gfx/template';
|
|
@@ -8,7 +9,7 @@ import { coreDomainCommandIcons, coreDomainCommands } from './commands.js';
|
|
|
8
9
|
import { coreDomainTemplateCategory } from './templates.js';
|
|
9
10
|
import { CoreDomainRendererExtension } from './core-domain/element-renderer.js';
|
|
10
11
|
import { CoreDomainInteraction, CoreDomainView, } from './core-domain/element-view.js';
|
|
11
|
-
import {
|
|
12
|
+
import { coreDomainChartToolingToolbarConfig } from './core-domain/toolbar-config.js';
|
|
12
13
|
import { coreDomainEffects } from './effects.js';
|
|
13
14
|
import { CORE_DOMAIN_MORPH_SPEC } from './morph.js';
|
|
14
15
|
import { CORE_DOMAIN_NUDGES } from './nudges.js';
|
|
@@ -16,13 +17,17 @@ import { CORE_DOMAIN_PROFILES } from './profiles.js';
|
|
|
16
17
|
import { CORE_DOMAIN_READINGS } from './reading.js';
|
|
17
18
|
import { CORE_DOMAIN_ROLES } from './roles.js';
|
|
18
19
|
import { CORE_DOMAIN_RULES } from './rules.js';
|
|
20
|
+
import { CORE_DOMAIN_FRAMEWORK_PALETTE } from './toolbar/palette.js';
|
|
19
21
|
import { coreDomainSeniorTool } from './toolbar/senior-tool.js';
|
|
20
22
|
/**
|
|
21
23
|
* Core Domain Chart rendering — ALWAYS registered, independent of any flag.
|
|
22
|
-
* Disabling `ddd-core-domain` hides only the
|
|
24
|
+
* Disabling `ddd-core-domain` hides only the tooling (see
|
|
23
25
|
* {@link DddCoreDomainViewExtension}); placed `coreDomain` elements must still
|
|
24
|
-
* paint, stay selectable
|
|
25
|
-
*
|
|
26
|
+
* paint, stay selectable and stay movable, and Templates-panel insertion must
|
|
27
|
+
* still render them.
|
|
28
|
+
*
|
|
29
|
+
* The chart claims no always-on toolbar module: the legend button was its only
|
|
30
|
+
* contextual entry and it moved to the gated half (`docs/adr/0026`).
|
|
26
31
|
*/
|
|
27
32
|
export class DddCoreDomainRenderViewExtension extends ViewExtensionProvider {
|
|
28
33
|
constructor() {
|
|
@@ -42,7 +47,6 @@ export class DddCoreDomainRenderViewExtension extends ViewExtensionProvider {
|
|
|
42
47
|
context.register(RoleVocabularyExtension(CORE_DOMAIN_ROLES));
|
|
43
48
|
if (this.isEdgeless(context.scope)) {
|
|
44
49
|
context.register(CoreDomainInteraction);
|
|
45
|
-
context.register(coreDomainToolbarExtension);
|
|
46
50
|
}
|
|
47
51
|
}
|
|
48
52
|
}
|
|
@@ -68,16 +72,13 @@ export class DddCoreDomainViewExtension extends ViewExtensionProvider {
|
|
|
68
72
|
context.register(ValidationRuleExtension(CORE_DOMAIN_RULES));
|
|
69
73
|
context.register(ValidationProfileExtension(CORE_DOMAIN_PROFILES));
|
|
70
74
|
context.register(QualityNudgeExtension(CORE_DOMAIN_NUDGES));
|
|
71
|
-
// The
|
|
72
|
-
//
|
|
73
|
-
// `
|
|
74
|
-
// chart
|
|
75
|
-
// is tooling and belongs here. The config itself names no framework — it
|
|
76
|
-
// reads roles and profiles — so it is the very same object Wardley
|
|
77
|
-
// registers on its own flavour.
|
|
75
|
+
// The chart's WHOLE contextual row — the Legend button and the Validation
|
|
76
|
+
// dropdown, merged into ONE module because a flavour may carry exactly one
|
|
77
|
+
// (`core-domain/toolbar-config.ts`). Both are tooling: with the flag off a
|
|
78
|
+
// stored chart keeps everything drawn on it and simply offers no button.
|
|
78
79
|
context.register(ToolbarModuleExtension({
|
|
79
80
|
id: BlockFlavourIdentifier('custom:affine:surface:coreDomain'),
|
|
80
|
-
config:
|
|
81
|
+
config: coreDomainChartToolingToolbarConfig,
|
|
81
82
|
}));
|
|
82
83
|
// The reversed reading (MF3): what the chart says about an artefact, on
|
|
83
84
|
// demand. Two profiles, because the vocabulary has two disjoint node
|
|
@@ -88,6 +89,11 @@ export class DddCoreDomainViewExtension extends ViewExtensionProvider {
|
|
|
88
89
|
context.register(ReadingProfileExtension(reading));
|
|
89
90
|
}
|
|
90
91
|
context.register(coreDomainSeniorTool);
|
|
92
|
+
// The Core Domain Chart's page of the colour pickers' carousel
|
|
93
|
+
// (`docs/adr/0027`). Here, beside the senior tool, because offering hues
|
|
94
|
+
// is TOOLING — the colours already painted on a stored chart are content
|
|
95
|
+
// and do not move (`docs/adr/0009`).
|
|
96
|
+
context.register(FrameworkPaletteExtension(CORE_DOMAIN_FRAMEWORK_PALETTE));
|
|
91
97
|
// The Templates-panel category, gated by this framework's own flag like
|
|
92
98
|
// every other framework's: a template is tooling (`docs/adr/0009`), and it
|
|
93
99
|
// is DERIVED from this package's commands, so it registers where they do.
|
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": "0.
|
|
4
|
+
"version": "0.43.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.43.1",
|
|
35
|
+
"@formicoidea/labre-ddd-shared": "0.43.1",
|
|
36
36
|
"lit": "^3.2.0"
|
|
37
37
|
}
|
|
38
38
|
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type AutoLegendSpec } from '@formicoidea/labre-ddd-shared';
|
|
2
|
-
/**
|
|
3
|
-
* What the Core Domain Chart's automatic legend can say — a TABLE, and nothing
|
|
4
|
-
* else: the scan, the placement and the box are `createAutoLegend`'s job.
|
|
5
|
-
*
|
|
6
|
-
* Every row is DERIVED from the presets the palette draws its dots with
|
|
7
|
-
* ({@link CD_SUBDOMAINS}) and from the role vocabulary's own labels, never
|
|
8
|
-
* restated — which also keeps this table and `core-domain.off-legend-colour`
|
|
9
|
-
* naming the same five colours by construction.
|
|
10
|
-
*
|
|
11
|
-
* ## What changed
|
|
12
|
-
*
|
|
13
|
-
* The chart's legend button predates roles: until now it scanned the perimeter
|
|
14
|
-
* for FILL COLOURS, which is why it fell back to the full notation when it
|
|
15
|
-
* recognised nothing. Detection is now by role, like every other reader of the
|
|
16
|
-
* board, with one consequence worth stating: a chart on which nothing is
|
|
17
|
-
* recognised yields a legend box with a title and no rows, rather than the whole
|
|
18
|
-
* notation. That is Wardley's behaviour and the honest one — a legend lists what
|
|
19
|
-
* is drawn, not what could have been.
|
|
20
|
-
*
|
|
21
|
-
* The **Team Topologies markers** were the casualty of that change for one
|
|
22
|
-
* release: `addMarker` stamped no role, so a chart covered in them produced a
|
|
23
|
-
* legend that mentioned none (PO recette, 26/08/2026). They now carry
|
|
24
|
-
* `core-domain:marker-*` and their section is here, derived from
|
|
25
|
-
* `TEAM_TOPOLOGIES` like everything else — swatch, letter and colour from the
|
|
26
|
-
* preset the palette draws with, wording from the vocabulary that names the
|
|
27
|
-
* role.
|
|
28
|
-
*/
|
|
29
|
-
export declare const CORE_DOMAIN_AUTO_LEGEND: AutoLegendSpec;
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
import { CD_SUBDOMAINS, MOVEMENT_COLOR, roleLabel, TEAM_TOPOLOGIES, } from '@formicoidea/labre-ddd-shared';
|
|
2
|
-
import { BOARD_LEGEND_TITLE } from '@formicoidea/labre-core/shared/services';
|
|
3
|
-
import { CORE_DOMAIN_ROLE, CORE_DOMAIN_ROLES } from '../roles.js';
|
|
4
|
-
import { CORE_DOMAIN_SEED_LEGEND_MOVEMENT, CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS, CORE_DOMAIN_SEED_LEGEND_TEAM_MODES, } from '../translations.js';
|
|
5
|
-
/**
|
|
6
|
-
* What the Core Domain Chart's automatic legend can say — a TABLE, and nothing
|
|
7
|
-
* else: the scan, the placement and the box are `createAutoLegend`'s job.
|
|
8
|
-
*
|
|
9
|
-
* Every row is DERIVED from the presets the palette draws its dots with
|
|
10
|
-
* ({@link CD_SUBDOMAINS}) and from the role vocabulary's own labels, never
|
|
11
|
-
* restated — which also keeps this table and `core-domain.off-legend-colour`
|
|
12
|
-
* naming the same five colours by construction.
|
|
13
|
-
*
|
|
14
|
-
* ## What changed
|
|
15
|
-
*
|
|
16
|
-
* The chart's legend button predates roles: until now it scanned the perimeter
|
|
17
|
-
* for FILL COLOURS, which is why it fell back to the full notation when it
|
|
18
|
-
* recognised nothing. Detection is now by role, like every other reader of the
|
|
19
|
-
* board, with one consequence worth stating: a chart on which nothing is
|
|
20
|
-
* recognised yields a legend box with a title and no rows, rather than the whole
|
|
21
|
-
* notation. That is Wardley's behaviour and the honest one — a legend lists what
|
|
22
|
-
* is drawn, not what could have been.
|
|
23
|
-
*
|
|
24
|
-
* The **Team Topologies markers** were the casualty of that change for one
|
|
25
|
-
* release: `addMarker` stamped no role, so a chart covered in them produced a
|
|
26
|
-
* legend that mentioned none (PO recette, 26/08/2026). They now carry
|
|
27
|
-
* `core-domain:marker-*` and their section is here, derived from
|
|
28
|
-
* `TEAM_TOPOLOGIES` like everything else — swatch, letter and colour from the
|
|
29
|
-
* preset the palette draws with, wording from the vocabulary that names the
|
|
30
|
-
* role.
|
|
31
|
-
*/
|
|
32
|
-
export const CORE_DOMAIN_AUTO_LEGEND = {
|
|
33
|
-
title: BOARD_LEGEND_TITLE[1],
|
|
34
|
-
titleKey: BOARD_LEGEND_TITLE[0],
|
|
35
|
-
roles: CORE_DOMAIN_ROLES,
|
|
36
|
-
sections: [
|
|
37
|
-
{
|
|
38
|
-
title: CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS[1],
|
|
39
|
-
titleKey: CORE_DOMAIN_SEED_LEGEND_SUBDOMAINS[0],
|
|
40
|
-
entries: CD_SUBDOMAINS.map(preset => ({
|
|
41
|
-
role: CORE_DOMAIN_ROLE[preset.kind],
|
|
42
|
-
row: {
|
|
43
|
-
swatch: 'dot',
|
|
44
|
-
color: preset.fill,
|
|
45
|
-
label: preset.label,
|
|
46
|
-
},
|
|
47
|
-
})),
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
// The letter is what identifies a marker on the chart — the squares are
|
|
51
|
-
// three colours a reader has no key to — so the legend shows the same
|
|
52
|
-
// square with the same letter in it, which is what `LegendRow.letter`
|
|
53
|
-
// exists for.
|
|
54
|
-
title: CORE_DOMAIN_SEED_LEGEND_TEAM_MODES[1],
|
|
55
|
-
titleKey: CORE_DOMAIN_SEED_LEGEND_TEAM_MODES[0],
|
|
56
|
-
entries: TEAM_TOPOLOGIES.map(preset => ({
|
|
57
|
-
role: CORE_DOMAIN_ROLE[preset.kind],
|
|
58
|
-
row: {
|
|
59
|
-
swatch: 'square',
|
|
60
|
-
color: preset.fill,
|
|
61
|
-
letter: preset.letter,
|
|
62
|
-
label: roleLabel(CORE_DOMAIN_ROLES, CORE_DOMAIN_ROLE[preset.kind]),
|
|
63
|
-
},
|
|
64
|
-
})),
|
|
65
|
-
},
|
|
66
|
-
{
|
|
67
|
-
title: CORE_DOMAIN_SEED_LEGEND_MOVEMENT[1],
|
|
68
|
-
titleKey: CORE_DOMAIN_SEED_LEGEND_MOVEMENT[0],
|
|
69
|
-
entries: [
|
|
70
|
-
{
|
|
71
|
-
role: CORE_DOMAIN_ROLE.movement,
|
|
72
|
-
row: {
|
|
73
|
-
swatch: 'line',
|
|
74
|
-
// The style `activateMovement` arms the connector tool with: a red
|
|
75
|
-
// dashed line.
|
|
76
|
-
color: MOVEMENT_COLOR,
|
|
77
|
-
dashed: true,
|
|
78
|
-
label: roleLabel(CORE_DOMAIN_ROLES, CORE_DOMAIN_ROLE.movement),
|
|
79
|
-
},
|
|
80
|
-
},
|
|
81
|
-
],
|
|
82
|
-
},
|
|
83
|
-
],
|
|
84
|
-
};
|