@@ -52,7 +52,7 @@ function ClientEdges({
52
52
)
53
53
}
54
54
55
- function ServerEdges ( { highlighted } : { highlighted ? : number } ) {
55
+ function ServerEdges ( { highlighted } : { highlighted : number [ ] } ) {
56
56
const paths = [
57
57
"M696 159.5H811.5V75H1176" ,
58
58
"M696 175.5L833.5 175.5V112H1104.5" ,
@@ -67,18 +67,21 @@ function ServerEdges({ highlighted }: { highlighted?: number }) {
67
67
68
68
return (
69
69
< >
70
- { paths . map ( ( d , index ) => (
71
- < path
72
- key = { index }
73
- d = { d }
74
- stroke = {
75
- highlighted === index
76
- ? `url(#paint_sr_dark_linear_671_9150)`
77
- : `url(#paint_sr_light_linear_671_9150)`
78
- }
79
- strokeWidth = { highlighted === index ? "2" : "1" }
80
- />
81
- ) ) }
70
+ { paths . map ( ( d , index ) => {
71
+ const isHighlighted = highlighted ?. includes ( index )
72
+ return (
73
+ < path
74
+ key = { index }
75
+ d = { d }
76
+ strokeWidth = { isHighlighted ? 2 : 1 }
77
+ stroke = {
78
+ isHighlighted
79
+ ? `url(#${ index % 2 ? "paint_sr_pri_highlight_linear_671_9150" : "paint_sr_sec_highlight_linear_671_9150" } )`
80
+ : "url(#paint_sr_light_linear_671_9150)"
81
+ }
82
+ />
83
+ )
84
+ } ) }
82
85
</ >
83
86
)
84
87
}
@@ -150,37 +153,41 @@ function ClientBoxes({ highlighted }: { highlighted?: number }) {
150
153
)
151
154
}
152
155
153
- function ServerBoxes ( { highlighted } : { highlighted ? : number } ) {
156
+ function ServerBoxes ( { highlighted } : { highlighted : number [ ] } ) {
154
157
/* eslint-disable react/jsx-key */
155
158
const boxes = [
156
159
[ "translate(1176, 48)" , < LabirynthIcon /> ] ,
157
160
[ "translate(1104, 84)" , < ServerIcon /> ] ,
158
161
[ "translate(1176, 120)" , < ModemIcon /> ] ,
159
162
[ "translate(1104, 156)" , < CloudIcon /> ] ,
160
- [ "translate(1176, 192)" , < ServerIcon /> ] ,
161
- [ "translate(1104, 228)" , < LabirynthIcon /> ] ,
162
- [ "translate(1176, 264)" , < ServerIcon /> ] ,
163
- [ "translate(1104, 300)" , < ServerIcon /> ] ,
164
- [ "translate(1176, 336)" , < CloudIcon /> ] ,
163
+ [ "translate(1176, 192)" , < LabirynthIcon /> ] ,
164
+ [ "translate(1104, 228)" , < ModemIcon /> ] ,
165
+ [ "translate(1176, 264)" , < CloudIcon /> ] ,
166
+ [ "translate(1104, 300)" , < CloudIcon /> ] ,
167
+ [ "translate(1176, 336)" , < ServerIcon /> ] ,
165
168
] as const
166
169
/* eslint-enable react/jsx-key */
167
170
168
171
return (
169
172
< >
170
173
{ boxes . map ( ( [ transform , children ] , index ) => {
171
- const isHighlighted = index === highlighted
174
+ const isHighlighted = highlighted . includes ( index )
172
175
return (
173
176
< Box
174
177
key = { index }
175
178
transform = { transform }
176
179
fill = {
177
180
isHighlighted
178
- ? "hsl(var(--color-neu-300))"
181
+ ? index % 2
182
+ ? "hsl(var(--color-pri-lighter))"
183
+ : "hsl(var(--color-sec-light))"
179
184
: "hsl(var(--color-neu-100))"
180
185
}
181
186
className = {
182
187
isHighlighted
183
- ? "[&_path]:fill-neu-800 dark:[&_path]:fill-neu-0"
188
+ ? index % 2
189
+ ? "[&_path]:fill-pri-darker dark:[&_path]:fill-pri-lighter"
190
+ : "[&_path]:fill-sec-darker dark:[&_path]:fill-sec-lighter"
184
191
: undefined
185
192
}
186
193
>
@@ -230,17 +237,30 @@ function SVGDefinitions() {
230
237
< stop stopColor = "hsl(var(--color-neu-100))" />
231
238
< stop offset = "1" stopColor = "hsl(var(--color-neu-600))" />
232
239
</ linearGradient >
240
+
233
241
< linearGradient
234
- id = "paint_sr_dark_linear_671_9150 "
242
+ id = "paint_sr_sec_highlight_linear_671_9150 "
235
243
x1 = "696"
236
244
y1 = "0"
237
245
x2 = "937.904"
238
246
y2 = "0"
239
247
gradientUnits = "userSpaceOnUse"
240
248
>
241
- < stop stopColor = "hsl(var(--color-neu-700 ))" />
242
- < stop offset = "1" stopColor = "hsl(var(--color-neu-300 ))" />
249
+ < stop stopColor = "hsl(var(--color-sec-dark ))" />
250
+ < stop offset = "1" stopColor = "hsl(var(--color-sec-light ))" />
243
251
</ linearGradient >
252
+ < linearGradient
253
+ id = "paint_sr_pri_highlight_linear_671_9150"
254
+ x1 = "696"
255
+ y1 = "0"
256
+ x2 = "937.904"
257
+ y2 = "0"
258
+ gradientUnits = "userSpaceOnUse"
259
+ >
260
+ < stop stopColor = "hsl(var(--color-pri-dark))" />
261
+ < stop offset = "1" stopColor = "hsl(var(--color-pri-lighter))" />
262
+ </ linearGradient >
263
+
244
264
< clipPath id = "clip0_671_9150" >
245
265
< rect x = "514" y = "113.5" width = "220" height = "220" rx = "8" fill = "white" />
246
266
</ clipPath >
@@ -281,8 +301,8 @@ export function Wires({ className }: { className?: string }) {
281
301
>
282
302
< ClientEdges highlighted = { step === 0 ? 0 : undefined } />
283
303
< ClientBoxes highlighted = { step === 0 ? 0 : undefined } />
284
- < ServerEdges highlighted = { step === 1 ? 0 : undefined } />
285
- < ServerBoxes highlighted = { step === 1 ? 0 : undefined } />
304
+ < ServerEdges highlighted = { step === 1 ? [ 1 , 6 ] : [ ] } />
305
+ < ServerBoxes highlighted = { step === 1 ? [ 1 , 6 ] : [ ] } />
286
306
< SVGDefinitions />
287
307
</ svg >
288
308
< QueryMdx components = { components } />
0 commit comments