@datalayer/design 1.0.14 → 1.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/pages/IconsPage.js +45 -23
- package/lib/svg/SvgAgentRuntimes.js +1 -1
- package/lib/svg/SvgOg.js +3 -3
- package/lib/svg/SvgOgStacked.js +1 -1
- package/lib/svg/SvgSessions.d.ts +5 -0
- package/lib/svg/SvgSessions.js +167 -0
- package/lib/svg/gallery.d.ts +1 -1
- package/lib/svg/gallery.js +1 -0
- package/lib/svg/index.d.ts +1 -0
- package/lib/svg/index.js +1 -0
- package/package.json +2 -2
package/lib/pages/IconsPage.js
CHANGED
|
@@ -14,14 +14,23 @@ import { jsxs as _jsxs, jsx as _jsx, Fragment as _Fragment } from "react/jsx-run
|
|
|
14
14
|
* four treatments of each icon with their downloads. Imported when chosen,
|
|
15
15
|
* so the grid never loads its chunk.
|
|
16
16
|
*
|
|
17
|
+
* Both are drawn 1200px wide at most and share their search, kept in the
|
|
18
|
+
* address (`?q=`), so switching view keeps it (the user, 27 November 2026).
|
|
19
|
+
*
|
|
17
20
|
* It read `@datalayer/icons-all` until 20 November 2026; that package is
|
|
18
21
|
* never published, and design is.
|
|
19
22
|
*/
|
|
20
|
-
import { Suspense, lazy, useMemo, useState } from "react";
|
|
23
|
+
import { Suspense, lazy, useEffect, useMemo, useState } from "react";
|
|
21
24
|
import { useSearchParams } from "react-router-dom";
|
|
22
25
|
import { SegmentedControl, Spinner, Text, TextInput } from "@primer/react";
|
|
23
26
|
import { SearchIcon } from "@primer/octicons-react";
|
|
24
27
|
import { Box } from "@datalayer/primer-addons";
|
|
28
|
+
/**
|
|
29
|
+
* The viewer's own details dialog (`@datalayer/icons-react/viewer`), opened
|
|
30
|
+
* from a grid tile: the same dialog as a click in the viewer (the user, 28
|
|
31
|
+
* November 2026). Loaded on the first click.
|
|
32
|
+
*/
|
|
33
|
+
const IconDetailsDialog = lazy(() => import("@datalayer/icons-react/viewer").then((viewer) => ({ default: viewer.IconDetailsDialog })));
|
|
25
34
|
/** A React component: a function, or a `forwardRef` / `memo` object. */
|
|
26
35
|
const isComponent = (value) => typeof value === "function" ||
|
|
27
36
|
(typeof value === "object" && value !== null && "$$typeof" in value);
|
|
@@ -37,15 +46,16 @@ const IconGrid = lazy(() => import("@datalayer/icons-react").then((module) => {
|
|
|
37
46
|
const q = query.trim().toLowerCase();
|
|
38
47
|
return q ? icons.filter(([name]) => name.toLowerCase().includes(q)) : icons;
|
|
39
48
|
}, [query]);
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
+
const [selected, setSelected] = useState(null);
|
|
50
|
+
return (_jsxs(_Fragment, { children: [_jsxs(Text, { as: "p", sx: { color: "fg.muted", fontSize: 1, m: 0 }, children: [shown.length, " of ", icons.length, " icons"] }), _jsx(Box, { as: "ul", display: "grid", gridTemplateColumns: "repeat(auto-fill, minmax(136px, 1fr))", gap: 2, p: 0, m: 0, style: { listStyle: "none" }, children: shown.map(([name, Icon]) => (_jsx(Box, { as: "li", display: "flex", children: _jsxs(Box, { as: "button", type: "button", onClick: () => setSelected({ name, icon: Icon }), "aria-label": `${name}: its treatments, code and downloads`, "data-icon-tile": name, flex: 1, display: "flex", flexDirection: "column", alignItems: "center", gap: 2, p: 3, borderRadius: 2, border: "1px solid", borderColor: "border.default", bg: "canvas.default", color: "fg.default", title: name, sx: { cursor: "pointer", font: "inherit", minWidth: 0, "&:hover": { borderColor: "accent.emphasis" } }, children: [_jsx(Icon, { size: 32 }), _jsx(Text, { sx: {
|
|
51
|
+
fontSize: 0,
|
|
52
|
+
fontFamily: "mono",
|
|
53
|
+
color: "fg.muted",
|
|
54
|
+
maxWidth: "100%",
|
|
55
|
+
overflow: "hidden",
|
|
56
|
+
textOverflow: "ellipsis",
|
|
57
|
+
whiteSpace: "nowrap",
|
|
58
|
+
}, children: name })] }) }, name))) }), selected ? (_jsx(Suspense, { fallback: null, children: _jsx(IconDetailsDialog, { selected: selected, onClose: () => setSelected(null) }) })) : null] }));
|
|
49
59
|
}
|
|
50
60
|
return { default: Grid };
|
|
51
61
|
}));
|
|
@@ -56,9 +66,23 @@ const VIEW_LABELS = { grid: "Grid", viewer: "Viewer" };
|
|
|
56
66
|
function Loading({ children }) {
|
|
57
67
|
return (_jsxs(Box, { display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "center", gap: 3, minHeight: "60vh", children: [_jsx(Spinner, { size: "large" }), _jsx(Text, { sx: { color: "fg.muted", fontSize: 2 }, children: children })] }));
|
|
58
68
|
}
|
|
69
|
+
/** The widest the icons are drawn, the grid as the viewer (`@datalayer/icons-react/viewer`). */
|
|
70
|
+
const ICONS_MAX_WIDTH = 1200;
|
|
71
|
+
/** The grid, its search kept in the address's `q`, as the viewer's is: switching view keeps it. */
|
|
59
72
|
function IconsGrid() {
|
|
60
|
-
const [
|
|
61
|
-
|
|
73
|
+
const [searchParams, setSearchParams] = useSearchParams();
|
|
74
|
+
const [query, setQuery] = useState(() => searchParams.get("q") ?? "");
|
|
75
|
+
useEffect(() => {
|
|
76
|
+
setSearchParams((current) => {
|
|
77
|
+
const params = new URLSearchParams(current);
|
|
78
|
+
if (query.trim())
|
|
79
|
+
params.set("q", query.trim());
|
|
80
|
+
else
|
|
81
|
+
params.delete("q");
|
|
82
|
+
return params;
|
|
83
|
+
}, { replace: true });
|
|
84
|
+
}, [query, setSearchParams]);
|
|
85
|
+
return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: 3, width: "100%", maxWidth: ICONS_MAX_WIDTH, mx: "auto", children: [_jsx(TextInput, { leadingVisual: SearchIcon, placeholder: "Search the icons", "aria-label": "Search the icons", value: query, onChange: (event) => setQuery(event.target.value), sx: { maxWidth: 420 } }), _jsx(Suspense, { fallback: _jsx(Loading, { children: "Loading the icons..." }), children: _jsx(IconGrid, { query: query }) })] }));
|
|
62
86
|
}
|
|
63
87
|
export function IconsPage() {
|
|
64
88
|
const [searchParams, setSearchParams] = useSearchParams();
|
|
@@ -70,17 +94,15 @@ export function IconsPage() {
|
|
|
70
94
|
if (next === view) {
|
|
71
95
|
return;
|
|
72
96
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return params;
|
|
82
|
-
}, { replace: true });
|
|
97
|
+
// From the address as shown: the viewer writes its search (`q`) there
|
|
98
|
+
// itself, unseen by the router. Both views read `q`, so the search stays.
|
|
99
|
+
const params = new URLSearchParams(window.location.search);
|
|
100
|
+
if (next === "viewer")
|
|
101
|
+
params.set("view", "viewer");
|
|
102
|
+
else
|
|
103
|
+
params.delete("view");
|
|
104
|
+
setSearchParams(params, { replace: true });
|
|
83
105
|
};
|
|
84
|
-
return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: 3, p: 4, children: [_jsx(Box, { alignSelf: "
|
|
106
|
+
return (_jsxs(Box, { display: "flex", flexDirection: "column", gap: 3, p: 4, children: [_jsx(Box, { alignSelf: "center", width: "100%", maxWidth: ICONS_MAX_WIDTH, children: _jsx(SegmentedControl, { "aria-label": "How to show the icons", onChange: choose, children: VIEWS.map((option) => (_jsx(SegmentedControl.Button, { selected: view === option, children: VIEW_LABELS[option] }, option))) }) }), view === "viewer" ? (_jsx(Box, { mx: -4, mt: -3, children: _jsx(Suspense, { fallback: _jsx(Loading, { children: "Loading the viewer..." }), children: _jsx(IconsViewer, {}) }) })) : (_jsx(IconsGrid, {}))] }));
|
|
85
107
|
}
|
|
86
108
|
export default IconsPage;
|
|
@@ -18,7 +18,7 @@ export function SvgAgentRuntimes({ palette: paletteProp } = {}) {
|
|
|
18
18
|
{ x: 660, y: 300, label: 'ACP', glowId: 'glowVivid', color: 'glow' },
|
|
19
19
|
{ x: 400, y: 56, label: 'MCP', glowId: 'glowPop', color: 'pop' },
|
|
20
20
|
].map((n, i) => (_jsxs("g", { children: [_jsx("line", { x1: "400", y1: "200", x2: n.x, y2: n.y, stroke: p[n.color], strokeOpacity: "0.35", strokeWidth: "1.2", strokeDasharray: "6 4" }), _jsx("circle", { cx: n.x, cy: n.y, r: "30", fill: `url(#${n.glowId})`, opacity: "0.6" }), _jsx("rect", { x: n.x - 40, y: n.y - 16, width: "80", height: "32", rx: "6", fill: p.bgAlt, stroke: p[n.color], strokeOpacity: "0.4", strokeWidth: "1" }), _jsx("text", { x: n.x, y: n.y + 4, fontFamily: "sans-serif", fontSize: "10", fill: p.textLight, opacity: "0.8", textAnchor: "middle", children: n.label })] }, i))), [
|
|
21
|
-
{ x: 220, y: 350, label: '
|
|
21
|
+
{ x: 220, y: 350, label: 'Poppy', color: p.blaze, glowId: 'glowBlaze' },
|
|
22
22
|
{ x: 340, y: 350, label: 'LinkedIn', color: p.surge, glowId: 'glowSurge' },
|
|
23
23
|
{ x: 460, y: 350, label: 'GitHub', color: p.glow, glowId: 'glowVivid' },
|
|
24
24
|
{ x: 580, y: 350, label: 'Slack', color: p.spark, glowId: 'glowSpark' },
|
package/lib/svg/SvgOg.js
CHANGED
|
@@ -40,9 +40,9 @@ const LOGO_INK_WIDTH = LOGO_INK_WIDTH_UNITS * LOGO_SCALE;
|
|
|
40
40
|
/* The ink starts at the viewBox origin, so its left edge IS the svg's x. */
|
|
41
41
|
const LOGO_X = (WIDTH - LOGO_INK_WIDTH) / 2;
|
|
42
42
|
const LOGO_Y = 196;
|
|
43
|
-
const TAGLINE_BASELINE =
|
|
44
|
-
const TAGLINE_SIZE =
|
|
45
|
-
export function SvgOg({ tagline = '
|
|
43
|
+
const TAGLINE_BASELINE = 440;
|
|
44
|
+
const TAGLINE_SIZE = 56;
|
|
45
|
+
export function SvgOg({ tagline = 'Always-on AI Agents', palette: paletteProp, variant, colorMode: colorModeProp, } = {}) {
|
|
46
46
|
const stored = useThemeStore();
|
|
47
47
|
const theme = variant ?? stored.theme;
|
|
48
48
|
const colorMode = colorModeProp ?? stored.colorMode;
|
package/lib/svg/SvgOgStacked.js
CHANGED
|
@@ -34,7 +34,7 @@ const WORD_HEIGHT = (WORD_WIDTH / WORD_INK.width) * WORD_INK.height;
|
|
|
34
34
|
const WORD_Y = MARK_Y + MARK_SIZE + 34;
|
|
35
35
|
const TAGLINE_SIZE = 52;
|
|
36
36
|
const TAGLINE_BASELINE = WORD_Y + WORD_HEIGHT + 30 + TAGLINE_SIZE;
|
|
37
|
-
export function SvgOgStacked({ tagline = '
|
|
37
|
+
export function SvgOgStacked({ tagline = 'Always-on AI Agents', palette: paletteProp, variant, colorMode: colorModeProp, } = {}) {
|
|
38
38
|
const stored = useThemeStore();
|
|
39
39
|
const theme = variant ?? stored.theme;
|
|
40
40
|
const colorMode = colorModeProp ?? stored.colorMode;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/*
|
|
3
|
+
* Copyright (c) 2022-2026 Datalayer, Inc.
|
|
4
|
+
*
|
|
5
|
+
* CC BY 4.0 License
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Several sessions on one agent: the drawing of the post of 2 December 2026.
|
|
9
|
+
*
|
|
10
|
+
* The motif is a **spindle**: one agent at the centre, and the conversations
|
|
11
|
+
* it holds leaving it as threads, each in a colour of its own, each ending on
|
|
12
|
+
* the label that is its address, `<AGENT>:<SESSION>`. The agent half of every
|
|
13
|
+
* address is the same ink as the agent; only the session half changes.
|
|
14
|
+
*
|
|
15
|
+
* - **Local and cloud** are the two places the agent is held, on the left: a
|
|
16
|
+
* terminal on a laptop, listing the sessions as `agent sessions ls` does, and
|
|
17
|
+
* a Datalayer runtime holding the same ones. `/transfer` moves a session
|
|
18
|
+
* between them.
|
|
19
|
+
* - **A fork** is a thread that splits: the first conversation branches at a
|
|
20
|
+
* diamond, and the branch carries on with an address of its own.
|
|
21
|
+
* - **Pause and resume** is the band every thread crosses: each one is marked
|
|
22
|
+
* where it is kept, and none is cut. The conversations come out of the
|
|
23
|
+
* pause whole.
|
|
24
|
+
*
|
|
25
|
+
* Turns travel along the threads for as long as the page is open, and the
|
|
26
|
+
* ring round the agent turns: an always-on agent. Both stop under
|
|
27
|
+
* `prefers-reduced-motion`.
|
|
28
|
+
*
|
|
29
|
+
* Text is set in a monospace and a system stack, so the drawing rasterises the
|
|
30
|
+
* same wherever it is exported.
|
|
31
|
+
*/
|
|
32
|
+
import { useId } from 'react';
|
|
33
|
+
import { useColorPalette, LightBoostFilter } from '@datalayer/primer-addons';
|
|
34
|
+
const WIDTH = 800;
|
|
35
|
+
const HEIGHT = 400;
|
|
36
|
+
const SANS = "system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif";
|
|
37
|
+
const MONO = 'ui-monospace, SFMono-Regular, Menlo, monospace';
|
|
38
|
+
const AGENT = { x: 330, y: 200, r: 42, uid: '01M8TC4K' };
|
|
39
|
+
/* The pause band, crossed by every thread. */
|
|
40
|
+
const BAND = { x: 538, y: 52, width: 30, height: 290 };
|
|
41
|
+
const BAND_X = BAND.x + BAND.width / 2;
|
|
42
|
+
/* The address labels, where the threads end. */
|
|
43
|
+
const CHIP = { x: 604, width: 160, height: 38 };
|
|
44
|
+
/* The places the agent is held. */
|
|
45
|
+
const TERMINAL = { x: 40, y: 58, width: 196, height: 118 };
|
|
46
|
+
const CLOUD = { x: 40, y: 226, width: 196, height: 116 };
|
|
47
|
+
/* Where the first thread forks. */
|
|
48
|
+
const FORK = [500, 104];
|
|
49
|
+
const THREAD_FIRST = [
|
|
50
|
+
[[370, 188], [420, 180], [450, FORK[1]], FORK],
|
|
51
|
+
[FORK, [540, FORK[1]], [556, 70], [CHIP.x, 70]],
|
|
52
|
+
];
|
|
53
|
+
const THREAD_FORK = [
|
|
54
|
+
THREAD_FIRST[0],
|
|
55
|
+
[FORK, [540, FORK[1]], [556, 150], [CHIP.x, 150]],
|
|
56
|
+
];
|
|
57
|
+
const THREAD_SECOND = [[[372, 204], [440, 204], [520, 240], [CHIP.x, 240]]];
|
|
58
|
+
const THREAD_THIRD = [[[366, 220], [420, 240], [480, 320], [CHIP.x, 320]]];
|
|
59
|
+
const cubic = ([a, b, c, d], t) => {
|
|
60
|
+
const u = 1 - t;
|
|
61
|
+
return [
|
|
62
|
+
u * u * u * a[0] + 3 * u * u * t * b[0] + 3 * u * t * t * c[0] + t * t * t * d[0],
|
|
63
|
+
u * u * u * a[1] + 3 * u * u * t * b[1] + 3 * u * t * t * c[1] + t * t * t * d[1],
|
|
64
|
+
];
|
|
65
|
+
};
|
|
66
|
+
/** The point of a segment at `x`, its x growing with t. */
|
|
67
|
+
const atX = (segment, x) => {
|
|
68
|
+
let lo = 0;
|
|
69
|
+
let hi = 1;
|
|
70
|
+
for (let i = 0; i < 24; i += 1) {
|
|
71
|
+
const mid = (lo + hi) / 2;
|
|
72
|
+
if (cubic(segment, mid)[0] < x)
|
|
73
|
+
lo = mid;
|
|
74
|
+
else
|
|
75
|
+
hi = mid;
|
|
76
|
+
}
|
|
77
|
+
return cubic(segment, (lo + hi) / 2);
|
|
78
|
+
};
|
|
79
|
+
const pathOf = (segments) => segments
|
|
80
|
+
.map(([a, b, c, d], i) => `${i === 0 ? `M${a[0]},${a[1]} ` : ''}C${b[0]},${b[1]} ${c[0]},${c[1]} ${d[0]},${d[1]}`)
|
|
81
|
+
.join(' ');
|
|
82
|
+
const round = (n) => Math.round(n * 10) / 10;
|
|
83
|
+
export function SvgSessions({ palette: paletteProp } = {}) {
|
|
84
|
+
const auto = useColorPalette();
|
|
85
|
+
const p = paletteProp ?? auto;
|
|
86
|
+
const id = useId().replace(/:/g, '');
|
|
87
|
+
const ref = (name) => `sessions-${id}-${name}`;
|
|
88
|
+
const agentInk = p.glow;
|
|
89
|
+
const pauseInk = p.isLight ? p.blaze : p.gold;
|
|
90
|
+
const threads = [
|
|
91
|
+
{
|
|
92
|
+
key: 'first',
|
|
93
|
+
title: 'Q4 figures',
|
|
94
|
+
session: '01M8TD2V',
|
|
95
|
+
short: 'TD2V',
|
|
96
|
+
ink: p.surge,
|
|
97
|
+
segments: THREAD_FIRST,
|
|
98
|
+
drawn: [THREAD_FIRST[1]],
|
|
99
|
+
turns: [[0, 0.3], [0, 0.72]],
|
|
100
|
+
end: 70,
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
key: 'fork',
|
|
104
|
+
title: 'Q4, by region',
|
|
105
|
+
session: '01M8TE7Q',
|
|
106
|
+
short: 'TE7Q',
|
|
107
|
+
ink: p.spark,
|
|
108
|
+
segments: THREAD_FORK,
|
|
109
|
+
drawn: [THREAD_FORK[1]],
|
|
110
|
+
turns: [[1, 0.78]],
|
|
111
|
+
end: 150,
|
|
112
|
+
fork: true,
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
key: 'second',
|
|
116
|
+
title: 'Customer complaint',
|
|
117
|
+
session: '01M8TF3N',
|
|
118
|
+
short: 'TF3N',
|
|
119
|
+
ink: p.pop,
|
|
120
|
+
segments: THREAD_SECOND,
|
|
121
|
+
drawn: THREAD_SECOND,
|
|
122
|
+
turns: [[0, 0.2], [0, 0.44], [0, 0.68]],
|
|
123
|
+
end: 240,
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
key: 'third',
|
|
127
|
+
title: 'Onboarding notes',
|
|
128
|
+
session: '01M8TG9X',
|
|
129
|
+
short: 'TG9X',
|
|
130
|
+
ink: p.isLight ? p.blaze : p.flame,
|
|
131
|
+
segments: THREAD_THIRD,
|
|
132
|
+
drawn: THREAD_THIRD,
|
|
133
|
+
turns: [[0, 0.28], [0, 0.5], [0, 0.7]],
|
|
134
|
+
end: 320,
|
|
135
|
+
},
|
|
136
|
+
];
|
|
137
|
+
const lineOpacity = p.isLight ? 0.85 : 0.7;
|
|
138
|
+
return (_jsxs("svg", { viewBox: `0 0 ${WIDTH} ${HEIGHT}`, xmlns: "http://www.w3.org/2000/svg", style: { width: '100%', height: 'auto', display: 'block' }, role: "img", "aria-labelledby": `${ref('title')} ${ref('desc')}`, children: [_jsx("title", { id: ref('title'), children: "Several sessions on one agent" }), _jsx("desc", { id: ref('desc'), children: "One agent holding four conversations, each with its own address made of the agent's identifier and the session's. The agent is held on a laptop's terminal and on Datalayer, and a session moves between them. One conversation forks into a second. Every conversation crosses a pause and comes out of the resume whole." }), _jsxs("defs", { children: [_jsx(LightBoostFilter, {}), _jsx("style", { children: `
|
|
139
|
+
@keyframes ${ref('turn')} {
|
|
140
|
+
0% { offset-distance: 0%; opacity: 0; }
|
|
141
|
+
8% { opacity: 1; }
|
|
142
|
+
88% { opacity: 1; }
|
|
143
|
+
100% { offset-distance: 100%; opacity: 0; }
|
|
144
|
+
}
|
|
145
|
+
@keyframes ${ref('spin')} { to { transform: rotate(360deg); } }
|
|
146
|
+
@keyframes ${ref('march')} { to { stroke-dashoffset: -18; } }
|
|
147
|
+
@keyframes ${ref('breathe')} { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
|
|
148
|
+
.${ref('dot')} { opacity: 0; animation: ${ref('turn')} 6.4s linear infinite; }
|
|
149
|
+
.${ref('ring')} { transform-origin: ${AGENT.x}px ${AGENT.y}px; animation: ${ref('spin')} 48s linear infinite; }
|
|
150
|
+
.${ref('link')} { animation: ${ref('march')} 1.8s linear infinite; }
|
|
151
|
+
.${ref('pause')} { animation: ${ref('breathe')} 3.2s ease-in-out infinite; }
|
|
152
|
+
@media (prefers-reduced-motion: reduce) {
|
|
153
|
+
.${ref('dot')}, .${ref('ring')}, .${ref('link')}, .${ref('pause')} { animation: none; }
|
|
154
|
+
}
|
|
155
|
+
` }), _jsxs("radialGradient", { id: ref('halo'), cx: "50%", cy: "50%", r: "50%", children: [_jsx("stop", { offset: "0%", stopColor: agentInk, stopOpacity: "0.38" }), _jsx("stop", { offset: "55%", stopColor: agentInk, stopOpacity: "0.08" }), _jsx("stop", { offset: "100%", stopColor: agentInk, stopOpacity: "0" })] }), _jsxs("radialGradient", { id: ref('wash-left'), cx: "18%", cy: "50%", r: "40%", children: [_jsx("stop", { offset: "0%", stopColor: p.pop, stopOpacity: "0.16" }), _jsx("stop", { offset: "100%", stopColor: p.pop, stopOpacity: "0" })] }), _jsxs("radialGradient", { id: ref('wash-right'), cx: "84%", cy: "40%", r: "42%", children: [_jsx("stop", { offset: "0%", stopColor: p.surge, stopOpacity: "0.16" }), _jsx("stop", { offset: "100%", stopColor: p.surge, stopOpacity: "0" })] }), _jsxs("linearGradient", { id: ref('band'), x1: "0", y1: "0", x2: "0", y2: "1", children: [_jsx("stop", { offset: "0%", stopColor: pauseInk, stopOpacity: "0" }), _jsx("stop", { offset: "20%", stopColor: pauseInk, stopOpacity: p.isLight ? '0.045' : '0.12' }), _jsx("stop", { offset: "80%", stopColor: pauseInk, stopOpacity: p.isLight ? '0.045' : '0.12' }), _jsx("stop", { offset: "100%", stopColor: pauseInk, stopOpacity: "0" })] }), _jsx("pattern", { id: ref('dots'), width: "24", height: "24", patternUnits: "userSpaceOnUse", children: _jsx("circle", { cx: "12", cy: "12", r: "0.9", fill: p.textMuted, opacity: p.isLight ? '0.22' : '0.16' }) })] }), _jsx("rect", { width: WIDTH, height: HEIGHT, fill: p.bg }), _jsx("rect", { width: WIDTH, height: HEIGHT, fill: `url(#${ref('dots')})` }), _jsx("rect", { width: WIDTH, height: HEIGHT, fill: `url(#${ref('wash-left')})` }), _jsx("rect", { width: WIDTH, height: HEIGHT, fill: `url(#${ref('wash-right')})` }), _jsxs("g", { filter: p.isLight ? 'url(#svgLightBoost)' : undefined, children: [_jsxs("g", { children: [_jsx("rect", { x: TERMINAL.x, y: TERMINAL.y, width: TERMINAL.width, height: TERMINAL.height, rx: "8", fill: p.bgPanel, stroke: agentInk, strokeOpacity: "0.45", strokeWidth: "1.2" }), _jsx("path", { d: `M${TERMINAL.x} ${TERMINAL.y + 8} a8 8 0 0 1 8 -8 h${TERMINAL.width - 16} a8 8 0 0 1 8 8 v10 h-${TERMINAL.width} Z`, fill: p.bgAlt }), [p.flame, p.gold, p.glow].map((c, i) => (_jsx("circle", { cx: TERMINAL.x + 12 + i * 10, cy: TERMINAL.y + 9, r: "2.6", fill: c, opacity: "0.75" }, i))), _jsx("text", { x: TERMINAL.x + TERMINAL.width - 10, y: TERMINAL.y + 12, fontFamily: MONO, fontSize: "8", fill: p.textMuted, textAnchor: "end", letterSpacing: "1", children: "LOCAL" }), _jsxs("text", { x: TERMINAL.x + 12, y: TERMINAL.y + 38, fontFamily: MONO, fontSize: "9.5", fill: p.textLight, children: [_jsx("tspan", { fill: agentInk, children: "$" }), " agent sessions ls"] }), threads.slice(0, 3).map((t, i) => (_jsxs("g", { fontFamily: MONO, fontSize: "9", children: [_jsx("text", { x: TERMINAL.x + 14, y: TERMINAL.y + 60 + i * 17, fill: t.ink, children: i === 0 ? '●' : '○' }), _jsx("text", { x: TERMINAL.x + 28, y: TERMINAL.y + 60 + i * 17, fill: p.textLight, opacity: "0.85", children: t.title }), _jsx("text", { x: TERMINAL.x + TERMINAL.width - 12, y: TERMINAL.y + 60 + i * 17, fill: p.textMuted, textAnchor: "end", children: t.short })] }, t.key)))] }), _jsxs("g", { stroke: agentInk, strokeWidth: "1.3", fill: "none", opacity: "0.8", children: [_jsx("line", { x1: "138", y1: "184", x2: "138", y2: "218", strokeDasharray: "3 3" }), _jsx("path", { d: "M134 189 L138 183 L142 189" }), _jsx("path", { d: "M134 213 L138 219 L142 213" })] }), _jsx("text", { x: "150", y: "204", fontFamily: MONO, fontSize: "9.5", fill: agentInk, children: "/transfer" }), _jsxs("g", { children: [_jsx("rect", { x: CLOUD.x, y: CLOUD.y, width: CLOUD.width, height: CLOUD.height, rx: "8", fill: p.bgPanel, stroke: agentInk, strokeOpacity: "0.45", strokeWidth: "1.2" }), _jsx("path", { d: "M62 300 h52 a14 14 0 0 0 0 -28 a20 20 0 0 0 -38 -6 a13 13 0 0 0 -14 34 Z", fill: agentInk, fillOpacity: "0.12", stroke: agentInk, strokeOpacity: "0.7", strokeWidth: "1.4", strokeLinejoin: "round" }), _jsx("text", { x: CLOUD.x + CLOUD.width - 10, y: CLOUD.y + 16, fontFamily: MONO, fontSize: "8", fill: p.textMuted, textAnchor: "end", letterSpacing: "1", children: "CLOUD" }), _jsx("text", { x: "140", y: "262", fontFamily: SANS, fontSize: "12.5", fontWeight: "600", fill: p.textLight, children: "Datalayer" }), _jsx("text", { x: "140", y: "277", fontFamily: MONO, fontSize: "8.5", fill: p.textMuted, children: "runtime" }), threads.map((t, i) => (_jsx("rect", { x: "140", y: 286 + i * 9, width: 72 - i * 12, height: "4", rx: "2", fill: t.ink, opacity: "0.75" }, t.key))), _jsx("text", { x: "62", y: "326", fontFamily: MONO, fontSize: "8.5", fill: p.textMuted, children: "same sessions" })] }), _jsxs("g", { fill: "none", stroke: agentInk, strokeWidth: "1.3", strokeOpacity: "0.55", strokeDasharray: "5 4", children: [_jsx("path", { className: ref('link'), d: `M${TERMINAL.x + TERMINAL.width} 117 C268 117 266 186 290 194` }), _jsx("path", { className: ref('link'), d: `M${CLOUD.x + CLOUD.width} 284 C268 284 266 214 290 206` })] }), _jsx("rect", { x: BAND.x, y: BAND.y, width: BAND.width, height: BAND.height, rx: BAND.width / 2, fill: `url(#${ref('band')})` }), _jsx("line", { x1: BAND_X, y1: BAND.y + 4, x2: BAND_X, y2: BAND.y + BAND.height - 4, stroke: pauseInk, strokeOpacity: "0.45", strokeWidth: "1", strokeDasharray: "2 4" }), _jsxs("g", { className: ref('pause'), children: [_jsx("circle", { cx: BAND_X, cy: "36", r: "10", fill: p.bgPanel, stroke: pauseInk, strokeWidth: "1.4" }), _jsx("rect", { x: BAND_X - 4, y: "31", width: "2.6", height: "10", rx: "1", fill: pauseInk }), _jsx("rect", { x: BAND_X + 1.4, y: "31", width: "2.6", height: "10", rx: "1", fill: pauseInk })] }), _jsx("text", { x: BAND_X + 16, y: "39", fontFamily: MONO, fontSize: "9", fill: pauseInk, children: "pause \u00B7 resume" }), _jsx("text", { x: BAND_X, y: "358", fontFamily: MONO, fontSize: "8.5", fill: p.textMuted, textAnchor: "middle", children: "kept whole" }), _jsx("path", { d: pathOf([THREAD_FIRST[0]]), fill: "none", stroke: threads[0].ink, strokeOpacity: lineOpacity, strokeWidth: "2.2", strokeLinecap: "round" }), threads.map((t) => (_jsx("path", { d: pathOf(t.drawn), fill: "none", stroke: t.ink, strokeOpacity: lineOpacity, strokeWidth: "2.2", strokeLinecap: "round" }, t.key))), threads.map((t) => t.turns.map(([s, at], i) => {
|
|
156
|
+
const [x, y] = cubic(t.segments[s], at);
|
|
157
|
+
return (_jsx("circle", { cx: round(x), cy: round(y), r: "3", fill: i % 2 === 0 ? t.ink : p.bg, stroke: t.ink, strokeWidth: "1.3" }, `${t.key}-${i}`));
|
|
158
|
+
})), threads.map((t) => {
|
|
159
|
+
const crossing = t.segments[t.segments.length - 1];
|
|
160
|
+
const [, y] = atX(crossing, BAND_X);
|
|
161
|
+
return (_jsxs("g", { children: [_jsx("circle", { cx: BAND_X, cy: round(y), r: "5.5", fill: p.bgPanel, stroke: t.ink, strokeWidth: "1.5" }), _jsx("circle", { cx: BAND_X, cy: round(y), r: "2", fill: t.ink })] }, `kept-${t.key}`));
|
|
162
|
+
}), _jsx("rect", { x: FORK[0] - 5, y: FORK[1] - 5, width: "10", height: "10", fill: p.bgPanel, stroke: threads[1].ink, strokeWidth: "1.6", transform: `rotate(45 ${FORK[0]} ${FORK[1]})` }), _jsx("text", { x: FORK[0] - 2, y: FORK[1] - 13, fontFamily: MONO, fontSize: "9", fill: threads[1].ink, textAnchor: "middle", children: "fork" }), threads.map((t, i) => (_jsx("circle", { className: ref('dot'), r: "3.4", fill: t.ink, style: { offsetPath: `path('${pathOf(t.segments)}')`, animationDelay: `${i * -1.6}s` } }, `travel-${t.key}`))), _jsx("circle", { cx: AGENT.x, cy: AGENT.y, r: "88", fill: `url(#${ref('halo')})` }), _jsx("circle", { className: ref('ring'), cx: AGENT.x, cy: AGENT.y, r: "55", fill: "none", stroke: agentInk, strokeOpacity: "0.45", strokeWidth: "1.2", strokeDasharray: "2 6" }), _jsx("circle", { cx: AGENT.x, cy: AGENT.y, r: AGENT.r, fill: p.bgPanel, stroke: agentInk, strokeWidth: "2" }), _jsx("text", { x: AGENT.x, y: AGENT.y - 3, fontFamily: SANS, fontSize: "11.5", fontWeight: "700", fill: agentInk, textAnchor: "middle", letterSpacing: "1.6", children: "AGENT" }), _jsx("text", { x: AGENT.x, y: AGENT.y + 12, fontFamily: MONO, fontSize: "9", fill: p.textMuted, textAnchor: "middle", children: AGENT.uid }), threads.map((t) => {
|
|
163
|
+
const top = t.end - CHIP.height / 2;
|
|
164
|
+
return (_jsxs("g", { children: [_jsx("rect", { x: CHIP.x, y: top, width: CHIP.width, height: CHIP.height, rx: "9", fill: p.bgPanel, stroke: t.ink, strokeOpacity: "0.6", strokeWidth: "1.2" }), _jsx("circle", { cx: CHIP.x + 12, cy: top + 13, r: "3.5", fill: t.ink }), _jsx("text", { x: CHIP.x + 21, y: top + 16.5, fontFamily: SANS, fontSize: "10.5", fontWeight: "600", fill: p.textLight, children: t.title }), t.fork ? (_jsxs("g", { children: [_jsx("rect", { x: CHIP.x + CHIP.width - 34, y: top + 6, width: "26", height: "13", rx: "6.5", fill: t.ink, fillOpacity: "0.18" }), _jsx("text", { x: CHIP.x + CHIP.width - 21, y: top + 15.5, fontFamily: MONO, fontSize: "8", fill: t.ink, textAnchor: "middle", children: "fork" })] })) : null, _jsxs("text", { x: CHIP.x + 10, y: top + 30, fontFamily: MONO, fontSize: "9.5", children: [_jsx("tspan", { fill: agentInk, children: AGENT.uid }), _jsx("tspan", { fill: p.textMuted, children: ":" }), _jsx("tspan", { fill: t.ink, children: t.session })] })] }, `chip-${t.key}`));
|
|
165
|
+
})] })] }));
|
|
166
|
+
}
|
|
167
|
+
export default SvgSessions;
|
package/lib/svg/gallery.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const DATALAYER_SVG_GALLERY: readonly ["SvgJupyterEmbed", "SvgAgentRuntimes", "SvgVSCodeExtension", "SvgBlogHero", "SvgPricingHero", "SvgContactHero", "SvgAgentsHomeHero", "SvgLoginHero", "SvgUsecasesHero", "SvgIntegrationsHero", "SvgPartnersHero", "SvgChangelogHero", "SvgAboutHero", "SvgCareersHero", "SvgCommunityHero", "SvgJoin", "SvgJoinConfirm", "SvgInvites", "SvgDiscord", "SvgTutorialsHero", "SvgResearchHero", "SvgEvalsHero", "SvgEventsHero", "SvgStarsHero", "SvgSpitfire", "SvgBlackSnake", "SvgKingKong", "SvgKingKong2", "SvgLinesLogo", "SvgOrganizationsAtScale", "SvgIndividualsAndTeams", "SvgAgentsHero", "SvgHorizonHero", "SvgLibraryHero", "SvgEarthHero", "SvgOg", "SvgPoppy1_0", "SvgOgStacked", "SvgLightHouse", "SvgDaytonaStartupGrid", "SvgFastA2ADonation", "SvgJupyterMcp", "SvgJupyterMcp2", "SvgOSAContributions", "SvgRadar", "SvgNotebookArtifact", "SvgDocumentArtifact", "SvgDeckArtifact", "SvgCellArtifact", "SvgCellOutputshotPlaceholder", "SvgLessonArtifact", "SvgExerciseArtifact", "SvgAssignmentArtifact", "SvgDataset", "SvgLines", "SvgPublication", "SvgPixel1", "SvgPixel2", "SvgSkubble", "SvgEricCharles", "SvgPrivacyHero", "SvgTermsHero", "SvgNotFound", "SvgUnauthorized", "SvgAI", "SvgAI2", "SvgAI3", "SvgDI", "SvgDla"];
|
|
1
|
+
export declare const DATALAYER_SVG_GALLERY: readonly ["SvgJupyterEmbed", "SvgAgentRuntimes", "SvgSessions", "SvgVSCodeExtension", "SvgBlogHero", "SvgPricingHero", "SvgContactHero", "SvgAgentsHomeHero", "SvgLoginHero", "SvgUsecasesHero", "SvgIntegrationsHero", "SvgPartnersHero", "SvgChangelogHero", "SvgAboutHero", "SvgCareersHero", "SvgCommunityHero", "SvgJoin", "SvgJoinConfirm", "SvgInvites", "SvgDiscord", "SvgTutorialsHero", "SvgResearchHero", "SvgEvalsHero", "SvgEventsHero", "SvgStarsHero", "SvgSpitfire", "SvgBlackSnake", "SvgKingKong", "SvgKingKong2", "SvgLinesLogo", "SvgOrganizationsAtScale", "SvgIndividualsAndTeams", "SvgAgentsHero", "SvgHorizonHero", "SvgLibraryHero", "SvgEarthHero", "SvgOg", "SvgPoppy1_0", "SvgOgStacked", "SvgLightHouse", "SvgDaytonaStartupGrid", "SvgFastA2ADonation", "SvgJupyterMcp", "SvgJupyterMcp2", "SvgOSAContributions", "SvgRadar", "SvgNotebookArtifact", "SvgDocumentArtifact", "SvgDeckArtifact", "SvgCellArtifact", "SvgCellOutputshotPlaceholder", "SvgLessonArtifact", "SvgExerciseArtifact", "SvgAssignmentArtifact", "SvgDataset", "SvgLines", "SvgPublication", "SvgPixel1", "SvgPixel2", "SvgSkubble", "SvgEricCharles", "SvgPrivacyHero", "SvgTermsHero", "SvgNotFound", "SvgUnauthorized", "SvgAI", "SvgAI2", "SvgAI3", "SvgDI", "SvgDla"];
|
|
2
2
|
export type DatalayerSvgGalleryName = (typeof DATALAYER_SVG_GALLERY)[number];
|
package/lib/svg/gallery.js
CHANGED
package/lib/svg/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { type ColorPalette, useColorPalette, useBlogColorPalette, SharedDefs, BgGrid, } from '@datalayer/primer-addons';
|
|
2
2
|
export { SvgJupyterEmbed } from './SvgJupyterEmbed';
|
|
3
3
|
export { SvgAgentRuntimes } from './SvgAgentRuntimes';
|
|
4
|
+
export { SvgSessions } from './SvgSessions';
|
|
4
5
|
export { SvgVSCodeExtension } from './SvgVSCodeExtension';
|
|
5
6
|
export { SvgBlogHero } from './SvgBlogHero';
|
|
6
7
|
export { SvgPricingHero } from './SvgPricingHero';
|
package/lib/svg/index.js
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
export { useColorPalette, useBlogColorPalette, SharedDefs, BgGrid, } from '@datalayer/primer-addons';
|
|
7
7
|
export { SvgJupyterEmbed } from './SvgJupyterEmbed';
|
|
8
8
|
export { SvgAgentRuntimes } from './SvgAgentRuntimes';
|
|
9
|
+
export { SvgSessions } from './SvgSessions';
|
|
9
10
|
export { SvgVSCodeExtension } from './SvgVSCodeExtension';
|
|
10
11
|
export { SvgBlogHero } from './SvgBlogHero';
|
|
11
12
|
export { SvgPricingHero } from './SvgPricingHero';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@datalayer/design",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"license": "CC-BY-4.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"watch:lib": "npm run copy:svg-assets && tsc -w"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@datalayer/icons-react": "^1.1.
|
|
31
|
+
"@datalayer/icons-react": "^1.1.4",
|
|
32
32
|
"@datalayer/primer-addons": "^1.0.48",
|
|
33
33
|
"@primer/css": "^21.5.1",
|
|
34
34
|
"@primer/octicons-react": "^19.42.0",
|