@robosystems/core 0.21.7 → 0.22.1
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/README.md +20 -19
- package/graph-stage/Dust.d.ts +10 -0
- package/graph-stage/Dust.js +28 -0
- package/graph-stage/GraphGalaxies.d.ts +11 -0
- package/graph-stage/GraphGalaxies.js +47 -0
- package/graph-stage/GraphOrb.d.ts +6 -0
- package/graph-stage/GraphOrb.js +94 -0
- package/graph-stage/GraphStage.d.ts +10 -0
- package/graph-stage/GraphStage.js +24 -0
- package/graph-stage/GridFloor.d.ts +10 -0
- package/graph-stage/GridFloor.js +11 -0
- package/graph-stage/NodeGlow.d.ts +6 -0
- package/graph-stage/NodeGlow.js +22 -0
- package/graph-stage/graphGalaxy.d.ts +24 -0
- package/graph-stage/graphGalaxy.js +87 -0
- package/graph-stage/graphStageGl.d.ts +47 -0
- package/graph-stage/graphStageGl.js +389 -0
- package/graph-stage/index.d.ts +7 -0
- package/graph-stage/index.js +7 -0
- package/graph-stage/palette.d.ts +15 -0
- package/graph-stage/palette.js +40 -0
- package/package.json +1 -1
- package/styles/graph-stage.css +360 -0
|
@@ -0,0 +1,360 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The graph stage: the styles behind the pieces in graph-stage/ (the live graph, dust, orbs,
|
|
3
|
+
* galaxies, grid floor) and the node classes an app puts on its own cards and icons
|
|
4
|
+
* (`node-card`, `node-link`, `node-icon`). An app imports this once.
|
|
5
|
+
*
|
|
6
|
+
* Colour: three brand colours, each with a lighter shade, as space-separated RGB so they
|
|
7
|
+
* take an opacity (`rgb(var(--graph-1) / 0.4)`). These defaults are RoboSystems' cyan, blue
|
|
8
|
+
* and indigo; an app sets its own on :root after the import. --graph-1 is the lead colour:
|
|
9
|
+
* the dust, the floor, and the light on cards and icons.
|
|
10
|
+
*/
|
|
11
|
+
:root {
|
|
12
|
+
--graph-1: 34 211 238;
|
|
13
|
+
--graph-1-light: 103 232 249;
|
|
14
|
+
--graph-2: 59 122 245;
|
|
15
|
+
--graph-2-light: 97 166 250;
|
|
16
|
+
--graph-3: 99 102 241;
|
|
17
|
+
--graph-3-light: 129 140 248;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/* Orbs and galaxies: each floats on one of two slow paths and turns at its own pace (the
|
|
21
|
+
component sets the duration and direction). */
|
|
22
|
+
@keyframes graph-float-a {
|
|
23
|
+
50% {
|
|
24
|
+
transform: translate(20px, -40px);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
@keyframes graph-float-b {
|
|
29
|
+
50% {
|
|
30
|
+
transform: translate(-15px, 30px);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@keyframes graph-turn {
|
|
35
|
+
to {
|
|
36
|
+
transform: rotate(360deg);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.graph-float-a {
|
|
41
|
+
animation: graph-float-a 8s ease-in-out infinite;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.graph-float-b {
|
|
45
|
+
animation: graph-float-b 10s ease-in-out infinite;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.graph-turn {
|
|
49
|
+
animation: graph-turn 300s linear infinite;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/* The dust backdrop (Dust.tsx): each layer is a tile of points masking the lead colour, and
|
|
53
|
+
rises by exactly one tile, so the loop has no seam. */
|
|
54
|
+
.graph-dust {
|
|
55
|
+
background-color: rgb(var(--graph-1));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
@keyframes graph-dust-near {
|
|
59
|
+
to {
|
|
60
|
+
transform: translateY(-900px);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@keyframes graph-dust-far {
|
|
65
|
+
to {
|
|
66
|
+
transform: translateY(-620px);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.graph-dust-near {
|
|
71
|
+
animation: graph-dust-near 150s linear infinite;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.graph-dust-far {
|
|
75
|
+
animation: graph-dust-far 260s linear infinite;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/* The grid floor (GridFloor.tsx). */
|
|
79
|
+
.graph-floor {
|
|
80
|
+
transform: perspective(900px) rotateX(62deg);
|
|
81
|
+
background-image:
|
|
82
|
+
linear-gradient(rgb(var(--graph-1) / 0.6) 2.5px, transparent 2.5px),
|
|
83
|
+
linear-gradient(90deg, rgb(var(--graph-1) / 0.55) 1px, transparent 1px);
|
|
84
|
+
background-size: 80px 80px;
|
|
85
|
+
-webkit-mask-image: linear-gradient(to top, black, transparent 96%);
|
|
86
|
+
mask-image: linear-gradient(to top, black, transparent 96%);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/* A card as a node (NodeGlow.tsx tells it where the pointer is). Every node card wears the
|
|
90
|
+
mark the hubs wear in the galaxies, a white point in a thin ring, in its top right corner.
|
|
91
|
+
Under the pointer a soft light spreads inside the card, its edge lights up nearest the
|
|
92
|
+
pointer and the mark brightens, as a node does when it is picked out of a graph.
|
|
93
|
+
--lit runs 0 to 1 with the hover; registering it lets it be eased. */
|
|
94
|
+
@property --lit {
|
|
95
|
+
syntax: '<number>';
|
|
96
|
+
inherits: true;
|
|
97
|
+
initial-value: 0;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.node-card {
|
|
101
|
+
--lit: 0;
|
|
102
|
+
--mark: calc(100% - 18px) 18px;
|
|
103
|
+
position: relative;
|
|
104
|
+
isolation: isolate;
|
|
105
|
+
transition: --lit 0.35s ease;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.node-card:hover {
|
|
109
|
+
--lit: 1;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.node-card::before,
|
|
113
|
+
.node-card::after {
|
|
114
|
+
content: '';
|
|
115
|
+
position: absolute;
|
|
116
|
+
inset: 0;
|
|
117
|
+
border-radius: inherit;
|
|
118
|
+
pointer-events: none;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.node-card::before {
|
|
122
|
+
z-index: -1;
|
|
123
|
+
background:
|
|
124
|
+
radial-gradient(
|
|
125
|
+
circle at var(--mark),
|
|
126
|
+
rgb(255 255 255 / calc(0.5 + 0.5 * var(--lit))) 0 2.4px,
|
|
127
|
+
transparent 3.2px
|
|
128
|
+
),
|
|
129
|
+
radial-gradient(
|
|
130
|
+
circle at var(--mark),
|
|
131
|
+
transparent 0 5.6px,
|
|
132
|
+
rgb(var(--graph-1-light) / calc(0.28 + 0.6 * var(--lit))) 5.6px 6.5px,
|
|
133
|
+
transparent 7.3px
|
|
134
|
+
),
|
|
135
|
+
radial-gradient(
|
|
136
|
+
circle at var(--mark),
|
|
137
|
+
rgb(var(--graph-1) / calc(0.4 * var(--lit))),
|
|
138
|
+
transparent 26px
|
|
139
|
+
),
|
|
140
|
+
radial-gradient(
|
|
141
|
+
460px circle at var(--mx, 50%) var(--my, 0%),
|
|
142
|
+
rgb(var(--graph-1) / calc(0.15 * var(--lit))),
|
|
143
|
+
rgb(var(--graph-2) / calc(0.06 * var(--lit))) 45%,
|
|
144
|
+
transparent 68%
|
|
145
|
+
);
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
.node-card::after {
|
|
149
|
+
padding: 1px;
|
|
150
|
+
background: radial-gradient(
|
|
151
|
+
320px circle at var(--mx, 50%) var(--my, 0%),
|
|
152
|
+
rgb(var(--graph-1-light) / calc(0.95 * var(--lit))),
|
|
153
|
+
rgb(var(--graph-1) / calc(0.35 * var(--lit))) 45%,
|
|
154
|
+
transparent 72%
|
|
155
|
+
);
|
|
156
|
+
-webkit-mask:
|
|
157
|
+
linear-gradient(#000 0 0) content-box,
|
|
158
|
+
linear-gradient(#000 0 0);
|
|
159
|
+
-webkit-mask-composite: xor;
|
|
160
|
+
mask:
|
|
161
|
+
linear-gradient(#000 0 0) content-box exclude,
|
|
162
|
+
linear-gradient(#000 0 0);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
/* An icon inside a node: the glyph sits in a small ball of linked points, the same sphere
|
|
166
|
+
the sections hang at their edges, so a card is a node and its icon is the graph inside
|
|
167
|
+
it. The ball is two images, its links (a mask over the lead colour) and its points
|
|
168
|
+
(white), both shown only near the rim so the glyph stays clear, turning slowly together.
|
|
169
|
+
Inside a node card it brightens with the card. */
|
|
170
|
+
.node-icon {
|
|
171
|
+
--node-links: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%22-1.08 -1.08 2.16 2.16%22%3E%3Cg stroke=%22%23000%22 stroke-width=%22.022%22%3E%3Cpath d=%22M0.00 0.96L-0.10 0.83%22 opacity=%220.62%22/%3E%3Cpath d=%22M0.00 0.96L-0.17 0.97%22 opacity=%220.43%22/%3E%3Cpath d=%22M0.00 0.96L0.48 0.75%22 opacity=%220.59%22/%3E%3Cpath d=%22M-0.10 0.83L-0.58 0.71%22 opacity=%220.66%22/%3E%3Cpath d=%22M-0.10 0.83L0.16 0.47%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.17 0.97L0.33 0.88%22 opacity=%220.24%22/%3E%3Cpath d=%22M-0.17 0.97L-0.63 0.74%22 opacity=%220.28%22/%3E%3Cpath d=%22M0.48 0.75L0.16 0.47%22 opacity=%220.70%22/%3E%3Cpath d=%22M0.48 0.75L0.80 0.60%22 opacity=%220.53%22/%3E%3Cpath d=%22M-0.58 0.71L-0.53 0.34%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.58 0.71L-0.92 0.38%22 opacity=%220.52%22/%3E%3Cpath d=%22M0.33 0.88L-0.05 0.71%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.33 0.88L0.72 0.49%22 opacity=%220.14%22/%3E%3Cpath d=%22M0.16 0.47L0.64 0.24%22 opacity=%220.70%22/%3E%3Cpath d=%22M0.16 0.47L-0.12 0.00%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.63 0.74L-0.92 0.38%22 opacity=%220.34%22/%3E%3Cpath d=%22M-0.63 0.74L-0.56 0.44%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.80 0.60L0.72 0.49%22 opacity=%220.26%22/%3E%3Cpath d=%22M0.80 0.60L0.96 0.12%22 opacity=%220.47%22/%3E%3Cpath d=%22M-0.53 0.34L-0.12 0.00%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.53 0.34L-0.85 -0.02%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.05 0.71L-0.56 0.44%22 opacity=%220.13%22/%3E%3Cpath d=%22M-0.05 0.71L0.29 0.34%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.64 0.24L0.96 0.12%22 opacity=%220.66%22/%3E%3Cpath d=%22M0.64 0.24L0.43 -0.23%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.92 0.38L-0.85 -0.02%22 opacity=%220.55%22/%3E%3Cpath d=%22M-0.92 0.38L-0.92 0.08%22 opacity=%220.30%22/%3E%3Cpath d=%22M0.72 0.49L0.29 0.34%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.72 0.49L0.93 0.02%22 opacity=%220.14%22/%3E%3Cpath d=%22M-0.12 0.00L0.43 -0.23%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.12 0.00L-0.45 -0.37%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.56 0.44L-0.26 0.09%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.96 0.12L0.82 -0.37%22 opacity=%220.58%22/%3E%3Cpath d=%22M-0.85 -0.02L-0.94 -0.32%22 opacity=%220.56%22/%3E%3Cpath d=%22M0.29 0.34L0.57 -0.11%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.43 -0.23L0.09 -0.63%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.92 0.08L-0.94 -0.32%22 opacity=%220.30%22/%3E%3Cpath d=%22M-0.92 0.08L-0.67 -0.25%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.93 0.02L0.57 -0.11%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.93 0.02L0.87 -0.47%22 opacity=%220.24%22/%3E%3Cpath d=%22M-0.45 -0.37L0.09 -0.63%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.45 -0.37L-0.62 -0.68%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.26 0.09L-0.67 -0.25%22 opacity=%220.13%22/%3E%3Cpath d=%22M-0.26 0.09L0.07 -0.34%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.82 -0.37L0.87 -0.47%22 opacity=%220.47%22/%3E%3Cpath d=%22M0.82 -0.37L0.47 -0.78%22 opacity=%220.62%22/%3E%3Cpath d=%22M-0.94 -0.32L-0.62 -0.68%22 opacity=%220.52%22/%3E%3Cpath d=%22M-0.94 -0.32L-0.71 -0.63%22 opacity=%220.32%22/%3E%3Cpath d=%22M0.57 -0.11L0.07 -0.34%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.57 -0.11L0.56 -0.61%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.09 -0.63L0.47 -0.78%22 opacity=%220.70%22/%3E%3Cpath d=%22M0.09 -0.63L-0.15 -0.93%22 opacity=%220.70%22/%3E%3Cpath d=%22M-0.67 -0.25L-0.71 -0.63%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.87 -0.47L0.56 -0.61%22 opacity=%220.18%22/%3E%3Cpath d=%22M-0.62 -0.68L-0.15 -0.93%22 opacity=%220.59%22/%3E%3Cpath d=%22M0.07 -0.34L-0.25 -0.68%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.47 -0.78L0.41 -0.90%22 opacity=%220.47%22/%3E%3Cpath d=%22M-0.71 -0.63L-0.25 -0.68%22 opacity=%220.13%22/%3E%3Cpath d=%22M-0.71 -0.63L-0.29 -0.95%22 opacity=%220.25%22/%3E%3Cpath d=%22M0.56 -0.61L0.41 -0.90%22 opacity=%220.20%22/%3E%3Cpath d=%22M-0.15 -0.93L-0.29 -0.95%22 opacity=%220.44%22/%3E%3Cpath d=%22M-0.25 -0.68L0.00 -0.96%22 opacity=%220.13%22/%3E%3Cpath d=%22M0.41 -0.90L0.00 -0.96%22 opacity=%220.27%22/%3E%3Cpath d=%22M-0.29 -0.95L0.00 -0.96%22 opacity=%220.26%22/%3E%3C/g%3E%3C/svg%3E');
|
|
172
|
+
--node-points: url('data:image/svg+xml,%3Csvg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%22-1.08 -1.08 2.16 2.16%22%3E%3Cg fill=%22%23fff%22%3E%3Ccircle cx=%220.00%22 cy=%220.96%22 r=%22.04%22 opacity=%220.78%22/%3E%3Ccircle cx=%22-0.10%22 cy=%220.83%22 r=%22.04%22 opacity=%221.00%22/%3E%3Ccircle cx=%22-0.17%22 cy=%220.97%22 r=%22.04%22 opacity=%220.44%22/%3E%3Ccircle cx=%220.48%22 cy=%220.75%22 r=%22.04%22 opacity=%220.92%22/%3E%3Ccircle cx=%22-0.58%22 cy=%220.71%22 r=%22.04%22 opacity=%220.88%22/%3E%3Ccircle cx=%220.33%22 cy=%220.88%22 r=%22.04%22 opacity=%220.26%22/%3E%3Ccircle cx=%220.16%22 cy=%220.47%22 r=%22.04%22 opacity=%221.00%22/%3E%3Ccircle cx=%22-0.63%22 cy=%220.74%22 r=%22.04%22 opacity=%220.36%22/%3E%3Ccircle cx=%220.80%22 cy=%220.60%22 r=%22.04%22 opacity=%220.60%22/%3E%3Ccircle cx=%22-0.53%22 cy=%220.34%22 r=%22.04%22 opacity=%221.00%22/%3E%3Ccircle cx=%22-0.05%22 cy=%220.71%22 r=%22.04%22 opacity=%220.18%22/%3E%3Ccircle cx=%220.64%22 cy=%220.24%22 r=%22.04%22 opacity=%221.00%22/%3E%3Ccircle cx=%22-0.92%22 cy=%220.38%22 r=%22.04%22 opacity=%220.61%22/%3E%3Ccircle cx=%220.72%22 cy=%220.49%22 r=%22.04%22 opacity=%220.18%22/%3E%3Ccircle cx=%22-0.12%22 cy=%220.00%22 r=%22.04%22 opacity=%221.00%22/%3E%3Ccircle cx=%22-0.56%22 cy=%220.44%22 r=%22.04%22 opacity=%220.18%22/%3E%3Ccircle cx=%220.96%22 cy=%220.12%22 r=%22.04%22 opacity=%220.75%22/%3E%3Ccircle cx=%22-0.85%22 cy=%22-0.02%22 r=%22.04%22 opacity=%220.97%22/%3E%3Ccircle cx=%220.29%22 cy=%220.34%22 r=%22.04%22 opacity=%220.18%22/%3E%3Ccircle cx=%220.43%22 cy=%22-0.23%22 r=%22.04%22 opacity=%221.00%22/%3E%3Ccircle cx=%22-0.92%22 cy=%220.08%22 r=%22.04%22 opacity=%220.25%22/%3E%3Ccircle cx=%220.93%22 cy=%220.02%22 r=%22.04%22 opacity=%220.26%22/%3E%3Ccircle cx=%22-0.45%22 cy=%22-0.37%22 r=%22.04%22 opacity=%221.00%22/%3E%3Ccircle cx=%22-0.26%22 cy=%220.09%22 r=%22.04%22 opacity=%220.18%22/%3E%3Ccircle cx=%220.82%22 cy=%22-0.37%22 r=%22.04%22 opacity=%220.90%22/%3E%3Ccircle cx=%22-0.94%22 cy=%22-0.32%22 r=%22.04%22 opacity=%220.62%22/%3E%3Ccircle cx=%220.57%22 cy=%22-0.11%22 r=%22.04%22 opacity=%220.18%22/%3E%3Ccircle cx=%220.09%22 cy=%22-0.63%22 r=%22.04%22 opacity=%221.00%22/%3E%3Ccircle cx=%22-0.67%22 cy=%22-0.25%22 r=%22.04%22 opacity=%220.18%22/%3E%3Ccircle cx=%220.87%22 cy=%22-0.47%22 r=%22.04%22 opacity=%220.43%22/%3E%3Ccircle cx=%22-0.62%22 cy=%22-0.68%22 r=%22.04%22 opacity=%220.88%22/%3E%3Ccircle cx=%220.07%22 cy=%22-0.34%22 r=%22.04%22 opacity=%220.18%22/%3E%3Ccircle cx=%220.47%22 cy=%22-0.78%22 r=%22.04%22 opacity=%220.88%22/%3E%3Ccircle cx=%22-0.71%22 cy=%22-0.63%22 r=%22.04%22 opacity=%220.30%22/%3E%3Ccircle cx=%220.56%22 cy=%22-0.61%22 r=%22.04%22 opacity=%220.18%22/%3E%3Ccircle cx=%22-0.15%22 cy=%22-0.93%22 r=%22.04%22 opacity=%220.83%22/%3E%3Ccircle cx=%22-0.25%22 cy=%22-0.68%22 r=%22.04%22 opacity=%220.18%22/%3E%3Ccircle cx=%220.41%22 cy=%22-0.90%22 r=%22.04%22 opacity=%220.46%22/%3E%3Ccircle cx=%22-0.29%22 cy=%22-0.95%22 r=%22.04%22 opacity=%220.43%22/%3E%3Ccircle cx=%220.00%22 cy=%22-0.96%22 r=%22.04%22 opacity=%220.32%22/%3E%3C/g%3E%3C/svg%3E');
|
|
173
|
+
--node-rim: radial-gradient(circle, transparent 42%, #000 74%);
|
|
174
|
+
position: relative;
|
|
175
|
+
isolation: isolate;
|
|
176
|
+
border-radius: 9999px;
|
|
177
|
+
color: color-mix(in srgb, rgb(var(--graph-1-light)) 35%, white);
|
|
178
|
+
background: radial-gradient(
|
|
179
|
+
circle at 36% 30%,
|
|
180
|
+
rgb(var(--graph-1) / 0.24),
|
|
181
|
+
rgb(var(--graph-2) / 0.12) 55%,
|
|
182
|
+
rgb(4 7 12 / 0.5)
|
|
183
|
+
);
|
|
184
|
+
box-shadow:
|
|
185
|
+
inset 0 0 0 1px rgb(var(--graph-1-light) / calc(0.3 + 0.5 * var(--lit, 0))),
|
|
186
|
+
0 0 calc(4px + 16px * var(--lit, 0))
|
|
187
|
+
rgb(var(--graph-1) / calc(0.1 + 0.45 * var(--lit, 0)));
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
.node-icon svg {
|
|
191
|
+
color: color-mix(in srgb, rgb(var(--graph-1-light)) 35%, white);
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
.node-icon::before,
|
|
195
|
+
.node-icon::after {
|
|
196
|
+
content: '';
|
|
197
|
+
position: absolute;
|
|
198
|
+
inset: -2px;
|
|
199
|
+
z-index: -1;
|
|
200
|
+
border-radius: inherit;
|
|
201
|
+
opacity: calc(0.55 + 0.45 * var(--lit, 0));
|
|
202
|
+
animation: graph-turn 70s linear infinite;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.node-icon::before {
|
|
206
|
+
background: rgb(var(--graph-1-light));
|
|
207
|
+
-webkit-mask:
|
|
208
|
+
var(--node-links) center / 100% no-repeat,
|
|
209
|
+
var(--node-rim);
|
|
210
|
+
-webkit-mask-composite: source-in;
|
|
211
|
+
mask:
|
|
212
|
+
var(--node-links) center / 100% no-repeat intersect,
|
|
213
|
+
var(--node-rim);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.node-icon::after {
|
|
217
|
+
background: var(--node-points) center / 100% no-repeat;
|
|
218
|
+
-webkit-mask: var(--node-rim);
|
|
219
|
+
mask: var(--node-rim);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/* A link between two node cards (a span inside the first): a thin line across the gap to
|
|
223
|
+
the next card, with a port at each end. It runs sideways where the cards sit in a row
|
|
224
|
+
(from md, or from lg with `node-link-lg` beside it) and downward where they stack. When
|
|
225
|
+
either card it joins is under the pointer, the line lights and a pulse travels along it. */
|
|
226
|
+
@property --on {
|
|
227
|
+
syntax: '<number>';
|
|
228
|
+
inherits: true;
|
|
229
|
+
initial-value: 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.node-link {
|
|
233
|
+
--on: 0;
|
|
234
|
+
position: absolute;
|
|
235
|
+
top: 100%;
|
|
236
|
+
left: 50%;
|
|
237
|
+
width: 1px;
|
|
238
|
+
height: var(--gap, 1.5rem);
|
|
239
|
+
pointer-events: none;
|
|
240
|
+
background: rgb(var(--graph-1-light) / calc(0.3 + 0.6 * var(--on)));
|
|
241
|
+
transition: --on 0.35s ease;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.node-link::before,
|
|
245
|
+
.node-link::after {
|
|
246
|
+
content: '';
|
|
247
|
+
position: absolute;
|
|
248
|
+
left: -2px;
|
|
249
|
+
width: 5px;
|
|
250
|
+
height: 5px;
|
|
251
|
+
border-radius: 9999px;
|
|
252
|
+
background: rgb(255 255 255 / calc(0.55 + 0.45 * var(--on)));
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.node-link::before {
|
|
256
|
+
top: -3px;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.node-link::after {
|
|
260
|
+
top: calc(100% - 2px);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.node-card:hover > .node-link,
|
|
264
|
+
.node-card:has(+ .node-card:hover) > .node-link {
|
|
265
|
+
--on: 1;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.node-link > i {
|
|
269
|
+
position: absolute;
|
|
270
|
+
left: -2px;
|
|
271
|
+
top: 0;
|
|
272
|
+
width: 5px;
|
|
273
|
+
height: 5px;
|
|
274
|
+
border-radius: 9999px;
|
|
275
|
+
background: #fff;
|
|
276
|
+
box-shadow: 0 0 8px 2px rgb(var(--graph-1) / 0.9);
|
|
277
|
+
opacity: var(--on);
|
|
278
|
+
animation: node-pulse-down 1.4s linear infinite;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@keyframes node-pulse-down {
|
|
282
|
+
to {
|
|
283
|
+
transform: translateY(var(--gap, 1.5rem));
|
|
284
|
+
}
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
@keyframes node-pulse-across {
|
|
288
|
+
to {
|
|
289
|
+
transform: translateX(var(--gap, 1.5rem));
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
@media (min-width: 768px) {
|
|
294
|
+
.node-link:not(.node-link-lg) {
|
|
295
|
+
top: 50%;
|
|
296
|
+
left: 100%;
|
|
297
|
+
width: var(--gap, 1.5rem);
|
|
298
|
+
height: 1px;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
.node-link:not(.node-link-lg)::before,
|
|
302
|
+
.node-link:not(.node-link-lg)::after {
|
|
303
|
+
top: -2px;
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
.node-link:not(.node-link-lg)::before {
|
|
307
|
+
left: -3px;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.node-link:not(.node-link-lg)::after {
|
|
311
|
+
left: calc(100% - 2px);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.node-link:not(.node-link-lg) > i {
|
|
315
|
+
left: 0;
|
|
316
|
+
top: -2px;
|
|
317
|
+
animation-name: node-pulse-across;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
@media (min-width: 1024px) {
|
|
322
|
+
.node-link-lg {
|
|
323
|
+
top: 50%;
|
|
324
|
+
left: 100%;
|
|
325
|
+
width: var(--gap, 1.5rem);
|
|
326
|
+
height: 1px;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.node-link-lg::before,
|
|
330
|
+
.node-link-lg::after {
|
|
331
|
+
top: -2px;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
.node-link-lg::before {
|
|
335
|
+
left: -3px;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
.node-link-lg::after {
|
|
339
|
+
left: calc(100% - 2px);
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
.node-link-lg > i {
|
|
343
|
+
left: 0;
|
|
344
|
+
top: -2px;
|
|
345
|
+
animation-name: node-pulse-across;
|
|
346
|
+
}
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
@media (prefers-reduced-motion: reduce) {
|
|
350
|
+
.graph-float-a,
|
|
351
|
+
.graph-float-b,
|
|
352
|
+
.graph-turn,
|
|
353
|
+
.graph-dust-near,
|
|
354
|
+
.graph-dust-far,
|
|
355
|
+
.node-icon::before,
|
|
356
|
+
.node-icon::after,
|
|
357
|
+
.node-link > i {
|
|
358
|
+
animation: none;
|
|
359
|
+
}
|
|
360
|
+
}
|