@miragon/team-topologies-schema-model 0.1.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/index.cjs +428 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +628 -0
- package/dist/index.d.ts +628 -0
- package/dist/index.js +404 -0
- package/dist/index.js.map +1 -0
- package/package.json +45 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { nanoid } from 'nanoid';
|
|
3
|
+
|
|
4
|
+
// src/types.ts
|
|
5
|
+
var DND_MIME = "application/x-tt-team-type";
|
|
6
|
+
var TEAM_TYPES = [
|
|
7
|
+
"stream-aligned",
|
|
8
|
+
"enabling",
|
|
9
|
+
"complicated-subsystem",
|
|
10
|
+
"platform"
|
|
11
|
+
];
|
|
12
|
+
var INTERACTION_MODES = [
|
|
13
|
+
"collaboration",
|
|
14
|
+
"x-as-a-service",
|
|
15
|
+
"facilitating"
|
|
16
|
+
];
|
|
17
|
+
var DOCUMENT_VERSION = 2;
|
|
18
|
+
|
|
19
|
+
// src/notation.ts
|
|
20
|
+
var TEAM_TYPE_SPECS = {
|
|
21
|
+
"stream-aligned": {
|
|
22
|
+
type: "stream-aligned",
|
|
23
|
+
label: "Stream-aligned",
|
|
24
|
+
description: "Aligned to a single, valuable stream of work; owns it end-to-end.",
|
|
25
|
+
shape: "rounded-rect-horizontal",
|
|
26
|
+
fill: "#FFEDB8",
|
|
27
|
+
stroke: "#FFD966",
|
|
28
|
+
strokeStyle: "solid",
|
|
29
|
+
strokeWidth: 2,
|
|
30
|
+
defaultSize: { width: 240, height: 96 },
|
|
31
|
+
minSize: { width: 140, height: 64 }
|
|
32
|
+
},
|
|
33
|
+
enabling: {
|
|
34
|
+
type: "enabling",
|
|
35
|
+
label: "Enabling",
|
|
36
|
+
description: "Helps stream-aligned teams acquire missing capabilities; coaches, then steps back.",
|
|
37
|
+
shape: "rounded-rect-vertical",
|
|
38
|
+
fill: "#DFBDCF",
|
|
39
|
+
stroke: "#D09CB7",
|
|
40
|
+
strokeStyle: "solid",
|
|
41
|
+
strokeWidth: 2,
|
|
42
|
+
defaultSize: { width: 120, height: 200 },
|
|
43
|
+
minSize: { width: 80, height: 120 }
|
|
44
|
+
},
|
|
45
|
+
"complicated-subsystem": {
|
|
46
|
+
type: "complicated-subsystem",
|
|
47
|
+
label: "Complicated Subsystem",
|
|
48
|
+
description: "Owns a part of the system needing deep specialist knowledge, reducing others' cognitive load.",
|
|
49
|
+
shape: "octagon",
|
|
50
|
+
fill: "#FFC08B",
|
|
51
|
+
stroke: "#E88814",
|
|
52
|
+
strokeStyle: "solid",
|
|
53
|
+
strokeWidth: 2,
|
|
54
|
+
defaultSize: { width: 170, height: 150 },
|
|
55
|
+
minSize: { width: 110, height: 100 }
|
|
56
|
+
},
|
|
57
|
+
platform: {
|
|
58
|
+
type: "platform",
|
|
59
|
+
label: "Platform",
|
|
60
|
+
description: "Provides internal self-service capabilities to reduce cognitive load for stream-aligned teams.",
|
|
61
|
+
shape: "rect",
|
|
62
|
+
fill: "#B7CDF1",
|
|
63
|
+
stroke: "#6D9EEB",
|
|
64
|
+
strokeStyle: "solid",
|
|
65
|
+
strokeWidth: 2,
|
|
66
|
+
defaultSize: { width: 380, height: 130 },
|
|
67
|
+
minSize: { width: 200, height: 90 }
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var INTERACTION_MODE_SPECS = {
|
|
71
|
+
collaboration: {
|
|
72
|
+
mode: "collaboration",
|
|
73
|
+
label: "Collaboration",
|
|
74
|
+
description: "Two teams work closely together for a defined period; high overhead, high discovery.",
|
|
75
|
+
shape: "parallelogram",
|
|
76
|
+
fill: "#C6BEDF",
|
|
77
|
+
stroke: "#967EE2",
|
|
78
|
+
strokeStyle: "dashed",
|
|
79
|
+
strokeWidth: 2,
|
|
80
|
+
opacity: 0.5,
|
|
81
|
+
directional: false,
|
|
82
|
+
defaultSize: { width: 112, height: 72 },
|
|
83
|
+
minSize: { width: 60, height: 44 }
|
|
84
|
+
},
|
|
85
|
+
"x-as-a-service": {
|
|
86
|
+
mode: "x-as-a-service",
|
|
87
|
+
label: "X-as-a-Service",
|
|
88
|
+
description: "One team consumes something the other provides 'as a service'; minimal collaboration.",
|
|
89
|
+
shape: "triangle",
|
|
90
|
+
fill: "#B4B4B4",
|
|
91
|
+
stroke: "#999696",
|
|
92
|
+
strokeStyle: "dashed",
|
|
93
|
+
strokeWidth: 2,
|
|
94
|
+
opacity: 0.5,
|
|
95
|
+
directional: true,
|
|
96
|
+
defaultSize: { width: 88, height: 78 },
|
|
97
|
+
minSize: { width: 54, height: 48 }
|
|
98
|
+
},
|
|
99
|
+
facilitating: {
|
|
100
|
+
mode: "facilitating",
|
|
101
|
+
label: "Facilitating",
|
|
102
|
+
description: "One team helps/coaches another to clear impediments and learn; sensing and discovery.",
|
|
103
|
+
shape: "circle",
|
|
104
|
+
fill: "#C9DFBE",
|
|
105
|
+
stroke: "#78996B",
|
|
106
|
+
strokeStyle: "dashed",
|
|
107
|
+
strokeWidth: 2,
|
|
108
|
+
opacity: 0.5,
|
|
109
|
+
directional: false,
|
|
110
|
+
defaultSize: { width: 84, height: 84 },
|
|
111
|
+
minSize: { width: 48, height: 48 }
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
var FLOW_SPEC = {
|
|
115
|
+
label: "Flow of change",
|
|
116
|
+
fill: "transparent",
|
|
117
|
+
stroke: "#6b6459",
|
|
118
|
+
strokeStyle: "dashed",
|
|
119
|
+
strokeWidth: 2,
|
|
120
|
+
defaultSize: { width: 520, height: 64 },
|
|
121
|
+
minSize: { width: 160, height: 36 }
|
|
122
|
+
};
|
|
123
|
+
function dashArray(style, strokeWidth = 2) {
|
|
124
|
+
switch (style) {
|
|
125
|
+
case "dashed":
|
|
126
|
+
return `${strokeWidth * 3} ${strokeWidth * 2}`;
|
|
127
|
+
case "dotted":
|
|
128
|
+
return `${strokeWidth} ${strokeWidth * 1.5}`;
|
|
129
|
+
case "solid":
|
|
130
|
+
default:
|
|
131
|
+
return "";
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
var ALL_TEAM_SPECS = Object.values(TEAM_TYPE_SPECS);
|
|
135
|
+
var ALL_INTERACTION_SPECS = Object.values(INTERACTION_MODE_SPECS);
|
|
136
|
+
var teamTypeSchema = z.enum(TEAM_TYPES);
|
|
137
|
+
var interactionModeSchema = z.enum(INTERACTION_MODES);
|
|
138
|
+
var sizeSchema = z.object({
|
|
139
|
+
width: z.number().finite().positive(),
|
|
140
|
+
height: z.number().finite().positive()
|
|
141
|
+
});
|
|
142
|
+
var positionSchema = z.object({
|
|
143
|
+
x: z.number().finite(),
|
|
144
|
+
y: z.number().finite()
|
|
145
|
+
});
|
|
146
|
+
var hexColor = z.string().regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/, "expected a hex colour");
|
|
147
|
+
var teamNodeSchema = z.object({
|
|
148
|
+
id: z.string().min(1),
|
|
149
|
+
type: teamTypeSchema,
|
|
150
|
+
label: z.string(),
|
|
151
|
+
description: z.string().optional(),
|
|
152
|
+
position: positionSchema,
|
|
153
|
+
size: sizeSchema,
|
|
154
|
+
fill: hexColor.optional(),
|
|
155
|
+
stroke: hexColor.optional()
|
|
156
|
+
});
|
|
157
|
+
var interactionSchema = z.object({
|
|
158
|
+
id: z.string().min(1),
|
|
159
|
+
mode: interactionModeSchema,
|
|
160
|
+
label: z.string().optional(),
|
|
161
|
+
position: positionSchema,
|
|
162
|
+
size: sizeSchema,
|
|
163
|
+
fill: hexColor.optional(),
|
|
164
|
+
stroke: hexColor.optional()
|
|
165
|
+
});
|
|
166
|
+
var flowSchema = z.object({
|
|
167
|
+
id: z.string().min(1),
|
|
168
|
+
label: z.string().optional(),
|
|
169
|
+
position: positionSchema,
|
|
170
|
+
size: sizeSchema
|
|
171
|
+
});
|
|
172
|
+
var documentSchema = z.object({
|
|
173
|
+
version: z.literal(DOCUMENT_VERSION),
|
|
174
|
+
title: z.string(),
|
|
175
|
+
nodes: z.array(teamNodeSchema),
|
|
176
|
+
interactions: z.array(interactionSchema),
|
|
177
|
+
flows: z.array(flowSchema)
|
|
178
|
+
});
|
|
179
|
+
function parseDocument(input) {
|
|
180
|
+
const migrated = migrate(input);
|
|
181
|
+
const result = documentSchema.safeParse(migrated);
|
|
182
|
+
if (!result.success) {
|
|
183
|
+
return {
|
|
184
|
+
ok: false,
|
|
185
|
+
error: result.error.issues.map((i2) => `${i2.path.join(".") || "(root)"}: ${i2.message}`).join("; ")
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
return { ok: true, document: result.data };
|
|
189
|
+
}
|
|
190
|
+
function migrate(input) {
|
|
191
|
+
if (input == null || typeof input !== "object") return input;
|
|
192
|
+
const doc = input;
|
|
193
|
+
const next = { ...doc };
|
|
194
|
+
delete next.showFlowOfChange;
|
|
195
|
+
next.version = DOCUMENT_VERSION;
|
|
196
|
+
if (typeof next.title !== "string") next.title = "Untitled team topology";
|
|
197
|
+
if (!Array.isArray(next.nodes)) next.nodes = [];
|
|
198
|
+
next.interactions = Array.isArray(next.interactions) ? next.interactions.filter(
|
|
199
|
+
(e) => e != null && typeof e === "object" && "position" in e && "size" in e
|
|
200
|
+
) : [];
|
|
201
|
+
if (!Array.isArray(next.flows)) next.flows = [];
|
|
202
|
+
return next;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// src/serialize.ts
|
|
206
|
+
function round(n) {
|
|
207
|
+
return Math.round(n * 100) / 100;
|
|
208
|
+
}
|
|
209
|
+
function normPosition(p) {
|
|
210
|
+
return { x: round(p.x), y: round(p.y) };
|
|
211
|
+
}
|
|
212
|
+
function normSize(s2) {
|
|
213
|
+
return { width: round(s2.width), height: round(s2.height) };
|
|
214
|
+
}
|
|
215
|
+
function normNode(n) {
|
|
216
|
+
const out = {
|
|
217
|
+
id: n.id,
|
|
218
|
+
type: n.type,
|
|
219
|
+
label: n.label,
|
|
220
|
+
position: normPosition(n.position),
|
|
221
|
+
size: normSize(n.size)
|
|
222
|
+
};
|
|
223
|
+
if (n.description) out.description = n.description;
|
|
224
|
+
if (n.fill) out.fill = n.fill;
|
|
225
|
+
if (n.stroke) out.stroke = n.stroke;
|
|
226
|
+
return out;
|
|
227
|
+
}
|
|
228
|
+
function normInteraction(e) {
|
|
229
|
+
const out = {
|
|
230
|
+
id: e.id,
|
|
231
|
+
mode: e.mode,
|
|
232
|
+
position: normPosition(e.position),
|
|
233
|
+
size: normSize(e.size)
|
|
234
|
+
};
|
|
235
|
+
if (e.label) out.label = e.label;
|
|
236
|
+
if (e.fill) out.fill = e.fill;
|
|
237
|
+
if (e.stroke) out.stroke = e.stroke;
|
|
238
|
+
return out;
|
|
239
|
+
}
|
|
240
|
+
function normFlow(f) {
|
|
241
|
+
const out = {
|
|
242
|
+
id: f.id,
|
|
243
|
+
position: normPosition(f.position),
|
|
244
|
+
size: normSize(f.size)
|
|
245
|
+
};
|
|
246
|
+
if (f.label) out.label = f.label;
|
|
247
|
+
return out;
|
|
248
|
+
}
|
|
249
|
+
var byId = (a, b) => a.id < b.id ? -1 : a.id > b.id ? 1 : 0;
|
|
250
|
+
function canonicalize(doc) {
|
|
251
|
+
return {
|
|
252
|
+
version: DOCUMENT_VERSION,
|
|
253
|
+
title: doc.title,
|
|
254
|
+
nodes: [...doc.nodes].map(normNode).sort(byId),
|
|
255
|
+
interactions: [...doc.interactions].map(normInteraction).sort(byId),
|
|
256
|
+
flows: [...doc.flows].map(normFlow).sort(byId)
|
|
257
|
+
};
|
|
258
|
+
}
|
|
259
|
+
function serializeDocument(doc, pretty = true) {
|
|
260
|
+
const canonical = canonicalize(doc);
|
|
261
|
+
return JSON.stringify(canonical, null, pretty ? 2 : 0);
|
|
262
|
+
}
|
|
263
|
+
function newId(prefix) {
|
|
264
|
+
return `${prefix}_${nanoid(8)}`;
|
|
265
|
+
}
|
|
266
|
+
function createTeamNode(type, position, overrides = {}) {
|
|
267
|
+
const spec = TEAM_TYPE_SPECS[type];
|
|
268
|
+
return {
|
|
269
|
+
id: newId("team"),
|
|
270
|
+
type,
|
|
271
|
+
label: overrides.label ?? spec.label,
|
|
272
|
+
description: overrides.description,
|
|
273
|
+
position,
|
|
274
|
+
size: overrides.size ?? { ...spec.defaultSize },
|
|
275
|
+
fill: overrides.fill,
|
|
276
|
+
stroke: overrides.stroke
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
function createInteractionShape(mode, position, overrides = {}) {
|
|
280
|
+
const spec = INTERACTION_MODE_SPECS[mode];
|
|
281
|
+
return {
|
|
282
|
+
id: newId("int"),
|
|
283
|
+
mode,
|
|
284
|
+
position,
|
|
285
|
+
size: overrides.size ?? { ...spec.defaultSize },
|
|
286
|
+
label: overrides.label,
|
|
287
|
+
fill: overrides.fill,
|
|
288
|
+
stroke: overrides.stroke
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
function createFlowShape(position, overrides = {}) {
|
|
292
|
+
return {
|
|
293
|
+
id: newId("flow"),
|
|
294
|
+
position,
|
|
295
|
+
size: overrides.size ?? { ...FLOW_SPEC.defaultSize },
|
|
296
|
+
label: overrides.label ?? FLOW_SPEC.label
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
function emptyDocument(title = "Untitled team topology") {
|
|
300
|
+
return {
|
|
301
|
+
version: DOCUMENT_VERSION,
|
|
302
|
+
title,
|
|
303
|
+
nodes: [],
|
|
304
|
+
interactions: [],
|
|
305
|
+
flows: []
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
// src/sample.ts
|
|
310
|
+
var s = TEAM_TYPE_SPECS;
|
|
311
|
+
var i = INTERACTION_MODE_SPECS;
|
|
312
|
+
var SAMPLE_DOCUMENT = {
|
|
313
|
+
version: DOCUMENT_VERSION,
|
|
314
|
+
title: "Online retail \u2014 team topology",
|
|
315
|
+
nodes: [
|
|
316
|
+
{
|
|
317
|
+
id: "team_enabling",
|
|
318
|
+
type: "enabling",
|
|
319
|
+
label: "Agile Enablement",
|
|
320
|
+
description: "Coaches teams on testing and continuous delivery practices.",
|
|
321
|
+
position: { x: 60, y: 150 },
|
|
322
|
+
size: { ...s.enabling.defaultSize }
|
|
323
|
+
},
|
|
324
|
+
{
|
|
325
|
+
id: "team_checkout",
|
|
326
|
+
type: "stream-aligned",
|
|
327
|
+
label: "Checkout Stream",
|
|
328
|
+
description: "Owns the end-to-end checkout & payments journey.",
|
|
329
|
+
position: { x: 320, y: 110 },
|
|
330
|
+
size: { ...s["stream-aligned"].defaultSize }
|
|
331
|
+
},
|
|
332
|
+
{
|
|
333
|
+
id: "team_mobile",
|
|
334
|
+
type: "stream-aligned",
|
|
335
|
+
label: "Mobile Experience",
|
|
336
|
+
description: "Owns the native mobile shopping experience.",
|
|
337
|
+
position: { x: 700, y: 110 },
|
|
338
|
+
size: { ...s["stream-aligned"].defaultSize }
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
id: "team_fraud",
|
|
342
|
+
type: "complicated-subsystem",
|
|
343
|
+
label: "Risk & Fraud Engine",
|
|
344
|
+
description: "Specialist ML team owning real-time fraud scoring.",
|
|
345
|
+
position: { x: 740, y: 320 },
|
|
346
|
+
size: { ...s["complicated-subsystem"].defaultSize }
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
id: "team_platform",
|
|
350
|
+
type: "platform",
|
|
351
|
+
label: "Internal Developer Platform",
|
|
352
|
+
description: "Self-service CI/CD, observability and runtime for all streams.",
|
|
353
|
+
position: { x: 300, y: 540 },
|
|
354
|
+
size: { ...s.platform.defaultSize }
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
interactions: [
|
|
358
|
+
{
|
|
359
|
+
id: "int_enable_checkout",
|
|
360
|
+
mode: "facilitating",
|
|
361
|
+
label: "test automation",
|
|
362
|
+
position: { x: 212, y: 158 },
|
|
363
|
+
size: { ...i.facilitating.defaultSize }
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
id: "int_checkout_fraud",
|
|
367
|
+
mode: "collaboration",
|
|
368
|
+
label: "fraud rules discovery",
|
|
369
|
+
position: { x: 566, y: 232 },
|
|
370
|
+
size: { ...i.collaboration.defaultSize }
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
id: "int_platform_checkout",
|
|
374
|
+
mode: "x-as-a-service",
|
|
375
|
+
position: { x: 384, y: 396 },
|
|
376
|
+
size: { ...i["x-as-a-service"].defaultSize }
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
id: "int_platform_mobile",
|
|
380
|
+
mode: "x-as-a-service",
|
|
381
|
+
position: { x: 612, y: 396 },
|
|
382
|
+
size: { ...i["x-as-a-service"].defaultSize }
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
id: "int_fraud_mobile",
|
|
386
|
+
mode: "x-as-a-service",
|
|
387
|
+
label: "risk scoring API",
|
|
388
|
+
position: { x: 800, y: 238 },
|
|
389
|
+
size: { ...i["x-as-a-service"].defaultSize }
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
flows: [
|
|
393
|
+
{
|
|
394
|
+
id: "flow_main",
|
|
395
|
+
label: "Flow of change",
|
|
396
|
+
position: { x: 60, y: 712 },
|
|
397
|
+
size: { width: 880, height: 60 }
|
|
398
|
+
}
|
|
399
|
+
]
|
|
400
|
+
};
|
|
401
|
+
|
|
402
|
+
export { ALL_INTERACTION_SPECS, ALL_TEAM_SPECS, DND_MIME, DOCUMENT_VERSION, FLOW_SPEC, INTERACTION_MODES, INTERACTION_MODE_SPECS, SAMPLE_DOCUMENT, TEAM_TYPES, TEAM_TYPE_SPECS, canonicalize, createFlowShape, createInteractionShape, createTeamNode, dashArray, documentSchema, emptyDocument, flowSchema, interactionSchema, newId, parseDocument, serializeDocument, teamNodeSchema };
|
|
403
|
+
//# sourceMappingURL=index.js.map
|
|
404
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types.ts","../src/notation.ts","../src/schema.ts","../src/serialize.ts","../src/factory.ts","../src/sample.ts"],"names":["i","s"],"mappings":";;;;AASO,IAAM,QAAA,GAAW;AAKjB,IAAM,UAAA,GAAkC;AAAA,EAC7C,gBAAA;AAAA,EACA,UAAA;AAAA,EACA,uBAAA;AAAA,EACA;AACF;AAKO,IAAM,iBAAA,GAAgD;AAAA,EAC3D,eAAA;AAAA,EACA,gBAAA;AAAA,EACA;AACF;AAyDO,IAAM,gBAAA,GAAmB;;;ACdzB,IAAM,eAAA,GAAkD;AAAA,EAC7D,gBAAA,EAAkB;AAAA,IAChB,IAAA,EAAM,gBAAA;AAAA,IACN,KAAA,EAAO,gBAAA;AAAA,IACP,WAAA,EAAa,mEAAA;AAAA,IACb,KAAA,EAAO,yBAAA;AAAA,IACP,IAAA,EAAM,SAAA;AAAA,IACN,MAAA,EAAQ,SAAA;AAAA,IACR,WAAA,EAAa,OAAA;AAAA,IACb,WAAA,EAAa,CAAA;AAAA,IACb,WAAA,EAAa,EAAE,KAAA,EAAO,GAAA,EAAK,QAAQ,EAAA,EAAG;AAAA,IACtC,OAAA,EAAS,EAAE,KAAA,EAAO,GAAA,EAAK,QAAQ,EAAA;AAAG,GACpC;AAAA,EACA,QAAA,EAAU;AAAA,IACR,IAAA,EAAM,UAAA;AAAA,IACN,KAAA,EAAO,UAAA;AAAA,IACP,WAAA,EACE,oFAAA;AAAA,IACF,KAAA,EAAO,uBAAA;AAAA,IACP,IAAA,EAAM,SAAA;AAAA,IACN,MAAA,EAAQ,SAAA;AAAA,IACR,WAAA,EAAa,OAAA;AAAA,IACb,WAAA,EAAa,CAAA;AAAA,IACb,WAAA,EAAa,EAAE,KAAA,EAAO,GAAA,EAAK,QAAQ,GAAA,EAAI;AAAA,IACvC,OAAA,EAAS,EAAE,KAAA,EAAO,EAAA,EAAI,QAAQ,GAAA;AAAI,GACpC;AAAA,EACA,uBAAA,EAAyB;AAAA,IACvB,IAAA,EAAM,uBA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GAAA,EAAI;AAAA,MAC1B,IAAA,EAAM,EAAE,KAAA,EAAO,GAAA,EAAK,QAAQ,EAAA;AAAG;AACjC;AAEJ","file":"index.js","sourcesContent":["/**\n * Pure (DOM-free) domain types for the Team Topologies model.\n *\n * This module is the canonical representation of a diagram and must never\n * import from the rendering layer (`@xyflow/react`) or touch the DOM, so it\n * can be unit-tested in isolation and reused across views / exporters.\n */\n\n/** MIME type used when dragging a team type from the palette onto the canvas. */\nexport const DND_MIME = \"application/x-tt-team-type\";\n\n/** The four fundamental team types in Team Topologies. */\nexport type TeamType = \"stream-aligned\" | \"enabling\" | \"complicated-subsystem\" | \"platform\";\n\nexport const TEAM_TYPES: readonly TeamType[] = [\n \"stream-aligned\",\n \"enabling\",\n \"complicated-subsystem\",\n \"platform\",\n] as const;\n\n/** The three core team interaction modes in Team Topologies. */\nexport type InteractionMode = \"collaboration\" | \"x-as-a-service\" | \"facilitating\";\n\nexport const INTERACTION_MODES: readonly InteractionMode[] = [\n \"collaboration\",\n \"x-as-a-service\",\n \"facilitating\",\n] as const;\n\n/** Geometric size of a node in canvas units (px). Encodes cognitive load. */\nexport interface Size {\n width: number;\n height: number;\n}\n\n/** Position of a node on the canvas in canvas units (px). */\nexport interface Position {\n x: number;\n y: number;\n}\n\n/** A team node in the canonical document model. */\nexport interface TeamNode {\n id: string;\n type: TeamType;\n label: string;\n description?: string;\n position: Position;\n size: Size;\n fill?: string;\n stroke?: string;\n}\n\n/**\n * An interaction in the canonical document model.\n *\n * Per the official Team Topologies notation, an interaction is a placed,\n * resizable SHAPE (parallelogram / triangle / circle) overlaid on the boundary\n * between the teams it relates to — not a connecting line. The relationship is\n * therefore spatial (overlap), so there is no source/target reference.\n */\nexport interface InteractionShape {\n id: string;\n mode: InteractionMode;\n label?: string;\n position: Position;\n size: Size;\n fill?: string;\n stroke?: string;\n}\n\n/**\n * A \"flow of change\" guide: a placed, resizable arrow element. Lets you anchor\n * the implied left-to-right flow, and visualise several team groupings on one\n * canvas.\n */\nexport interface FlowShape {\n id: string;\n label?: string;\n position: Position;\n size: Size;\n}\n\n/** Current document schema version. Bump + add a migration when shape changes. */\nexport const DOCUMENT_VERSION = 2 as const;\n\n/**\n * A complete Team Topologies diagram. This is what gets serialised to JSON,\n * embedded into exported images, and encoded into share URLs.\n */\nexport interface TtDocument {\n version: typeof DOCUMENT_VERSION;\n title: string;\n nodes: TeamNode[];\n interactions: InteractionShape[];\n flows: FlowShape[];\n}\n","/**\n * The Team Topologies visual notation, encoded as data.\n *\n * Colours, shapes and stroke styles follow the official\n * \"Team-Shape-Templates\" specification published by Team Topologies\n * (https://github.com/TeamTopologies/Team-Shape-Templates):\n *\n * - Team shapes are SOLID outlines (long-lived structures).\n * - Interaction-mode shapes are 50% transparent with DASHED outlines\n * (short-lived interactions).\n * - Each element is distinguished by SHAPE as well as colour, so the\n * notation stays readable for people with colour-vision deficiency.\n *\n * This module is pure data — it must not import the rendering layer.\n */\n\nimport type { InteractionMode, Size, TeamType } from \"./types\";\n\nexport type TeamShape = \"rounded-rect-horizontal\" | \"rounded-rect-vertical\" | \"octagon\" | \"rect\";\n\nexport type InteractionGlyph = \"parallelogram\" | \"triangle\" | \"circle\";\n\nexport type StrokeStyle = \"solid\" | \"dashed\" | \"dotted\";\n\nexport interface TeamTypeSpec {\n type: TeamType;\n /** Short display name. */\n label: string;\n /** One-line purpose, shown in the palette and inspector. */\n description: string;\n shape: TeamShape;\n fill: string;\n stroke: string;\n strokeStyle: StrokeStyle;\n strokeWidth: number;\n /** Default size when a node of this type is created. */\n defaultSize: Size;\n /** Minimum size enforced by the resizer. */\n minSize: Size;\n}\n\nexport interface InteractionModeSpec {\n mode: InteractionMode;\n label: string;\n description: string;\n shape: InteractionGlyph;\n fill: string;\n stroke: string;\n strokeStyle: StrokeStyle;\n strokeWidth: number;\n /** Opacity for the interaction shape (short-lived → translucent). */\n opacity: number;\n /** Whether direction is semantically meaningful (the X-as-a-Service triangle). */\n directional: boolean;\n /** Default size when a shape of this mode is created. */\n defaultSize: Size;\n /** Minimum size enforced by the resizer. */\n minSize: Size;\n}\n\n/** The left-to-right \"flow of change\" guide, a placeable annotation element. */\nexport interface FlowSpec {\n label: string;\n fill: string;\n stroke: string;\n strokeStyle: StrokeStyle;\n strokeWidth: number;\n defaultSize: Size;\n minSize: Size;\n}\n\nexport const TEAM_TYPE_SPECS: Record<TeamType, TeamTypeSpec> = {\n \"stream-aligned\": {\n type: \"stream-aligned\",\n label: \"Stream-aligned\",\n description: \"Aligned to a single, valuable stream of work; owns it end-to-end.\",\n shape: \"rounded-rect-horizontal\",\n fill: \"#FFEDB8\",\n stroke: \"#FFD966\",\n strokeStyle: \"solid\",\n strokeWidth: 2,\n defaultSize: { width: 240, height: 96 },\n minSize: { width: 140, height: 64 },\n },\n enabling: {\n type: \"enabling\",\n label: \"Enabling\",\n description:\n \"Helps stream-aligned teams acquire missing capabilities; coaches, then steps back.\",\n shape: \"rounded-rect-vertical\",\n fill: \"#DFBDCF\",\n stroke: \"#D09CB7\",\n strokeStyle: \"solid\",\n strokeWidth: 2,\n defaultSize: { width: 120, height: 200 },\n minSize: { width: 80, height: 120 },\n },\n \"complicated-subsystem\": {\n type: \"complicated-subsystem\",\n label: \"Complicated Subsystem\",\n description:\n \"Owns a part of the system needing deep specialist knowledge, reducing others' cognitive load.\",\n shape: \"octagon\",\n fill: \"#FFC08B\",\n stroke: \"#E88814\",\n strokeStyle: \"solid\",\n strokeWidth: 2,\n defaultSize: { width: 170, height: 150 },\n minSize: { width: 110, height: 100 },\n },\n platform: {\n type: \"platform\",\n label: \"Platform\",\n description:\n \"Provides internal self-service capabilities to reduce cognitive load for stream-aligned teams.\",\n shape: \"rect\",\n fill: \"#B7CDF1\",\n stroke: \"#6D9EEB\",\n strokeStyle: \"solid\",\n strokeWidth: 2,\n defaultSize: { width: 380, height: 130 },\n minSize: { width: 200, height: 90 },\n },\n};\n\nexport const INTERACTION_MODE_SPECS: Record<InteractionMode, InteractionModeSpec> = {\n collaboration: {\n mode: \"collaboration\",\n label: \"Collaboration\",\n description:\n \"Two teams work closely together for a defined period; high overhead, high discovery.\",\n shape: \"parallelogram\",\n fill: \"#C6BEDF\",\n stroke: \"#967EE2\",\n strokeStyle: \"dashed\",\n strokeWidth: 2,\n opacity: 0.5,\n directional: false,\n defaultSize: { width: 112, height: 72 },\n minSize: { width: 60, height: 44 },\n },\n \"x-as-a-service\": {\n mode: \"x-as-a-service\",\n label: \"X-as-a-Service\",\n description:\n \"One team consumes something the other provides 'as a service'; minimal collaboration.\",\n shape: \"triangle\",\n fill: \"#B4B4B4\",\n stroke: \"#999696\",\n strokeStyle: \"dashed\",\n strokeWidth: 2,\n opacity: 0.5,\n directional: true,\n defaultSize: { width: 88, height: 78 },\n minSize: { width: 54, height: 48 },\n },\n facilitating: {\n mode: \"facilitating\",\n label: \"Facilitating\",\n description:\n \"One team helps/coaches another to clear impediments and learn; sensing and discovery.\",\n shape: \"circle\",\n fill: \"#C9DFBE\",\n stroke: \"#78996B\",\n strokeStyle: \"dashed\",\n strokeWidth: 2,\n opacity: 0.5,\n directional: false,\n defaultSize: { width: 84, height: 84 },\n minSize: { width: 48, height: 48 },\n },\n};\n\n/**\n * The \"flow of change\" guide — a placeable dashed arrow (left-to-right).\n * Not a team or interaction: a standalone annotation element.\n */\nexport const FLOW_SPEC: FlowSpec = {\n label: \"Flow of change\",\n fill: \"transparent\",\n stroke: \"#6b6459\",\n strokeStyle: \"dashed\",\n strokeWidth: 2,\n defaultSize: { width: 520, height: 64 },\n minSize: { width: 160, height: 36 },\n};\n\n/** Maps a stroke style to an SVG/CSS dash array (empty string = solid). */\nexport function dashArray(style: StrokeStyle, strokeWidth = 2): string {\n switch (style) {\n case \"dashed\":\n return `${strokeWidth * 3} ${strokeWidth * 2}`;\n case \"dotted\":\n return `${strokeWidth} ${strokeWidth * 1.5}`;\n case \"solid\":\n default:\n return \"\";\n }\n}\n\nexport const ALL_TEAM_SPECS: readonly TeamTypeSpec[] = Object.values(TEAM_TYPE_SPECS);\nexport const ALL_INTERACTION_SPECS: readonly InteractionModeSpec[] =\n Object.values(INTERACTION_MODE_SPECS);\n","/**\n * Runtime validation for the document model using Zod.\n *\n * Anything entering the app from the outside world (imported files, share\n * URLs, localStorage) is parsed through {@link parseDocument} so malformed or\n * tampered data can never corrupt the editor state.\n */\n\nimport { z } from \"zod\";\nimport { DOCUMENT_VERSION, INTERACTION_MODES, TEAM_TYPES } from \"./types\";\nimport type { TtDocument } from \"./types\";\n\nconst teamTypeSchema = z.enum(TEAM_TYPES as unknown as [string, ...string[]]);\nconst interactionModeSchema = z.enum(INTERACTION_MODES as unknown as [string, ...string[]]);\n\nconst sizeSchema = z.object({\n width: z.number().finite().positive(),\n height: z.number().finite().positive(),\n});\n\nconst positionSchema = z.object({\n x: z.number().finite(),\n y: z.number().finite(),\n});\n\nconst hexColor = z.string().regex(/^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/, \"expected a hex colour\");\n\nexport const teamNodeSchema = z.object({\n id: z.string().min(1),\n type: teamTypeSchema,\n label: z.string(),\n description: z.string().optional(),\n position: positionSchema,\n size: sizeSchema,\n fill: hexColor.optional(),\n stroke: hexColor.optional(),\n});\n\nexport const interactionSchema = z.object({\n id: z.string().min(1),\n mode: interactionModeSchema,\n label: z.string().optional(),\n position: positionSchema,\n size: sizeSchema,\n fill: hexColor.optional(),\n stroke: hexColor.optional(),\n});\n\nexport const flowSchema = z.object({\n id: z.string().min(1),\n label: z.string().optional(),\n position: positionSchema,\n size: sizeSchema,\n});\n\nexport const documentSchema = z.object({\n version: z.literal(DOCUMENT_VERSION),\n title: z.string(),\n nodes: z.array(teamNodeSchema),\n interactions: z.array(interactionSchema),\n flows: z.array(flowSchema),\n});\n\nexport type ParseResult = { ok: true; document: TtDocument } | { ok: false; error: string };\n\n/**\n * Validates and (if necessary) migrates unknown data into a {@link TtDocument}.\n * Returns a discriminated result rather than throwing so callers can show a\n * friendly message.\n */\nexport function parseDocument(input: unknown): ParseResult {\n const migrated = migrate(input);\n const result = documentSchema.safeParse(migrated);\n if (!result.success) {\n return {\n ok: false,\n error: result.error.issues\n .map((i) => `${i.path.join(\".\") || \"(root)\"}: ${i.message}`)\n .join(\"; \"),\n };\n }\n return { ok: true, document: result.data as TtDocument };\n}\n\n/**\n * Forward-migrates older document shapes to the current version. v1 modelled\n * interactions as edges (source/target, no geometry) and carried a\n * `showFlowOfChange` flag; v2 makes interactions placed shapes and adds `flows`.\n * Legacy edge-interactions can't be placed meaningfully, so they're dropped.\n */\nfunction migrate(input: unknown): unknown {\n if (input == null || typeof input !== \"object\") return input;\n const doc = input as Record<string, unknown>;\n const next: Record<string, unknown> = { ...doc };\n delete next.showFlowOfChange; // v1 flag, gone in v2\n next.version = DOCUMENT_VERSION;\n if (typeof next.title !== \"string\") next.title = \"Untitled team topology\";\n if (!Array.isArray(next.nodes)) next.nodes = [];\n // Keep only placed interaction shapes; drop legacy edges (no position/size).\n next.interactions = Array.isArray(next.interactions)\n ? next.interactions.filter(\n (e) => e != null && typeof e === \"object\" && \"position\" in e && \"size\" in e,\n )\n : [];\n if (!Array.isArray(next.flows)) next.flows = [];\n return next;\n}\n","/**\n * Deterministic serialisation of the document model.\n *\n * Producing byte-stable JSON (sorted arrays, fixed key order, rounded\n * coordinates) makes diagrams diff-friendly in version control and gives\n * stable share URLs / embedded payloads.\n */\n\nimport { DOCUMENT_VERSION } from \"./types\";\nimport type { FlowShape, InteractionShape, Position, Size, TeamNode, TtDocument } from \"./types\";\n\n/** Round to 2 decimals to strip floating-point drift from drag operations. */\nfunction round(n: number): number {\n return Math.round(n * 100) / 100;\n}\n\nfunction normPosition(p: Position): Position {\n return { x: round(p.x), y: round(p.y) };\n}\n\nfunction normSize(s: Size): Size {\n return { width: round(s.width), height: round(s.height) };\n}\n\n/** Drops undefined fields and applies a fixed key order to a node. */\nfunction normNode(n: TeamNode): TeamNode {\n const out: TeamNode = {\n id: n.id,\n type: n.type,\n label: n.label,\n position: normPosition(n.position),\n size: normSize(n.size),\n };\n if (n.description) out.description = n.description;\n if (n.fill) out.fill = n.fill;\n if (n.stroke) out.stroke = n.stroke;\n return out;\n}\n\nfunction normInteraction(e: InteractionShape): InteractionShape {\n const out: InteractionShape = {\n id: e.id,\n mode: e.mode,\n position: normPosition(e.position),\n size: normSize(e.size),\n };\n if (e.label) out.label = e.label;\n if (e.fill) out.fill = e.fill;\n if (e.stroke) out.stroke = e.stroke;\n return out;\n}\n\nfunction normFlow(f: FlowShape): FlowShape {\n const out: FlowShape = {\n id: f.id,\n position: normPosition(f.position),\n size: normSize(f.size),\n };\n if (f.label) out.label = f.label;\n return out;\n}\n\nconst byId = (a: { id: string }, b: { id: string }): number =>\n a.id < b.id ? -1 : a.id > b.id ? 1 : 0;\n\n/** Returns a canonicalised copy of a document (sorted, rounded, version-stamped). */\nexport function canonicalize(doc: TtDocument): TtDocument {\n return {\n version: DOCUMENT_VERSION,\n title: doc.title,\n nodes: [...doc.nodes].map(normNode).sort(byId),\n interactions: [...doc.interactions].map(normInteraction).sort(byId),\n flows: [...doc.flows].map(normFlow).sort(byId),\n };\n}\n\n/** Serialises a document to deterministic, pretty-printed JSON. */\nexport function serializeDocument(doc: TtDocument, pretty = true): string {\n const canonical = canonicalize(doc);\n return JSON.stringify(canonical, null, pretty ? 2 : 0);\n}\n","/**\n * Factory helpers for constructing well-formed model objects with the correct\n * notation defaults (sizes, labels). Kept DOM-free.\n */\n\nimport { nanoid } from \"nanoid\";\nimport { FLOW_SPEC, INTERACTION_MODE_SPECS, TEAM_TYPE_SPECS } from \"./notation\";\nimport type {\n FlowShape,\n InteractionMode,\n InteractionShape,\n Position,\n TeamNode,\n TeamType,\n TtDocument,\n} from \"./types\";\nimport { DOCUMENT_VERSION } from \"./types\";\n\nexport function newId(prefix: string): string {\n return `${prefix}_${nanoid(8)}`;\n}\n\n/** Creates a team node of the given type at a position, with notation defaults. */\nexport function createTeamNode(\n type: TeamType,\n position: Position,\n overrides: Partial<Omit<TeamNode, \"id\" | \"type\">> = {},\n): TeamNode {\n const spec = TEAM_TYPE_SPECS[type];\n return {\n id: newId(\"team\"),\n type,\n label: overrides.label ?? spec.label,\n description: overrides.description,\n position,\n size: overrides.size ?? { ...spec.defaultSize },\n fill: overrides.fill,\n stroke: overrides.stroke,\n };\n}\n\n/** Creates a placed interaction shape of the given mode, with notation defaults. */\nexport function createInteractionShape(\n mode: InteractionMode,\n position: Position,\n overrides: Partial<Omit<InteractionShape, \"id\" | \"mode\" | \"position\">> = {},\n): InteractionShape {\n const spec = INTERACTION_MODE_SPECS[mode];\n return {\n id: newId(\"int\"),\n mode,\n position,\n size: overrides.size ?? { ...spec.defaultSize },\n label: overrides.label,\n fill: overrides.fill,\n stroke: overrides.stroke,\n };\n}\n\n/** Creates a placed \"flow of change\" arrow, with notation defaults. */\nexport function createFlowShape(\n position: Position,\n overrides: Partial<Omit<FlowShape, \"id\" | \"position\">> = {},\n): FlowShape {\n return {\n id: newId(\"flow\"),\n position,\n size: overrides.size ?? { ...FLOW_SPEC.defaultSize },\n label: overrides.label ?? FLOW_SPEC.label,\n };\n}\n\n/** An empty document with sensible defaults. */\nexport function emptyDocument(title = \"Untitled team topology\"): TtDocument {\n return {\n version: DOCUMENT_VERSION,\n title,\n nodes: [],\n interactions: [],\n flows: [],\n };\n}\n","/**\n * A small but complete example diagram exercising all four team types, all three\n * interaction modes (as placed shapes overlaying the team boundaries) and a\n * flow-of-change element. Ids are fixed so the fixture serialises stably.\n */\n\nimport { DOCUMENT_VERSION } from \"./types\";\nimport type { TtDocument } from \"./types\";\nimport { INTERACTION_MODE_SPECS, TEAM_TYPE_SPECS } from \"./notation\";\n\nconst s = TEAM_TYPE_SPECS;\nconst i = INTERACTION_MODE_SPECS;\n\nexport const SAMPLE_DOCUMENT: TtDocument = {\n version: DOCUMENT_VERSION,\n title: \"Online retail — team topology\",\n nodes: [\n {\n id: \"team_enabling\",\n type: \"enabling\",\n label: \"Agile Enablement\",\n description: \"Coaches teams on testing and continuous delivery practices.\",\n position: { x: 60, y: 150 },\n size: { ...s.enabling.defaultSize },\n },\n {\n id: \"team_checkout\",\n type: \"stream-aligned\",\n label: \"Checkout Stream\",\n description: \"Owns the end-to-end checkout & payments journey.\",\n position: { x: 320, y: 110 },\n size: { ...s[\"stream-aligned\"].defaultSize },\n },\n {\n id: \"team_mobile\",\n type: \"stream-aligned\",\n label: \"Mobile Experience\",\n description: \"Owns the native mobile shopping experience.\",\n position: { x: 700, y: 110 },\n size: { ...s[\"stream-aligned\"].defaultSize },\n },\n {\n id: \"team_fraud\",\n type: \"complicated-subsystem\",\n label: \"Risk & Fraud Engine\",\n description: \"Specialist ML team owning real-time fraud scoring.\",\n position: { x: 740, y: 320 },\n size: { ...s[\"complicated-subsystem\"].defaultSize },\n },\n {\n id: \"team_platform\",\n type: \"platform\",\n label: \"Internal Developer Platform\",\n description: \"Self-service CI/CD, observability and runtime for all streams.\",\n position: { x: 300, y: 540 },\n size: { ...s.platform.defaultSize },\n },\n ],\n interactions: [\n {\n id: \"int_enable_checkout\",\n mode: \"facilitating\",\n label: \"test automation\",\n position: { x: 212, y: 158 },\n size: { ...i.facilitating.defaultSize },\n },\n {\n id: \"int_checkout_fraud\",\n mode: \"collaboration\",\n label: \"fraud rules discovery\",\n position: { x: 566, y: 232 },\n size: { ...i.collaboration.defaultSize },\n },\n {\n id: \"int_platform_checkout\",\n mode: \"x-as-a-service\",\n position: { x: 384, y: 396 },\n size: { ...i[\"x-as-a-service\"].defaultSize },\n },\n {\n id: \"int_platform_mobile\",\n mode: \"x-as-a-service\",\n position: { x: 612, y: 396 },\n size: { ...i[\"x-as-a-service\"].defaultSize },\n },\n {\n id: \"int_fraud_mobile\",\n mode: \"x-as-a-service\",\n label: \"risk scoring API\",\n position: { x: 800, y: 238 },\n size: { ...i[\"x-as-a-service\"].defaultSize },\n },\n ],\n flows: [\n {\n id: \"flow_main\",\n label: \"Flow of change\",\n position: { x: 60, y: 712 },\n size: { width: 880, height: 60 },\n },\n ],\n};\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@miragon/team-topologies-schema-model",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "The Team Topologies data model with types, the notation specification, runtime validation, migrations and deterministic JSON serialization.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/miragon/team-topologies-modeler.git",
|
|
9
|
+
"directory": "packages/schema-model"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://github.com/miragon/team-topologies-modeler/tree/main/packages/schema-model#readme",
|
|
12
|
+
"bugs": "https://github.com/miragon/team-topologies-modeler/issues",
|
|
13
|
+
"type": "module",
|
|
14
|
+
"sideEffects": false,
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"types": "./dist/index.d.ts",
|
|
18
|
+
"import": "./dist/index.js",
|
|
19
|
+
"require": "./dist/index.cjs"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"main": "./dist/index.cjs",
|
|
23
|
+
"module": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts",
|
|
25
|
+
"files": [
|
|
26
|
+
"dist"
|
|
27
|
+
],
|
|
28
|
+
"publishConfig": {
|
|
29
|
+
"access": "public"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "tsup",
|
|
33
|
+
"typecheck": "tsc -p tsconfig.json",
|
|
34
|
+
"test": "npm --prefix ../.. run test"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"nanoid": "5.0.9",
|
|
38
|
+
"zod": "3.24.1"
|
|
39
|
+
},
|
|
40
|
+
"devDependencies": {
|
|
41
|
+
"tsup": "8.3.5",
|
|
42
|
+
"typescript": "5.7.2",
|
|
43
|
+
"vitest": "3.2.6"
|
|
44
|
+
}
|
|
45
|
+
}
|