@formicoidea/labre-framework-wardley 0.34.2 → 0.36.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 +111 -31
- package/dist/actions.js +184 -98
- package/dist/commands-manifest.js +40 -0
- package/dist/commands.d.ts +18 -1
- package/dist/commands.js +96 -7
- package/dist/export.js +50 -2
- package/dist/import.d.ts +5 -3
- package/dist/import.js +53 -8
- package/dist/index.d.ts +4 -1
- package/dist/index.js +16 -1
- package/dist/legend.d.ts +27 -1
- package/dist/legend.js +277 -3
- package/dist/morph.d.ts +129 -0
- package/dist/morph.js +405 -0
- package/dist/natures.d.ts +31 -0
- package/dist/natures.js +64 -4
- package/dist/node/consts.d.ts +123 -0
- package/dist/node/consts.js +122 -0
- package/dist/node/node-view.d.ts +82 -4
- package/dist/node/node-view.js +108 -4
- package/dist/node/porter-watcher.d.ts +119 -0
- package/dist/node/porter-watcher.js +255 -0
- package/dist/porter-competition.d.ts +36 -0
- package/dist/porter-competition.js +50 -0
- package/dist/presets.d.ts +276 -0
- package/dist/presets.js +554 -0
- package/dist/roles.d.ts +4 -0
- package/dist/roles.js +85 -7
- package/dist/toolbar/icons.d.ts +36 -0
- package/dist/toolbar/icons.js +58 -0
- package/dist/toolbar/node-config.d.ts +20 -0
- package/dist/toolbar/node-config.js +100 -7
- package/dist/view.js +40 -2
- package/package.json +2 -2
package/dist/toolbar/icons.d.ts
CHANGED
|
@@ -20,6 +20,42 @@ export declare const wardleyMarketIcon: import("lit-html").TemplateResult<2>;
|
|
|
20
20
|
export declare const wardleyEcosystemIcon: import("lit-html").TemplateResult<2>;
|
|
21
21
|
/** Component + method (validated METH-A): component inscribed in a colored outer circle (default grey). */
|
|
22
22
|
export declare const wardleyMethodIcon: import("lit-html").TemplateResult<2>;
|
|
23
|
+
/**
|
|
24
|
+
* Porter's forces: a lettered circle pressed on from the four cardinal
|
|
25
|
+
* directions by short solid arrows.
|
|
26
|
+
*
|
|
27
|
+
* The arrows are RED like {@link wardleyArrowIcon}'s, because on this notation
|
|
28
|
+
* red is what "a force acting on the map" looks like; they are SOLID where the
|
|
29
|
+
* evolution arrow is dashed, which is the one thing that tells the two apart at
|
|
30
|
+
* 24 pixels. The circle keeps `currentColor` like every other artefact glyph.
|
|
31
|
+
*/
|
|
32
|
+
export declare const wardleyPorterIcon: import("lit-html").TemplateResult<2>;
|
|
33
|
+
/**
|
|
34
|
+
* Accelerator / decelerator: the same fat arrow the canvas draws, at 24 px.
|
|
35
|
+
*
|
|
36
|
+
* `currentColor` outline over a light fill, like the other artefact glyphs —
|
|
37
|
+
* the canvas's flat grey would fight the toolbar's own theming, and the
|
|
38
|
+
* DIRECTION is what tells the two apart anyway, which is exactly what the two
|
|
39
|
+
* icons differ on and nothing else. The seven points are the outline of
|
|
40
|
+
* `ACCELERATOR_VERTICES` scaled onto the 24-unit box (a 22 × 18 arrow centred
|
|
41
|
+
* on it), so the button and the shape it draws are the same drawing.
|
|
42
|
+
*/
|
|
43
|
+
export declare const wardleyAcceleratorIcon: import("lit-html").TemplateResult<2>;
|
|
44
|
+
/** The mirror of {@link wardleyAcceleratorIcon}: the same arrow, pointing left. */
|
|
45
|
+
export declare const wardleyDeceleratorIcon: import("lit-html").TemplateResult<2>;
|
|
46
|
+
/**
|
|
47
|
+
* Area (rectangle) and area (polygon): the zone, translucent, at 24 px.
|
|
48
|
+
*
|
|
49
|
+
* The pair differs on the OUTLINE and on nothing else, which is the whole of
|
|
50
|
+
* what the two commands differ on. A `currentColor` rim over a light fill like
|
|
51
|
+
* every other artefact glyph — the canvas draws the zone in Peace, but a
|
|
52
|
+
* coloured button would claim the colour is the notation, and it is a default
|
|
53
|
+
* the author changes from the toolbar. The pentagon is the editor's own default
|
|
54
|
+
* polygon, so the button is the shape the click produces.
|
|
55
|
+
*/
|
|
56
|
+
export declare const wardleyAreaRectIcon: import("lit-html").TemplateResult<2>;
|
|
57
|
+
/** The same zone with corners you move: the editor's own default pentagon. */
|
|
58
|
+
export declare const wardleyAreaPolygonIcon: import("lit-html").TemplateResult<2>;
|
|
23
59
|
/** Legend: a bordered box with glyph + line rows. */
|
|
24
60
|
export declare const wardleyLegendIcon: import("lit-html").TemplateResult<2>;
|
|
25
61
|
/** Opportunity gradient background: axes + green differential hump + red operational bump. */
|
package/dist/toolbar/icons.js
CHANGED
|
@@ -98,6 +98,64 @@ export const wardleyMethodIcon = svg `<svg width="24" height="24" viewBox="0 0 2
|
|
|
98
98
|
<circle cx="12" cy="12" r="9.6" fill="#d9d9d9" stroke="#1f2328" stroke-width="1.2"/>
|
|
99
99
|
<circle cx="12" cy="12" r="4.6" fill="#fff" stroke="#1f2328" stroke-width="1.2"/>
|
|
100
100
|
</svg>`;
|
|
101
|
+
/**
|
|
102
|
+
* Porter's forces: a lettered circle pressed on from the four cardinal
|
|
103
|
+
* directions by short solid arrows.
|
|
104
|
+
*
|
|
105
|
+
* The arrows are RED like {@link wardleyArrowIcon}'s, because on this notation
|
|
106
|
+
* red is what "a force acting on the map" looks like; they are SOLID where the
|
|
107
|
+
* evolution arrow is dashed, which is the one thing that tells the two apart at
|
|
108
|
+
* 24 pixels. The circle keeps `currentColor` like every other artefact glyph.
|
|
109
|
+
*/
|
|
110
|
+
export const wardleyPorterIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
111
|
+
<circle cx="12" cy="12" r="5.4" fill="#fff" stroke="currentColor" stroke-width="1.3"/>
|
|
112
|
+
<g stroke="${RED}" stroke-width="1.4" stroke-linecap="round">
|
|
113
|
+
<line x1="12" y1="6" x2="12" y2="3.4"/>
|
|
114
|
+
<line x1="18" y1="12" x2="20.6" y2="12"/>
|
|
115
|
+
<line x1="12" y1="18" x2="12" y2="20.6"/>
|
|
116
|
+
<line x1="6" y1="12" x2="3.4" y2="12"/>
|
|
117
|
+
</g>
|
|
118
|
+
<g fill="${RED}">
|
|
119
|
+
<path d="M12 1.4 L14 4.4 H10 Z"/>
|
|
120
|
+
<path d="M22.6 12 L19.6 14 V10 Z"/>
|
|
121
|
+
<path d="M12 22.6 L10 19.6 H14 Z"/>
|
|
122
|
+
<path d="M1.4 12 L4.4 10 V14 Z"/>
|
|
123
|
+
</g>
|
|
124
|
+
</svg>`;
|
|
125
|
+
/**
|
|
126
|
+
* Accelerator / decelerator: the same fat arrow the canvas draws, at 24 px.
|
|
127
|
+
*
|
|
128
|
+
* `currentColor` outline over a light fill, like the other artefact glyphs —
|
|
129
|
+
* the canvas's flat grey would fight the toolbar's own theming, and the
|
|
130
|
+
* DIRECTION is what tells the two apart anyway, which is exactly what the two
|
|
131
|
+
* icons differ on and nothing else. The seven points are the outline of
|
|
132
|
+
* `ACCELERATOR_VERTICES` scaled onto the 24-unit box (a 22 × 18 arrow centred
|
|
133
|
+
* on it), so the button and the shape it draws are the same drawing.
|
|
134
|
+
*/
|
|
135
|
+
export const wardleyAcceleratorIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
136
|
+
<path d="M1 8.0 H13.1 V3 L23 12 L13.1 21 V16 H1 Z" fill="#f0f0f0" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/>
|
|
137
|
+
</svg>`;
|
|
138
|
+
/** The mirror of {@link wardleyAcceleratorIcon}: the same arrow, pointing left. */
|
|
139
|
+
export const wardleyDeceleratorIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
140
|
+
<path d="M23 8.0 H10.9 V3 L1 12 L10.9 21 V16 H23 Z" fill="#f0f0f0" stroke="currentColor" stroke-width="1.6" stroke-linejoin="round"/>
|
|
141
|
+
</svg>`;
|
|
142
|
+
/**
|
|
143
|
+
* Area (rectangle) and area (polygon): the zone, translucent, at 24 px.
|
|
144
|
+
*
|
|
145
|
+
* The pair differs on the OUTLINE and on nothing else, which is the whole of
|
|
146
|
+
* what the two commands differ on. A `currentColor` rim over a light fill like
|
|
147
|
+
* every other artefact glyph — the canvas draws the zone in Peace, but a
|
|
148
|
+
* coloured button would claim the colour is the notation, and it is a default
|
|
149
|
+
* the author changes from the toolbar. The pentagon is the editor's own default
|
|
150
|
+
* polygon, so the button is the shape the click produces.
|
|
151
|
+
*/
|
|
152
|
+
export const wardleyAreaRectIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
153
|
+
<rect x="2.6" y="5" width="18.8" height="14" rx="1" fill="#f0f0f0" fill-opacity="0.8" stroke="currentColor" stroke-width="1.4"/>
|
|
154
|
+
</svg>`;
|
|
155
|
+
/** The same zone with corners you move: the editor's own default pentagon. */
|
|
156
|
+
export const wardleyAreaPolygonIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
157
|
+
<path d="M12 2.8 L21.4 9.6 L17.8 20.8 H6.2 L2.6 9.6 Z" fill="#f0f0f0" fill-opacity="0.8" stroke="currentColor" stroke-width="1.4" stroke-linejoin="round"/>
|
|
158
|
+
</svg>`;
|
|
101
159
|
/** Legend: a bordered box with glyph + line rows. */
|
|
102
160
|
export const wardleyLegendIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
103
161
|
<rect x="3" y="4" width="18" height="16" rx="2" fill="none" stroke="currentColor" stroke-width="1.3"/>
|
|
@@ -1 +1,21 @@
|
|
|
1
|
+
import { type Color, type Palette, type ShapeElementModel } from '@formicoidea/labre-core/model';
|
|
2
|
+
/**
|
|
3
|
+
* What a picked swatch WRITES on a Wardley node.
|
|
4
|
+
*
|
|
5
|
+
* The identity on every artefact but one. A zone is drawn over the components
|
|
6
|
+
* it groups, so its fill is a WASH — `#c6dbfc40`, the alpha being the whole of
|
|
7
|
+
* what keeps the map readable underneath — and a picker that wrote the swatch
|
|
8
|
+
* as-is would replace it with an opaque hue and hide the map the zone annotates
|
|
9
|
+
* (recette of #213). So a swatch picked for an area keeps the zone's alpha.
|
|
10
|
+
*
|
|
11
|
+
* Only a bare 6-digit hex is touched: a value that already carries alpha is
|
|
12
|
+
* somebody's deliberate choice from the custom picker, and a theme token
|
|
13
|
+
* (`--affine-…`) is not a hex at all and must reach the document intact.
|
|
14
|
+
*/
|
|
15
|
+
export declare function wardleyFillColor(model: ShapeElementModel, value: Color): Color;
|
|
16
|
+
/**
|
|
17
|
+
* From the default editor palette we keep ONLY the neutrals — the historical
|
|
18
|
+
* colours are dropped in favour of the Wardley swatches above.
|
|
19
|
+
*/
|
|
20
|
+
export declare const WARDLEY_PALETTE_LIST: Palette[];
|
|
1
21
|
export declare const wardleyNodeToolbarExtension: import("@formicoidea/labre-core/store").ExtensionType;
|
|
@@ -1,17 +1,110 @@
|
|
|
1
|
-
import { shapeToolbarConfig } from '@formicoidea/labre-core/gfx/shape';
|
|
1
|
+
import { neutralPalettes, paletteColorAction, shapeToolbarConfig, } from '@formicoidea/labre-core/gfx/shape';
|
|
2
|
+
import { WardleyNodeElementModel, } from '@formicoidea/labre-core/model';
|
|
2
3
|
import { ToolbarModuleExtension, } from '@formicoidea/labre-core/shared/services';
|
|
3
4
|
import { BlockFlavourIdentifier } from '@formicoidea/labre-core/std';
|
|
5
|
+
import { AREA_FILL, INERTIA_COLOR, METHOD_FILL, WARDLEY_RED, } from '../node/consts.js';
|
|
6
|
+
/** The two hex digits `AREA_FILL` carries — the zone's ~25 % opacity. */
|
|
7
|
+
const AREA_ALPHA = AREA_FILL.slice(-2);
|
|
8
|
+
/** A plain 6-digit hex, the only shape a swatch value takes. */
|
|
9
|
+
const SIX_DIGIT_HEX = /^#[0-9a-f]{6}$/i;
|
|
10
|
+
/**
|
|
11
|
+
* What a picked swatch WRITES on a Wardley node.
|
|
12
|
+
*
|
|
13
|
+
* The identity on every artefact but one. A zone is drawn over the components
|
|
14
|
+
* it groups, so its fill is a WASH — `#c6dbfc40`, the alpha being the whole of
|
|
15
|
+
* what keeps the map readable underneath — and a picker that wrote the swatch
|
|
16
|
+
* as-is would replace it with an opaque hue and hide the map the zone annotates
|
|
17
|
+
* (recette of #213). So a swatch picked for an area keeps the zone's alpha.
|
|
18
|
+
*
|
|
19
|
+
* Only a bare 6-digit hex is touched: a value that already carries alpha is
|
|
20
|
+
* somebody's deliberate choice from the custom picker, and a theme token
|
|
21
|
+
* (`--affine-…`) is not a hex at all and must reach the document intact.
|
|
22
|
+
*/
|
|
23
|
+
export function wardleyFillColor(model, value) {
|
|
24
|
+
if (!(model instanceof WardleyNodeElementModel))
|
|
25
|
+
return value;
|
|
26
|
+
if (model.kind !== 'area')
|
|
27
|
+
return value;
|
|
28
|
+
if (typeof value !== 'string' || !SIX_DIGIT_HEX.test(value))
|
|
29
|
+
return value;
|
|
30
|
+
return `${value}${AREA_ALPHA}`;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* The Wardley **evolution cycle**, surfaced as ready-made swatches in the node
|
|
34
|
+
* colour picker: Wonder / Peace / War, the three climatic phases a component
|
|
35
|
+
* travels through in Simon Wardley's pattern — saturated first, then the light
|
|
36
|
+
* shades for a fill under a label — followed by the three colours the notation
|
|
37
|
+
* itself already uses (the evolution arrow's red, the inertia bar, a method's
|
|
38
|
+
* neutral fill).
|
|
39
|
+
*
|
|
40
|
+
* They are SHORTCUTS, never constraints: nothing in the map reads a colour, so
|
|
41
|
+
* an author is free to ignore them, and the custom picker stays one click away.
|
|
42
|
+
*/
|
|
43
|
+
const WARDLEY_PALETTES = [
|
|
44
|
+
{ key: 'Wonder', value: '#3ec9f2' },
|
|
45
|
+
{ key: 'Peace', value: '#5b9cf6' },
|
|
46
|
+
{ key: 'War', value: '#9d6df0' },
|
|
47
|
+
{ key: 'Wonder light', value: '#b9e9fa' },
|
|
48
|
+
{ key: 'Peace light', value: '#c6dbfc' },
|
|
49
|
+
{ key: 'War light', value: '#d9c9fa' },
|
|
50
|
+
{ key: 'Wardley red', value: WARDLEY_RED },
|
|
51
|
+
{ key: 'Inertia', value: INERTIA_COLOR },
|
|
52
|
+
{ key: 'Method grey', value: METHOD_FILL },
|
|
53
|
+
];
|
|
54
|
+
/**
|
|
55
|
+
* From the default editor palette we keep ONLY the neutrals — the historical
|
|
56
|
+
* colours are dropped in favour of the Wardley swatches above.
|
|
57
|
+
*/
|
|
58
|
+
export const WARDLEY_PALETTE_LIST = [
|
|
59
|
+
...WARDLEY_PALETTES,
|
|
60
|
+
...neutralPalettes(),
|
|
61
|
+
];
|
|
4
62
|
/**
|
|
5
63
|
* Wardley nodes are {@link ShapeElementModel} subclasses, so the shape toolbar's
|
|
6
64
|
* actions (which target `getSurfaceModelsByType(ShapeElementModel)`) operate on
|
|
7
|
-
* them directly. We re-register only the
|
|
8
|
-
*
|
|
9
|
-
* editable — while excluding the shape-only actions (switch type, add
|
|
10
|
-
* text
|
|
65
|
+
* them directly. We re-register only the line-style action plus a colour picker
|
|
66
|
+
* seeded with the Wardley swatches, so the circle's fill / stroke color / stroke
|
|
67
|
+
* width stay editable — while excluding the shape-only actions (switch type, add
|
|
68
|
+
* inner text) that don't make sense for a Wardley node.
|
|
69
|
+
*/
|
|
70
|
+
const KEEP_ACTION_IDS = new Set(['d.style']);
|
|
71
|
+
/**
|
|
72
|
+
* The shape toolbar's vertex editor, kept for ONE artefact: an area drawn as a
|
|
73
|
+
* polygon.
|
|
74
|
+
*
|
|
75
|
+
* Every other polygon on a Wardley map has an outline that IS the notation — an
|
|
76
|
+
* accelerator points right and a decelerator points left, and dragging a barb
|
|
77
|
+
* would turn a statement about the climate into a grey blob. A zone is the
|
|
78
|
+
* opposite: its whole job is to follow the components it groups, so moving its
|
|
79
|
+
* corners is the point of choosing the polygon over the rectangle.
|
|
80
|
+
*
|
|
81
|
+
* The shape action's own `when` already asks for a single ungrouped polygon —
|
|
82
|
+
* which excludes the two climate arrows, since both are grouped with their name
|
|
83
|
+
* — but it is narrowed HERE to `kind === 'area'` rather than left to rely on
|
|
84
|
+
* that: an arrow selected from inside its group, or one an author ungrouped,
|
|
85
|
+
* would otherwise offer a gesture that can only damage it.
|
|
11
86
|
*/
|
|
12
|
-
const
|
|
87
|
+
const VERTEX_ACTION_ID = 'f1.edit-vertices';
|
|
88
|
+
function isAreaSelection(ctx) {
|
|
89
|
+
const models = ctx.getSurfaceModelsByType(WardleyNodeElementModel);
|
|
90
|
+
return models.length > 0 && models.every(model => model.kind === 'area');
|
|
91
|
+
}
|
|
92
|
+
const areaVertexActions = shapeToolbarConfig.actions
|
|
93
|
+
.filter(action => action.id === VERTEX_ACTION_ID)
|
|
94
|
+
.map(action => {
|
|
95
|
+
const when = action.when;
|
|
96
|
+
return {
|
|
97
|
+
...action,
|
|
98
|
+
when: (ctx) => isAreaSelection(ctx) &&
|
|
99
|
+
(typeof when === 'function' ? when(ctx) : when !== false),
|
|
100
|
+
};
|
|
101
|
+
});
|
|
13
102
|
const wardleyNodeToolbarConfig = {
|
|
14
|
-
actions:
|
|
103
|
+
actions: [
|
|
104
|
+
...shapeToolbarConfig.actions.filter(action => KEEP_ACTION_IDS.has(action.id)),
|
|
105
|
+
...areaVertexActions,
|
|
106
|
+
paletteColorAction('e.color', WARDLEY_PALETTE_LIST, wardleyFillColor),
|
|
107
|
+
],
|
|
15
108
|
when: shapeToolbarConfig.when,
|
|
16
109
|
};
|
|
17
110
|
export const wardleyNodeToolbarExtension = ToolbarModuleExtension({
|
package/dist/view.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { InterchangeExtension, ReadingProfileExtension, tagsToolbarConfig, validationToolbarConfig, QualityNudgeExtension, ValidationProfileExtension, ValidationRuleExtension, } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
-
import { AuditCriterionExtension, ToolbarModuleExtension, UniverseTagDefsExtension, } from '@formicoidea/labre-core/shared/services';
|
|
1
|
+
import { InterchangeExtension, morphToolbarConfig, ReadingProfileExtension, tagsToolbarConfig, validationToolbarConfig, QualityNudgeExtension, ValidationProfileExtension, ValidationRuleExtension, } from '@formicoidea/labre-core/blocks/surface';
|
|
2
|
+
import { AuditCriterionExtension, ToolbarModuleExtension, toolbarModuleKey, UniverseTagDefsExtension, } from '@formicoidea/labre-core/shared/services';
|
|
3
3
|
import { ViewExtensionProvider, } from '@formicoidea/labre-core/ext-loader';
|
|
4
4
|
import { extendTemplateCategory } from '@formicoidea/labre-core/gfx/template';
|
|
5
5
|
import { BlockFlavourIdentifier, CommandExtension } from '@formicoidea/labre-core/std';
|
|
@@ -8,6 +8,7 @@ import { WARDLEY_AUDIT_CRITERIA } from './audit-criteria.js';
|
|
|
8
8
|
import { wardleyCommandIcons, wardleyCommands } from './commands.js';
|
|
9
9
|
import { effects } from './effects.js';
|
|
10
10
|
import { WARDLEY_INTERCHANGE } from './interchange.js';
|
|
11
|
+
import { WARDLEY_MORPH_SPEC } from './morph.js';
|
|
11
12
|
import { WARDLEY_TAG_DEFS } from './natures.js';
|
|
12
13
|
import { WARDLEY_PROFILES } from './profiles.js';
|
|
13
14
|
import { WARDLEY_NUDGES } from './nudges.js';
|
|
@@ -19,6 +20,7 @@ import { WardleyElementRendererExtension } from './element-renderer.js';
|
|
|
19
20
|
import { WardleyInteraction, WardleyView } from './element-view.js';
|
|
20
21
|
import { WardleyNodeRendererExtension } from './node/node-renderer.js';
|
|
21
22
|
import { WardleyNodeView } from './node/node-view.js';
|
|
23
|
+
import { WardleyPorterWatcher } from './node/porter-watcher.js';
|
|
22
24
|
import { wardleyNodeToolbarExtension } from './toolbar/node-config.js';
|
|
23
25
|
import { wardleyToolbarExtension } from './toolbar/config.js';
|
|
24
26
|
import { wardleySeniorTool } from './toolbar/senior-tool.js';
|
|
@@ -50,6 +52,15 @@ export class WardleyRenderViewExtension extends ViewExtensionProvider {
|
|
|
50
52
|
context.register(WardleyInteraction);
|
|
51
53
|
context.register(wardleyToolbarExtension);
|
|
52
54
|
context.register(wardleyNodeToolbarExtension);
|
|
55
|
+
// A Porter's-forces glyph says the same thing twice — the letter in the
|
|
56
|
+
// circle and the `wardley:competition` tag on it — and this keeps the two
|
|
57
|
+
// spellings equal in both directions. HERE, in the always-on half, for
|
|
58
|
+
// `docs/adr/0009`'s reason: it authors nothing. It creates no element,
|
|
59
|
+
// offers no button, adds no artefact; it keeps an element ALREADY in the
|
|
60
|
+
// document coherent with itself, which a force drawn while the Wardley
|
|
61
|
+
// button was on must stay when the button goes off. Edgeless-only because
|
|
62
|
+
// a selection, a canvas text editor and a surface are all edgeless.
|
|
63
|
+
context.register(WardleyPorterWatcher);
|
|
53
64
|
}
|
|
54
65
|
}
|
|
55
66
|
}
|
|
@@ -133,6 +144,33 @@ export class WardleyViewExtension extends ViewExtensionProvider {
|
|
|
133
144
|
config: tagsToolbarConfig(WARDLEY_ROLES),
|
|
134
145
|
}));
|
|
135
146
|
}
|
|
147
|
+
// The "Change type" dropdown on a selected COMPONENT's contextual
|
|
148
|
+
// toolbar — the generic module, parameterized by Wardley's own family.
|
|
149
|
+
//
|
|
150
|
+
// ## Why the key carries an owner
|
|
151
|
+
//
|
|
152
|
+
// A Wardley artefact is a native `group`, so the row the toolbar draws
|
|
153
|
+
// for it is the GROUP's row — and both plain group keys are already
|
|
154
|
+
// claimed: `affine:surface:group` by the native group operations, and
|
|
155
|
+
// `custom:affine:surface:group` by the qualification dropdown twenty
|
|
156
|
+
// lines above, which is on the group for the very same reason this is.
|
|
157
|
+
// Registering a second module on either would throw
|
|
158
|
+
// `DuplicateServiceDefinitionError` before the editor finished setting
|
|
159
|
+
// up. `toolbarModuleKey` is what lifts that ceiling — C4's morph already
|
|
160
|
+
// uses it on this flavour — so the module is registered under the
|
|
161
|
+
// DISTINCT variant `custom:affine:surface:group#wardley-morph` and the
|
|
162
|
+
// registry hands it to the same row.
|
|
163
|
+
//
|
|
164
|
+
// ## Why here
|
|
165
|
+
//
|
|
166
|
+
// In the flag-gated half, because a morph is TOOLING: a market drawn
|
|
167
|
+
// while the flag was on keeps its circle, its dots, its role and its
|
|
168
|
+
// place in every rule when the flag goes off — it just stops being
|
|
169
|
+
// something the toolbar offers to say differently (`docs/adr/0009`).
|
|
170
|
+
context.register(ToolbarModuleExtension({
|
|
171
|
+
id: BlockFlavourIdentifier(toolbarModuleKey('custom:affine:surface:group', 'wardley-morph')),
|
|
172
|
+
config: morphToolbarConfig(WARDLEY_MORPH_SPEC),
|
|
173
|
+
}));
|
|
136
174
|
// The reversed reading (MF3): what the map says about a component, on
|
|
137
175
|
// demand. One declaration — the roles, the nature tag, the dependency
|
|
138
176
|
// edge and the map's own zones, all of them already stated elsewhere in
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@formicoidea/labre-framework-wardley",
|
|
3
3
|
"description": "Labre wardley framework for @formicoidea/labre-core.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.36.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"author": "lajola",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@formicoidea/labre-core": "0.
|
|
34
|
+
"@formicoidea/labre-core": "0.36.0",
|
|
35
35
|
"lit": "^3.2.0"
|
|
36
36
|
}
|
|
37
37
|
}
|