@procaaso/alphinity-ui-components 1.0.11 → 1.0.12

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/index.d.cts CHANGED
@@ -486,8 +486,14 @@ interface DeviceControlPanelProps {
486
486
  onStop?: () => void;
487
487
  /** Called when custom action clicked */
488
488
  onCustomAction?: (actionId: string) => void;
489
- }
490
- declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onStart, onStop, onCustomAction, }: DeviceControlPanelProps): react_jsx_runtime.JSX.Element | null;
489
+ /** Called when config button clicked (opens config panel for this device) */
490
+ onOpenConfig?: () => void;
491
+ /** Show configuration button in header */
492
+ showConfigButton?: boolean;
493
+ /** Style for mode selector: 'buttons' (horizontal scroll) or 'dropdown' (select) */
494
+ modeSelectionStyle?: 'buttons' | 'dropdown';
495
+ }
496
+ declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onStart, onStop, onCustomAction, onOpenConfig, showConfigButton, modeSelectionStyle, }: DeviceControlPanelProps): react_jsx_runtime.JSX.Element | null;
491
497
 
492
498
  type DisplayMode = 'standard' | 'dashboard';
493
499
  interface FullscreenContainerProps {
@@ -1478,6 +1484,280 @@ declare function useDeviceControls(initialBindings?: DeviceControlBinding[]): {
1478
1484
  sendCustomAction: (nodeId: string, actionId: string) => Promise<void>;
1479
1485
  };
1480
1486
 
1487
+ /**
1488
+ * Configuration parameter definition
1489
+ */
1490
+ interface ConfigParameter {
1491
+ /** Parameter ID */
1492
+ id: string;
1493
+ /** Display label */
1494
+ label: string;
1495
+ /** Parameter description/help text */
1496
+ description?: string;
1497
+ /** Unit of measurement */
1498
+ unit?: string;
1499
+ /** Parameter type */
1500
+ type: 'number' | 'string' | 'boolean' | 'select' | 'multiselect';
1501
+ /** Current value */
1502
+ value: any;
1503
+ /** Default value */
1504
+ defaultValue?: any;
1505
+ /** Whether parameter is read-only */
1506
+ readOnly?: boolean;
1507
+ /** Whether parameter is enabled/editable */
1508
+ enabled?: boolean;
1509
+ /** Minimum allowed value (for number type) */
1510
+ min?: number;
1511
+ /** Maximum allowed value (for number type) */
1512
+ max?: number;
1513
+ /** Step increment (for number type) */
1514
+ step?: number;
1515
+ /** Decimal precision for display (for number type) */
1516
+ precision?: number;
1517
+ /** Options for select/multiselect type */
1518
+ options?: Array<{
1519
+ value: any;
1520
+ label: string;
1521
+ description?: string;
1522
+ }>;
1523
+ /** Custom validation function - returns true or error message */
1524
+ validate?: (value: any) => boolean | string;
1525
+ /** Required field */
1526
+ required?: boolean;
1527
+ /** Section this parameter belongs to */
1528
+ section?: string;
1529
+ /** Display order within section */
1530
+ order?: number;
1531
+ /** Parameter IDs this depends on - if any are disabled, this is disabled */
1532
+ dependsOn?: string[];
1533
+ /** Conditional visibility - function that determines if parameter should be shown */
1534
+ visibleWhen?: (allValues: Record<string, any>) => boolean;
1535
+ }
1536
+ /**
1537
+ * Configuration section for grouping parameters
1538
+ */
1539
+ interface ConfigSection {
1540
+ /** Section ID */
1541
+ id: string;
1542
+ /** Display title */
1543
+ title: string;
1544
+ /** Section description */
1545
+ description?: string;
1546
+ /** Display order */
1547
+ order?: number;
1548
+ /** Whether section is collapsible */
1549
+ collapsible?: boolean;
1550
+ /** Default collapsed state */
1551
+ defaultCollapsed?: boolean;
1552
+ /** Icon to display */
1553
+ icon?: string;
1554
+ }
1555
+ /**
1556
+ * Configuration state tracking
1557
+ */
1558
+ interface ConfigState {
1559
+ /** Has unsaved changes */
1560
+ isDirty?: boolean;
1561
+ /** Currently saving */
1562
+ isSaving?: boolean;
1563
+ /** Last save timestamp */
1564
+ lastSaved?: number;
1565
+ /** Last save result */
1566
+ lastSaveResult?: {
1567
+ success: boolean;
1568
+ message?: string;
1569
+ };
1570
+ /** Validation errors */
1571
+ errors?: Record<string, string>;
1572
+ }
1573
+ /**
1574
+ * Configuration actions/handlers
1575
+ */
1576
+ interface ConfigActions {
1577
+ /** Handler for applying changes (temporary, may be reverted) */
1578
+ onApply?: (values: Record<string, any>) => Promise<{
1579
+ success: boolean;
1580
+ message?: string;
1581
+ }>;
1582
+ /** Handler for saving changes (permanent) */
1583
+ onSave?: (values: Record<string, any>) => Promise<{
1584
+ success: boolean;
1585
+ message?: string;
1586
+ }>;
1587
+ /** Handler for resetting to defaults */
1588
+ onReset?: () => Promise<{
1589
+ success: boolean;
1590
+ message?: string;
1591
+ }>;
1592
+ /** Handler for canceling changes */
1593
+ onCancel?: () => void;
1594
+ /** Handler for exporting configuration */
1595
+ onExport?: () => Promise<{
1596
+ success: boolean;
1597
+ data?: any;
1598
+ message?: string;
1599
+ }>;
1600
+ /** Handler for importing configuration */
1601
+ onImport?: (data: any) => Promise<{
1602
+ success: boolean;
1603
+ message?: string;
1604
+ }>;
1605
+ }
1606
+ /**
1607
+ * Display configuration
1608
+ */
1609
+ interface ConfigDisplay {
1610
+ /** Panel title */
1611
+ title?: string;
1612
+ /** Panel subtitle */
1613
+ subtitle?: string;
1614
+ /** Custom CSS class */
1615
+ className?: string;
1616
+ /** Custom inline styles */
1617
+ style?: React.CSSProperties;
1618
+ /** Show apply button */
1619
+ showApply?: boolean;
1620
+ /** Show save button */
1621
+ showSave?: boolean;
1622
+ /** Show reset button */
1623
+ showReset?: boolean;
1624
+ /** Show cancel button */
1625
+ showCancel?: boolean;
1626
+ /** Show export button */
1627
+ showExport?: boolean;
1628
+ /** Show import button */
1629
+ showImport?: boolean;
1630
+ /** Confirmation message for reset action */
1631
+ resetConfirmMessage?: string;
1632
+ /** Confirmation message for critical saves */
1633
+ saveConfirmMessage?: string;
1634
+ }
1635
+ /**
1636
+ * Theme customization for config panel
1637
+ */
1638
+ interface ConfigTheme {
1639
+ /** Background color */
1640
+ backgroundColor?: string;
1641
+ /** Surface/card color */
1642
+ surfaceColor?: string;
1643
+ /** Border color */
1644
+ borderColor?: string;
1645
+ /** Text color */
1646
+ textColor?: string;
1647
+ /** Muted text color */
1648
+ mutedTextColor?: string;
1649
+ /** Accent color */
1650
+ accentColor?: string;
1651
+ /** Error color */
1652
+ errorColor?: string;
1653
+ /** Success color */
1654
+ successColor?: string;
1655
+ /** Warning color */
1656
+ warningColor?: string;
1657
+ }
1658
+ /**
1659
+ * Device configuration binding - maps a node to device configuration parameters
1660
+ */
1661
+ interface DeviceConfigBinding {
1662
+ /** Node ID this configuration is bound to */
1663
+ nodeId: string;
1664
+ /** Device tag/identifier */
1665
+ tag: string;
1666
+ /** Device name */
1667
+ deviceName?: string;
1668
+ /** Device type */
1669
+ deviceType?: string;
1670
+ /** Configuration sections */
1671
+ sections?: ConfigSection[];
1672
+ /** Configuration parameters (flat list, optionally grouped by section) */
1673
+ parameters: ConfigParameter[];
1674
+ /** Current state */
1675
+ state: ConfigState;
1676
+ /** Available actions */
1677
+ actions: ConfigActions;
1678
+ /** Display configuration */
1679
+ display?: ConfigDisplay;
1680
+ /** Theme customization */
1681
+ theme?: ConfigTheme;
1682
+ /** Additional metadata */
1683
+ metadata?: Record<string, any>;
1684
+ }
1685
+ /**
1686
+ * Map of device configurations by node ID
1687
+ */
1688
+ type DeviceConfigMap = Map<string, DeviceConfigBinding>;
1689
+ /**
1690
+ * Helper to create a config binding with defaults
1691
+ */
1692
+ declare function createConfigBinding(nodeId: string, tag: string, parameters: ConfigParameter[], actions: ConfigActions, options?: {
1693
+ deviceName?: string;
1694
+ deviceType?: string;
1695
+ sections?: ConfigSection[];
1696
+ display?: ConfigDisplay;
1697
+ theme?: ConfigTheme;
1698
+ metadata?: Record<string, any>;
1699
+ }): DeviceConfigBinding;
1700
+
1701
+ /**
1702
+ * Hook for managing device configuration bindings
1703
+ */
1704
+ declare function useDeviceConfigs(initialConfigs?: DeviceConfigBinding[]): {
1705
+ configs: DeviceConfigMap;
1706
+ getConfig: (nodeId: string) => DeviceConfigBinding | undefined;
1707
+ setConfig: (config: DeviceConfigBinding) => void;
1708
+ removeConfig: (nodeId: string) => void;
1709
+ clearConfigs: () => void;
1710
+ updateConfig: (nodeId: string, updates: Partial<DeviceConfigBinding>) => void;
1711
+ updateConfigState: (nodeId: string, stateUpdates: Partial<DeviceConfigBinding["state"]>) => void;
1712
+ updateConfigBatch: (updates: Record<string, Partial<DeviceConfigBinding>>) => void;
1713
+ updateParameterValue: (nodeId: string, parameterId: string, value: any) => void;
1714
+ applyConfig: (nodeId: string) => Promise<{
1715
+ success: boolean;
1716
+ message?: string;
1717
+ }>;
1718
+ saveConfig: (nodeId: string) => Promise<{
1719
+ success: boolean;
1720
+ message?: string;
1721
+ }>;
1722
+ resetConfig: (nodeId: string) => Promise<{
1723
+ success: boolean;
1724
+ message?: string;
1725
+ }>;
1726
+ cancelConfig: (nodeId: string) => void;
1727
+ validateConfig: (nodeId: string) => {
1728
+ valid: boolean;
1729
+ errors: Record<string, string>;
1730
+ };
1731
+ };
1732
+
1733
+ interface DeviceConfigPanelProps {
1734
+ /** Configuration binding to display */
1735
+ binding: DeviceConfigBinding | null;
1736
+ /** Called when panel should close */
1737
+ onClose: () => void;
1738
+ /** Panel position */
1739
+ position?: 'bottom' | 'side';
1740
+ /** Horizontal alignment for bottom position (default: center) */
1741
+ align?: 'left' | 'center' | 'right';
1742
+ /** Optimize for touch (larger targets) */
1743
+ touchOptimized?: boolean;
1744
+ /** Compact mode - reduces padding and spacing */
1745
+ compact?: boolean;
1746
+ /** Font size scale (default: 1.0) */
1747
+ fontScale?: number;
1748
+ /** Maximum height for bottom position (default: 70vh) */
1749
+ maxHeight?: string;
1750
+ /** Maximum width for bottom position (default: none) */
1751
+ maxWidth?: string;
1752
+ /** Toast notification duration in milliseconds (default: 3000) */
1753
+ toastDuration?: number;
1754
+ /** Called when controls button clicked (opens control panel for this device) */
1755
+ onOpenControls?: () => void;
1756
+ /** Show controls button in header */
1757
+ showControlsButton?: boolean;
1758
+ }
1759
+ declare function DeviceConfigPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onOpenControls, showControlsButton, }: DeviceConfigPanelProps): react_jsx_runtime.JSX.Element | null;
1760
+
1481
1761
  /**
1482
1762
  * Options for simulation behavior
1483
1763
  */
@@ -1516,4 +1796,4 @@ interface SimulationOptions {
1516
1796
  */
1517
1797
  declare function useSimulation(telemetry: TelemetryMap, updateTelemetryBatch: (updates: Array<any>) => void, options?: SimulationOptions): void;
1518
1798
 
1519
- export { type AnchorType, Button, type ButtonProps, CardHeader, CardUnit, CardValue, CircularGauge, type CircularGaugeProps, type ControlCapabilities, type ControlMode, ControlPanel, type ControlPanelProps, type ControlParameter, type ControlState, DEFAULT_THRESHOLDS, DashboardCard, type DataBinding, 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, createControlBinding, exampleDiagram, exportDiagram, generateRoutePoints, getAvailableSymbols, getPortWorldPosition, getSymbolDefinition, importDiagram, mockSymbolLibrary, nodeHasPort, overlayStyles, registerSymbol, registerSymbols, useDeviceControls, useDrag, useKeyboardShortcuts, useSelection, useSimulation, useTelemetry, useTelemetryStatus, useTheme, useViewBox, validateDiagram };
1799
+ 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 };
package/dist/index.d.ts CHANGED
@@ -486,8 +486,14 @@ interface DeviceControlPanelProps {
486
486
  onStop?: () => void;
487
487
  /** Called when custom action clicked */
488
488
  onCustomAction?: (actionId: string) => void;
489
- }
490
- declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onStart, onStop, onCustomAction, }: DeviceControlPanelProps): react_jsx_runtime.JSX.Element | null;
489
+ /** Called when config button clicked (opens config panel for this device) */
490
+ onOpenConfig?: () => void;
491
+ /** Show configuration button in header */
492
+ showConfigButton?: boolean;
493
+ /** Style for mode selector: 'buttons' (horizontal scroll) or 'dropdown' (select) */
494
+ modeSelectionStyle?: 'buttons' | 'dropdown';
495
+ }
496
+ declare function DeviceControlPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onModeChange, onParameterChange, onStart, onStop, onCustomAction, onOpenConfig, showConfigButton, modeSelectionStyle, }: DeviceControlPanelProps): react_jsx_runtime.JSX.Element | null;
491
497
 
492
498
  type DisplayMode = 'standard' | 'dashboard';
493
499
  interface FullscreenContainerProps {
@@ -1478,6 +1484,280 @@ declare function useDeviceControls(initialBindings?: DeviceControlBinding[]): {
1478
1484
  sendCustomAction: (nodeId: string, actionId: string) => Promise<void>;
1479
1485
  };
1480
1486
 
1487
+ /**
1488
+ * Configuration parameter definition
1489
+ */
1490
+ interface ConfigParameter {
1491
+ /** Parameter ID */
1492
+ id: string;
1493
+ /** Display label */
1494
+ label: string;
1495
+ /** Parameter description/help text */
1496
+ description?: string;
1497
+ /** Unit of measurement */
1498
+ unit?: string;
1499
+ /** Parameter type */
1500
+ type: 'number' | 'string' | 'boolean' | 'select' | 'multiselect';
1501
+ /** Current value */
1502
+ value: any;
1503
+ /** Default value */
1504
+ defaultValue?: any;
1505
+ /** Whether parameter is read-only */
1506
+ readOnly?: boolean;
1507
+ /** Whether parameter is enabled/editable */
1508
+ enabled?: boolean;
1509
+ /** Minimum allowed value (for number type) */
1510
+ min?: number;
1511
+ /** Maximum allowed value (for number type) */
1512
+ max?: number;
1513
+ /** Step increment (for number type) */
1514
+ step?: number;
1515
+ /** Decimal precision for display (for number type) */
1516
+ precision?: number;
1517
+ /** Options for select/multiselect type */
1518
+ options?: Array<{
1519
+ value: any;
1520
+ label: string;
1521
+ description?: string;
1522
+ }>;
1523
+ /** Custom validation function - returns true or error message */
1524
+ validate?: (value: any) => boolean | string;
1525
+ /** Required field */
1526
+ required?: boolean;
1527
+ /** Section this parameter belongs to */
1528
+ section?: string;
1529
+ /** Display order within section */
1530
+ order?: number;
1531
+ /** Parameter IDs this depends on - if any are disabled, this is disabled */
1532
+ dependsOn?: string[];
1533
+ /** Conditional visibility - function that determines if parameter should be shown */
1534
+ visibleWhen?: (allValues: Record<string, any>) => boolean;
1535
+ }
1536
+ /**
1537
+ * Configuration section for grouping parameters
1538
+ */
1539
+ interface ConfigSection {
1540
+ /** Section ID */
1541
+ id: string;
1542
+ /** Display title */
1543
+ title: string;
1544
+ /** Section description */
1545
+ description?: string;
1546
+ /** Display order */
1547
+ order?: number;
1548
+ /** Whether section is collapsible */
1549
+ collapsible?: boolean;
1550
+ /** Default collapsed state */
1551
+ defaultCollapsed?: boolean;
1552
+ /** Icon to display */
1553
+ icon?: string;
1554
+ }
1555
+ /**
1556
+ * Configuration state tracking
1557
+ */
1558
+ interface ConfigState {
1559
+ /** Has unsaved changes */
1560
+ isDirty?: boolean;
1561
+ /** Currently saving */
1562
+ isSaving?: boolean;
1563
+ /** Last save timestamp */
1564
+ lastSaved?: number;
1565
+ /** Last save result */
1566
+ lastSaveResult?: {
1567
+ success: boolean;
1568
+ message?: string;
1569
+ };
1570
+ /** Validation errors */
1571
+ errors?: Record<string, string>;
1572
+ }
1573
+ /**
1574
+ * Configuration actions/handlers
1575
+ */
1576
+ interface ConfigActions {
1577
+ /** Handler for applying changes (temporary, may be reverted) */
1578
+ onApply?: (values: Record<string, any>) => Promise<{
1579
+ success: boolean;
1580
+ message?: string;
1581
+ }>;
1582
+ /** Handler for saving changes (permanent) */
1583
+ onSave?: (values: Record<string, any>) => Promise<{
1584
+ success: boolean;
1585
+ message?: string;
1586
+ }>;
1587
+ /** Handler for resetting to defaults */
1588
+ onReset?: () => Promise<{
1589
+ success: boolean;
1590
+ message?: string;
1591
+ }>;
1592
+ /** Handler for canceling changes */
1593
+ onCancel?: () => void;
1594
+ /** Handler for exporting configuration */
1595
+ onExport?: () => Promise<{
1596
+ success: boolean;
1597
+ data?: any;
1598
+ message?: string;
1599
+ }>;
1600
+ /** Handler for importing configuration */
1601
+ onImport?: (data: any) => Promise<{
1602
+ success: boolean;
1603
+ message?: string;
1604
+ }>;
1605
+ }
1606
+ /**
1607
+ * Display configuration
1608
+ */
1609
+ interface ConfigDisplay {
1610
+ /** Panel title */
1611
+ title?: string;
1612
+ /** Panel subtitle */
1613
+ subtitle?: string;
1614
+ /** Custom CSS class */
1615
+ className?: string;
1616
+ /** Custom inline styles */
1617
+ style?: React.CSSProperties;
1618
+ /** Show apply button */
1619
+ showApply?: boolean;
1620
+ /** Show save button */
1621
+ showSave?: boolean;
1622
+ /** Show reset button */
1623
+ showReset?: boolean;
1624
+ /** Show cancel button */
1625
+ showCancel?: boolean;
1626
+ /** Show export button */
1627
+ showExport?: boolean;
1628
+ /** Show import button */
1629
+ showImport?: boolean;
1630
+ /** Confirmation message for reset action */
1631
+ resetConfirmMessage?: string;
1632
+ /** Confirmation message for critical saves */
1633
+ saveConfirmMessage?: string;
1634
+ }
1635
+ /**
1636
+ * Theme customization for config panel
1637
+ */
1638
+ interface ConfigTheme {
1639
+ /** Background color */
1640
+ backgroundColor?: string;
1641
+ /** Surface/card color */
1642
+ surfaceColor?: string;
1643
+ /** Border color */
1644
+ borderColor?: string;
1645
+ /** Text color */
1646
+ textColor?: string;
1647
+ /** Muted text color */
1648
+ mutedTextColor?: string;
1649
+ /** Accent color */
1650
+ accentColor?: string;
1651
+ /** Error color */
1652
+ errorColor?: string;
1653
+ /** Success color */
1654
+ successColor?: string;
1655
+ /** Warning color */
1656
+ warningColor?: string;
1657
+ }
1658
+ /**
1659
+ * Device configuration binding - maps a node to device configuration parameters
1660
+ */
1661
+ interface DeviceConfigBinding {
1662
+ /** Node ID this configuration is bound to */
1663
+ nodeId: string;
1664
+ /** Device tag/identifier */
1665
+ tag: string;
1666
+ /** Device name */
1667
+ deviceName?: string;
1668
+ /** Device type */
1669
+ deviceType?: string;
1670
+ /** Configuration sections */
1671
+ sections?: ConfigSection[];
1672
+ /** Configuration parameters (flat list, optionally grouped by section) */
1673
+ parameters: ConfigParameter[];
1674
+ /** Current state */
1675
+ state: ConfigState;
1676
+ /** Available actions */
1677
+ actions: ConfigActions;
1678
+ /** Display configuration */
1679
+ display?: ConfigDisplay;
1680
+ /** Theme customization */
1681
+ theme?: ConfigTheme;
1682
+ /** Additional metadata */
1683
+ metadata?: Record<string, any>;
1684
+ }
1685
+ /**
1686
+ * Map of device configurations by node ID
1687
+ */
1688
+ type DeviceConfigMap = Map<string, DeviceConfigBinding>;
1689
+ /**
1690
+ * Helper to create a config binding with defaults
1691
+ */
1692
+ declare function createConfigBinding(nodeId: string, tag: string, parameters: ConfigParameter[], actions: ConfigActions, options?: {
1693
+ deviceName?: string;
1694
+ deviceType?: string;
1695
+ sections?: ConfigSection[];
1696
+ display?: ConfigDisplay;
1697
+ theme?: ConfigTheme;
1698
+ metadata?: Record<string, any>;
1699
+ }): DeviceConfigBinding;
1700
+
1701
+ /**
1702
+ * Hook for managing device configuration bindings
1703
+ */
1704
+ declare function useDeviceConfigs(initialConfigs?: DeviceConfigBinding[]): {
1705
+ configs: DeviceConfigMap;
1706
+ getConfig: (nodeId: string) => DeviceConfigBinding | undefined;
1707
+ setConfig: (config: DeviceConfigBinding) => void;
1708
+ removeConfig: (nodeId: string) => void;
1709
+ clearConfigs: () => void;
1710
+ updateConfig: (nodeId: string, updates: Partial<DeviceConfigBinding>) => void;
1711
+ updateConfigState: (nodeId: string, stateUpdates: Partial<DeviceConfigBinding["state"]>) => void;
1712
+ updateConfigBatch: (updates: Record<string, Partial<DeviceConfigBinding>>) => void;
1713
+ updateParameterValue: (nodeId: string, parameterId: string, value: any) => void;
1714
+ applyConfig: (nodeId: string) => Promise<{
1715
+ success: boolean;
1716
+ message?: string;
1717
+ }>;
1718
+ saveConfig: (nodeId: string) => Promise<{
1719
+ success: boolean;
1720
+ message?: string;
1721
+ }>;
1722
+ resetConfig: (nodeId: string) => Promise<{
1723
+ success: boolean;
1724
+ message?: string;
1725
+ }>;
1726
+ cancelConfig: (nodeId: string) => void;
1727
+ validateConfig: (nodeId: string) => {
1728
+ valid: boolean;
1729
+ errors: Record<string, string>;
1730
+ };
1731
+ };
1732
+
1733
+ interface DeviceConfigPanelProps {
1734
+ /** Configuration binding to display */
1735
+ binding: DeviceConfigBinding | null;
1736
+ /** Called when panel should close */
1737
+ onClose: () => void;
1738
+ /** Panel position */
1739
+ position?: 'bottom' | 'side';
1740
+ /** Horizontal alignment for bottom position (default: center) */
1741
+ align?: 'left' | 'center' | 'right';
1742
+ /** Optimize for touch (larger targets) */
1743
+ touchOptimized?: boolean;
1744
+ /** Compact mode - reduces padding and spacing */
1745
+ compact?: boolean;
1746
+ /** Font size scale (default: 1.0) */
1747
+ fontScale?: number;
1748
+ /** Maximum height for bottom position (default: 70vh) */
1749
+ maxHeight?: string;
1750
+ /** Maximum width for bottom position (default: none) */
1751
+ maxWidth?: string;
1752
+ /** Toast notification duration in milliseconds (default: 3000) */
1753
+ toastDuration?: number;
1754
+ /** Called when controls button clicked (opens control panel for this device) */
1755
+ onOpenControls?: () => void;
1756
+ /** Show controls button in header */
1757
+ showControlsButton?: boolean;
1758
+ }
1759
+ declare function DeviceConfigPanel({ binding, onClose, position, align, touchOptimized, compact, fontScale, maxHeight, maxWidth, toastDuration, onOpenControls, showControlsButton, }: DeviceConfigPanelProps): react_jsx_runtime.JSX.Element | null;
1760
+
1481
1761
  /**
1482
1762
  * Options for simulation behavior
1483
1763
  */
@@ -1516,4 +1796,4 @@ interface SimulationOptions {
1516
1796
  */
1517
1797
  declare function useSimulation(telemetry: TelemetryMap, updateTelemetryBatch: (updates: Array<any>) => void, options?: SimulationOptions): void;
1518
1798
 
1519
- export { type AnchorType, Button, type ButtonProps, CardHeader, CardUnit, CardValue, CircularGauge, type CircularGaugeProps, type ControlCapabilities, type ControlMode, ControlPanel, type ControlPanelProps, type ControlParameter, type ControlState, DEFAULT_THRESHOLDS, DashboardCard, type DataBinding, 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, createControlBinding, exampleDiagram, exportDiagram, generateRoutePoints, getAvailableSymbols, getPortWorldPosition, getSymbolDefinition, importDiagram, mockSymbolLibrary, nodeHasPort, overlayStyles, registerSymbol, registerSymbols, useDeviceControls, useDrag, useKeyboardShortcuts, useSelection, useSimulation, useTelemetry, useTelemetryStatus, useTheme, useViewBox, validateDiagram };
1799
+ 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 };