@formicoidea/labre-framework-wardley 0.23.0 → 0.23.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.
Files changed (61) hide show
  1. package/dist/consts.d.ts +72 -0
  2. package/{src/consts.ts → dist/consts.js} +63 -72
  3. package/dist/descriptor.d.ts +7 -0
  4. package/{src/descriptor.ts → dist/descriptor.js} +1 -1
  5. package/dist/effects.d.ts +10 -0
  6. package/dist/effects.js +7 -0
  7. package/dist/element-renderer.d.ts +15 -0
  8. package/dist/element-renderer.js +160 -0
  9. package/dist/element-view.d.ts +21 -0
  10. package/dist/element-view.js +122 -0
  11. package/dist/gradient.d.ts +18 -0
  12. package/dist/gradient.js +112 -0
  13. package/dist/index.d.ts +2 -0
  14. package/dist/index.js +2 -0
  15. package/dist/label-layout.d.ts +21 -0
  16. package/dist/label-layout.js +73 -0
  17. package/dist/legend.d.ts +12 -0
  18. package/dist/legend.js +333 -0
  19. package/dist/node/consts.d.ts +107 -0
  20. package/{src/node/consts.ts → dist/node/consts.js} +12 -20
  21. package/dist/node/label-editor.d.ts +28 -0
  22. package/dist/node/label-editor.js +216 -0
  23. package/dist/node/node-renderer.d.ts +17 -0
  24. package/dist/node/node-renderer.js +106 -0
  25. package/{src/node/node-view.ts → dist/node/node-view.d.ts} +3 -3
  26. package/dist/node/node-view.js +10 -0
  27. package/dist/templates/index.d.ts +3 -0
  28. package/dist/templates/index.js +172 -0
  29. package/dist/templates/maps.d.ts +3 -0
  30. package/dist/templates/maps.js +247 -0
  31. package/dist/toolbar/config.d.ts +75 -0
  32. package/dist/toolbar/config.js +206 -0
  33. package/dist/toolbar/icons.d.ts +31 -0
  34. package/{src/toolbar/icons.ts → dist/toolbar/icons.js} +51 -66
  35. package/dist/toolbar/node-config.d.ts +2 -0
  36. package/{src/toolbar/node-config.ts → dist/toolbar/node-config.js} +7 -14
  37. package/dist/toolbar/senior-tool.d.ts +2 -0
  38. package/{src/toolbar/senior-tool.ts → dist/toolbar/senior-tool.js} +5 -5
  39. package/dist/toolbar/wardley-menu.d.ts +53 -0
  40. package/dist/toolbar/wardley-menu.js +408 -0
  41. package/dist/toolbar/wardley-senior-button.d.ts +18 -0
  42. package/dist/toolbar/wardley-senior-button.js +146 -0
  43. package/dist/toolbar/wardley-tool-button.d.ts +10 -0
  44. package/dist/toolbar/wardley-tool-button.js +123 -0
  45. package/dist/view.d.ts +7 -0
  46. package/dist/view.js +36 -0
  47. package/package.json +15 -6
  48. package/src/effects.ts +0 -17
  49. package/src/element-renderer.ts +0 -242
  50. package/src/element-view.ts +0 -143
  51. package/src/gradient.ts +0 -137
  52. package/src/index.ts +0 -1
  53. package/src/label-layout.ts +0 -126
  54. package/src/legend.ts +0 -438
  55. package/src/node/node-renderer.ts +0 -142
  56. package/src/templates/index.ts +0 -236
  57. package/src/templates/maps.ts +0 -283
  58. package/src/toolbar/config.ts +0 -280
  59. package/src/toolbar/wardley-menu.ts +0 -552
  60. package/src/toolbar/wardley-senior-button.ts +0 -154
  61. package/src/view.ts +0 -39
@@ -0,0 +1,172 @@
1
+ import { makeTemplateSnapshot, surfaceText, } from '@formicoidea/labre-core/gfx/template';
2
+ import { ConnectorMode, FontFamily, PointStyle, ShapeStyle, StrokeStyle, TextAlign, } from '@formicoidea/labre-core/model';
3
+ import { REF_WIDTH } from '../consts';
4
+ import { wardleyMaps } from './maps';
5
+ import { ECOSYSTEM_SIZE, HANDLE_SIZE, INERTIA_COLOR, INERTIA_SIZE, LABEL_FONT_SIZE, LINK_GREY, LINK_STROKE_WIDTH, MARKET_DOT_RING, MARKET_DOT_SIZE, MARKET_DOT_STROKE_WIDTH, MARKET_LINK_COLOR, MARKET_LINK_WIDTH, MARKET_SIZE, METHOD_FILL, METHOD_SIZE, NODE_FILL, NODE_SIZE, NODE_STROKE, NODE_STROKE_WIDTH, PIPELINE_FILL, PIPELINE_HEIGHT, PIPELINE_WIDTH, WARDLEY_RED, } from '../node/consts';
6
+ const VARIANT_DEFAULTS = {
7
+ classic: {},
8
+ opportunity: {
9
+ yAxisTitle: 'Opportunity',
10
+ showVisibilityLabels: false,
11
+ showCornerLabels: false,
12
+ },
13
+ benefit: {
14
+ yAxisTitle: '',
15
+ visibilityHigh: 'Benefit',
16
+ visibilityLow: 'Investment',
17
+ showCornerLabels: false,
18
+ },
19
+ 'evolution-gradient': {},
20
+ };
21
+ const bg = (variant, w = REF_WIDTH) => {
22
+ const h = Math.round((w * 9) / 16);
23
+ return { type: 'wardley', variant, ...VARIANT_DEFAULTS[variant], xywh: `[0,0,${w},${h}]` };
24
+ };
25
+ /** A wardley node ellipse positioned by top-left. */
26
+ function node(kind, x, y, d = NODE_SIZE, fill = NODE_FILL, strokeWidth = NODE_STROKE_WIDTH) {
27
+ return {
28
+ type: 'wardleyNode',
29
+ kind,
30
+ shapeType: 'ellipse',
31
+ filled: true,
32
+ fillColor: fill,
33
+ strokeColor: NODE_STROKE,
34
+ strokeWidth,
35
+ shapeStyle: ShapeStyle.General,
36
+ roughness: 0,
37
+ xywh: `[${x},${y},${d},${d}]`,
38
+ };
39
+ }
40
+ function label(x, y, str, align = 'left') {
41
+ return {
42
+ type: 'text',
43
+ text: surfaceText(str),
44
+ color: NODE_STROKE,
45
+ fontFamily: FontFamily.Inter,
46
+ fontSize: LABEL_FONT_SIZE,
47
+ textAlign: align === 'center' ? TextAlign.Center : TextAlign.Left,
48
+ xywh: `[${x},${y},140,26]`,
49
+ };
50
+ }
51
+ function connect(source, target, opts = {}) {
52
+ return {
53
+ type: 'connector',
54
+ mode: ConnectorMode.Straight,
55
+ stroke: opts.red ? WARDLEY_RED : LINK_GREY,
56
+ strokeStyle: opts.red ? StrokeStyle.Dash : StrokeStyle.Solid,
57
+ strokeWidth: LINK_STROKE_WIDTH,
58
+ frontEndpointStyle: PointStyle.None,
59
+ rearEndpointStyle: opts.red ? PointStyle.Triangle : PointStyle.None,
60
+ source,
61
+ target,
62
+ };
63
+ }
64
+ const inertia = (x = 0, y = 0) => ({
65
+ type: 'shape',
66
+ shapeType: 'rect',
67
+ filled: true,
68
+ fillColor: INERTIA_COLOR,
69
+ strokeColor: INERTIA_COLOR,
70
+ strokeWidth: 0,
71
+ shapeStyle: ShapeStyle.General,
72
+ roughness: 0,
73
+ radius: 0,
74
+ xywh: `[${x},${y},${INERTIA_SIZE.w},${INERTIA_SIZE.h}]`,
75
+ });
76
+ /** Pipeline composite: body rect + handle square (straddling top) + label. */
77
+ function pipeline() {
78
+ return {
79
+ label: label(0, 0, 'Pipeline', 'center'),
80
+ body: {
81
+ type: 'wardleyNode',
82
+ kind: 'pipeline',
83
+ shapeType: 'rect',
84
+ filled: true,
85
+ fillColor: PIPELINE_FILL,
86
+ strokeColor: NODE_STROKE,
87
+ strokeWidth: NODE_STROKE_WIDTH,
88
+ shapeStyle: ShapeStyle.General,
89
+ roughness: 0,
90
+ radius: 0,
91
+ xywh: `[0,39,${PIPELINE_WIDTH},${PIPELINE_HEIGHT}]`,
92
+ },
93
+ handle: {
94
+ type: 'wardleyNode',
95
+ kind: 'handle',
96
+ shapeType: 'rect',
97
+ filled: true,
98
+ fillColor: NODE_FILL,
99
+ strokeColor: NODE_STROKE,
100
+ strokeWidth: NODE_STROKE_WIDTH,
101
+ shapeStyle: ShapeStyle.General,
102
+ roughness: 0,
103
+ radius: 0,
104
+ xywh: `[${PIPELINE_WIDTH / 2 - HANDLE_SIZE / 2},${39 - HANDLE_SIZE / 2},${HANDLE_SIZE},${HANDLE_SIZE}]`,
105
+ },
106
+ };
107
+ }
108
+ /** Market composite: outer circle + 3 inner dots wired in a triangle + label. */
109
+ function market() {
110
+ const R = MARKET_SIZE / 2;
111
+ const c = R; // center within the [0,0,MARKET_SIZE,MARKET_SIZE] box
112
+ const rho = MARKET_DOT_RING;
113
+ const sin60 = Math.sqrt(3) / 2;
114
+ const verts = [
115
+ [0, -rho],
116
+ [rho * sin60, rho / 2],
117
+ [-rho * sin60, rho / 2],
118
+ ];
119
+ const dotAt = (vx, vy) => node('component', c + vx - MARKET_DOT_SIZE / 2, c + vy - MARKET_DOT_SIZE / 2, MARKET_DOT_SIZE, NODE_FILL, MARKET_DOT_STROKE_WIDTH);
120
+ const tri = (a, b) => ({
121
+ type: 'connector',
122
+ mode: ConnectorMode.Straight,
123
+ stroke: MARKET_LINK_COLOR,
124
+ strokeStyle: StrokeStyle.Solid,
125
+ strokeWidth: MARKET_LINK_WIDTH,
126
+ frontEndpointStyle: PointStyle.None,
127
+ rearEndpointStyle: PointStyle.None,
128
+ source: { id: a },
129
+ target: { id: b },
130
+ });
131
+ return {
132
+ circle: node('market', 0, 0, MARKET_SIZE, NODE_FILL),
133
+ d0: dotAt(verts[0][0], verts[0][1]),
134
+ d1: dotAt(verts[1][0], verts[1][1]),
135
+ d2: dotAt(verts[2][0], verts[2][1]),
136
+ t0: tri('d0', 'd1'),
137
+ t1: tri('d1', 'd2'),
138
+ t2: tri('d2', 'd0'),
139
+ label: label(MARKET_SIZE + 8, 2, 'Market'),
140
+ };
141
+ }
142
+ const single = (el) => ({ a: el });
143
+ const nodeWithLabel = (kind, d, fill, name) => ({
144
+ n: node(kind, 0, 0, d, fill),
145
+ l: label(d + 8, d / 2 - 13, name),
146
+ });
147
+ const ATTRS = 'width="100%" height="100%" viewBox="0 0 135 80" xmlns="http://www.w3.org/2000/svg"';
148
+ const bgPreview = (extra = '') => `<svg ${ATTRS} fill="none"><path d="M22 12 V64 H120" stroke="#3b3d42" stroke-width="2"/><path d="M44 12 V64 M68 12 V64 M94 12 V64" stroke="#9aa0a6" stroke-width="0.8"/>${extra}</svg>`;
149
+ const dotPreview = (fill, sw = 2) => `<svg ${ATTRS} fill="none"><circle cx="67" cy="40" r="13" fill="${fill}" stroke="#1f2328" stroke-width="${sw}"/></svg>`;
150
+ function tpl(name, preview, elements) {
151
+ return { name, type: 'template', preview, content: makeTemplateSnapshot(elements, name) };
152
+ }
153
+ export const wardleyTemplateCategory = {
154
+ name: 'Wardley',
155
+ templates: [
156
+ ...wardleyMaps,
157
+ tpl('Map background', bgPreview(), { bg: bg('classic') }),
158
+ tpl('Opportunity gradient', bgPreview('<rect x="22" y="12" width="98" height="52" fill="#eef4fb" opacity="0.6"/>'), { bg: bg('opportunity') }),
159
+ tpl('Benefit gradient', bgPreview('<rect x="22" y="12" width="98" height="26" fill="#e6eef8" opacity="0.6"/>'), { bg: bg('benefit') }),
160
+ tpl('Evolution gradient', bgPreview('<rect x="22" y="12" width="98" height="52" fill="#e3e2e4" opacity="0.5"/>'), { bg: bg('evolution-gradient') }),
161
+ tpl('Component', dotPreview('#ffffff', 1.5), nodeWithLabel('component', NODE_SIZE, NODE_FILL, 'Component')),
162
+ tpl('Anchor', `<svg ${ATTRS} fill="none"><circle cx="67" cy="40" r="13" fill="#fff" stroke="#1f2328" stroke-width="1.5"/><circle cx="67" cy="36" r="3.5" fill="#1f2328"/><path d="M59 48 q8 -9 16 0" stroke="#1f2328" stroke-width="1.5" fill="none"/></svg>`, nodeWithLabel('anchor', NODE_SIZE, NODE_FILL, 'Anchor')),
163
+ tpl('Ecosystem', `<svg ${ATTRS} fill="none"><circle cx="67" cy="40" r="15" fill="#fff" stroke="#1f2328" stroke-width="1.5"/><circle cx="67" cy="40" r="11" fill="none" stroke="#1f2328"/><circle cx="67" cy="40" r="5" fill="#fff" stroke="#1f2328"/></svg>`, nodeWithLabel('ecosystem', ECOSYSTEM_SIZE, NODE_FILL, 'Ecosystem')),
164
+ tpl('Method', `<svg ${ATTRS} fill="none"><circle cx="67" cy="40" r="15" fill="#d9d9d9" stroke="#1f2328" stroke-width="1.5"/><circle cx="67" cy="40" r="7" fill="#fff" stroke="#1f2328"/></svg>`, nodeWithLabel('method', METHOD_SIZE, METHOD_FILL, 'Component')),
165
+ tpl('Pipeline', `<svg ${ATTRS} fill="none"><rect x="34" y="40" width="66" height="14" fill="#fff" stroke="#1f2328"/><rect x="60" y="33" width="14" height="14" fill="#fff" stroke="#1f2328"/></svg>`, pipeline()),
166
+ tpl('Market', `<svg ${ATTRS} fill="none"><circle cx="67" cy="40" r="16" fill="#fff" stroke="#1f2328"/><circle cx="67" cy="30" r="3.5" fill="#fff" stroke="#1f2328" stroke-width="1.5"/><circle cx="75" cy="46" r="3.5" fill="#fff" stroke="#1f2328" stroke-width="1.5"/><circle cx="59" cy="46" r="3.5" fill="#fff" stroke="#1f2328" stroke-width="1.5"/><path d="M67 30 L75 46 L59 46 Z" stroke="#1f2328" stroke-width="0.8" fill="none"/></svg>`, market()),
167
+ tpl('Inertia', `<svg ${ATTRS} fill="none"><rect x="63" y="22" width="8" height="36" fill="#1f2328"/></svg>`, single(inertia())),
168
+ tpl('Link', `<svg ${ATTRS} fill="none"><path d="M24 40 H110" stroke="#666" stroke-width="2.4"/></svg>`, single(connect({ position: [0, 0] }, { position: [160, 0] }))),
169
+ tpl('Evolution arrow', `<svg ${ATTRS} fill="none"><path d="M24 40 H100" stroke="#d6455d" stroke-width="2.4" stroke-dasharray="6 4"/><path d="M98 33 L112 40 L98 47 Z" fill="#d6455d"/></svg>`, single(connect({ position: [0, 0] }, { position: [160, 0] }, { red: true }))),
170
+ ],
171
+ };
172
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,3 @@
1
+ import { type Template } from '@formicoidea/labre-core/gfx/template';
2
+ export declare const wardleyMaps: Template[];
3
+ //# sourceMappingURL=maps.d.ts.map
@@ -0,0 +1,247 @@
1
+ import { makeTemplateSnapshot, surfaceText, } from '@formicoidea/labre-core/gfx/template';
2
+ import { ConnectorMode, FontFamily, PointStyle, ShapeStyle, StrokeStyle, TextAlign, } from '@formicoidea/labre-core/model';
3
+ import { INERTIA_COLOR, LABEL_FONT_SIZE, LINK_GREY, LINK_STROKE_WIDTH, NODE_FILL, NODE_SIZE, NODE_STROKE, WARDLEY_RED, } from '../node/consts';
4
+ /**
5
+ * Authoring kit for canonical Wardley maps. Positions are given as
6
+ * (evolution 0..1, value 0..1) and mapped into the plot interior of a fixed
7
+ * 1600x900 background. Per the composition principle, every glyph reuses an
8
+ * existing shape: stakeholders/users are anchor (person) nodes, "needs" are
9
+ * thick-stroked component nodes, capabilities are component nodes, notes are
10
+ * native rects + text, inertia is the inertia bar, and the future / evolution
11
+ * arrow is the red dashed connector. Legends are produced by the editor's
12
+ * auto-legend action rather than baked into the template.
13
+ */
14
+ const W = 1600;
15
+ const H = 900;
16
+ const PL = { x: 70, y: 56, w: 1470, h: 786 };
17
+ const ex = (e) => PL.x + e * PL.w;
18
+ const vy = (v) => PL.y + (1 - v) * PL.h;
19
+ const D = NODE_SIZE; // 18
20
+ const bg = (variant = 'classic') => ({ type: 'wardley', variant, xywh: `[0,0,${W},${H}]` });
21
+ function dot(e, v, sw, stroke = NODE_STROKE, fill = NODE_FILL) {
22
+ const cx = ex(e);
23
+ const cy = vy(v);
24
+ return {
25
+ type: 'wardleyNode',
26
+ kind: 'component',
27
+ shapeType: 'ellipse',
28
+ filled: true,
29
+ fillColor: fill,
30
+ strokeColor: stroke,
31
+ strokeWidth: sw,
32
+ shapeStyle: ShapeStyle.General,
33
+ roughness: 0,
34
+ xywh: `[${cx - D / 2},${cy - D / 2},${D},${D}]`,
35
+ };
36
+ }
37
+ const comp = (e, v) => dot(e, v, 1);
38
+ const future = (e, v) => dot(e, v, 2, WARDLEY_RED);
39
+ function stake(e, v) {
40
+ const cx = ex(e);
41
+ const cy = vy(v);
42
+ const d = 24;
43
+ return {
44
+ type: 'wardleyNode',
45
+ kind: 'anchor',
46
+ shapeType: 'ellipse',
47
+ filled: true,
48
+ fillColor: NODE_FILL,
49
+ strokeColor: NODE_STROKE,
50
+ strokeWidth: 1,
51
+ shapeStyle: ShapeStyle.General,
52
+ roughness: 0,
53
+ xywh: `[${cx - d / 2},${cy - d / 2},${d},${d}]`,
54
+ };
55
+ }
56
+ function lbl(e, v, text, o = {}) {
57
+ const cx = ex(e);
58
+ const cy = vy(v);
59
+ const w = o.w ?? 200;
60
+ const dx = o.dx ?? 12;
61
+ const dy = o.dy ?? -10;
62
+ const align = o.align ?? 'left';
63
+ const x = align === 'right' ? cx - w - dx : align === 'center' ? cx - w / 2 : cx + dx;
64
+ return {
65
+ type: 'text',
66
+ text: surfaceText(text),
67
+ color: o.color ?? NODE_STROKE,
68
+ fontFamily: FontFamily.Inter,
69
+ fontSize: o.size ?? LABEL_FONT_SIZE,
70
+ textAlign: align === 'right' ? TextAlign.Right : align === 'center' ? TextAlign.Center : TextAlign.Left,
71
+ xywh: `[${x},${cy + dy},${w},26]`,
72
+ };
73
+ }
74
+ function link(a, b, o = {}) {
75
+ return {
76
+ type: 'connector',
77
+ mode: ConnectorMode.Straight,
78
+ stroke: o.red ? WARDLEY_RED : LINK_GREY,
79
+ strokeStyle: o.arrow ? StrokeStyle.Dash : StrokeStyle.Solid,
80
+ strokeWidth: LINK_STROKE_WIDTH,
81
+ frontEndpointStyle: PointStyle.None,
82
+ rearEndpointStyle: o.arrow ? PointStyle.Triangle : PointStyle.None,
83
+ source: { id: a },
84
+ target: { id: b },
85
+ };
86
+ }
87
+ function inertia(e, v) {
88
+ const cx = ex(e);
89
+ const cy = vy(v);
90
+ return {
91
+ type: 'shape',
92
+ shapeType: 'rect',
93
+ filled: true,
94
+ fillColor: INERTIA_COLOR,
95
+ strokeColor: INERTIA_COLOR,
96
+ strokeWidth: 0,
97
+ shapeStyle: ShapeStyle.General,
98
+ roughness: 0,
99
+ radius: 0,
100
+ xywh: `[${cx - 4},${cy - 22},8,44]`,
101
+ };
102
+ }
103
+ function panel(x, y, w, h) {
104
+ return {
105
+ type: 'shape',
106
+ shapeType: 'rect',
107
+ filled: true,
108
+ fillColor: '#ffffff',
109
+ strokeColor: NODE_STROKE,
110
+ strokeWidth: 1.2,
111
+ shapeStyle: ShapeStyle.General,
112
+ roughness: 0,
113
+ radius: 0,
114
+ xywh: `[${x},${y},${w},${h}]`,
115
+ };
116
+ }
117
+ function freeText(x, y, w, str, size = 16, color = NODE_STROKE) {
118
+ return {
119
+ type: 'text',
120
+ text: surfaceText(str),
121
+ color,
122
+ fontFamily: FontFamily.Inter,
123
+ fontSize: size,
124
+ textAlign: TextAlign.Left,
125
+ xywh: `[${x},${y},${w},26]`,
126
+ };
127
+ }
128
+ /** Centred, enlarged map title spanning the plot width. */
129
+ function title(str) {
130
+ return {
131
+ type: 'text',
132
+ text: surfaceText(str),
133
+ color: NODE_STROKE,
134
+ fontFamily: FontFamily.Inter,
135
+ fontSize: 28,
136
+ textAlign: TextAlign.Center,
137
+ xywh: `[${W / 2 - 500},12,1000,40]`,
138
+ };
139
+ }
140
+ const ATTRS = 'width="100%" height="100%" viewBox="0 0 135 80" xmlns="http://www.w3.org/2000/svg"';
141
+ const mapPreview = (extra) => `<svg ${ATTRS} fill="none"><path d="M22 12 V64 H120" stroke="#3b3d42" stroke-width="2"/>${extra}</svg>`;
142
+ function tpl(name, preview, elements) {
143
+ return { name, type: 'template', preview, content: makeTemplateSnapshot(elements, name) };
144
+ }
145
+ function ann(e, v) {
146
+ const cx = ex(e);
147
+ const cy = vy(v);
148
+ return {
149
+ type: 'shape',
150
+ shapeType: 'ellipse',
151
+ filled: true,
152
+ fillColor: '#ffffff',
153
+ strokeColor: NODE_STROKE,
154
+ strokeWidth: 1.5,
155
+ shapeStyle: ShapeStyle.General,
156
+ roughness: 0,
157
+ xywh: `[${cx - 14},${cy - 14},28,28]`,
158
+ };
159
+ }
160
+ function annTxt(e, v, n) {
161
+ const cx = ex(e);
162
+ const cy = vy(v);
163
+ return {
164
+ type: 'text',
165
+ text: surfaceText(n),
166
+ color: NODE_STROKE,
167
+ fontFamily: FontFamily.Inter,
168
+ fontSize: 14,
169
+ textAlign: TextAlign.Center,
170
+ xywh: `[${cx - 14},${cy - 9},28,20]`,
171
+ };
172
+ }
173
+ // ── Tea Shop (the canonical map) ──────────────────────────────────────
174
+ function teaShop() {
175
+ return {
176
+ bg: bg(),
177
+ title: title('Tea Shop'),
178
+ annBox: panel(120, 200, 420, 64),
179
+ annText: freeText(132, 208, 400, 'Annotations:\n1. Standardising power lets kettles evolve faster\n2. Hot water is obvious and well known', 13),
180
+ business: stake(0.62, 0.93),
181
+ businessL: lbl(0.62, 0.93, 'Business', { align: 'center', dy: -28, w: 120 }),
182
+ public: stake(0.78, 0.93),
183
+ publicL: lbl(0.78, 0.93, 'Public', { align: 'center', dy: -28, w: 120 }),
184
+ cupOfTea: comp(0.62, 0.74),
185
+ cupOfTeaL: lbl(0.62, 0.74, 'Cup of Tea', { align: 'right' }),
186
+ cup: comp(0.8, 0.7),
187
+ cupL: lbl(0.8, 0.7, 'Cup'),
188
+ tea: comp(0.83, 0.6),
189
+ teaL: lbl(0.83, 0.6, 'Tea'),
190
+ hotWater: comp(0.8, 0.47),
191
+ hotWaterL: lbl(0.8, 0.47, 'Hot Water'),
192
+ water: comp(0.81, 0.34),
193
+ waterL: lbl(0.81, 0.34, 'Water'),
194
+ kettle: comp(0.36, 0.38),
195
+ kettleL: lbl(0.36, 0.38, 'Kettle', { align: 'right', dy: 6 }),
196
+ electric: future(0.56, 0.38),
197
+ electricL: lbl(0.56, 0.38, 'Electric Kettle'),
198
+ power: comp(0.7, 0.1),
199
+ powerL: lbl(0.7, 0.1, 'Power', { align: 'right', dy: 6 }),
200
+ powerFut: future(0.88, 0.1),
201
+ powerFutL: lbl(0.88, 0.1, 'Power'),
202
+ limitedBy: lbl(0.56, 0.43, 'limited by', { align: 'center', w: 120, size: 13 }),
203
+ ann1a: ann(0.5, 0.385), ann1t: annTxt(0.5, 0.385, '1'),
204
+ ann2a: ann(0.84, 0.45), ann2t: annTxt(0.84, 0.45, '2'),
205
+ l1: link('business', 'cupOfTea'),
206
+ l2: link('public', 'cupOfTea'),
207
+ l3: link('cupOfTea', 'cup'),
208
+ l4: link('cupOfTea', 'tea'),
209
+ l5: link('cupOfTea', 'hotWater'),
210
+ l6: link('hotWater', 'water'),
211
+ l7: link('hotWater', 'kettle'),
212
+ l8: link('kettle', 'power'),
213
+ a1: link('kettle', 'electric', { red: true, arrow: true }),
214
+ a2: link('power', 'powerFut', { red: true, arrow: true }),
215
+ };
216
+ }
217
+ // ── Kodak inertia (2005) ──────────────────────────────────────────────
218
+ function kodak() {
219
+ return {
220
+ bg: bg(),
221
+ title: title("Wardley map of Kodak's 2005 inertia to digital"),
222
+ user: stake(0.54, 0.92),
223
+ userL: lbl(0.54, 0.92, 'User'),
224
+ capture: dot(0.53, 0.8, 3),
225
+ captureL: lbl(0.53, 0.8, 'Capture a moment'),
226
+ film: comp(0.52, 0.62),
227
+ filmL: lbl(0.52, 0.62, 'Film camera', { align: 'right' }),
228
+ digital: future(0.74, 0.62),
229
+ digitalL: lbl(0.74, 0.62, 'Digital camera', { color: WARDLEY_RED }),
230
+ roll: comp(0.52, 0.4),
231
+ rollL: lbl(0.52, 0.4, 'Photographic film', { align: 'right' }),
232
+ storage: future(0.84, 0.4),
233
+ storageL: lbl(0.84, 0.4, 'Digital storage', { color: WARDLEY_RED }),
234
+ inertiaBar: inertia(0.78, 0.4),
235
+ l1: link('user', 'capture'),
236
+ l2: link('capture', 'film'),
237
+ l3: link('film', 'roll'),
238
+ r1: link('capture', 'storage', { red: true }),
239
+ a1: link('film', 'digital', { red: true, arrow: true }),
240
+ a2: link('roll', 'storage', { red: true, arrow: true }),
241
+ };
242
+ }
243
+ export const wardleyMaps = [
244
+ tpl('Tea Shop', mapPreview('<circle cx="78" cy="24" r="3" fill="#fff" stroke="#1f2328"/><circle cx="50" cy="44" r="3" fill="#fff" stroke="#1f2328"/><circle cx="86" cy="40" r="3" fill="#fff" stroke="#1f2328"/><circle cx="92" cy="58" r="3" fill="#fff" stroke="#1f2328"/><path d="M78 24 L50 44 M78 24 L86 40 L92 58" stroke="#666"/><path d="M50 44 h22" stroke="#d6455d" stroke-dasharray="3 2"/>'), teaShop()),
245
+ tpl('Kodak inertia', mapPreview('<circle cx="56" cy="22" r="3" fill="#fff" stroke="#1f2328"/><circle cx="54" cy="40" r="3" fill="#fff" stroke="#1f2328"/><circle cx="86" cy="40" r="3" fill="#fff" stroke="#d6455d"/><rect x="76" y="35" width="2.5" height="11" fill="#1f2328"/><path d="M57 40 h17" stroke="#d6455d" stroke-dasharray="3 2"/>'), kodak()),
246
+ ];
247
+ //# sourceMappingURL=maps.js.map
@@ -0,0 +1,75 @@
1
+ import { type ToolbarContext } from '@formicoidea/labre-core/shared/services';
2
+ import { type TemplateResult } from 'lit';
3
+ export declare const wardleyToolbarConfig: {
4
+ readonly actions: [{
5
+ id: string;
6
+ tooltip: string;
7
+ icon: TemplateResult;
8
+ when: boolean | ((ctx: ToolbarContext) => boolean);
9
+ active(ctx: ToolbarContext): boolean;
10
+ run(ctx: ToolbarContext): void;
11
+ }, {
12
+ readonly id: "b.evolution";
13
+ readonly actions: [{
14
+ id: string;
15
+ tooltip: string;
16
+ icon: TemplateResult;
17
+ when: boolean | ((ctx: ToolbarContext) => boolean);
18
+ active(ctx: ToolbarContext): boolean;
19
+ run(ctx: ToolbarContext): void;
20
+ }, {
21
+ id: string;
22
+ tooltip: string;
23
+ icon: TemplateResult;
24
+ when: boolean | ((ctx: ToolbarContext) => boolean);
25
+ active(ctx: ToolbarContext): boolean;
26
+ run(ctx: ToolbarContext): void;
27
+ }, {
28
+ id: string;
29
+ tooltip: string;
30
+ icon: TemplateResult;
31
+ when: boolean | ((ctx: ToolbarContext) => boolean);
32
+ active(ctx: ToolbarContext): boolean;
33
+ run(ctx: ToolbarContext): void;
34
+ }, {
35
+ id: string;
36
+ tooltip: string;
37
+ icon: TemplateResult;
38
+ when: boolean | ((ctx: ToolbarContext) => boolean);
39
+ active(ctx: ToolbarContext): boolean;
40
+ run(ctx: ToolbarContext): void;
41
+ }, {
42
+ id: string;
43
+ tooltip: string;
44
+ icon: TemplateResult;
45
+ when: boolean | ((ctx: ToolbarContext) => boolean);
46
+ active(ctx: ToolbarContext): boolean;
47
+ run(ctx: ToolbarContext): void;
48
+ }];
49
+ }, {
50
+ readonly id: "c.value-chain";
51
+ readonly actions: [{
52
+ id: string;
53
+ tooltip: string;
54
+ icon: TemplateResult;
55
+ when: boolean | ((ctx: ToolbarContext) => boolean);
56
+ active(ctx: ToolbarContext): boolean;
57
+ run(ctx: ToolbarContext): void;
58
+ }, {
59
+ id: string;
60
+ tooltip: string;
61
+ icon: TemplateResult;
62
+ when: boolean | ((ctx: ToolbarContext) => boolean);
63
+ active(ctx: ToolbarContext): boolean;
64
+ run(ctx: ToolbarContext): void;
65
+ }];
66
+ }, {
67
+ readonly id: "d.legend";
68
+ readonly tooltip: "Generate the legend (components present)";
69
+ readonly icon: TemplateResult<2>;
70
+ readonly run: (ctx: ToolbarContext) => void;
71
+ }];
72
+ readonly when: (ctx: ToolbarContext) => boolean;
73
+ };
74
+ export declare const wardleyToolbarExtension: import("@formicoidea/labre-core/store").ExtensionType;
75
+ //# sourceMappingURL=config.d.ts.map