@vscada/primitives 0.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/.tsbuildinfo +1 -0
- package/dist/annotation/index.d.ts +9 -0
- package/dist/annotation/index.d.ts.map +1 -0
- package/dist/annotation/off-page/index.d.ts +3 -0
- package/dist/annotation/off-page/index.d.ts.map +1 -0
- package/dist/annotation/off-page/off-page.stories.d.ts +7 -0
- package/dist/annotation/off-page/off-page.stories.d.ts.map +1 -0
- package/dist/annotation/story-kit.d.ts +28 -0
- package/dist/annotation/story-kit.d.ts.map +1 -0
- package/dist/annotation.js +44 -0
- package/dist/base-CByO_2mM.js +87 -0
- package/dist/bevel-DnmDNvyc.js +14 -0
- package/dist/chrome/bevel.d.ts +21 -0
- package/dist/chrome/bevel.d.ts.map +1 -0
- package/dist/controls/index.d.ts +4 -0
- package/dist/controls/index.d.ts.map +1 -0
- package/dist/controls/motor-starter-panel/index.d.ts +4 -0
- package/dist/controls/motor-starter-panel/index.d.ts.map +1 -0
- package/dist/controls/motor-starter-panel/motor-starter-panel.stories.d.ts +10 -0
- package/dist/controls/motor-starter-panel/motor-starter-panel.stories.d.ts.map +1 -0
- package/dist/controls/pushbutton/index.d.ts +4 -0
- package/dist/controls/pushbutton/index.d.ts.map +1 -0
- package/dist/controls/pushbutton/pushbutton.stories.d.ts +7 -0
- package/dist/controls/pushbutton/pushbutton.stories.d.ts.map +1 -0
- package/dist/controls/selector-switch/index.d.ts +4 -0
- package/dist/controls/selector-switch/index.d.ts.map +1 -0
- package/dist/controls/selector-switch/selector-switch.stories.d.ts +8 -0
- package/dist/controls/selector-switch/selector-switch.stories.d.ts.map +1 -0
- package/dist/controls/story-kit.d.ts +31 -0
- package/dist/controls/story-kit.d.ts.map +1 -0
- package/dist/controls.js +149 -0
- package/dist/conveyance/conveyor/conveyor.stories.d.ts +9 -0
- package/dist/conveyance/conveyor/conveyor.stories.d.ts.map +1 -0
- package/dist/conveyance/conveyor/index.d.ts +4 -0
- package/dist/conveyance/conveyor/index.d.ts.map +1 -0
- package/dist/conveyance/duct/duct.stories.d.ts +7 -0
- package/dist/conveyance/duct/duct.stories.d.ts.map +1 -0
- package/dist/conveyance/duct/index.d.ts +4 -0
- package/dist/conveyance/duct/index.d.ts.map +1 -0
- package/dist/conveyance/index.d.ts +5 -0
- package/dist/conveyance/index.d.ts.map +1 -0
- package/dist/conveyance/pipe/dash.d.ts +28 -0
- package/dist/conveyance/pipe/dash.d.ts.map +1 -0
- package/dist/conveyance/pipe/flange.d.ts +9 -0
- package/dist/conveyance/pipe/flange.d.ts.map +1 -0
- package/dist/conveyance/pipe/index.d.ts +3 -0
- package/dist/conveyance/pipe/index.d.ts.map +1 -0
- package/dist/conveyance/pipe/wave.d.ts +29 -0
- package/dist/conveyance/pipe/wave.d.ts.map +1 -0
- package/dist/conveyance/screw-feeder/index.d.ts +4 -0
- package/dist/conveyance/screw-feeder/index.d.ts.map +1 -0
- package/dist/conveyance/screw-feeder/screw-feeder.stories.d.ts +7 -0
- package/dist/conveyance/screw-feeder/screw-feeder.stories.d.ts.map +1 -0
- package/dist/conveyance/story-kit.d.ts +28 -0
- package/dist/conveyance/story-kit.d.ts.map +1 -0
- package/dist/conveyance.js +345 -0
- package/dist/electrical/base.d.ts +54 -0
- package/dist/electrical/base.d.ts.map +1 -0
- package/dist/electrical/breaker/breaker.stories.d.ts +9 -0
- package/dist/electrical/breaker/breaker.stories.d.ts.map +1 -0
- package/dist/electrical/breaker/index.d.ts +4 -0
- package/dist/electrical/breaker/index.d.ts.map +1 -0
- package/dist/electrical/busbar/busbar.stories.d.ts +8 -0
- package/dist/electrical/busbar/busbar.stories.d.ts.map +1 -0
- package/dist/electrical/busbar/index.d.ts +4 -0
- package/dist/electrical/busbar/index.d.ts.map +1 -0
- package/dist/electrical/generator/generator.stories.d.ts +9 -0
- package/dist/electrical/generator/generator.stories.d.ts.map +1 -0
- package/dist/electrical/generator/index.d.ts +4 -0
- package/dist/electrical/generator/index.d.ts.map +1 -0
- package/dist/electrical/index.d.ts +4 -0
- package/dist/electrical/index.d.ts.map +1 -0
- package/dist/electrical/single-line.stories.d.ts +15 -0
- package/dist/electrical/single-line.stories.d.ts.map +1 -0
- package/dist/electrical/story-kit.d.ts +34 -0
- package/dist/electrical/story-kit.d.ts.map +1 -0
- package/dist/electrical/transformer/index.d.ts +4 -0
- package/dist/electrical/transformer/index.d.ts.map +1 -0
- package/dist/electrical/transformer/transformer.stories.d.ts +8 -0
- package/dist/electrical/transformer/transformer.stories.d.ts.map +1 -0
- package/dist/electrical.js +214 -0
- package/dist/filtration/bag-filter/bag-filter.stories.d.ts +6 -0
- package/dist/filtration/bag-filter/bag-filter.stories.d.ts.map +1 -0
- package/dist/filtration/bag-filter/index.d.ts +3 -0
- package/dist/filtration/bag-filter/index.d.ts.map +1 -0
- package/dist/filtration/base.d.ts +25 -0
- package/dist/filtration/base.d.ts.map +1 -0
- package/dist/filtration/cyclone/cyclone.stories.d.ts +6 -0
- package/dist/filtration/cyclone/cyclone.stories.d.ts.map +1 -0
- package/dist/filtration/cyclone/index.d.ts +3 -0
- package/dist/filtration/cyclone/index.d.ts.map +1 -0
- package/dist/filtration/index.d.ts +9 -0
- package/dist/filtration/index.d.ts.map +1 -0
- package/dist/filtration/scrubber/index.d.ts +3 -0
- package/dist/filtration/scrubber/index.d.ts.map +1 -0
- package/dist/filtration/scrubber/scrubber.stories.d.ts +6 -0
- package/dist/filtration/scrubber/scrubber.stories.d.ts.map +1 -0
- package/dist/filtration/stack/index.d.ts +3 -0
- package/dist/filtration/stack/index.d.ts.map +1 -0
- package/dist/filtration/stack/stack.stories.d.ts +6 -0
- package/dist/filtration/stack/stack.stories.d.ts.map +1 -0
- package/dist/filtration/story-kit.d.ts +27 -0
- package/dist/filtration/story-kit.d.ts.map +1 -0
- package/dist/filtration.js +163 -0
- package/dist/gradients/pipe-gradient.d.ts +35 -0
- package/dist/gradients/pipe-gradient.d.ts.map +1 -0
- package/dist/heat/base.d.ts +28 -0
- package/dist/heat/base.d.ts.map +1 -0
- package/dist/heat/boiler/boiler.stories.d.ts +8 -0
- package/dist/heat/boiler/boiler.stories.d.ts.map +1 -0
- package/dist/heat/boiler/index.d.ts +3 -0
- package/dist/heat/boiler/index.d.ts.map +1 -0
- package/dist/heat/coil/coil.stories.d.ts +6 -0
- package/dist/heat/coil/coil.stories.d.ts.map +1 -0
- package/dist/heat/coil/index.d.ts +3 -0
- package/dist/heat/coil/index.d.ts.map +1 -0
- package/dist/heat/condenser/condenser.stories.d.ts +6 -0
- package/dist/heat/condenser/condenser.stories.d.ts.map +1 -0
- package/dist/heat/condenser/index.d.ts +3 -0
- package/dist/heat/condenser/index.d.ts.map +1 -0
- package/dist/heat/cooling-tower/cooling-tower.stories.d.ts +6 -0
- package/dist/heat/cooling-tower/cooling-tower.stories.d.ts.map +1 -0
- package/dist/heat/cooling-tower/index.d.ts +3 -0
- package/dist/heat/cooling-tower/index.d.ts.map +1 -0
- package/dist/heat/furnace/furnace.stories.d.ts +8 -0
- package/dist/heat/furnace/furnace.stories.d.ts.map +1 -0
- package/dist/heat/furnace/index.d.ts +3 -0
- package/dist/heat/furnace/index.d.ts.map +1 -0
- package/dist/heat/index.d.ts +9 -0
- package/dist/heat/index.d.ts.map +1 -0
- package/dist/heat/shell-tube/index.d.ts +3 -0
- package/dist/heat/shell-tube/index.d.ts.map +1 -0
- package/dist/heat/shell-tube/shell-tube.stories.d.ts +6 -0
- package/dist/heat/shell-tube/shell-tube.stories.d.ts.map +1 -0
- package/dist/heat/story-kit.d.ts +27 -0
- package/dist/heat/story-kit.d.ts.map +1 -0
- package/dist/heat.js +290 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/instruments/bargraph/bargraph.stories.d.ts +8 -0
- package/dist/instruments/bargraph/bargraph.stories.d.ts.map +1 -0
- package/dist/instruments/bargraph/index.d.ts +3 -0
- package/dist/instruments/bargraph/index.d.ts.map +1 -0
- package/dist/instruments/face.d.ts +15 -0
- package/dist/instruments/face.d.ts.map +1 -0
- package/dist/instruments/gauge-analog/gauge-analog.stories.d.ts +11 -0
- package/dist/instruments/gauge-analog/gauge-analog.stories.d.ts.map +1 -0
- package/dist/instruments/gauge-analog/index.d.ts +3 -0
- package/dist/instruments/gauge-analog/index.d.ts.map +1 -0
- package/dist/instruments/gauge-digital/gauge-digital.stories.d.ts +7 -0
- package/dist/instruments/gauge-digital/gauge-digital.stories.d.ts.map +1 -0
- package/dist/instruments/gauge-digital/index.d.ts +3 -0
- package/dist/instruments/gauge-digital/index.d.ts.map +1 -0
- package/dist/instruments/index.d.ts +10 -0
- package/dist/instruments/index.d.ts.map +1 -0
- package/dist/instruments/indicator-lamp/index.d.ts +3 -0
- package/dist/instruments/indicator-lamp/index.d.ts.map +1 -0
- package/dist/instruments/indicator-lamp/indicator-lamp.stories.d.ts +9 -0
- package/dist/instruments/indicator-lamp/indicator-lamp.stories.d.ts.map +1 -0
- package/dist/instruments/readout-panel/index.d.ts +3 -0
- package/dist/instruments/readout-panel/index.d.ts.map +1 -0
- package/dist/instruments/readout-panel/readout-panel.stories.d.ts +6 -0
- package/dist/instruments/readout-panel/readout-panel.stories.d.ts.map +1 -0
- package/dist/instruments/story-kit.d.ts +29 -0
- package/dist/instruments/story-kit.d.ts.map +1 -0
- package/dist/instruments/trend-mini/index.d.ts +3 -0
- package/dist/instruments/trend-mini/index.d.ts.map +1 -0
- package/dist/instruments/trend-mini/trend-mini.stories.d.ts +6 -0
- package/dist/instruments/trend-mini/trend-mini.stories.d.ts.map +1 -0
- package/dist/instruments.js +347 -0
- package/dist/motion/seamless-loop.d.ts +14 -0
- package/dist/motion/seamless-loop.d.ts.map +1 -0
- package/dist/pipe-gradient-B538FEvi.js +18 -0
- package/dist/readout/index.d.ts +3 -0
- package/dist/readout/index.d.ts.map +1 -0
- package/dist/readout/readout.stories.d.ts +8 -0
- package/dist/readout/readout.stories.d.ts.map +1 -0
- package/dist/readout/story-kit.d.ts +27 -0
- package/dist/readout/story-kit.d.ts.map +1 -0
- package/dist/readout.js +33 -0
- package/dist/recipe-BxxL1vV1.js +383 -0
- package/dist/rotating/compressor/compressor.stories.d.ts +28 -0
- package/dist/rotating/compressor/compressor.stories.d.ts.map +1 -0
- package/dist/rotating/compressor/index.d.ts +3 -0
- package/dist/rotating/compressor/index.d.ts.map +1 -0
- package/dist/rotating/fan-axial/fan-axial.stories.d.ts +31 -0
- package/dist/rotating/fan-axial/fan-axial.stories.d.ts.map +1 -0
- package/dist/rotating/fan-axial/index.d.ts +3 -0
- package/dist/rotating/fan-axial/index.d.ts.map +1 -0
- package/dist/rotating/fan-centrifugal/fan-centrifugal.stories.d.ts +31 -0
- package/dist/rotating/fan-centrifugal/fan-centrifugal.stories.d.ts.map +1 -0
- package/dist/rotating/fan-centrifugal/index.d.ts +3 -0
- package/dist/rotating/fan-centrifugal/index.d.ts.map +1 -0
- package/dist/rotating/index.d.ts +12 -0
- package/dist/rotating/index.d.ts.map +1 -0
- package/dist/rotating/motor/index.d.ts +3 -0
- package/dist/rotating/motor/index.d.ts.map +1 -0
- package/dist/rotating/motor/motor.stories.d.ts +28 -0
- package/dist/rotating/motor/motor.stories.d.ts.map +1 -0
- package/dist/rotating/pump-centrifugal/index.d.ts +3 -0
- package/dist/rotating/pump-centrifugal/index.d.ts.map +1 -0
- package/dist/rotating/pump-centrifugal/pump-centrifugal.stories.d.ts +29 -0
- package/dist/rotating/pump-centrifugal/pump-centrifugal.stories.d.ts.map +1 -0
- package/dist/rotating/pump-positive-displacement/index.d.ts +3 -0
- package/dist/rotating/pump-positive-displacement/index.d.ts.map +1 -0
- package/dist/rotating/pump-positive-displacement/pump-positive-displacement.stories.d.ts +28 -0
- package/dist/rotating/pump-positive-displacement/pump-positive-displacement.stories.d.ts.map +1 -0
- package/dist/rotating/story-kit.d.ts +65 -0
- package/dist/rotating/story-kit.d.ts.map +1 -0
- package/dist/rotating/turbine/index.d.ts +3 -0
- package/dist/rotating/turbine/index.d.ts.map +1 -0
- package/dist/rotating/turbine/turbine.stories.d.ts +29 -0
- package/dist/rotating/turbine/turbine.stories.d.ts.map +1 -0
- package/dist/rotating.js +513 -0
- package/dist/rotation-drive/base.d.ts +110 -0
- package/dist/rotation-drive/base.d.ts.map +1 -0
- package/dist/valves/ball/ball.stories.d.ts +26 -0
- package/dist/valves/ball/ball.stories.d.ts.map +1 -0
- package/dist/valves/ball/index.d.ts +3 -0
- package/dist/valves/ball/index.d.ts.map +1 -0
- package/dist/valves/base.d.ts +70 -0
- package/dist/valves/base.d.ts.map +1 -0
- package/dist/valves/butterfly/butterfly.stories.d.ts +26 -0
- package/dist/valves/butterfly/butterfly.stories.d.ts.map +1 -0
- package/dist/valves/butterfly/index.d.ts +3 -0
- package/dist/valves/butterfly/index.d.ts.map +1 -0
- package/dist/valves/check/check.stories.d.ts +25 -0
- package/dist/valves/check/check.stories.d.ts.map +1 -0
- package/dist/valves/check/index.d.ts +3 -0
- package/dist/valves/check/index.d.ts.map +1 -0
- package/dist/valves/control/control.stories.d.ts +26 -0
- package/dist/valves/control/control.stories.d.ts.map +1 -0
- package/dist/valves/control/index.d.ts +3 -0
- package/dist/valves/control/index.d.ts.map +1 -0
- package/dist/valves/gate/gate.stories.d.ts +26 -0
- package/dist/valves/gate/gate.stories.d.ts.map +1 -0
- package/dist/valves/gate/index.d.ts +3 -0
- package/dist/valves/gate/index.d.ts.map +1 -0
- package/dist/valves/index.d.ts +8 -0
- package/dist/valves/index.d.ts.map +1 -0
- package/dist/valves/relief/index.d.ts +3 -0
- package/dist/valves/relief/index.d.ts.map +1 -0
- package/dist/valves/relief/relief.stories.d.ts +26 -0
- package/dist/valves/relief/relief.stories.d.ts.map +1 -0
- package/dist/valves/story-kit.d.ts +54 -0
- package/dist/valves/story-kit.d.ts.map +1 -0
- package/dist/valves.js +424 -0
- package/dist/vapor/base.d.ts +42 -0
- package/dist/vapor/base.d.ts.map +1 -0
- package/dist/vapor/billow-layer.d.ts +33 -0
- package/dist/vapor/billow-layer.d.ts.map +1 -0
- package/dist/vapor/billow-path.d.ts +36 -0
- package/dist/vapor/billow-path.d.ts.map +1 -0
- package/dist/vapor/index.d.ts +8 -0
- package/dist/vapor/index.d.ts.map +1 -0
- package/dist/vapor/plume/index.d.ts +3 -0
- package/dist/vapor/plume/index.d.ts.map +1 -0
- package/dist/vapor/plume/plume.stories.d.ts +9 -0
- package/dist/vapor/plume/plume.stories.d.ts.map +1 -0
- package/dist/vapor/steam-vent/index.d.ts +3 -0
- package/dist/vapor/steam-vent/index.d.ts.map +1 -0
- package/dist/vapor/steam-vent/steam-vent.stories.d.ts +9 -0
- package/dist/vapor/steam-vent/steam-vent.stories.d.ts.map +1 -0
- package/dist/vapor/story-kit.d.ts +28 -0
- package/dist/vapor/story-kit.d.ts.map +1 -0
- package/dist/vapor.js +194 -0
- package/dist/vessel-body/hardware.d.ts +13 -0
- package/dist/vessel-body/hardware.d.ts.map +1 -0
- package/dist/vessel-body/liquid/dished-bottom.d.ts +33 -0
- package/dist/vessel-body/liquid/dished-bottom.d.ts.map +1 -0
- package/dist/vessel-body/liquid/index.d.ts +11 -0
- package/dist/vessel-body/liquid/index.d.ts.map +1 -0
- package/dist/vessel-body/liquid/wave-layer.d.ts +57 -0
- package/dist/vessel-body/liquid/wave-layer.d.ts.map +1 -0
- package/dist/vessel-body/liquid/wave-path.d.ts +45 -0
- package/dist/vessel-body/liquid/wave-path.d.ts.map +1 -0
- package/dist/vessel-body/recipe.d.ts +85 -0
- package/dist/vessel-body/recipe.d.ts.map +1 -0
- package/dist/vessel-body/shapes.d.ts +78 -0
- package/dist/vessel-body/shapes.d.ts.map +1 -0
- package/dist/vessels/drum/drum.stories.d.ts +33 -0
- package/dist/vessels/drum/drum.stories.d.ts.map +1 -0
- package/dist/vessels/drum/index.d.ts +3 -0
- package/dist/vessels/drum/index.d.ts.map +1 -0
- package/dist/vessels/hopper/hopper.stories.d.ts +39 -0
- package/dist/vessels/hopper/hopper.stories.d.ts.map +1 -0
- package/dist/vessels/hopper/index.d.ts +3 -0
- package/dist/vessels/hopper/index.d.ts.map +1 -0
- package/dist/vessels/index.d.ts +10 -0
- package/dist/vessels/index.d.ts.map +1 -0
- package/dist/vessels/silo/index.d.ts +3 -0
- package/dist/vessels/silo/index.d.ts.map +1 -0
- package/dist/vessels/silo/silo.stories.d.ts +33 -0
- package/dist/vessels/silo/silo.stories.d.ts.map +1 -0
- package/dist/vessels/story-kit.d.ts +83 -0
- package/dist/vessels/story-kit.d.ts.map +1 -0
- package/dist/vessels/tank-horizontal/index.d.ts +3 -0
- package/dist/vessels/tank-horizontal/index.d.ts.map +1 -0
- package/dist/vessels/tank-horizontal/tank-horizontal.stories.d.ts +33 -0
- package/dist/vessels/tank-horizontal/tank-horizontal.stories.d.ts.map +1 -0
- package/dist/vessels/tank-spherical/index.d.ts +3 -0
- package/dist/vessels/tank-spherical/index.d.ts.map +1 -0
- package/dist/vessels/tank-spherical/tank-spherical.stories.d.ts +33 -0
- package/dist/vessels/tank-spherical/tank-spherical.stories.d.ts.map +1 -0
- package/dist/vessels/tank-vertical/index.d.ts +3 -0
- package/dist/vessels/tank-vertical/index.d.ts.map +1 -0
- package/dist/vessels/tank-vertical/tank-vertical.stories.d.ts +47 -0
- package/dist/vessels/tank-vertical/tank-vertical.stories.d.ts.map +1 -0
- package/dist/vessels.js +198 -0
- package/package.json +76 -0
package/dist/valves.js
ADDED
|
@@ -0,0 +1,424 @@
|
|
|
1
|
+
import { Fsm as e, Tween as t, resolveMediumStyle as n } from "@vscada/core";
|
|
2
|
+
//#region src/valves/base.ts
|
|
3
|
+
var r = 1, i = "linear";
|
|
4
|
+
function a(e) {
|
|
5
|
+
return Math.min(Math.max(e, 0), 1);
|
|
6
|
+
}
|
|
7
|
+
function o(n) {
|
|
8
|
+
let { element: o, renderer: s, tokens: c, visuals: l, arrowControl: u, arrowVisual: d, onFraction: f, onWarning: p } = n, m = o.bindings.find((e) => e.type === "position"), h = o.bindings.find((e) => e.type === "state"), g = {}, _ = new t(0), v, y, b = !1, x;
|
|
9
|
+
function S(e) {
|
|
10
|
+
let t = c.states[e];
|
|
11
|
+
t && (s.setAttr(l.indicator, "fill", t.indicatorColor), s.setText(l.label, t.label), s.setAttr(d, "opacity", t.blink ? "1" : "0"), t.blink ? u.resume() : u.pause());
|
|
12
|
+
}
|
|
13
|
+
function C(e, t) {
|
|
14
|
+
t !== x && (x = t, e.setTransform(l.fill, `scaleX(${t})`), f(e, t));
|
|
15
|
+
}
|
|
16
|
+
function w(e, t) {
|
|
17
|
+
_.retarget(e, t, r, i), _.snap(e);
|
|
18
|
+
}
|
|
19
|
+
if (m) {
|
|
20
|
+
let e = m.max - m.min, t = {
|
|
21
|
+
kind: "numeric",
|
|
22
|
+
write(t, n, r) {
|
|
23
|
+
if (typeof n != "number") return;
|
|
24
|
+
let s = e === 0 ? 0 : a((n - m.min) / e);
|
|
25
|
+
if (!b) {
|
|
26
|
+
b = !0, w(r, s), y = s, C(t, s), h || (v = s <= 0 ? "closed" : s >= 1 ? "open" : "opening", S(v));
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (s === y) return;
|
|
30
|
+
let l = y === void 0 || s > y;
|
|
31
|
+
y = s;
|
|
32
|
+
let u = o.transitions["closed→open"], d = o.transitions["open→closed"], f = (l ? u : d) ?? {
|
|
33
|
+
duration: c.defaultStrokeMs,
|
|
34
|
+
easing: i
|
|
35
|
+
};
|
|
36
|
+
_.retarget(r, s, f.duration, f.easing), h || (v = l ? "opening" : "closing", S(v));
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
g[m.tag] = t;
|
|
40
|
+
}
|
|
41
|
+
if (h) {
|
|
42
|
+
let t = new e(h.map, o.transitions, {
|
|
43
|
+
duration: c.defaultStrokeMs,
|
|
44
|
+
easing: i
|
|
45
|
+
}, p), n = {
|
|
46
|
+
kind: "state",
|
|
47
|
+
write(e, n, r) {
|
|
48
|
+
let i = t.resolve(n, h.tag), a = i.state, o = v;
|
|
49
|
+
if (v = a, S(a), m || a === "fault") return;
|
|
50
|
+
let s = +(a === "open" || a === "opening");
|
|
51
|
+
if (o === void 0) {
|
|
52
|
+
w(r, s), y = s, C(e, s);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
s !== y && (y = s, _.retarget(r, s, i.transition.duration, i.transition.easing));
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
g[h.tag] = n;
|
|
59
|
+
}
|
|
60
|
+
let T = {
|
|
61
|
+
kind: "tween",
|
|
62
|
+
tick(e, t) {
|
|
63
|
+
if (C(e, _.valueAt(t)), !h && _.isSettled(t)) {
|
|
64
|
+
let e = _.valueAt(t), n = e >= 1 ? "open" : e <= 0 ? "closed" : void 0;
|
|
65
|
+
n && n !== v && (v = n, S(n));
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
snap(e, t) {
|
|
69
|
+
_.snap(t), C(e, _.valueAt(t));
|
|
70
|
+
}
|
|
71
|
+
};
|
|
72
|
+
g[`__valve-tween-${o.id}`] = T;
|
|
73
|
+
let E = {
|
|
74
|
+
kind: "animation",
|
|
75
|
+
pause() {
|
|
76
|
+
u.pause();
|
|
77
|
+
},
|
|
78
|
+
resume() {
|
|
79
|
+
v && c.states[v]?.blink && u.resume();
|
|
80
|
+
},
|
|
81
|
+
seek(e) {
|
|
82
|
+
u.seek(e);
|
|
83
|
+
}
|
|
84
|
+
};
|
|
85
|
+
return g[`__valve-animations-${o.id}`] = E, {
|
|
86
|
+
handles: g,
|
|
87
|
+
getCurrentState: () => v
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
//#region src/valves/gate/index.ts
|
|
92
|
+
var s = "http://www.w3.org/2000/svg", c = 600;
|
|
93
|
+
function l(e, t, r) {
|
|
94
|
+
let i = t.tokens.valve, a = document.createElementNS(s, "g");
|
|
95
|
+
if (a.setAttribute("data-element-id", e.id), a.setAttribute("class", "vscada-valve-gate"), !i) return {
|
|
96
|
+
svg: a,
|
|
97
|
+
handles: {}
|
|
98
|
+
};
|
|
99
|
+
let { w: l, h: u } = e, d = n(t.tokens.medium, e.medium)?.color ?? i.openColor, f = document.createElementNS(s, "rect");
|
|
100
|
+
f.setAttribute("class", "vscada-valve-body"), f.setAttribute("width", String(l)), f.setAttribute("height", String(u)), f.setAttribute("fill", "none"), f.setAttribute("stroke", i.bodyOutlineColor), f.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), a.appendChild(f);
|
|
101
|
+
let p = document.createElementNS(s, "rect");
|
|
102
|
+
p.setAttribute("class", "vscada-valve-fill"), p.setAttribute("width", String(l)), p.setAttribute("height", String(u)), p.setAttribute("fill", d), p.style.transformOrigin = "0px 0px", a.appendChild(p);
|
|
103
|
+
let m = l * .3, h = u * .6, g = document.createElementNS(s, "rect");
|
|
104
|
+
g.setAttribute("class", "vscada-valve-gate-bonnet"), g.setAttribute("x", String(l / 2 - m / 2)), g.setAttribute("y", String(-h)), g.setAttribute("width", String(m)), g.setAttribute("height", String(h)), g.setAttribute("fill", "none"), g.setAttribute("stroke", i.bodyOutlineColor), g.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), a.appendChild(g);
|
|
105
|
+
let _ = l * .24, v = document.createElementNS(s, "rect");
|
|
106
|
+
v.setAttribute("class", "vscada-valve-gate-wedge"), v.setAttribute("x", String(l / 2 - _ / 2)), v.setAttribute("y", "0"), v.setAttribute("width", String(_)), v.setAttribute("height", String(u)), v.setAttribute("fill", i.discColor), v.style.transformOrigin = `${l / 2}px 0px`, a.appendChild(v);
|
|
107
|
+
let y = document.createElementNS(s, "g");
|
|
108
|
+
y.setAttribute("class", "vscada-valve-arrows"), y.setAttribute("opacity", "0");
|
|
109
|
+
let b = document.createElementNS(s, "path");
|
|
110
|
+
b.setAttribute("d", `M ${l * .1} ${u + 10} l -6 -4 l 0 8 z`), b.setAttribute("fill", i.arrowColor);
|
|
111
|
+
let x = document.createElementNS(s, "path");
|
|
112
|
+
x.setAttribute("d", `M ${l * .9} ${u + 10} l 6 -4 l 0 8 z`), x.setAttribute("fill", i.arrowColor), y.appendChild(b), y.appendChild(x), y.style.transformOrigin = `${l / 2}px ${u + 10}px`, a.appendChild(y);
|
|
113
|
+
let S = r.animateTransform(y, [
|
|
114
|
+
"scale(1)",
|
|
115
|
+
"scale(1.3)",
|
|
116
|
+
"scale(1)"
|
|
117
|
+
], c), C = document.createElementNS(s, "circle");
|
|
118
|
+
C.setAttribute("class", "vscada-valve-indicator"), C.setAttribute("cx", String(l * .5)), C.setAttribute("cy", String(-h - 10)), C.setAttribute("r", "5"), a.appendChild(C);
|
|
119
|
+
let w = document.createElementNS(s, "text");
|
|
120
|
+
return w.setAttribute("class", "vscada-valve-label"), w.setAttribute("x", "0"), w.setAttribute("y", String(u + 22)), w.setAttribute("font-size", "9"), w.setAttribute("fill", i.arrowColor), a.appendChild(w), {
|
|
121
|
+
svg: a,
|
|
122
|
+
handles: o({
|
|
123
|
+
element: e,
|
|
124
|
+
renderer: r,
|
|
125
|
+
tokens: i,
|
|
126
|
+
visuals: {
|
|
127
|
+
fill: p,
|
|
128
|
+
indicator: C,
|
|
129
|
+
label: w
|
|
130
|
+
},
|
|
131
|
+
arrowControl: S,
|
|
132
|
+
arrowVisual: y,
|
|
133
|
+
onFraction(e, t) {
|
|
134
|
+
e.setTransform(v, `translateY(${-t * (u + h)}px)`);
|
|
135
|
+
}
|
|
136
|
+
}).handles
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
var u = Object.freeze({
|
|
140
|
+
group: "valves",
|
|
141
|
+
primitives: Object.freeze({ "valve-gate": { build: l } })
|
|
142
|
+
}), d = "http://www.w3.org/2000/svg", f = 600, p = 90;
|
|
143
|
+
function m(e, t, r) {
|
|
144
|
+
let i = t.tokens.valve, a = document.createElementNS(d, "g");
|
|
145
|
+
if (a.setAttribute("data-element-id", e.id), a.setAttribute("class", "vscada-valve-ball"), !i) return {
|
|
146
|
+
svg: a,
|
|
147
|
+
handles: {}
|
|
148
|
+
};
|
|
149
|
+
let { w: s, h: c } = e, l = n(t.tokens.medium, e.medium)?.color ?? i.openColor, u = s / 2, m = c / 2, h = Math.min(s, c) * .45, g = document.createElementNS(d, "circle");
|
|
150
|
+
g.setAttribute("class", "vscada-valve-body"), g.setAttribute("cx", String(u)), g.setAttribute("cy", String(m)), g.setAttribute("r", String(h)), g.setAttribute("fill", "none"), g.setAttribute("stroke", i.bodyOutlineColor), g.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), a.appendChild(g);
|
|
151
|
+
let _ = document.createElementNS(d, "rect");
|
|
152
|
+
_.setAttribute("class", "vscada-valve-fill"), _.setAttribute("width", String(s)), _.setAttribute("height", String(c)), _.setAttribute("fill", l), _.style.transformOrigin = "0px 0px", a.appendChild(_);
|
|
153
|
+
let v = document.createElementNS(d, "ellipse");
|
|
154
|
+
v.setAttribute("class", "vscada-valve-ball-bore"), v.setAttribute("cx", String(u)), v.setAttribute("cy", String(m)), v.setAttribute("rx", String(h * .7)), v.setAttribute("ry", String(h * .22)), v.setAttribute("fill", i.discColor), v.style.transformOrigin = `${u}px ${m}px`, a.appendChild(v);
|
|
155
|
+
let y = document.createElementNS(d, "g");
|
|
156
|
+
y.setAttribute("class", "vscada-valve-arrows"), y.setAttribute("opacity", "0");
|
|
157
|
+
let b = document.createElementNS(d, "path");
|
|
158
|
+
b.setAttribute("d", `M ${s * .1} ${c + 10} l -6 -4 l 0 8 z`), b.setAttribute("fill", i.arrowColor);
|
|
159
|
+
let x = document.createElementNS(d, "path");
|
|
160
|
+
x.setAttribute("d", `M ${s * .9} ${c + 10} l 6 -4 l 0 8 z`), x.setAttribute("fill", i.arrowColor), y.appendChild(b), y.appendChild(x), y.style.transformOrigin = `${u}px ${c + 10}px`, a.appendChild(y);
|
|
161
|
+
let S = r.animateTransform(y, [
|
|
162
|
+
"scale(1)",
|
|
163
|
+
"scale(1.3)",
|
|
164
|
+
"scale(1)"
|
|
165
|
+
], f), C = document.createElementNS(d, "circle");
|
|
166
|
+
C.setAttribute("class", "vscada-valve-indicator"), C.setAttribute("cx", String(u)), C.setAttribute("cy", "-10"), C.setAttribute("r", "5"), a.appendChild(C);
|
|
167
|
+
let w = document.createElementNS(d, "text");
|
|
168
|
+
return w.setAttribute("class", "vscada-valve-label"), w.setAttribute("x", "0"), w.setAttribute("y", String(c + 22)), w.setAttribute("font-size", "9"), w.setAttribute("fill", i.arrowColor), a.appendChild(w), {
|
|
169
|
+
svg: a,
|
|
170
|
+
handles: o({
|
|
171
|
+
element: e,
|
|
172
|
+
renderer: r,
|
|
173
|
+
tokens: i,
|
|
174
|
+
visuals: {
|
|
175
|
+
fill: _,
|
|
176
|
+
indicator: C,
|
|
177
|
+
label: w
|
|
178
|
+
},
|
|
179
|
+
arrowControl: S,
|
|
180
|
+
arrowVisual: y,
|
|
181
|
+
onFraction(e, t) {
|
|
182
|
+
let n = (1 - t) * p;
|
|
183
|
+
e.setTransform(v, `rotate(${n}deg)`);
|
|
184
|
+
}
|
|
185
|
+
}).handles
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
var h = Object.freeze({
|
|
189
|
+
group: "valves",
|
|
190
|
+
primitives: Object.freeze({ "valve-ball": { build: m } })
|
|
191
|
+
}), g = "http://www.w3.org/2000/svg", _ = 600, v = .12;
|
|
192
|
+
function y(e, t, r) {
|
|
193
|
+
let i = t.tokens.valve, a = document.createElementNS(g, "g");
|
|
194
|
+
if (a.setAttribute("data-element-id", e.id), a.setAttribute("class", "vscada-valve-butterfly"), !i) return {
|
|
195
|
+
svg: a,
|
|
196
|
+
handles: {}
|
|
197
|
+
};
|
|
198
|
+
let { w: s, h: c } = e, l = n(t.tokens.medium, e.medium)?.color ?? i.openColor, u = s / 2, d = c / 2, f = Math.min(s, c) * .45, p = document.createElementNS(g, "circle");
|
|
199
|
+
p.setAttribute("class", "vscada-valve-body"), p.setAttribute("cx", String(u)), p.setAttribute("cy", String(d)), p.setAttribute("r", String(f)), p.setAttribute("fill", "none"), p.setAttribute("stroke", i.bodyOutlineColor), p.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), a.appendChild(p);
|
|
200
|
+
let m = document.createElementNS(g, "rect");
|
|
201
|
+
m.setAttribute("class", "vscada-valve-fill"), m.setAttribute("width", String(s)), m.setAttribute("height", String(c)), m.setAttribute("fill", l), m.style.transformOrigin = "0px 0px", a.appendChild(m);
|
|
202
|
+
let h = document.createElementNS(g, "ellipse");
|
|
203
|
+
h.setAttribute("class", "vscada-valve-butterfly-disc"), h.setAttribute("cx", String(u)), h.setAttribute("cy", String(d)), h.setAttribute("rx", String(f * .85)), h.setAttribute("ry", String(f * .85)), h.setAttribute("fill", i.discColor), h.style.transformOrigin = `${u}px ${d}px`, a.appendChild(h);
|
|
204
|
+
let y = document.createElementNS(g, "line");
|
|
205
|
+
y.setAttribute("class", "vscada-valve-butterfly-shaft"), y.setAttribute("x1", String(u)), y.setAttribute("x2", String(u)), y.setAttribute("y1", String(d - f)), y.setAttribute("y2", String(d + f)), y.setAttribute("stroke", i.bodyOutlineColor), y.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), a.appendChild(y);
|
|
206
|
+
let b = document.createElementNS(g, "g");
|
|
207
|
+
b.setAttribute("class", "vscada-valve-arrows"), b.setAttribute("opacity", "0");
|
|
208
|
+
let x = document.createElementNS(g, "path");
|
|
209
|
+
x.setAttribute("d", `M ${s * .1} ${c + 10} l -6 -4 l 0 8 z`), x.setAttribute("fill", i.arrowColor);
|
|
210
|
+
let S = document.createElementNS(g, "path");
|
|
211
|
+
S.setAttribute("d", `M ${s * .9} ${c + 10} l 6 -4 l 0 8 z`), S.setAttribute("fill", i.arrowColor), b.appendChild(x), b.appendChild(S), b.style.transformOrigin = `${u}px ${c + 10}px`, a.appendChild(b);
|
|
212
|
+
let C = r.animateTransform(b, [
|
|
213
|
+
"scale(1)",
|
|
214
|
+
"scale(1.3)",
|
|
215
|
+
"scale(1)"
|
|
216
|
+
], _), w = document.createElementNS(g, "circle");
|
|
217
|
+
w.setAttribute("class", "vscada-valve-indicator"), w.setAttribute("cx", String(u)), w.setAttribute("cy", "-10"), w.setAttribute("r", "5"), a.appendChild(w);
|
|
218
|
+
let T = document.createElementNS(g, "text");
|
|
219
|
+
return T.setAttribute("class", "vscada-valve-label"), T.setAttribute("x", "0"), T.setAttribute("y", String(c + 22)), T.setAttribute("font-size", "9"), T.setAttribute("fill", i.arrowColor), a.appendChild(T), {
|
|
220
|
+
svg: a,
|
|
221
|
+
handles: o({
|
|
222
|
+
element: e,
|
|
223
|
+
renderer: r,
|
|
224
|
+
tokens: i,
|
|
225
|
+
visuals: {
|
|
226
|
+
fill: m,
|
|
227
|
+
indicator: w,
|
|
228
|
+
label: T
|
|
229
|
+
},
|
|
230
|
+
arrowControl: C,
|
|
231
|
+
arrowVisual: b,
|
|
232
|
+
onFraction(e, t) {
|
|
233
|
+
let n = 1 - t * (1 - v);
|
|
234
|
+
e.setTransform(h, `scaleX(${n})`);
|
|
235
|
+
}
|
|
236
|
+
}).handles
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
var b = Object.freeze({
|
|
240
|
+
group: "valves",
|
|
241
|
+
primitives: Object.freeze({ "valve-butterfly": { build: y } })
|
|
242
|
+
}), x = "http://www.w3.org/2000/svg", S = 600;
|
|
243
|
+
function C(e, t, r) {
|
|
244
|
+
let i = t.tokens.valve, a = document.createElementNS(x, "g");
|
|
245
|
+
if (a.setAttribute("data-element-id", e.id), a.setAttribute("class", "vscada-valve-control"), !i) return {
|
|
246
|
+
svg: a,
|
|
247
|
+
handles: {}
|
|
248
|
+
};
|
|
249
|
+
let { w: s, h: c } = e, l = n(t.tokens.medium, e.medium)?.color ?? i.openColor, u = document.createElementNS(x, "rect");
|
|
250
|
+
u.setAttribute("class", "vscada-valve-body"), u.setAttribute("width", String(s)), u.setAttribute("height", String(c)), u.setAttribute("fill", "none"), u.setAttribute("stroke", i.bodyOutlineColor), u.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), a.appendChild(u);
|
|
251
|
+
let d = document.createElementNS(x, "rect");
|
|
252
|
+
d.setAttribute("class", "vscada-valve-fill"), d.setAttribute("width", String(s)), d.setAttribute("height", String(c)), d.setAttribute("fill", l), d.style.transformOrigin = "0px 0px", a.appendChild(d);
|
|
253
|
+
let f = s * .3, p = c * .6, m = c * .7, h = document.createElementNS(x, "rect");
|
|
254
|
+
h.setAttribute("class", "vscada-valve-control-bonnet"), h.setAttribute("x", String(s / 2 - f / 2)), h.setAttribute("y", String(-p - m)), h.setAttribute("width", String(f)), h.setAttribute("height", String(p)), h.setAttribute("fill", "none"), h.setAttribute("stroke", i.bodyOutlineColor), h.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), a.appendChild(h);
|
|
255
|
+
let g = document.createElementNS(x, "path");
|
|
256
|
+
g.setAttribute("class", "vscada-valve-control-actuator");
|
|
257
|
+
let _ = f * .9, v = -p - m;
|
|
258
|
+
g.setAttribute("d", `M ${s / 2 - _} ${v} A ${_} ${_} 0 0 1 ${s / 2 + _} ${v} Z`), g.setAttribute("fill", "none"), g.setAttribute("stroke", i.bodyOutlineColor), g.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), a.appendChild(g);
|
|
259
|
+
let y = s * .24, b = document.createElementNS(x, "rect");
|
|
260
|
+
b.setAttribute("class", "vscada-valve-control-wedge"), b.setAttribute("x", String(s / 2 - y / 2)), b.setAttribute("y", "0"), b.setAttribute("width", String(y)), b.setAttribute("height", String(c)), b.setAttribute("fill", i.discColor), b.style.transformOrigin = `${s / 2}px 0px`, a.appendChild(b);
|
|
261
|
+
let C = document.createElementNS(x, "g");
|
|
262
|
+
C.setAttribute("class", "vscada-valve-arrows"), C.setAttribute("opacity", "0");
|
|
263
|
+
let w = document.createElementNS(x, "path");
|
|
264
|
+
w.setAttribute("d", `M ${s * .1} ${c + 10} l -6 -4 l 0 8 z`), w.setAttribute("fill", i.arrowColor);
|
|
265
|
+
let T = document.createElementNS(x, "path");
|
|
266
|
+
T.setAttribute("d", `M ${s * .9} ${c + 10} l 6 -4 l 0 8 z`), T.setAttribute("fill", i.arrowColor), C.appendChild(w), C.appendChild(T), C.style.transformOrigin = `${s / 2}px ${c + 10}px`, a.appendChild(C);
|
|
267
|
+
let E = r.animateTransform(C, [
|
|
268
|
+
"scale(1)",
|
|
269
|
+
"scale(1.3)",
|
|
270
|
+
"scale(1)"
|
|
271
|
+
], S), D = document.createElementNS(x, "circle");
|
|
272
|
+
D.setAttribute("class", "vscada-valve-indicator"), D.setAttribute("cx", String(s * .5)), D.setAttribute("cy", String(v - 10)), D.setAttribute("r", "5"), a.appendChild(D);
|
|
273
|
+
let O = document.createElementNS(x, "text");
|
|
274
|
+
O.setAttribute("class", "vscada-valve-label"), O.setAttribute("x", "0"), O.setAttribute("y", String(c + 22)), O.setAttribute("font-size", "9"), O.setAttribute("fill", i.arrowColor), a.appendChild(O);
|
|
275
|
+
let k = document.createElementNS(x, "text");
|
|
276
|
+
return k.setAttribute("class", "vscada-valve-control-readout"), k.setAttribute("x", String(s / 2)), k.setAttribute("y", String(v - _ - 6)), k.setAttribute("font-size", "9"), k.setAttribute("text-anchor", "middle"), k.setAttribute("fill", i.arrowColor), a.appendChild(k), {
|
|
277
|
+
svg: a,
|
|
278
|
+
handles: o({
|
|
279
|
+
element: e,
|
|
280
|
+
renderer: r,
|
|
281
|
+
tokens: i,
|
|
282
|
+
visuals: {
|
|
283
|
+
fill: d,
|
|
284
|
+
indicator: D,
|
|
285
|
+
label: O
|
|
286
|
+
},
|
|
287
|
+
arrowControl: E,
|
|
288
|
+
arrowVisual: C,
|
|
289
|
+
onFraction(e, t) {
|
|
290
|
+
e.setTransform(b, `translateY(${-t * (c + p)}px)`), e.setText(k, `${Math.round(t * 100)}%`);
|
|
291
|
+
}
|
|
292
|
+
}).handles
|
|
293
|
+
};
|
|
294
|
+
}
|
|
295
|
+
var w = Object.freeze({
|
|
296
|
+
group: "valves",
|
|
297
|
+
primitives: Object.freeze({ "valve-control": { build: C } })
|
|
298
|
+
}), T = "http://www.w3.org/2000/svg", E = 600, D = 90;
|
|
299
|
+
function O(e, t, r) {
|
|
300
|
+
let i = t.tokens.valve, a = document.createElementNS(T, "g");
|
|
301
|
+
if (a.setAttribute("data-element-id", e.id), a.setAttribute("class", "vscada-valve-check"), !i) return {
|
|
302
|
+
svg: a,
|
|
303
|
+
handles: {}
|
|
304
|
+
};
|
|
305
|
+
let { w: s, h: c } = e, l = n(t.tokens.medium, e.medium)?.color ?? i.openColor, u = document.createElementNS(T, "rect");
|
|
306
|
+
u.setAttribute("class", "vscada-valve-body"), u.setAttribute("width", String(s)), u.setAttribute("height", String(c)), u.setAttribute("fill", "none"), u.setAttribute("stroke", i.bodyOutlineColor), u.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), a.appendChild(u);
|
|
307
|
+
let d = document.createElementNS(T, "rect");
|
|
308
|
+
d.setAttribute("class", "vscada-valve-fill"), d.setAttribute("width", String(s)), d.setAttribute("height", String(c)), d.setAttribute("fill", l), d.style.transformOrigin = "0px 0px", a.appendChild(d);
|
|
309
|
+
let f = document.createElementNS(T, "path");
|
|
310
|
+
f.setAttribute("class", "vscada-valve-check-flow-glyph"), f.setAttribute("d", `M ${s * .15} ${c / 2} L ${s * .75} ${c / 2} M ${s * .6} ${c / 2 - 5} L ${s * .75} ${c / 2} L ${s * .6} ${c / 2 + 5}`), f.setAttribute("stroke", i.discColor), f.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), f.setAttribute("fill", "none"), a.appendChild(f);
|
|
311
|
+
let p = c * .8, m = document.createElementNS(T, "rect");
|
|
312
|
+
m.setAttribute("class", "vscada-valve-check-flap"), m.setAttribute("x", String(s / 2 - 2)), m.setAttribute("y", String(c - p)), m.setAttribute("width", "4"), m.setAttribute("height", String(p)), m.setAttribute("fill", i.discColor), m.style.transformOrigin = `${s / 2}px ${c}px`, a.appendChild(m);
|
|
313
|
+
let h = document.createElementNS(T, "g");
|
|
314
|
+
h.setAttribute("class", "vscada-valve-arrows"), h.setAttribute("opacity", "0");
|
|
315
|
+
let g = document.createElementNS(T, "path");
|
|
316
|
+
g.setAttribute("d", `M ${s * .1} ${c + 10} l -6 -4 l 0 8 z`), g.setAttribute("fill", i.arrowColor);
|
|
317
|
+
let _ = document.createElementNS(T, "path");
|
|
318
|
+
_.setAttribute("d", `M ${s * .9} ${c + 10} l 6 -4 l 0 8 z`), _.setAttribute("fill", i.arrowColor), h.appendChild(g), h.appendChild(_), h.style.transformOrigin = `${s / 2}px ${c + 10}px`, a.appendChild(h);
|
|
319
|
+
let v = r.animateTransform(h, [
|
|
320
|
+
"scale(1)",
|
|
321
|
+
"scale(1.3)",
|
|
322
|
+
"scale(1)"
|
|
323
|
+
], E), y = document.createElementNS(T, "circle");
|
|
324
|
+
y.setAttribute("class", "vscada-valve-indicator"), y.setAttribute("cx", String(s * .5)), y.setAttribute("cy", "-10"), y.setAttribute("r", "5"), a.appendChild(y);
|
|
325
|
+
let b = document.createElementNS(T, "text");
|
|
326
|
+
return b.setAttribute("class", "vscada-valve-label"), b.setAttribute("x", "0"), b.setAttribute("y", String(c + 22)), b.setAttribute("font-size", "9"), b.setAttribute("fill", i.arrowColor), a.appendChild(b), {
|
|
327
|
+
svg: a,
|
|
328
|
+
handles: o({
|
|
329
|
+
element: e,
|
|
330
|
+
renderer: r,
|
|
331
|
+
tokens: i,
|
|
332
|
+
visuals: {
|
|
333
|
+
fill: d,
|
|
334
|
+
indicator: y,
|
|
335
|
+
label: b
|
|
336
|
+
},
|
|
337
|
+
arrowControl: v,
|
|
338
|
+
arrowVisual: h,
|
|
339
|
+
onFraction(e, t) {
|
|
340
|
+
let n = -(1 - t) * D;
|
|
341
|
+
e.setTransform(m, `rotate(${n}deg)`);
|
|
342
|
+
}
|
|
343
|
+
}).handles
|
|
344
|
+
};
|
|
345
|
+
}
|
|
346
|
+
var k = Object.freeze({
|
|
347
|
+
group: "valves",
|
|
348
|
+
primitives: Object.freeze({ "valve-check": { build: O } })
|
|
349
|
+
}), A = "http://www.w3.org/2000/svg", j = 600, M = 4, N = .75;
|
|
350
|
+
function P(e, t, r) {
|
|
351
|
+
let i = t.tokens.valve, a = document.createElementNS(A, "g");
|
|
352
|
+
if (a.setAttribute("data-element-id", e.id), a.setAttribute("class", "vscada-valve-relief"), !i) return {
|
|
353
|
+
svg: a,
|
|
354
|
+
handles: {}
|
|
355
|
+
};
|
|
356
|
+
let { w: s, h: c } = e, l = n(t.tokens.medium, e.medium)?.color ?? i.openColor, u = document.createElementNS(A, "rect");
|
|
357
|
+
u.setAttribute("class", "vscada-valve-body"), u.setAttribute("width", String(s)), u.setAttribute("height", String(c)), u.setAttribute("fill", "none"), u.setAttribute("stroke", i.bodyOutlineColor), u.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), a.appendChild(u);
|
|
358
|
+
let d = document.createElementNS(A, "rect");
|
|
359
|
+
d.setAttribute("class", "vscada-valve-fill"), d.setAttribute("width", String(s)), d.setAttribute("height", String(c)), d.setAttribute("fill", l), d.style.transformOrigin = "0px 0px", a.appendChild(d);
|
|
360
|
+
let f = s * .3, p = c * .7, m = document.createElementNS(A, "rect");
|
|
361
|
+
m.setAttribute("class", "vscada-valve-relief-bonnet"), m.setAttribute("x", String(s / 2 - f / 2)), m.setAttribute("y", String(-p)), m.setAttribute("width", String(f)), m.setAttribute("height", String(p)), m.setAttribute("fill", "none"), m.setAttribute("stroke", i.bodyOutlineColor), m.setAttribute("stroke-width", String(i.strokeWidth ?? 2)), a.appendChild(m);
|
|
362
|
+
let h = -p * .85, g = -p * .15, _ = document.createElementNS(A, "polyline");
|
|
363
|
+
_.setAttribute("class", "vscada-valve-relief-spring"), _.setAttribute("fill", "none"), _.setAttribute("stroke", i.bodyOutlineColor), _.setAttribute("stroke-width", String((i.strokeWidth ?? 2) * N)), a.appendChild(_);
|
|
364
|
+
function v(e) {
|
|
365
|
+
let t = [];
|
|
366
|
+
for (let n = 0; n <= M * 2; n++) {
|
|
367
|
+
let r = h + (e - h) * n / (M * 2), i = s / 2 + (n % 2 == 0 ? -f * .28 : f * .28);
|
|
368
|
+
t.push(`${i},${r}`);
|
|
369
|
+
}
|
|
370
|
+
return t.join(" ");
|
|
371
|
+
}
|
|
372
|
+
_.setAttribute("points", v(g));
|
|
373
|
+
let y = s * .3, b = document.createElementNS(A, "rect");
|
|
374
|
+
b.setAttribute("class", "vscada-valve-relief-disc"), b.setAttribute("x", String(s / 2 - y / 2)), b.setAttribute("y", "-4"), b.setAttribute("width", String(y)), b.setAttribute("height", "4"), b.setAttribute("fill", i.discColor), b.style.transformOrigin = `${s / 2}px 0px`, a.appendChild(b);
|
|
375
|
+
let x = document.createElementNS(A, "g");
|
|
376
|
+
x.setAttribute("class", "vscada-valve-arrows"), x.setAttribute("opacity", "0");
|
|
377
|
+
let S = document.createElementNS(A, "path");
|
|
378
|
+
S.setAttribute("d", `M ${s * .1} ${c + 10} l -6 -4 l 0 8 z`), S.setAttribute("fill", i.arrowColor);
|
|
379
|
+
let C = document.createElementNS(A, "path");
|
|
380
|
+
C.setAttribute("d", `M ${s * .9} ${c + 10} l 6 -4 l 0 8 z`), C.setAttribute("fill", i.arrowColor), x.appendChild(S), x.appendChild(C), x.style.transformOrigin = `${s / 2}px ${c + 10}px`, a.appendChild(x);
|
|
381
|
+
let w = r.animateTransform(x, [
|
|
382
|
+
"scale(1)",
|
|
383
|
+
"scale(1.3)",
|
|
384
|
+
"scale(1)"
|
|
385
|
+
], j), T = document.createElementNS(A, "circle");
|
|
386
|
+
T.setAttribute("class", "vscada-valve-indicator"), T.setAttribute("cx", String(s * .5)), T.setAttribute("cy", String(-p - 10)), T.setAttribute("r", "5"), a.appendChild(T);
|
|
387
|
+
let E = document.createElementNS(A, "text");
|
|
388
|
+
E.setAttribute("class", "vscada-valve-label"), E.setAttribute("x", "0"), E.setAttribute("y", String(c + 22)), E.setAttribute("font-size", "9"), E.setAttribute("fill", i.arrowColor), a.appendChild(E);
|
|
389
|
+
let D = p * .5;
|
|
390
|
+
return {
|
|
391
|
+
svg: a,
|
|
392
|
+
handles: o({
|
|
393
|
+
element: e,
|
|
394
|
+
renderer: r,
|
|
395
|
+
tokens: i,
|
|
396
|
+
visuals: {
|
|
397
|
+
fill: d,
|
|
398
|
+
indicator: T,
|
|
399
|
+
label: E
|
|
400
|
+
},
|
|
401
|
+
arrowControl: w,
|
|
402
|
+
arrowVisual: x,
|
|
403
|
+
onFraction(e, t) {
|
|
404
|
+
e.setTransform(b, `translateY(${-t * D}px)`), e.setAttr(_, "points", v(g - t * D));
|
|
405
|
+
}
|
|
406
|
+
}).handles
|
|
407
|
+
};
|
|
408
|
+
}
|
|
409
|
+
var F = Object.freeze({
|
|
410
|
+
group: "valves",
|
|
411
|
+
primitives: Object.freeze({ "valve-relief": { build: P } })
|
|
412
|
+
}), I = Object.freeze({
|
|
413
|
+
group: "valves",
|
|
414
|
+
primitives: Object.freeze({
|
|
415
|
+
...u.primitives,
|
|
416
|
+
...h.primitives,
|
|
417
|
+
...b.primitives,
|
|
418
|
+
...w.primitives,
|
|
419
|
+
...k.primitives,
|
|
420
|
+
...F.primitives
|
|
421
|
+
})
|
|
422
|
+
});
|
|
423
|
+
//#endregion
|
|
424
|
+
export { I as valves };
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { HandleMap, MediumPlumeStyle, SceneElement, ValueWarningDetail } from '@vscada/core';
|
|
2
|
+
import type { BillowLayer } from './billow-layer';
|
|
3
|
+
export interface VaporEmissionDriveOptions {
|
|
4
|
+
element: SceneElement;
|
|
5
|
+
/** The primitive's own root group — toggled `opacity` 0/1 as a whole (AC1: zero emission renders NOTHING, not a faint ghost from opacity math alone). */
|
|
6
|
+
group: Element;
|
|
7
|
+
layers: BillowLayer[];
|
|
8
|
+
/** Task 3's declared (not-yet-consumed) reduced-motion static representation — opacity-driven alongside the animated layers so it's already correct whenever Story 4.4 wires it up. */
|
|
9
|
+
staticGlyph?: Element;
|
|
10
|
+
/** The resolved medium's own §7.4 plume params (opacity/driftSpeed) — steam/flue-gas only. */
|
|
11
|
+
plumeStyle: MediumPlumeStyle;
|
|
12
|
+
/** steam-vent's "brighter white" tuning (Task 2) — a documented numeric factor over the medium's own registered opacity, never a new literal color (AD-7). Defaults to 1 (plume: no boost). */
|
|
13
|
+
brightnessFactor?: number;
|
|
14
|
+
onWarning?: (detail: ValueWarningDetail) => void;
|
|
15
|
+
}
|
|
16
|
+
export interface VaporEmissionDrive {
|
|
17
|
+
handles: HandleMap;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Wires one element's `emission` binding to: (a) the root group's own
|
|
21
|
+
* hide/show (AC1), (b) each billow layer's fill-opacity (medium's
|
|
22
|
+
* registered `plume.opacity`, scaled by resolved intensity and the
|
|
23
|
+
* caller's brightness tuning), and (c) each layer's drift playbackRate
|
|
24
|
+
* (`plume.driftSpeed`, scaled the same way). A no-op (empty handles) when
|
|
25
|
+
* the element declares no `emission` binding — matches every other
|
|
26
|
+
* optional-channel primitive's degrade-gracefully convention
|
|
27
|
+
* (`heat/base.ts`'s `buildFiringStateDrive`).
|
|
28
|
+
*/
|
|
29
|
+
export declare function buildVaporEmissionDrive(opts: VaporEmissionDriveOptions): VaporEmissionDrive;
|
|
30
|
+
/**
|
|
31
|
+
* Story 4.4 Task 1 — consumes Task 3's declared-but-inert `staticGlyph`:
|
|
32
|
+
* an opacity-fade drift (unlike a rotating impeller or a dashed flow line)
|
|
33
|
+
* pauses on an ambiguous half-formed frame, so plume/steam-vent are the
|
|
34
|
+
* ONE primitive group in the kit that needs an explicit static swap
|
|
35
|
+
* rather than just relying on `AnimationHandle.pause()` holding still.
|
|
36
|
+
* `activate()`/`deactivate()` only ever toggle `display` — the glyph's
|
|
37
|
+
* `fill-opacity` itself stays driven in lockstep by `buildVaporEmissionDrive`
|
|
38
|
+
* regardless of which representation is currently shown.
|
|
39
|
+
*/
|
|
40
|
+
export declare function buildVaporStaticRepresentationHandle(elementId: string, layers: BillowLayer[], staticGlyph: Element | undefined): HandleMap;
|
|
41
|
+
export declare function buildVaporDriftAnimationHandle(elementId: string, layers: BillowLayer[]): HandleMap;
|
|
42
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/vapor/base.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,gBAAgB,EAA2B,YAAY,EAA8B,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvJ,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAmBlD,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,YAAY,CAAC;IACtB,yJAAyJ;IACzJ,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,WAAW,EAAE,CAAC;IACtB,uLAAuL;IACvL,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,8FAA8F;IAC9F,UAAU,EAAE,gBAAgB,CAAC;IAC7B,+LAA+L;IAC/L,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,kBAAkB,KAAK,IAAI,CAAC;CAClD;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,SAAS,CAAC;CACpB;AAED;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,yBAAyB,GAAG,kBAAkB,CAmC3F;AAED;;;;;;;;;GASG;AACH,wBAAgB,oCAAoC,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,WAAW,EAAE,OAAO,GAAG,SAAS,GAAG,SAAS,CAe1I;AAED,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,GAAG,SAAS,CAgBlG"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { AnimationControl, Renderer } from '@vscada/core';
|
|
2
|
+
/** Reference duration for one full `translateY(-period)` drift loop at playbackRate 1 — same "documented default, not spec-pinned" convention as `wave-layer.ts`'s `BASE_WAVE_DURATION_MS`. */
|
|
3
|
+
export declare const BASE_DRIFT_DURATION_MS = 3000;
|
|
4
|
+
export interface BillowLayerParams {
|
|
5
|
+
/** The plume/vent's own local height — the band is built at `containerHeight + period` tall (Bug-1-fix-shaped, same reasoning as `wave-layer.ts`'s `containerWidth + period`). */
|
|
6
|
+
containerHeight: number;
|
|
7
|
+
/** Local-space horizontal center this layer's band is placed at (a static, non-animated wrapper transform — never combined onto the WAAPI-driven loop node itself). */
|
|
8
|
+
centerX: number;
|
|
9
|
+
baseHalfWidth: number;
|
|
10
|
+
wobble: number;
|
|
11
|
+
/** Vertical wobble period AND the exact px distance the WAAPI loop translates by — reusing one value for both is what makes the loop seamless (§7.3's trick, `wave-layer.ts`'s same reuse). */
|
|
12
|
+
period: number;
|
|
13
|
+
/** Already-resolved theme/medium color — never a literal hex (AD-7). */
|
|
14
|
+
color: string;
|
|
15
|
+
durationMs?: number;
|
|
16
|
+
}
|
|
17
|
+
export interface BillowLayer {
|
|
18
|
+
/** Static positioning wrapper appended into the primitive's own SVG tree. */
|
|
19
|
+
carrier: SVGGElement;
|
|
20
|
+
/** The billow band's own fill path — its `fill-opacity` is the emission-driven write target. */
|
|
21
|
+
fill: SVGPathElement;
|
|
22
|
+
/** The one WAAPI loop control for this layer — pause/resume/seek reach it via the primitive's own `AnimationHandle` (AD-5). */
|
|
23
|
+
control: AnimationControl;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Builds ONE billow layer: a static `carrier` (horizontal centering only)
|
|
27
|
+
* wrapping a `loop` group (Y, WAAPI-driven seamless drift) wrapping the
|
|
28
|
+
* billow path. `buildBillowPathD` is called exactly ONCE here — every
|
|
29
|
+
* subsequent change (emission intensity, playback rate, freeze) is an
|
|
30
|
+
* attribute write or a WAAPI control call, never a re-build (AD-2).
|
|
31
|
+
*/
|
|
32
|
+
export declare function buildBillowLayer(params: BillowLayerParams, renderer: Renderer): BillowLayer;
|
|
33
|
+
//# sourceMappingURL=billow-layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billow-layer.d.ts","sourceRoot":"","sources":["../../src/vapor/billow-layer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAM/D,+LAA+L;AAC/L,eAAO,MAAM,sBAAsB,OAAO,CAAC;AAE3C,MAAM,WAAW,iBAAiB;IAChC,kLAAkL;IAClL,eAAe,EAAE,MAAM,CAAC;IACxB,uKAAuK;IACvK,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,+LAA+L;IAC/L,MAAM,EAAE,MAAM,CAAC;IACf,wEAAwE;IACxE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,WAAW;IAC1B,6EAA6E;IAC7E,OAAO,EAAE,WAAW,CAAC;IACrB,gGAAgG;IAChG,IAAI,EAAE,cAAc,CAAC;IACrB,+HAA+H;IAC/H,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,iBAAiB,EAAE,QAAQ,EAAE,QAAQ,GAAG,WAAW,CAwB3F"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Billow-band geometry (Story 3.8 Task 1) — the vertical analogue of
|
|
3
|
+
* `vessel-body/liquid/wave-path.ts`'s sine-crest technique (§7.3's "seamless
|
|
4
|
+
* period trick"): a closed band whose half-width oscillates sinusoidally
|
|
5
|
+
* with `y`, built tall enough (`height = containerHeight + period`) that
|
|
6
|
+
* translating it by exactly one `period` on the Y axis (via
|
|
7
|
+
* `motion/seamless-loop.ts`) loops seamlessly. Pure math — no DOM here —
|
|
8
|
+
* so the periodicity claim (AD-2's "structure once" hinges on it: if this
|
|
9
|
+
* weren't exactly periodic, a translateY loop would visibly jump at the
|
|
10
|
+
* seam) is directly unit-testable without a browser.
|
|
11
|
+
*/
|
|
12
|
+
/** Px between samples along the billow edge — same magnitude as `wave-path.ts`'s `WAVE_SAMPLE_STEP_PX`. */
|
|
13
|
+
export declare const BILLOW_SAMPLE_STEP_PX = 6;
|
|
14
|
+
export interface BillowPoint {
|
|
15
|
+
x: number;
|
|
16
|
+
y: number;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The right-edge half-width samples from `y=0` to `y=height` inclusive —
|
|
20
|
+
* `x` values only (the band is symmetric about x=0; `buildBillowPathD`
|
|
21
|
+
* mirrors these for the left edge).
|
|
22
|
+
*/
|
|
23
|
+
export declare function buildBillowEdgePoints(height: number, baseHalfWidth: number, wobble: number, period: number, sampleStep?: number): BillowPoint[];
|
|
24
|
+
/**
|
|
25
|
+
* The closed billow band's fillable `d`: the right-edge wobble curve down
|
|
26
|
+
* from `y=0` to `y=height`, mirrored back up the left edge, closed. Built
|
|
27
|
+
* exactly ONCE per layer (AD-2); every subsequent emission/playback change
|
|
28
|
+
* is a renderer-seam attribute write or a WAAPI control call, never a
|
|
29
|
+
* re-build. Centered on `x=0` — the caller translates to the plume's own
|
|
30
|
+
* horizontal center (a static, non-animated wrapper transform, kept
|
|
31
|
+
* separate from the WAAPI-driven loop node so the two transforms never
|
|
32
|
+
* collide on the same element, matching `wave-layer.ts`'s carrier/loop
|
|
33
|
+
* split).
|
|
34
|
+
*/
|
|
35
|
+
export declare function buildBillowPathD(height: number, baseHalfWidth: number, wobble: number, period: number, sampleStep?: number): string;
|
|
36
|
+
//# sourceMappingURL=billow-path.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"billow-path.d.ts","sourceRoot":"","sources":["../../src/vapor/billow-path.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,2GAA2G;AAC3G,eAAO,MAAM,qBAAqB,IAAI,CAAC;AAEvC,MAAM,WAAW,WAAW;IAC1B,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAMD;;;;GAIG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,MAA8B,GACzC,WAAW,EAAE,CAQf;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,UAAU,GAAE,MAA8B,GACzC,MAAM,CAIR"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { PrimitiveGroup } from '@vscada/core';
|
|
2
|
+
/**
|
|
3
|
+
* Vapor entry point (Story 3.8's batch) — merges plume/steam-vent's
|
|
4
|
+
* registered `primitives` records into one `PrimitiveGroup`, matching
|
|
5
|
+
* `heat/index.ts`/`filtration/index.ts`'s established merge pattern.
|
|
6
|
+
*/
|
|
7
|
+
export declare const vapor: PrimitiveGroup;
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vapor/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAInD;;;;GAIG;AACH,eAAO,MAAM,KAAK,EAAE,cAMlB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vapor/plume/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,cAAc,EAAyD,MAAM,cAAc,CAAC;AAsFrH,eAAO,MAAM,KAAK,EAAE,cAGlB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VaporStory, type VaporStoryMeta } from '../story-kit';
|
|
2
|
+
export declare const meta: VaporStoryMeta;
|
|
3
|
+
export declare const Zero: VaporStory;
|
|
4
|
+
export declare const Mid: VaporStory;
|
|
5
|
+
export declare const Max: VaporStory;
|
|
6
|
+
export declare const StaleFreeze: VaporStory;
|
|
7
|
+
export declare function render(container: HTMLElement, story?: VaporStory): import("../story-kit").MountedVaporStory;
|
|
8
|
+
export default meta;
|
|
9
|
+
//# sourceMappingURL=plume.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plume.stories.d.ts","sourceRoot":"","sources":["../../../src/vapor/plume/plume.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAErF,eAAO,MAAM,IAAI,EAAE,cAMlB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,UAA+G,CAAC;AACnI,eAAO,MAAM,GAAG,EAAE,UAAsG,CAAC;AACzH,eAAO,MAAM,GAAG,EAAE,UAAuG,CAAC;AAC1H,eAAO,MAAM,WAAW,EAAE,UAAmI,CAAC;AAE9J,wBAAgB,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,GAAE,UAAgB,4CAErE;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/vapor/steam-vent/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,cAAc,EAAyD,MAAM,cAAc,CAAC;AA4FrH,eAAO,MAAM,KAAK,EAAE,cAGlB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { type VaporStory, type VaporStoryMeta } from '../story-kit';
|
|
2
|
+
export declare const meta: VaporStoryMeta;
|
|
3
|
+
export declare const Zero: VaporStory;
|
|
4
|
+
export declare const Mid: VaporStory;
|
|
5
|
+
export declare const Max: VaporStory;
|
|
6
|
+
export declare const StaleFreeze: VaporStory;
|
|
7
|
+
export declare function render(container: HTMLElement, story?: VaporStory): import("../story-kit").MountedVaporStory;
|
|
8
|
+
export default meta;
|
|
9
|
+
//# sourceMappingURL=steam-vent.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"steam-vent.stories.d.ts","sourceRoot":"","sources":["../../../src/vapor/steam-vent/steam-vent.stories.ts"],"names":[],"mappings":"AAAA,OAAO,EAAmB,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,cAAc,CAAC;AAErF,eAAO,MAAM,IAAI,EAAE,cAMlB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,UAA+G,CAAC;AACnI,eAAO,MAAM,GAAG,EAAE,UAAsG,CAAC;AACzH,eAAO,MAAM,GAAG,EAAE,UAAuG,CAAC;AAC1H,eAAO,MAAM,WAAW,EAAE,UAAmI,CAAC;AAE9J,wBAAgB,MAAM,CAAC,SAAS,EAAE,WAAW,EAAE,KAAK,GAAE,UAAgB,4CAErE;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ScadaView, type Binding, type Renderer, type TagValue, type TimeSource } from '@vscada/core';
|
|
2
|
+
export interface VaporStoryMeta {
|
|
3
|
+
title: string;
|
|
4
|
+
/** The registered primitive `type` — must be a key in `vapor.primitives`. */
|
|
5
|
+
elementType: string;
|
|
6
|
+
width: number;
|
|
7
|
+
height: number;
|
|
8
|
+
bindings: Binding[];
|
|
9
|
+
medium?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface VaporStory {
|
|
12
|
+
name: string;
|
|
13
|
+
values: TagValue[];
|
|
14
|
+
/** Reuses Story 1.6's freeze mechanism (`connectionState = 'disconnected'`). */
|
|
15
|
+
stale?: boolean;
|
|
16
|
+
}
|
|
17
|
+
export interface MountedVaporStory {
|
|
18
|
+
element: ScadaView;
|
|
19
|
+
setValues(values: TagValue[]): void;
|
|
20
|
+
teardown(): void;
|
|
21
|
+
}
|
|
22
|
+
export interface MountVaporStoryOptions {
|
|
23
|
+
/** Real usage always gets the real WAAPI-backed `domRenderer`; tests inject a stub (jsdom/happy-dom has no `Element.animate`). */
|
|
24
|
+
renderer?: Renderer;
|
|
25
|
+
timeSource?: TimeSource;
|
|
26
|
+
}
|
|
27
|
+
export declare function mountVaporStory(container: HTMLElement, meta: VaporStoryMeta, story: VaporStory, options?: MountVaporStoryOptions): MountedVaporStory;
|
|
28
|
+
//# sourceMappingURL=story-kit.d.ts.map
|