@brunosouzas/design-system 0.6.1 → 0.8.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 (42) hide show
  1. package/NOTICE +13 -0
  2. package/README.md +90 -41
  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/category-icon.d.ts +4 -4
  10. package/dist/src/pieces/category-icon.js +33 -22
  11. package/dist/src/pieces/cover.js +9 -3
  12. package/dist/src/pieces/diagram.js +3 -3
  13. package/dist/src/pieces/eip-icons.js +27 -27
  14. package/dist/src/pieces/emote.d.ts +13 -0
  15. package/dist/src/pieces/emote.js +88 -0
  16. package/dist/src/pieces/index.d.ts +1 -1
  17. package/dist/src/pieces/index.js +1 -1
  18. package/dist/src/pieces/ink.d.ts +26 -16
  19. package/dist/src/pieces/ink.js +15 -6
  20. package/dist/src/pieces/library.d.ts +9 -15
  21. package/dist/src/pieces/library.js +52 -53
  22. package/dist/src/pieces/link-icons.d.ts +2 -1
  23. package/dist/src/pieces/link-icons.js +10 -18
  24. package/dist/src/pieces/metro.d.ts +4 -2
  25. package/dist/src/pieces/metro.js +14 -13
  26. package/dist/src/pieces/node.d.ts +5 -3
  27. package/dist/src/pieces/node.js +6 -4
  28. package/dist/src/pieces/params.js +2 -2
  29. package/dist/tokens/generated/tokens.d.ts +86 -171
  30. package/dist/tokens/generated/tokens.js +87 -172
  31. package/fonts/OFL.txt +97 -0
  32. package/fonts/SourceCodePro-Bold.ttf +0 -0
  33. package/fonts/SourceCodePro-Regular.ttf +0 -0
  34. package/fonts/SourceSans3-Black.ttf +0 -0
  35. package/fonts/SourceSans3-Bold.ttf +0 -0
  36. package/fonts/SourceSans3-Regular.ttf +0 -0
  37. package/package.json +10 -1
  38. package/tokens/generated/tokens.css +78 -125
  39. package/tokens/generated/tokens.json +87 -172
  40. package/tokens/generated/tokens.ts +87 -172
  41. package/dist/src/pieces/cast.d.ts +0 -35
  42. package/dist/src/pieces/cast.js +0 -333
@@ -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. */
@@ -12,10 +12,14 @@ export const inkScaleParam = { kind: "number", min: 0.25, max: 8 };
12
12
  export const inkSchema = { surface: surfaceParam, inkScale: inkScaleParam };
13
13
  /** Collects the limits between parameters (piece.ts, `relations`). */
14
14
  export const limits = (...checks) => checks.filter((check) => check !== false);
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 const inkOf = ({ surface = "light", inkScale = 1 }) => {
17
21
  const s = tokens.surface[surface];
18
- return { s, outline: M.outline * inkScale, rim: s.rimWidth * inkScale, offset: M.shadow * inkScale };
22
+ return { s, line: surface === "dark" ? s.muted : ink, outline: M.outline * inkScale, rim: s.rimWidth * inkScale, offset: M.shadow * inkScale };
19
23
  };
20
24
  /** Outlined shapes need room for their ink: smallest dimension ≥ 4 × outline. */
21
25
  export const roomFor = (name, smallest, inkParams) => {
@@ -23,15 +27,20 @@ export const roomFor = (name, smallest, inkParams) => {
23
27
  return smallest < need && { path: name, message: `leaves no room for the outline: needs at least ${r2(need)} at this ink scale` };
24
28
  };
25
29
  export const atLeast = (name, value, least, what) => value < least && { path: name, message: `must be at least ${what} (${r2(least)}), found ${r2(value)}` };
26
- /** The ink sticker (metro-and-diagram-pieces design §3): shadow copy, rim on dark, then the face. */
30
+ /**
31
+ * The ink sticker (metro-and-diagram-pieces design §3): a shadow copy when the
32
+ * offset is above 0 (`map.shadow` is 0 since ADR 0009, so none), a rim when the
33
+ * surface has one (none while `rimWidth` is 0), then the face outlined in the
34
+ * surface's ink line.
35
+ */
27
36
  export const sticker = (shape, face, inkParams) => {
28
- const { s, outline, rim, offset } = inkOf(inkParams);
37
+ const { s, line, outline, rim, offset } = inkOf(inkParams);
29
38
  const wide = r2(outline + 2 * rim);
30
39
  return [
31
40
  // Joins are set here, so a sticker draws the same inside any group.
32
- shape(offset, offset, { fill: s.shadow, stroke: s.shadow, "stroke-width": wide, "stroke-linejoin": "round" }),
41
+ ...(offset > 0 ? [shape(offset, offset, { fill: s.shadow, stroke: s.shadow, "stroke-width": wide, "stroke-linejoin": "round" })] : []),
33
42
  ...(s.rimWidth > 0 ? [shape(0, 0, { fill: s.rim, stroke: s.rim, "stroke-width": wide, "stroke-linejoin": "round" })] : []),
34
- shape(0, 0, { fill: face, stroke: ink, "stroke-width": r2(outline), "stroke-linejoin": "round" }),
43
+ shape(0, 0, { fill: face, stroke: line, "stroke-width": r2(outline), "stroke-linejoin": "round" }),
35
44
  ];
36
45
  };
37
46
  /** 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
@@ -1,10 +1,10 @@
1
- import { emote, mascot } from "./cast.ts";
1
+ import { emote } from "./emote.ts";
2
2
  import { mira, visor, drone, kiu, sinal, type MiraParams, type VisorParams, type DroneParams, type KiuParams, type SinalParams } from "./brand-cast.ts";
3
3
  import { bankObject, type BankObjectName, type BankObjectParams } from "./bank-objects.ts";
4
4
  import { symbol, type SymbolParams } from "./symbol.ts";
5
5
  import { brandNotationIcon, type BrandNotationIconName, type BrandNotationIconParams } from "./brand-notation-icons.ts";
6
6
  import { categoryIcon, type CategoryIconParams } from "./category-icon.ts";
7
- export { emote, mascot, mira, visor, drone, kiu, sinal, bankObject, symbol, brandNotationIcon, categoryIcon };
7
+ export { emote, mira, visor, drone, kiu, sinal, bankObject, symbol, brandNotationIcon, categoryIcon };
8
8
  export type { MiraParams, VisorParams, DroneParams, KiuParams, SinalParams, BankObjectName, BankObjectParams, SymbolParams, BrandNotationIconName, BrandNotationIconParams, CategoryIconParams };
9
9
  export * from "./metro.ts";
10
10
  export * from "./diagram.ts";
@@ -51,16 +51,11 @@ export type SheetParams = {
51
51
  };
52
52
  /** A sheet of paper with rows of text bars, an optional lead mark and an optional tick at the end. */
53
53
  export declare const sheet: import("./piece.ts").Piece<SheetParams>;
54
- declare const CODE_COLOURS: {
55
- readonly healthy: "#3DDC84";
56
- readonly caller: "#8FB2FF";
57
- readonly white: "#FFFFFF";
58
- readonly backend: "#FF6B6B";
59
- };
54
+ declare const CODE_LINE_COLOURS: readonly ["healthy", "caller", "white", "backend"];
60
55
  export type CodeLine = {
61
56
  indent: number;
62
57
  w: number;
63
- color: keyof typeof CODE_COLOURS;
58
+ color: (typeof CODE_LINE_COLOURS)[number];
64
59
  tall?: boolean;
65
60
  };
66
61
  export type CodePanelParams = {
@@ -72,7 +67,7 @@ export type CodePanelParams = {
72
67
  top?: number;
73
68
  step?: number;
74
69
  };
75
- /** Dark code panel with coloured lines; a tall line marks the one under review. */
70
+ /** Dark code panel with neutral lines; a tall line, the one under review, takes the accent (ADR 0009). */
76
71
  export declare const codePanel: import("./piece.ts").Piece<CodePanelParams>;
77
72
  export type SpeechBubbleParams = {
78
73
  x: number;
@@ -81,7 +76,7 @@ export type SpeechBubbleParams = {
81
76
  height: number;
82
77
  fill?: string;
83
78
  };
84
- /** Chat slip with a tail at the bottom left and one white text line. */
79
+ /** Chat slip with a tail at the bottom left and one text line. */
85
80
  export declare const speechBubble: import("./piece.ts").Piece<SpeechBubbleParams>;
86
81
  export type BrowserWindowParams = {
87
82
  x: number;
@@ -194,7 +189,7 @@ export type RobotParams = {
194
189
  cx: number;
195
190
  top: number;
196
191
  };
197
- /** Robot: antenna, ears, green body with a visor and two eyes, mouth bars. Scale it with pose. */
192
+ /** Robot in the v2 grammar: white body and ears, a dark visor with the cast's idle eyes, one grille bar, the accent on the antenna tip. Scale it with pose. */
198
193
  export declare const robot: import("./piece.ts").Piece<RobotParams>;
199
194
  export type MagnifierParams = {
200
195
  cx: number;
@@ -228,7 +223,7 @@ export type GearParams = {
228
223
  teeth?: number;
229
224
  fill?: string;
230
225
  };
231
- /** Gear with square teeth and a white hub, as on the maven-release cover. */
226
+ /** Gear with square teeth and a hub, as on the maven-release cover. */
232
227
  export declare const gear: import("./piece.ts").Piece<GearParams>;
233
228
  export type ParcelParams = {
234
229
  x: number;
@@ -336,8 +331,7 @@ export declare const PIECES: {
336
331
  readonly uiIcon: import("./piece.ts").Piece<import("./ui-icons.ts").UiIconParams>;
337
332
  readonly linkIcon: import("./piece.ts").Piece<import("./link-icons.ts").LinkIconParams>;
338
333
  readonly stateStart: import("./piece.ts").Piece<import("./diagram.ts").StateStartParams>;
339
- readonly mascot: import("./piece.ts").Piece<import("./cast.ts").MascotParams>;
340
- readonly emote: import("./piece.ts").Piece<import("./cast.ts").EmoteParams>;
334
+ readonly emote: import("./piece.ts").Piece<import("./emote.ts").EmoteParams>;
341
335
  readonly mira: import("./piece.ts").Piece<MiraParams>;
342
336
  readonly visor: import("./piece.ts").Piece<VisorParams>;
343
337
  readonly drone: import("./piece.ts").Piece<DroneParams>;