@procaaso/alphinity-ui-components 1.1.2 → 1.3.0
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 +11 -0
- package/dist/index.cjs +173 -171
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +215 -102
- package/dist/index.d.ts +215 -102
- package/dist/index.js +174 -174
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import * as react from 'react';
|
|
2
2
|
import react__default from 'react';
|
|
3
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
5
3
|
import * as _emotion_styled from '@emotion/styled';
|
|
6
4
|
import * as _emotion_react from '@emotion/react';
|
|
7
5
|
import * as _mui_system from '@mui/system';
|
|
8
6
|
import * as _mui_material from '@mui/material';
|
|
7
|
+
import * as _mui_material_OverridableComponent from '@mui/material/OverridableComponent';
|
|
9
8
|
|
|
10
9
|
interface ButtonProps extends react__default.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
11
10
|
variant?: 'primary' | 'secondary';
|
|
@@ -45,6 +44,126 @@ interface SelectorProps extends Omit<react__default.HTMLAttributes<HTMLDivElemen
|
|
|
45
44
|
}
|
|
46
45
|
declare const Selector: react__default.FC<SelectorProps>;
|
|
47
46
|
|
|
47
|
+
/**
|
|
48
|
+
* Status levels for telemetry values
|
|
49
|
+
*/
|
|
50
|
+
type TelemetryStatus$1 = 'normal' | 'warning' | 'alarm' | 'fault' | 'off';
|
|
51
|
+
/**
|
|
52
|
+
* Live telemetry value with status
|
|
53
|
+
*/
|
|
54
|
+
interface TelemetryValue {
|
|
55
|
+
/** Current value */
|
|
56
|
+
value: number | string | boolean;
|
|
57
|
+
/** Status/severity level */
|
|
58
|
+
status: TelemetryStatus$1;
|
|
59
|
+
/** Unit of measurement (optional) */
|
|
60
|
+
unit?: string;
|
|
61
|
+
/** Timestamp of last update */
|
|
62
|
+
timestamp?: number;
|
|
63
|
+
/** Quality indicator (0-100, where 100 is good) */
|
|
64
|
+
quality?: number;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Uniform scaling / engineering-unit (EU) metadata for an analog value.
|
|
68
|
+
*
|
|
69
|
+
* Mirrors the control program's published `scaling` record (alphinity-tffi
|
|
70
|
+
* issue #1663): one shape carries the units, EU range, raw range, and display
|
|
71
|
+
* precision for any analog tag. When present on a TelemetryBinding it is the
|
|
72
|
+
* authoritative source for units / precision / trend-axis range - the consumer
|
|
73
|
+
* passes the live published metadata here instead of static diagram config.
|
|
74
|
+
* All fields optional so a producer can omit what does not apply.
|
|
75
|
+
*/
|
|
76
|
+
interface ScalingMetadata {
|
|
77
|
+
/** Engineering units (e.g. "psig", "LMH", "mL"). */
|
|
78
|
+
units?: string;
|
|
79
|
+
/** Engineering-unit range low / high (trend axis + faceplate range). */
|
|
80
|
+
euLow?: number;
|
|
81
|
+
euHigh?: number;
|
|
82
|
+
/** Raw signal range low / high (AnalogInputs only). */
|
|
83
|
+
rawLow?: number;
|
|
84
|
+
rawHigh?: number;
|
|
85
|
+
/** Display decimal places. */
|
|
86
|
+
decimals?: number;
|
|
87
|
+
/** Optional descriptive metadata. */
|
|
88
|
+
description?: string;
|
|
89
|
+
sensorType?: string;
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Telemetry data binding for a node
|
|
93
|
+
*/
|
|
94
|
+
interface TelemetryBinding {
|
|
95
|
+
/** Node ID this telemetry is bound to */
|
|
96
|
+
nodeId: string;
|
|
97
|
+
/** Tag/variable name for the telemetry source */
|
|
98
|
+
tag: string;
|
|
99
|
+
/** Current telemetry value */
|
|
100
|
+
value: TelemetryValue;
|
|
101
|
+
/**
|
|
102
|
+
* Uniform scaling / EU metadata (units, range, precision). When present it is
|
|
103
|
+
* the authoritative source for the displayed units, decimal precision, and
|
|
104
|
+
* trend-axis range - overriding `value.unit` / `display.precision` and the
|
|
105
|
+
* history-derived sparkline range. Populate from the live published scaling
|
|
106
|
+
* stream rather than static diagram config (#1663).
|
|
107
|
+
*/
|
|
108
|
+
scaling?: ScalingMetadata;
|
|
109
|
+
/** Historical values for sparkline/trend (optional) */
|
|
110
|
+
history?: number[];
|
|
111
|
+
/** Thresholds for status determination */
|
|
112
|
+
thresholds?: {
|
|
113
|
+
/** High-High threshold (value >= this triggers alarm) */
|
|
114
|
+
highHigh?: number;
|
|
115
|
+
/** High threshold (value >= this triggers warning) */
|
|
116
|
+
high?: number;
|
|
117
|
+
/** Low threshold (value <= this triggers warning) */
|
|
118
|
+
low?: number;
|
|
119
|
+
/** Low-Low threshold (value <= this triggers alarm/fault) */
|
|
120
|
+
lowLow?: number;
|
|
121
|
+
/** Custom label for high-high threshold */
|
|
122
|
+
highHighLabel?: string;
|
|
123
|
+
/** Custom label for high threshold */
|
|
124
|
+
highLabel?: string;
|
|
125
|
+
/** Custom label for low threshold */
|
|
126
|
+
lowLabel?: string;
|
|
127
|
+
/** Custom label for low-low threshold */
|
|
128
|
+
lowLowLabel?: string;
|
|
129
|
+
};
|
|
130
|
+
/** Custom colors for status levels */
|
|
131
|
+
statusColors?: {
|
|
132
|
+
normal?: string;
|
|
133
|
+
warning?: string;
|
|
134
|
+
alarm?: string;
|
|
135
|
+
fault?: string;
|
|
136
|
+
off?: string;
|
|
137
|
+
};
|
|
138
|
+
/** Display configuration */
|
|
139
|
+
display?: {
|
|
140
|
+
/** Show value overlay above node */
|
|
141
|
+
showValue?: boolean;
|
|
142
|
+
/** Show status indicator */
|
|
143
|
+
showStatus?: boolean;
|
|
144
|
+
/** Custom label for the value */
|
|
145
|
+
label?: string;
|
|
146
|
+
/** Number of decimal places for numeric values */
|
|
147
|
+
precision?: number;
|
|
148
|
+
/** Show sparkline trend (requires history) */
|
|
149
|
+
showSparkline?: boolean;
|
|
150
|
+
/** Sparkline color (defaults to status color) */
|
|
151
|
+
sparklineColor?: string;
|
|
152
|
+
/** Custom background color (hex code or 'status' for status-based color) */
|
|
153
|
+
backgroundColor?: string;
|
|
154
|
+
/** Custom text color for value display (hex code) */
|
|
155
|
+
textColor?: string;
|
|
156
|
+
/** Horizontal offset from node center */
|
|
157
|
+
offsetX?: number;
|
|
158
|
+
/** Vertical offset from node center */
|
|
159
|
+
offsetY?: number;
|
|
160
|
+
};
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Map of telemetry bindings by node ID
|
|
164
|
+
*/
|
|
165
|
+
type TelemetryMap = Map<string, TelemetryBinding>;
|
|
166
|
+
|
|
48
167
|
interface ModeConfig {
|
|
49
168
|
/** Units for this mode */
|
|
50
169
|
unit?: string;
|
|
@@ -98,6 +217,15 @@ interface ControlPanelProps extends react__default.HTMLAttributes<HTMLDivElement
|
|
|
98
217
|
defaultMax?: number;
|
|
99
218
|
/** Default precision when no mode config is found */
|
|
100
219
|
defaultPrecision?: number;
|
|
220
|
+
/**
|
|
221
|
+
* Uniform scaling / EU metadata (#1663). When provided, supplies the
|
|
222
|
+
* units / min / max / precision defaults from the live published scaling
|
|
223
|
+
* record - used only where an explicit `default*` prop or a mode config does
|
|
224
|
+
* not already set the value (modeConfig > explicit default > scaling >
|
|
225
|
+
* hardcoded). Lets the consumer drive the panel from the scaling stream
|
|
226
|
+
* instead of static diagram config.
|
|
227
|
+
*/
|
|
228
|
+
scaling?: ScalingMetadata;
|
|
101
229
|
/** Status state for the entire panel */
|
|
102
230
|
status?: 'normal' | 'alarm' | 'warning' | 'disabled';
|
|
103
231
|
/** Whether the panel is collapsed */
|
|
@@ -486,6 +614,14 @@ interface DeviceControlPanelProps {
|
|
|
486
614
|
onStart?: () => void;
|
|
487
615
|
/** Called when stop button clicked */
|
|
488
616
|
onStop?: () => void;
|
|
617
|
+
/**
|
|
618
|
+
* Start command is in flight (awaiting ack). Shows a busy affordance on the
|
|
619
|
+
* START button and disables it, without locking STOP — wire from the hook's
|
|
620
|
+
* `isCommandPending(nodeId, 'start')`.
|
|
621
|
+
*/
|
|
622
|
+
startPending?: boolean;
|
|
623
|
+
/** Stop command is in flight (awaiting ack). See `startPending`. */
|
|
624
|
+
stopPending?: boolean;
|
|
489
625
|
/** Called when custom action clicked */
|
|
490
626
|
onCustomAction?: (actionId: string) => void;
|
|
491
627
|
/** Called when config button clicked (opens config panel for this device) */
|
|
@@ -501,7 +637,7 @@ interface DeviceControlPanelProps {
|
|
|
501
637
|
/** Embedded mode - uses static positioning for rendering in containers (default: false) */
|
|
502
638
|
embedded?: boolean;
|
|
503
639
|
}
|
|
504
|
-
declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onStart, onStop, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, embedded, }: DeviceControlPanelProps):
|
|
640
|
+
declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onStart, onStop, startPending, stopPending, onCustomAction, onOpenConfig, showConfigButton, onUndock, undockIcon, modeSelectionStyle, embedded, }: DeviceControlPanelProps): react__default.JSX.Element | null;
|
|
505
641
|
|
|
506
642
|
type DisplayMode = 'standard' | 'dashboard';
|
|
507
643
|
interface FullscreenContainerProps {
|
|
@@ -699,7 +835,7 @@ declare const baseOverlayStyles: {
|
|
|
699
835
|
};
|
|
700
836
|
};
|
|
701
837
|
declare const overlayStyles: Record<OverlayTheme, typeof baseOverlayStyles[OverlayTheme]>;
|
|
702
|
-
declare const SVGLockedOverlay: ({ svgX, svgY, children, theme, style, className, onClick, containerSelector, }: SVGLockedOverlayProps) =>
|
|
838
|
+
declare const SVGLockedOverlay: ({ svgX, svgY, children, theme, style, className, onClick, containerSelector, }: SVGLockedOverlayProps) => react.JSX.Element;
|
|
703
839
|
declare const DashboardCard: _emotion_styled.StyledComponent<_mui_system.BoxOwnProps<_mui_material.Theme> & Omit<react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, keyof _mui_system.BoxOwnProps<_mui_material.Theme>> & {
|
|
704
840
|
theme?: _emotion_react.Theme;
|
|
705
841
|
} & {
|
|
@@ -722,11 +858,11 @@ declare const CardUnit: _emotion_styled.StyledComponent<{
|
|
|
722
858
|
as?: React.ElementType;
|
|
723
859
|
}, react.DetailedHTMLProps<react.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
724
860
|
|
|
725
|
-
declare const TrendLine: ({ values, width, height, color, strokeWidth, backgroundColor, }: TrendLineProps) =>
|
|
726
|
-
declare const CircularGauge: ({ value, max, unit, label, size, color, }: CircularGaugeProps) =>
|
|
727
|
-
declare const Sparkline: ({ data, width, height, color }: SparklineProps) =>
|
|
728
|
-
declare const EquipmentIndicatorWithSparkline: ({ svgX, svgY, color, label, size, sparklineData, sparklineOffset, }: EquipmentIndicatorWithSparklineProps) =>
|
|
729
|
-
declare const EquipmentIndicator: ({ svgX, svgY, color, label, size, style, className, }: EquipmentIndicatorProps) =>
|
|
861
|
+
declare const TrendLine: ({ values, width, height, color, strokeWidth, backgroundColor, }: TrendLineProps) => react.JSX.Element;
|
|
862
|
+
declare const CircularGauge: ({ value, max, unit, label, size, color, }: CircularGaugeProps) => react.JSX.Element;
|
|
863
|
+
declare const Sparkline: ({ data, width, height, color }: SparklineProps) => react.JSX.Element | null;
|
|
864
|
+
declare const EquipmentIndicatorWithSparkline: ({ svgX, svgY, color, label, size, sparklineData, sparklineOffset, }: EquipmentIndicatorWithSparklineProps) => react.JSX.Element;
|
|
865
|
+
declare const EquipmentIndicator: ({ svgX, svgY, color, label, size, style, className, }: EquipmentIndicatorProps) => react.JSX.Element;
|
|
730
866
|
|
|
731
867
|
declare function FullscreenWorkspace({ svgContent, overlays, leftPanel, rightPanel, footer, tabs, activeTab, onTabChange, defaultLeftCollapsed, defaultRightCollapsed, leftCollapsed: leftCollapsedProp, rightCollapsed: rightCollapsedProp, onLeftCollapseChange, onRightCollapseChange, displayMode, defaultDisplayMode, onDisplayModeChange, showDisplayModeToggle, showZoomControls, onZoomIn, onZoomOut, onResetZoom, zoomDisabled, className, ...rest }: FullscreenWorkspaceProps): react__default.ReactElement;
|
|
732
868
|
|
|
@@ -750,6 +886,50 @@ interface ThemeToggleProps extends react__default.HTMLAttributes<HTMLDivElement>
|
|
|
750
886
|
}
|
|
751
887
|
declare const ThemeToggle: react__default.FC<ThemeToggleProps>;
|
|
752
888
|
|
|
889
|
+
/**
|
|
890
|
+
* ISA-101 High Performance HMI — Unified Status Color System
|
|
891
|
+
*
|
|
892
|
+
* Single source of truth for mapping device status to visual colors.
|
|
893
|
+
* Used by NodeRenderer (SVG fill/stroke), DeviceControlPanel (status indicator),
|
|
894
|
+
* and DataOverlay (telemetry badge).
|
|
895
|
+
*/
|
|
896
|
+
/** Canonical device status vocabulary */
|
|
897
|
+
type DeviceStatus = 'normal' | 'warning' | 'alarm' | 'fault' | 'off' | 'starting' | 'stopping';
|
|
898
|
+
/** Color entry covering both SVG node and overlay/panel needs */
|
|
899
|
+
interface StatusColorEntry {
|
|
900
|
+
/** Fill color for SVG node symbols */
|
|
901
|
+
fill: string;
|
|
902
|
+
/** Stroke color for SVG node symbols */
|
|
903
|
+
stroke: string;
|
|
904
|
+
/** Background color for overlays and panel indicators */
|
|
905
|
+
bg: string;
|
|
906
|
+
/** Text color for overlays */
|
|
907
|
+
text: string;
|
|
908
|
+
/** Border color for overlays */
|
|
909
|
+
border: string;
|
|
910
|
+
}
|
|
911
|
+
/** Partial map for consumer overrides — only specify statuses you want to change */
|
|
912
|
+
type StatusColorMap = Partial<Record<DeviceStatus, Partial<StatusColorEntry>>>;
|
|
913
|
+
/**
|
|
914
|
+
* ISA-101 defaults.
|
|
915
|
+
*
|
|
916
|
+
* - normal: muted grey (ISA-101: no color for normal operation)
|
|
917
|
+
* - warning: amber/yellow
|
|
918
|
+
* - alarm: red
|
|
919
|
+
* - fault: dark red
|
|
920
|
+
* - off: light grey (matches canvas default #edeeef)
|
|
921
|
+
* - starting: light green (transitional)
|
|
922
|
+
* - stopping: amber (transitional)
|
|
923
|
+
*/
|
|
924
|
+
declare const DEFAULT_STATUS_COLORS: Record<DeviceStatus, StatusColorEntry>;
|
|
925
|
+
/**
|
|
926
|
+
* Resolve a status string to a full color entry.
|
|
927
|
+
*
|
|
928
|
+
* Priority: customMap[status] (merged) > DEFAULT_STATUS_COLORS[status] > off fallback.
|
|
929
|
+
* Supports aliases ('running' -> 'normal', 'stopped' -> 'off').
|
|
930
|
+
*/
|
|
931
|
+
declare function resolveStatusColor(status: string | undefined, customMap?: StatusColorMap): StatusColorEntry;
|
|
932
|
+
|
|
753
933
|
interface NodeInstance {
|
|
754
934
|
id: string;
|
|
755
935
|
symbolId: string;
|
|
@@ -762,7 +942,7 @@ interface NodeInstance {
|
|
|
762
942
|
y: number;
|
|
763
943
|
};
|
|
764
944
|
labelFontSize?: number;
|
|
765
|
-
status?: '
|
|
945
|
+
status?: 'normal' | 'warning' | 'alarm' | 'fault' | 'off' | 'starting' | 'stopping' | string;
|
|
766
946
|
customColors?: {
|
|
767
947
|
fill?: string;
|
|
768
948
|
stroke?: string;
|
|
@@ -890,93 +1070,6 @@ interface SymbolMetadata {
|
|
|
890
1070
|
tags?: string[];
|
|
891
1071
|
}
|
|
892
1072
|
|
|
893
|
-
/**
|
|
894
|
-
* Status levels for telemetry values
|
|
895
|
-
*/
|
|
896
|
-
type TelemetryStatus$1 = 'normal' | 'warning' | 'alarm' | 'fault' | 'off';
|
|
897
|
-
/**
|
|
898
|
-
* Live telemetry value with status
|
|
899
|
-
*/
|
|
900
|
-
interface TelemetryValue {
|
|
901
|
-
/** Current value */
|
|
902
|
-
value: number | string | boolean;
|
|
903
|
-
/** Status/severity level */
|
|
904
|
-
status: TelemetryStatus$1;
|
|
905
|
-
/** Unit of measurement (optional) */
|
|
906
|
-
unit?: string;
|
|
907
|
-
/** Timestamp of last update */
|
|
908
|
-
timestamp?: number;
|
|
909
|
-
/** Quality indicator (0-100, where 100 is good) */
|
|
910
|
-
quality?: number;
|
|
911
|
-
}
|
|
912
|
-
/**
|
|
913
|
-
* Telemetry data binding for a node
|
|
914
|
-
*/
|
|
915
|
-
interface TelemetryBinding {
|
|
916
|
-
/** Node ID this telemetry is bound to */
|
|
917
|
-
nodeId: string;
|
|
918
|
-
/** Tag/variable name for the telemetry source */
|
|
919
|
-
tag: string;
|
|
920
|
-
/** Current telemetry value */
|
|
921
|
-
value: TelemetryValue;
|
|
922
|
-
/** Historical values for sparkline/trend (optional) */
|
|
923
|
-
history?: number[];
|
|
924
|
-
/** Thresholds for status determination */
|
|
925
|
-
thresholds?: {
|
|
926
|
-
/** High-High threshold (value >= this triggers alarm) */
|
|
927
|
-
highHigh?: number;
|
|
928
|
-
/** High threshold (value >= this triggers warning) */
|
|
929
|
-
high?: number;
|
|
930
|
-
/** Low threshold (value <= this triggers warning) */
|
|
931
|
-
low?: number;
|
|
932
|
-
/** Low-Low threshold (value <= this triggers alarm/fault) */
|
|
933
|
-
lowLow?: number;
|
|
934
|
-
/** Custom label for high-high threshold */
|
|
935
|
-
highHighLabel?: string;
|
|
936
|
-
/** Custom label for high threshold */
|
|
937
|
-
highLabel?: string;
|
|
938
|
-
/** Custom label for low threshold */
|
|
939
|
-
lowLabel?: string;
|
|
940
|
-
/** Custom label for low-low threshold */
|
|
941
|
-
lowLowLabel?: string;
|
|
942
|
-
};
|
|
943
|
-
/** Custom colors for status levels */
|
|
944
|
-
statusColors?: {
|
|
945
|
-
normal?: string;
|
|
946
|
-
warning?: string;
|
|
947
|
-
alarm?: string;
|
|
948
|
-
fault?: string;
|
|
949
|
-
off?: string;
|
|
950
|
-
};
|
|
951
|
-
/** Display configuration */
|
|
952
|
-
display?: {
|
|
953
|
-
/** Show value overlay above node */
|
|
954
|
-
showValue?: boolean;
|
|
955
|
-
/** Show status indicator */
|
|
956
|
-
showStatus?: boolean;
|
|
957
|
-
/** Custom label for the value */
|
|
958
|
-
label?: string;
|
|
959
|
-
/** Number of decimal places for numeric values */
|
|
960
|
-
precision?: number;
|
|
961
|
-
/** Show sparkline trend (requires history) */
|
|
962
|
-
showSparkline?: boolean;
|
|
963
|
-
/** Sparkline color (defaults to status color) */
|
|
964
|
-
sparklineColor?: string;
|
|
965
|
-
/** Custom background color (hex code or 'status' for status-based color) */
|
|
966
|
-
backgroundColor?: string;
|
|
967
|
-
/** Custom text color for value display (hex code) */
|
|
968
|
-
textColor?: string;
|
|
969
|
-
/** Horizontal offset from node center */
|
|
970
|
-
offsetX?: number;
|
|
971
|
-
/** Vertical offset from node center */
|
|
972
|
-
offsetY?: number;
|
|
973
|
-
};
|
|
974
|
-
}
|
|
975
|
-
/**
|
|
976
|
-
* Map of telemetry bindings by node ID
|
|
977
|
-
*/
|
|
978
|
-
type TelemetryMap = Map<string, TelemetryBinding>;
|
|
979
|
-
|
|
980
1073
|
interface UseViewBoxOptions {
|
|
981
1074
|
/** Initial viewBox configuration */
|
|
982
1075
|
initialViewBox: ViewBox;
|
|
@@ -1296,6 +1389,8 @@ interface PIDCanvasProps extends react__default.HTMLAttributes<HTMLDivElement> {
|
|
|
1296
1389
|
onMounted?: (controls: PIDCanvasControls) => void;
|
|
1297
1390
|
/** Telemetry data bindings for live values */
|
|
1298
1391
|
telemetry?: TelemetryMap;
|
|
1392
|
+
/** Custom status-to-color map for node rendering (overrides ISA-101 defaults) */
|
|
1393
|
+
statusColorMap?: StatusColorMap;
|
|
1299
1394
|
}
|
|
1300
1395
|
interface PIDCanvasControls {
|
|
1301
1396
|
/** Fit view to show all diagram content */
|
|
@@ -1314,7 +1409,7 @@ interface PIDCanvasControls {
|
|
|
1314
1409
|
*
|
|
1315
1410
|
* Future: Editing tools, symbol library UI
|
|
1316
1411
|
*/
|
|
1317
|
-
declare function PIDCanvas({ diagram, className, style, features, onSelectionChange, onNodeClick, onPipeClick, onNodeMove, onDiagramChange, onDelete, onItemsCopied, onPaste, onSymbolDrop, onPipeCreated, onMounted, telemetry, ...props }: PIDCanvasProps): react__default.ReactElement;
|
|
1412
|
+
declare function PIDCanvas({ diagram, className, style, features, onSelectionChange, onNodeClick, onPipeClick, onNodeMove, onDiagramChange, onDelete, onItemsCopied, onPaste, onSymbolDrop, onPipeCreated, onMounted, telemetry, statusColorMap, ...props }: PIDCanvasProps): react__default.ReactElement;
|
|
1318
1413
|
|
|
1319
1414
|
interface SymbolLibraryProps {
|
|
1320
1415
|
/** Optional className for styling */
|
|
@@ -1366,7 +1461,7 @@ interface NodeConfigPanelProps {
|
|
|
1366
1461
|
* />
|
|
1367
1462
|
* ```
|
|
1368
1463
|
*/
|
|
1369
|
-
declare function NodeConfigPanel({ node, binding, onUpdateNode, onUpdateTelemetry, onAddTelemetry, onRemove, className, style, }: NodeConfigPanelProps):
|
|
1464
|
+
declare function NodeConfigPanel({ node, binding, onUpdateNode, onUpdateTelemetry, onAddTelemetry, onRemove, className, style, }: NodeConfigPanelProps): react__default.JSX.Element;
|
|
1370
1465
|
|
|
1371
1466
|
/**
|
|
1372
1467
|
* Validates a diagram object structure
|
|
@@ -1472,11 +1567,28 @@ declare function calculateThresholdStatus(value: number, thresholds?: Thresholds
|
|
|
1472
1567
|
*/
|
|
1473
1568
|
declare const DEFAULT_THRESHOLDS: Thresholds;
|
|
1474
1569
|
|
|
1570
|
+
/** Kinds of command a node can have in flight at once. */
|
|
1571
|
+
type CommandKind = 'start' | 'stop' | 'mode' | 'parameter' | 'action';
|
|
1572
|
+
interface UseDeviceControlsOptions {
|
|
1573
|
+
/**
|
|
1574
|
+
* If set (> 0), a command whose action callback does not settle within this
|
|
1575
|
+
* many milliseconds is abandoned: the in-flight marker clears and a timeout
|
|
1576
|
+
* result is recorded as command feedback. This only bounds how long the
|
|
1577
|
+
* optional "sending…" hint shows — controls are never disabled, so a hung
|
|
1578
|
+
* command can never lock anyone out regardless of this value.
|
|
1579
|
+
*
|
|
1580
|
+
* Note: this is a UI-level abort — it stops the HMI from *waiting*, but does
|
|
1581
|
+
* not cancel an already-dispatched command (that would require the action to
|
|
1582
|
+
* honor an AbortSignal). The command may still land; telemetry remains the
|
|
1583
|
+
* source of truth for the resulting device state.
|
|
1584
|
+
*/
|
|
1585
|
+
commandTimeoutMs?: number;
|
|
1586
|
+
}
|
|
1475
1587
|
/**
|
|
1476
1588
|
* Hook for managing device control bindings
|
|
1477
1589
|
* Similar pattern to useTelemetry
|
|
1478
1590
|
*/
|
|
1479
|
-
declare function useDeviceControls(initialBindings?: DeviceControlBinding[]): {
|
|
1591
|
+
declare function useDeviceControls(initialBindings?: DeviceControlBinding[], options?: UseDeviceControlsOptions): {
|
|
1480
1592
|
controls: DeviceControlMap;
|
|
1481
1593
|
updateControl: (nodeId: string, updates: Partial<DeviceControlBinding>) => void;
|
|
1482
1594
|
updateControlBatch: (updates: Record<string, Partial<DeviceControlBinding>>) => void;
|
|
@@ -1485,6 +1597,7 @@ declare function useDeviceControls(initialBindings?: DeviceControlBinding[]): {
|
|
|
1485
1597
|
setControlBinding: (binding: DeviceControlBinding) => void;
|
|
1486
1598
|
removeControlBinding: (nodeId: string) => void;
|
|
1487
1599
|
getControlBinding: (nodeId: string) => DeviceControlBinding | undefined;
|
|
1600
|
+
isCommandPending: (nodeId: string, kind?: CommandKind) => boolean;
|
|
1488
1601
|
sendModeChange: (nodeId: string, mode: string) => Promise<void>;
|
|
1489
1602
|
sendParameterChange: (nodeId: string, parameterId: string, value: any) => Promise<void>;
|
|
1490
1603
|
sendStartCommand: (nodeId: string) => Promise<void>;
|
|
@@ -1770,7 +1883,7 @@ interface DeviceConfigPanelProps {
|
|
|
1770
1883
|
/** Embedded mode - uses static positioning for rendering in containers (default: false) */
|
|
1771
1884
|
embedded?: boolean;
|
|
1772
1885
|
}
|
|
1773
|
-
declare function DeviceConfigPanel({ binding, onClose, onUndock, undockIcon, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onOpenControls, showControlsButton, embedded, }: DeviceConfigPanelProps):
|
|
1886
|
+
declare function DeviceConfigPanel({ binding, onClose, onUndock, undockIcon, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onOpenControls, showControlsButton, embedded, }: DeviceConfigPanelProps): react__default.JSX.Element | null;
|
|
1774
1887
|
|
|
1775
1888
|
/**
|
|
1776
1889
|
* Options for simulation behavior
|
|
@@ -1810,4 +1923,4 @@ interface SimulationOptions {
|
|
|
1810
1923
|
*/
|
|
1811
1924
|
declare function useSimulation(telemetry: TelemetryMap, updateTelemetryBatch: (updates: Array<any>) => void, options?: SimulationOptions): void;
|
|
1812
1925
|
|
|
1813
|
-
export { type AnchorType, Button, type ButtonProps, CardHeader, CardUnit, CardValue, CircularGauge, type CircularGaugeProps, type ConfigActions, type ConfigDisplay, type ConfigParameter, type ConfigSection, type ConfigState, type ConfigTheme, type ControlCapabilities, type ControlMode, ControlPanel, type ControlPanelProps, type ControlParameter, type ControlState, DEFAULT_THRESHOLDS, DashboardCard, type DataBinding, type DeviceConfigBinding, type DeviceConfigMap, DeviceConfigPanel, type DeviceConfigPanelProps, type DeviceControlBinding, type DeviceControlMap, DeviceControlPanel, type DeviceControlPanelProps, type Diagram, type DiagramMetadata, type DisplayMode, DisplayModeToggle, type DragPoint, type DragState, EquipmentIndicator, type EquipmentIndicatorProps, EquipmentIndicatorWithSparkline, type EquipmentIndicatorWithSparklineProps, FixedSVGContainer, FooterPanel, FullscreenContainer, FullscreenWorkspace, type FullscreenWorkspaceProps, type FullscreenWorkspaceTab, type KeyboardShortcutsOptions, LeftPanel, LeftToggleButton, LegacyValueEntry, type LegacyValueEntryProps, type ModeConfig, NodeConfigPanel, type NodeConfigPanelProps, type NodeControlConfig, NodeControlsPanel, type NodeControlsPanelProps, type NodeInstance, type Overlay, type OverlayContent, type OverlayTheme, type OverlayType, PIDCanvas, type PIDCanvasControls, type PIDCanvasFeatures, type PIDCanvasProps, PanelContent, PanelTabs, type PipeEdge, type PipeStyle, type Point, type PortDefinition, type PortInstance, type PortType, RightPanel, RightToggleButton, SVGArea, SVGLockedOverlay, type SVGLockedOverlayProps, ScrollableSVGWrapper, type SelectionState, Selector, type SelectorOption, type SelectorProps, type SimulationOptions, Sparkline, type SparklineProps, StatusIndicator, type StatusIndicatorProps, type SymbolCategory, type SymbolDefinition, SymbolLibrary, type SymbolLibraryProps, type SymbolMetadata, type TelemetryBinding, type TelemetryMap, type TelemetryStatus$1 as TelemetryStatus, type TelemetryValue, ThemeProvider, ThemeToggle, type ThemeToggleProps, type Thresholds, type Transform, TrendLine, type TrendLineProps, type UseDragOptions, type UseDragResult, type UseSelectionOptions, type UseSelectionResult, type UseTelemetryOptions, type UseTelemetryResult, type UseTelemetryStatusOptions, type UseViewBoxOptions, type UseViewBoxResult, ValueEntry, type ValueEntryProps, type ViewBox, ZoomButton, ZoomControls, calculateThresholdStatus, createConfigBinding, createControlBinding, exampleDiagram, exportDiagram, generateRoutePoints, getAvailableSymbols, getPortWorldPosition, getSymbolDefinition, importDiagram, mockSymbolLibrary, nodeHasPort, overlayStyles, registerSymbol, registerSymbols, useDeviceConfigs, useDeviceControls, useDrag, useKeyboardShortcuts, useSelection, useSimulation, useTelemetry, useTelemetryStatus, useTheme, useViewBox, validateDiagram };
|
|
1926
|
+
export { type AnchorType, Button, type ButtonProps, CardHeader, CardUnit, CardValue, CircularGauge, type CircularGaugeProps, type CommandKind, type ConfigActions, type ConfigDisplay, type ConfigParameter, type ConfigSection, type ConfigState, type ConfigTheme, type ControlCapabilities, type ControlMode, ControlPanel, type ControlPanelProps, type ControlParameter, type ControlState, DEFAULT_STATUS_COLORS, DEFAULT_THRESHOLDS, DashboardCard, type DataBinding, type DeviceConfigBinding, type DeviceConfigMap, DeviceConfigPanel, type DeviceConfigPanelProps, type DeviceControlBinding, type DeviceControlMap, DeviceControlPanel, type DeviceControlPanelProps, type DeviceStatus, type Diagram, type DiagramMetadata, type DisplayMode, DisplayModeToggle, type DragPoint, type DragState, EquipmentIndicator, type EquipmentIndicatorProps, EquipmentIndicatorWithSparkline, type EquipmentIndicatorWithSparklineProps, FixedSVGContainer, FooterPanel, FullscreenContainer, FullscreenWorkspace, type FullscreenWorkspaceProps, type FullscreenWorkspaceTab, type KeyboardShortcutsOptions, LeftPanel, LeftToggleButton, LegacyValueEntry, type LegacyValueEntryProps, type ModeConfig, NodeConfigPanel, type NodeConfigPanelProps, type NodeControlConfig, NodeControlsPanel, type NodeControlsPanelProps, type NodeInstance, type Overlay, type OverlayContent, type OverlayTheme, type OverlayType, PIDCanvas, type PIDCanvasControls, type PIDCanvasFeatures, type PIDCanvasProps, PanelContent, PanelTabs, type PipeEdge, type PipeStyle, type Point, type PortDefinition, type PortInstance, type PortType, RightPanel, RightToggleButton, SVGArea, SVGLockedOverlay, type SVGLockedOverlayProps, type ScalingMetadata, ScrollableSVGWrapper, type SelectionState, Selector, type SelectorOption, type SelectorProps, type SimulationOptions, Sparkline, type SparklineProps, type StatusColorEntry, type StatusColorMap, StatusIndicator, type StatusIndicatorProps, type SymbolCategory, type SymbolDefinition, SymbolLibrary, type SymbolLibraryProps, type SymbolMetadata, type TelemetryBinding, type TelemetryMap, type TelemetryStatus$1 as TelemetryStatus, type TelemetryValue, ThemeProvider, ThemeToggle, type ThemeToggleProps, type Thresholds, type Transform, TrendLine, type TrendLineProps, type UseDeviceControlsOptions, type UseDragOptions, type UseDragResult, type UseSelectionOptions, type UseSelectionResult, type UseTelemetryOptions, type UseTelemetryResult, type UseTelemetryStatusOptions, type UseViewBoxOptions, type UseViewBoxResult, ValueEntry, type ValueEntryProps, type ViewBox, ZoomButton, ZoomControls, calculateThresholdStatus, createConfigBinding, createControlBinding, exampleDiagram, exportDiagram, generateRoutePoints, getAvailableSymbols, getPortWorldPosition, getSymbolDefinition, importDiagram, mockSymbolLibrary, nodeHasPort, overlayStyles, registerSymbol, registerSymbols, resolveStatusColor, useDeviceConfigs, useDeviceControls, useDrag, useKeyboardShortcuts, useSelection, useSimulation, useTelemetry, useTelemetryStatus, useTheme, useViewBox, validateDiagram };
|