@brunosouzas/design-system 0.6.1 → 0.7.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.
Files changed (40) hide show
  1. package/NOTICE +13 -0
  2. package/README.md +75 -40
  3. package/dist/scripts/cover.d.ts +7 -4
  4. package/dist/scripts/cover.js +25 -8
  5. package/dist/src/fonts/embed.d.ts +7 -0
  6. package/dist/src/fonts/embed.js +219 -0
  7. package/dist/src/pieces/bank-objects.d.ts +1 -1
  8. package/dist/src/pieces/bank-objects.js +26 -18
  9. package/dist/src/pieces/cover.js +2 -1
  10. package/dist/src/pieces/diagram.js +3 -3
  11. package/dist/src/pieces/eip-icons.js +27 -27
  12. package/dist/src/pieces/emote.d.ts +13 -0
  13. package/dist/src/pieces/emote.js +88 -0
  14. package/dist/src/pieces/index.d.ts +1 -1
  15. package/dist/src/pieces/index.js +1 -1
  16. package/dist/src/pieces/ink.d.ts +26 -16
  17. package/dist/src/pieces/ink.js +15 -6
  18. package/dist/src/pieces/library.d.ts +9 -15
  19. package/dist/src/pieces/library.js +52 -53
  20. package/dist/src/pieces/link-icons.d.ts +2 -1
  21. package/dist/src/pieces/link-icons.js +10 -18
  22. package/dist/src/pieces/metro.d.ts +4 -2
  23. package/dist/src/pieces/metro.js +14 -13
  24. package/dist/src/pieces/node.d.ts +5 -3
  25. package/dist/src/pieces/node.js +6 -4
  26. package/dist/src/pieces/params.js +2 -2
  27. package/dist/tokens/generated/tokens.d.ts +68 -156
  28. package/dist/tokens/generated/tokens.js +69 -157
  29. package/fonts/OFL.txt +97 -0
  30. package/fonts/SourceCodePro-Bold.ttf +0 -0
  31. package/fonts/SourceCodePro-Regular.ttf +0 -0
  32. package/fonts/SourceSans3-Black.ttf +0 -0
  33. package/fonts/SourceSans3-Bold.ttf +0 -0
  34. package/fonts/SourceSans3-Regular.ttf +0 -0
  35. package/package.json +10 -1
  36. package/tokens/generated/tokens.css +60 -110
  37. package/tokens/generated/tokens.json +69 -157
  38. package/tokens/generated/tokens.ts +69 -157
  39. package/dist/src/pieces/cast.d.ts +0 -35
  40. package/dist/src/pieces/cast.js +0 -333
@@ -8,5 +8,5 @@ export type BankObjectParams = {
8
8
  surface?: SurfaceName;
9
9
  scale?: number;
10
10
  };
11
- /** One of the six prop-bank objects for covers (I10): Correio, Lume, Carga, Anel, Módulo, Hub — screen off. */
11
+ /** One of the six prop-bank objects for covers (I10): Correio, Lume, Carga, Anel, Módulo, Hub, with idle eyes on the screen. */
12
12
  export declare const bankObject: import("./piece.ts").Piece<BankObjectParams>;
@@ -1,28 +1,36 @@
1
- // The bank of objects for covers (identity studio I10): six objects, screen
2
- // off, that appear on track covers instead of a cast character with a role.
3
- // Geometry ported unchanged from the approved phase-3 source
4
- // (`~/.hermes/cache/scratch/ab267/casting3.py`: `courier`/`lume`/`carga`/`anel`/`modulo`/`hub`).
1
+ // The bank of objects for covers (identity studio I10, amended in 0.7.0): six
2
+ // objects that appear on track covers instead of a cast character with a role.
3
+ // Geometry ported from the approved phase-3 source
4
+ // (`~/.hermes/cache/scratch/ab267/casting3.py`: `courier`/`lume`/`carga`/`anel`/`modulo`/`hub`);
5
+ // in 0.7.0 every screen shows the cast's idle eyes and `modulo` loses the two
6
+ // inner strokes between its legs (the card 301 preview the owner approved).
5
7
  //
6
- // Why screen off: a cast character (Mira, Visor, Drone, Kiu, Sinal) has a
7
- // story role; a bank object is scenery. If a future piece needs the same
8
- // object with a face in two or more places, it becomes a character with its
9
- // own sheet (I10) — not a change to this file.
10
- import { drawn, el, g } from "./node.js";
8
+ // Why idle eyes and nothing more: an object with a face-like screen and no eyes
9
+ // reads as dead, so the screen is on; but a bank object is scenery, not a
10
+ // character with a story role (Mira, Visor, Drone, Kiu, Sinal), so it takes no
11
+ // expression. If a future piece needs the same object with expressions or a
12
+ // role in two or more places, it becomes a character with its own sheet (E8),
13
+ // not a change to this file.
14
+ import { drawn, el, g, r2 } from "./node.js";
11
15
  import { surfaceParam } from "./ink.js";
12
16
  import { pos, num } from "./params.js";
13
17
  import { definePiece } from "./piece.js";
14
18
  import { outlined, skin } from "./skin.js";
15
19
  export const BANK_OBJECT_NAMES = ["courier", "lume", "carga", "anel", "modulo", "hub"];
16
- /** The screen, off: just the visor-coloured panel, no eyes (I10). */
17
- const screenOff = (x, y, w, h, s, rx) => el("rect", { x, y, width: w, height: h, rx: rx ?? h / 2.4, fill: s.visor });
18
- const courier = (s) => g({}, el("path", { d: "M-42 -100 L-60 -126 H-34 L-18 -100 Z", fill: s.outline }), el("path", { d: "M-42 -40 L-60 -14 H-34 L-18 -40 Z", fill: s.outline }), el("rect", { x: -72, y: -84, width: 14, height: 28, rx: 4, fill: s.outline }), el("path", { d: "M-50 -102 H18 C58 -102 80 -84 80 -70 C80 -56 58 -38 18 -38 H-50 A32 32 0 0 1 -50 -102 Z", ...outlined(s) }), el("rect", { x: -40, y: -82, width: 24, height: 24, rx: 5, fill: s.accent }), screenOff(-2, -90, 56, 38, s));
20
+ /** The screen: the visor-coloured panel with the cast's idle eyes centred on it, and no other expression. */
21
+ const screen = (x, y, w, h, s, rx) => {
22
+ // Two upright pills a fifth of the screen's width either side of its centre, 0.42 of its height.
23
+ const cx = x + w / 2, cy = y + h / 2, dx = w * 0.2, ew = Math.max(5, w * 0.11), eh = h * 0.42;
24
+ return g({}, el("rect", { x, y, width: w, height: h, rx: rx ?? h / 2.4, fill: s.visor }), ...[-dx, dx].map((sx) => el("rect", { x: r2(cx + sx - ew / 2), y: r2(cy - eh / 2), width: r2(ew), height: r2(eh), rx: r2(ew / 2), fill: s.eye, stroke: "none" })));
25
+ };
26
+ const courier = (s) => g({}, el("path", { d: "M-42 -100 L-60 -126 H-34 L-18 -100 Z", fill: s.outline }), el("path", { d: "M-42 -40 L-60 -14 H-34 L-18 -40 Z", fill: s.outline }), el("rect", { x: -72, y: -84, width: 14, height: 28, rx: 4, fill: s.outline }), el("path", { d: "M-50 -102 H18 C58 -102 80 -84 80 -70 C80 -56 58 -38 18 -38 H-50 A32 32 0 0 1 -50 -102 Z", ...outlined(s) }), el("rect", { x: -40, y: -82, width: 24, height: 24, rx: 5, fill: s.accent }), screen(-2, -90, 56, 38, s));
19
27
  const lume = (s) => {
20
28
  const rays = [0, 1, 2].map((i) => el("path", { d: `M${50 + i * 4} ${-104 + i * 22} L${78 + i * 8} ${-112 + i * 26}`, stroke: s.accent, "stroke-width": 7, "stroke-linecap": "round" }));
21
- return g({}, el("path", { d: "M-20 -138 A20 20 0 0 1 20 -138", stroke: s.outline, "stroke-width": 6, fill: "none" }), el("path", { d: "M-30 -138 H30 L38 -124 H-38 Z", fill: s.outline }), el("rect", { x: -36, y: -126, width: 72, height: 80, rx: 14, ...outlined(s) }), screenOff(-25, -114, 50, 44, s), el("path", { d: "M-38 -46 H38 L30 -34 H-30 Z", fill: s.outline }), el("path", { d: "M-10 -34 H10 L0 -20 Z", fill: s.outline }), ...rays);
29
+ return g({}, el("path", { d: "M-20 -138 A20 20 0 0 1 20 -138", stroke: s.outline, "stroke-width": 6, fill: "none" }), el("path", { d: "M-30 -138 H30 L38 -124 H-38 Z", fill: s.outline }), el("rect", { x: -36, y: -126, width: 72, height: 80, rx: 14, ...outlined(s) }), screen(-25, -114, 50, 44, s), el("path", { d: "M-38 -46 H38 L30 -34 H-30 Z", fill: s.outline }), el("path", { d: "M-10 -34 H10 L0 -20 Z", fill: s.outline }), ...rays);
22
30
  };
23
- const carga = (s) => g({}, el("rect", { x: -44, y: -152, width: 60, height: 28, rx: 4, fill: s.accent }), el("path", { d: "M-30 -152 V-124 M-14 -152 V-124 M2 -152 V-124", stroke: s.body, "stroke-width": 3 }), el("path", { d: "M-24 -60 L-38 -32 L-24 -6 M24 -60 L12 -32 L26 -6", stroke: s.outline, "stroke-width": 10, "stroke-linecap": "round", "stroke-linejoin": "round", fill: "none" }), el("rect", { x: -40, y: -8, width: 30, height: 9, rx: 4.5, fill: s.outline }), el("rect", { x: 12, y: -8, width: 30, height: 9, rx: 4.5, fill: s.outline }), el("rect", { x: -50, y: -126, width: 100, height: 70, rx: 16, ...outlined(s) }), screenOff(-30, -114, 62, 36, s), el("path", { d: "M50 -96 H66 V-74", stroke: s.outline, "stroke-width": 7, "stroke-linecap": "round", fill: "none" }), el("path", { d: "M58 -74 H74", stroke: s.outline, "stroke-width": 7, "stroke-linecap": "round" }));
24
- const anel = (s) => g({}, el("path", { d: "M-82 -78 A84 20 -12 0 1 82 -98", stroke: s.accent, "stroke-width": 9, fill: "none", "stroke-linecap": "round" }), el("circle", { cx: 0, cy: -88, r: 46, ...outlined(s) }), screenOff(-31, -112, 62, 32, s), el("path", { d: "M82 -98 A84 20 -12 0 1 -82 -78", stroke: s.accent, "stroke-width": 9, fill: "none", "stroke-linecap": "round" }), el("rect", { x: -66, y: -74, width: 14, height: 14, rx: 3, fill: s.outline }), el("rect", { x: 58, y: -92, width: 14, height: 14, rx: 3, fill: s.outline }));
25
- const modulo = (s) => g({}, el("path", { d: "M-22 -40 L-32 -2 M22 -40 L32 -2", stroke: s.outline, "stroke-width": 6, "stroke-linecap": "round" }), el("path", { d: "M-44 -50 L-74 -2 M44 -50 L74 -2", stroke: s.outline, "stroke-width": 7, "stroke-linecap": "round" }), el("rect", { x: -88, y: -6, width: 28, height: 7, rx: 3.5, fill: s.outline }), el("rect", { x: 60, y: -6, width: 28, height: 7, rx: 3.5, fill: s.outline }), el("rect", { x: -46, y: -62, width: 92, height: 24, rx: 5, fill: s.accent }), el("path", { d: "M22 -134 L34 -154", stroke: s.outline, "stroke-width": 5, "stroke-linecap": "round" }), el("path", { d: "M26 -160 A10 10 0 0 0 44 -150 Z", fill: s.outline }), el("path", { d: "M-36 -136 H36 L52 -114 V-80 L36 -62 H-36 L-52 -80 V-114 Z", ...outlined(s) }), screenOff(-34, -122, 68, 42, s));
31
+ const carga = (s) => g({}, el("rect", { x: -44, y: -152, width: 60, height: 28, rx: 4, fill: s.accent }), el("path", { d: "M-30 -152 V-124 M-14 -152 V-124 M2 -152 V-124", stroke: s.body, "stroke-width": 3 }), el("path", { d: "M-24 -60 L-38 -32 L-24 -6 M24 -60 L12 -32 L26 -6", stroke: s.outline, "stroke-width": 10, "stroke-linecap": "round", "stroke-linejoin": "round", fill: "none" }), el("rect", { x: -40, y: -8, width: 30, height: 9, rx: 4.5, fill: s.outline }), el("rect", { x: 12, y: -8, width: 30, height: 9, rx: 4.5, fill: s.outline }), el("rect", { x: -50, y: -126, width: 100, height: 70, rx: 16, ...outlined(s) }), screen(-30, -114, 62, 36, s), el("path", { d: "M50 -96 H66 V-74", stroke: s.outline, "stroke-width": 7, "stroke-linecap": "round", fill: "none" }), el("path", { d: "M58 -74 H74", stroke: s.outline, "stroke-width": 7, "stroke-linecap": "round" }));
32
+ const anel = (s) => g({}, el("path", { d: "M-82 -78 A84 20 -12 0 1 82 -98", stroke: s.accent, "stroke-width": 9, fill: "none", "stroke-linecap": "round" }), el("circle", { cx: 0, cy: -88, r: 46, ...outlined(s) }), screen(-31, -112, 62, 32, s), el("path", { d: "M82 -98 A84 20 -12 0 1 -82 -78", stroke: s.accent, "stroke-width": 9, fill: "none", "stroke-linecap": "round" }), el("rect", { x: -66, y: -74, width: 14, height: 14, rx: 3, fill: s.outline }), el("rect", { x: 58, y: -92, width: 14, height: 14, rx: 3, fill: s.outline }));
33
+ const modulo = (s) => g({}, el("path", { d: "M-44 -50 L-74 -2 M44 -50 L74 -2", stroke: s.outline, "stroke-width": 7, "stroke-linecap": "round" }), el("rect", { x: -88, y: -6, width: 28, height: 7, rx: 3.5, fill: s.outline }), el("rect", { x: 60, y: -6, width: 28, height: 7, rx: 3.5, fill: s.outline }), el("rect", { x: -46, y: -62, width: 92, height: 24, rx: 5, fill: s.accent }), el("path", { d: "M22 -134 L34 -154", stroke: s.outline, "stroke-width": 5, "stroke-linecap": "round" }), el("path", { d: "M26 -160 A10 10 0 0 0 44 -150 Z", fill: s.outline }), el("path", { d: "M-36 -136 H36 L52 -114 V-80 L36 -62 H-36 L-52 -80 V-114 Z", ...outlined(s) }), screen(-34, -122, 68, 42, s));
26
34
  const hub = (s) => {
27
35
  const arms = [];
28
36
  const spokes = [
@@ -32,7 +40,7 @@ const hub = (s) => {
32
40
  arms.push(el("path", { d: `M${x1} ${y1} Q${cx} ${cy} ${x2} ${y2}`, stroke: s.outline, "stroke-width": 7, fill: "none", "stroke-linecap": "round" }));
33
41
  arms.push(el("rect", { x: x2 - 8, y: y2 - 4, width: 16, height: 12, rx: 3, fill: s.accent }));
34
42
  }
35
- return g({}, ...arms, el("path", { d: "M-50 -76 V-104 A50 50 0 0 1 50 -104 V-76 Q0 -60 -50 -76 Z", ...outlined(s) }), screenOff(-36, -130, 72, 40, s));
43
+ return g({}, ...arms, el("path", { d: "M-50 -76 V-104 A50 50 0 0 1 50 -104 V-76 Q0 -60 -50 -76 Z", ...outlined(s) }), screen(-36, -130, 72, 40, s));
36
44
  };
37
45
  const DRAW = { courier, lume, carga, anel, modulo, hub };
38
46
  const drawBankObject = (p) => {
@@ -40,5 +48,5 @@ const drawBankObject = (p) => {
40
48
  const body = DRAW[p.name](s);
41
49
  return drawn([g({ "data-piece": `bank-${p.name}`, transform: `translate(${p.x} ${p.y}) scale(${p.scale ?? 1})`, stroke: "none" }, body)]);
42
50
  };
43
- /** One of the six prop-bank objects for covers (I10): Correio, Lume, Carga, Anel, Módulo, Hub — screen off. */
51
+ /** One of the six prop-bank objects for covers (I10): Correio, Lume, Carga, Anel, Módulo, Hub, with idle eyes on the screen. */
44
52
  export const bankObject = definePiece("bankObject", { name: { kind: "enum", required: true, values: BANK_OBJECT_NAMES }, x: pos(), y: pos(), surface: surfaceParam, scale: num({ min: 0.25, max: 4 }) }, drawBankObject);
@@ -325,7 +325,8 @@ const validateResolved = (spec) => {
325
325
  out.push({ path: key, message: "expected a non-empty string" });
326
326
  }
327
327
  if (format === "icon") {
328
- for (const key of ["background", "rings", "custom", "customAt", "height"])
328
+ // signature too since 0.7.0 (0.6.x accepted it and drew nothing).
329
+ for (const key of ["background", "rings", "custom", "customAt", "height", "signature"])
329
330
  if (spec[key] !== undefined)
330
331
  out.push({ path: key, message: NOT_FOR_ICONS });
331
332
  for (const key of ["background", "rings", "custom"])
@@ -76,7 +76,7 @@ export const storeNode = definePiece("storeNode", { ...shapeSchema(true), ry: si
76
76
  const { outline } = inkOf(params);
77
77
  const rx = r2(w / 2);
78
78
  const body = (dx, dy, attrs) => el("path", { d: `M${r2(x + dx)},${r2(y + ry + dy)} A${rx},${ry} 0 0 1 ${r2(x + w + dx)},${r2(y + ry + dy)} V${r2(y + h - ry + dy)} A${rx},${ry} 0 0 1 ${r2(x + dx)},${r2(y + h - ry + dy)} Z`, ...attrs });
79
- const lid = el("path", { d: `M${r2(x)},${r2(y + ry)} A${rx},${ry} 0 0 0 ${r2(x + w)},${r2(y + ry)}`, fill: "none", stroke: ink, "stroke-width": r2(0.75 * outline) });
79
+ const lid = el("path", { d: `M${r2(x)},${r2(y + ry)} A${rx},${ry} 0 0 0 ${r2(x + w)},${r2(y + ry)}`, fill: "none", stroke: inkOf(params).line, "stroke-width": r2(0.75 * outline) });
80
80
  return drawn([...sticker(body, c.face, params), lid], centred(x + w / 2, y + (h + ry) / 2, text, subtitle, c, params.textSize));
81
81
  }, (params) => {
82
82
  const ry = params.ry ?? 8;
@@ -88,7 +88,7 @@ export const queueNode = definePiece("queueNode", shapeSchema(false), (params) =
88
88
  const { x, y, width: w, height: h = M.nodeHeight, text, subtitle, fill } = params;
89
89
  const c = coloursOf(fill, params);
90
90
  const { outline } = inkOf(params);
91
- const rails = el("path", { d: `M${r2(x + RAIL)},${r2(y)} V${r2(y + h)} M${r2(x + w - RAIL)},${r2(y)} V${r2(y + h)}`, fill: "none", stroke: ink, "stroke-width": r2(0.75 * outline) });
91
+ const rails = el("path", { d: `M${r2(x + RAIL)},${r2(y)} V${r2(y + h)} M${r2(x + w - RAIL)},${r2(y)} V${r2(y + h)}`, fill: "none", stroke: inkOf(params).line, "stroke-width": r2(0.75 * outline) });
92
92
  return drawn([...sticker(rect(x, y, w, h, tokens.radius.small), c.face, params), rails], centred(x + w / 2, y + h / 2, text, subtitle, c, params.textSize));
93
93
  }, (params) => {
94
94
  const height = params.height ?? M.nodeHeight;
@@ -111,7 +111,7 @@ const TAB = 24;
111
111
  const tabWidth = (params) => params.tagWidth ?? 7.2 * characters(params.tag) + 24;
112
112
  /** A container (a platform, a broker) with its name on a tab centred on the top edge. */
113
113
  export const taggedContainer = definePiece("taggedContainer", { x: pos(), y: pos(), width: size(true), height: size(true), tag: label(), tagWidth: size(), tagFill: col(), fill: col(), ...inkSchema }, (params) => {
114
- const { x, y, width, height, tag, tagFill = "color.transitional", fill } = params;
114
+ const { x, y, width, height, tag, tagFill = "color.white", fill } = params;
115
115
  const tw = tabWidth(params);
116
116
  const c = coloursOf(fill, params);
117
117
  return drawn([...sticker(rect(x, y, width, height, M.nodeRadius), c.face, params), ...sticker(rect(x + 14, y - TAB / 2, tw, TAB, TAB / 2), colour(tagFill, "tagFill"), params)], [words(x + 14 + tw / 2, y + 4.5, tag, { fill: ink, "font-size": M.badgeTextSize, "font-weight": bold, "text-anchor": "middle" })]);
@@ -21,7 +21,7 @@ export const EIP_ICONS = [
21
21
  description: "Icon of the Aggregator pattern: a component turning three messages into one. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
22
22
  nodes: [
23
23
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
24
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
24
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
25
25
  n("rect", { x: "16", y: "8", width: "6", height: "6", fill: C.white, stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
26
26
  n("rect", { x: "16", y: "16.5", width: "6", height: "6", fill: C.white, stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
27
27
  n("rect", { x: "16", y: "25", width: "6", height: "6", fill: C.white, stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
@@ -36,11 +36,11 @@ export const EIP_ICONS = [
36
36
  description: "Icon of the Canonical Data Model pattern: two translators on both sides of one shared message format; the book has no icon for this pattern, so this is drawn from its sketch. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
37
37
  nodes: [
38
38
  n("rect", { x: "4.5", y: "12.5", width: "14", height: "19", rx: "3", fill: C.ink }),
39
- n("rect", { x: "2", y: "10", width: "14", height: "19", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
39
+ n("rect", { x: "2", y: "10", width: "14", height: "19", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
40
40
  n("polyline", { points: "5,13 13,26", fill: "none", stroke: C.ink, "stroke-width": "1.6", "stroke-linecap": "round", "stroke-linejoin": "round" }),
41
41
  n("polyline", { points: "5,26 13,13", fill: "none", stroke: C.ink, "stroke-width": "1.6", "stroke-linecap": "round", "stroke-linejoin": "round" }),
42
42
  n("rect", { x: "49.5", y: "12.5", width: "14", height: "19", rx: "3", fill: C.ink }),
43
- n("rect", { x: "47", y: "10", width: "14", height: "19", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
43
+ n("rect", { x: "47", y: "10", width: "14", height: "19", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
44
44
  n("polyline", { points: "50,13 58,26", fill: "none", stroke: C.ink, "stroke-width": "1.6", "stroke-linecap": "round", "stroke-linejoin": "round" }),
45
45
  n("polyline", { points: "50,26 58,13", fill: "none", stroke: C.ink, "stroke-width": "1.6", "stroke-linecap": "round", "stroke-linejoin": "round" }),
46
46
  n("polyline", { points: "18.5,19.5 22.06,19.5", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
@@ -49,9 +49,9 @@ export const EIP_ICONS = [
49
49
  n("polygon", { points: "46.00,19.50 41.80,21.81 41.80,17.19", fill: C.ink }),
50
50
  n("rect", { x: "28.5", y: "15.5", width: "11", height: "11", fill: C.ink }),
51
51
  n("rect", { x: "27", y: "14", width: "11", height: "11", fill: C.white, stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
52
- n("rect", { x: "29.2", y: "14.75", width: "1.9", height: "9.5", fill: C.caller }),
53
- n("rect", { x: "32.1", y: "14.75", width: "1.9", height: "9.5", fill: C.caller }),
54
- n("rect", { x: "35", y: "14.75", width: "1.9", height: "9.5", fill: C.caller }),
52
+ n("rect", { x: "29.2", y: "14.75", width: "1.9", height: "9.5", fill: C.state.caller }),
53
+ n("rect", { x: "32.1", y: "14.75", width: "1.9", height: "9.5", fill: C.state.caller }),
54
+ n("rect", { x: "35", y: "14.75", width: "1.9", height: "9.5", fill: C.state.caller }),
55
55
  n("rect", { x: "27", y: "14", width: "11", height: "11", fill: "none", stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
56
56
  ],
57
57
  },
@@ -61,9 +61,9 @@ export const EIP_ICONS = [
61
61
  description: "Icon of the Channel Adapter pattern: an application with a wavy edge, an adapter plate, a two-way arrow and the end of a channel pipe. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
62
62
  nodes: [
63
63
  n("path", { d: "M4,4 H14 V35 H4 Q7.5,30 4,25 Q0.5,20 4,15 Q7.5,9.5 4,4 Z", fill: C.ink, transform: "translate(2 2)" }),
64
- n("path", { d: "M4,4 H14 V35 H4 Q7.5,30 4,25 Q0.5,20 4,15 Q7.5,9.5 4,4 Z", fill: C.transitional, stroke: C.ink, "stroke-width": "1.75", "stroke-linejoin": "round" }),
64
+ n("path", { d: "M4,4 H14 V35 H4 Q7.5,30 4,25 Q0.5,20 4,15 Q7.5,9.5 4,4 Z", fill: C.state.transitional, stroke: C.ink, "stroke-width": "1.75", "stroke-linejoin": "round" }),
65
65
  n("polygon", { points: "16.00,6.00 26.00,11.50 26.00,31.50 16.00,37.00", fill: C.ink }),
66
- n("polygon", { points: "14.00,4.00 24.00,9.50 24.00,29.50 14.00,35.00", fill: C.caller, stroke: C.ink, "stroke-width": "1.75", "stroke-linejoin": "round" }),
66
+ n("polygon", { points: "14.00,4.00 24.00,9.50 24.00,29.50 14.00,35.00", fill: C.state.caller, stroke: C.ink, "stroke-width": "1.75", "stroke-linejoin": "round" }),
67
67
  n("g", {}, [
68
68
  n("path", { d: "M32,19.5 H39", fill: "none", stroke: C.ink, "stroke-width": "5.6", "stroke-linecap": "butt", "stroke-linejoin": "round" }),
69
69
  n("polygon", { points: "27.50,19.50 33.00,16.09 33.00,22.91", fill: C.ink, stroke: C.ink, "stroke-width": "3", "stroke-linejoin": "round" }),
@@ -85,7 +85,7 @@ export const EIP_ICONS = [
85
85
  description: "Icon of the Claim Check pattern: a component turning a large message into a small one, with a key. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
86
86
  nodes: [
87
87
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
88
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
88
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
89
89
  n("rect", { x: "12", y: "9.5", width: "13", height: "13", fill: C.white, stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
90
90
  n("polyline", { points: "28,16 36.5,16.0", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
91
91
  n("polygon", { points: "40.00,16.00 35.00,18.75 35.00,13.25", fill: C.ink }),
@@ -93,7 +93,7 @@ export const EIP_ICONS = [
93
93
  n("polyline", { points: "48.5,28 56,28", fill: "none", stroke: C.ink, "stroke-width": "2", "stroke-linecap": "round", "stroke-linejoin": "round" }),
94
94
  n("polyline", { points: "53,28 53,31", fill: "none", stroke: C.ink, "stroke-width": "1.6", "stroke-linecap": "round", "stroke-linejoin": "round" }),
95
95
  n("polyline", { points: "55.6,28 55.6,30.5", fill: "none", stroke: C.ink, "stroke-width": "1.6", "stroke-linecap": "round", "stroke-linejoin": "round" }),
96
- n("circle", { cx: "45.5", cy: "28", r: "3.4", fill: C.transitional, stroke: C.ink, "stroke-width": "1.6" }),
96
+ n("circle", { cx: "45.5", cy: "28", r: "3.4", fill: C.state.transitional, stroke: C.ink, "stroke-width": "1.6" }),
97
97
  ],
98
98
  },
99
99
  {
@@ -102,7 +102,7 @@ export const EIP_ICONS = [
102
102
  description: "Icon of the Competing Consumers pattern: a channel arrow entering a component that fans out to three consumers. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
103
103
  nodes: [
104
104
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
105
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
105
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
106
106
  n("g", { transform: "translate(1.8 1.8)" }, [
107
107
  n("path", { d: "M2,19 H22", fill: "none", stroke: C.ink, "stroke-width": "6.6", "stroke-linecap": "butt", "stroke-linejoin": "round" }),
108
108
  n("polygon", { points: "31.00,19.00 22.00,24.58 22.00,13.42", fill: C.ink, stroke: C.ink, "stroke-width": "3", "stroke-linejoin": "round" }),
@@ -132,7 +132,7 @@ export const EIP_ICONS = [
132
132
  description: "Icon of the Content-Based Router pattern: a component whose input switch connects to one of three outputs. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
133
133
  nodes: [
134
134
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
135
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
135
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
136
136
  n("polyline", { points: "6,20 17,20", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
137
137
  n("polygon", { points: "17.00,17.40 19.60,20.00 17.00,22.60 14.40,20.00", fill: C.ink }),
138
138
  n("polyline", { points: "17,20 39,11", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
@@ -150,7 +150,7 @@ export const EIP_ICONS = [
150
150
  description: "Icon of the Content Enricher pattern: a component turning a small message into a large one. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
151
151
  nodes: [
152
152
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
153
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
153
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
154
154
  n("rect", { x: "14", y: "15.5", width: "7", height: "7", fill: C.white, stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
155
155
  n("polyline", { points: "24,19 32.5,19.0", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
156
156
  n("polygon", { points: "36.00,19.00 31.00,21.75 31.00,16.25", fill: C.ink }),
@@ -163,7 +163,7 @@ export const EIP_ICONS = [
163
163
  description: "Icon of the Content Filter pattern: a component turning a large message into a small one. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
164
164
  nodes: [
165
165
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
166
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
166
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
167
167
  n("rect", { x: "13", y: "12", width: "14", height: "14", fill: C.white, stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
168
168
  n("polyline", { points: "30,19 38.5,19.0", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
169
169
  n("polygon", { points: "42.00,19.00 37.00,21.75 37.00,16.25", fill: C.ink }),
@@ -201,7 +201,7 @@ export const EIP_ICONS = [
201
201
  n("path", { d: "M9,4.5 H53 A2.9250000000000003,6.5 0 0 1 53,17.5 H9 A2.9250000000000003,6.5 0 0 1 9,4.5 Z", fill: I.iconLine, stroke: C.ink, "stroke-width": "1.75", "stroke-linejoin": "round" }),
202
202
  n("ellipse", { cx: "53", cy: "11", rx: "2.9250000000000003", ry: "6.5", fill: C.white, stroke: C.ink, "stroke-width": "1.75" }),
203
203
  n("polygon", { points: "40.73,32.67 36.67,36.73 30.93,36.73 26.87,32.67 26.87,26.93 30.93,22.87 36.67,22.87 40.73,26.93", fill: C.ink }),
204
- n("polygon", { points: "38.93,30.87 34.87,34.93 29.13,34.93 25.07,30.87 25.07,25.13 29.13,21.07 34.87,21.07 38.93,25.13", fill: C.backend, stroke: C.ink, "stroke-width": "1.75", "stroke-linejoin": "round" }),
204
+ n("polygon", { points: "38.93,30.87 34.87,34.93 29.13,34.93 25.07,30.87 25.07,25.13 29.13,21.07 34.87,21.07 38.93,25.13", fill: C.state.backend, stroke: C.ink, "stroke-width": "1.75", "stroke-linejoin": "round" }),
205
205
  ],
206
206
  },
207
207
  {
@@ -210,7 +210,7 @@ export const EIP_ICONS = [
210
210
  description: "Icon of the Event-Driven Consumer pattern: a channel arrow entering a component that passes the message on at once. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
211
211
  nodes: [
212
212
  n("rect", { x: "20.5", y: "6.5", width: "40", height: "30", rx: "3", fill: C.ink }),
213
- n("rect", { x: "18", y: "4", width: "40", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
213
+ n("rect", { x: "18", y: "4", width: "40", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
214
214
  n("g", { transform: "translate(1.8 1.8)" }, [
215
215
  n("path", { d: "M2,19 H27", fill: "none", stroke: C.ink, "stroke-width": "6.6", "stroke-linecap": "butt", "stroke-linejoin": "round" }),
216
216
  n("polygon", { points: "36.00,19.00 27.00,24.58 27.00,13.42", fill: C.ink, stroke: C.ink, "stroke-width": "3", "stroke-linejoin": "round" }),
@@ -256,7 +256,7 @@ export const EIP_ICONS = [
256
256
  description: "Icon of the Idempotent Receiver pattern: a channel arrow delivering a message into a component, with a badge showing the number 1. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
257
257
  nodes: [
258
258
  n("rect", { x: "18.5", y: "11.5", width: "42", height: "27", rx: "3", fill: C.ink }),
259
- n("rect", { x: "16", y: "9", width: "42", height: "27", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
259
+ n("rect", { x: "16", y: "9", width: "42", height: "27", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
260
260
  n("g", { transform: "translate(1.8 1.8)" }, [
261
261
  n("path", { d: "M3,23 H27", fill: "none", stroke: C.ink, "stroke-width": "6.6", "stroke-linecap": "butt", "stroke-linejoin": "round" }),
262
262
  n("polygon", { points: "36.00,23.00 27.00,28.58 27.00,17.42", fill: C.ink, stroke: C.ink, "stroke-width": "3", "stroke-linejoin": "round" }),
@@ -285,7 +285,7 @@ export const EIP_ICONS = [
285
285
  n("path", { d: "M9,4.5 H53 A2.9250000000000003,6.5 0 0 1 53,17.5 H9 A2.9250000000000003,6.5 0 0 1 9,4.5 Z", fill: I.iconLine, stroke: C.ink, "stroke-width": "1.75", "stroke-linejoin": "round" }),
286
286
  n("ellipse", { cx: "53", cy: "11", rx: "2.9250000000000003", ry: "6.5", fill: C.white, stroke: C.ink, "stroke-width": "1.75" }),
287
287
  n("polygon", { points: "33.80,22.30 43.30,37.80 24.30,37.80", fill: C.ink }),
288
- n("polygon", { points: "32.00,20.50 41.50,36.00 22.50,36.00", fill: C.transitional, stroke: C.ink, "stroke-width": "1.75", "stroke-linejoin": "round" }),
288
+ n("polygon", { points: "32.00,20.50 41.50,36.00 22.50,36.00", fill: C.state.transitional, stroke: C.ink, "stroke-width": "1.75", "stroke-linejoin": "round" }),
289
289
  n("polyline", { points: "32,25.5 32,30.5", fill: "none", stroke: C.ink, "stroke-width": "2.2", "stroke-linecap": "round", "stroke-linejoin": "round" }),
290
290
  n("circle", { cx: "32", cy: "33.2", r: "1.15", fill: C.ink }),
291
291
  ],
@@ -307,7 +307,7 @@ export const EIP_ICONS = [
307
307
  description: "Icon of the Message Filter pattern: a component with a funnel. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
308
308
  nodes: [
309
309
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
310
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
310
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
311
311
  n("polygon", { points: "22.60,10.10 44.60,10.10 36.60,19.60 36.60,31.60 30.60,31.60 30.60,19.60", fill: C.ink }),
312
312
  n("polygon", { points: "21.00,8.50 43.00,8.50 35.00,18.00 35.00,30.00 29.00,30.00 29.00,18.00", fill: I.iconLine, stroke: C.ink, "stroke-width": "1.6", "stroke-linejoin": "round" }),
313
313
  ],
@@ -318,7 +318,7 @@ export const EIP_ICONS = [
318
318
  description: "Icon of the Message Translator pattern: a component with two blocks crossed by an X. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
319
319
  nodes: [
320
320
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
321
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
321
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
322
322
  n("rect", { x: "11", y: "8", width: "17", height: "22", fill: C.white, stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
323
323
  n("rect", { x: "36", y: "8", width: "17", height: "22", fill: C.white, stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
324
324
  n("polyline", { points: "13.5,10.5 50.5,27.5", fill: "none", stroke: C.ink, "stroke-width": "2.6", "stroke-linecap": "round", "stroke-linejoin": "round" }),
@@ -350,7 +350,7 @@ export const EIP_ICONS = [
350
350
  description: "Icon of the Polling Consumer pattern: a channel arrow entering a component with a polling loop. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
351
351
  nodes: [
352
352
  n("rect", { x: "20.5", y: "6.5", width: "40", height: "30", rx: "3", fill: C.ink }),
353
- n("rect", { x: "18", y: "4", width: "40", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
353
+ n("rect", { x: "18", y: "4", width: "40", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
354
354
  n("g", { transform: "translate(1.8 1.8)" }, [
355
355
  n("path", { d: "M2,19 H22", fill: "none", stroke: C.ink, "stroke-width": "6.6", "stroke-linecap": "butt", "stroke-linejoin": "round" }),
356
356
  n("polygon", { points: "31.00,19.00 22.00,24.58 22.00,13.42", fill: C.ink, stroke: C.ink, "stroke-width": "3", "stroke-linejoin": "round" }),
@@ -374,7 +374,7 @@ export const EIP_ICONS = [
374
374
  description: "Icon of the Process Manager pattern: a component with a small decision tree: a start point, a decision diamond and three steps. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
375
375
  nodes: [
376
376
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
377
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
377
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
378
378
  n("polyline", { points: "32,11.5 32,13", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
379
379
  n("polyline", { points: "32,21.4 32,23.5", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
380
380
  n("polyline", { points: "17.5,23.5 46.5,23.5", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
@@ -454,7 +454,7 @@ export const EIP_ICONS = [
454
454
  description: "Icon of the Return Address pattern: an envelope with an address block and a stamp. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
455
455
  nodes: [
456
456
  n("rect", { x: "7", y: "6.5", width: "54", height: "31", rx: "1.5", fill: C.ink }),
457
- n("rect", { x: "4.5", y: "4", width: "54", height: "31", rx: "1.5", fill: C.transitional, stroke: C.ink, "stroke-width": "2" }),
457
+ n("rect", { x: "4.5", y: "4", width: "54", height: "31", rx: "1.5", fill: C.state.transitional, stroke: C.ink, "stroke-width": "2" }),
458
458
  n("polyline", { points: "10,10 29,10", fill: "none", stroke: C.ink, "stroke-width": "2.4", "stroke-linecap": "round", "stroke-linejoin": "round" }),
459
459
  n("polyline", { points: "10,14.5 29,14.5", fill: "none", stroke: C.ink, "stroke-width": "2.4", "stroke-linecap": "round", "stroke-linejoin": "round" }),
460
460
  n("polyline", { points: "10,19 29,19", fill: "none", stroke: C.ink, "stroke-width": "2.4", "stroke-linecap": "round", "stroke-linejoin": "round" }),
@@ -470,7 +470,7 @@ export const EIP_ICONS = [
470
470
  description: "Icon of the Scatter-Gather pattern: a component that fans one input out to three branches and joins them into one output. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
471
471
  nodes: [
472
472
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
473
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
473
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
474
474
  n("polyline", { points: "6,19 14,19", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
475
475
  n("polyline", { points: "50,19 58,19", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
476
476
  n("polyline", { points: "14,19 32,9.5 50,19", fill: "none", stroke: C.ink, "stroke-width": "1.6", "stroke-linecap": "round", "stroke-linejoin": "round" }),
@@ -489,7 +489,7 @@ export const EIP_ICONS = [
489
489
  description: "Icon of the Splitter pattern: a component turning one message into three. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
490
490
  nodes: [
491
491
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
492
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
492
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
493
493
  n("rect", { x: "16", y: "15.5", width: "8", height: "8", fill: C.white, stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
494
494
  n("polyline", { points: "26.5,19.5 35.5,19.5", fill: "none", stroke: C.ink, "stroke-width": "1.75", "stroke-linecap": "round", "stroke-linejoin": "round" }),
495
495
  n("polygon", { points: "39.00,19.50 34.00,22.25 34.00,16.75", fill: C.ink }),
@@ -504,8 +504,8 @@ export const EIP_ICONS = [
504
504
  description: "Icon of the Transactional Client pattern: a channel arrow entering a component where the message sits inside a transaction boundary. Redrawn from the Enterprise Integration Patterns icon by Gregor Hohpe and Bobby Woolf, enterpriseintegrationpatterns.com, CC BY 4.0.",
505
505
  nodes: [
506
506
  n("rect", { x: "8.5", y: "6.5", width: "52", height: "30", rx: "3", fill: C.ink }),
507
- n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.healthy, stroke: C.ink, "stroke-width": "2" }),
508
- n("ellipse", { cx: "37", cy: "19", rx: "17", ry: "11.5", fill: C.caller, stroke: C.ink, "stroke-width": "1.6" }),
507
+ n("rect", { x: "6", y: "4", width: "52", height: "30", rx: "3", fill: C.state.healthy, stroke: C.ink, "stroke-width": "2" }),
508
+ n("ellipse", { cx: "37", cy: "19", rx: "17", ry: "11.5", fill: C.state.caller, stroke: C.ink, "stroke-width": "1.6" }),
509
509
  n("rect", { x: "39", y: "13", width: "12", height: "12", fill: C.white, stroke: C.ink, "stroke-width": "1.5", "stroke-linejoin": "round" }),
510
510
  n("g", { transform: "translate(1.8 1.8)" }, [
511
511
  n("path", { d: "M2,19 H27", fill: "none", stroke: C.ink, "stroke-width": "6.6", "stroke-linecap": "butt", "stroke-linejoin": "round" }),
@@ -0,0 +1,13 @@
1
+ import { type SurfaceName } from "./ink.ts";
2
+ export declare const EMOTE_KINDS: readonly ["idea", "doubt", "problem", "worked", "refused", "pressure", "liked", "waiting"];
3
+ export type EmoteKind = (typeof EMOTE_KINDS)[number];
4
+ export type EmoteParams = {
5
+ kind: EmoteKind;
6
+ x: number;
7
+ y: number;
8
+ scale?: number;
9
+ burst?: boolean;
10
+ surface?: SurfaceName;
11
+ };
12
+ /** One reaction symbol with a fixed meaning, centred on (x, y), beside a head. */
13
+ export declare const emote: import("./piece.ts").Piece<EmoteParams>;
@@ -0,0 +1,88 @@
1
+ // `emote` (spec illustration-pieces, "Emote", "Emote colours", "Emotes carry
2
+ // their own stroke", "Ink on the dark surface"): eight reaction symbols with a
3
+ // fixed meaning (ADR 0005), drawn in the v2 grammar of ADR 0009. Moved from
4
+ // cast.ts in 0.7.0, when the seven-role cast was removed (ADR 0007 amendment).
5
+ //
6
+ // The v2 drawing is the one the owner approved in the card 301 preview: no hard
7
+ // shadow; the idea bulb glows in the cast's eye amber (`cast.eyes`) on a
8
+ // `brand.light.border` base, its burst is rays only (no disc); drops and Zs are
9
+ // white; the heart takes the one accent; `problem` and `refused` keep the
10
+ // failure colour and `worked` the healthy one, because they mean it.
11
+ //
12
+ // On the dark surface the outlines, the rays and the Z casings take
13
+ // `surface.dark.muted` (ink vanishes on black, the cast's rule); the marks drawn
14
+ // over a light or state fill (?, !, tick, X, the bulb filament) stay ink. The
15
+ // shapes are the same on both surfaces, only those strokes change.
16
+ //
17
+ // What can go wrong: the schema rejects an unknown kind, a scale outside
18
+ // (0, 10] or an unknown surface, naming the parameter.
19
+ import { drawn, el, g } from "./node.js";
20
+ import { surfaceParam } from "./ink.js";
21
+ import { colour, pos } from "./params.js";
22
+ import { definePiece } from "./piece.js";
23
+ export const EMOTE_KINDS = ["idea", "doubt", "problem", "worked", "refused", "pressure", "liked", "waiting"];
24
+ const c = (path) => colour(path);
25
+ const ink = () => c("color.ink");
26
+ const lineOf = (surface) => (surface === "dark" ? c("surface.dark.muted") : ink());
27
+ const rays = (line, cx, cy, r1, r2, n, from = -150, to = -30) => Array.from({ length: n }, (_, i) => {
28
+ const a = ((from + (i * (to - from)) / (n - 1)) * Math.PI) / 180;
29
+ const r = (v) => Math.round(v * 100) / 100;
30
+ return el("path", { d: `M${r(cx + r1 * Math.cos(a))},${r(cy + r1 * Math.sin(a))} L${r(cx + r2 * Math.cos(a))},${r(cy + r2 * Math.sin(a))}`, stroke: line, "stroke-width": 6, "stroke-linecap": "round" });
31
+ });
32
+ /** The outline of an emote's body shape. */
33
+ const outline = (line) => ({ stroke: line, "stroke-width": 5, "stroke-linejoin": "round", "stroke-linecap": "round" });
34
+ const disc = (line, cx, cy, r, fill) => el("circle", { cx, cy, r, fill, ...outline(line) });
35
+ const zed = (line, x, y, s) => {
36
+ // A Z of height s with its top-left at (x, y - s): a casing in the line colour, a white fill.
37
+ const w = s * 0.72, d = `M${x},${y - s} H${x + w} L${x},${y} H${x + w}`;
38
+ return [
39
+ el("path", { d, fill: "none", stroke: line, "stroke-width": s * 0.34, "stroke-linecap": "round", "stroke-linejoin": "round" }),
40
+ el("path", { d, fill: "none", stroke: c("color.white"), "stroke-width": s * 0.16, "stroke-linecap": "round", "stroke-linejoin": "round" }),
41
+ ];
42
+ };
43
+ const drawEmote = (p) => {
44
+ const { kind, x: cx, y: cy } = p, burst = p.burst ?? true, s = p.scale ?? 1;
45
+ const line = lineOf(p.surface);
46
+ const parts = [];
47
+ switch (kind) {
48
+ case "idea": {
49
+ if (burst)
50
+ parts.push(...rays(line, cx, cy - 6, 50, 72, 7, -180, 0));
51
+ const bulb = `M${cx - 30},${cy - 10} A34,34 0 1 1 ${cx + 30},${cy - 10} Q${cx + 22},${cy + 6} ${cx + 18},${cy + 22} H${cx - 18} Q${cx - 22},${cy + 6} ${cx - 30},${cy - 10} Z`;
52
+ parts.push(el("path", { d: bulb, fill: c("cast.eyes"), ...outline(line) }), el("path", { d: `M${cx - 16},${cy - 22} Q${cx - 12},${cy - 32} ${cx - 2},${cy - 34}`, fill: "none", stroke: c("color.white"), "stroke-width": 6, "stroke-linecap": "round" }), el("path", { d: `M${cx - 8},${cy + 22} V${cy} L${cx},${cy + 8} L${cx + 8},${cy} V${cy + 22}`, fill: "none", stroke: ink(), "stroke-width": 4, "stroke-linejoin": "round" }), el("rect", { x: cx - 18, y: cy + 22, width: 36, height: 12, rx: 3, fill: c("brand.light.border"), ...outline(line), "stroke-width": 4 }), el("rect", { x: cx - 14, y: cy + 34, width: 28, height: 10, rx: 5, fill: c("brand.light.border"), ...outline(line), "stroke-width": 4 }));
53
+ break;
54
+ }
55
+ case "doubt":
56
+ parts.push(disc(line, cx, cy, 40, c("color.white")), el("path", { d: `M${cx - 14},${cy - 12} Q${cx - 14},${cy - 28} ${cx},${cy - 28} Q${cx + 16},${cy - 28} ${cx + 16},${cy - 13} Q${cx + 16},${cy - 2} ${cx + 2},${cy + 4} V${cy + 10}`, fill: "none", stroke: ink(), "stroke-width": 9, "stroke-linecap": "round", "stroke-linejoin": "round" }), el("circle", { cx: cx + 2, cy: cy + 24, r: 6, fill: ink() }));
57
+ break;
58
+ case "problem":
59
+ if (burst)
60
+ parts.push(...rays(line, cx, cy, 48, 70, 5));
61
+ parts.push(el("path", { d: `M${cx},${cy - 44} L${cx + 46},${cy + 34} H${cx - 46} Z`, fill: c("color.state.failure"), ...outline(line) }), el("path", { d: `M${cx},${cy - 18} V${cy + 8}`, stroke: ink(), "stroke-width": 9, "stroke-linecap": "round" }), el("circle", { cx, cy: cy + 22, r: 5.5, fill: ink() }));
62
+ break;
63
+ case "pressure":
64
+ // Two white drops; no highlight (a white stroke on a white drop would not show).
65
+ for (const [dx, dy, k] of [[0, 0, 1], [30, 22, 0.6]])
66
+ parts.push(el("path", { d: `M${cx + dx},${cy + dy - 34 * k} Q${cx + dx + 24 * k},${cy + dy} ${cx + dx},${cy + dy + 12 * k} Q${cx + dx - 24 * k},${cy + dy} ${cx + dx},${cy + dy - 34 * k} Z`, fill: c("color.white"), ...outline(line), "stroke-width": 4 }));
67
+ break;
68
+ case "liked":
69
+ parts.push(el("path", { d: `M${cx},${cy + 30} C${cx - 50},${cy} ${cx - 34},${cy - 40} ${cx},${cy - 16} C${cx + 34},${cy - 40} ${cx + 50},${cy} ${cx},${cy + 30} Z`, fill: c("brand.light.accent"), ...outline(line) }));
70
+ break;
71
+ case "worked":
72
+ if (burst)
73
+ parts.push(...rays(line, cx, cy, 48, 68, 5));
74
+ parts.push(disc(line, cx, cy, 38, c("color.state.healthy")), el("path", { d: `M${cx - 16},${cy} L${cx - 4},${cy + 12} L${cx + 18},${cy - 12}`, fill: "none", stroke: ink(), "stroke-width": 8, "stroke-linecap": "round", "stroke-linejoin": "round" }));
75
+ break;
76
+ case "refused":
77
+ parts.push(disc(line, cx, cy, 38, c("color.state.failure")), el("path", { d: `M${cx - 13},${cy - 13} L${cx + 13},${cy + 13} M${cx + 13},${cy - 13} L${cx - 13},${cy + 13}`, stroke: ink(), "stroke-width": 8, "stroke-linecap": "round" }));
78
+ break;
79
+ case "waiting":
80
+ parts.push(...zed(line, cx - 12, cy + 12, 26), ...zed(line, cx + 20, cy - 20, 20), ...zed(line, cx + 44, cy - 46, 14));
81
+ break;
82
+ }
83
+ const attrs = s === 1 ? { "data-emote": kind, stroke: "none" } : { "data-emote": kind, stroke: "none", transform: `translate(${cx} ${cy}) scale(${s}) translate(${-cx} ${-cy})` };
84
+ return drawn([g(attrs, ...parts)]);
85
+ };
86
+ const unit = { kind: "number", min: 0, exclusiveMin: true, max: 10 };
87
+ /** One reaction symbol with a fixed meaning, centred on (x, y), beside a head. */
88
+ export const emote = definePiece("emote", { kind: { kind: "enum", required: true, values: EMOTE_KINDS }, x: pos(), y: pos(), scale: unit, burst: { kind: "boolean" }, surface: surfaceParam }, drawEmote);
@@ -7,7 +7,7 @@ export * from "./library.ts";
7
7
  export { EIP_ICONS, EIP_ICON_NAMES, EIP_ICON_HEIGHT, EIP_ICON_WIDTH, type EipIcon } from "./eip-icons.ts";
8
8
  export { FORMATS, LANGUAGE, SAFE_ID, backgroundNames, bannerRingCount, comparePaths, coverTree, diagramRings, validateCoverSpec, type CoverFormat, type CoverOptions, type CoverPiece, type CoverRings, type CoverSpec, type CustomNode } from "./cover.ts";
9
9
  export { tokens, type Tokens } from "../../tokens/generated/tokens.ts";
10
- export { EMOTE_KINDS, MASCOTS, MASCOT_ACTIONS, MASCOT_FACES, type EmoteKind, type EmoteParams, type MascotAction, type MascotFace, type MascotName, type MascotParams } from "./cast.ts";
10
+ export { EMOTE_KINDS, type EmoteKind, type EmoteParams } from "./emote.ts";
11
11
  export { CAST_EXPRESSIONS, CAST_VIEWS, type CastExpression, type CastView, type MiraParams, type VisorParams, type DroneParams, type KiuParams, type SinalParams } from "./brand-cast.ts";
12
12
  export { BANK_OBJECT_NAMES, type BankObjectName, type BankObjectParams } from "./bank-objects.ts";
13
13
  export { type SymbolParams } from "./symbol.ts";
@@ -12,7 +12,7 @@ export * from "./library.js";
12
12
  export { EIP_ICONS, EIP_ICON_NAMES, EIP_ICON_HEIGHT, EIP_ICON_WIDTH } from "./eip-icons.js";
13
13
  export { FORMATS, LANGUAGE, SAFE_ID, backgroundNames, bannerRingCount, comparePaths, coverTree, diagramRings, validateCoverSpec } from "./cover.js";
14
14
  export { tokens } from "../../tokens/generated/tokens.js";
15
- export { EMOTE_KINDS, MASCOTS, MASCOT_ACTIONS, MASCOT_FACES } from "./cast.js";
15
+ export { EMOTE_KINDS } from "./emote.js";
16
16
  export { CAST_EXPRESSIONS, CAST_VIEWS } from "./brand-cast.js";
17
17
  export { BANK_OBJECT_NAMES } from "./bank-objects.js";
18
18
  export { BRAND_NOTATION_ICON_NAMES } from "./brand-notation-icons.js";
@@ -12,37 +12,42 @@ export declare const inkScaleParam: ParamSpec;
12
12
  export declare const inkSchema: Schema;
13
13
  /** Collects the limits between parameters (piece.ts, `relations`). */
14
14
  export declare const limits: (...checks: (Problem | false)[]) => Problem[];
15
- /** The surface's colours and the ink measures at a scale. */
15
+ /**
16
+ * The surface's colours and the ink measures at a scale. `line` is the colour of
17
+ * an ink stroke on the surface's background or on a dark face: ink on light, the
18
+ * surface's muted grey on dark, where ink vanishes (ADR 0009, the cast's rule).
19
+ */
16
20
  export declare const inkOf: ({ surface, inkScale }: Ink) => {
17
21
  s: {
18
22
  readonly backdropCredit: "#9AA6D6";
19
23
  readonly backdropPark: "#183F52";
20
24
  readonly backdropWater: "#1E3175";
21
25
  readonly backdropWaterEdge: "#2A3F8A";
22
- readonly background: "#14215A";
23
- readonly grid: "#1C2D74";
24
- readonly muted: "#8F9BD0";
25
- readonly panel: "#1C2D74";
26
- readonly rim: "#EEF2FF";
27
- readonly rimWidth: 1;
28
- readonly shadow: "#4C5CB8";
29
- readonly text: "#EEF2FF";
26
+ readonly background: "#121110";
27
+ readonly grid: "#3B3834";
28
+ readonly muted: "#ADA79D";
29
+ readonly panel: "#1D1C1A";
30
+ readonly rim: "#F1EEE8";
31
+ readonly rimWidth: 0;
32
+ readonly shadow: "#121110";
33
+ readonly text: "#F1EEE8";
30
34
  readonly zoneOpacity: 0.22;
31
35
  } | {
32
36
  readonly backdropCredit: "#5A6385";
33
37
  readonly backdropPark: "#D4F2DF";
34
38
  readonly backdropWater: "#C9D8FF";
35
39
  readonly backdropWaterEdge: "#B5C7F5";
36
- readonly background: "#EEF2FF";
37
- readonly grid: "#E0E7FB";
38
- readonly muted: "#5B6694";
40
+ readonly background: "#F6F3EC";
41
+ readonly grid: "#EDE8DE";
42
+ readonly muted: "#5C5852";
39
43
  readonly panel: "#FFFFFF";
40
- readonly rim: "#EEF2FF";
44
+ readonly rim: "#F6F3EC";
41
45
  readonly rimWidth: 0;
42
- readonly shadow: "#0A1033";
43
- readonly text: "#0A1033";
46
+ readonly shadow: "#121212";
47
+ readonly text: "#121212";
44
48
  readonly zoneOpacity: 0.12;
45
49
  };
50
+ line: "#121212" | "#5C5852" | "#ADA79D";
46
51
  outline: number;
47
52
  rim: number;
48
53
  offset: number;
@@ -51,7 +56,12 @@ export declare const inkOf: ({ surface, inkScale }: Ink) => {
51
56
  export declare const roomFor: (name: string, smallest: number, inkParams: Ink) => Problem | false;
52
57
  export declare const atLeast: (name: string, value: number, least: number, what: string) => Problem | false;
53
58
  export type Shape = (dx: number, dy: number, attrs: Attrs) => SvgNode;
54
- /** The ink sticker (metro-and-diagram-pieces design §3): shadow copy, rim on dark, then the face. */
59
+ /**
60
+ * The ink sticker (metro-and-diagram-pieces design §3): a shadow copy when the
61
+ * offset is above 0 (`map.shadow` is 0 since ADR 0009, so none), a rim when the
62
+ * surface has one (none while `rimWidth` is 0), then the face outlined in the
63
+ * surface's ink line.
64
+ */
55
65
  export declare const sticker: (shape: Shape, face: string, inkParams: Ink) => SvgNode[];
56
66
  /** Backticks mark code (body-diagram-pieces design §4; the pill since card 190): with an even number of them, each part between backticks becomes a tspan in
57
67
  * the monospace stack; empty parts are dropped. With an odd number, the string is drawn as is. */