hydraloop-diagram-react 0.0.0 → 1.0.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/dist/flow-diagram.d.ts +11 -0
- package/dist/flow-diagram.js +513 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +3 -0
- package/dist/model.d.ts +320 -0
- package/dist/model.js +662 -0
- package/dist/styles.css +586 -0
- package/dist/version.d.ts +1 -0
- package/dist/version.js +1 -0
- package/license +15 -0
- package/package.json +39 -3
- package/readme.md +125 -0
package/dist/styles.css
ADDED
|
@@ -0,0 +1,586 @@
|
|
|
1
|
+
/* Styles of hydraloop-diagram-react: FlowDiagram, DiagramLegend and
|
|
2
|
+
FlowSummary. All class names, custom properties and keyframes are prefixed
|
|
3
|
+
with `hl-`.
|
|
4
|
+
|
|
5
|
+
The colors are custom properties on :root without specificity, so a host
|
|
6
|
+
page can override any of them, e.g. with its own theme:
|
|
7
|
+
|
|
8
|
+
:root {
|
|
9
|
+
--hl-bg: var(--background);
|
|
10
|
+
--hl-fg: var(--foreground);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
--hl-bg must match the background behind the diagram, as it fills the gaps
|
|
14
|
+
where pipes cross. The dark colors apply with `prefers-color-scheme: dark`
|
|
15
|
+
unless <html data-theme="light">, and with <html data-theme="dark">. The
|
|
16
|
+
diagram's text inherits the font, or uses --hl-font-family if it is set. */
|
|
17
|
+
|
|
18
|
+
:where(:root) {
|
|
19
|
+
--hl-bg: #ffffff;
|
|
20
|
+
--hl-fg: #171717;
|
|
21
|
+
--hl-muted: #666666;
|
|
22
|
+
--hl-subtle: #8f8f8f;
|
|
23
|
+
--hl-border: #ebebeb;
|
|
24
|
+
--hl-border-strong: #d4d4d4;
|
|
25
|
+
--hl-focus: #0070f3;
|
|
26
|
+
|
|
27
|
+
--hl-grey: #b26a00;
|
|
28
|
+
--hl-clean: #16893f;
|
|
29
|
+
--hl-mains: #0068d6;
|
|
30
|
+
--hl-waste: #8a5a3c;
|
|
31
|
+
--hl-air: #8f8f8f;
|
|
32
|
+
--hl-uv: #7c3aed;
|
|
33
|
+
--hl-pipe-idle: #e6e6e6;
|
|
34
|
+
--hl-pipe-open: #a8a8a8;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@media (prefers-color-scheme: dark) {
|
|
38
|
+
:where(:root:not([data-theme="light"])) {
|
|
39
|
+
--hl-bg: #0a0a0a;
|
|
40
|
+
--hl-fg: #ededed;
|
|
41
|
+
--hl-muted: #a1a1a1;
|
|
42
|
+
--hl-subtle: #707070;
|
|
43
|
+
--hl-border: #262626;
|
|
44
|
+
--hl-border-strong: #3d3d3d;
|
|
45
|
+
--hl-focus: #52a8ff;
|
|
46
|
+
|
|
47
|
+
--hl-grey: #f0a43a;
|
|
48
|
+
--hl-clean: #4cc274;
|
|
49
|
+
--hl-mains: #52a8ff;
|
|
50
|
+
--hl-waste: #93603b;
|
|
51
|
+
--hl-air: #8f8f8f;
|
|
52
|
+
--hl-uv: #a78bfa;
|
|
53
|
+
--hl-pipe-idle: #262626;
|
|
54
|
+
--hl-pipe-open: #5c5c5c;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
:where(:root[data-theme="dark"]) {
|
|
59
|
+
--hl-bg: #0a0a0a;
|
|
60
|
+
--hl-fg: #ededed;
|
|
61
|
+
--hl-muted: #a1a1a1;
|
|
62
|
+
--hl-subtle: #707070;
|
|
63
|
+
--hl-border: #262626;
|
|
64
|
+
--hl-border-strong: #3d3d3d;
|
|
65
|
+
--hl-focus: #52a8ff;
|
|
66
|
+
|
|
67
|
+
--hl-grey: #f0a43a;
|
|
68
|
+
--hl-clean: #4cc274;
|
|
69
|
+
--hl-mains: #52a8ff;
|
|
70
|
+
--hl-waste: #93603b;
|
|
71
|
+
--hl-air: #8f8f8f;
|
|
72
|
+
--hl-uv: #a78bfa;
|
|
73
|
+
--hl-pipe-idle: #262626;
|
|
74
|
+
--hl-pipe-open: #5c5c5c;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/* Pipes, tanks and legend swatches are colored by the kind of water */
|
|
78
|
+
.hl-kind-grey {
|
|
79
|
+
--hl-k: var(--hl-grey);
|
|
80
|
+
}
|
|
81
|
+
.hl-kind-clean {
|
|
82
|
+
--hl-k: var(--hl-clean);
|
|
83
|
+
}
|
|
84
|
+
.hl-kind-mains {
|
|
85
|
+
--hl-k: var(--hl-mains);
|
|
86
|
+
}
|
|
87
|
+
.hl-kind-waste {
|
|
88
|
+
--hl-k: var(--hl-waste);
|
|
89
|
+
}
|
|
90
|
+
.hl-kind-air {
|
|
91
|
+
--hl-k: var(--hl-air);
|
|
92
|
+
}
|
|
93
|
+
.hl-kind-uv {
|
|
94
|
+
--hl-k: var(--hl-uv);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
/* ── Legend and summary ─────────────────────────────────────────────────── */
|
|
98
|
+
|
|
99
|
+
.hl-flow-summary {
|
|
100
|
+
font-size: 14px;
|
|
101
|
+
margin: 8px 0 0;
|
|
102
|
+
font-variant-numeric: tabular-nums;
|
|
103
|
+
}
|
|
104
|
+
.hl-legend {
|
|
105
|
+
list-style: none;
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-wrap: wrap;
|
|
108
|
+
gap: 6px 20px;
|
|
109
|
+
margin: 0;
|
|
110
|
+
padding: 0;
|
|
111
|
+
font-size: 13px;
|
|
112
|
+
color: var(--hl-muted);
|
|
113
|
+
}
|
|
114
|
+
.hl-legend li {
|
|
115
|
+
display: inline-flex;
|
|
116
|
+
align-items: center;
|
|
117
|
+
gap: 8px;
|
|
118
|
+
}
|
|
119
|
+
.hl-legend-swatch {
|
|
120
|
+
display: inline-block;
|
|
121
|
+
width: 20px;
|
|
122
|
+
height: 6px;
|
|
123
|
+
border-radius: 3px;
|
|
124
|
+
background: var(--hl-k);
|
|
125
|
+
}
|
|
126
|
+
.hl-legend-swatch.is-idle {
|
|
127
|
+
background: var(--hl-pipe-idle);
|
|
128
|
+
}
|
|
129
|
+
.hl-legend-swatch.is-open {
|
|
130
|
+
background: var(--hl-pipe-open);
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.hl-flow-summary-label {
|
|
134
|
+
color: var(--hl-muted);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/* ── Flow diagram ───────────────────────────────────────────────────────── */
|
|
138
|
+
|
|
139
|
+
.hl-flow-diagram {
|
|
140
|
+
display: block;
|
|
141
|
+
width: 100%;
|
|
142
|
+
height: auto;
|
|
143
|
+
font-family: var(--hl-font-family, inherit);
|
|
144
|
+
}
|
|
145
|
+
.hl-flow-diagram [tabindex]:focus-visible {
|
|
146
|
+
outline: none;
|
|
147
|
+
}
|
|
148
|
+
.hl-flow-diagram
|
|
149
|
+
[tabindex]:focus-visible
|
|
150
|
+
> :is(circle, polygon, rect:not(.hl-hit)),
|
|
151
|
+
.hl-flow-diagram [tabindex]:focus-visible > .hl-valve-body > polygon {
|
|
152
|
+
stroke: var(--hl-focus);
|
|
153
|
+
stroke-width: 2.5;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.hl-pipe-base {
|
|
157
|
+
fill: none;
|
|
158
|
+
stroke: var(--hl-pipe-idle);
|
|
159
|
+
stroke-width: 7;
|
|
160
|
+
stroke-linecap: round;
|
|
161
|
+
stroke-linejoin: round;
|
|
162
|
+
}
|
|
163
|
+
.hl-pipe.is-square :is(.hl-pipe-base, .hl-pipe-water, .hl-pipe-flow) {
|
|
164
|
+
stroke-linecap: butt;
|
|
165
|
+
}
|
|
166
|
+
.hl-pipe.hl-kind-air .hl-pipe-base {
|
|
167
|
+
stroke-width: 5;
|
|
168
|
+
}
|
|
169
|
+
.hl-pipe.is-open .hl-pipe-base {
|
|
170
|
+
stroke: var(--hl-pipe-open);
|
|
171
|
+
}
|
|
172
|
+
.hl-pipe.is-filled .hl-pipe-base {
|
|
173
|
+
stroke: var(--hl-border-strong);
|
|
174
|
+
}
|
|
175
|
+
/* The same color as .hl-tank-fill over the tank's background */
|
|
176
|
+
.hl-pipe-water {
|
|
177
|
+
fill: none;
|
|
178
|
+
stroke: color-mix(in srgb, var(--hl-k) 16%, var(--hl-bg));
|
|
179
|
+
stroke-width: 4;
|
|
180
|
+
stroke-linecap: round;
|
|
181
|
+
}
|
|
182
|
+
.hl-pipe.is-active .hl-pipe-base {
|
|
183
|
+
stroke: var(--hl-k);
|
|
184
|
+
}
|
|
185
|
+
.hl-pipe.is-unknown .hl-pipe-base {
|
|
186
|
+
stroke: var(--hl-border-strong);
|
|
187
|
+
stroke-width: 3;
|
|
188
|
+
stroke-dasharray: 0.5 7;
|
|
189
|
+
}
|
|
190
|
+
.hl-pipe-flow {
|
|
191
|
+
fill: none;
|
|
192
|
+
stroke: var(--hl-bg);
|
|
193
|
+
stroke-opacity: 0.75;
|
|
194
|
+
stroke-width: 2.5;
|
|
195
|
+
stroke-linecap: round;
|
|
196
|
+
stroke-dasharray: 3 11;
|
|
197
|
+
animation: hl-flow 0.9s linear infinite;
|
|
198
|
+
}
|
|
199
|
+
.hl-pipe.is-filled .hl-pipe-flow {
|
|
200
|
+
stroke: var(--hl-k);
|
|
201
|
+
stroke-opacity: 0.45;
|
|
202
|
+
}
|
|
203
|
+
/* Inverted: the pipe is dark inside, with light gaps moving down. The gaps
|
|
204
|
+
keep the dashes' place, where T2's pressure rings pick them up */
|
|
205
|
+
.hl-pipe.hl-kind-air .hl-pipe-flow {
|
|
206
|
+
stroke-width: 2;
|
|
207
|
+
stroke-dasharray: 7 7;
|
|
208
|
+
animation-name: hl-flow-air;
|
|
209
|
+
}
|
|
210
|
+
/* Air held under pressure: the pattern stays, standing still */
|
|
211
|
+
.hl-pipe.is-still .hl-pipe-flow,
|
|
212
|
+
.hl-pressure.is-held .hl-pressure-ring {
|
|
213
|
+
animation: none;
|
|
214
|
+
}
|
|
215
|
+
.hl-pressure.is-held .hl-pressure-ring {
|
|
216
|
+
stroke-opacity: 0.3;
|
|
217
|
+
}
|
|
218
|
+
/* Air leaves through the release air pipe: the rings move in towards it */
|
|
219
|
+
.hl-pressure.is-venting .hl-pressure-ring {
|
|
220
|
+
animation-direction: reverse;
|
|
221
|
+
}
|
|
222
|
+
/* Water circulating through a tank: rings in the water's color, spreading
|
|
223
|
+
from where it enters and gathering towards where it leaves */
|
|
224
|
+
.hl-water-rings .hl-pressure-ring {
|
|
225
|
+
stroke: var(--hl-k);
|
|
226
|
+
}
|
|
227
|
+
.hl-water-rings.is-out .hl-pressure-ring {
|
|
228
|
+
animation-direction: reverse;
|
|
229
|
+
}
|
|
230
|
+
/* Where a pipe passes behind another: 3 px of background on either side of
|
|
231
|
+
the 7 px pipe in front */
|
|
232
|
+
.hl-pipe-gap {
|
|
233
|
+
stroke: var(--hl-bg);
|
|
234
|
+
stroke-width: 13;
|
|
235
|
+
}
|
|
236
|
+
.hl-pipe-arrow {
|
|
237
|
+
fill: var(--hl-pipe-idle);
|
|
238
|
+
}
|
|
239
|
+
.hl-pipe.is-open .hl-pipe-arrow {
|
|
240
|
+
fill: var(--hl-pipe-open);
|
|
241
|
+
}
|
|
242
|
+
.hl-pipe.is-active .hl-pipe-arrow {
|
|
243
|
+
fill: var(--hl-k);
|
|
244
|
+
}
|
|
245
|
+
.hl-pipe.is-unknown .hl-pipe-arrow {
|
|
246
|
+
fill: var(--hl-border-strong);
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
@keyframes hl-flow {
|
|
250
|
+
to {
|
|
251
|
+
stroke-dashoffset: -14;
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
@keyframes hl-flow-air {
|
|
255
|
+
from {
|
|
256
|
+
stroke-dashoffset: -5;
|
|
257
|
+
}
|
|
258
|
+
to {
|
|
259
|
+
stroke-dashoffset: -19;
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
.hl-hit {
|
|
264
|
+
fill: transparent;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.hl-valve polygon {
|
|
268
|
+
fill: var(--hl-bg);
|
|
269
|
+
stroke: var(--hl-muted);
|
|
270
|
+
stroke-width: 1.5;
|
|
271
|
+
stroke-linejoin: round;
|
|
272
|
+
}
|
|
273
|
+
.hl-valve-body {
|
|
274
|
+
transition: transform 0.3s ease;
|
|
275
|
+
}
|
|
276
|
+
/* Outlined, so an open valve stands out from its pipe without water */
|
|
277
|
+
.hl-valve.is-open polygon {
|
|
278
|
+
fill: var(--hl-pipe-open);
|
|
279
|
+
stroke: var(--hl-bg);
|
|
280
|
+
stroke-width: 1;
|
|
281
|
+
}
|
|
282
|
+
.hl-valve.is-flowing polygon {
|
|
283
|
+
fill: var(--hl-k);
|
|
284
|
+
stroke: var(--hl-k);
|
|
285
|
+
stroke-width: 1.5;
|
|
286
|
+
}
|
|
287
|
+
.hl-valve.is-unknown polygon {
|
|
288
|
+
stroke: var(--hl-subtle);
|
|
289
|
+
stroke-dasharray: 2 2;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/* A distributor is filled like its pipe where the water can flow through it,
|
|
293
|
+
the closed side is outlined like the idle pipe it would lead to */
|
|
294
|
+
.hl-distributor polygon {
|
|
295
|
+
fill: var(--hl-bg);
|
|
296
|
+
stroke: var(--hl-border-strong);
|
|
297
|
+
stroke-width: 1.5;
|
|
298
|
+
stroke-linejoin: round;
|
|
299
|
+
}
|
|
300
|
+
.hl-distributor polygon.is-closed {
|
|
301
|
+
stroke: var(--hl-pipe-idle);
|
|
302
|
+
stroke-width: 3;
|
|
303
|
+
}
|
|
304
|
+
.hl-distributor polygon.is-open {
|
|
305
|
+
fill: var(--hl-pipe-open);
|
|
306
|
+
stroke: none;
|
|
307
|
+
}
|
|
308
|
+
.hl-distributor polygon.is-flowing {
|
|
309
|
+
fill: var(--hl-k);
|
|
310
|
+
stroke: none;
|
|
311
|
+
}
|
|
312
|
+
.hl-distributor polygon.is-unknown {
|
|
313
|
+
stroke: var(--hl-subtle);
|
|
314
|
+
stroke-dasharray: 2 2;
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
.hl-pump-casing {
|
|
318
|
+
fill: var(--hl-bg);
|
|
319
|
+
stroke: var(--hl-muted);
|
|
320
|
+
stroke-width: 1.5;
|
|
321
|
+
}
|
|
322
|
+
.hl-impeller {
|
|
323
|
+
transform-box: fill-box;
|
|
324
|
+
transform-origin: center;
|
|
325
|
+
}
|
|
326
|
+
.hl-impeller-box {
|
|
327
|
+
fill: none;
|
|
328
|
+
}
|
|
329
|
+
.hl-impeller-blades {
|
|
330
|
+
fill: none;
|
|
331
|
+
stroke: var(--hl-muted);
|
|
332
|
+
stroke-width: 1.75;
|
|
333
|
+
stroke-linecap: round;
|
|
334
|
+
}
|
|
335
|
+
.hl-impeller-hub {
|
|
336
|
+
fill: var(--hl-muted);
|
|
337
|
+
}
|
|
338
|
+
.hl-pump.is-on .hl-pump-casing {
|
|
339
|
+
fill: var(--hl-k);
|
|
340
|
+
stroke: var(--hl-k);
|
|
341
|
+
}
|
|
342
|
+
.hl-pump.is-on .hl-impeller {
|
|
343
|
+
animation: hl-spin 1.2s linear infinite;
|
|
344
|
+
}
|
|
345
|
+
.hl-pump.is-on .hl-impeller-blades {
|
|
346
|
+
stroke: var(--hl-bg);
|
|
347
|
+
}
|
|
348
|
+
.hl-pump.is-on .hl-impeller-hub {
|
|
349
|
+
fill: var(--hl-bg);
|
|
350
|
+
}
|
|
351
|
+
.hl-pump.is-unknown .hl-pump-casing {
|
|
352
|
+
stroke: var(--hl-subtle);
|
|
353
|
+
stroke-dasharray: 2 2;
|
|
354
|
+
}
|
|
355
|
+
.hl-pump.is-unknown .hl-impeller-blades {
|
|
356
|
+
stroke: var(--hl-subtle);
|
|
357
|
+
}
|
|
358
|
+
.hl-pump.is-unknown .hl-impeller-hub {
|
|
359
|
+
fill: var(--hl-subtle);
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
@keyframes hl-spin {
|
|
363
|
+
to {
|
|
364
|
+
transform: rotate(360deg);
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.hl-tank-shell {
|
|
369
|
+
fill: var(--hl-bg);
|
|
370
|
+
stroke: var(--hl-border-strong);
|
|
371
|
+
stroke-width: 1.5;
|
|
372
|
+
}
|
|
373
|
+
.hl-tank-shell.is-unknown {
|
|
374
|
+
fill: url(#hl-hatch);
|
|
375
|
+
}
|
|
376
|
+
.hl-hatch-line {
|
|
377
|
+
stroke: var(--hl-border);
|
|
378
|
+
stroke-width: 2;
|
|
379
|
+
}
|
|
380
|
+
.hl-tank-fill {
|
|
381
|
+
fill: var(--hl-k);
|
|
382
|
+
fill-opacity: 0.16;
|
|
383
|
+
}
|
|
384
|
+
.hl-tank-surface {
|
|
385
|
+
stroke: var(--hl-k);
|
|
386
|
+
stroke-width: 2;
|
|
387
|
+
}
|
|
388
|
+
.hl-tank-surface.is-dashed {
|
|
389
|
+
stroke-dasharray: 4 3;
|
|
390
|
+
}
|
|
391
|
+
.hl-sensor circle {
|
|
392
|
+
fill: var(--hl-bg);
|
|
393
|
+
stroke: var(--hl-muted);
|
|
394
|
+
stroke-width: 1.5;
|
|
395
|
+
}
|
|
396
|
+
.hl-sensor.is-on circle {
|
|
397
|
+
fill: var(--hl-k);
|
|
398
|
+
stroke: var(--hl-k);
|
|
399
|
+
}
|
|
400
|
+
.hl-sensor.is-unknown circle {
|
|
401
|
+
stroke: var(--hl-subtle);
|
|
402
|
+
stroke-dasharray: 2 2;
|
|
403
|
+
}
|
|
404
|
+
.hl-tank-tick {
|
|
405
|
+
stroke: var(--hl-border-strong);
|
|
406
|
+
}
|
|
407
|
+
.hl-tank-label {
|
|
408
|
+
font-size: 16px;
|
|
409
|
+
font-weight: 600;
|
|
410
|
+
fill: var(--hl-fg);
|
|
411
|
+
}
|
|
412
|
+
.hl-tank-sub {
|
|
413
|
+
font-size: 13px;
|
|
414
|
+
font-weight: 400;
|
|
415
|
+
fill: var(--hl-muted);
|
|
416
|
+
}
|
|
417
|
+
.hl-tank-value {
|
|
418
|
+
font-size: 22px;
|
|
419
|
+
font-weight: 600;
|
|
420
|
+
fill: var(--hl-fg);
|
|
421
|
+
font-variant-numeric: tabular-nums;
|
|
422
|
+
letter-spacing: -0.01em;
|
|
423
|
+
}
|
|
424
|
+
.hl-tank-trend {
|
|
425
|
+
font-weight: 400;
|
|
426
|
+
fill: var(--hl-muted);
|
|
427
|
+
}
|
|
428
|
+
.hl-tank-meta {
|
|
429
|
+
font-size: 12.5px;
|
|
430
|
+
fill: var(--hl-muted);
|
|
431
|
+
font-variant-numeric: tabular-nums;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
.hl-bubbles circle {
|
|
435
|
+
fill: var(--hl-air);
|
|
436
|
+
animation: hl-rise 1.6s ease-in infinite;
|
|
437
|
+
opacity: 0;
|
|
438
|
+
}
|
|
439
|
+
@keyframes hl-rise {
|
|
440
|
+
0% {
|
|
441
|
+
transform: translateY(0);
|
|
442
|
+
opacity: 0;
|
|
443
|
+
}
|
|
444
|
+
20% {
|
|
445
|
+
opacity: 0.8;
|
|
446
|
+
}
|
|
447
|
+
100% {
|
|
448
|
+
transform: translateY(var(--hl-rise));
|
|
449
|
+
opacity: 0;
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
|
|
453
|
+
/* Water dripping from the upper exchange pipe onto T2's surface */
|
|
454
|
+
.hl-drips circle {
|
|
455
|
+
fill: var(--hl-k);
|
|
456
|
+
opacity: 0;
|
|
457
|
+
animation: hl-drip 0.9s ease-in infinite;
|
|
458
|
+
}
|
|
459
|
+
@keyframes hl-drip {
|
|
460
|
+
0% {
|
|
461
|
+
transform: translateY(0);
|
|
462
|
+
opacity: 0;
|
|
463
|
+
}
|
|
464
|
+
15%,
|
|
465
|
+
90% {
|
|
466
|
+
opacity: 0.8;
|
|
467
|
+
}
|
|
468
|
+
100% {
|
|
469
|
+
transform: translateY(var(--hl-fall));
|
|
470
|
+
opacity: 0;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/* Air pumped into T2 presses on the water. Same colors and rhythm as the air
|
|
475
|
+
pipe's .hl-pipe-flow */
|
|
476
|
+
.hl-pressure-fill {
|
|
477
|
+
fill: var(--hl-bg);
|
|
478
|
+
}
|
|
479
|
+
.hl-pressure-ring {
|
|
480
|
+
fill: none;
|
|
481
|
+
stroke: var(--hl-air);
|
|
482
|
+
stroke-opacity: 0.5;
|
|
483
|
+
stroke-width: 1.5;
|
|
484
|
+
vector-effect: non-scaling-stroke;
|
|
485
|
+
transform-box: fill-box;
|
|
486
|
+
transform-origin: center;
|
|
487
|
+
animation: hl-ripple linear infinite;
|
|
488
|
+
}
|
|
489
|
+
@keyframes hl-ripple {
|
|
490
|
+
from {
|
|
491
|
+
transform: scale(0);
|
|
492
|
+
}
|
|
493
|
+
to {
|
|
494
|
+
transform: scale(1);
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
/* Air leaving the release air pipe's open end, at the rings' pace. It fades
|
|
498
|
+
out by the air pump's radius, 13 of the circle's 14 px */
|
|
499
|
+
.hl-vent-ring {
|
|
500
|
+
fill: none;
|
|
501
|
+
stroke: var(--hl-air);
|
|
502
|
+
stroke-width: 1.5;
|
|
503
|
+
vector-effect: non-scaling-stroke;
|
|
504
|
+
transform-box: fill-box;
|
|
505
|
+
transform-origin: center;
|
|
506
|
+
animation: hl-vent 0.9s linear infinite;
|
|
507
|
+
}
|
|
508
|
+
@keyframes hl-vent {
|
|
509
|
+
from {
|
|
510
|
+
transform: scale(0);
|
|
511
|
+
opacity: 1;
|
|
512
|
+
}
|
|
513
|
+
92.857% {
|
|
514
|
+
opacity: 0;
|
|
515
|
+
}
|
|
516
|
+
to {
|
|
517
|
+
transform: scale(1);
|
|
518
|
+
opacity: 0;
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
.hl-diagram-label {
|
|
523
|
+
font-size: 13px;
|
|
524
|
+
fill: var(--hl-muted);
|
|
525
|
+
}
|
|
526
|
+
.hl-diagram-label.is-strong {
|
|
527
|
+
fill: var(--hl-fg);
|
|
528
|
+
font-weight: 500;
|
|
529
|
+
}
|
|
530
|
+
.hl-diagram-label.is-bold {
|
|
531
|
+
fill: var(--hl-fg);
|
|
532
|
+
font-weight: 700;
|
|
533
|
+
}
|
|
534
|
+
.hl-diagram-label.is-muted {
|
|
535
|
+
fill: var(--hl-subtle);
|
|
536
|
+
}
|
|
537
|
+
.hl-train-label {
|
|
538
|
+
font-size: 15px;
|
|
539
|
+
font-weight: 600;
|
|
540
|
+
fill: var(--hl-fg);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
.hl-uv rect {
|
|
544
|
+
fill: var(--hl-bg);
|
|
545
|
+
stroke: var(--hl-border-strong);
|
|
546
|
+
stroke-width: 1.5;
|
|
547
|
+
}
|
|
548
|
+
.hl-uv text {
|
|
549
|
+
font-size: 13px;
|
|
550
|
+
font-weight: 500;
|
|
551
|
+
fill: var(--hl-muted);
|
|
552
|
+
}
|
|
553
|
+
.hl-uv.is-on rect {
|
|
554
|
+
fill: var(--hl-uv);
|
|
555
|
+
stroke: var(--hl-uv);
|
|
556
|
+
}
|
|
557
|
+
.hl-uv.is-on text {
|
|
558
|
+
fill: #fff;
|
|
559
|
+
}
|
|
560
|
+
.hl-uv.is-unknown rect {
|
|
561
|
+
stroke-dasharray: 2 2;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
.hl-outlet.is-disconnected {
|
|
565
|
+
opacity: 0.4;
|
|
566
|
+
}
|
|
567
|
+
.hl-outlet.is-disconnected text {
|
|
568
|
+
text-decoration: line-through;
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
@media (prefers-reduced-motion: reduce) {
|
|
572
|
+
.hl-pipe-flow,
|
|
573
|
+
.hl-pipe.hl-kind-air .hl-pipe-flow,
|
|
574
|
+
.hl-pressure-ring,
|
|
575
|
+
.hl-pump.is-on .hl-impeller {
|
|
576
|
+
animation: none;
|
|
577
|
+
}
|
|
578
|
+
.hl-valve-body {
|
|
579
|
+
transition: none;
|
|
580
|
+
}
|
|
581
|
+
.hl-bubbles,
|
|
582
|
+
.hl-drips,
|
|
583
|
+
.hl-vent-ring {
|
|
584
|
+
display: none;
|
|
585
|
+
}
|
|
586
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VERSION = "1.0.1";
|
package/dist/version.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const VERSION = "1.0.1";
|
package/license
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
10
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
11
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
12
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
13
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
14
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
15
|
+
PERFORMANCE OF THIS SOFTWARE.
|
package/package.json
CHANGED
|
@@ -1,11 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hydraloop-diagram-react",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "React flow diagram of a Hydraloop H600, and the model that derives what the device is doing from its signals",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"import": "./dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"./model": {
|
|
12
|
+
"types": "./dist/model.d.ts",
|
|
13
|
+
"import": "./dist/model.js"
|
|
14
|
+
},
|
|
15
|
+
"./styles.css": "./dist/styles.css"
|
|
16
|
+
},
|
|
17
|
+
"main": "dist/index.js",
|
|
18
|
+
"types": "dist/index.d.ts",
|
|
19
|
+
"files": [
|
|
20
|
+
"dist/"
|
|
21
|
+
],
|
|
22
|
+
"sideEffects": [
|
|
23
|
+
"*.css"
|
|
24
|
+
],
|
|
25
|
+
"scripts": {
|
|
26
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && cp src/styles.css dist/styles.css",
|
|
27
|
+
"prepack": "npm run build"
|
|
28
|
+
},
|
|
29
|
+
"keywords": [
|
|
30
|
+
"hydraloop",
|
|
31
|
+
"h600",
|
|
32
|
+
"react",
|
|
33
|
+
"diagram",
|
|
34
|
+
"water",
|
|
35
|
+
"recycling",
|
|
36
|
+
"greywater"
|
|
37
|
+
],
|
|
5
38
|
"repository": {
|
|
6
39
|
"type": "git",
|
|
7
40
|
"url": "git+https://github.com/gr2m/hydraloop.git",
|
|
8
|
-
"directory": "packages/diagram-react"
|
|
41
|
+
"directory": "packages/hydraloop-diagram-react"
|
|
9
42
|
},
|
|
10
|
-
"license": "ISC"
|
|
43
|
+
"license": "ISC",
|
|
44
|
+
"peerDependencies": {
|
|
45
|
+
"react": ">=19"
|
|
46
|
+
}
|
|
11
47
|
}
|