@datalayer/design 1.0.10 → 1.0.12

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.
@@ -0,0 +1,415 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2026 Datalayer, Inc.
4
+ *
5
+ * CC BY 4.0 License
6
+ */
7
+ /**
8
+ * Wide SVG hero for long-horizon agent teams.
9
+ *
10
+ * The motif is a **procession**: ridges stacked one behind the other until
11
+ * they thin into the horizon, and a road that winds over them from the bottom
12
+ * of the frame, where it is now, to the vanishing point, where it is days from
13
+ * now. Teams of three agents walk it, one after the other, for as long as the
14
+ * page is open: the road never reaches anywhere, because the point of the
15
+ * picture is that the work is still going after the reader has looked away.
16
+ *
17
+ * **Everything the sentence promises is something on that road.**
18
+ *
19
+ * - The steps are the marks on it: pending until a team has passed, then lit.
20
+ * - The checkpoint is the pennant half way along: a team goes out beside it, as a
21
+ * run does when it is interrupted, the pennant stays lit, and the team comes
22
+ * back on at that spot rather than at the start.
23
+ * - The approval is the gate: the team waits at the bar until the person beside
24
+ * it lifts their key, and only then does the bar rise.
25
+ * - The privacy is the fence: two lines of posts running to the same vanishing
26
+ * point, the ground between them lit. The road, the data and the teams all
27
+ * stay on it, all the way to the horizon. The fence is in the person's colour
28
+ * and in nobody else's, as the key is: warm is what belongs to them, cool is
29
+ * what the agents do.
30
+ * - The openness is what crosses the fence: three arcs, named after the open
31
+ * protocols they speak, leave by a port and go out of the frame, and messages
32
+ * come and go along them.
33
+ *
34
+ * **One journey, three teams.** A team's whole walk is one set of keyframes,
35
+ * computed below from the same geometry the road is drawn with, so a team is on
36
+ * the road because that is where the numbers put it, and it slows towards the
37
+ * horizon because the ridges get thinner there. Each team runs that walk a
38
+ * third of the way behind the next, and a team that reaches the vanishing point
39
+ * has shrunk to nothing, which is why the loop has no seam. The gate, the
40
+ * pennant and the steps are timed from the walk, not by hand.
41
+ *
42
+ * Teams go behind a ridge by fading over the few pixels at its crest, not by
43
+ * being layered between the ridges: it reads the same at this size, and it lets
44
+ * a team be one drawing rather than one for each ridge.
45
+ *
46
+ * Everything moves with CSS transforms and opacity rather than SMIL, because a
47
+ * CSS rule can stop those: under reduced motion the drawing rests on the moment
48
+ * the transform attributes describe, with a team waiting at the gate.
49
+ *
50
+ * A 1400 × 380 viewBox, sliced, as the other heroes. The road, the gate and the
51
+ * vanishing point sit in the centre, the only part a phone is sure to show.
52
+ */
53
+ import { useId } from 'react';
54
+ import { useColorPalette } from '@datalayer/primer-addons';
55
+ const WIDTH = 1400;
56
+ const HEIGHT = 380;
57
+ /** Seconds for a team to walk from now to the horizon. */
58
+ const JOURNEY = 90;
59
+ /** Teams on the road at once. */
60
+ const TEAMS = 3;
61
+ /** Seconds between two teams: the gate and the pennant keep this time. */
62
+ const BEAT = JOURNEY / TEAMS;
63
+ /** Far to near. Each is about half as far again from the horizon as the last. */
64
+ const RIDGES = [
65
+ { base: 151, swell: 1.2, wave: 54, phase: 0.4, wash: 0.42 },
66
+ { base: 174, swell: 4, wave: 86, phase: 2.1, wash: 0.34 },
67
+ { base: 204, swell: 7, wave: 118, phase: 4.3, wash: 0.26 },
68
+ { base: 250, swell: 11, wave: 160, phase: 1.2, wash: 0.2 },
69
+ { base: 316, swell: 13, wave: 214, phase: 3.4, wash: 0.14 },
70
+ ];
71
+ /** Where the ridge's top edge is at this x. */
72
+ function crest(ridge, x) {
73
+ const { base, swell, wave, phase } = RIDGES[ridge];
74
+ return base + swell * (Math.sin(x / wave + phase) + 0.5 * Math.sin(x / (wave * 0.43) + phase * 2.3));
75
+ }
76
+ const round = (value) => Number(value.toFixed(2));
77
+ /** A ridge's top edge: what is stroked along the crest. */
78
+ function ridgeLine(ridge) {
79
+ const points = Array.from({ length: WIDTH / 14 + 1 }, (_, i) => `${i * 14} ${round(crest(ridge, i * 14))}`);
80
+ return `M${points.join(' L')}`;
81
+ }
82
+ /** The ridge as a filled shape, down to the bottom of the frame. */
83
+ const ridgeShape = (ridge) => `${ridgeLine(ridge)} L${WIDTH} ${HEIGHT} L0 ${HEIGHT} Z`;
84
+ /**
85
+ * Near to far. A leg starts under the nearer ridge and ends past the crest of
86
+ * its own, and the clip takes off both ends, which is what makes the road go
87
+ * over the top rather than stop at it.
88
+ */
89
+ const LEGS = [
90
+ {
91
+ ridge: 4,
92
+ curve: [{ x: 544, y: 482 }, { x: 610, y: 410 }, { x: 716, y: 372 }, { x: 702, y: 298 }],
93
+ scale: [2, 1.2],
94
+ },
95
+ {
96
+ ridge: 3,
97
+ curve: [{ x: 706, y: 342 }, { x: 702, y: 296 }, { x: 614, y: 278 }, { x: 590, y: 232 }],
98
+ scale: [1.2, 0.72],
99
+ },
100
+ {
101
+ ridge: 2,
102
+ curve: [{ x: 582, y: 262 }, { x: 588, y: 214 }, { x: 806, y: 252 }, { x: 822, y: 192 }],
103
+ scale: [0.72, 0.42],
104
+ },
105
+ {
106
+ ridge: 1,
107
+ curve: [{ x: 836, y: 216 }, { x: 826, y: 180 }, { x: 674, y: 200 }, { x: 658, y: 168 }],
108
+ scale: [0.42, 0.22],
109
+ },
110
+ {
111
+ ridge: 0,
112
+ curve: [{ x: 652, y: 186 }, { x: 658, y: 168 }, { x: 708, y: 170 }, { x: 700, y: 151 }],
113
+ scale: [0.22, 0.06],
114
+ },
115
+ ];
116
+ /** The end of the road, on the crest of the farthest ridge. */
117
+ const VANISH = { x: WIDTH / 2, y: crest(0, WIDTH / 2) };
118
+ function bezier([a, b, c, d], t) {
119
+ const u = 1 - t;
120
+ const at = (key) => u * u * u * a[key] + 3 * u * u * t * b[key] + 3 * u * t * t * c[key] + t * t * t * d[key];
121
+ return { x: at('x'), y: at('y') };
122
+ }
123
+ /**
124
+ * The road at `along`, from 0 (now) to 1 (the horizon): where it is, how big
125
+ * things are there, and how far it is in the clear (0 behind a ridge, 1 well
126
+ * inside the face of one), which is what a team's opacity follows.
127
+ */
128
+ function roadAt(along) {
129
+ const position = Math.min(along, 0.99999) * LEGS.length;
130
+ const index = Math.floor(position);
131
+ const leg = LEGS[index];
132
+ const t = position - index;
133
+ const point = bezier(leg.curve, t);
134
+ const scale = leg.scale[0] + (leg.scale[1] - leg.scale[0]) * t;
135
+ const belowOwn = point.y - crest(leg.ridge, point.x);
136
+ const aboveNearer = leg.ridge < RIDGES.length - 1 ? crest(leg.ridge + 1, point.x) - point.y : Infinity;
137
+ const clear = Math.max(0, Math.min(1, Math.min(belowOwn, aboveNearer) / (6 * scale + 1)));
138
+ return { ...point, scale, clear };
139
+ }
140
+ /** How wide the road is, at scale 1. */
141
+ const ROAD_WIDTH = 34;
142
+ /**
143
+ * A leg as a ribbon: wide across, foreshortened along, so that a stretch of road
144
+ * running sideways lies on the ground rather than standing up off it.
145
+ */
146
+ function legRibbon(leg) {
147
+ const samples = Array.from({ length: 29 }, (_, i) => {
148
+ const t = i / 28;
149
+ const point = bezier(leg.curve, t);
150
+ const ahead = bezier(leg.curve, Math.min(1, t + 0.01));
151
+ const behind = bezier(leg.curve, Math.max(0, t - 0.01));
152
+ const dx = ahead.x - behind.x;
153
+ const dy = ahead.y - behind.y;
154
+ const length = Math.hypot(dx, dy) || 1;
155
+ const half = ((leg.scale[0] + (leg.scale[1] - leg.scale[0]) * t) * ROAD_WIDTH) / 2;
156
+ return {
157
+ left: `${round(point.x - (dy / length) * half)} ${round(point.y + (dx / length) * half * 0.38)}`,
158
+ right: `${round(point.x + (dy / length) * half)} ${round(point.y - (dx / length) * half * 0.38)}`,
159
+ };
160
+ });
161
+ return `M${samples.map(s => s.left).join(' L')} L${samples.reverse().map(s => s.right).join(' L')} Z`;
162
+ }
163
+ function legMiddle(leg) {
164
+ const samples = Array.from({ length: 29 }, (_, i) => {
165
+ const point = bezier(leg.curve, i / 28);
166
+ return `${round(point.x)} ${round(point.y)}`;
167
+ });
168
+ return `M${samples.join(' L')}`;
169
+ }
170
+ /** Where a team stops, as a fraction of the road. */
171
+ const GATE_AT = 0.268;
172
+ const CHECKPOINT_AT = 0.497;
173
+ /**
174
+ * A team's walk as [fraction of the journey, fraction of the road]: on to the
175
+ * gate, wait, on to the pennant, wait, and the long rest of the way. The two
176
+ * waits fall at different points of the beat, so one is always coming up.
177
+ */
178
+ const WALK = [
179
+ [0, 0],
180
+ [0.11, GATE_AT],
181
+ [0.2, GATE_AT],
182
+ [0.3, CHECKPOINT_AT],
183
+ [0.37, CHECKPOINT_AT],
184
+ [1, 1],
185
+ ];
186
+ /** When, in the journey, the team goes out at the pennant and comes back on. */
187
+ const OUTAGE = { out: 0.316, down: 0.322, up: 0.346, on: 0.36 };
188
+ function walkAt(time) {
189
+ const span = WALK.findIndex(([end], index) => index > 0 && time <= end);
190
+ const [startTime, startRoad] = WALK[span - 1];
191
+ const [endTime, endRoad] = WALK[span];
192
+ const t = (time - startTime) / (endTime - startTime);
193
+ return startRoad + (endRoad - startRoad) * (t * t * (3 - 2 * t));
194
+ }
195
+ /** How lit a team is: fully, but for the outage at the pennant. */
196
+ function lampAt(time) {
197
+ if (time > OUTAGE.out && time < OUTAGE.down) {
198
+ return 1 - 0.9 * ((time - OUTAGE.out) / (OUTAGE.down - OUTAGE.out));
199
+ }
200
+ if (time >= OUTAGE.down && time <= OUTAGE.up) {
201
+ return 0.1;
202
+ }
203
+ if (time > OUTAGE.up && time < OUTAGE.on) {
204
+ return 0.1 + 0.9 * ((time - OUTAGE.up) / (OUTAGE.on - OUTAGE.up));
205
+ }
206
+ return 1;
207
+ }
208
+ /** Where a team is at a moment of the journey, as a transform and an opacity. */
209
+ function teamAt(time) {
210
+ const road = roadAt(walkAt(time));
211
+ return {
212
+ x: round(road.x),
213
+ y: round(road.y - 11 * road.scale),
214
+ scale: round(road.scale),
215
+ opacity: round(road.clear * lampAt(time)),
216
+ };
217
+ }
218
+ /** Half a second a stop, which is fine enough for the fade at a crest. */
219
+ const JOURNEY_STOPS = Array.from({ length: JOURNEY * 2 + 1 }, (_, i) => {
220
+ const time = i / (JOURNEY * 2);
221
+ const { x, y, scale, opacity } = teamAt(time);
222
+ return `${round(time * 100)}% { transform: translate(${x}px, ${y}px) scale(${scale}); opacity: ${opacity}; }`;
223
+ }).join('\n');
224
+ /** When, in seconds into the journey, a team reaches this point of the road. */
225
+ function arrival(along) {
226
+ const moment = Array.from({ length: 1001 }, (_, i) => i / 1000).find(time => walkAt(time) >= along);
227
+ return (moment ?? 1) * JOURNEY;
228
+ }
229
+ /**
230
+ * The delay that puts a thing keeping the beat at its start when a team reaches
231
+ * it. Negative, so that it is already in step on the first frame.
232
+ */
233
+ const onBeat = (seconds) => round((seconds % BEAT) - BEAT);
234
+ const GATE_SECONDS = WALK[1][0] * JOURNEY;
235
+ const CHECKPOINT_SECONDS = WALK[3][0] * JOURNEY;
236
+ /** Where the marks of the road are, as fractions of it. */
237
+ const STEPS = [0.09, 0.15, 0.3, 0.335, 0.43, 0.56, 0.62, 0.72, 0.78, 0.9].map(along => ({
238
+ along,
239
+ ...roadAt(along),
240
+ }));
241
+ /** How far from the vanishing point each line of the fence is at the bottom of the frame. */
242
+ const FENCE_SPREAD = 520;
243
+ /** The fence's x at this y: `side` is -1 for the left line, 1 for the right. */
244
+ const fenceAt = (side, y) => VANISH.x + (side * FENCE_SPREAD * (y - VANISH.y)) / (HEIGHT - VANISH.y);
245
+ /** Posts bunch up towards the horizon, as they do. */
246
+ const FENCE_POSTS = Array.from({ length: 13 }, (_, i) => {
247
+ const y = VANISH.y + 5 + (HEIGHT - VANISH.y) * Math.pow((i + 1) / 13, 2.2);
248
+ return { y: round(y), height: round(2 + (y - VANISH.y) * 0.13) };
249
+ });
250
+ /** The protocols the team's links speak, each an arc from a port to out of the frame. */
251
+ const LINKS = [
252
+ {
253
+ name: 'A2A',
254
+ port: { x: fenceAt(-1, 268), y: 268 },
255
+ control: { x: 330, y: 92 },
256
+ end: { x: -40, y: 118 },
257
+ label: 0.3,
258
+ duration: 19,
259
+ },
260
+ {
261
+ name: 'ACP',
262
+ port: { x: fenceAt(-1, 196), y: 196 },
263
+ control: { x: 548, y: 66 },
264
+ end: { x: 250, y: -30 },
265
+ label: 0.42,
266
+ duration: 26,
267
+ },
268
+ {
269
+ name: 'MCP',
270
+ port: { x: fenceAt(1, 236), y: 236 },
271
+ control: { x: 1060, y: 66 },
272
+ end: { x: 1440, y: 98 },
273
+ label: 0.3,
274
+ duration: 22,
275
+ },
276
+ ];
277
+ function linkAt({ port, control, end }, t) {
278
+ const u = 1 - t;
279
+ return {
280
+ x: round(u * u * port.x + 2 * u * t * control.x + t * t * end.x),
281
+ y: round(u * u * port.y + 2 * u * t * control.y + t * t * end.y),
282
+ };
283
+ }
284
+ /** A message along a link: in step with nothing, since it is someone else's. */
285
+ const LINK_STOPS = LINKS.map(link => Array.from({ length: 33 }, (_, i) => {
286
+ const { x, y } = linkAt(link, i / 32);
287
+ return `${round((i / 32) * 100)}% { transform: translate(${x}px, ${y}px); opacity: ${i === 0 ? 0 : 1}; }`;
288
+ }).join('\n'));
289
+ /**
290
+ * A team: three agents joined up, a little triangle that keeps turning, so that
291
+ * even a team waiting at the gate is plainly not idle.
292
+ */
293
+ function Team({ inks }) {
294
+ const seats = inks.map((_, seat) => {
295
+ const angle = -Math.PI / 2 + (seat * 2 * Math.PI) / 3;
296
+ return { seat, x: round(Math.cos(angle) * 12), y: round(Math.sin(angle) * 12), ink: inks[seat] };
297
+ });
298
+ return (_jsxs(_Fragment, { children: [_jsx("circle", { r: "24", fill: inks[0], opacity: "0.13" }), _jsx("path", { d: `M${seats.map(seat => `${seat.x} ${seat.y}`).join(' L')} Z`, fill: inks[0], fillOpacity: "0.12", stroke: inks[0], strokeOpacity: "0.7", strokeWidth: "1" }), seats.map(seat => (_jsxs("g", { transform: `translate(${seat.x} ${seat.y})`, children: [_jsx("circle", { r: "8.5", fill: seat.ink, opacity: "0.2" }), _jsx("circle", { r: "4.8", fill: seat.ink })] }, seat.seat)))] }));
299
+ }
300
+ /** A dataset, as the library draws one: stroked, the cylinder and nothing more. */
301
+ function Data({ x, y, size, color }) {
302
+ const common = {
303
+ fill: 'none',
304
+ stroke: color,
305
+ strokeWidth: 1.4,
306
+ strokeLinecap: 'round',
307
+ strokeLinejoin: 'round',
308
+ };
309
+ return (_jsxs("g", { transform: `translate(${x} ${y}) scale(${size / 24}) translate(-12 -12)`, children: [_jsx("ellipse", { cx: "12", cy: "6", rx: "8", ry: "3.2", ...common }), _jsx("path", { d: "M4 6v12c0 1.8 3.6 3.2 8 3.2s8-1.4 8-3.2V6", ...common }), _jsx("path", { d: "M4 12c0 1.8 3.6 3.2 8 3.2s8-1.4 8-3.2", ...common })] }));
310
+ }
311
+ export function SvgHorizonHero({ palette: paletteProp } = {}) {
312
+ const auto = useColorPalette();
313
+ const p = paletteProp ?? auto;
314
+ const id = useId().replace(/:/g, '');
315
+ /** The palette, cycled so that a team's three agents are not the same colour. */
316
+ const inks = [p.glow, p.pop, p.accent];
317
+ /** What belongs to the person: the fence, the key, and the person. */
318
+ const theirs = p.gold;
319
+ const gate = roadAt(GATE_AT + 0.022);
320
+ const gateHalf = (gate.scale * ROAD_WIDTH) / 2 + 9;
321
+ const gatePost = 40;
322
+ const gateLeft = round(gate.x - gateHalf);
323
+ const gateRight = round(gate.x + gateHalf);
324
+ const gateBar = gate.y - gatePost + 13;
325
+ const person = { x: gateLeft - 46, y: gate.y + 12 };
326
+ /* The shoulder, from the feet, and the hand, from the shoulder. */
327
+ const shoulder = { x: 0, y: -31 };
328
+ const hand = { x: 22, y: 3 };
329
+ const pennant = roadAt(CHECKPOINT_AT);
330
+ const pennantX = round(pennant.x + 22);
331
+ const pennantY = round(pennant.y + 1);
332
+ return (_jsxs("svg", { viewBox: `0 0 ${WIDTH} ${HEIGHT}`, xmlns: "http://www.w3.org/2000/svg", preserveAspectRatio: "xMidYMid slice", "aria-hidden": "true", style: { width: '100%', height: '100%', display: 'block', position: 'absolute', inset: 0 }, children: [_jsxs("defs", { children: [_jsx("style", { children: `
333
+ @keyframes hz-walk-${id} {
334
+ ${JOURNEY_STOPS}
335
+ }
336
+ ${LINK_STOPS.map((stops, index) => `@keyframes hz-link-${index}-${id} {\n${stops}\n}`).join('\n')}
337
+ @keyframes hz-turn-${id} { to { transform: rotate(360deg); } }
338
+ /* Out from the vanishing point, as the hours go by. */
339
+ @keyframes hz-ripple-${id} {
340
+ 0% { transform: scale(0.06); opacity: 0; }
341
+ 16% { opacity: 0.36; }
342
+ 100% { transform: scale(1); opacity: 0; }
343
+ }
344
+ /* From the team reaching a mark: lit at once, dimming until the next one. */
345
+ @keyframes hz-step-${id} {
346
+ 0% { opacity: 0.04; }
347
+ 3% { opacity: 1; }
348
+ 62% { opacity: 0.8; }
349
+ 100% { opacity: 0.04; }
350
+ }
351
+ /* From the team reaching the gate, on the beat. */
352
+ @keyframes hz-wait-${id} {
353
+ 0%, 2% { opacity: 0; }
354
+ 6%, 20% { opacity: 0.8; }
355
+ 25%, 100% { opacity: 0; }
356
+ }
357
+ /* The arm goes up, the key turns in the hand, and only then the bar. */
358
+ @keyframes hz-arm-${id} {
359
+ 0%, 5% { transform: rotate(0deg); }
360
+ 11%, 30% { transform: rotate(-42deg); }
361
+ 38%, 100% { transform: rotate(0deg); }
362
+ }
363
+ @keyframes hz-key-${id} {
364
+ 0%, 10% { transform: rotate(0deg); }
365
+ 15%, 30% { transform: rotate(90deg); }
366
+ 38%, 100% { transform: rotate(0deg); }
367
+ }
368
+ @keyframes hz-grant-${id} {
369
+ 0%, 13% { opacity: 0; }
370
+ 16%, 24% { opacity: 0.9; }
371
+ 29%, 100% { opacity: 0; }
372
+ }
373
+ @keyframes hz-bar-${id} {
374
+ 0%, 17% { transform: rotate(0deg); }
375
+ 25%, 50% { transform: rotate(-74deg); }
376
+ 60%, 100% { transform: rotate(0deg); }
377
+ }
378
+ /* From the team reaching the pennant: a ring as it comes back on there. */
379
+ @keyframes hz-saved-${id} {
380
+ 0%, 14% { transform: scale(0.2); opacity: 0; }
381
+ 16% { transform: scale(0.24); opacity: 0.95; }
382
+ 46%, 100% { transform: scale(1); opacity: 0; }
383
+ }
384
+ .hz-walk-${id} { animation: hz-walk-${id} ${JOURNEY}s linear infinite; }
385
+ .hz-turn-${id} { transform-origin: 0 0; animation: hz-turn-${id} 28s linear infinite; }
386
+ .hz-ripple-${id} { transform-origin: 0 0; animation: hz-ripple-${id} 48s linear infinite; }
387
+ .hz-step-${id} { animation: hz-step-${id} ${BEAT}s linear infinite; }
388
+ .hz-wait-${id} { animation: hz-wait-${id} ${BEAT}s linear infinite; }
389
+ .hz-arm-${id} { transform-origin: 0 0; animation: hz-arm-${id} ${BEAT}s ease-in-out infinite; }
390
+ .hz-key-${id} { transform-origin: 0 0; animation: hz-key-${id} ${BEAT}s ease-in-out infinite; }
391
+ .hz-grant-${id} { animation: hz-grant-${id} ${BEAT}s linear infinite; }
392
+ .hz-bar-${id} { transform-origin: 0 0; animation: hz-bar-${id} ${BEAT}s ease-in-out infinite; }
393
+ .hz-saved-${id} { transform-origin: 0 0; animation: hz-saved-${id} ${BEAT}s ease-out infinite; }
394
+ ${LINKS.map((link, index) => `.hz-link-${index}-${id} { animation: hz-link-${index}-${id} ${link.duration}s linear infinite; }`).join('\n')}
395
+ @media (prefers-reduced-motion: reduce) {
396
+ .hz-walk-${id}, .hz-turn-${id}, .hz-ripple-${id}, .hz-step-${id}, .hz-wait-${id},
397
+ .hz-arm-${id}, .hz-key-${id}, .hz-grant-${id}, .hz-bar-${id}, .hz-saved-${id},
398
+ ${LINKS.map((_, index) => `.hz-link-${index}-${id}`).join(', ')} { animation: none; }
399
+ }
400
+ ` }), _jsxs("linearGradient", { id: `hz-sky-${id}`, x1: "0", y1: "0", x2: "0", y2: VANISH.y, gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { offset: "0%", stopColor: p.pop, stopOpacity: "0" }), _jsx("stop", { offset: "62%", stopColor: p.pop, stopOpacity: "0.1" }), _jsx("stop", { offset: "100%", stopColor: p.glow, stopOpacity: "0.34" })] }), _jsxs("radialGradient", { id: `hz-dawn-${id}`, cx: "50%", cy: "50%", r: "50%", children: [_jsx("stop", { offset: "0%", stopColor: p.glow, stopOpacity: "0.62" }), _jsx("stop", { offset: "34%", stopColor: p.glow, stopOpacity: "0.2" }), _jsx("stop", { offset: "100%", stopColor: p.glow, stopOpacity: "0" })] }), _jsxs("linearGradient", { id: `hz-line-${id}`, x1: "0", y1: "0", x2: WIDTH, y2: "0", gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { offset: "0%", stopColor: p.glow, stopOpacity: "0.1" }), _jsx("stop", { offset: `${round((VANISH.x / WIDTH) * 100)}%`, stopColor: p.glow, stopOpacity: "1" }), _jsx("stop", { offset: "100%", stopColor: p.glow, stopOpacity: "0.1" })] }), RIDGES.map((ridge, index) => (_jsxs("linearGradient", { id: `hz-wash-${index}-${id}`, x1: "0", y1: ridge.base - ridge.swell * 1.5, x2: "0", y2: ridge.base + 34 + index * 18, gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { offset: "0%", stopColor: p.glow, stopOpacity: ridge.wash }), _jsx("stop", { offset: "100%", stopColor: p.glow, stopOpacity: "0" })] }, `wash-${index}`))), RIDGES.map((_, index) => (_jsx("clipPath", { id: `hz-clip-${index}-${id}`, children: _jsx("path", { d: ridgeShape(index) }) }, `clip-${index}`))), _jsx("clipPath", { id: `hz-above-${id}`, children: _jsx("rect", { width: WIDTH, height: VANISH.y }) }), _jsxs("linearGradient", { id: `hz-ground-${id}`, x1: "0", y1: VANISH.y, x2: "0", y2: HEIGHT, gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { offset: "0%", stopColor: theirs, stopOpacity: "0.13" }), _jsx("stop", { offset: "100%", stopColor: theirs, stopOpacity: "0.04" })] }), LINKS.map((link, index) => (_jsxs("linearGradient", { id: `hz-arc-${index}-${id}`, x1: link.port.x, y1: link.port.y, x2: link.end.x, y2: link.end.y, gradientUnits: "userSpaceOnUse", children: [_jsx("stop", { offset: "0%", stopColor: inks[index], stopOpacity: "0.85" }), _jsx("stop", { offset: "100%", stopColor: inks[index], stopOpacity: "0.3" })] }, `arc-${link.name}`)))] }), _jsx("rect", { width: WIDTH, height: HEIGHT, fill: p.bg }), _jsx("rect", { width: WIDTH, height: VANISH.y + 2, fill: `url(#hz-sky-${id})` }), _jsx("g", { clipPath: `url(#hz-above-${id})`, children: _jsx("g", { transform: `translate(${VANISH.x} ${VANISH.y})`, fill: "none", stroke: p.glow, strokeWidth: "1", children: [0, 1, 2, 3].map(ring => (_jsx("circle", { className: `hz-ripple-${id}`, r: "620", vectorEffect: "non-scaling-stroke", opacity: "0.1", transform: `scale(${0.2 + ring * 0.22})`, style: { animationDelay: `${-ring * 12}s` } }, `ring-${ring}`))) }) }), _jsx("ellipse", { cx: VANISH.x, cy: VANISH.y, rx: "300", ry: "90", fill: `url(#hz-dawn-${id})` }), RIDGES.map((ridge, index) => (_jsxs("g", { children: [_jsx("path", { d: ridgeShape(index), fill: p.bg }), _jsx("path", { d: ridgeShape(index), fill: `url(#hz-wash-${index}-${id})` }), _jsxs("g", { clipPath: `url(#hz-clip-${index}-${id})`, children: [[7, 15, 25].map((drop, line) => (_jsx("path", { d: ridgeLine(index), transform: `translate(0 ${drop + index * 2 * line})`, fill: "none", stroke: p.glow, strokeWidth: "0.7", strokeOpacity: 0.15 - line * 0.04 }, `contour-${index}-${line}`))), _jsx("polygon", { points: `${VANISH.x},${VANISH.y} ${fenceAt(-1, HEIGHT)},${HEIGHT} ${fenceAt(1, HEIGHT)},${HEIGHT}`, fill: `url(#hz-ground-${id})` }), LEGS.filter(leg => leg.ridge === index).map(leg => (_jsxs("g", { children: [_jsx("path", { d: legRibbon(leg), fill: p.bg, opacity: "0.75" }), _jsx("path", { d: legRibbon(leg), fill: p.glow, opacity: "0.16" }), _jsx("path", { d: legMiddle(leg), fill: "none", stroke: p.glow, strokeOpacity: "0.5", strokeWidth: round(leg.scale[1] * 1.1), strokeDasharray: `${round(leg.scale[1] * 7)} ${round(leg.scale[1] * 6)}` })] }, `leg-${leg.ridge}`)))] }), _jsx("path", { d: ridgeLine(index), fill: "none", stroke: index === 0 ? `url(#hz-line-${id})` : p.glow, strokeWidth: index === 0 ? 1.4 : 0.9, strokeOpacity: index === 0 ? 1 : 0.5 })] }, `ridge-${index}`))), [-1, 1].map(side => (_jsxs("g", { stroke: theirs, strokeLinecap: "round", children: [_jsx("line", { x1: VANISH.x, y1: VANISH.y, x2: fenceAt(side, HEIGHT), y2: HEIGHT, strokeWidth: "1.1", strokeOpacity: "0.75" }), FENCE_POSTS.map(post => (_jsx("line", { x1: round(fenceAt(side, post.y)), y1: post.y, x2: round(fenceAt(side, post.y)), y2: round(post.y - post.height), strokeWidth: round(0.7 + post.height * 0.05), strokeOpacity: "0.8" }, post.y)))] }, `fence-${side}`))), LINKS.map((link, index) => {
401
+ const label = linkAt(link, link.label);
402
+ return (_jsxs("g", { children: [_jsx("path", { d: `M${link.port.x} ${link.port.y} Q${link.control.x} ${link.control.y} ${link.end.x} ${link.end.y}`, fill: "none", stroke: `url(#hz-arc-${index}-${id})`, strokeWidth: "1.2" }), _jsx("rect", { x: round(link.port.x - 4), y: round(link.port.y - 4), width: "8", height: "8", transform: `rotate(45 ${link.port.x} ${link.port.y})`, fill: p.bg, stroke: inks[index], strokeWidth: "1.4" }), [0, 1].map(pulse => {
403
+ const rest = linkAt(link, 0.22 + pulse * 0.42);
404
+ return (_jsx("circle", { className: `hz-link-${index}-${id}`, r: "2.6", fill: inks[index], transform: `translate(${rest.x} ${rest.y})`, style: {
405
+ animationDelay: `${-(link.duration * (0.3 + pulse * 0.5))}s`,
406
+ animationDirection: pulse === 0 ? 'normal' : 'reverse',
407
+ } }, `pulse-${pulse}`));
408
+ }), _jsx("rect", { x: label.x - 20, y: label.y - 9, width: "40", height: "18", rx: "9", fill: p.bg, stroke: inks[index], strokeOpacity: "0.7", strokeWidth: "0.9" }), _jsx("text", { x: label.x, y: label.y + 3.6, textAnchor: "middle", fontSize: "10", fontWeight: "600", letterSpacing: "0.7", fill: inks[index], fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace", children: link.name })] }, link.name));
409
+ }), _jsx(Data, { x: 882, y: 294, size: 30, color: theirs }), _jsx(Data, { x: 498, y: 330, size: 34, color: theirs }), STEPS.filter(step => step.clear > 0.8).map(step => (_jsxs("g", { transform: `translate(${round(step.x)} ${round(step.y)})`, children: [_jsx("circle", { r: round(Math.max(1.8, step.scale * 3.4)), fill: p.bg, stroke: p.glow, strokeOpacity: "0.8", strokeWidth: round(Math.max(0.5, step.scale * 1)) }), _jsx("circle", { className: `hz-step-${id}`, r: round(Math.max(1.1, step.scale * 2.2)), fill: p.glow, opacity: "0.7", style: { animationDelay: `${onBeat(arrival(step.along))}s` } })] }, step.along))), _jsxs("g", { transform: `translate(${pennantX} ${pennantY})`, children: [_jsx("g", { className: `hz-saved-${id}`, opacity: "0", style: { animationDelay: `${onBeat(CHECKPOINT_SECONDS)}s` }, children: _jsx("ellipse", { rx: "56", ry: "17", fill: "none", stroke: p.spark, strokeWidth: "1.4" }) }), _jsx("ellipse", { rx: "9", ry: "3", fill: p.spark, opacity: "0.34" }), _jsx("line", { y2: "-32", stroke: p.spark, strokeWidth: "1.6", strokeLinecap: "round" }), _jsx("path", { d: "M0 -32 L17 -26 L0 -20 Z", fill: p.spark })] }), _jsxs("g", { children: [_jsx("ellipse", { className: `hz-wait-${id}`, cx: gate.x, cy: gate.y, rx: gateHalf + 15, ry: "12", fill: "none", stroke: theirs, strokeWidth: "1.3", opacity: "0.8", style: { animationDelay: `${onBeat(GATE_SECONDS)}s` } }), _jsx("line", { x1: gateLeft, y1: gate.y, x2: gateLeft, y2: gate.y - gatePost, stroke: theirs, strokeWidth: "3", strokeLinecap: "round" }), _jsx("line", { x1: gateRight, y1: gate.y, x2: gateRight, y2: gateBar + 2, stroke: theirs, strokeWidth: "3", strokeLinecap: "round" }), _jsx("g", { transform: `translate(${gateLeft} ${gateBar})`, children: _jsxs("g", { className: `hz-bar-${id}`, style: { animationDelay: `${onBeat(GATE_SECONDS)}s` }, children: [_jsx("line", { x2: gateHalf * 2, stroke: theirs, strokeWidth: "3.4", strokeLinecap: "round" }), [0.28, 0.6].map(along => (_jsx("line", { x1: gateHalf * 2 * along, x2: gateHalf * 2 * along + 8, stroke: p.bg, strokeWidth: "3.4" }, along)))] }) }), _jsx("path", { className: `hz-grant-${id}`, d: `M${person.x + 30} ${person.y - 62} Q${person.x + 44} ${gateBar - 26} ${gateLeft} ${gateBar}`, fill: "none", stroke: theirs, strokeWidth: "1.2", strokeDasharray: "3 3", opacity: "0", style: { animationDelay: `${onBeat(GATE_SECONDS)}s` } })] }), _jsxs("g", { transform: `translate(${person.x} ${person.y})`, stroke: theirs, strokeLinecap: "round", fill: "none", children: [_jsx("ellipse", { rx: "17", ry: "4", fill: theirs, stroke: "none", opacity: "0.26" }), _jsx("circle", { cy: "-41", r: "6", fill: theirs, stroke: "none" }), _jsx("path", { d: "M0 -30 V-14", strokeWidth: "8" }), _jsx("path", { d: "M-1.6 -12 L-5 -1 M1.6 -12 L5 -1", strokeWidth: "4.4" }), _jsx("path", { d: "M-4 -29 L-8 -15", strokeWidth: "3.2" }), _jsx("g", { transform: `translate(${shoulder.x} ${shoulder.y})`, children: _jsxs("g", { className: `hz-arm-${id}`, style: { animationDelay: `${onBeat(GATE_SECONDS)}s` }, children: [_jsx("path", { d: `M3 0 L${hand.x} ${hand.y}`, strokeWidth: "3.2" }), _jsx("g", { transform: `translate(${hand.x + 6} ${hand.y})`, children: _jsxs("g", { className: `hz-key-${id}`, style: { animationDelay: `${onBeat(GATE_SECONDS)}s` }, children: [_jsx("circle", { cx: "-2", r: "4", strokeWidth: "2" }), _jsx("path", { d: "M2 0 H13 M9 0 V4 M13 0 V4", strokeWidth: "2" })] }) })] }) })] }), _jsxs("g", { fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace", fill: p.textMuted, letterSpacing: "1.2", children: [_jsx("text", { x: "740", y: "352", fontSize: "12", children: "now" }), _jsx("text", { x: "832", y: "232", fontSize: "10", children: "hours" }), _jsx("text", { x: "714", y: "172", fontSize: "8.5", children: "days" })] }), Array.from({ length: TEAMS }, (_, team) => {
410
+ const delay = team * BEAT;
411
+ const rest = teamAt(((GATE_SECONDS + 3 + delay) % JOURNEY) / JOURNEY);
412
+ return (_jsx("g", { className: `hz-walk-${id}`, transform: `translate(${rest.x} ${rest.y}) scale(${rest.scale})`, opacity: rest.opacity, style: { animationDelay: `${-delay}s` }, children: _jsx("g", { className: `hz-turn-${id}`, children: _jsx(Team, { inks: [inks[team], inks[(team + 1) % 3], inks[(team + 2) % 3]] }) }) }, `team-${team}`));
413
+ })] }));
414
+ }
415
+ export default SvgHorizonHero;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * King Kong release illustration: a 2005 still traced to one ink (the user's own conversion, 6 November 2026), Kong on the left and the tyrannosaur on the right, Ann between them.
3
+ *
4
+ * Keeps the original source artwork unchanged and only recolors it based on
5
+ * the active user theme.
6
+ */
7
+ import { type ColorPalette } from '@datalayer/primer-addons';
8
+ export declare function SvgKingKong({ palette: paletteProp }?: {
9
+ palette?: ColorPalette;
10
+ }): import("react").JSX.Element;
11
+ export default SvgKingKong;
@@ -0,0 +1,79 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2026 Datalayer, Inc.
4
+ *
5
+ * CC BY 4.0 License
6
+ */
7
+ /**
8
+ * King Kong release illustration: a 2005 still traced to one ink (the user's own conversion, 6 November 2026), Kong on the left and the tyrannosaur on the right, Ann between them.
9
+ *
10
+ * Keeps the original source artwork unchanged and only recolors it based on
11
+ * the active user theme.
12
+ */
13
+ import { useColorPalette } from '@datalayer/primer-addons';
14
+ import { useEffect, useState } from 'react';
15
+ import KingKongSource from './images/datalayer-king-kong.svg';
16
+ export function SvgKingKong({ palette: paletteProp } = {}) {
17
+ const auto = useColorPalette();
18
+ const p = paletteProp ?? auto;
19
+ const tint = p.isLight ? p.primary : p.spark;
20
+ const [svgMarkup, setSvgMarkup] = useState('');
21
+ useEffect(() => {
22
+ let cancelled = false;
23
+ const loadAndTint = async () => {
24
+ let source;
25
+ // The .svg import resolves to a URL under Vite (design package) but may
26
+ // resolve to raw SVG markup or a data: URI under webpack/svgr (when this
27
+ // component is consumed from a webpack-based host like the UI app).
28
+ const raw = KingKongSource;
29
+ const looksLikeMarkup = typeof raw === 'string' && /^\s*(<\?xml|<svg[\s>])/i.test(raw);
30
+ if (looksLikeMarkup) {
31
+ source = raw;
32
+ }
33
+ else {
34
+ const response = await fetch(raw);
35
+ source = await response.text();
36
+ }
37
+ if (cancelled) {
38
+ return;
39
+ }
40
+ const parser = new DOMParser();
41
+ const doc = parser.parseFromString(source, 'image/svg+xml');
42
+ const svg = doc.querySelector('svg');
43
+ if (!svg) {
44
+ setSvgMarkup(source);
45
+ return;
46
+ }
47
+ svg.setAttribute('width', '100%');
48
+ svg.setAttribute('height', '100%');
49
+ svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
50
+ svg.setAttribute('style', `width:100%;height:100%;display:block;background:${p.bg};color:${tint};`);
51
+ const blackFills = new Set(['#000', '#000000', 'black', 'rgb(0,0,0)']);
52
+ doc.querySelectorAll('[fill]').forEach((node) => {
53
+ const fill = (node.getAttribute('fill') || '').replace(/\s+/g, '').toLowerCase();
54
+ if (blackFills.has(fill)) {
55
+ node.setAttribute('fill', tint);
56
+ }
57
+ });
58
+ doc.querySelectorAll('[stroke]').forEach((node) => {
59
+ const stroke = (node.getAttribute('stroke') || '').replace(/\s+/g, '').toLowerCase();
60
+ if (blackFills.has(stroke)) {
61
+ node.setAttribute('stroke', tint);
62
+ }
63
+ });
64
+ const serialized = new XMLSerializer().serializeToString(svg);
65
+ setSvgMarkup(serialized);
66
+ };
67
+ loadAndTint().catch(() => setSvgMarkup(''));
68
+ return () => {
69
+ cancelled = true;
70
+ };
71
+ }, [p.bg, tint]);
72
+ return (_jsx("div", { "aria-label": "King Kong facing a tyrannosaur", style: {
73
+ width: '100%',
74
+ height: '100%',
75
+ display: 'block',
76
+ overflow: 'hidden',
77
+ }, dangerouslySetInnerHTML: { __html: svgMarkup } }));
78
+ }
79
+ export default SvgKingKong;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * King Kong release illustration, the second (the user, 6 November 2026): the other 2005 still traced to one ink, the tyrannosaur on the left and Kong on the right, Ann between them.
3
+ *
4
+ * Keeps the original source artwork unchanged and only recolors it based on
5
+ * the active user theme.
6
+ */
7
+ import { type ColorPalette } from '@datalayer/primer-addons';
8
+ export declare function SvgKingKong2({ palette: paletteProp }?: {
9
+ palette?: ColorPalette;
10
+ }): import("react").JSX.Element;
11
+ export default SvgKingKong2;
@@ -0,0 +1,79 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /*
3
+ * Copyright (c) 2022-2026 Datalayer, Inc.
4
+ *
5
+ * CC BY 4.0 License
6
+ */
7
+ /**
8
+ * King Kong release illustration, the second (the user, 6 November 2026): the other 2005 still traced to one ink, the tyrannosaur on the left and Kong on the right, Ann between them.
9
+ *
10
+ * Keeps the original source artwork unchanged and only recolors it based on
11
+ * the active user theme.
12
+ */
13
+ import { useColorPalette } from '@datalayer/primer-addons';
14
+ import { useEffect, useState } from 'react';
15
+ import KingKong2Source from './images/datalayer-king-kong-2.svg';
16
+ export function SvgKingKong2({ palette: paletteProp } = {}) {
17
+ const auto = useColorPalette();
18
+ const p = paletteProp ?? auto;
19
+ const tint = p.isLight ? p.primary : p.spark;
20
+ const [svgMarkup, setSvgMarkup] = useState('');
21
+ useEffect(() => {
22
+ let cancelled = false;
23
+ const loadAndTint = async () => {
24
+ let source;
25
+ // The .svg import resolves to a URL under Vite (design package) but may
26
+ // resolve to raw SVG markup or a data: URI under webpack/svgr (when this
27
+ // component is consumed from a webpack-based host like the UI app).
28
+ const raw = KingKong2Source;
29
+ const looksLikeMarkup = typeof raw === 'string' && /^\s*(<\?xml|<svg[\s>])/i.test(raw);
30
+ if (looksLikeMarkup) {
31
+ source = raw;
32
+ }
33
+ else {
34
+ const response = await fetch(raw);
35
+ source = await response.text();
36
+ }
37
+ if (cancelled) {
38
+ return;
39
+ }
40
+ const parser = new DOMParser();
41
+ const doc = parser.parseFromString(source, 'image/svg+xml');
42
+ const svg = doc.querySelector('svg');
43
+ if (!svg) {
44
+ setSvgMarkup(source);
45
+ return;
46
+ }
47
+ svg.setAttribute('width', '100%');
48
+ svg.setAttribute('height', '100%');
49
+ svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
50
+ svg.setAttribute('style', `width:100%;height:100%;display:block;background:${p.bg};color:${tint};`);
51
+ const blackFills = new Set(['#000', '#000000', 'black', 'rgb(0,0,0)']);
52
+ doc.querySelectorAll('[fill]').forEach((node) => {
53
+ const fill = (node.getAttribute('fill') || '').replace(/\s+/g, '').toLowerCase();
54
+ if (blackFills.has(fill)) {
55
+ node.setAttribute('fill', tint);
56
+ }
57
+ });
58
+ doc.querySelectorAll('[stroke]').forEach((node) => {
59
+ const stroke = (node.getAttribute('stroke') || '').replace(/\s+/g, '').toLowerCase();
60
+ if (blackFills.has(stroke)) {
61
+ node.setAttribute('stroke', tint);
62
+ }
63
+ });
64
+ const serialized = new XMLSerializer().serializeToString(svg);
65
+ setSvgMarkup(serialized);
66
+ };
67
+ loadAndTint().catch(() => setSvgMarkup(''));
68
+ return () => {
69
+ cancelled = true;
70
+ };
71
+ }, [p.bg, tint]);
72
+ return (_jsx("div", { "aria-label": "A tyrannosaur facing King Kong", style: {
73
+ width: '100%',
74
+ height: '100%',
75
+ display: 'block',
76
+ overflow: 'hidden',
77
+ }, dangerouslySetInnerHTML: { __html: svgMarkup } }));
78
+ }
79
+ export default SvgKingKong2;
@@ -0,0 +1,15 @@
1
+ import { type ColorMode, type ColorPalette, type ThemeVariant } from '@datalayer/primer-addons';
2
+ type SvgPoppy1_0Props = {
3
+ /** The headline. */
4
+ title?: string;
5
+ /** The line under it. */
6
+ subtitle?: string;
7
+ /** Background palette. Derived from `variant`/`colorMode` when absent. */
8
+ palette?: ColorPalette;
9
+ /** Draw the card for this theme rather than for the reader's own. */
10
+ variant?: ThemeVariant;
11
+ /** The colour mode to go with `variant`. The store's when absent. */
12
+ colorMode?: ColorMode;
13
+ };
14
+ export declare function SvgPoppy1_0({ title, subtitle, palette: paletteProp, variant, colorMode: colorModeProp, }?: SvgPoppy1_0Props): import("react").JSX.Element;
15
+ export default SvgPoppy1_0;