@formicoidea/labre-framework-wardley 0.39.3 → 0.41.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 +61 -38
- package/dist/consts.d.ts +8 -1
- package/dist/consts.js +14 -6
- package/dist/import.d.ts +28 -0
- package/dist/import.js +66 -7
- package/dist/legend.d.ts +20 -2
- package/dist/legend.js +127 -37
- package/dist/morph.d.ts +12 -2
- package/dist/morph.js +25 -9
- package/dist/natures.js +19 -0
- package/dist/node/consts.d.ts +29 -6
- package/dist/node/consts.js +29 -5
- package/dist/presets.d.ts +21 -0
- package/dist/presets.js +21 -0
- package/dist/templates/index.d.ts +9 -0
- package/dist/templates/index.js +35 -17
- package/dist/templates/maps.d.ts +94 -0
- package/dist/templates/maps.js +153 -31
- package/dist/toolbar/config.d.ts +2 -0
- package/dist/toolbar/config.js +46 -7
- package/dist/toolbar/icons.js +16 -15
- package/dist/toolbar/node-config.d.ts +26 -2
- package/dist/toolbar/node-config.js +100 -9
- package/dist/translations.js +80 -1
- package/package.json +2 -2
package/dist/toolbar/icons.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { svg } from 'lit';
|
|
2
|
+
import { NODE_FILL, NODE_STROKE } from '../node/consts.js';
|
|
2
3
|
/** Colored Wardley glyph (mockup proposal B) for the main toolbar button. */
|
|
3
4
|
export const wardleyToolbarIcon = svg `<svg width="100%" height="100%" viewBox="0 0 56 56" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
5
|
<defs>
|
|
@@ -36,19 +37,19 @@ const RED = '#d6455d';
|
|
|
36
37
|
const GREEN = '#1f9e4d';
|
|
37
38
|
/** Component node (validated COMP-C2): single circle. */
|
|
38
39
|
export const wardleyComponentIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
39
|
-
<circle cx="12" cy="12" r="6.3" fill="
|
|
40
|
+
<circle cx="12" cy="12" r="6.3" fill="${NODE_FILL}" stroke="currentColor" stroke-width="1.5"/>
|
|
40
41
|
</svg>`;
|
|
41
42
|
/** Anchor (validated ANCH-B): person glyph inscribed in a circle. */
|
|
42
43
|
export const wardleyAnchorIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
43
|
-
<circle cx="12" cy="12" r="6" fill="
|
|
44
|
+
<circle cx="12" cy="12" r="6" fill="${NODE_FILL}" stroke="currentColor" stroke-width="1.6"/>
|
|
44
45
|
<circle cx="12" cy="9.4" r="1.8" fill="none" stroke="currentColor" stroke-width="1.3"/>
|
|
45
46
|
<path d="M7.4 15.9 C 8.2 12.1, 15.8 12.1, 16.6 15.9" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
|
|
46
47
|
</svg>`;
|
|
47
48
|
/** Dependency link (validated LINK-A3): two outline nodes joined by a line. */
|
|
48
49
|
export const wardleyLinkIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
49
50
|
<line x1="5.5" y1="16" x2="18.5" y2="8" stroke="currentColor" stroke-width="1.8"/>
|
|
50
|
-
<circle cx="5.5" cy="16" r="2.2" fill="
|
|
51
|
-
<circle cx="18.5" cy="8" r="2.2" fill="
|
|
51
|
+
<circle cx="5.5" cy="16" r="2.2" fill="${NODE_FILL}" stroke="currentColor" stroke-width="1.5"/>
|
|
52
|
+
<circle cx="18.5" cy="8" r="2.2" fill="${NODE_FILL}" stroke="currentColor" stroke-width="1.5"/>
|
|
52
53
|
</svg>`;
|
|
53
54
|
/** Evolution arrow (validated ARR-B): red dashed arrow. */
|
|
54
55
|
export const wardleyArrowIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -63,21 +64,21 @@ export const wardleyInertiaIcon = svg `<svg width="24" height="24" viewBox="0 0
|
|
|
63
64
|
</svg>`;
|
|
64
65
|
/** Pipeline (validated PIPE-D): wide thin rect + square handle astride the top edge, thin borders. */
|
|
65
66
|
export const wardleyPipelineIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
66
|
-
<rect x="3.5" y="11" width="17" height="7" rx="1" fill="
|
|
67
|
-
<rect x="10" y="9" width="4" height="4" rx="0.6" fill="
|
|
67
|
+
<rect x="3.5" y="11" width="17" height="7" rx="1" fill="${NODE_FILL}" stroke="currentColor" stroke-width="1.2"/>
|
|
68
|
+
<rect x="10" y="9" width="4" height="4" rx="0.6" fill="${NODE_FILL}" stroke="currentColor" stroke-width="1.2"/>
|
|
68
69
|
</svg>`;
|
|
69
70
|
/** Market (validated MKT-B): thin outer circle + 3 thick-bordered nodes wired in a triangle. */
|
|
70
71
|
export const wardleyMarketIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
71
|
-
<circle cx="12" cy="12" r="9.6" fill="
|
|
72
|
+
<circle cx="12" cy="12" r="9.6" fill="${NODE_FILL}" stroke="currentColor" stroke-width="1.2"/>
|
|
72
73
|
<path d="M12 6.6 L7.3 14.7 H16.7 Z" fill="none" stroke="currentColor" stroke-width="1.1"/>
|
|
73
|
-
<circle cx="12" cy="6.6" r="2.3" fill="
|
|
74
|
-
<circle cx="7.3" cy="14.7" r="2.3" fill="
|
|
75
|
-
<circle cx="16.7" cy="14.7" r="2.3" fill="
|
|
74
|
+
<circle cx="12" cy="6.6" r="2.3" fill="${NODE_FILL}" stroke="currentColor" stroke-width="2.1"/>
|
|
75
|
+
<circle cx="7.3" cy="14.7" r="2.3" fill="${NODE_FILL}" stroke="currentColor" stroke-width="2.1"/>
|
|
76
|
+
<circle cx="16.7" cy="14.7" r="2.3" fill="${NODE_FILL}" stroke="currentColor" stroke-width="2.1"/>
|
|
76
77
|
</svg>`;
|
|
77
78
|
/** Ecosystem (validated ECO-A): double border at the rim + hatching confined to the inner donut + hollow center. */
|
|
78
79
|
export const wardleyEcosystemIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
79
80
|
<defs><clipPath id="ecoHatch"><path d="M12 3.8 a8.2 8.2 0 1 0 0.001 0 Z M12 7.8 a4.2 4.2 0 1 1 -0.001 0 Z" clip-rule="evenodd"/></clipPath></defs>
|
|
80
|
-
<circle cx="12" cy="12" r="9.8" fill="
|
|
81
|
+
<circle cx="12" cy="12" r="9.8" fill="${NODE_FILL}" stroke="currentColor" stroke-width="1.2"/>
|
|
81
82
|
<g clip-path="url(#ecoHatch)" stroke="currentColor" stroke-width="0.6">
|
|
82
83
|
<line x1="2" y1="-8" x2="22" y2="12"/>
|
|
83
84
|
<line x1="2" y1="-6" x2="22" y2="14"/>
|
|
@@ -91,12 +92,12 @@ export const wardleyEcosystemIcon = svg `<svg width="24" height="24" viewBox="0
|
|
|
91
92
|
<line x1="2" y1="10" x2="22" y2="30"/>
|
|
92
93
|
</g>
|
|
93
94
|
<circle cx="12" cy="12" r="8.5" fill="none" stroke="currentColor" stroke-width="0.8"/>
|
|
94
|
-
<circle cx="12" cy="12" r="4.2" fill="
|
|
95
|
+
<circle cx="12" cy="12" r="4.2" fill="${NODE_FILL}" stroke="currentColor" stroke-width="1"/>
|
|
95
96
|
</svg>`;
|
|
96
97
|
/** Component + method (validated METH-A): component inscribed in a colored outer circle (default grey). */
|
|
97
98
|
export const wardleyMethodIcon = svg `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
98
|
-
<circle cx="12" cy="12" r="9.6" fill="#d9d9d9" stroke="
|
|
99
|
-
<circle cx="12" cy="12" r="4.6" fill="
|
|
99
|
+
<circle cx="12" cy="12" r="9.6" fill="#d9d9d9" stroke="${NODE_STROKE}" stroke-width="1.2"/>
|
|
100
|
+
<circle cx="12" cy="12" r="4.6" fill="${NODE_FILL}" stroke="${NODE_STROKE}" stroke-width="1.2"/>
|
|
100
101
|
</svg>`;
|
|
101
102
|
/**
|
|
102
103
|
* Porter's forces: a lettered circle pressed on from the four cardinal
|
|
@@ -108,7 +109,7 @@ export const wardleyMethodIcon = svg `<svg width="24" height="24" viewBox="0 0 2
|
|
|
108
109
|
* 24 pixels. The circle keeps `currentColor` like every other artefact glyph.
|
|
109
110
|
*/
|
|
110
111
|
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="
|
|
112
|
+
<circle cx="12" cy="12" r="5.4" fill="${NODE_FILL}" stroke="currentColor" stroke-width="1.3"/>
|
|
112
113
|
<g stroke="${RED}" stroke-width="1.4" stroke-linecap="round">
|
|
113
114
|
<line x1="12" y1="6" x2="12" y2="3.4"/>
|
|
114
115
|
<line x1="18" y1="12" x2="20.6" y2="12"/>
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { NamedPalette } from '@formicoidea/labre-core/components/color-picker';
|
|
2
|
+
import { type Color, type ShapeElementModel } from '@formicoidea/labre-core/model';
|
|
3
|
+
import { type ChromeWording } from '@formicoidea/labre-core/shared/services';
|
|
2
4
|
/**
|
|
3
5
|
* What a picked swatch WRITES on a Wardley node.
|
|
4
6
|
*
|
|
@@ -13,9 +15,31 @@ import { type Color, type Palette, type ShapeElementModel } from '@formicoidea/l
|
|
|
13
15
|
* (`--affine-…`) is not a hex at all and must reach the document intact.
|
|
14
16
|
*/
|
|
15
17
|
export declare function wardleyFillColor(model: ShapeElementModel, value: Color): Color;
|
|
18
|
+
/**
|
|
19
|
+
* The nine Wardley swatches' own names, resolved by `resolvePaletteLabel`
|
|
20
|
+
* (`@labre/affine-components/color-picker`) through each swatch's own
|
|
21
|
+
* {@link NamedPalette.labelWording} — the framework-agnostic mechanism a
|
|
22
|
+
* gfx module uses to name a palette without touching `Palette`
|
|
23
|
+
* (`packages/affine/model`, RED ZONE) or importing another framework.
|
|
24
|
+
*
|
|
25
|
+
* Exported so `../translations.ts` can list them in the manifest under
|
|
26
|
+
* source `chrome`, the same treatment `WARDLEY_TOOLBAR_WORDINGS` already
|
|
27
|
+
* gets — a swatch's name is toolbar chrome, re-rendered on every locale
|
|
28
|
+
* switch, never seeded into a document.
|
|
29
|
+
*/
|
|
30
|
+
export declare const WARDLEY_PALETTE_WORDING_WONDER: ChromeWording;
|
|
31
|
+
export declare const WARDLEY_PALETTE_WORDING_PEACE: ChromeWording;
|
|
32
|
+
export declare const WARDLEY_PALETTE_WORDING_WAR: ChromeWording;
|
|
33
|
+
export declare const WARDLEY_PALETTE_WORDING_WONDER_LIGHT: ChromeWording;
|
|
34
|
+
export declare const WARDLEY_PALETTE_WORDING_PEACE_LIGHT: ChromeWording;
|
|
35
|
+
export declare const WARDLEY_PALETTE_WORDING_WAR_LIGHT: ChromeWording;
|
|
36
|
+
export declare const WARDLEY_PALETTE_WORDING_RED: ChromeWording;
|
|
37
|
+
export declare const WARDLEY_PALETTE_WORDING_INERTIA: ChromeWording;
|
|
38
|
+
export declare const WARDLEY_PALETTE_WORDING_METHOD_GREY: ChromeWording;
|
|
39
|
+
export declare const WARDLEY_PALETTE_WORDINGS: readonly ChromeWording[];
|
|
16
40
|
/**
|
|
17
41
|
* From the default editor palette we keep ONLY the neutrals — the historical
|
|
18
42
|
* colours are dropped in favour of the Wardley swatches above.
|
|
19
43
|
*/
|
|
20
|
-
export declare const WARDLEY_PALETTE_LIST:
|
|
44
|
+
export declare const WARDLEY_PALETTE_LIST: NamedPalette[];
|
|
21
45
|
export declare const wardleyNodeToolbarExtension: import("@formicoidea/labre-core/store").ExtensionType;
|
|
@@ -29,6 +29,65 @@ export function wardleyFillColor(model, value) {
|
|
|
29
29
|
return value;
|
|
30
30
|
return `${value}${AREA_ALPHA}`;
|
|
31
31
|
}
|
|
32
|
+
/**
|
|
33
|
+
* The nine Wardley swatches' own names, resolved by `resolvePaletteLabel`
|
|
34
|
+
* (`@labre/affine-components/color-picker`) through each swatch's own
|
|
35
|
+
* {@link NamedPalette.labelWording} — the framework-agnostic mechanism a
|
|
36
|
+
* gfx module uses to name a palette without touching `Palette`
|
|
37
|
+
* (`packages/affine/model`, RED ZONE) or importing another framework.
|
|
38
|
+
*
|
|
39
|
+
* Exported so `../translations.ts` can list them in the manifest under
|
|
40
|
+
* source `chrome`, the same treatment `WARDLEY_TOOLBAR_WORDINGS` already
|
|
41
|
+
* gets — a swatch's name is toolbar chrome, re-rendered on every locale
|
|
42
|
+
* switch, never seeded into a document.
|
|
43
|
+
*/
|
|
44
|
+
export const WARDLEY_PALETTE_WORDING_WONDER = [
|
|
45
|
+
'com.labre.wardley.palette.wonder',
|
|
46
|
+
'Wonder',
|
|
47
|
+
];
|
|
48
|
+
export const WARDLEY_PALETTE_WORDING_PEACE = [
|
|
49
|
+
'com.labre.wardley.palette.peace',
|
|
50
|
+
'Peace',
|
|
51
|
+
];
|
|
52
|
+
export const WARDLEY_PALETTE_WORDING_WAR = [
|
|
53
|
+
'com.labre.wardley.palette.war',
|
|
54
|
+
'War',
|
|
55
|
+
];
|
|
56
|
+
export const WARDLEY_PALETTE_WORDING_WONDER_LIGHT = [
|
|
57
|
+
'com.labre.wardley.palette.wonder-light',
|
|
58
|
+
'Wonder light',
|
|
59
|
+
];
|
|
60
|
+
export const WARDLEY_PALETTE_WORDING_PEACE_LIGHT = [
|
|
61
|
+
'com.labre.wardley.palette.peace-light',
|
|
62
|
+
'Peace light',
|
|
63
|
+
];
|
|
64
|
+
export const WARDLEY_PALETTE_WORDING_WAR_LIGHT = [
|
|
65
|
+
'com.labre.wardley.palette.war-light',
|
|
66
|
+
'War light',
|
|
67
|
+
];
|
|
68
|
+
export const WARDLEY_PALETTE_WORDING_RED = [
|
|
69
|
+
'com.labre.wardley.palette.wardley-red',
|
|
70
|
+
'Wardley red',
|
|
71
|
+
];
|
|
72
|
+
export const WARDLEY_PALETTE_WORDING_INERTIA = [
|
|
73
|
+
'com.labre.wardley.palette.inertia',
|
|
74
|
+
'Inertia',
|
|
75
|
+
];
|
|
76
|
+
export const WARDLEY_PALETTE_WORDING_METHOD_GREY = [
|
|
77
|
+
'com.labre.wardley.palette.method-grey',
|
|
78
|
+
'Method grey',
|
|
79
|
+
];
|
|
80
|
+
export const WARDLEY_PALETTE_WORDINGS = [
|
|
81
|
+
WARDLEY_PALETTE_WORDING_WONDER,
|
|
82
|
+
WARDLEY_PALETTE_WORDING_PEACE,
|
|
83
|
+
WARDLEY_PALETTE_WORDING_WAR,
|
|
84
|
+
WARDLEY_PALETTE_WORDING_WONDER_LIGHT,
|
|
85
|
+
WARDLEY_PALETTE_WORDING_PEACE_LIGHT,
|
|
86
|
+
WARDLEY_PALETTE_WORDING_WAR_LIGHT,
|
|
87
|
+
WARDLEY_PALETTE_WORDING_RED,
|
|
88
|
+
WARDLEY_PALETTE_WORDING_INERTIA,
|
|
89
|
+
WARDLEY_PALETTE_WORDING_METHOD_GREY,
|
|
90
|
+
];
|
|
32
91
|
/**
|
|
33
92
|
* The Wardley **evolution cycle**, surfaced as ready-made swatches in the node
|
|
34
93
|
* colour picker: Wonder / Peace / War, the three climatic phases a component
|
|
@@ -41,15 +100,47 @@ export function wardleyFillColor(model, value) {
|
|
|
41
100
|
* an author is free to ignore them, and the custom picker stays one click away.
|
|
42
101
|
*/
|
|
43
102
|
const WARDLEY_PALETTES = [
|
|
44
|
-
{
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
{
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
103
|
+
{
|
|
104
|
+
key: 'Wonder',
|
|
105
|
+
value: '#3ec9f2',
|
|
106
|
+
labelWording: WARDLEY_PALETTE_WORDING_WONDER,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
key: 'Peace',
|
|
110
|
+
value: '#5b9cf6',
|
|
111
|
+
labelWording: WARDLEY_PALETTE_WORDING_PEACE,
|
|
112
|
+
},
|
|
113
|
+
{ key: 'War', value: '#9d6df0', labelWording: WARDLEY_PALETTE_WORDING_WAR },
|
|
114
|
+
{
|
|
115
|
+
key: 'Wonder light',
|
|
116
|
+
value: '#b9e9fa',
|
|
117
|
+
labelWording: WARDLEY_PALETTE_WORDING_WONDER_LIGHT,
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
key: 'Peace light',
|
|
121
|
+
value: '#c6dbfc',
|
|
122
|
+
labelWording: WARDLEY_PALETTE_WORDING_PEACE_LIGHT,
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
key: 'War light',
|
|
126
|
+
value: '#d9c9fa',
|
|
127
|
+
labelWording: WARDLEY_PALETTE_WORDING_WAR_LIGHT,
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
key: 'Wardley red',
|
|
131
|
+
value: WARDLEY_RED,
|
|
132
|
+
labelWording: WARDLEY_PALETTE_WORDING_RED,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
key: 'Inertia',
|
|
136
|
+
value: INERTIA_COLOR,
|
|
137
|
+
labelWording: WARDLEY_PALETTE_WORDING_INERTIA,
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
key: 'Method grey',
|
|
141
|
+
value: METHOD_FILL,
|
|
142
|
+
labelWording: WARDLEY_PALETTE_WORDING_METHOD_GREY,
|
|
143
|
+
},
|
|
53
144
|
];
|
|
54
145
|
/**
|
|
55
146
|
* From the default editor palette we keep ONLY the neutrals — the historical
|
package/dist/translations.js
CHANGED
|
@@ -1,12 +1,87 @@
|
|
|
1
|
+
import { tagDefsTranslationEntries } from '@formicoidea/labre-core/shared/services';
|
|
1
2
|
import { collectTranslationKeys, commandCategoryTranslationEntries, commandTranslationEntries, mergeTranslationEntries, } from '@formicoidea/labre-core/std';
|
|
3
|
+
import { WARDLEY_AXIS_SEED } from './actions.js';
|
|
2
4
|
import { WARDLEY_AUDIT_CRITERIA } from './audit-criteria.js';
|
|
3
5
|
import { WARDLEY_BACKGROUND } from './background.js';
|
|
4
6
|
import { wardleyCommands } from './commands.js';
|
|
7
|
+
import { WARDLEY_OWM_IMPORT_REMARKS } from './import.js';
|
|
8
|
+
import { WARDLEY_LEGEND_WORDINGS } from './legend.js';
|
|
9
|
+
import { WARDLEY_TAG_DEFS } from './natures.js';
|
|
5
10
|
import { WARDLEY_NUDGES } from './nudges.js';
|
|
11
|
+
import { WARDLEY_NODE_LABEL, wardleyNodeLabelKey } from './presets.js';
|
|
6
12
|
import { WARDLEY_PROFILES } from './profiles.js';
|
|
7
13
|
import { WARDLEY_READING } from './reading.js';
|
|
8
14
|
import { WARDLEY_ROLES } from './roles.js';
|
|
9
15
|
import { WARDLEY_RULES } from './rules.js';
|
|
16
|
+
import { KODAK_INERTIA_SEED, TEA_SHOP_SEED, WARDLEY_TEMPLATE_NAME_KODAK_INERTIA, WARDLEY_TEMPLATE_NAME_TEA_SHOP, } from './templates/maps.js';
|
|
17
|
+
import { WARDLEY_TEMPLATE_NAME_EVOLUTION_ARROW, WARDLEY_TEMPLATE_NAME_LINK, } from './templates/index.js';
|
|
18
|
+
import { WARDLEY_TOOLBAR_WORDINGS } from './toolbar/config.js';
|
|
19
|
+
import { WARDLEY_PALETTE_WORDINGS } from './toolbar/node-config.js';
|
|
20
|
+
/**
|
|
21
|
+
* The prompt every labelled artefact is created NEXT TO — the fallback IS
|
|
22
|
+
* `WARDLEY_NODE_LABEL[kind]`, never restated, mirroring BPMN's `seedEntries`.
|
|
23
|
+
*/
|
|
24
|
+
const nodeSeedEntries = () => Object.entries(WARDLEY_NODE_LABEL).map(([kind, label]) => ({
|
|
25
|
+
key: wardleyNodeLabelKey(kind),
|
|
26
|
+
fallback: label,
|
|
27
|
+
source: 'seed',
|
|
28
|
+
}));
|
|
29
|
+
/** The three axis words a translated background variant is seeded with. */
|
|
30
|
+
const axisSeedEntries = () => Object.values(WARDLEY_AXIS_SEED).map(({ key, fallback }) => ({
|
|
31
|
+
key,
|
|
32
|
+
fallback,
|
|
33
|
+
source: 'seed',
|
|
34
|
+
}));
|
|
35
|
+
/**
|
|
36
|
+
* The seeds the two worked-example maps write — derived from the very tables
|
|
37
|
+
* `templates/maps.ts` reads at placement.
|
|
38
|
+
*/
|
|
39
|
+
const exampleSeedEntries = () => [...Object.values(TEA_SHOP_SEED), ...Object.values(KODAK_INERTIA_SEED)].map(({ key, fallback }) => ({ key, fallback, source: 'seed' }));
|
|
40
|
+
/**
|
|
41
|
+
* The auto-legend's own wordings — title, row captions, gradient blocks and
|
|
42
|
+
* the Porter panel — derived from `legend.ts`'s own `WARDLEY_LEGEND_WORDINGS`,
|
|
43
|
+
* the very table `createWardleyLegend` reads when it writes the group onto
|
|
44
|
+
* the canvas.
|
|
45
|
+
*/
|
|
46
|
+
const legendSeedEntries = () => WARDLEY_LEGEND_WORDINGS.map(([key, fallback]) => ({
|
|
47
|
+
key,
|
|
48
|
+
fallback,
|
|
49
|
+
source: 'seed',
|
|
50
|
+
}));
|
|
51
|
+
/** The toolbar tooltips this framework used to hard-code as English literals. */
|
|
52
|
+
const toolbarChromeEntries = () => WARDLEY_TOOLBAR_WORDINGS.map(([key, fallback]) => ({
|
|
53
|
+
key,
|
|
54
|
+
fallback,
|
|
55
|
+
source: 'chrome',
|
|
56
|
+
}));
|
|
57
|
+
/**
|
|
58
|
+
* The four hand-composed cards' own tile names — chrome, not seeds: a
|
|
59
|
+
* `Template.nameKey`, re-resolved every time the panel opens, never written
|
|
60
|
+
* into a document. See `templates/index.ts` and `templates/maps.ts`.
|
|
61
|
+
*/
|
|
62
|
+
const templateNameEntries = () => [
|
|
63
|
+
WARDLEY_TEMPLATE_NAME_LINK,
|
|
64
|
+
WARDLEY_TEMPLATE_NAME_EVOLUTION_ARROW,
|
|
65
|
+
WARDLEY_TEMPLATE_NAME_TEA_SHOP,
|
|
66
|
+
WARDLEY_TEMPLATE_NAME_KODAK_INERTIA,
|
|
67
|
+
].map(([key, fallback]) => ({ key, fallback, source: 'chrome' }));
|
|
68
|
+
/** The five fixed-wording OWM import remarks ({@link WARDLEY_OWM_IMPORT_REMARKS}). */
|
|
69
|
+
const importRemarkEntries = () => Object.values(WARDLEY_OWM_IMPORT_REMARKS).map(([key, english]) => ({
|
|
70
|
+
key,
|
|
71
|
+
fallback: english,
|
|
72
|
+
source: 'chrome',
|
|
73
|
+
}));
|
|
74
|
+
/**
|
|
75
|
+
* The nine node-colour-picker swatches' own names (`WARDLEY_PALETTE_WORDINGS`,
|
|
76
|
+
* `toolbar/node-config.ts`) — chrome, like the toolbar tooltips above: a
|
|
77
|
+
* swatch's name is re-rendered on every locale switch, never seeded into a
|
|
78
|
+
* document.
|
|
79
|
+
*/
|
|
80
|
+
const paletteWordingEntries = () => WARDLEY_PALETTE_WORDINGS.map(([key, fallback]) => ({
|
|
81
|
+
key,
|
|
82
|
+
fallback,
|
|
83
|
+
source: 'chrome',
|
|
84
|
+
}));
|
|
10
85
|
/**
|
|
11
86
|
* THIS framework's contribution to the translation-key manifest — every
|
|
12
87
|
* `com.labre.*` key Wardley can hand to `TranslationProvider.t`, derived from
|
|
@@ -27,4 +102,8 @@ export const wardleyTranslationEntries = mergeTranslationEntries(commandTranslat
|
|
|
27
102
|
// registry names no framework category in the bundled distribution, so a
|
|
28
103
|
// host that composed core's manifest alone drew translated entries under
|
|
29
104
|
// English headers (#183).
|
|
30
|
-
commandCategoryTranslationEntries(wardleyCommands), collectTranslationKeys('role', WARDLEY_ROLES), collectTranslationKeys('background', WARDLEY_BACKGROUND), collectTranslationKeys('rule', WARDLEY_RULES), collectTranslationKeys('nudge', WARDLEY_NUDGES), collectTranslationKeys('profile', WARDLEY_PROFILES), collectTranslationKeys('audit-criterion', WARDLEY_AUDIT_CRITERIA), collectTranslationKeys('reading', WARDLEY_READING)
|
|
105
|
+
commandCategoryTranslationEntries(wardleyCommands), collectTranslationKeys('role', WARDLEY_ROLES), collectTranslationKeys('background', WARDLEY_BACKGROUND), collectTranslationKeys('rule', WARDLEY_RULES), collectTranslationKeys('nudge', WARDLEY_NUDGES), collectTranslationKeys('profile', WARDLEY_PROFILES), collectTranslationKeys('audit-criterion', WARDLEY_AUDIT_CRITERIA), nodeSeedEntries(), axisSeedEntries(), exampleSeedEntries(), legendSeedEntries(), templateNameEntries(), toolbarChromeEntries(), importRemarkEntries(), paletteWordingEntries(), collectTranslationKeys('reading', WARDLEY_READING),
|
|
106
|
+
// The library's own tag pack (`WARDLEY_TAG_DEFS`) — the natures and the
|
|
107
|
+
// Porter competition tags. A host's app-seeded pack needs no entry here:
|
|
108
|
+
// see `tagDefsTranslationEntries`.
|
|
109
|
+
tagDefsTranslationEntries(WARDLEY_TAG_DEFS));
|
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.41.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.41.0",
|
|
35
35
|
"lit": "^3.2.0"
|
|
36
36
|
}
|
|
37
37
|
}
|