@formicoidea/labre-framework-ddd-context-map 0.33.0 → 0.34.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.
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ShortcutManifestEntry } from '@formicoidea/labre-core/std';
|
|
2
|
+
/**
|
|
3
|
+
* The Context Map commands as SHORTCUT-MANIFEST rows — id, label, chord, scope,
|
|
4
|
+
* owner — and nothing else.
|
|
5
|
+
*
|
|
6
|
+
* DATA ONLY, and that is the whole point (`docs/adr/0008` § Packaging). A
|
|
7
|
+
* `CommandDescriptor` carries its `run`, so a host settings pane that imports
|
|
8
|
+
* the package entry to list names and chords drags the entire action graph —
|
|
9
|
+
* the import/export machinery, the surface and gfx deep paths — into its
|
|
10
|
+
* chunk. This module has type-only imports, so the published bundle exposes it
|
|
11
|
+
* as `./commands-manifest`: a few hundred bytes that reference nothing.
|
|
12
|
+
*
|
|
13
|
+
* GENERATED-SHAPED, hand-committed: `commands-manifest.unit.spec.ts` asserts
|
|
14
|
+
* row-for-row equality with `toShortcutManifestEntry` over {@link contextMapCommands},
|
|
15
|
+
* so this file cannot drift from the commands it projects. Add a command and
|
|
16
|
+
* the test says exactly what to add here.
|
|
17
|
+
*/
|
|
18
|
+
export declare const contextMapCommandsManifest: ShortcutManifestEntry[];
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Context Map commands as SHORTCUT-MANIFEST rows — id, label, chord, scope,
|
|
3
|
+
* owner — and nothing else.
|
|
4
|
+
*
|
|
5
|
+
* DATA ONLY, and that is the whole point (`docs/adr/0008` § Packaging). A
|
|
6
|
+
* `CommandDescriptor` carries its `run`, so a host settings pane that imports
|
|
7
|
+
* the package entry to list names and chords drags the entire action graph —
|
|
8
|
+
* the import/export machinery, the surface and gfx deep paths — into its
|
|
9
|
+
* chunk. This module has type-only imports, so the published bundle exposes it
|
|
10
|
+
* as `./commands-manifest`: a few hundred bytes that reference nothing.
|
|
11
|
+
*
|
|
12
|
+
* GENERATED-SHAPED, hand-committed: `commands-manifest.unit.spec.ts` asserts
|
|
13
|
+
* row-for-row equality with `toShortcutManifestEntry` over {@link contextMapCommands},
|
|
14
|
+
* so this file cannot drift from the commands it projects. Add a command and
|
|
15
|
+
* the test says exactly what to add here.
|
|
16
|
+
*/
|
|
17
|
+
export const contextMapCommandsManifest = [
|
|
18
|
+
{
|
|
19
|
+
id: 'ddd-context-map.addBoard',
|
|
20
|
+
owner: 'ddd-context-map',
|
|
21
|
+
labelKey: 'com.labre.commands.ddd-context-map.addBoard',
|
|
22
|
+
labelFallback: 'Context Map board',
|
|
23
|
+
scope: 'edgeless',
|
|
24
|
+
defaultKeys: { mac: [], other: [] },
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'ddd-context-map.addBoundedContext',
|
|
28
|
+
owner: 'ddd-context-map',
|
|
29
|
+
labelKey: 'com.labre.commands.ddd-context-map.addBoundedContext',
|
|
30
|
+
labelFallback: 'Bounded Context',
|
|
31
|
+
scope: 'edgeless',
|
|
32
|
+
defaultKeys: { mac: [], other: [] },
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
id: 'ddd-context-map.addCloud',
|
|
36
|
+
owner: 'ddd-context-map',
|
|
37
|
+
labelKey: 'com.labre.commands.ddd-context-map.addCloud',
|
|
38
|
+
labelFallback: 'Cloud / System (Big Ball of Mud)',
|
|
39
|
+
scope: 'edgeless',
|
|
40
|
+
defaultKeys: { mac: [], other: [] },
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
id: 'ddd-context-map.addPartnership',
|
|
44
|
+
owner: 'ddd-context-map',
|
|
45
|
+
labelKey: 'com.labre.commands.ddd-context-map.addPartnership',
|
|
46
|
+
labelFallback: 'Partnership',
|
|
47
|
+
scope: 'edgeless',
|
|
48
|
+
defaultKeys: { mac: [], other: [] },
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
id: 'ddd-context-map.addSharedKernel',
|
|
52
|
+
owner: 'ddd-context-map',
|
|
53
|
+
labelKey: 'com.labre.commands.ddd-context-map.addSharedKernel',
|
|
54
|
+
labelFallback: 'Shared Kernel',
|
|
55
|
+
scope: 'edgeless',
|
|
56
|
+
defaultKeys: { mac: [], other: [] },
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
id: 'ddd-context-map.addCustomerSupplier',
|
|
60
|
+
owner: 'ddd-context-map',
|
|
61
|
+
labelKey: 'com.labre.commands.ddd-context-map.addCustomerSupplier',
|
|
62
|
+
labelFallback: 'Customer / Supplier',
|
|
63
|
+
scope: 'edgeless',
|
|
64
|
+
defaultKeys: { mac: [], other: [] },
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
id: 'ddd-context-map.addConformist',
|
|
68
|
+
owner: 'ddd-context-map',
|
|
69
|
+
labelKey: 'com.labre.commands.ddd-context-map.addConformist',
|
|
70
|
+
labelFallback: 'Conformist',
|
|
71
|
+
scope: 'edgeless',
|
|
72
|
+
defaultKeys: { mac: [], other: [] },
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
id: 'ddd-context-map.addAcl',
|
|
76
|
+
owner: 'ddd-context-map',
|
|
77
|
+
labelKey: 'com.labre.commands.ddd-context-map.addAcl',
|
|
78
|
+
labelFallback: 'Anticorruption Layer',
|
|
79
|
+
scope: 'edgeless',
|
|
80
|
+
defaultKeys: { mac: [], other: [] },
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
id: 'ddd-context-map.addOhs',
|
|
84
|
+
owner: 'ddd-context-map',
|
|
85
|
+
labelKey: 'com.labre.commands.ddd-context-map.addOhs',
|
|
86
|
+
labelFallback: 'Open Host Service',
|
|
87
|
+
scope: 'edgeless',
|
|
88
|
+
defaultKeys: { mac: [], other: [] },
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
id: 'ddd-context-map.addPublishedLanguage',
|
|
92
|
+
owner: 'ddd-context-map',
|
|
93
|
+
labelKey: 'com.labre.commands.ddd-context-map.addPublishedLanguage',
|
|
94
|
+
labelFallback: 'Published Language',
|
|
95
|
+
scope: 'edgeless',
|
|
96
|
+
defaultKeys: { mac: [], other: [] },
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
id: 'ddd-context-map.addSeparateWays',
|
|
100
|
+
owner: 'ddd-context-map',
|
|
101
|
+
labelKey: 'com.labre.commands.ddd-context-map.addSeparateWays',
|
|
102
|
+
labelFallback: 'Separate Ways',
|
|
103
|
+
scope: 'edgeless',
|
|
104
|
+
defaultKeys: { mac: [], other: [] },
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: 'ddd-context-map.addBbom',
|
|
108
|
+
owner: 'ddd-context-map',
|
|
109
|
+
labelKey: 'com.labre.commands.ddd-context-map.addBbom',
|
|
110
|
+
labelFallback: 'Big Ball of Mud',
|
|
111
|
+
scope: 'edgeless',
|
|
112
|
+
defaultKeys: { mac: [], other: [] },
|
|
113
|
+
},
|
|
114
|
+
];
|
|
@@ -15,13 +15,13 @@ import { type ToolbarContext } from '@formicoidea/labre-core/shared/services';
|
|
|
15
15
|
export declare const contextMapBoardToolbarConfig: {
|
|
16
16
|
readonly actions: [{
|
|
17
17
|
readonly id: "a.toggle-resize";
|
|
18
|
-
readonly
|
|
18
|
+
readonly tooltipWording: import("@formicoidea/labre-core/shared/services").ChromeWording;
|
|
19
19
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
20
20
|
readonly active: (ctx: ToolbarContext) => boolean;
|
|
21
21
|
readonly run: (ctx: ToolbarContext) => void;
|
|
22
22
|
}, {
|
|
23
23
|
readonly id: "b.legend";
|
|
24
|
-
readonly
|
|
24
|
+
readonly tooltipWording: import("@formicoidea/labre-core/shared/services").ChromeWording;
|
|
25
25
|
readonly icon: import("lit-html").TemplateResult<1>;
|
|
26
26
|
readonly run: (ctx: ToolbarContext) => void;
|
|
27
27
|
}];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EdgelessCRUDIdentifier } from '@formicoidea/labre-core/blocks/surface';
|
|
2
2
|
import { createAutoLegend, dddLegendIcon } from '@formicoidea/labre-ddd-shared';
|
|
3
3
|
import { ContextMapBoardElementModel } from '@formicoidea/labre-core/model';
|
|
4
|
-
import { TelemetryProvider, ToolbarModuleExtension, } from '@formicoidea/labre-core/shared/services';
|
|
4
|
+
import { BOARD_LEGEND_NOTATION, BOARD_RESIZE_TOGGLE, TelemetryProvider, ToolbarModuleExtension, } from '@formicoidea/labre-core/shared/services';
|
|
5
5
|
import { BlockFlavourIdentifier } from '@formicoidea/labre-core/std';
|
|
6
6
|
import { html } from 'lit';
|
|
7
7
|
import { CONTEXT_MAP_AUTO_LEGEND } from '../legend.js';
|
|
@@ -35,7 +35,7 @@ export const contextMapBoardToolbarConfig = {
|
|
|
35
35
|
actions: [
|
|
36
36
|
{
|
|
37
37
|
id: 'a.toggle-resize',
|
|
38
|
-
|
|
38
|
+
tooltipWording: BOARD_RESIZE_TOGGLE,
|
|
39
39
|
icon: ResizeIcon,
|
|
40
40
|
active(ctx) {
|
|
41
41
|
const models = ctx.getSurfaceModelsByType(ContextMapBoardElementModel);
|
|
@@ -55,7 +55,7 @@ export const contextMapBoardToolbarConfig = {
|
|
|
55
55
|
},
|
|
56
56
|
{
|
|
57
57
|
id: 'b.legend',
|
|
58
|
-
|
|
58
|
+
tooltipWording: BOARD_LEGEND_NOTATION,
|
|
59
59
|
icon: dddLegendIcon,
|
|
60
60
|
run(ctx) {
|
|
61
61
|
const board = ctx.getSurfaceModelsByType(ContextMapBoardElementModel)[0];
|
package/dist/translations.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { collectTranslationKeys, commandTranslationEntries, mergeTranslationEntries, } from '@formicoidea/labre-core/std';
|
|
1
|
+
import { collectTranslationKeys, commandCategoryTranslationEntries, commandTranslationEntries, mergeTranslationEntries, } from '@formicoidea/labre-core/std';
|
|
2
2
|
import { CONTEXT_MAP_BACKGROUND } from './background.js';
|
|
3
3
|
import { contextMapCommands } from './commands.js';
|
|
4
4
|
import { CONTEXT_MAP_NUDGES } from './nudges.js';
|
|
@@ -17,4 +17,10 @@ import { CONTEXT_MAP_RULES } from './rules.js';
|
|
|
17
17
|
* into the catalogue it builds — the same sentence that already holds for
|
|
18
18
|
* `contextMapCommands`. See `packages/affine/all/src/translations.ts`.
|
|
19
19
|
*/
|
|
20
|
-
export const contextMapTranslationEntries = mergeTranslationEntries(commandTranslationEntries(contextMapCommands),
|
|
20
|
+
export const contextMapTranslationEntries = mergeTranslationEntries(commandTranslationEntries(contextMapCommands),
|
|
21
|
+
// The catalogue's own group headers, derived from the very categories
|
|
22
|
+
// these commands declare. They ship WITH the framework because core's
|
|
23
|
+
// registry names no framework category in the bundled distribution, so a
|
|
24
|
+
// host that composed core's manifest alone drew translated entries under
|
|
25
|
+
// English headers (#183).
|
|
26
|
+
commandCategoryTranslationEntries(contextMapCommands), collectTranslationKeys('role', CONTEXT_MAP_ROLES), collectTranslationKeys('background', CONTEXT_MAP_BACKGROUND), collectTranslationKeys('rule', CONTEXT_MAP_RULES), collectTranslationKeys('nudge', CONTEXT_MAP_NUDGES), collectTranslationKeys('profile', CONTEXT_MAP_PROFILES));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formicoidea/labre-framework-ddd-context-map",
|
|
3
3
|
"description": "Labre ddd-context-map framework for @formicoidea/labre-core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.34.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "lajola",
|
|
@@ -21,14 +21,18 @@
|
|
|
21
21
|
"./descriptor": {
|
|
22
22
|
"types": "./dist/descriptor.d.ts",
|
|
23
23
|
"import": "./dist/descriptor.js"
|
|
24
|
+
},
|
|
25
|
+
"./commands-manifest": {
|
|
26
|
+
"types": "./dist/commands-manifest.d.ts",
|
|
27
|
+
"import": "./dist/commands-manifest.js"
|
|
24
28
|
}
|
|
25
29
|
},
|
|
26
30
|
"files": [
|
|
27
31
|
"dist"
|
|
28
32
|
],
|
|
29
33
|
"dependencies": {
|
|
30
|
-
"@formicoidea/labre-core": "0.
|
|
31
|
-
"@formicoidea/labre-ddd-shared": "0.
|
|
34
|
+
"@formicoidea/labre-core": "0.34.1",
|
|
35
|
+
"@formicoidea/labre-ddd-shared": "0.34.1",
|
|
32
36
|
"lit": "^3.2.0"
|
|
33
37
|
}
|
|
34
38
|
}
|